php symfony not working

278 views
Skip to first unread message

matthewb...@gmail.com

unread,
Jul 12, 2022, 11:33:12 AM7/12/22
to AtoM Users
Hi all,
I am having issues getting php symfony to execute at all after installing atom 2.6 into my ubuntu 21.10 instance.

Here is the error in text with a easier to read screenshot attachment

Deprecated: Return type of sfEvent::offsetExists($name) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/nginx/atom/vendor/symfony/lib/event_dispatcher/sfEvent.php on line 120

Deprecated: Return type of sfEvent::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/nginx/atom/vendor/symfony/lib/event_dispatcher/sfEvent.php on line 142

Deprecated: Return type of sfEvent::offsetSet($name, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/nginx/atom/vendor/symfony/lib/event_dispatcher/sfEvent.php on line 155

Deprecated: Return type of sfEvent::offsetUnset($name) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/nginx/atom/vendor/symfony/lib/event_dispatcher/sfEvent.php on line 165

Fatal error: Uncaught Error: Call to undefined function ctype_digit() in /usr/share/nginx/atom/vendor/symfony/lib/command/sfFormatter.class.php:31
Stack trace:
#0 /usr/share/nginx/atom/vendor/symfony/lib/command/sfCommandApplication.class.php(661): sfFormatter->__construct()
#1 /usr/share/nginx/atom/vendor/symfony/lib/command/sfCommandApplication.class.php(44): sfCommandApplication->guessBestFormatter(Resource id #2)
#2 /usr/share/nginx/atom/vendor/symfony/lib/command/cli.php(19): sfCommandApplication->__construct(Object(sfEventDispatcher), NULL, Array)
#3 /usr/share/nginx/atom/symfony(14): include('/usr/share/ngin...')
#4 {main}
  thrown in /usr/share/nginx/atom/vendor/symfony/lib/command/sfFormatter.class.php on line 31



So any help or thoughts would be greatly appreciated.
php symfony error1.png

Jim Adamson

unread,
Jul 12, 2022, 12:44:06 PM7/12/22
to ica-ato...@googlegroups.com
Hi Matthew,

I'd advise installing AtoM 2.6 on Ubuntu 18.04; this is the sole supported version of Ubuntu that'll run 2.6. 

FYI, 2.7 (as yet unreleased) will support Ubuntu 20.04.

Thanks, Jim

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/f2bd6626-15a3-438e-9686-58607d3276d1n%40googlegroups.com.


--
Jim Adamson
Systems Administrator/Developer
Facilities Management Systems
IT Services
LFA/023 | Harry Fairhurst building | University of York | Heslington | York | YO10 5DD

matthewb...@gmail.com

unread,
Jul 12, 2022, 4:34:45 PM7/12/22
to AtoM Users
Hi Jim,
The VPS provider I am with no longer allows installation of Ubuntu 18. Security issues I suppose.
I had a similar problem back a while ago using ubuntu 18, and I can't remember how I solved it. Here is the issue: https://groups.google.com/u/1/g/ica-atom-users/c/KCNJa-Ay4iM/m/IhcCGQr7CQAJ

Jim Adamson

unread,
Jul 13, 2022, 5:34:42 AM7/13/22
to ica-ato...@googlegroups.com
Hi Matthew,

Ubuntu 18.04 LTS is supported (by Canonical) until April 2023, so I'd guess that your VPS provider wasn't so much removing it on security grounds, but perhaps only providing the latest versions to reduce their own support burden. Generally I tend to avoid the 'odd' releases, like 21, as the support lifespan is very short.

I'm not sure what to suggest, given your VPS provider's position. If it's merely for testing purposes, then you could try the 2.7 version from GitHub on Ubuntu 20.04 (assuming your VPS provider provides this O/S version). If you're looking to set up a production box then you'll probably need to find an alternative VPS provider, else wait for 2.7's official release.

If you're familiar with using Vagrant, I created a Vagrantfile and shell provisioning script to automate the setup process, based on the official Ubuntu 18.04 AtoM installation instructions. If this creates a working environment for you, then that might give you an idea of where the problems you originally had with the installation stemmed from.

Hope that helps.

Thanks, Jim

Dan Gillean

unread,
Jul 13, 2022, 8:13:29 AM7/13/22
to ICA-AtoM Users
Hi Matthew, 

To add to what Jim's saying, you will definitely encounter issues if trying to use later versions of Ubuntu and PHP with AtoM 2.6. 

2.7 is not an official public release yet, but it is quite stable - we have an internal first release candidate we are now testing and reviewing, as you can see from this commit, so if you install it and use Option 2 in the installation instructions (install from the code repository), you can simply git pull --rebase (and then restart services) once the final public version is announced. This will give you PHP 7.4 and Ubuntu 20.04 support, making conflicts with Ubuntu 21 far less likely. For peace of mind, make sure you have a good plan for regular backups in place - but honestly this should be true for any production system, whether it uses a stable release version or not! 

Otherwise, I suspect the main cause of the 2.6 installation issue is not the Ubuntu version, but the PHP version - is Ubuntu 21 using PHP8 by default? We found a few issues with PHP 7.4 (here is one example) that had to be addressed for the 2.7 release, and if there are breaking changes between minor PHP versions, I'm certain that PHP8 will be introducing many additional issues. 

At minimum, if you can't downgrade your Ubuntu version, perhaps see if doing so with the PHP version is an option?

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


matthewb...@gmail.com

unread,
Jul 13, 2022, 8:40:04 AM7/13/22
to AtoM Users
Thanks Dan and Jim,
So yea Dan, as you say I suspect its something to do with php 8.
When I installled ubuntu 21, and looked into the etc folder, there seemed to be no sign of php at all. So I added the php respository and did an install of php 7. 2. 
But somewhere along the way, I saw mentions of php 8, even though I never added it. It even added a php 8 folder alongside my 7.2 one in the etc directory without me doing that.
As a rather brutal method, I tried just removing that 8 directory, but it didn't help.
It must be something in the whole system of ubuntu 21 that is pulling it over that way.
My thoughts were to tried to install php 7.2 without adding the repository, and see what that does. If that doesn't work then go for your method Dan of downgrading to 20.4 and then php 7.4.
Probably, as Jim is saying a more safer ubuntu version than 21.
I'll post up my progress here for those who may encounter similar problems.

matthewb...@gmail.com

unread,
Jul 14, 2022, 8:20:00 AM7/14/22
to AtoM Users
I'm installing 2.7 on ubuntu 20 now.
Just writing to say that I am got the following error:

SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters.

which I resolved with this:

Message has been deleted

matthewb...@gmail.com

unread,
Jul 14, 2022, 10:08:48 AM7/14/22
to AtoM Users
Neither of the links to atom 2.7 work now. The tarball and the git code.
 Here's what it says when I attempt to clone the git:
root@________:/usr/share/nginx/atom# sudo git clone -b stable/2.7.x http://github.com/artefactual/atom.git
Cloning into 'atom'...
warning: redirecting to https://github.com/artefactual/atom.git/
fatal: Remote branch stable/2.7.x not found in upstream origin

Dan Gillean

unread,
Jul 14, 2022, 10:14:18 AM7/14/22
to ICA-AtoM Users
Hi Matthew, 

Sorry, the release is not actually completed and public yet, so those links don't quite work at this time. 

You can still use the 2.7 installation instructions with Option 2 (install from our code repository), but instead of stable/2.7.x as the branch name (which hasn't been created yet, use our qa/2.x development branch

Regarding the other issue you reported with the MySQL configuration, I'm still waiting to be able to follow up with a dev on that. 

Cheers, 


Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Message has been deleted

matthewb...@gmail.com

unread,
Jul 14, 2022, 12:11:24 PM7/14/22
to AtoM Users
Now trying to compile the CSS and getting the deprecated message

sudo make -C /usr/share/nginx/atom/plugins/arDominionPlugin
make: Entering directory '/usr/share/nginx/atom/plugins/arDominionPlugin'
Running LESS compiler...
lessc --compress --relative-urls css/main.less > css/main.css
The --relative-urls option has been deprecated. Use --rewrite-urls=all.
The compress option has been deprecated. We recommend you use a dedicated css minifier, for instance see less-plugin-clean-css.
make: Leaving directory '/usr/share/nginx/atom/plugins/arDominionPlugin

So then I try:
sudo make --rewrite-urls=all -C /usr/share/nginx/atom/plugins/arDominionPlugin

And get:
make: unrecognized option '--rewrite-urls=all'
Usage: make [options] [target] ...
Options:
  -b, -m                      Ignored for compatibility.

..... and so on.

I could try messing around with the options, but not sure I want to do that.

matthewb...@gmail.com

unread,
Jul 14, 2022, 12:28:01 PM7/14/22
to AtoM Users
I edited the Makefile to include the relative-urls plugin, but had to remove the compress option. It raised no objections, but I'll find out if it worked later...

matthewb...@gmail.com

unread,
Jul 14, 2022, 12:41:27 PM7/14/22
to AtoM Users
heap space still had to be downgraded in jvm options in elasticsearch to 512m, despite using command line interface. But it is better than the previous setup. Well done.

Dan Gillean

unread,
Jul 15, 2022, 9:14:29 AM7/15/22
to ICA-AtoM Users
Hi Matthew, 

The only thing you should have to change are two instances where the branch name appears. Any time in the Option 2 instructions it says stable/2.7.x, just change that to qa/2.x in your commands. Otherwise, I think you should be able to follow the instructions as listed!

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


On Thu, Jul 14, 2022 at 11:47 AM matthewb...@gmail.com <matthewb...@gmail.com> wrote:
Sorry, I haven't done this before. To what do I adjust the link to exactly to get that branch?

Dan Gillean

unread,
Jul 15, 2022, 9:16:13 AM7/15/22
to ICA-AtoM Users
I see I responded before seeing all of your updates! Sounds like you got things working. I will ask a developer to take a look and see if they have any thoughts on the lessc and jvm issues you encountered. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

matthewb...@gmail.com

unread,
Jul 15, 2022, 9:25:09 AM7/15/22
to AtoM Users
Thanks Dan,
I think the problem may have been that I had nowhere near the amount of RAM required. I forgot to check that point before installing on this particular server.

Everything installed ok, but when I tried bringing in a new database, and purging before doing that I was getting these errors:

>> propel    Running "insert-sql" phing task
Execution of target "insert-sql" failed for the following reason: /usr/share/nginx/atom/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:272:5:  [wrapped: SQLSTATE[HY000] [1049] Unknown database 'atom']
    [phing] /usr/share/nginx/atom/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:272:5:  [wrapped: SQLSTATE[HY000] [1049] Unknown database 'atom']
                                                                                     
  Some problems occurred when executing the task:                                    
                                                                                     
  build-propel.xml:272:5:  [wrapped: SQLSTATE[HY000] [1049] Unknown database 'atom']  
                                                                                     
  If the exception message is not clear enough, read the output of the task for      
  more information                                                                    
                                                                                     
>> file-     /usr/share/nginx/atom/config/generated-schema.xml
>> file-     /usr/share/nginx/atom/config/generated-qtAccessionPlugin-schema.xml
>> file-     /usr/share/nginx/atom/config/generated-qbAclPlugin-schema.xml
>> purge     Aborted


And then also:

>> propel    Running "insert-sql" phing task
>> file-     /usr/share/nginx/atom/config/generated-schema.xml
>> file-     /usr/share/nginx/atom/config/generated-qtAccessionPlugin-schema.xml
>> file-     /usr/share/nginx/atom/config/generated-qbAclPlugin-schema.xml
>> purge     Loading initial data
>> propel    load data from "/usr/share/nginx/atom/data/fixtures"
>> purge     Creating search index

                                       
  No enabled connection                
                                       

PHP Fatal error:  Uncaught Elastica\Exception\ClientException: No enabled connection in /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Connection/Strategy/Simple.php:28
Stack trace:
#0 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Connection/ConnectionPool.php(98): Elastica\Connection\Strategy\Simple->getConnection()
#1 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Client.php(549): Elastica\Connection\ConnectionPool->getConnection()
#2 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Client.php(669): Elastica\Client->getConnection()
#3 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Client.php(706): Elastica\Client->request()
#4 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Index.php(562): Elastica\Client->requestEndpoint()
#5 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Index.php(250): Elastica\Index->requestEndpoint()
#6 /usr/share/nginx/atom/plugins/arElasticSearchPlugin/lib/arElastic in /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Connection/Strategy/Simple.php on line 28

Fatal error: Uncaught Elastica\Exception\ClientException: No enabled connection in /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Connection/Strategy/Simple.php:28
Stack trace:
#0 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Connection/ConnectionPool.php(98): Elastica\Connection\Strategy\Simple->getConnection()
#1 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Client.php(549): Elastica\Connection\ConnectionPool->getConnection()
#2 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Client.php(669): Elastica\Client->getConnection()
#3 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Client.php(706): Elastica\Client->request()
#4 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Index.php(562): Elastica\Client->requestEndpoint()
#5 /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Index.php(250): Elastica\Index->requestEndpoint()
#6 /usr/share/nginx/atom/plugins/arElasticSearchPlugin/lib/arElastic in /usr/share/nginx/atom/vendor/composer/ruflin/elastica/lib/Elastica/Connection/Strategy/Simple.php on line 28


I was doing all this because it was telling me that the base table already existed. See here https://groups.google.com/u/1/g/ica-atom-users/c/kleAR7dslP4/m/p7YpnqbLBwAJ

and then that was because I was getting the unknown column error when I was trying to do a symfony search:populate command.

Anyway, I think the whole thing may boil down to this lack of memory problem (elasticsearch crashing in up above).

I can upgrade the memory later, and see if that is the case, but for the moment, I'll try some other solutions.

Will update this thread when I make more progress.

Dan Gillean

unread,
Jul 18, 2022, 9:10:29 AM7/18/22
to ICA-AtoM Users
Hi Matt, 

Do keep us updated! I checked with one of our developers, who agrees about the memory - he suggests the jvm heap space should be at minimum 1GB, and ideally 2GB, which should help speed up AtoM as well. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Reply all
Reply to author
Forward
0 new messages