Results 1 to 5 of 5
I keep getting a blank screen when I open .php page. I view source and I see all the php <? ?> stuff
why isn't it being handled by the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-01-2005 #1Just Joined!
- Join Date
- Jul 2005
- Posts
- 10
Installed PHP, getting blank screen
I keep getting a blank screen when I open .php page. I view source and I see all the php <? ?> stuff
why isn't it being handled by the webserver? I added the Addtype command in httpd.conf as well. What else is there to do?
I read somewhere that u have to open a .php from ur webserver at first like http://localhost/test.php. Only problem is, I don't know how to do that through linux.
it works when I type >>php test.php at the prompt. I even get phpinfo() that way.
advice?
- 08-01-2005 #2Linux Newbie
- Join Date
- Apr 2005
- Location
- South America
- Posts
- 152
What does your httpd.conf looks like?
Mine looks something like this
Code:// First of all, make sure this line (or similar) is enabled, i.e not commented LoadModule php4_module modules/libphp4.so // Search for this line and change it to this (this is misc, nothing to do with your problem DirectoryIndex index.html index.php // Then add this at the end of the file AddType application/x-httpd-php .php
??? You dont know? Yes you do. Simply put, open a browser and point it to the URL location of the script. You know, you're installing php and a webserver, so, a browser is the way to access the script...
Originally Posted by Sikh
Now if you dont know, apache by default tries to open files pointed in /usr/local/apache/htdocs, so you copy the script there (e.g test.php) and type in your browser http://localhost/test.php
You say you can run php from the commandline and works fine, so the problem is with the apache configuration, that is not recognizing .php files properly.
- 08-01-2005 #3Just Joined!
- Join Date
- Jul 2005
- Posts
- 10
I'm connected to the linux server through SSH. Is there a built in Linux webbrowser like in windows/IE?
forexample I can't do http://localhost/test.php from my home right? that'll not mean the same thing
- 08-01-2005 #4
Okay, you've SSH'd in. What's the IP adress of that box? If it's 1.2.3.4, we'd do:
http://1.2.3.4/test.php
Another option would be to launch a web browser from the remote box, assuming that it has one installed. Try the "firefox" and "mozilla" commands. If those don't work, you can always try "lynx", which is a text-based web browser that doesn't display images, but otherwise works fine.
- 08-01-2005 #5Just Joined!
- Join Date
- Jul 2005
- Posts
- 10
ok I checked
I didn't have this line:
LoadModule php4_module modules/libphp4.so
problem is, if I add it it gives an error like directory not found. I remember seeing a modules folder when I got RedHat installed and the default apache2 had it.
I checked for a module folder, the installation has it. but the apache2 folder where httpd.conf is, there's no modules directory.
any idea, how do I resolve this?


Reply With Quote
