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.
But when i do httpd start -DHAVE_PHP i het the folowing error messages
Syntax error on line 255 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/mod_php.so into server: /etc/httpd/modules/mod_php.so: cannot open shared object file: no such fie or directory.
This is ok because the file are not there but i have installed all the packages regarding php
So wich package on cd 1 or 2 give's me this file????
I dont even have:
####################################
<IfDefine HAVE_PHP4>
AddModule.....
</IfDefine>
####################################
the above line's anywhere in my httpd.conf.
I re-installed apache & php but still cant get it to work.
when I pass the arguement using -DHAVE_PHP, the apache
is complainning that i don't have mod_PHP.so file.
*IF* you are using a new installation, and don't have any old php code, here is the way to solve the problem:
IGNORE IT
mod_php.so is actually refer to the older version of php engine (i think i'ts version 2.0). All the new linux distribution come with php version 4.0
instead of passing HAVE_PHP flag, try to pass the php4:
httpd start -DHAVE_PHP4
everything will work wonderfully.
Ohh, one more thing. Since I am new to the PHP business, at least on REDHAT distribution, apache is by default do *NOT* pass .html file to the php engine. If you have some .html file which contains some php code, you then need neither modify the httpd.conf file, or rename it to .phtml or .shtml file.
Folks - I'm the guy that started the thread, and now it's time to finish it up with a big 'duh!'. I just forget to name my files with the php extention. So it's not index.html - it's index.php
Another thing I noticed is that you need to put your php file within Apache's var/www/html folder (at least on Red Hat). You'll notice that your default Apache index page is in there ( /var/www/html/index.html). If you put a page called 'test.php' in this folder, such as your 'phpinfo();' script, your address bar in your web browser should be:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.