Is the latest Symfony version (1.14.18) supposed to run properly with PHP 5.4?
I've just upgraded to PHP 5.4 locally and multiple sites that have previously worked fine are now throwing the following error when trying to load any page:
Fatal error: Call to undefined method sfCoreAutoload::register() in C:\dev\projects\my_site\config\ProjectConfiguration.class.php on line 4
The path to the sfCoreAutoload class is fine but for some reason it treats it as if it didn't exist at all.
I managed to resolve the issue so will just answer here for the benefit of anyone else facing the same. The culprit was APC. The latest "stable" version of the pre-compiled APC (3.1.9) didn't work with Symfony 1.4.18 + PHP 5.4.4, but using the APC beta (3.1.12) does work.
Related
a few weeks back I setup PHP 8 but hit some issues in projects so reverted back to 7.4.
However, a few of my projects are broken and the errors I'm getting all seem linked to PHP 8.
An example is "Fatal error: Uncaught ArgumentCountError: array_merge()"
This is on a WordPress project that even with default theme and database from production is still throwing this issue when it wasn't before.
Running which php and php -v are both stating 7.4 as the PHP version.
Just checked and the phpinfo() page is still PHP 8.
Anything else I need to that might be causing this drama? I'm using Laravel Valet...
Might be useful to someone...
Turns out that Laravel Valet was caching it's .sock file...
rm ~/.config/valet/valet.sock
valet start
Did the job for me.
I am working on the application which is built on the laravel 5.4 framework. I have installed the latest version of PHP. which is
PHP Version 7.4.5
Actually I would like to know does PHP 7.4.5 supports laravel 5.4 app if no then why? and how can I downgrade the PHP version?
Also I am getting the error in php logs files ( [2020-05-15 12:37:08] local.ERROR:
ErrorException: Trying to access array offset on value of type null in
C:\xampp\htdocs\carehalo_mini\app\Helpers.php:392 )
Also, you can check out the code in the given screenshot Helpers.php:392 lines
app\Helpers.php this sounds like something part of the app you have and not related to Laravel. My best guess is that Laravel won't have any problems running on 7.4, but the same does not apply for the code written in the app. And of course, best thing to do would be to upgrade your Laravel version to at least 6 regardless of working or not.
You can fix your Error by changing line 392 to:
if(empty($admin) || ($admin->token != Session::get('token'))
I was trying to setup a Laravel project in a server which I don't have ssh access, just cPanel access, so I came in with the problem that it seems that the server is not recognizing the right PHP version, Laravel's version I was trying to setup is 5.5. phpinfo() outputs version 7.0.22.
Inside cPanel there's a module called "PHP configuration" and it is set to version 7.
How can I solve this problem, I really want to use Laravel 5.5 or above, it is worth mentioning that I don't have contact with the server owner, I'm limited just to cPanel.
It is throwing the following error:
Parse error: syntax error, unexpected '?', expecting variable in /vendor/symfony/translation/Translator.php line 79
which is
public function __construct(?string $locale, ...
That is how I know it is not recognizing the right php version.
EDIT:
Just to clear out, I just thought that was the problem because I have had already that issue sometime in the past and read similar posts, but if that's not the case, I would appreciate that to be pointed out and not just silly jokes like "a bird flew", maybe other people are in the same problem and think of the same reason and this question could be useful to them.
So it turned out that the server's PHP version had nothing to do with the problem, the thing was, since I had no access to SSH, I had to install Laravel in my local computer, then copy all the files and put them inside the server, but my computer had PHP 7.1 and although Laravel's version was really version 5.5, some features of PHP 7.1 were applied on that Laravel installation.
So the solution was just to install Laravel 5.5 within a PHP 7.0.* installation in order to make it work in a server with PHP 7.0.22
Related GitHub issue ~ https://github.com/laravel/framework/issues/23559
So I'm using Timber v0.22.5. I have it currently running on my local and a dev environment right now. Everything is running great no issues. Both environments are running PHP 5.5.9.
I just migrated it to my production server which is running PHP 7.0. I am now getting the following error from Timber.
Fatal error: Uncaught Error: Cannot access property started with '\0'
in
/var/www/html/wp-content/plugins/timber-library/lib/timber-core.php:67
I'm not sure what exactly else is different between the environments other than different versions of PHP. I cannot update to Timber v1 because well the guide seems to suggest not doing that because of some backwards compatibility issues.
I'm going to try installing PHP 5.5.9 and see if that does the trick but was wondering if anyone else was having this issue.
Thanks!
This is an issue with Timber 0.* and PHP 7. You should be able to fix it by replacing Timber/Core::import with the current version:
https://github.com/timber/timber/blob/master/lib/Core.php#L59-L75
This will be happened if you use the latest version of "Better Search and Replace" plugin too. You should be able to fix by trimming the key:
https://github.com/deliciousbrains/better-search-replace/issues/71
i deploy a symfony 1.4 project on a RHEL 6 Server with PHP 5.3.3.
On a irregular basis I get entries in the php error log complaining that sfProjectConfiguration could not be found and the request fails. The same request then runs smoothly the next time.
There is no memcache or apc installed.
On other machines it works flawless.
Any ideas how to solve or investigate the problem?
Sometimes i have an fimiliar error in frontend/backend_dev. Does the error occur when you use on of them? It happens to me when I "hammer" the F5-Button. Could be a cache-rebuilding problem.