[ka-Map-users] More problems with libraries

Guillaume Dallaire gdallaire at dmsolutions.ca
Tue Jul 26 22:59:03 EDT 2005


On Tue, 2005-07-26 at 19:09 -0700, Tyler Mitchell wrote: 
> On July 26, 2005 09:47 am, Eli Naeher wrote:
> > This is now the error I get when invoking init.php, after moving to
> > the CVS version in hopes that it would fix the problems I was having
> > with 0.1.1:
> >
> > <b>Warning</b>:  dl(): Unable to load dynamic library
> > '/home/gdallaire/fgs-dev/built/php/lib/php/extensions/no-debug-non-zts-2002
> >0429/php_mapscript_46.so' -
> > /home/gdallaire/fgs-dev/built/php/lib/php/extensions/no-debug-non-zts-20020
> >429/php_mapscript_46.so: cannot open shared object file: No such file or
> > directory in
> > <b>/home/ishmael/fgs/www/htdocs/ka-map/init.php</b> on line
> > <b>46</b><br />
> 
> > How can I set it to look in $FGS_HOME rather than /home/gdaillaire...?
> > extension_dir is set correctly in both php.ini and php.ini.template.
> > Where is it getting /home/gdaillaire from?
> 
> Hi Eli,
> Are you sure that the exact file exists?  Perhaps you have a 
> php_mapscript_44.so instead?  I think it may not be finding the file and 
> defaults back to some home directory that gdallaire uses when building the 
> fgs packages.
> 
> Where is the php.ini you are editing?

Hi Eli,

it seems to me that the PHPRC environment variable is not set correctly.

Here is how it works: In $FGS_HOME/www/apachectl, around line 98, you
should see:

...
for file in `ls -1 $FGS_HOME/www/bin/*.init`
...

This code calls every files in $FGS_HOME/www/bin with the .init
extension. Normally, you should have this file : php.init in
$FGS_HOME/www/bin. It contains :

export PHPRC=$FGS_HOME/www/conf

and then (!) in $FGS_HOME/www/conf.d/php.conf:

PassEnv PHPRC

With that, PHP knows where to read his php.ini file. In this file, you
should see:

extension_dir = "/opt/ishmael/www/lib/php4"

(note: php.ini is created from php.ini.template)
----
You can test your script "manually", from the command line, with :

$FGS_HOME/www/cgi-bin/php4 -c $FGS_HOME/www/conf/php.ini -f init.php


I hope it will help you !



More information about the ka-Map-users mailing list