OS/2, eCS & ArcaOS - Technical > Web applications

How to make php active in Apache

<< < (2/2)

Paul Smedley:
A bit more is needed in httpd.conf than just loading the module.

Most of https://www.thesitewizard.com/php/install-php-5-apache-windows.shtml is relevant -in particular the references to 'AddType application/x-httpd-php .php'

Cheers,

Paul

Greg Pringle:
To all,
PHP5  is now running normally in Apache/2.2.34 (OS/2) PHP/5.4.45
The php.ini is in directory d:\php5

httpd.conf has:
LoadModule php5_module "d:/php5/apache2/modphp5.dll"
PHPIniDir "/php5"
<IfModule dir_module>                 
    DirectoryIndex index.php index.html
</IfModule>                           
<IfModule mime_module>
...
AddType application/x-httpd-php .php
...
</IfModule>
DocumentRoot "/web/corvedia"

then a file was created:
D:\web\corvedia\index.php
<HTML>                                                         
<BODY>                                                         
This is a test                                                 
<p>                                                             
 <?php echo 'Hello World' ?>                                   
<p>                                                             
<?php                                                           
phpinfo();                                                     
?>                                                             
</BODY>                                                         
</HTML>       

and the PHP information was returned.

Thanks to all.                                                 

Navigation

[0] Message Index

[*] Previous page

Go to full version