#23312: Unable to detect PHP version

Bradley Giesbrecht brad at pixilla.com
Sat Feb 13 15:05:45 PST 2010


I'm glad you solved your problem.

If I sounded impatient I apologize.

Yes, I did reply directly and that's my bad. I kinda thought it had  
become a non-macports issue but when I saw head in /opt/local/bin I  
thought it should go back to the list.

My point about installing from sources outside of macports is that  
ports has some issues with software installed to /usr/local for  
example because when run the software looks there first for things  
which can cause problems if it finds a match and doesn't use the  
macports version.

If you installed software manually from source you might look at your  
env vars. Maybe you have something like PREFIX as an env var or  
something in perls @INC. I'm no expert so these are just examples of  
things that might cause software manually installed from source to end  
up in /opt/local/.

Friends? :)


// Brad


On Feb 13, 2010, at 2:32 PM, John Korchok wrote:

> Hi Bradley,
>
> My apologies if this has tried your patience. I only replied to you  
> directly because you had written to me directly without included  
> Macports.
>
> I have not installed anything "from source" or "from any other  
> source" into the /opt folders. I am aware that they are for MacPorts  
> use only. Other than Macports, I only use conventional software  
> installers for all Mac software.
>
> I followed your instructions to rename /opt/local/bin/head. After  
> that, "which head" returned "/usr/bin/head". I was able to install  
> php5-oracle normally after that on both affected machines.
>
> Thanks you for your help, and if I ever find what installed head in  
> the MacPorts tree, I will report back.
>
> John Korchok
>
> From: macports-users-bounces at lists.macosforge.org [mailto:macports-users-bounces at lists.macosforge.org 
> ] On Behalf Of Bradley Giesbrecht
> Sent: Saturday, February 13, 2010 12:49 PM
> To: “MacPorts Users Mailing List“
> Subject: Re: #23312: Unable to detect PHP version
>
> First, please do reply all so these replies go to the macports list.  
> There are many people who know more then me there.
>
> On Feb 13, 2010, at 8:32 AM, John Korchok wrote:
>
>> Hi Bradley,
>>
>> This is baffling. I get:
>> /opt/local/bin/head is not provided by a MacPorts port.
>> but I have installed anything from any other source into /opt or  
>> its subdirectories.
> Have you compiled software outside (not using) macports?
> If so what was it and where did it put it's files?
>
> It's far better for you to describe more of what you have done then  
> for us to spend a bunch of time guessing what you have have done.
>
> When you say "I have installed anything from any other source into / 
> opt" suggests you have installed other things from source but not  
> to /opt.
> If so you'll probably need to find your own solutions to the  
> problems you may create.
>
> So Ryan was the guy who said to look around, there must be another  
> copy of "head" somewhere.
>
> Well, we found it. How it got here I have no idea. Maybe others will  
> have a clue.
>
> It's possible something you have installed needs /opt/local/bin/ 
> head. If so finding that software and removing it would be a good  
> idea.
>
> If you can't find any reason /opt/local/bin/head exists then move it  
> out of the way.
>
> mv /opt/local/bin/head /opt/local/bin/head.deleteme
>
> If after a reasonable amount of time no software complains of a  
> missing head you could rm /opt/local/bin/head.deleteme.
>
> // Brad
>
>
>> From: macports-users-bounces at lists.macosforge.org [mailto:macports-users-bounces at lists.macosforge.org 
>> ] On Behalf Of Bradley Giesbrecht
>> Sent: Friday, February 12, 2010 8:49 PM
>> To: “MacPorts Users Mailing List“
>> Subject: Re: #23312: Unable to detect PHP version
>>
>> Well, I do not have a head program in /opt/local/bin and I do have / 
>> opt/local/bin/perl5.
>>
>> What is the output of:
>> port provides /opt/local/bin/head
>>
>>
>> // Brad
>>
>>
>> On Feb 12, 2010, at 9:37 AM, John Korchok wrote:
>>
>>> Hi Brad,
>>>
>>> head -n3 .bash_history
>>> returns
>>> Unknown option: n
>>> Unknown option: 3
>>>
>>> In answer to your previous questions:
>>>
>>> which head
>>> returns
>>> /opt/local/bin/head
>>>
>>> which perl
>>> returns
>>> /opt/local/bin/perl
>>>
>>> which perl5
>>> returns
>>> no perl5 in /opt/local/bin /opt/local/sbin /bin /sbin /user/bin / 
>>> user/sbin
>>>
>>> env perl -e 'print `which head`'
>>> returns
>>> /opt/local/bin/head
>>>
>>> env perl5 -e 'print `which head`'
>>> returns
>>> env: perl5: No such file or directory
>>>
>>> John Korchok
>>>
>>>
>>>
>>> From: Bradley Giesbrecht [mailto:brad at pixilla.com]
>>> Sent: Monday, February 08, 2010 2:12 AM
>>> To: John Korchok
>>> Subject: Re: #23312: Unable to detect PHP version
>>>
>>> Your head program doesn't like -n so something is wrong with that.
>>>
>>> Do this in Terminal:
>>> cd
>>> head -n3 .bash_history
>>>
>>> Do you get the first 3 lines of you .bash_history file or an error?
>>>
>>> Regardless you may be able to get around your "head" problem by  
>>> altering the portfile and to add the path to php-config which  
>>> might not need the head program to get the php version.
>>>
>>> But I really think you should probably solve the problem because  
>>> head may be used by a lot of other things you may need.
>>>
>>> If you want to try do this in Terminal:
>>>
>>> cd `port dir php5-oracle`
>>> port extract
>>> cd ./work/php-5.3.1/ext/oci8/
>>> phpize
>>> ./configure --prefix=/opt/local --with-oci8=instantclient,/opt/ 
>>> local/lib/oracle --with-pdo-oci=instantclient,/opt/local/lib/ 
>>> oracle,10.1 --with-php-config=/opt/local/bin/php-config
>>>
>>> If that works and you want to use this instead of fixing head let  
>>> me know and I'll give you the one line to add to your php5-oracle  
>>> Portfile to add the path to php-config.
>>>
>>>
>>> // Brad
>>>
>>> On Feb 6, 2010, at 6:04 PM, John Korchok wrote:
>>>
>>>> Hi Bradley,
>>>>
>>>> Thank you for taking the time to look into this. I don't have any  
>>>> problem with any other MacPorts installs and I use several. I  
>>>> have successfully installed the same configuration on a couple of  
>>>> Intel machines with no problem, though both those were also  
>>>> running Leopard. I thought I would first restate the error that I  
>>>> am getting. The errors seem to start with line 5 of the listing  
>>>> below, then when the routine for checking the PHP version is  
>>>> called, an unknown flag "n" is used, causing the install to halt:
>>>>
>>>> port install -f php5-oracle
>>>> Password:
>>>> --->  Computing dependencies for php5-oracle
>>>> --->  Configuring php5-oracle
>>>> Error: Target org.macports.configure returned: configure failure:  
>>>> shell command " cd "/opt/local/var/macports/build/ 
>>>> _opt_local_var_macports_sources_rsync 
>>>> .macports.org_release_ports_php_php5-oracle/work/php-5.3.1/ext/ 
>>>> oci8" && ./configure --prefix=/opt/local --with- 
>>>> oci8=instantclient,/opt/local/lib/oracle --with-pdo- 
>>>> oci=instantclient,/opt/local/lib/oracle,10.1 " returned error 1
>>>> Command output: checking for re2c... no
>>>> configure: WARNING: You will need re2c 0.13.4 or later if you  
>>>> want to regenerate PHP parsers.
>>>> checking for gawk... gawk
>>>> checking for Oracle (OCI8) support... yes, shared
>>>> checking PHP version... Unknown option: n
>>>> Usage: head [-options] <url>...
>>>>     -m <method>   use method for the request (default is 'HEAD')
>>>>     -f            make request even if head believes method is  
>>>> illegal
>>>>     -b <base>     Use the specified URL as base
>>>>     -t <timeout>  Set timeout value
>>>>     -i <time>     Set the If-Modified-Since header on the request
>>>>     -c <conttype> use this content-type for POST, PUT, CHECKIN
>>>>     -a            Use text mode for content I/O
>>>>     -p <proxyurl> use this as a proxy
>>>>     -P            don't load proxy settings from environment
>>>>     -H <header>   send this HTTP header (you can specify several)
>>>>
>>>>     -u            Display method and URL before any response
>>>>     -U            Display request headers (implies -u)
>>>>     -s            Display response status code
>>>>     -S            Display response status chain
>>>>     -e            Display response headers
>>>>     -d            Do not display content
>>>>     -o <format>   Process HTML content in various ways
>>>>
>>>>     -v            Show program version
>>>>     -h            Print this message
>>>>
>>>>     -x            Extra debugging output
>>>> configure: error: failed to detect PHP version, please report
>>>>
>>>> Error: Status 1 encountered during processing.
>>>> Before reporting a bug, first run the command again with the -d  
>>>> flag to get complete output.
>>>>
>>>> ... or am I not reading this correctly?
>>>>
>>>> John
>>>>
>>>> From: Bradley Giesbrecht [mailto:brad at pixilla.com]
>>>> Sent: Saturday, February 06, 2010 4:24 PM
>>>> To: John Korchok
>>>> Subject: Re: #23312: Unable to detect PHP version
>>>>
>>>> Hi John,
>>>>
>>>> Funny thing about oracle.com. I was able to download from  
>>>> oracle.com using Windows with IE but not on Mac with Safari or  
>>>> Firefox.
>>>> Were you able to use Safari or Firefox to download from oracle?
>>>>
>>>> So I was able to download instant client basic and the sdk put  
>>>> them in place and my install succeeded without issue.
>>>>
>>>> I don't have a g4 up to try  the g4 compatible client.
>>>>
>>>> What are your env vars?
>>>> Are your macports paths first?
>>>>
>>>> In an effort to find something not right execute the following  
>>>> commands and send me the output.
>>>> Since I don't have the problem you have I really don't know where  
>>>> to begin short of finding something in your env that does not  
>>>> match mine.
>>>> env
>>>> which head
>>>> which perl
>>>> which perl5
>>>> env perl -e 'print `which head`'
>>>> env perl5 -e 'print `which head`'
>>>>
>>>>
>>>> What if any unix software has been added to your system outside  
>>>> macports?
>>>>
>>>>
>>>> // Brad
>>>>
>>>> On Feb 5, 2010, at 12:29 PM, John Korchok wrote:
>>>>
>>>>> Hi Bradley,
>>>>>
>>>>> The G4 version of the instant client is on http://bw.office-on-the.net/Pickup/instantclient-basic-macosx-10.1.0.3.zip 
>>>>> .
>>>>>
>>>>> The Intel version is on http://bw.office-on-the.net/Pickup/instantclient-basic-10.2.0.4.0-macosx-x86.zip
>>>>>
>>>>> Thanks for any help.
>>>>>
>>>>> John Korchok
>>>>>
>>>>> From: Bradley Giesbrecht [mailto:brad at pixilla.com]
>>>>> Sent: Thursday, February 04, 2010 5:27 PM
>>>>> To: John Korchok
>>>>> Subject: Re: #23312: Unable to detect PHP version
>>>>>
>>>>>
>>>>> On Feb 4, 2010, at 1:40 PM, John Korchok wrote:
>>>>>
>>>>>> I originally wrote about not being able to upgrade php5-oracle  
>>>>>> on one server. Now the problem exists on two servers. Ryan gave  
>>>>>> the advice to replace the usr/bin/HEAD with the original /user/ 
>>>>>> bin/head. I finally got around to trying this. /usr/bin does  
>>>>>> not contain "HEAD", it contains only "head". This head is dated  
>>>>>> August 22, 2005 like all the other versions of head on all my  
>>>>>> other Macs that have Tiger installed. Running a binary  
>>>>>> comparison to head from a Mac that never had LWP installed  
>>>>>> shows them to be identical files.
>>>>>>
>>>>>> I now get the "Unable to detect PHP version" error on two G4  
>>>>>> servers that have Tiger installed. What else could be causing  
>>>>>> the error?
>>>>>
>>>>> I can't get my oracle login to work to download the instant  
>>>>> client to look into this. If you put the oracle instant client  
>>>>> installer somewhere I can download it from I'll take a look at  
>>>>> this.
>>>>>
>>>>> A couple years ago before using macports I had this php/oic/ 
>>>>> oracle hand compiled and working but I currently do not have a  
>>>>> need for oracle.
>>>>>
>>>>> I'm to frustrated with oracles login password reset procedure to  
>>>>> pursue that any longer since I don't have a need but like I said  
>>>>> I'm willing to take a look if you can get me the oic installer.
>>>>>
>>>>> // Brad
>>>>
>>>
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20100213/68a51a9e/attachment.html>


More information about the macports-users mailing list