AlabamaHit Posted February 22, 2010 Posted February 22, 2010 I'm having a hard time figuring this out. I have searched and search and couldn't figure it out. I have LAMP installed. (Ubuntu 9.10). PhpMyadmin is installed. I keep getting this error only on my register page. Warning: include_once(/../includes/functions.php) [function.include-once]: failed to open stream: No such file or directory in /home/alabamahit/Projects/My Codes/pages/register.php on line 28 Warning: include_once() [function.include]: Failed opening '/../includes/functions.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/alabamahit/Projects/My Codes/pages/register.php on line 28 The page is in the right place. I know it is not that. What is really odd. It don't do this on my web host... The line is include_once("/../includes/functions.php"); There is nothing specail on the page. Just a very basic register page i made.. Any ideas? Or ever ran into this before? Quote
a_bertrand Posted February 22, 2010 Posted February 22, 2010 well what would be the "root" directory? and then go up? That's certainly a wrong path. include_once("../includes/functions.php"); This one may work if your file is in the directory above and then inside includes. Quote
AlabamaHit Posted February 22, 2010 Author Posted February 22, 2010 Yeah the file has to go up a directory and then into includes. I have tried what you gave also. I have tried what i posted first and these ./../includes/functions.php and ../includes/functions.php It really has me mind boggled. It is only doing this on LAMP lol. Which really sucks lol Quote
Magictallguy Posted February 22, 2010 Posted February 22, 2010 include(DIRNAME(DIRNAME(__FILE__)) . '/includes/functions.php'); Quote
AlabamaHit Posted April 16, 2010 Author Posted April 16, 2010 That didn't help either. Sorry never posted back, I just stopped working on my codes for awhile. Now I'm starting back. Still have same issue. It is very odd. If I put it online, it don't do this. It is only on LAMP lol. Quote
Spudinski Posted May 9, 2010 Posted May 9, 2010 Permissions? I hate a web server for this type of stuff. See my weird one below.. Uploaded with ImageShack.us Quote
AlabamaHit Posted May 10, 2010 Author Posted May 10, 2010 Looks like you might need to reinstall XAMP. That might fix your error with Apache not working. Quote
Spudinski Posted May 10, 2010 Posted May 10, 2010 No, it was a custom build of services and the size minimized. Was mainly something for me to carry around on a flash stick, for quick development and such. Quote
Enigma Posted May 12, 2010 Posted May 12, 2010 I'm guessing that your running a Linux distro, if so complete the following tasks and it should resolve the problem your facing : Open up a terminal and type in the following ( modify directory tree as required ) sudo chmod 777 /var/www/PATH_TO_PHP_FILE/ ( Assuming your website directory is located at var/www/ ofcourse. ) Enter root password if needed and press enter, if you don't receive a response message then everything went fine, if you receive an error about the file not being found then check your directory tree. Sorry for lame ass explanation :thumbup: Quote
Spudinski Posted May 13, 2010 Posted May 13, 2010 PHP normally prints the permission error if there is any... Quote
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.