Problem: Service Temporarily Unavailable


#1

Hey there everybody!

I created a small captcha script that worked great on my local machine, but when I uploaded to the dreamhost account, there were problems. Specifically, if a user clicks on a button to receive a new captcha image, all that is displayed is the following text in red: “Problem: Service Temporarily Unavailable”

The captcha is simple - it simply creates a session variable and the only lines of code that could cause a problem, in my opinion, are these:

header(‘Content-Type: image/png’);
imagepng($img);
imagedestroy($img);

The image loads fine when the entire page loads but when AJAX gets involved, things get sticky. Once again, it works fine on my local machine.


#2

Check the error log. That would be ~/logs/[your domain]/http/error.log

I usually get that error when I trip mod_security somehow.

Customer since 2000 :cool: openvein.org


#3

Wow… you hit it right on the nose.

Now to figure out what I’m doing wrong! Thanks for putting me in the right direction.


#4

I saw this as a solution:


Here is a quick fix. You will need to add the following lines in .htaccess file.

SecFilterEngine Off
SecFilterScanPOST Off

I am planning on making this change, but was curious how much a security vulnerability this would be. Doing some more research but it seems others have encountered this problem and I’d like to hear more about what you guys have to say about this.


#5

Solved.

What was happening - I was sending a path via GET var to a php page with AJAX. By hard coding the possible URLs and just passing a var that selected which one was desired, the problem was fixed.