Re: Intentionally generate an "Internal Server Error"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Aug 6, 2011, at 10:50 PM, Ghodmode wrote:

I'd like to use PHP to intentionally generate an "Error 500 Internal
Server Error".

Here's the problem.  My site has this error intermittently and I'd
like to monitor the error log to figure out the problem.
Unfortunately, I don't get to see the actual Apache error log and my
hosting provider's error reporting system isn't working.  Customer
support just sends me canned responses stating that everything's fine
and they can't reproduce the error, so I'd like to create a
reproducible internal server error so that they can see that it's not
showing up in the error log.

I know that I can mess up something in the .htaccess file, but that
would break the whole site.  I don't want to do that.

I know I could use header("HTTP/1.1 500 Internal Server Error"), but
that means I would also have to provide the content of the Error 500
page.  I want to kick off they're internal server error page.  They
don't give me to option to create one of my own.

I'm using GoDaddy.

Can someone suggest some invalid PHP code that should generate an
internal server error?

Thank you.

I don't think it's that hard to generate an Internal Server Error. If you have error reporting and such turned off and your code contains a syntax error, that results in an Internal Server Error...



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux