PHP absolute path problem...

EMAIL HIDDEN EMAIL HIDDEN
Fri Mar 26 00:02:10 CET 2010


I find PHP great for everyday kind of stuff.  Especially if you are desciplined and follow good programming habits.  I've developed two sports community league sites with PHP 5 and MySql and really like it.




On Mar 25, 2010, at 3:33 PM, Tony Scharf <noisetheorem at gmail.com> wrote:

I can't , unfortunately, be of any help except to say I *hate* php.
Every time I have had to work with it, its made me die a little
inside.

Tony

On 3/25/10, 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


-- 
---------------------------------------------------------------------
NoiseTheorem:
Facebook: http://www.facebook.com/pages/NoiseTheorem/141645972762
myspace:http://www.myspace.com/noisetheorem
soundcloud:http://soundcloud.com/noisetheorem
_______________________________________________
music-bar mailing list
music-bar at lists.music-bar.org
http://lists.music-bar.org/cgi-bin/mailman/listinfo/music-bar



      



More information about the music-bar mailing list