Http error 500 after update to 3.3.3

hi,
ovh replied to me saying that on the Apache server they did not find any critical issues with the platform but it seems that for them it is a problem with the site (farmos). I’m waiting for the next update.

thanks for the help

They don’t give you access to the Apache logs? If that’s the case then I’m not sure I can recommend using them to host farmOS. You need access to logs.

1 Like

they gave me a txt with an error:
HTTP/1.1" 500 - “-”
[uri “/”] [unique_id “Z38bAMAkLK5lUZBruoVTHQAAAGY”]
AH10131: FastCGI: server “/homez.542/xxxxx/xxxxx/web/index.php” stderr
Uncaught PHP Exception Error: “Class “Twig\Node\Expression\Ternary\ConditionalTernary” not found” at /home/xxxxx/xxx/vendor/twig/twig/src/ExpressionParser.php line 281,

these errors don’t tell me anything

Look in vendor/twig/twig/src/Node/Expression/Ternary. Is there a file called ConditionalTernary.php?

I just confirmed that it is included in farmOS-3.3.3.tar.gz, downloaded from Release 3.3.3 · farmOS/farmOS · GitHub.

If that file is missing in your environment, then that would explain the error, and indicates that you do not have a proper farmOS 3.3.3 codebase installed.

If that file is NOT missing, then it tells us that your PHP environment is not able to load it for some reason.

Please report back.

1 Like

What ovh hosting plan is this on?..

If there is indeed no way to get at the logs for necessary (apache, php, and database) insights, then I might suppose there is also no shell access to take advantage of tools like composer and drush; this has the smell of an issue that could be resolved by composer dumpautoload and/or drush cache:rebuild… and as a shared/economy hosting provider, also no liberty/ability to just “kick” the webserver (restart apache), which might be all it would take in this case too. But you’re at the mercy of the provider… maybe they cycle web processes/pools on a daily or nightly basis. Who knows.

In this kind of environment, ones hands will forever by tied. Bless @mstenta for his patience, but I must agree there are plentiful options for hosting PHP applications affordably, while preserving full control, shell access, log monitoring, etc.

1 Like

Yes, the file is present in that path

PS clean install of 3.3.3 works,only the update doesn’t work

1 Like

hi,
this morning this log by ovh:

Sat Jan 11 09:21:39 2025] [error] [client 82.53.45.63] [host xxxxxxxxx] AH10131: FastCGI: server “/homez.542/xxxx/xxx/web/index.php” stderr: #3 {main}ge: ParseError: syntax error, unexpected token “,” in /home/xxxxx/xxxx/web/sites/default/settings.php on line 775 #0 /home/xxxxx/xxxxx/web/core/lib/Drupal/Core/DrupalKernel.php(1130): Drupal\Core\Site\Settings::initialize(‘/home/xxxx…’, ‘sites/default’, Object(Composer\Autoload\ClassLoader)), referer: xxxxxxxxx/update.php/results

@altix This settings.php file is where things like your database connection credentials are stored. The file is created automatically during installation of Drupal/farmOS after you type those credentials into the UI installer.

Did you manually edit it at all? I have never heard of Drupal automatically saving a syntax error to that file. Please look at line 775 and see if you can figure out what the problem is. If you can post the contents of that line (and surrounding lines), without posting sensitive database credentials, please do.

1 Like

I managed to fix it now the site is updated to the latest version… the problem is that FTP wasn’t copying two files into the core folder. Now the site work fine

there was one comma too many

thanks @mstenta for you help and thanks for farmos, i love farmos

1 Like

That’s great @altix - glad to hear it’s all working now.

I’ve heard of people experiencing this issue before, which makes me very wary of trusting that method of setting up the codebase. It seems too prone to errors. If possible it would be better to unpack the release tarball directly on the server, rather than trying to copy all files over FTP.

FYI: We are considering dropping support for the “packaged releases” in farmOS 4.x, which means we will no longer provide packaged tarballs, and instead will recommend using composer commands to manage your codebase and dependencies. With that in mind, you might want to start planning ahead and find a hosting provider that allows command-line access. Either that, or start using the farmOS Docker images. Modern PHP applications really need to be managed and deployed using composer, so it will be harder and harder to support shared hosting environments that do not allow that. We’ve tried to make it easier by providing these packaged releases, but we end up spending a lot of time trying to help with issues like this as a result.

3 Likes

I asked ovh and they told me that it is possible to install composer on shared hosting. I’ve never used it so I would be in trouble so I hope they don’t eliminate the package release. I am a farmer, I have been using farmos since version 1 and I have always been happy with it so sooner or later I will have to learn to use Composer

how to update farmos with composer? any guide for beginners?
thanks @mstenta

We have this guide: Building farmOS with Composer | farmOS

But you can wait until farmOS v4 to figure it out. That documentation may move/change when we release v4, which will hopefully be sometime this year, but hard to say right now. We will continue to produce packaged releases for v3.

3 Likes

no i get the same issue (No route found for “GET http://192.168.0.113/”) even on v3.3.3

if the docker-compose.yml has no issue then probably the arm docker image file has some issues. so i am waiting for the arm version to get out of beta stage