Question

I've just installed LAMP on my Ubuntu 9.10 machine, and everything works fine except when I copy my PHP files from another computer.

The LAMP guides I've followed also made me create a phpinfo() test file, which works, but when I try to type in e.g. index.php absolutely nothing happens - just a blank page in FireFox. :( The files are in the exact same directory.

I'm thinking it's probably something with permissions and so on, but since I'm new to both PHP and Ubuntu, I'm kind of lost. It's like I can't create a PHP file with my file browser, but only by using the terminal - like when I created the testing.php from the LAMP guide.

Was it helpful?

Solution

Whaddayaknow... I made an error, tried to:

echo "Hello" world

which, even though I'm a PHP noob, I clearly know is wrong.

I think I'll have to figure out how to enable some sort of error reporting, a blank page is clearly not good enough.

OTHER TIPS

You mean you have a index.php (copied from another computer) and a test.php (edited by hand, with a call to phpinfo()) in the same apache directory, the second works from your browser and the first doesnt ?

That can be a permission issue, or some compilation error in your php.

About permissions, for files should be readable from the apache server (more precisely, form the user that runs the apache server). You can type chmod a+r index.php.

YOu can also check your apache error logs (location dependent on installation). In any case it's vital to know where the error logs are if your are developing a web site.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top