Linux - SoftwareThis 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
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 recently installed Apache on my linux machine (Fedora Core 8). When I went to start it up for the first time I got an error. Here is the command I used to start it:
#/usr/local/apache2/bin/apachectl start
Here is the error message I got.
httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: cannot open shared object file: No such file or directory
I changed into the /usr/local/apache2/modules directory and instead of libphp4.so I have libphp5.so. So that's probably why it says "No such file or directory"
This might be a case of loading stuff in an unfortunate order. It could be that you loaded php(5) first, and then the apache stuff (which looks like it wrote over anything that php5 might have left you. In my versions of these, though, that LoadModule stuff is not in httpd.conf at all; for a while now, each subsystem puts a configuration file in /etc/httpd/conf.d. So check if you have /etc/httpd.conf.d/php.conf, and if that looks like it refers to php5, not 4.
If that is the case, you might be able to get off with just deleting the offending line in httpd.conf, since the config lines in all the conf.d/*.conf files get included (also check if you have such a line in your main httpd.conf file
Code:
Include conf.d/*.conf
The versions I quote are php-5.2.4-1 and httpd-2.2.8-1. If your are much older, you might consider a newer package.
My httpd.conf file points to the correct spot. That is not the problem.
The order in which I installed things is as follows:
Apache
MySQL
PHP
Mr. C--how do I know which LoadModule to remove? I went into /usr/local/apache2/modules and tried to view the contents of the files, but it says they aren't text files so I can't view them.
If you have the file /etc/httpd/conf.d/php5.conf, then you can try to delete php4 references from the main configuration file /etc/httpd/conf/httpd.conf. To do so, you will need to use a text editor. The files are actually text, even though they do not have the file extension .txt.
In your favorite text editor, search for the line that produced the complaint in your message log. It will be on line 54, and should read something like this: "LoadModule php4_module modules/libphp4.so". Delete this line (or put a comment symbol in front of it [#] to make it inactive).
Once you have saved the configuration file, you can check for obvious errors with the command
Code:
# httpd -t
This will either produce a single line "Syntax OK" or some complaints about things that are wrong with your configuration. Once the syntax is acceptable, you can then restart the server to make the new configuration active.
I tried it again and now I have a syntax error on line 119.
Syntax error on line 119 of /usr/local/apache2/conf/httpd.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
I opened the file and found line 119 and sure enough, 'Order' is there. But how do I know if it is misspelled? lol Here is the code from the file.
Code:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
I am using Vim with the syntax enabled, so it highlights everything. The words 'Options' and 'AllowOverride" are green and give me no problems. The words 'Order' and 'Deny from' are purple, so I am assuming this means they aren't the correct "keywords" or whatever (not the proper syntax). So, if you have any suggestions, I would appreciate them.
Thanks in advance for helping me out guys. I really appreciate it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.