0

I'm doing some web development with the Laravel framework, and I have my jQuery set up so that it sends a request on click of a button to a PHP file, which then returns the result back to my jQuery.

However, every time I click this button I get an Internal Server Error. This is not the problem; rather the error is that my Apache error log does not make any mention of this 500 Internal Server Error. In fact, it doesn't really log anything except for [notice] caught SIGTERM, shutting down and [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u12 configured -- resuming normal operations. All that being said, my access.log shows the Internal Server Error happening:

"POST /testing/public/apps/devicecheckout-checkoutdevices HTTP/1.1" 500 833 "http://xxx.xxx.xxx.xxx/testing/public/apps/devicecheckout-checkoutdevices" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36"

In my php.ini file, I have error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT and log_errors = On.

How can I solve this problem?

kibowki
  • 109
  • 2
  • Does that `SIGTERM` error message happen every time you make the request or does it happen at seemingly random times unrelated to the requests to the PHP file? Also, are you using any PHP extensions in this PHP script? – Ladadadada Aug 27 '14 at 15:42
  • It happens only when the Server goes down for maintenance, or when I do a `sudo service apache2 restart`. As for your other question, I am using the Laravel framework, which is a large PHP based framework. – kibowki Aug 27 '14 at 15:52
  • Laravel is not a PHP extension. You can find the list of PHP extensions you have installed by running `php -m` on the command line or checking the output of a `phpinfo()` page. For example, if you are talking to a Rabbit server in your PHP script then you are likely using the [AMQP PHP](http://pecl.php.net/package/amqp) extension. – Ladadadada Aug 27 '14 at 15:59
  • Actually, a more important question: Do you get other PHP errors in your Apache error log? They might be logged somewhere else if you have set the `error_log` variable in your `php.ini`. – Ladadadada Aug 27 '14 at 16:00
  • Ahh I see, sorry about that. Here are my PHP extensions: [PHP Modules] bcmath bz2 calendar Core ctype curl date dba dom ereg exif fileinfo filter ftp gd gettext hash iconv intl json ldap libxml mbstring mcrypt mhash mysql mysqli openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix Reflection session shmop SimpleXML soap sockets SPL sqlite3 standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl zip zlib – kibowki Aug 27 '14 at 16:06
  • Also, I just checked my phpinfo and here is the value for `error_log`: `error_log => no value => no value`..which is strange because I thought I fixed that in my `php.ini` – kibowki Aug 27 '14 at 16:08

1 Answers1

0

You may have PHP syntax errors.

Try to use php -l script-name.php to see if everything is right with your file.

ThoriumBR
  • 5,302
  • 2
  • 24
  • 34