Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.18

Bug #7217 go-pear.php web installation problem
Submitted: 2006-03-27 14:28 UTC
From: rebe at unit01 dot net Assigned: pajoye
Status: Closed Package: PEAR (version CVS)
PHP Version: 5.1.2 OS: linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 45 - 3 = ?

 
 [2006-03-27 14:28 UTC] rebe at unit01 dot net (Rafal Borzynski)
Description: ------------ Latest go-pear: $Id: go-pear,v 1.81 2006/03/11 14:15:20 pajoye Exp $ fails on php5 with "open_basedir" restriction. Function tmp_dir() about line 1156 has check code: $_temp = my_env('TMPDIR'); if (!$_temp) { if (is_writable('/tmp')) { $_temp = '/tmp'; } } which fails cause is_writable('/tmp') return true (!!) even if php cannot write anything there because of restrictions, so then in line 423: $ptmp = tempnam($foo, 'gope'); $ptmp becomes ampty - script is downloading packages into current dir which makes then conflicts and errors. I suggest to change this: if (!$_temp) { if (is_writable('/tmp')) { $_temp = '/tmp'; } } to something like that: if (!$_temp) { $test = '/tmp/'.uniqid(); if (@mkdir($test)) { @rmdir($test); $_temp = '/tmp'; } } which forces to create something to check if its possible.

Comments

 [2006-03-27 14:47 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-03-27 15:06 UTC] rebe at unit01 dot net
/tmp is writable but not for that webpage due to open_basedir restriction. I know it looks like php bug and so i just reported it to them too. But so far till php will be corrected go-pear.php script is useless in that case. My problem is i restricted php (open_basedir) and shell at all for web hosting issues and i can't recommend any working sollution to easy install pear on users pages.
 [2006-03-27 15:23 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-03-28 08:58 UTC] rebe at unit01 dot net
I am specifying php setting upload_tmp_dir to every virtual host but there is no TMPDIR env in my whole linux box. I checked everywhere (tried shell envs and phpinfo and i didn't find any env telling what is a temp dir except upload_tmp_dir for php) So, frankly i don't know what for you're checking that env in your script cause i am afraid is empty in most systems.
 [2006-03-28 09:02 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-03-28 09:13 UTC] rebe at unit01 dot net
I am using mostly Debian (and clones) and Trustix distros but i expect that every linux is the same in this case. Yes that is good idea to add that setting in config and for sure check if its no current dir because installation fails when try to download pear packages again for main pear (Archive and so on..) and print error downloading because they exists.
 [2006-04-17 22:49 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!