OS/2, eCS & ArcaOS - Technical > Web applications
How to make php active in Apache
Greg Pringle:
Using Apache 2.2.34 and PHP 5.4.45 is not working as expected.
When php is run by hand it will return "Hello World" from:
set BEGINLIBPATH=D:\php5;D:\php5\modules
php -r "echo 'Hello World';"
When using a web page no results can be obtained.
<?php echo 'Hello World' ?>
Other lines have been tried with no results.
There is a C:\mptn\etc\php.ini
and httpd.conf has:
LoadModule php5_module d:/php5/apache2/modphp5.dll
Any thoughts?
xynixme:
No SET LIBPATHSTRICT=T?
If local, is the software in use to view the webpage also using the same LIBPATH setting(s)?
Devid:
Perhaps
--- Code: ---AddType application/x-httpd-php .php
--- End code ---
in httpd.conf (section <IfModule mime_module>).
Also
--- Code: ---DirectoryIndex index.html index.php
--- End code ---
always in httpd.conf (section <IfModule dir_module>)
Greg Pringle:
Both of the suggestions have just been tried but no luck yet.
I also removed the php.ini and the command line still worked but the web page did not.
Devid:
Try in httpd.conf
--- Code: ---LoadModule php5_module modules/modphp5.dll
--- End code ---
and copy modphp5.dll in the apache/modules directory.
My startup.cmd for apache:
--- Code: ---@echo off
rem adjust as necessary
set HOSTNAME=localhost
set beginlibpath=c:\apps\apache2\bin;c:\apps\apache2\modules;c:\apps\php5;c:\apps\php5\modules;c:\usr\lib
set LIBCX_TRACE=+mmap
bin\httpd -d . 2>&1
--- End code ---
Furthermore
--- Code: ---ErrorLog "logs/error_log"
LogLevel debug
--- End code ---
in httpd.conf and post your log...
(Attached my httpd.conf and php.ini)
Navigation
[0] Message Index
[#] Next page
Go to full version