Laravel 4 : white screen after 2 years - php

I didn't touched my personal website since 2 years and suddenly I have only a white screen with a Internal Server Error message in the console.
That's it!
The website is build on top of Laravel 4.
I've wrote to my hosting service but apparently: hosting side is completely normal.
Any idea is appreciated, thanks!
Last error log
require(paths.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /public/index.php on line 24
UPDATE
Ok I google it a lot and then I found out that there is a Laravel function called yield() that collides with a reserved name in PHP 5.5 that was not in PHP 5.4.
Any ideas?

Ok, got it!
The problem so is the conflict between the yield in php5.4 and php5.5 so in this link you know where you need to change yield to _yield to fix that without rebuild your entire site with another version of Laravel.
https://github.com/laravel/laravel/commit/3298407238fd3e212cdf8d829adc6f519b941052

Related

Problem with Symfony 5 in prod but not dev

I have a problem with my project in symfony 5.4 (recently update from 4.4)
I deploy my project on the prod server (on a subdomain) and he don't work in prod environnement, but work in dev.
I already :
_ fix permissions for /var folder
_ set up vhosts (i'm on plesk so i put directives in vhost.conf, in my subdomain)
_ install and update composer
The problem is that there is a lot of missing image (it's ok they are on prod), when i run the project in dev, missing image return a 404 error, but when i turn symfony on prod, missing image return a 500 error, and then the all site is on error 500 untill i clear symfony cache.
I have the previous verison (the 4.4 one), who run in the principal domain, and i dont have this problem.
I deploy the exact same project (the new one in 5.4), in an others test server, and he works in dev and prod (no error 500 on image).
I think it's a server problem, but i passed 4 days on this, i tried a lot of thing, and i'm still stuck :)
First, thank you for trying to help me, i appreciate that.
So.
For removing the error with the image (error 500 instead 404), it appears that the problem was coming from my error templates 'bundles/TwigBundles/error.html.twig', i removed all the code and try just a simple tag, clear the cache and then the missing images trhow a 404 error.
I also reinstall composer require symfony/twig-pack
This helped me : https://stackoverflow.com/a/13741553/20040268
So the site was running fast this time, but as soon i changed page, error 500 again...at least it was fast ^^
So i keep digging, and like #user1915746 said, i started searching with php and the error code i send : mod_fcgid: error reading data from FastCGI server.
I tried a lot of thing for removing this error like :
https://stackoverflow.com/a/12192622/20040268
But still not resolved my problem.
Finally i decided to change the all php ^^ I was in 7.4.30, i pass in php 8.0.20 and...voila...no more error 500...
If you guys have the same thing, and tried all i tried, change php version or if you can't try to see if you don't have missing package (like php-cgi).
Thank you again for your time!

PhpRunner: Getting error in - classes/controls/ViewFileField.php on line 60... How to solve it?

We are using an admin panel which is create using PhpRUnner 10.3 (by a developer on Fiverr), and it was working just great on our old VPS which has Php 5.6. But just yesterday we switched to a new hosting company called GoDaddy. On GoDaddy the Php version was 7.4 I changed it to 5.6 but still the error occures.
After uploading the admin panel to GoDaddy we are getting error as follows:
Fatal error: require_once(): Failed opening required
'/home/g6oss6ljbwlx/public_html/admin/classes/uploadhandler.php'
(include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php')
in
/home/g6oss6ljbwlx/public_html/admin/classes/controls/ViewFileField.php
on line 60
The developer is not answering our query any more as he had completed out project 6 months back.
Can this problem be solved?
If yes please help.
I have found the solution.
The file (uploadhandler.php) being referred to in ViewFileField.php has case difference. I copied the file UploadHandler.php and renamed it to uploadhandler.php and now the admin panel has started working!!
I am still puzzled as to why it was working properly in our old server and giving errors in GoDaddy server.
Will check into that when I get time.

Prestashop 1.7 Transplant a Module Page Temporarily Unavailable Error

I recently started experiencing a strange error every single time I try to visit the transplant a module page. From the design > positions page3 I click on the "transplant a module" button on the top right and it takes a really long time to load, but then it does not load at all. I get a blank page with the following error:
The page you are looking for is temporarily unavailable.
Please try again later.
5cb0af3eb5bd6096ecb4dce014d6635a 3a1c22abc23c754c0fb7be3b7c58431e 159cf03490b9d26b556696ed897a7daa
I contacted my server provider and they explained to me that the server I was using was reaching the max amount of files allocated, and that I needed to get a new server just for this particular site. So I did. I then cloned the site and database and brought it over to the new server....but I'm still getting this error everytime I try to transplant a module.
Any one ever encountered this issue? Any one have any ideas as to what could be causing this? Any suggestions on what I can do to troubleshoot this error further?
I have turned on debug mode, and it does not give any more information than what's above.
Thank you all,
Maybe you are facing the following known bug. It will be fixed in 1.7.5 (coming soon)
https://github.com/PrestaShop/PrestaShop/issues/10811
Sometimes module have some issues, I've a problem one day and this help me :
In config/xml copy the 2 files "must_have_modules_list.xml" and "default_country_modules_list.xml" on your PC in case,
And then delete the two files from your site,
This "refresh" the cache of your module config
Hope will help you
The "Transplant a module" page is now working after I changed the file AdminModulesPositionsController.php in /root/controllers/admin folder.
In line 449 changed:
$all_modules_controllers = Dispatcher::getModuleControllers($type);
to
$all_modules_controllers = Dispatcher::getControllers($type);
Try this, it's working for me.

Symfony 3.3 Built-In server issue (PHP 7.1.9)

I'm just beginning with Symfony 3 but I'm stuck with a built-in server issue.
I am using wamp64 v3.0.6 with PHP 7.1.9 (and PHPStorm as IDE) on Windows 7.
I ran the built-in server once and got a response from localhost:8000 correctly but then, just like [this issue][1], I get the following error message when I try to access localhost:8000 on subsequent tries :
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required'C:\wamp64\www\projectname\vendor\symfony\symfony\src\Symfony\Bundle\WebServerBundle/Resources/router.php' (include_path='.;C:\php\pear') in Unknown on line 0
I've tried uninstalling symfony, wamp64 and PHPstorm to try to identify the problem.
After reinstalling wamp (without running the server) and symfony I've noticed the following :
When I run the built-in server for the first time and immediately access localhost:8000, it works fine. But then the server stops without my pressing CTRL-C. When I restart the server and try to access localhost:8000 I now get said error message.
I've tried creating a another project using PHP 7.0.23 with the same results : once the server crashes, I can no longer load my project.
I'm hoping someone can provide an answer as regarding this issue. I've spent the past few hours searching the web for an answer and have found none.
Thanks in advance.
Credit goes to Baig for this answer :
The source of the issue lies with the antivirus. To solve this, I've excluded the wamp directory (where symfony and my projects are also stored) from my antivirus and, voila, no more server crashes, everything works fine.

Problems after moving a silverstripe website to a dev environment

We have a silverstripe website that works ok in production on a centos webserver. I am asked to make modifications to this site and have to have a working copy on our internal Ubuntu dev server. The guy that did the website is long gone and no one knows this project.
I did the move, transfered the database and changed the config files to the new settings. Now whenever I start the site I get a full page or red errors:
FATAL ERROR: call_user_func_array() expects parameter 2 to be array, null given
At line 404 in /home/user/site/sapphire/core/ViewableData.php
call_user_func_array(Array,)
line 404 of ViewableData.php
ViewableData->XML_val(current_lang,,1)
line 4 of .cache.home.user.site.mysite.templates.Layout.PageAccueil.ss
include(/home/user/site/silverstripe-cache/.cache.home.user.site.mysite.templates.Layout.PageAccueil.ss)
line 197 of SSViewer.php
SSViewer->process(PageAccueil_Controller)
line 189 of SSViewer.php
SSViewer->process(PageAccueil_Controller)
line 296 of Controller.php
Controller->defaultAction(index,Array)
line 267 of Controller.php
Controller->run(Array)
line 22 of ModelAsController.php
ModelAsController->run(Array)
line 27 of RootURLController.php
RootURLController->run(Array)
line 104 of Director.php
Director::direct()
line 160 of main.php
As far as I know nothing is "weird" on our dev server and other frameworks (zend framework or even wordpress) work perfectly.
This is not with the latest version of silverstripe but trying to update it I ran into the same errors so I'd prefer have it work before updating it.
We are using silverstripe version 2.2.2.
Any helps or pointers are welcome!
edit: I did try to load the site with /dev/build/?flush=1 and /build/?flush=1 still get the same errors on theses pages. Also the cache files should be set correctly.
1) You might want to try ?flush=all (unless you've made any changes to the database, you don't need /dev/build)
2) My first guess would be the PHP version. Do you have the same version on both the old and the dev box? SS 2.2 doesn't work well with PHP 5.3 - if I remember correctly.
Running into issues when upgrading from 2.2 to 2.4 can happen - there were some changes but they should be relatively minor. If you haven't done the ?flush=all you might still get errors from the previous version.
Or you might even want to clear out the silverstripe cache directory manually (silverstripe-cache or if that doesn't exist a few directories down in /tmp). I always do that when copying my SS files from one server to another as old cache files can lead to very weird behavior...

Categories