include_once behaving differently inside Zend

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
roschler
Forum Newbie
Posts: 2
Joined: Sun Jun 10, 2007 5:33 am

include_once behaving differently inside Zend

Post by roschler »

I am trying to trace through Pligg, an open source program, using Zend Studio 4.0.2. I am running on a Windows 2000 test server using Apache, with "localhost" being the domain name.

The software uses the Smarty template system. The main PHP file, "index.php", uses "include" to load a file called "config.php". Through the template evaluation chain it then ends up loading a file called "sidebar_stories_u.php". That file uses "include_once" to load "config.php".

If I run the program outside the Zend environment, it works properly. When I run it in Zend, it fails. The difference in behavior is this. When run outside the Zend environment, when "sidebar_stories_u.php" evaluates "include_once('config.php');", it ignores it. I know this because I put a "print" statement at the top of "config.php" to let me know when it is being loaded/evaluated. However, when I run the program inside of Zend, when "sidebar_stories_u.php" evaluates "include_once('config.php');", it DOES reprocess it and that's when the errors start to happen.

I tried dumping out the actual file name that the included file "config.php" evaluates to when executed by "index.php" and "sidebar_stories_u.php", and in all cases the complete path was identical. I have no idea why the "include_once" statement in "sidebar_stories_u.php" ignores "config.php" when run outside the Zend environment, and does reprocess it when run inside the Zend environment. I also dumped out the include path and it was the same between the successful run and the failing run.

Does anyone have any ideas on how I can fix this?

Thanks.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Have you tried the Zend Studio forum?
http://www.zend.com/forums/index.php?t=thread&frm_id=5
roschler
Forum Newbie
Posts: 2
Joined: Sun Jun 10, 2007 5:33 am

Post by roschler »

Yes I did. I also tried the Pligg forum. I got no replies on either of them.
Post Reply