lamp won't run `.php` files was creating or editing on windows
Hi there
When i create or edit some file like `index.php` with below simple content (on Windows) :
Code:
<?php
echo 'Hello world';
?>
Now, I want to run it on Ubuntu by lamp-server. Copied that `index.php` file on `~/public_html/`.
Finally trying below in Browser :
Code:
localhost/index.php
I get following error:
Quote:
Server error
The website encountered an error while retrieving http://localhost/home.php. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
But if i create that `index.php` on ubuntu with same content it works fine.
It's some weird isn't it ?
Re: lamp won't run `.php` files was creating or editing on windows
Re: lamp won't run `.php` files was creating or editing on windows
Quote:
Originally Posted by
monkeybrain2012
index.php is in var/www
I have changed www folder to `~/public_html/`
When i create `index.php` file in Ubuntu and put that in `~/public_html/` it works fine.
Re: lamp won't run `.php` files was creating or editing on windows
Thread moved to Server Platforms.
Re: lamp won't run `.php` files was creating or editing on windows
I find out the problem :)
Answer :
Code:
sudo chmod -R 755 ~/public_html
Re: lamp won't run `.php` files was creating or editing on windows
You didn't say what Web server you were using, but I'm assuming it's Apache (cuz of LAMP). Checking error logs helps tremendously. :p
Glad you got it sorted.