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.
Okay, several things:
What do you get when you view the source of the page? I'm guessing that you get:
<html><body></body></html>
If so, then that's good - it means that php is functioning correctly. Then the problem is your code. Could you post your code? You should have something like:
Your getting a blank screen because php is probably configured such that it willl not send error messages to the page. Check your Apache logs for errors.
Firstly I have just installed/reinstalled php. I did "./configure", then "make", then "make install" and everything went off happily and came back with no errors so I am asumming its I've now got it!
I restarted apache (whos logs are empty in /var/log/apache)
This is my script:
<?php
echo 'Hello World!';
?>
Which i wrote in vim and called hello.php
But when opened in Konquerer it just displays the whole thing.
I've just been reading some tutorials and one says that if you are prompted with a download box, (which I am using Mozilla, and Firefox) the php is not installed.
Do I need to configure something in apache or something?
I have also noticed in my /etc/init.d folder there is apache and apache2
Both startup and run but which one should I be running?
Sorry guys, I'm new to all this....
My brain hurts...
Last edited by TheDirtyPenguin; 03-17-2004 at 12:15 PM.
The main issue with Apache 2.x and php is with global vars, so if your gonna run 2.x then you may have to add this line to your php.ini file to get some code to work.
register_globals = On
Global vars can present some security issues and that's why this defaults to off but there's alot of php code in the world that still requires this to be on.
Syntax error on line 262 of /etc/httpd/httpd.conf:
Cannot load /srv/www/libexec/libphp4.so into server: /srv/www/libexec/libphp4.so: cannot open shared object file: No such file or directory fail
So I am assuming something is wrong with libexec/libphp4.so
Well either php4 isn't installed( may be another version? ) or the path is just wrong. Sorry I don't have any experience with SUSE so best I can do is tell you to:
cd /
find -name *mod_php*
If you find nothing then it's a safe bet that php isn't installed.
Thanks for your help though, I friend at work has a suse 9 machine with php working so I can just look at the path in that one. I'm 99% certain php is installed because I did it myself and if I do a "whereis php" i get:
It sounds like apache wasn't installed with PHP support built-in - if you've got mod_so, then you should be able to add it in as a dynamic module. If not, then recompiling apache is what you've got to do...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.