Linux - NewbieThis 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
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.
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...
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?
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...
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:
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.
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 11:52 AM.
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.
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 04:32 PM.
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:
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.
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...
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?
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..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.