SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    382
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question 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,
    Mike

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,070
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    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.
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  3. #3
    SitePoint Addict
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    382
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.

    Mike

  4. #4
    SitePoint Addict
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    382
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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,
    Mike

  5. #5
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,070
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    take a look at the ini settings error_level and display_errors

    (I have them set to -1 and on respectively)
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  6. #6
    SitePoint Addict
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    382
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yep that's the ticket! Thanks!


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •