I'm getting ready to glue my postgresql database to my website with PHP. I tested that php was up and running by doing
I'm running v2.2.0. I have uncommented the appropriate line in /etc/httpd/mod_php.conf, namely
Code:
AddType application/x-httpd-php .php
I have also copied the php.ini file to /usr/local/lib. I then restarted apache and still my /var/www/htdocs/helloworld.php file would not work.
helloworld.php
Code:
<html>
<body>
<?php
print "Hello, world.";
?>
</body>
</html>
I test it by opening that file through firefox and inputing 127.0.0.1/helloworld.php. I end up getting the source code of the file instead of just seeing "Hello, world." I've also added an executable permission to the helloworld.php.
I have also tried adding the AddType line mentioned above in the httpd.conf file and still nothing.
1. I am wondering if maybe I need to uninstall apache and then reconfigure it with php and then install?
2. Also, I want to use Postgresql with apache and php. What else do I need to do to make Postgresql accessible to apache and php?
3. Now for some reason, whenever I try to access a php file in firefox it prompts me to open it. How do I change that?