Error 500 after upgrade to PHP 5.6 - php

everybody
I'm working on certain project and it worked just fine until the server provider decided to upgrade to PHP 5.6 and now the page is showing error 500.
I've already checked and I found out that this can be caused by few things...
This particular project doesn't use .htaccess file so, I know that's not the problem.
I also read that problem can be somewhere on server so checked the log and this is the message that I get.
[Fri Dec 04 10:17:47.603342 2015] [fcgid:warn] [pid 12468] (104)Connection reset by peer: [client 10.32.109.52:55105] mod_fcgid: error reading data from FastCGI server
[Fri Dec 04 10:17:47.603409 2015] [core:error] [pid 12468] [client 10.32.109.52:55105] End of script output before headers: index.php

You've got a message: End of script output before headers: index.php
So check your code in index.php. Just try to delete all code from file index.php and add this:
<?php phpinfo(); ?>
This should outputs information about PHP's configuration. If you can see this, so the problem is in your code in index.php.

Related

500 Internal Server Error for php file (not for html) after installing SSL

After installing SSL on the server, the .php files stopped working and gave an error 500:
https://freshfinance.pl/empty.php
HTML works fine:
https://freshfinance.pl/
I have 2 entries in error.log:
[Sun Nov 07 13:01:47.229672 2021] [fcgid:warn] [pid 4630]
(104)Connection reset by peer: [client 162.158.102.105:56384]
mod_fcgid: error reading data from FastCGI server [Sun Nov 07
13:01:47.229742 2021] [core:error] [pid 4630] [client
162.158.102.105:56384] End of script output before headers: empty.php
I have read other forum posts about a similar issue but none have been helpful (e.g. 500 Internal Server Error for php file not for html)
What could be causing the problem on my server?

Internal Server Error 500 upon activation of a WordPress plugin

My WP installation generates a Internal Error 500 every time I activate the BuddyPress plugin.
This is the actual error:
[Sat Mar 28 19:12:28.102868 2015] [fastcgi:error] [pid 10447] (104)Connection reset by peer: [client 192.168.1.1:55431] FastCGI: comm with server "/var/www/clients/client1/web4/cgi-bin/php5-fcgi-*-80-site.eu" aborted: read failed, referer: http://site.eu/wp-admin/update.php?action=install-plugin&plugin=buddypress&_wpnonce=54e15a2310
[Sat Mar 28 19:12:28.103055 2015] [fastcgi:error] [pid 10447] [client 192.168.1.1:55431] FastCGI: incomplete headers (0 bytes) received from server "/var/www/clients/client1/web4/cgi-bin/php5-fcgi-*-80-site.eu", referer: http://site.eu/wp-admin/update.php?action=install-plugin&plugin=buddypress&_wpnonce=54e15a2310`
How should I solve that?
P.S. The strange thing is that before, when the server was running Ubuntu 12, I had no troubles activating and using BuddyPress. Then something possessed me and I decided to upgrade the OS to 14.04 and as a result the site became inaccessible. Finally, I figured that it was BuddyPress that was causing the issue, removed it from the plugins folder and the site went back to working. Now every time I try to re-add BP, I get the error above.
According to this post, installing this plugins cause the fcgi process for PHP to hit its memory limit or execution time limit, preventing it to properly finish.

500 Internal Server Error - Error logs do not show anything significant

First of all, thank you for your time in reading this :)
I am managing a server which runs apache2 and mod_fcgi which host a few sites via Virtual Hosts. Some sites are straight PHP, the others are all WordPress. The WordPress sites are all functioning great, however, any other site throws up a 500 Internal Server Error when you try to access them.
If you navigate to a non-php file on the web directory (like an image) it will display, but any .php file throws up this error.
The Apache2 error log shows nothing.
When I tail the error log of the site, I get this:
[Wed May 22 15:12:15 2013] [warn] [client x.x.x.x] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Wed May 22 15:12:15 2013] [error] [client x.x.x.x] Premature end of script headers: php-fcgi-wrapper
[Wed May 22 15:12:15 2013] [debug] mod_deflate.c(615): [client x.x.x.x] Zlib: Compressed 612 to 377 : URL /fcgi-bin/php-fcgi-wrapper/index.php
The root of the website is located in /var/www/site1/
I have quadrouple-checked my permissions and ownerships.
I have increased more memory for PHP.
I tried looking at the php.log file, but nothing is being written.
Can anyone point anything else out that could be causing this?
Thank you!
I don't have the time at the moment to back up my cgi-conflict suggestion, but it occurred to me that you may be using php short tags, when the server doesn't allow it. Wordpress I believe uses full open tags which would explain why it works.
Instead of using:
<? //some php code
?>
Try:
<?php //some php code
?>
Are you using short tags? This could be your issue.

CakePHP on a Mac - Internal Server Error

I have been creating a CakePHP application on my Linux computer and running it using Lampp. Everything has been going well.
I have passed the project to a designer to do some layout updates who is using a Mac and running Mamp.
When he try to run the project he is receiving the following error:
The website encountered an error while retrieving
http://localhost:8888/. It may be down for maintenance or configured
incorrectly. Here are some suggestions: Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was
encountered while the server was attempting to fulfill the request.
Why would this error occur on his Mac but not my Linux?
EDIT:
The Server log is showing the following:
[Sun Sep 04 20:07:50 2011] [error] [client ::1] client denied by
server configuration: /Users/Jamie/Sites/.DS_Store [Sun Sep 04
20:07:52 2011] [error] [client ::1] client denied by server
configuration: /Users/Jamie/Sites/Glecto/.DS_Store, referer:
http://localhost:8888/ [Sun Sep 04 20:15:52 2011] [notice] caught
SIGTERM, shutting down [Sun Sep 04 20:15:55 2011] [notice] Digest:
generating secret for digest authentication ...
I had the same problem recently using MAMP. I copied a plain php site from online to local for testing and the site kept giving me that error when I browsed to it locally. It turned out to be the permissions on the files. I had to go through the files and folders and change the permissions. Hope this helps

I keep getting the same error in my error logs on my apache server using cpanel

cPanel Version 11.28.87
Theme x3
Apache version 1.3.42
PHP version 5.2.13
MySQL version 5.0.92-community
Architecture i686
Operating system linux
I noticed in the Error Log that I was getting the same error repeatedly. A simple missing .gif that was being requested.
[Tue Apr 12 12:12:23 2011] [error] [client --.---.---.---] File does not exist: /public_html/themes/3col_blue/images/dogcat.gif
So I thought well lets just put that .gif (our logo) there...
Now I am getting a whole slew of errors regarding file does not exist that look like this:
[Tue Apr 12 02:27:47 2011] [error] [client --.---.---.---] File does not exist: /home/--------/public_html/index.php+++++++++++++++++++++++++++++++++Result:+\xe8\xf1\xef\xee\xeb\xfc\xe7\xee\xe2\xe0\xed+\xed\xe8\xea\xed\xe5\xe9\xec+"reltWeiweessy";+\xe7\xe0\xf0\xe5\xe3\xe8\xf1\xf2\xf0\xe8\xf0\xee\xe2\xe0\xeb\xe8\xf1\xfc+(\xe2\xea\xeb\xfe\xf7\xe5\xed+\xf0\xe5\xe6\xe8\xec+\xf2\xee\xeb\xfc\xea\xee+\xf0\xe5\xe3\xe8\xf1\xf2\xf0\xe0\xf6\xe8\xe8);
[Tue Apr 12 02:27:42 2011] [error] [client --.---.---.---] File does not exist: /home/--------/public_html/index.php+++++++++++++++++++++++++++++++++Result:+\xe8\xf1\xef\xee\xeb\xfc\xe7\xee\xe2\xe0\xed+\xed\xe8\xea\xed\xe5\xe9\xec+"reltWeiweessy";+\xe7\xe0\xf0\xe5\xe3\xe8\xf1\xf2\xf0\xe8\xf0\xee\xe2\xe0\xeb\xe8\xf1\xfc+(\xe2\xea\xeb\xfe\xf7\xe5\xed+\xf0\xe5\xe6\xe8\xec+\xf2\xee\xeb\xfc\xea\xee+\xf0\xe5\xe3\xe8\xf1\xf2\xf0\xe0\xf6\xe8\xe8);
how did I make this go from bad to worse?
Are there referers for those particular hits in the access_log? Looks like someone/something is pointing at your site with a badly constructed link.

Categories