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 compiled Apache 2.2.8 and PHP 5.2.5 from source and did everything as in the official PHP documentation. The weird thing is that I've got blank pages on almost every PHP page. One script works and I don't know how it's possible. I used to run nginx before, but I removed it. The Ubuntu packages also don't work.
My httpd.conf is the default one with PHP enabled. My php.ini is the default php.ini-recommended. How can I fix this weird behavior?
check the apache log file for hints; I don't have access at the moment to my slackware server, but somewhere in /var/log/
//edit:
you start with PHP open tag; if something goes wrong in that first part (before you get to the html part), apache might/will abort resulting in blank page
Last edited by Wim Sturkenboom; 03-02-2008 at 09:54 AM.
Ok, it seemed to be a stupid question. I had display_errors turned off in my php.ini and my scripts are spawning errors so I've got blank pages as result. Thanks anyway!
If you have php installed for use from the command line, you can also try to run your scripts by the invocation php myscript.php.
If you get html text output, you are good to go. Otherwise, you will get descriptive error messages, regardless of what the PHP plugin to apache is configured to do.
Also, if you have php available at the command line, then starting a script with shebang php lets you run scripts written in php exactly the same way you run perl scripts or bash scripts.
Specifically, on my system, if the first line is:
#!/usr/bin/php
then I can execute php scripts like any other command.
Ok, it seemed to be a stupid question. I had display_errors turned off in my php.ini and my scripts are spawning errors so I've got blank pages as result. Thanks anyway!
EOT
My opinion:
If this is a production server, it should be off for security reasons. Under other circumstances (e.g. development), it's up to you.
Last edited by Wim Sturkenboom; 03-03-2008 at 12:23 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.