Question:
Very Strange PHP include problem?
Noah
2010-06-24 21:47:35 UTC
I redesigned my personal website, and on my test machine, everything works perfectly. However, when I moved it to my live machine, "ONE" of my include statements is not working correctly. The production server is on one of my own computers, and it has the same configuration settings as my production machine. The strangest thing about this is that only one include statement is not working right.
The file I'm trying to include is named: homepage.php.

Here is a sample of the file (index.php) that is performing the include:

.
.lots of things going on here (database queries and such)
.
include "homepage.php";
exit();
?>

I replaced "homepage.php" above with "photos.php", and the file was included properly, and every other include statement on the site is working correctly, so I am completely lost as to what the problem could be. Anybody have any ideas?
Three answers:
?
2010-06-24 22:27:10 UTC
If photos worked fine then the problem lies in homepage. Compare the code for homepage and photos. Any errors when you try running homepage.php by itself in a browser?
Standalonecomplex
2010-06-24 23:49:00 UTC
Possible Issue:By Live Machine am assuming you mean your Web Space or Server the issue with unix or most server is that they are case sensitive so if the include statement is "homepage.php" and the file is Homepage.php it will not read.



Possible issue 2:The reason why you might not be getting any error is that usually on most servers the error_reporting is usually turned off in the http.conf.so at the top of the script try adding this error_reporting(1 or true);.
mcdanial
2016-10-16 13:43:27 UTC
attempt utilising a various browser to work out if the undertaking nonetheless exists. If the different pages that use that function are working, then the server and browser have not cached the function, yet there's a controversy on the website in contact, in all probability a be conscious misspelled. in case you're utilising hostgator, only wait approximately 10 minutes and verify it lower back. maximum suitable desires.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...