Masterman535 Posted October 28, 2008 Share Posted October 28, 2008 Hey all, I have some php code that is supposed to spit out family trees for a few different families. However, i keep getting an error: Warning: include_once(includes/class/main.class.php) [function.include-once]: failed to open stream: No such file or directory in /home/aepiucf/public_html/famtree.php on line 15 Warning: include_once() [function.include]: Failed opening 'includes/class/main.class.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/aepiucf/public_html/famtree.php on line 15 Line 15 is: include_once "includes/class/main.class.php"; I've also tried: include_once('includes/class/main.class.php'); but no difference Any help? Thanks a bunch! Josh Quote Link to comment https://forums.phpfreaks.com/topic/130447-include_once-error-message/ Share on other sites More sharing options...
F1Fan Posted October 28, 2008 Share Posted October 28, 2008 It's looking for this file: /home/aepiucf/public_html/includes/class/main.class.php Does that file exist in that location? Quote Link to comment https://forums.phpfreaks.com/topic/130447-include_once-error-message/#findComment-676709 Share on other sites More sharing options...
Masterman535 Posted October 28, 2008 Author Share Posted October 28, 2008 Hey, Ah. No it's not at that location. Is there a default location I should tell it to look instead? I was told that the server I'm working on has all the necessary files for working with PHP. Thanks a bunch, Josh Quote Link to comment https://forums.phpfreaks.com/topic/130447-include_once-error-message/#findComment-676721 Share on other sites More sharing options...
F1Fan Posted October 28, 2008 Share Posted October 28, 2008 You need to point to where the file is located. Your current file appears to be famtree.php located in /home/aepiucf/public_html/. Using include with "includes/class/" will look in /home/aepiucf/public_html/includes/class/ and it will look in /usr/lib/php/includes/class/ and /usr/local/lib/php/includes/class/ for main.class.php. PHP will look for the requested file in any of the includes directories and in the current directory. Quote Link to comment https://forums.phpfreaks.com/topic/130447-include_once-error-message/#findComment-676727 Share on other sites More sharing options...
Masterman535 Posted October 28, 2008 Author Share Posted October 28, 2008 Hmmm, I cannot seem to find main.class.php anywhere on the server. Is there a way to simply upload it? I have filezilla installed to upload anything i need **EDIT** I'm looking in the cPanel right now, and it says php 5.2.6 is installed on the server. Any ideas? Thanks, Josh Quote Link to comment https://forums.phpfreaks.com/topic/130447-include_once-error-message/#findComment-676733 Share on other sites More sharing options...
F1Fan Posted October 28, 2008 Share Posted October 28, 2008 So you were just assuming that this server had the file main.class.php? Yes, you need to upload it. Upload it the same way you would upload any other file. Then make sure you're pointing to the correct directory. Quote Link to comment https://forums.phpfreaks.com/topic/130447-include_once-error-message/#findComment-676737 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.