LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Apache php postgres headaches (https://www.linuxquestions.org/questions/mandriva-30/apache-php-postgres-headaches-490401/)

sandWorm 10-07-2006 02:28 PM

Apache php postgres headaches
 
The main problem is all the guides I can find on the net are not Mandriva specific.

I Installed Mandriva (Free 2006 edition) and chose the apache
php and postgres packages.

There is a web serve running, at least I get a page when I go to http://localhost an html doc with "It works" on it. But I have no idea if it is apache or another default installed server.

Does anyone know where Mandriva hides the /apache/htdocs folder this is where I believe I need to put an index.php with
the code
PHP Code:

<?php
        phpinfo
()
       
?>

I have read that I need to set up an account for postgres but I'll tackle later when I at least know php and apache are running.

Any help welcome and sorry if this is a bit scatty my head is spinning from trawling the mandriva files system

Thanks

michaelk 10-07-2006 08:38 PM

The default is /var/www/html. The setting is DocumentRoot in the /etc/httpd/conf/httpd.conf file.
Apache would be the default webserver and if postgresql was selected when you installed Mandriva then the postgres user should already be created.

sandWorm 10-08-2006 02:09 PM

thanks for the help

sandWorm 10-09-2006 10:51 AM

Having found httpd.conf php refuses to work
 
Wasn't sure whether to re post here or start a new thread, also there is a similar thread (same problems) over at software/server

My httpd.conf had no mention of php anywhere so I have added

LoadModule php5_module /usr/lib/apache-extramodules/mod_php5.so

and

AddType application/x-httpd-php .php .phtml .html
AddType application/x-httpd-php-source .phps



I also have added index.php to list under the heading

<ifModule mod_dir.c>
DirectoryIndex
</IfModule>

as that was suggested in a tutorial

I have also tried using

<IfModule mod_php5.so>
AddType application/x-httpd-php .php .phtml .html
AddType application/x-httpd-php-source .phps
</IfModule>

AND

AddType application/x-httpd-php5 .php .phtml .html
AddType application/x-httpd-php5-source .phps

Nothing seems to work, I have been stopping and restarting Apache after each change. The furthest I have got was firefox asking what I wanted index.php opened with, but I can't remember which version of the httpd.conf I had for that.

There seem to be a lot tutorials out there none of those I have followed result in working php. Most of them go from not having Apache/Php installed so I wonder if this is my problem. I have a fresh install of Mandriva 2006 and selected the Apache and php packages.

Any help very welcome. Thanks


All times are GMT -5. The time now is 10:50 PM.