Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Could someone please guide me to a how-to (or give me a step by step procedure) to link apache,php,postgresql. Google search and forum search did not help.
Thank you.
By linking I meant, i want to do these 2 things,
1.configure PHP to include PostgreSQL support
2.and then install PHP as an Apache module
command , httpd -l, gave me the following output,
Compiled in modules:
http_core.c
mod_so.c
so i dont have mod_php compiled for httpd.
I have php,postgresql,apache as they were given in redhat 7.3.
what steps do i need to take to do the 2 things i mentioned before?
i have the following lines un-commented in my httpd .conf file
______________________________________________________
<IfDefine HAVE_PHP>
LoadModule php_module modules/mod_php.so
</IfDefine>
<IfDefine HAVE_PHP3>
LoadModule php3_module modules/libphp3.so
</IfDefine>
<IfDefine HAVE_PHP4>
LoadModule php4_module modules/libphp4.so
</IfDefine>
You need to recompile php and apache from scratch if you want php as a module. You should upgrade to at least 1.3.26 anyway, because of security concerns (see www.apache.org). Then, and this is from www.php.net:
Code:
1. gunzip apache_1.3.x.tar.gz
2. tar xvf apache_1.3.x.tar
3. gunzip php-x.x.x.tar.gz
4. tar xvf php-x.x.x.tar
5. cd apache_1.3.x
6. ./configure --prefix=/www
7. cd ../php-x.x.x
8. ./configure --with-pgsql --with-apache=../apache_1.3.x --enable-track-vars
9. make
10. make install
11. cd ../apache_1.3.x
12. ./configure --activate-module=src/modules/php4/libphp4.a
13. make
14. make install
15. cd ../php-x.x.x
16. cp php.ini-dist /usr/local/lib/php.ini
17. Edit your httpd.conf or srm.conf file and add:
AddType application/x-httpd-php .php
18. Use your normal procedure for restarting the Apache server. (You must
stop and restart the server, not just cause the server to reload by
use a HUP or USR1 signal.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.