PHP causing HTTP 500 error?

Status
Not open for further replies.

DuBistKomisch

New Member
Messages
3
Reaction score
0
Points
0
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:

Opera said:
Error: Remote server or file not found
You tried to access the address http://barnes.pcriot.com/, which is currently unavailable.

Firefox said:
XML Parsing Error: no element found
Location: http://barnes.pcriot.com/
Line Number 1, Column 1:

Internet Explorer said:
The website cannot display the page
HTTP 500
Most likely causes:
The website is under maintenance.
The website has a programming error.

telnet said:
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:
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?
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
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.
 

DuBistKomisch

New Member
Messages
3
Reaction score
0
Points
0
I checked the error logs and found this repeated:

Error Log said:
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
 
Status
Not open for further replies.
Top