LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-25-2006, 09:38 PM   #76
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30

Quote:
Originally Posted by Markness
Where is the php config file again?
The httpd.conf file is in /etc/httpd/conf and the php.conf file is in /etc/httpd/conf.d

Peace...
 
Old 04-25-2006, 09:41 PM   #77
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
here what the php file has in it

Quote:
[root@cpe-24-195-24-133 conf.d]# cat php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
[root@cpe-24-195-24-133 conf.d]#
 
Old 04-25-2006, 09:46 PM   #78
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Cool. Remove this line from /etc/httpd/conf/httpd.conf

AddType application/x-httpd-php .php

and put it after the

AddType text/html .php

line in /etc/httpd/conf.d/php.conf so it looks like this:

AddType text/html .php
AddType application/x-httpd-php .php

Restart Apache:

# /usr/sbin/httpd -k restart

Also, check your e-mail when you can.

Peace...
 
Old 04-25-2006, 09:58 PM   #79
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
IT WORKS!

EURIKA!
 
Old 04-25-2006, 10:00 PM   #80
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Ok, so what did you change last?

Then we can recap.

Peace...
 
Old 04-25-2006, 10:01 PM   #81
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by Markness
EURIKA!
Technically, it's "Eureka"

LOL

Peace...
 
Old 04-25-2006, 10:01 PM   #82
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
Cool. Remove this line from /etc/httpd/conf/httpd.conf

AddType application/x-httpd-php .php

and put it after the

AddType text/html .php

line in /etc/httpd/conf.d/php.conf so it looks like this:

AddType text/html .php
AddType application/x-httpd-php .php

Those were my last actions.

Recap. Woot. I love how a 10 step setup went to a 62 step setup. *sigh* books. I'm just thankful for this community!

Now if anyone else has time, I have domains that need to be set to my server. IE: mohawk-paintball
 
Old 04-25-2006, 10:10 PM   #83
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by Markness
Now if anyone else has time, I have domains that need to be set to my server. IE: mohawk-paintball
I'm not good enough for ya? If you have multiple sites you wanna host, we can go over Virtual Hosting next, if you like.

Ok here is the recap:

Based on what we went through in this thread, it appears that when you built PHP against the Apache you had installed in /usr/local/apache2, the PHP module didn't make it to the right place. Somehow your PHP5 module made it to /usr/lib/httpd/modules, which makes me think PHP5 might have been built using apxs in /usr/sbin or somewhere other than /usr/local/apache2/bin.

We spent a TON of time trying to get the PHP module loaded and MIME type defined to your /usr/local/apache2 installation, without any luck.

Once I learned you had Apache 2.2 already installed in /usr/sbin (and so on), we bailed on your /usr/local/apache2 installation and used the other one (the one you're using now) which had all of the modules I had expected to be in your /usr/local/apache2 installation.

I've built "LAMP" (Linux, Apache, MySQL, PHP) boxes in the past and all from source with very little problems at all BUT I tend to go with a simpler installation method than having files scattered about the filesystem (like the Apache installation that's working now for you).

Now that PHP is working for you, you'll have to get it setup for the sites you plan to host that will need PHP. Some PHP scripts will want globals_registered to be on by default and some will want it off, for example. You can tailor PHP settings on a per-virtual host basis, once you understand how virtual hosting works.

So, I suggest you read the Virtual Host documentation and then you can start a new thread on virtual hosting, but ONLY after you search the forums for 'virtual hosting' and 'virtual host' first to make sure your outstanding questions haven't already been answered.

Lemme know if you have any questions. I'm heading home now so I'll be offline for about 30 mins.

Peace...
 
Old 04-25-2006, 10:12 PM   #84
Markness
Member
 
Registered: Apr 2005
Location: Albany, NY
Distribution: Fedora Core 6
Posts: 85

Original Poster
Rep: Reputation: 15
Thanks I appreciate all your hard work.
 
Old 04-25-2006, 10:53 PM   #85
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Now that we have a known and working Apache config, setting up virtual hosts should be a piece of cake.

Peace...
 
  


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
hello. Problems with apache, (I believe.) $Linuxnoob Fedora 5 04-09-2006 06:51 PM
Problems with Apache XblueorbX Linux - Software 22 08-13-2005 10:31 AM
apache 1.3 problems Dill Linux - Software 4 09-05-2004 06:01 PM
Apache: Several Problems! overbored Linux - Software 5 08-31-2004 11:01 PM
Apache virtualhost problems, apache install problems nyroc Linux - Software 2 06-10-2003 12:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:50 AM.

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