PEAR Installation questions
| From: | Lothar Scholz | Date: | Tue, 25 Mar 2008 18:40:39 +0000 |
| Subject: | PEAR Installation questions | ||
| Groups: | php.pear.core | ||
| Request: | Send a blank email to pear-core+get-7395@lists.php.net to get a copy of this message | ||
Hello,
I'm writting an IDE for PHP that should include PEAR support.
I just started today and run into a few problems with the installation
on Windows.
The IDE comes with it's own PHP 5.2 Interpreter. Whenever a user
starts the program the first time the PHP interpreter is copied from
the program directory into the application data directoy (the only
place where i can be sure it has write access).
If i see it right i must run "go-pear.bat" each time after i copy
because the installation path is copied in a lot of files. (The
registry files for example). But i can't call "go-pear.bat" from
my program becuase it compiles this line:
$this->tty = OS_WINDOWS ? @fopen('\con', 'r') : @fopen('/dev/tty',
'r');
if (!$this->tty) {
$this->tty = fopen('php://stdin', 'r');
}
This forbids redirection of stdin because \con is always opened and
always interactive and there are no command line options.
There seem to be no way to change this. Very very bad - disgusting.
I can use the go-pear.php code, but i couldn't find a way who this can
install code without downloading from the web (i can't force my users
to have access to the internet). This script contains the same code
line but i can uncomment the fopen('\con','r') line.
Then i looked at how easy it is to unpack the "go-pear.phar", modify
the line and pack it again. And to be honest the phar documentation in
the php manual is not really usefull. Isn't there a unphar/phar tool?
So can somebody tell me how i can install PEAR under 100% program
control?
Can i move the php directory with all components around after
installation. Is there any way to make the paths relative?
I can see the that PEAR_ENV.reg defines environment variables. If i
set the defined PHP_PEAR_BIN_DIR etc. variables will they overwrite
the explicit paths given when i call go-pear.bat?
I really would like to see the user been able to run PHP/PEAR programs
from a USB Stick which does not have any fixed installation path.
--
Best regards,
Lothar Scholz mailto:scholz@scriptolutions.com