PHP absolute path problem...

EMAIL HIDDEN EMAIL HIDDEN
Thu Mar 25 23:57:42 CET 2010


Are you sure the /home... Is under docroot?  I would copy/paste the entire path in the error statement at the shell prompt to see if that path does indeed contain the file you are looking for. 




On Mar 25, 2010, at 3:19 PM, Mikael Hansson <forums at deadmengods.com> wrote:

Hi!

I'm currently studying PHP and I've run into a problem when putting an exercise on my school account.

The (problem related) files are in this location

[my account]/public_html/032289/web3/inl2/index.php
[my account]/public_html/032289/web3/inl2/_includes/config.inc.php
[my account]/public_html/032289/web3/inl2/_includes/magicquotes.inc.php


In index.php I have the following:
<?php
   include "_includes/config.inc.php";
   include_once $includePath.'magicquotes.inc.php';
   ...

and in config.inc.php i have:
<?php
   $serverPath = $_SERVER['DOCUMENT_ROOT'];
   $folderPath = "/home/stud09/data1/STUDF/M09K0054/public_html/032289/web3/inl2/";
   $fullPath = $serverPath.$folderPath;
   $includePath = $fullPath."_includes/"; 
?>

When I try to access index.php I get the following error:
Warning: include_once(/srv/www/htdocs/home/stud09/data1/STUDF/M09K0054/public_html/032289/web3/inl2/_includes/magicquotes.inc.php) [function.include-once]: failed to open stream: No such file or directory in /home/stud09/data1/STUDF/M09K0054/public_html/032289/web3/inl2/index.php on line 4

Warning: include_once() [function.include]: Failed opening '/srv/www/htdocs/home/stud09/data1/STUDF/M09K0054/public_html/032289/web3/inl2/_includes/magicquotes.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/stud09/data1/STUDF/M09K0054/public_html/032289/web3/inl2/index.php on line 4

The strange thing is that when I run this from my deadmengods.com server it's working properly (changing folder path to reflect the proper path)

I've tried stripping down the folderpath step by step but none works.

Does anyone have any clue to what can be the cause?

/Micke
_______________________________________________
music-bar mailing list
music-bar at lists.music-bar.org
http://lists.music-bar.org/cgi-bin/mailman/listinfo/music-bar



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.music-bar.org/pipermail/music-bar/attachments/20100325/194504ac/attachment-0001.html>


More information about the music-bar mailing list