Jump to content


simulate 500 server error

  • Please log in to reply
4 replies to this topic

#1 Drongo_III


    Advanced Member

  • Members
  • PipPipPip
  • 548 posts

Posted 13 June 2013 - 10:07 PM

Hi Guys


Bit of an odd one. I've created a custom 500 error page and my hosting company has told me that they've made the necessary httpd.conf changes.


The thing is - how do you simulate a 500 server errror?


I've tried throwing an exception but this did nothing. I've also tried breaking a htaccess file but this doesnt display my custom page, which leads me to think that the configuration hasn't been setup properly. But as I'm not sure if this is a valid way to test it I thought I would get some advice.


Any helo would be appreciated!



Learning something new simply uncovers how much there is left to learn...

One day when I know what I'm talking about all my noob posts will come back to haunt me. But I shall rejoice in the cleansing light of knowledge over ignorance :)

#2 requinix


    Reversible Administrator

  • Administrators
  • 7,128 posts
  • LocationWA

Posted 13 June 2013 - 10:18 PM

You may be able to put random nonsense in your .htaccess, and after the ErrorDocument if you had to add one in there. Or definitely in the .htaccess of a subdirectory.

FYI PHP only triggers 500s in certain installations.

#3 txmedic03


    Advanced Member

  • Members
  • PipPipPip
  • 313 posts
  • LocationCall, TX, USA

Posted 26 June 2013 - 03:04 PM

Try something like:




If it is a 500 error you want then, provided your service provider has configured the server correctly for a production environment, requiring a non-existent page will throw a fatal (500) error.


I can't stop you from doing something silly, but at least I can help you do it right.

#4 dalecosp


    Advanced Member

  • Members
  • PipPipPip
  • 340 posts
  • LocationMissouri

Posted 26 June 2013 - 03:07 PM

Write something in Perl or ASP and try and run it.   :tease-01:   </rimshot>

But, seriously, that might work.  A deliberate syntax error in a *.pl file in your cgi-bin directory would probably trigger a 500.


"God doesn't play dice" --- Albert Einstein
"Perl is hardly a paragon of beautiful syntax." --- Weedpacket

#5 ragax


    Advanced Member

  • Members
  • PipPipPip
  • 186 posts
  • LocationNelson, NZ

Posted 26 July 2013 - 02:03 AM

How about:


If I recall this is for 5.4 or above.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users