You are here: Re: Required files confused between applications on same server « PHP Programming Language « IT news, forums, messages
Re: Required files confused between applications on same server

Posted by Ray on 07/28/07 20:43

On Jul 28, 7:39 pm, Rik <luiheidsgoe...@hotmail.com> wrote:
> Is the full path in get_included_files() or isn't it? And are you calling
> it by the full path or not? Perhapse it's an include_path issue. Then
> again, it might be as simple as a relative call in on of the applications
> which doesn't turn out OK, because it makes wrong assumptions about the
> current working directory, in which case they should be fixed.

Rik, thanks for your reply.

Yes, the full path is returned by get_included_files(). When I call a
page from one of the apps - call it App_1 - (before I access the other
app) get_included_files() returns the following, which is what I
expect:

C:\Documents and Settings\rod\Documents\JBrick\DayStudents\php_scripts
\authenticate.php
C:\Documents and Settings\rod\Documents\JBrick\DayStudents\php_scripts
\config.php

As you can see, the config.php called is the one in the same directory
as the calling script. However, if I then access the other app (call
it App_2) from a different browser window, then go back and refresh
the first page, it has changed to this:

C:\Documents and Settings\rod\Documents\JBrick\DayStudents\php_scripts
\authenticate.php
C:\Documents and Settings\rod\Documents\JBrick\MusicSchool
\musicadmin.www\trunk\config.php

The wrong config.php is now being called. What worries me is that I
had assumed the two apps would be isolated from each other, but
apparently they're not. I can't figure why anything I did in one app
would have a bearing on another.

In case it's any help, here is a fragment from the top of a script
from App_1:

<?php
require 'config.php';

$files = get_included_files();
foreach ($files as $f) {
print "$f<br />\n";
}
//.... [snip]
?>

And likewise from App_2:

<?php
require_once 'config.php';
// .... [snip]
?>

Finally, my include_path from php.ini is as follows:

include_path = ".;c:\php\includes;"


Any help or pointers will be much appreciated!

Ray.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация