marty Posted January 3, 2009 Report Posted January 3, 2009 some weeks ago it worked. now, when i access a zend framework site on a shared hosting server, it can't include a class-file. turns out, this doesn't work anymore: $include_path = BASE ."app/helpers/view" . PATH_SEPARATOR ; set_include_path( $include_path . get_include_path()); the include path stays the same - before and after set_include_path. has set_include_path been deactivated? i need to set more includes than just this one. what can i do? thanx - marty Quote
Tony Posted January 3, 2009 Report Posted January 3, 2009 set_include_path has not been disabled on any of our servers. Have you tried a simple example to see if it's the include path problem or something else? Quote
marty Posted January 3, 2009 Author Report Posted January 3, 2009 the missing includes sre the problem when i do this echo " ".get_include_path()." "; $include_path = BASE ."app/helpers/view" . PATH_SEPARATOR ; echo $include_path; set_include_path( $include_path . get_include_path()); echo " ".get_include_path()." "; i get this .:/usr/php4/lib/php:/usr/local/php4/lib/php:/usr/lib/php:/usr/local/lib/php:/home/xxx/php ../calendar/app/helpers/view: .:/usr/php4/lib/php:/usr/local/php4/lib/php:/usr/lib/php:/usr/local/lib/php:/home/xxx/php Warning: include_once(SmartyView.php) [ function.include-once]: failed to open stream: No such file or directory in /usr/lib/php/Zend/Loader.php on line 83 Warning: include_once() [function.include]: Failed opening 'SmartyView.php' for inclusion (include_path='.:/usr/php4/lib/php:/usr/local/php4/lib/php:/usr/lib/php:/usr/local/lib/php:/home/xxx/php') in /usr/lib/php/Zend/Loader.php on line 83 Fatal error: Class 'SmartyView' not found in /home/xxx/calendar/app/global/settings.php on line 221 Quote
marty Posted January 3, 2009 Author Report Posted January 3, 2009 does this help? http://blog.calevans.com/2008/02/14/set_include_path-failing/ Quote
Tony Posted January 3, 2009 Report Posted January 3, 2009 Well what you've shown shows that it is using the include paths without issue. So I'm wondering are you relying on our Zend Framework? You need to keep in mind we're always updating to the latest. This is why we suggest if your code is production or may be ZF version sensitive you upload your own copy. Quote
marty Posted January 3, 2009 Author Report Posted January 3, 2009 (edited) tony, yes i use your framework. on localhost i have ZF1.7.2 & xampp1.7 and no include problems. i'm not an expert, but i think the failing snippet is not related or dependent on ZF. the set_include_path just doesn't do what it's supossed to do? Edited January 3, 2009 by marty Quote
Tony Posted January 3, 2009 Report Posted January 3, 2009 Well I suggest you make a ticket I have no idea what server you're on. I've tested ZF on a few machines and it has no such issues. Quote
marty Posted January 3, 2009 Author Report Posted January 3, 2009 Well I suggest you make a ticket done. -------- Quote
Tony Posted January 3, 2009 Report Posted January 3, 2009 I am blind and didn't see what the original code was doing. But for anyone curious the issue is with the PEAR loader system which seems to be locking the include path for some strange reason. Just disabled it globally since no one uses it anyways. Quote
marty Posted January 3, 2009 Author Report Posted January 3, 2009 great. thanx for the quick repair. Quote
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.
Note: Your post will require moderator approval before it will be visible.