Discussion:
pear include_path problem
Ye Xu
2007-07-20 12:27:41 UTC
Permalink
Hello Everyone,

Even though I had spend several hours of time to search on google and
this mailing list, my problem still exists. so I'd decide to post a new
request for help.

I am using Package "Spreadsheet" to generate .xls files. running the
script returns following errors.

"Warning: require_once(Spreadsheet/Excel/Writer.php)
[function.require-once]: failed to open stream: No such file or directory
in
/var/www/web/documentCreator/productlist.php on line 54

Fatal error: require_once() [function.require]: Failed opening required
'Spreadsheet/Excel/Writer.php'

(include_path='.:/usr/share/php:/var/www/web/') in
/var/www/web/documentCreator/productlist.php on line 54"

I am sure that I had installed pear and Spreadsheet package in the
"usr/share/php" directory,and checking the apache2 ini files, the
include_path looks also fine.

I am really confused what caused the problem and how to correct it.
so can somebody give me some hint how to deal with this problem.

ps: according this link that I found on google
http://www.phpbuilder.com/board/showthread.php?threadid=10246895
with one of the two methods mentioned here will kill the problem, but none
of them seems to be helpful in my case.

quote from 'tsinka'
"
there are a lot of posts regarding this issue (seems to be some kind of
bug).
Most people were able to get around that problem with one or both of
the two solutions:

1)

put the following directive on top of your php script:

ini_set('include_path', ini_get('include_path'));


2)

put a .htaccess file in your document_root which contains:

php_value include_path .:/usr/local/lib/php
"

thx!

Ye
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Justin Patrin
2007-07-20 17:34:49 UTC
Permalink
Post by Ye Xu
Hello Everyone,
Even though I had spend several hours of time to search on google and
this mailing list, my problem still exists. so I'd decide to post a new
request for help.
I am using Package "Spreadsheet" to generate .xls files. running the
script returns following errors.
"Warning: require_once(Spreadsheet/Excel/Writer.php)
[function.require-once]: failed to open stream: No such file or directory
in
/var/www/web/documentCreator/productlist.php on line 54
Fatal error: require_once() [function.require]: Failed opening required
'Spreadsheet/Excel/Writer.php'
(include_path='.:/usr/share/php:/var/www/web/') in
/var/www/web/documentCreator/productlist.php on line 54"
I am sure that I had installed pear and Spreadsheet package in the
"usr/share/php" directory,and checking the apache2 ini files, the
include_path looks also fine.
If you look in /usr/share/php do you see Spreadsheet/Excel/Writer.php?
Post by Ye Xu
I am really confused what caused the problem and how to correct it.
so can somebody give me some hint how to deal with this problem.
ps: according this link that I found on google
http://www.phpbuilder.com/board/showthread.php?threadid=10246895
with one of the two methods mentioned here will kill the problem, but none
of them seems to be helpful in my case.
quote from 'tsinka'
"
there are a lot of posts regarding this issue (seems to be some kind of
bug).
Most people were able to get around that problem with one or both of
1)
ini_set('include_path', ini_get('include_path'));
2)
php_value include_path .:/usr/local/lib/php
"
thx!
Ye
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Justin Patrin
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jens Kleikamp
2007-07-20 17:58:00 UTC
Permalink
Post by Justin Patrin
Post by Ye Xu
Hello Everyone,
Even though I had spend several hours of time to search on google and
this mailing list, my problem still exists. so I'd decide to post a new
request for help.
I am using Package "Spreadsheet" to generate .xls files. running the
script returns following errors.
"Warning: require_once(Spreadsheet/Excel/Writer.php)
[function.require-once]: failed to open stream: No such file or directory
in
/var/www/web/documentCreator/productlist.php on line 54
Fatal error: require_once() [function.require]: Failed opening required
'Spreadsheet/Excel/Writer.php'
(include_path='.:/usr/share/php:/var/www/web/') in
/var/www/web/documentCreator/productlist.php on line 54"
I am sure that I had installed pear and Spreadsheet package in the
"usr/share/php" directory,and checking the apache2 ini files, the
include_path looks also fine.
If you look in /usr/share/php do you see Spreadsheet/Excel/Writer.php?
And also make sure Spreadsheet/Excel/Writer.php can be accessed by the
webserver user.
Post by Justin Patrin
Post by Ye Xu
I am really confused what caused the problem and how to correct it.
so can somebody give me some hint how to deal with this problem.
ps: according this link that I found on google
http://www.phpbuilder.com/board/showthread.php?threadid=10246895
with one of the two methods mentioned here will kill the problem, but none
of them seems to be helpful in my case.
quote from 'tsinka'
"
there are a lot of posts regarding this issue (seems to be some kind of
bug).
Most people were able to get around that problem with one or both of
1)
ini_set('include_path', ini_get('include_path'));
2)
php_value include_path .:/usr/local/lib/php
"
thx!
Ye
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ye Xu
2007-07-20 18:24:05 UTC
Permalink
so that means, the script must be chmod to 755 or 777 ?
Post by Jens Kleikamp
And also make sure Spreadsheet/Excel/Writer.php can be accessed by the
webserver user.
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Chuck Burgess
2007-07-20 18:29:55 UTC
Permalink
Post by Ye Xu
so that means, the script must be chmod to 755 or 777 ?
Post by Jens Kleikamp
And also make sure Spreadsheet/Excel/Writer.php can be accessed by the
webserver user.
"755" should allow any/all users to read and execute the file, which I would
think should be sufficient. I wouldn't expect the webserver user to need
write access, which is the only extra thing "777" gives compared to "755".
--
CRB

Let me introduce you to my very own DMCA-protected encryption key:
BC 1B 64 4A 8D DE 49 E8 C3 7D CC EE 1A AD EE F5
(compliments of Freedom-to-Tinker http://www.freedom-to-tinker.com/?p=1155)
Ye Xu
2007-07-20 18:19:09 UTC
Permalink
YES, all PEAR related Library are all there.
Post by Justin Patrin
If you look in /usr/share/php do you see Spreadsheet/Excel/Writer.php?
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sascha Grossenbacher
2007-07-20 19:01:29 UTC
Permalink
Hi
Post by Ye Xu
Hello Everyone,
Even though I had spend several hours of time to search on google and
this mailing list, my problem still exists. so I'd decide to post a new
request for help.
I am using Package "Spreadsheet" to generate .xls files. running the
script returns following errors.
"Warning: require_once(Spreadsheet/Excel/Writer.php)
[function.require-once]: failed to open stream: No such file or directory
in
/var/www/web/documentCreator/productlist.php on line 54
Fatal error: require_once() [function.require]: Failed opening required
'Spreadsheet/Excel/Writer.php'
(include_path='.:/usr/share/php:/var/www/web/') in
/var/www/web/documentCreator/productlist.php on line 54"
I am sure that I had installed pear and Spreadsheet package in the
"usr/share/php" directory,and checking the apache2 ini files, the
include_path looks also fine.
Check your open_basedir settings. If it is enabled, disable it or add
:/usr/share/php to it.

The following line should give a open_basedir error, if it is the problem.
require_once '/usr/share/php/Spreadsheet/Excel/Writer.php';

Greetings, Sascha
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ye Xu
2007-07-20 23:00:18 UTC
Permalink
Post by Sascha Grossenbacher
Hi
Check your open_basedir settings. If it is enabled, disable it or add
:/usr/share/php to it.
The following line should give a open_basedir error, if it is the problem.
require_once '/usr/share/php/Spreadsheet/Excel/Writer.php';
Greetings, Sascha
to Sascha,

The open_basedir setting on the server as I remembered is not enabled,
but I will try to enable it, see if it works.
Post by Sascha Grossenbacher
Post by Ye Xu
so that means, the script must be chmod to 755 or 777 ?
Post by Jens Kleikamp
And also make sure Spreadsheet/Excel/Writer.php can be accessed by the
webserver user.
"755" should allow any/all users to read and execute the file, which I would
think should be sufficient. I wouldn't expect the webserver user to need
write access, which is the only extra thing "777" gives compared to "755".
to Chuck

I will try to change the permission on the script, and give ya all
feedback on next monday.

thx ya all again for this great and kindness help.

Ye.
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ye Xu
2007-07-23 09:50:13 UTC
Permalink
the problem partly resolved, because the /usr/share/php/Spreadsheet/...
directory owned by root, but the script belongs to other users, so it
won't allow to be accessed, after chown them poroperly, the include_path
error message disappeared. but another problem occured. i will start a new
help request in this mailing list in order not to confuse people.

thx for great help!
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Continue reading on narkive:
Loading...