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...
Related
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!
I tried installing Magento2 on my Mac. Installation stopped at 49% and now I can't open the Magento page on localhost - I get this error 'An error has happened during application run. See exception log for details.'.
I have absolutely no idea what to do, I've been searching for possible solutions...
The last three lines of the error log in var/log/exception.log is:
20 /Library/WebServer/Documents/magento/vendor/magento/framework/App/Http.php(157): Magento\Framework\App\Http->handleBootstrapErrors(Object(Magento\Framework\App\Bootstrap), Object(Exception))
21 /Library/WebServer/Documents/magento/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http->catchException(Object(Magento\Framework\App\Bootstrap), Object(Exception))
22 /Library/WebServer/Documents/magento/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
23 {main} [] []
Does anyone have any idea what I can to?
I tried clearing the cache but that didn't seem to have any impact.
Would it be best to just try and re-install Magento?
There are lots of hurdle while getting magento 2 working on your either server or local machine.
I am writing below is some of issue i founded while installation with latest magento 2.
Make sure your php version should be 7.0....
Make sure with proper cron job setup ...
you can check it out your php version info by php -v command and also make sure that phpinfo() should also showcase same what you can able to see via -v
Some time with local machine there also permission headache too just double check with this.
Check with your underlaying database version to make to it should be compatible with M2 requirement.
if you still find any hurdle you can reach me out at skype : samumaretiya
Thanks,
Sam
Have been using MAMP Pro for a fair while - version 3 primarily, upgraded to 4 a while ago.
I haven't had any unusual issues at all, but today the Apache service failed to start, telling me to check the error logs. The logs were blank unfortunately... I've made no system configuration changes, no changes to MAMP/MAMP Pro. Shut down my system yesterday, started today, it no longer works...
I've tried numerous suggestions found via Stack Overflow and Google without any success.
Even after completely uninstalling and re-installing MAMP Pro I am unable to get the service to start.
Nothing appears in the logs...
When starting it manually on the command line it comes up with a PHP related error:
$ Applications/MAMP/bin/apache2/bin/apachectl start
httpd: Syntax error on line 135 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/bin/php/php5.2.17/modules/libphp5.so into server: dlopen(/Applications/MAMP/bin/php/php5.2.17/modules/libphp5.so, 10): image not found
The confusing thing is that I don't have PHP 5.2.17 specified anywhere, at all - according to MAMP Pro it should be using PHP 7.0.12.
If I add PHP 5.2.17 to MAMP using the appropriate MAMP Pro dialogs, Apache still fails to start via the MAMP Pro interface. I can now start it manually from the command line however, but none of my virtual hosts/etc seem to be loaded.
apachectl -V tells me it's using /Applications/MAMP/conf/apache/httpd.conf, but there is nothing in that file that has any reference to any of the configs generated in /Library/Application Support/appsolute/MAMP PRO/conf
It also looks like hosts entries aren't added to /etc/hosts.
Even if I tell /Applications/MAMP/conf/apache/httpd.conf to do nothing but include /Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf (and manually add entries to /etc/hosts) it still doesn't seem to work at all...
I and my colleagues are at a complete loss, especially given it was working yesterday...
Has anyone had any issues like this?
I managed to fix the similar issue you had.
My Apache server was working fine and then following updating to 4.0.6 I experienced similar issues.
There were 2 things I did to fix the issue. I was getting the same error where it couldn't find a php file in 5.2.17. After fixing that by adding 5.2.17 to MAMP I experienced an apache error regarding user permissions.
(22)Invalid argument: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
File > Edit Template > Revert ALL Templates to Default Settings.
Save & restarted the servers and all worked finally and all my hosts had retained as well.
I had previously entered a custom line in my httpd.conf file that for countless versions had copied across fine however it looks like the folder structure had changed and so couldn't locate it causing the unusual error about User permissions. I have since re-entered the custom line with the correct structure and all working fine again.
Hope this helps.
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
I have this website i am building with Joomla! 2.5. It is a shopping cart and i was building it on my Xampp bu the minute i uploaded it to my server, it doesn't show anything on the front page. The admin section is okay but the front page doesn't show anything. When i turn on error reporting for development, i get the below error.
Strict Standards: Only variables should be assigned by reference in /home/sites/mydomain/public_html/beta/plugins/system/jblibrary/jblibrary.php on line 26
Strict Standards: Only variables should be assigned by reference in /home/sites/mydomain/public_html/beta/plugins/system/jblibrary/jblibrary.php on line 55
Strict Standards: Only variables should be assigned by reference in /home/sites/mydomain/public_html/beta/plugins/system/jatypo/jatypo.php on line 55
Fatal error: t3import not found object: core.libs.browser in /home/sites/mydomain/public_html/beta/plugins/system/jat3/jat3/core/common.php on line 33
I took a look at one of the files throwing the error and the line below seemed like the problem.
$document =& JFactory::getDocument();
I have tried to modify it to;
$document = JFactory::getDocument();
But the error is still thrown. I have also tried switching the PHP versions but the error persists. I just can't seem to figure out why the site is working on my localhost and not on my server. Any ideas? Thanks
The last line of your errors tells you why Joomla is white-screening. The Strict standards warnings are just warnings, they don't stop execution.
Fatal error: t3import not found object: core.libs.browser in /home/sites/mydomain/public_html/beta/plugins/system/jat3/jat3/core/common.php on line 33
A Fatal error is just that, it can't be recovered from.
In this case, your website is crashing because the front-end Joomla is trying to load a T3 based template that in turn tries to load the T3 framework which needs /jat3/jat3/core/common.php and it can't find it on the live server.
If it's working on your Xampp setup then it probably means you didn't move it correctly/move all the files or set the paths up correctly in the configuration.php.
The easiest and safest way to move a site from development to live is to use Akeeba Backup in conjunction with Akeeba Kickstart which will package your development site into a single file and include an installer in it. Then you can upload the backup file and the kickstart file to your server and follow the kickstart documentation to "restore" your development version to the live server.
i had just encountered this error when i deployed my joomla instance from windows to a linux server. t3import is looking for /core/libs/browser.php but the actual filename is Browser.php. Linux is case-sensitive so it didn't find the correct file. i just renamed Browser.php to browser.php and it worked fine.