php include_path

Status
Not open for further replies.

rebelsforchrist

New Member
Messages
23
Reaction score
0
Points
0
"To install this script, simply place it within your include path. You can set your include path by calling ini_set('include_path', '/PATH/'). Once properly installed within your include path, you should be able to include the objects within the API in your own php files."
Lightweight PHP Picasa API Version 3.0
http://www.cameronhinkle.com/blog/id/3696159074811309536

the default include_path was: .:/usr/lib/php:/usr/local/lib/php
i changed it to: .:/usr/lib/php:/usr/local/lib/php:/picasa/
i'm not sure what the path would be to the picasa folder in my public_html folder, because this didn't work what i tried above?

From some more searching, i tried
ini_set('include_path', ".:/usr/lib/php:/usr/local/lib/php:/home/rfc1/public_html/Picasa.php:/home/rfc1/public_html/picasa/");

Picasa.php is alongside the test php that i'm testing this with. the picasa folder has all of the contents that Picasa class requires.

one thing that's weird is that if i do that ini_set and phpinfo(); right after it, i will see that include_path has been updated. but, if i do phpinfo(); in another script, then it seems the include_path is getting reset. the more important thing is to get the include_path set correctly, but i'm curious too why is it getting reset back to the default setting.

thanks!
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
You need to do ini_set in every script you have, not just one, hence why it works in that one phpinfo but not another.
 
Last edited:

rebelsforchrist

New Member
Messages
23
Reaction score
0
Points
0
one thing that's weird is that if i do that ini_set and phpinfo(); right after it, i will see that include_path has been updated. but, if i do phpinfo(); in another script, then it seems the include_path is getting reset. the more important thing is to get the include_path set correctly, but i'm curious too why is it getting reset back to the default setting.
You need to do ini_set in every script you have, not just one, hence why it works in that one phpinfo but not another.
thanks for helping me on that one, Brandon. :)

can someone help me with the following other part?
From some more searching, i tried
ini_set('include_path', ".:/usr/lib/php:/usr/local/lib/php:/home/rfc1/public_html/Picasa.php:/home/rfc1/public_html/picasa/");

Picasa.php is alongside the test php that i'm testing this with. the picasa folder has all of the contents that Picasa class requires.
i emailed the author of this api quite a number of times, but i haven't received any help from him about this include_path part to get it working.
thanks!
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Try

PHP:
ini_set('include_path', ".:/usr/lib/php:/usr/local/lib/php:/home/rfc1/public_html:/home/rfc1/public_html/picasa");
 
Last edited:

rebelsforchrist

New Member
Messages
23
Reaction score
0
Points
0
good idea, but it didn't work. i even changed the picasa to Picasa in your example to check case sensitivity on this server (b/c i noticed on the ftp that it's capitalized).

Another thing from the readme:
"This software requires PHP version 5 to be installed. Version 5.2 is recommended because of the use of __toString() methods, although if you do not wish to print objects using __toString(), then PHP 5.0 will work fine."

i saw in phpinfo() and on the welcome notes to this website that the server is use 5.2.x, so the print object should be fine. it is not working though still, so i am thinking it is still due to the include_path issue? http://rebelsforchrist.com/z.php
 

rebelsforchrist

New Member
Messages
23
Reaction score
0
Points
0
hey guys, i was able to get this to work. but, is there a way i can avoid the function call to set the include_path everytime the script is executed? it will happen very often since it's just a normal page. it seems there would be some way to keep it set on my account.
thanks! :)
matthew
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
No, the way we have our PHP configured doesn't allow that to happen, sorry.
 

rebelsforchrist

New Member
Messages
23
Reaction score
0
Points
0
man, that's too bad. it would be better on the server. what about htaccess? i wish it were possible so it would be a quicker script :)
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Nope, the way we have our PHP configured doesn't allow that, don't worry about an ini_set, it's nothing on the server:).
 
Status
Not open for further replies.
Top