set_include_path deactivated?


marty

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by marty
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...