hi, i have:-
Server Version: Apache/1.3.29 (Unix) PHP/5.1.4 mod_mp3/0.39 mod_fastcgi/2.4.2 mod_ssl/2.8.16 OpenSSL/0.9.7j

the php module seems to have loaded ok yet when i point to any php content it still delivers the code and not the propper content and i don't know what to check now as i am so new to apache/web dev D:

any help would be most apreciated, thanks in advance :)

This can happen if your PHP is configured to ignore short tags, that is if the short_open_tag parameter in your php.ini is set to false, and you are using short tags (<? .. ?>).

Make sure all PHP code is inside (<?php ... ?>) tags and not (<? .. ?>).

Make sure your PHP engine is installed properly and functional. Create a new file and name it phpinfo.php and insert the following code into it.

<?php

phpinfo();

?>

This will give you an output of the status of the php on your server. Hope it helps.

after reading atli's post, i realised i missed copying the php.ini-recommended to my conf directory and renaming it to php.ini. after doing that i followed barefootsanders advice but when i made the phpinfo.php file and tried to surf to it, firefox said phpinfo.php, which is a: PHP Script. what should firefox do with this file? - yet i can surf the net's php content just fine

it looks like yr web-server is not working correctly with php files
have a look at the conf

it looks like yr web-server is not working correctly with php files
have a look at the conf

these are the relevant lines i added to httpd.conf:-

LoadModule php5_module lib/modules/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

This may or may not have been said already but it seems that you did no install the PHP engine properly. To tell you the truth, the easyist thing to do would be to uninstall everything you have done and then install Wamp Server (http://www.wampserver.com/en/). This is an all inclusive package that will install PHP, MySQL, phpmyadmin, and everything is configured right off the bat. Hope that helps.

-Barefoot

This may or may not have been said already but it seems that you did no install the PHP engine properly. To tell you the truth, the easyist thing to do would be to uninstall everything you have done and then install Wamp Server (http://www.wampserver.com/en/). This is an all inclusive package that will install PHP, MySQL, phpmyadmin, and everything is configured right off the bat. Hope that helps.

-Barefoot

no help for me i'm afraid,
this is openbsd 4.0 apache chrooted - i am sure ths is just a simple config issue but can't seem to realise what's causing it

If I'm not mistaking, you should also define the absolute path to your php.ini in your apache httpd.conf. Try this too, who knows...

If I'm not mistaking, you should also define the absolute path to your php.ini in your apache httpd.conf. Try this too, who knows...

I don't know how to do that, i didn't see it mentioned anywhere, can anyone tell me what i dhould add?

>I don't know how it is on Linux
I would imagine the same as we are editing the apache conf file, the only difference will be the location

regardless it doesn't work, do you have another line in httpd.conf pertaining to PhpIni? it seems it doesn't know the variable

This article has been dead for over six months. Start a new discussion instead.