PHP5 and Apache2 parsing code but no output
I have apache 2.2.3 installed with php5 and libapache2-mod-php5. The server displays web-pages fine, but when I try to load a .php file, nothing shows up. There aren't any errors, not in the browser and not in the Apache2 error logs... just nothing shows up. When I look at the page source on the browser, all the HTML code is there, but all the PHP code is gone, as though it was parsed. I can't get any output to show up though, echo and print both do nothing.
What could be the problem? Example: Code:
<html> Code:
<html> |
Is the php module loaded in httpd.conf ?
does the standard test with phpinfo(); work ? |
Yes the module is loaded and phpinfo(); doesn't display anything just like "echo" and "print"... it just gets discarded from the document source... bye bye.
|
Check the httpd logs for errors.
Make sure the permissions for your php pages are 644. |
Thanks for your help smoker and michaelk. I figured it out. Everything was configured properly... you wouldn't believe it, but my FTP Client was transfering in ASCII Mode and mangled the file... It is working great now in binary mode.
Thanks for your replies! Wyatt |
but html and php are ascii ?!?
|
Damn FTP :)
Just SCP / rSync the stuff to your server next time :) |
Hah... I know. I am not sure if it was notepad or wordpad or the FTP. I Hate windows and hate both (notepad and wordpad)... ick... but I am stuck with MS for now as I am on my dads computer. *sigh*
Thanks for your help anyways guys. :D |
All times are GMT -5. The time now is 10:04 AM. |