TwiztedDotNet Posted June 25, 2008 Share Posted June 25, 2008 The page is here: http://www.consolidatedcarriersofcalifornia.com/newsletter.php Here is the source of line 112: include ("/archived-newsletters/Spring%202008%20Newsletter.htm"); ...I'm not quite sure what's going on here. I moved this site from one server to another. This script worked fine before I moved it, now it doesn't work. I've got a very similar include on the Safety page, and it works perfectly. I'm dumbfounded at this point... Any suggestions would be greatly appreciated! Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/ Share on other sites More sharing options...
kenrbnsn Posted June 25, 2008 Share Posted June 25, 2008 What error message do you get? Ken Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/#findComment-573769 Share on other sites More sharing options...
TwiztedDotNet Posted June 25, 2008 Author Share Posted June 25, 2008 Warning: main(/archived-newsletters/Spring%202008%20Newsletter.htm): failed to open stream: No such file or directory in /home/farrens/CCC/newsletter.php on line 112 Warning: main(): Failed opening '/archived-newsletters/Spring%202008%20Newsletter.htm' for inclusion (include_path='.:/usr/local/share/pear:/usr/local/lib/php') in /home/farrens/CCC/newsletter.php on line 112 ...it can be seen here: http://www.consolidatedcarriersofcalifornia.com/newsletter.php Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/#findComment-573771 Share on other sites More sharing options...
kenrbnsn Posted June 25, 2008 Share Posted June 25, 2008 Remove the initial "/" from the filename. Ken Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/#findComment-573772 Share on other sites More sharing options...
TwiztedDotNet Posted June 25, 2008 Author Share Posted June 25, 2008 I tried that - no luck... Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/#findComment-573773 Share on other sites More sharing options...
kenrbnsn Posted June 25, 2008 Share Posted June 25, 2008 Where in the directory path is the file located, in relation to the script. Ken Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/#findComment-573775 Share on other sites More sharing options...
TwiztedDotNet Posted June 25, 2008 Author Share Posted June 25, 2008 besides, the archived-newsletters directory is in the root, so the leading / would be correct. The file IS in the correct location: http://www.consolidatedcarriersofcalifornia.com/archived-newsletters/Spring%202008%20Newsletter.htm I really have no idea why this isn't working... Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/#findComment-573776 Share on other sites More sharing options...
hitman6003 Posted June 25, 2008 Share Posted June 25, 2008 Unless the filename actually contains the "%20" characters, replace them with a space ("%20" == " "). Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/#findComment-573777 Share on other sites More sharing options...
TwiztedDotNet Posted June 25, 2008 Author Share Posted June 25, 2008 /newsletter.php attempts to include the file located within /archived-newsletters/ Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/#findComment-573779 Share on other sites More sharing options...
TwiztedDotNet Posted June 25, 2008 Author Share Posted June 25, 2008 OMG! THANK YOU! Why the hell did that work? wow, that's one of those "too stupid to explain" moments... (it really did work just fine on the old server) Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/#findComment-573781 Share on other sites More sharing options...
kenrbnsn Posted June 25, 2008 Share Posted June 25, 2008 No, the file is NOT located in the root of the file system, it is located in the top most area that the web server can see. Try: <?php include('/home/farrens/CCC/archived-newsletters/Spring 2008 Newsletter.htm'); ?> Ken Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/#findComment-573782 Share on other sites More sharing options...
TwiztedDotNet Posted June 25, 2008 Author Share Posted June 25, 2008 yes, you would be correct... This code worked: include ("archived-newsletters/Spring 2008 Newsletter.htm"); Link to comment https://forums.phpfreaks.com/topic/111766-solved-standard-include-not-working/#findComment-573784 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.