Server Error 500 with php script

Hi there,

I have recently upgraded to mac os 10.6 due to issues I had upgrading to php 5.3. After a lot of bother I decided to just upgrade since the php 5 module bundled with os 10.6 has everything I need already compiled.

Now I have an unusual error, and no idea as to what’s going on.

All my scripts are working fine, and my connection to my mysql database is working fine. But when I try to run a set of scripts in a certain folder, I get the following error message:

The website encountered an error while retrieving http://localhost/admin/uploads/. It may be down for maintenance or configured incorrectly.

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

If it were a php error then I might be able to debug it, but I’m totally at a loss.

I had no problems running the scripts on my previous install of apache and php. I’m running mac os 10.6.7, and Google Chrome 11.0.696.68 (latest version) Does anyone have an idea what might be causing this?

Many thanks,

Yeah that could be virtually anything … Maybe there’s a more understandable version of the error in Apache’s error log, or php’s error log (if you have one) ?

If not, try commenting out the code block by block and see when the error disappears. Then try to find within that block which line is causing the error.

Hi ScallioXTX, thanks for your reply.

I am sure there is an Apache error log, but I’m not sure where to find it. If you could let me know I’ll happily post it.

In the meantime, I’ll try your suggestion of commenting out the code.


Ok, so after commenting out the script I discovered that I got the error because an include file did not exist.

Now before, I would have gotten a php error stating such. I have noticed actually that I get fewer php errors displayed with my current install. Where normally I would’ve had an error displayed on the generated webpage, I just get nothing.

Is this something to do with my latest install of apache, and is there any way of changing it so I get errors displayed in HTML?

Many thanks,

take a look at the ini settings error_level and display_errors :slight_smile:

(I have them set to -1 and on respectively)

Yep that’s the ticket! Thanks! :slight_smile: