LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-29-2009, 09:27 AM   #1
nshimiyimana
LQ Newbie
 
Registered: Jul 2009
Posts: 7

Rep: Reputation: 0
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
 
Old 07-29-2009, 09:48 AM   #2
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Rep: Reputation: 19
Quote:
Originally Posted by nshimiyimana View Post
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
 
Old 07-29-2009, 11:17 AM   #3
bkcreddy17
Member
 
Registered: Feb 2008
Location: India-Hyderabad
Distribution: RHEL and Fedora
Posts: 171

Rep: Reputation: 15
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?
 
Old 07-29-2009, 12:55 PM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
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>

Last edited by kirukan; 07-29-2009 at 12:57 PM.
 
Old 07-30-2009, 05:22 AM   #5
nowonmai
Member
 
Registered: Jun 2003
Posts: 481

Rep: Reputation: 48
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?
 
Old 08-03-2009, 08:02 AM   #6
nshimiyimana
LQ Newbie
 
Registered: Jul 2009
Posts: 7

Original Poster
Rep: Reputation: 0
On

Quote:
Originally Posted by bkcreddy17 View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't configure HTTPD bartalamu Linux - Newbie 2 07-18-2008 03:28 PM
Why doesn't apache (httpd) recognize and run with the new version of PHP I installed? jpuretz@tk20.com Linux - Server 5 06-10-2008 03:45 AM
Configure PHP source to HTTPD installed from YUM ittec Linux - Software 2 03-03-2008 03:31 AM
Starting httpd: Ouch! ap_mm_create(1048576, "/var/run/httpd.mm.1020") dkd_nvs Linux - General 4 07-21-2007 11:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration