Forum OpenACS Development: Re: How to use PHP(libphp4.so)

Collapse
Posted by Nima Mazloumi on
This is what the server log says:
[06/Nov/2003:09:36:26][32019.16384][-main-] Notice: modload: loading '/opt/aolserver/bin/libphp4.so'
[06/Nov/2003:09:36:26][32019.16384][-main-] Notice: Registering PHP for "/*.php"
[06/Nov/2003:09:36:26][32019.16384][-main-] Notice: Registering PHP for "/*.php3"
[06/Nov/2003:09:36:26][32019.16384][-main-] Notice: Registering PHP for "/*.php4"

Also I am not sure how to add the extension mapping. .adp-files are mapped like this:

ns_section ns/server/${server}/adp
ns_param  map          /*.adp
ns_param  enableexpire  false
ns_param  enabledebug
ns_param  defaultparser fancy

But I found the following for php (with module) which registeres the php extensions above. With module in the path I don't get the registration notice.

ns_section ns/server/${server}/module/php
ns_param map /*.php
ns_param map /*.php3
ns_param map /*.php4

Now when I call a page without the extension .php only text outside of the php-tag is displayed. When I call a page with .php then I get the following error message:

Warning: Unknown(/www/unima0/www/servicecontractor/helloworld.php): failed to create stream: No such file or directory in Unknown on line 0

Warning: Unknown(): Failed opening '/www/unima0/www/servicecontractor/helloworld.php' for inclusion (include_path='.:/usr/share/php') in Unknown on line 0