[X-Unix] compiling php

Giovanni Cutolo cutolo at unina.it
Wed May 28 08:17:33 PDT 2008


Eric and Alexander,

thank you both, I actually had not followed the phpize / make install  
procedure to compile the module; thus it was in a wrong location, and  
also my definition of extension_dir in php.ini was incorrect (now I  
have commented out it, so it is back that default, which is the  
strange-looking /usr/lib/php/extensions/no-debug-non-zts-20060613,  
where make installe placed the module).
The trouble is: it does still not work, the module is still not loaded  
(yes, after restarting apache, and my php.ini has the line  
extension=pgsql.so ).

Can it be a permission problem?

Thanks again.

Giovanni






Il giorno 27/mag/08, alle ore 19:29, Alexandre Gauthier ha scritto:

>
>
> On Tue, 27 May 2008 10:57:21 -0500, Eric F Crist
> <ecrist at secure-computing.net> wrote:
>> On May 27, 2008, at 6:12 AM, Eric F Crist wrote:
>>
>>> The module is ignored because you need to add it to the PHP
>>> Extensions config file. Add it there and I'm sure you'll be fine.
>>>
>>> -----Original Message-----
>>> From: Giovanni Cutolo <cutolo at unina.it>
>>>
>>> Hi all,
>>>
>>> I am trying to compile php 5.2.6 on my MacBook (Leopard), since I  
>>> need
>>> the pgsql module that is not in the php build shipped by Apple  
>>> (why?,
>>> if I may ask). So I try with
>>>
>> ...
>>
>>> that is: compiling the module itself (using the source of php 5.2.5)
>>> and then moving it to the appropriate (?) location in the pre- 
>>> existing
>>> installation of php. No avail: the module is simply ignored.
>>
>>
>> To elaborate from my earlier email, I found this is /private/etc/
>> php.ini.default, about 50% of the way down:
>>
> ----- 8<-snip--snip-8<------
>> That file, in it's entirety, is a good read for configuring PHP.
>> You'll need to make sure your module gets loaded in the correct
>> location, as well as adding the appropriate extension=foo line.
>>
>
> To further complete what Eric said, I'd like to mention that you  
> need to
> comment out the line defining extension_dir as "./" in php.ini, by  
> adding a
> semicolon in front of it.
>
> Then, simply add the name of the module which I assume you compiled by
> running phpize in the module directory, and then installed with make
> install. (most likely pgsql.o)
>
> You may then restart apache running 'sudo apachectl restart'.
>
> I just added GD2 support to the default Apple PHP install, and it  
> worked
> fine.
>
> 'phpize' should work out the details for you, such as the module  
> location.
>
> Hope this help.
>
> _______________________________________________
> X-Unix mailing list
> X-Unix at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix



More information about the X-Unix mailing list