after changing the hosting provider (which at this point has no idea what is going on or the intention / interest to solve the problem it seems), we ran into an issue, where every php script ends after 30 seconds execution time resulting in an internal server error.

The script where we noticed this first, ran just fine on the old server, but I can imagine this info doesn't really help, so here are a few infos about the current server (settings).

Debian GNU/Linux amd64 6.0.7 (squeeze) PHP Version 5.3.25-1~dotdeb.0 Server API FPM/FastCGI

php.ini settings: memory_limit 256M (changed this from 128M to 512M ... back to 256M witout a difference) max_execution_time 180 (changed this from 30 to 60 ... 300 back to 180 without a difference) max_input_time 60

By "changed" I mean, we had to request the changes to be made, we can't do that on our own. The support guy also told me, that he was trying to set a few sohosin variables back and forth but that didn't help either. Also the php / apache error logs seem to give no clues, he said.

I am a bit confused about the MySQL version because, the cms we're running uses: mysql_get_server_info($this->connection); to show the version, which returns: 5.3.25-1~dotdeb.0. The credentials in the config file on the other hand, points to a server where phpmyadmin states that the software version is: 5.5.27 - MySQL Community Server (GPL)

I would highly appreciate if you just could point me in the right direction to solve this. If you need more information (like dpkg -l 'php*' | grep '^.i' or something), just let me know.

closed as off-topic by Nathan C, Ward, mdpc, Falcon Momot, Ladadadada Sep 5 '13 at 15:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – Nathan C, Ward, mdpc, Falcon Momot, Ladadadada
If this question can be reworded to fit the rules in the help center, please edit the question.


You need to know what is the exact PHP error to be able to solve the problem. Prepend this to a failing PHP script:

ini_set ( "display_errors", "1");

To see if you can get some details. The most likely reason for this if you changed the hosting provider is the database connection (IP, USR, PWD).

  • Thank you for your quick response. The display of errors is set to 1 and error reporting is set to E_ALL. The response from the server is still: Internal Server Error (html page). – agile Sep 4 '13 at 10:55
  • The first thing to do is get the error details. Activate php error logging in /etc/php.ini, look for this line -log_errors = On- and set it on or uncomment it, look for the line -display_errors=on- and uncomment it or set it to "on", prepend this line to to your script -ini_set ( "display_startup_errors", "1");-, check the output of the php error log and also see if you can see something on the screen. – Daniel J. Sep 4 '13 at 11:02
  • Ok, did that - nothing else than "Internal Server Error" gets printed to the screen. We now have an entry in the error log though: [04-Sep-2013 13:04:16 Europe/Berlin] PHP Fatal error: Maximum execution time of 180 seconds exceeded in /var/www/version6/test.php on line 4 | This is written shorty after 30 seconds – agile Sep 4 '13 at 11:09
  • Edit NGINX config and remove the custom 500 error page to let PHP show its errors and add this to the head of the script: – Daniel J. Sep 4 '13 at 11:10
  • ini_set ( "display_errors", "1"); ini_set ( "display_startup_errors", "1"); ini_set ( "html_errors", "1"); ini_set ( "docref_root", "php.net/"); ini_set( "memory_limit", "512M" ); ini_set( "max_execution_time", "30" ); – Daniel J. Sep 4 '13 at 11:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.