LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-21-2007, 08:37 PM   #1
TheLaughingCorpse
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Rep: Reputation: 0
Apache Server help needed


I installed Apache on this computer, it's Mandriva 2008 I was running Mandriva 2006, and I never had this error before I don't think.
Anyway when I try to start the service I get this.

[root@Mandriva austin]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
Also I was trying to put phpBB forums on there, but when I put the files in a /forums/ directory, when I try to connect from my other computer the connection is timed out. I could view the index.html file from the home directory.

When I tried to view it on here I got a permission denied error or no index file. I added index.php to the httpd.conf file and I get the code, but it doesn't do what it's supposed to.

I don't even think I should be posting this here because it doesn't concern linux too much I think...

but if someone could help
Thank you
 
Old 11-22-2007, 12:11 AM   #2
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 39
Just re-check your httpd.conf file. Make sure the lines Listen and ServerName are not commented out. Anyway since you're able to view your index.php remotely, you can safely ignore the warning if you want.
If index.php is showing the code, its possible you haven't installed php, or you haven't configured apache to load the php module.
What is the output of locate libphp?
 
Old 11-22-2007, 09:46 AM   #3
riseinarms
LQ Newbie
 
Registered: Jan 2007
Location: New Hampshire
Distribution: Mandriva 2008
Posts: 29

Rep: Reputation: 15
Ah, thank you ServerName was commented out. It isn't getting the error.

I looked up more on the php issue and found out it needed to be installed. I looked on Google and downloaded the newest version of php. I haven't installed it yet and I'm hoping I can, this is the output though...

[austin@Mandriva ~]$ locate libphp
/home/austin/Desktop/php-5.2.5/sapi/apache/libphp5.module.in
/home/austin/Desktop/php-5.2.5/sapi/apache_hooks/libphp5.module.in

I'm trying to use the documentation from the php site, but if you know an easier one then would you let me know?
 
Old 11-22-2007, 10:54 AM   #4
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 39
Are you the same guy who asked the question? Why two accounts?
Anyway, I think php configuation in Apache might differ across distros, but here is what mine looks like anyway:

There's a line in httpd.conf that says:
Code:
# Uncomment the following line to enable PHP:
#
#Include /etc/httpd/mod_php.conf
And in mod_php.conf, the required LoadModule line is as follows:
Code:
LoadModule php5_module lib/httpd/modules/libphp5.so
And the only other uncommented line in that file is:
Code:
AddType application/x-httpd-php .php
(this is the piece that will make your php page appear correctly instead of as code.
I guess I asked you for the locate libphp output because the name and path often differs (libphp4so, libphp5.so, etc) depending on the version or something, & I remember struggling with minor problems like that when I was configuring these things once. As long as you enter it correctly in the LoadModule line you'll have no problems.
 
Old 11-22-2007, 11:55 AM   #5
riseinarms
LQ Newbie
 
Registered: Jan 2007
Location: New Hampshire
Distribution: Mandriva 2008
Posts: 29

Rep: Reputation: 15
Yeah, same guy. I was wondering why I wasn't getting e-mail responses and I found out I had another account.

Well the php I downloaded you have to compile, and the tutorial I was looking at was really confusing.

I tried doing what you said, but it isn't working. It's saying the files don't exist, and I tried that command, and there is no output anymore.
 
Old 11-22-2007, 12:49 PM   #6
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 39
Well basically the libphp5.so file will appear only after you compile and install the php that you downloaded.
(The only time I installed php myself, I did the entire (L)AMP server installation from source: apache2, mysql and php) Maybe you should consider removing apache through your package manager and installing it from source using the steps given here. Because I'm not sure what arguments it might have been configured with by default.
Or perhaps someone experienced could give an easier solution.

Edit: If you are planning to remove apache and reinstall it from source, please take a backup of your html directory first (also httpd.conf). It shouldn't get removed, but better safe than sorry.

Last edited by indeliblestamp; 11-22-2007 at 12:52 PM.
 
Old 11-22-2007, 03:22 PM   #7
riseinarms
LQ Newbie
 
Registered: Jan 2007
Location: New Hampshire
Distribution: Mandriva 2008
Posts: 29

Rep: Reputation: 15
I'm going to try remove the package and trying that. I don't have anything on there as of now so I don't need to make a backup. Thank you for your help.
 
Old 11-22-2007, 04:44 PM   #8
riseinarms
LQ Newbie
 
Registered: Jan 2007
Location: New Hampshire
Distribution: Mandriva 2008
Posts: 29

Rep: Reputation: 15
ok I get this error:

configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
[root@Mandriva php-5.2.5]# make
make: *** No targets specified and no makefile found. Stop.

Last edited by riseinarms; 11-22-2007 at 05:32 PM.
 
Old 11-22-2007, 11:20 PM   #9
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 39
Hmm. Do you have mysql installed already? If not, you should install that too if you want php+mysql in apache.
If you do have mysql installed, make sure you give the correct path to its location while running the ./configure script.
A quick google shows that one user had to give it as:
Code:
./configure -with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql
But it could very well be --with-mysql=/usr/mysql (instead of /usr/local/mysql), so make sure you verify that path before running the php configure script.
 
Old 11-22-2007, 11:53 PM   #10
riseinarms
LQ Newbie
 
Registered: Jan 2007
Location: New Hampshire
Distribution: Mandriva 2008
Posts: 29

Rep: Reputation: 15
I got past that part now, it said with PHP5 that the MySQL headers aren't included anymore or something like that. I tried to configure PHP without MySQL and apparently there is an issue with PHP and there's some sort of error. Which sucks. I tried to install PHP4 but there was an error with that too, and the support is going down for that version.

I guess I'll have to wait a bit until the fix the new version...
 
Old 11-23-2007, 02:19 AM   #11
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 39
Okay, if you don't mind could you try one last option? I just did a quick search and found xampp, an all-in-one package with apache, php, sql and several other things. The install steps in that link look pretty simple, and it should sit (in /opt) completely independent of your existing apache/mysql/other installations.
So can you try that out and see how it goes?
 
Old 11-23-2007, 02:31 PM   #12
riseinarms
LQ Newbie
 
Registered: Jan 2007
Location: New Hampshire
Distribution: Mandriva 2008
Posts: 29

Rep: Reputation: 15
I tried the package you suggested. It worked great. I have it all set up and phpbb forums on there.

You wouldn't happen to know how to set up a domain name would you? haha
 
Old 11-24-2007, 06:08 AM   #13
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 39
Phew, at last! Glad it worked. Never done the domain name thingie, guess you should search around a bit for that. If you don't have a static public IP address, you might want to google for dynamic dns. All the best with your site..
 
  


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
Apache Vhost Help Needed 2kau Linux - Software 2 03-30-2006 03:27 AM
apache question needed help runeleader Linux - Newbie 1 11-19-2004 02:17 AM
apache help needed legal2k Linux - Newbie 8 02-08-2004 06:25 AM
Apache and Frontpage, no apache mods needed cli_man Linux - General 0 09-27-2003 10:31 AM
Apache helps needed !!! chuck77 Linux - General 11 01-28-2002 10:46 PM


All times are GMT -5. The time now is 01:51 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration