roschler Posted June 10, 2007 Share Posted June 10, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/54949-include_once-behaving-differently-inside-zend/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.