PHP absolute path problem...

Mikael Hansson EMAIL HIDDEN
Thu Mar 25 23:19:55 CET 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.music-bar.org/pipermail/music-bar/attachments/20100325/d5e5b50d/attachment-0001.html>


More information about the music-bar mailing list