php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35455 php.ini <--> pear command
Submitted: 2005-11-28 18:17 UTC Modified: 2005-12-18 19:01 UTC
From: hardy at voos dot de Assigned: cellog (profile)
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.1.1 OS: Linux
Private report: No CVE-ID: None
 [2005-11-28 18:17 UTC] hardy at voos dot de
Description:
------------
Command line "pear" doesnt' work with php.ini copied from php.ini-recommended. When I activate option "register_argc_argv" it works. Should be a hint for that.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-28 18:49 UTC] cellog@php.net
Please paste exact output of running "pear"
 [2005-11-28 18:54 UTC] cellog@php.net
also, please verify: did you choose to use php-cgi.exe instead of php.exe?

The cgi version is not recommended for PEAR for this exact reason
 [2005-11-28 18:55 UTC] hardy at voos dot de
There's no output with or without arguments to the "pear" command. "pear" returns a once, exit code (echo $?) is 255.
 [2005-11-28 19:00 UTC] hardy at voos dot de
May be. But php uses autoconf/configure scripts. So why isnt't it configured so that "pear" command uses right "php" binary automatically? Also CLI version is not installed by "make install" at all.
 [2005-11-28 19:04 UTC] tony2001@php.net
How exactly did you configure/install PHP?
 [2005-11-28 19:12 UTC] hardy at voos dot de
- Extracted the source package to "/usr/local/php-5.1.1"
- cd to that
- mkdir "lokal"
- ./configure --prefix=/usr/local/php-5.1.1/lokal --enableforce-cgi-redirect --enable-discard-path --disable-ipv6 --with-openssl --enable-mbstring --with-mysql=/usr/local/mysql-4.0.20/lokal --with-pgsql=/usr/local/postgresql-8.1.0/lokal --disable-inline-optimization
- make
- make install

Output from "make install" is:

Installing PHP SAPI module:       cgi
Installing PHP CGI into: /usr/local/php-5.1.1/lokal/bin/
Installing build environment:     /usr/local/php-5.1.1/lokal/lib/php/build/
Installing header files:          /usr/local/php-5.1.1/lokal/include/php/
Installing helper programs:       /usr/local/php-5.1.1/lokal/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php-5.1.1/lokal/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php-5.1.1/lokal/lib/php/
[PEAR] Archive_Tar    - already installed: 1.3.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR           - already installed: 1.4.5
Wrote PEAR system config file at: /usr/local/php-5.1.1/lokal/etc/pear.conf
You may want to add: /usr/local/php-5.1.1/lokal/lib/php to your php.ini include_path
Installing PDO headers:          /usr/local/php-5.1.1/lokal/include/php/ext/pdo/
 [2005-11-28 19:14 UTC] tony2001@php.net
Greg, obviously .phar has to check if it's CLI or CGI.
Please, fix it.
 [2005-11-28 19:26 UTC] cellog@php.net
this has nothing to do with phar, it is PEAR.  We have a conundrum, because PHP 4.2 simply doesn't work if you pass -dregister_argc_argv=On, and 4.2 is the earliest officially supported version.

As the question of supporting PHP 4.2 is a political and not a technical decision, I have to now drag over to pear-core and try to solve this one with the other developers.

In the mean time, perhaps it is time to be sure that the cli version of PHP is installed with "make install"!!
 [2005-11-28 19:40 UTC] hardy at voos dot de
Now I did "make install", renamed "php" binary to "php-cgi" and did "make install-cli" for the CLI binary.
Then I changed the "Action ..." statement in Apache httpd.conf to reflect the new CGI binary path.
Perhaps that is not correct doing, but it works.

Also thanks for your very fast answers!
Bye
 [2005-12-18 19:01 UTC] sniper@php.net
Since this is about PHP 5.1.1 and this is a PEAR bug -> bogus.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 22:01:28 2024 UTC