LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   how to configure httpd to run php (https://www.linuxquestions.org/questions/linux-server-73/how-to-configure-httpd-to-run-php-743695/)

nshimiyimana 07-29-2009 09:27 AM

how to configure httpd to run php
 
Hello friends, I really apreciate your help! Please can you assist me how to configure http and mod_php to be able to run online application (mysql and php)? Thanks a lot

Nshimiyimana

dlugasx 07-29-2009 09:48 AM

Quote:

Originally Posted by nshimiyimana (Post 3624299)
Hello friends, I really apreciate your help! Please can you assist me how to configure http and mod_php to be able to run online application (mysql and php)? Thanks a lot

Nshimiyimana

Hello friend,

please write more detailed questions. We even dont know what kind of operating system You using.

http://www.server-world.info/en/note..._5&p=httpd&f=1


here You have nice page...

try on google... how to create LAMP server... hundreds of tutorials...

have fun

bkcreddy17 07-29-2009 11:17 AM

Hi
 
After installing mod_php, there nothing to edit the configuration file. You can see all conf files are included from conf.d directory in httpd.conf. So, create index.php in /var/www/html/ (DocumentRoot)(if are using rpm). and in browser type
Code:

http://localhost/index.php
definetly you will get it. Do it and let me know ASAP.

You need to edit /etc/php.ini file for that if you are using mysql/msql datebase. What database r u using, is that mysql?

kirukan 07-29-2009 12:55 PM

Add these in httpd.conf file

Load the appropriate php module(check 5 or 4)
Quote:

LoadModule php5_module modules/libphp5.so
Enter the following line after the line AddType application/x-tar .tgz under
<IfModule mime_module> area

Quote:

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

Add index.php to the list of valid Directory Index files so that your "default page" in a directory can be named index.php.
Quote:

<IfModule mod_dir.c>
DirectoryIndex index.html index.phtml index.php index.phps
</IfModule>

nowonmai 07-30-2009 05:22 AM

It's all very editing config files, but most distros provide the integration tools themselves, and it's better to use the distro tools than go editing confs yourself (unless you know what you're doing).
What distro are we talking about here?

nshimiyimana 08-03-2009 08:02 AM

On
 
Quote:

Originally Posted by bkcreddy17 (Post 3624400)
After installing mod_php, there nothing to edit the configuration file. You can see all conf files are included from conf.d directory in httpd.conf. So, create index.php in /var/www/html/ (DocumentRoot)(if are using rpm). and in browser type
Code:

http://localhost/index.php
definetly you will get it. Do it and let me know ASAP.

You need to edit /etc/php.ini file for that if you are using mysql/msql datebase. What database r u using, is that mysql?

Hi my friend,
Yes I am using mysql. can you show me which configuration I have to do in /etc/resolv.ini. Thanks

Nshimiyimana


All times are GMT -5. The time now is 06:00 PM.