PHP install

Fernando Simon fsimon at UNIVALI.BR
Wed Aug 16 08:23:39 EDT 2006


Hi folks,
    Well, here I have some servers and desktops machines working with
Mapserver, Apache (2.2), PHP (4 and 5), PostgreSQL and Oracle without
problems. I always try to work with the last versions of the softwares.
Here I use this Linux releases: CentOS4.3 and OpenSuse 10.1.
    The first detail is with Apache, if you want that PHP run as a DSO
module instead of CGI you need to compile the Apache with "mpm" as
"prefork", just this trick. Using this way you can compile PHP as DSO
without problem and you can use the "dl()" function to call the
PHPMapscript library. You can work with Apache with "mpm" as "worker",
but using this way your PHP cannot call the function "dl()" to use
PHPMapscript.
    I didn't see any problem here to run Apache as "prefork", I have
systems that use PHP(4 or 5) with both PostgreSQL or Oracle with
Mapserver.  Another solution that I'm testing now is running the both
versions of PHP, 4 and 5, in the same Apache to render the ".php"
sources. I'm testing this way because running PHP as CGI it's more slow
than DSO, and I have an production server that need to run the older
(PHP 4) and newer (PHP 5) projects.
    I believe that this tricks can help to work with PHP and Apache.
    Best regards.

------------------------------------------------------------------------
Fernando Simon
Mapserver and Oracle Spatial developer
G10 - Laboratorio de Computacao Aplicada - Brazil
http://www.univali.br/g10 - UNIVALI/CTTMAR
------------------------------------------------------------------------



Andrew Smith wrote:
> This is not a solution or a concrete explanation, but...
>
> I did read some where (a forum on php.net I think, it was july last
> year)  that PHP didn't like working with Apache 2.2 as a shared
> module.  I found this out when I tried to compile PHP5 for apache 2.2
> on Fedora Core 4.  The solution to this was to compile PHP-4.4.3 and
> use it with Apache 1.3.  I found that both Mapserver and Apache worked
> well (efficiently - as this was for benchmarking purposes) when some
> tweaking was done.
>
> As i said not a solution or full explanation, just another user
> experience and maybe something to help further investigation
>
> Andrew Smith
> Spatial Technical Consultant
> Lagen Spatial Pty Ltd
> ph: +61 (0)2 9545 7740
> email: andrew at lagenspatial.com.au
> Web: www.lagenspatial.com.au
>
> Ryan Ollerenshaw wrote:
>
>>> When trying to install php either version 4.4.3 or 5.1.4 i get the
>>> following error after a make install:
>>>
>>> chmod 755 /var/www/modules/libphp5.so
>>> chmod: cannot access `/var/www/modules/libphp5.so': No such file or
>>> directory
>>> apxs:Error: Command failed with rc=65536
>>>
>>> I have seen lots of other people getting this error but never any
>>> solutions. so any help would be great.
>>
>>
>> Ok i was able to find the solution in a different thread. for some
>> reason the php source file: php-4.4.3.tar.gz doest not seem to work
>> with mapserver and postgreSQL at the same time.  I found this also to
>> be true with all of the PHP version 5+ sources.  The only source that
>> seems to work with all the libraries and tools needed for Mapserver
>> is php-4.4.3.tar.bz2
>>
>> if anyone has any reasoning as to why that is i would be really
>> interested in knowing.  Also i am running Fedor Core 5 and Apache 2.2
>> and i have the same problem on my Suse 10.1 system with Apache 2.2
>>
>



More information about the mapserver-users mailing list