0

I have installed Ubuntu 14.04 on a server for local use.

Apache is working fine. I have see the phpinfo() method in /var/www . I have also changed the document root to /var/www but then also I cannot see the phpinfo on the browser.

HTTP 5000 error is thrown by the browser.

Pang
  • 9,564
  • 146
  • 81
  • 122
user3514163
  • 41
  • 1
  • 1
  • 4
  • Check the DocumentRoot whether is configured with /var/www in apache and try method – Venkat.R Jan 14 '16 at 11:13
  • if you navigate to /var and run the command ls -la, what is shown for the row with www on it, in full? Also, do you mean 500 error? This indicates there's something wrong with either the configuration or the script itself which it's trying to run. Can you output the contents of the file which has phpinfo() in it? – gabe3886 Jan 14 '16 at 11:18
  • post the server log from /var/log/apache2/error.log – Chetan Ameta Jan 14 '16 at 11:18
  • i am getting " PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 4872 bytes)" – user3514163 Feb 02 '16 at 12:31

2 Answers2

0
sudo apt-get install php5
sudo chmod -R 755 /var/www/
  • 6
    A little explanation of your code wouldn't hurt anyone. – croxy Jan 14 '16 at 11:00
  • 1
    Thank you for posting an answer to this question! Code-only answers are discouraged on Stack Overflow, because it can be difficult for the original poster (or future readers) to understand the logic behind them. Please, edit your answer and include an explanation of your code so that others can benefit from it. Thanks! – Maximillian Laumeister Jan 15 '16 at 02:37
  • i am getting " PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 4872 bytes)" – user3514163 Feb 02 '16 at 12:31
0

Try the following:

sudo chmod 777 -R var/www

What your doing here is allowing the read/write permission to your www folder into the var directory. First cd into your root and enter the above into your terminal.

http://www.computerhope.com/unix/uchmod.htm

Read the above link in order to get the detailed idea in chmod in terminal.

DpEN
  • 4,216
  • 3
  • 17
  • 26
  • 1
    I expect you mean `/var/www` - without the preceding slash this value is relative to the current working directory. Also, it's worth noting that `777` is OK on a local machine, but there are security implications for remote servers, especially on shared hosts. – halfer Jan 14 '16 at 12:05
  • i am getting " PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 4872 bytes)" – user3514163 Feb 02 '16 at 12:32
  • @user3514163 Please try this link :http://stackoverflow.com/questions/16175153/allowed-memory-size-of-262144-bytes-exhausted-tried-to-allocate-24576-bytes – DpEN Feb 03 '16 at 03:47