Closed Thread
Results 1 to 3 of 3
Like Tree2Likes
  • 2 Post By DuBistKomisch

Thread: PHP causing HTTP 500 error?

  1. #1
    DuBistKomisch's Avatar
    DuBistKomisch is offline x10Hosting Member DuBistKomisch is an unknown quantity at this point
    Join Date
    Apr 2008
    Location
    Australia
    Posts
    3

    PHP causing HTTP 500 error?

    Site address: http://barnes.pcriot.com
    Hosting plan: Ad-Free
    Server: Cossacks

    I recently uploading a new version of my website via FTP, but when I went to test the site I got an error message.

    After a bit of experimentation with other clients, I got the following responses:

    Quote Originally Posted by Opera
    Error: Remote server or file not found
    You tried to access the address http://barnes.pcriot.com/, which is currently unavailable.
    Quote Originally Posted by Firefox
    XML Parsing Error: no element found
    Location: http://barnes.pcriot.com/
    Line Number 1, Column 1:
    Quote Originally Posted by Internet Explorer
    The website cannot display the page
    HTTP 500
    Most likely causes:
    The website is under maintenance.
    The website has a programming error.
    Quote Originally Posted by telnet
    HTTP/1.1 500 Internal Server Error
    Accessing plain HTML pages works, as does a simple PHP page that only calls the "echo" function: http://barnes.pcriot.com/test.php

    As soon as I try to integrate the functionality of the rest of the website into that test page, by calling:
    PHP Code:
    require("links/startup.php"); 
    It returns the same errors as the other pages.
    Even if I comment out parts of startup.php, it still doesn't work.

    As far as I can tell, there is nothing wrong with my code, because it works fine running locally.

    Does anyone have any ideas?
    dinomirt96 and karimirt47 like this.

  2. #2
    misson is offline Community Advocate misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,391

    Re: PHP causing HTTP 500 error?

    One generic thing I can think of is the PHP configuration. Is your server using the basic (ie restricted) configuration?

    Other than that, there isn't nearly enough info to go on. Anything interesting in the error log (accessible through cPanel)?

    Keep commenting out sections of startup.php or start with an empty script & add sections until you narrow down the problematic lines. Comment out or add in halves as much as you can. For example, comment out 1/2 of the uncommented lines; if the script fails, you know there's a problem in the part that's uncommented, so repeat & comment 1/2 of what's remaining. You basically perform a binsearch to look for problematic lines.

  3. #3
    DuBistKomisch's Avatar
    DuBistKomisch is offline x10Hosting Member DuBistKomisch is an unknown quantity at this point
    Join Date
    Apr 2008
    Location
    Australia
    Posts
    3

    Re: PHP causing HTTP 500 error?

    I checked the error logs and found this repeated:

    Quote Originally Posted by Error Log
    PHP Fatal error: require(): Failed opening required 'func.php' (include_path='.:/x10hosting/php2/pear') in /home/dbk/public_html/links/startup.php on line 76
    PHP Warning: require(func.php): failed to open stream: No such file or directory in /home/dbk/public_html/links/startup.php on line 76
    Looks like I forgot to upload func.php. :pat:
    Man, this sort of thing always happens to me.

    hehe, thanks for the help

Closed Thread

Similar Threads

  1. change php version request error.
    By sitting in forum Free Hosting
    Replies: 5
    Last Post: 12-12-2008, 03:29 PM
  2. Error headers with php.
    By Tarzan in forum Programming Help
    Replies: 5
    Last Post: 08-06-2008, 12:07 PM
  3. Replies: 1
    Last Post: 05-03-2008, 04:42 AM
  4. XHTML help please
    By mac173 in forum Graphics & Webdesign
    Replies: 3
    Last Post: 01-29-2008, 12:39 PM
  5. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 03:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers