php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48194 Invalid path to php binary in generated pear and pecl scripts
Submitted: 2009-05-08 19:48 UTC Modified: 2009-05-25 16:51 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: oxie at live dot nl Assigned: jani (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.2.9 OS: Ubuntu 8.04.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: oxie at live dot nl
New email:
PHP Version: OS:

 

 [2009-05-08 19:48 UTC] oxie at live dot nl
Description:
------------
The generated scripts bin/pear and bin/pecl have the wrong path to the PHP executable. The path in the script look likes '/usr/local/lamp/apache2/bin/apxs2/bin/apxs/bin/php', where it must be '/usr/local/lamp/php/bin/php'. When manually chaning the path to that, it is working.

The output that i get is, logically:
exec: 28: /usr/local/lamp/apache2/bin/apxs/bin/php: not found

My configure statement:
./configure --prefix=/usr/local/lamp/php --with-apxs2=/usr/local/lamp/apache2/bin/apxs --with-pear=/usr/local/lamp/php/lib/php [a lot of extensions]

The bin/pear script: http://pastebin.com/d132560e


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-09 04:23 UTC] jani@php.net
Does /usr/local/lamp/php/bin/php-config exist?
If so, what do these output:

# /usr/local/lamp/php/bin/php-config --prefix

And

# /usr/local/lamp/php/bin/php-config --php-binary

 [2009-05-09 10:34 UTC] oxie at live dot nl
Yes, they exists.

oxan@webdev:~$ /usr/local/lamp/php/bin/php-config --prefix
/usr/local/lamp/php
oxan@webdev:~$ /usr/local/lamp/php/bin/php-config --php-binary
/usr/local/lamp/php/bin/php

Seems to be good...
 [2009-05-09 21:17 UTC] jani@php.net
Please check your Makefile for lines beginning with:

bindir =
exec_prefix =
prefix =
PEAR_INSTALLDIR =
 [2009-05-10 09:51 UTC] oxie at live dot nl
They are there in this order:

bindir = ${exec_prefix}/bin
exec_prefix = ${prefix}
prefix = /usr/local/lamp/php
PEAR_INSTALLDIR = /usr/local/lamp/php/lib/php

(i have generate my makefile using the ./configure statement)

*the bin/pear scripted reposted (it was expired): http://pastebin.com/f640aacf
 [2009-05-22 13:14 UTC] jani@php.net
Can you give the output of this too:

# /usr/local/lamp/php/bin/php -r 'echo PHP_BINDIR;' 
 [2009-05-24 17:00 UTC] oxie at live dot nl
Of course:

oxan@webdev:~$ /usr/local/lamp/php/bin/php -r 'echo PHP_BINDIR;'
/usr/local/lamp/php/bin
 [2009-05-25 08:09 UTC] jani@php.net
There really isn't any way those scripts can get such weird paths unless you have some environment variables set with those paths. 

Also, how far this path is valid:

/usr/local/lamp/apache2/bin/apxs2/bin/apxs/bin/

I suggest you check your apache installation, maybe it's somehow leaking the paths. I can not reproduce this with clean, properly installed system using distro packages for Apache.
 [2009-05-25 16:51 UTC] oxie at live dot nl
I think you're right...

After recompiling Apache and upgrading it to 2.2.11 (from 2.2.8) and recompiling PHP 5.2.9 it's all working.

Thanks for your time!
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 12:01:33 2025 UTC