3

Someone just upgraded to PHP 5.4.8 and now I get an error:

Google Chrome:

The website encountered an error while retrieving http://10.10.1.22/. It may be 
down for maintenance or configured incorrectly.

Firefox: Blank all white window

I did some playing around and found if I put just index.html in the /var/www/html, it display's it. But if I put in a fresh copy of joomla I get that error. I get the same error when trying to access phpmyadmin.

Everything was working fine before the upgrade, any idea's on what I need to configure? Suggestions one things I should look at or try.

I believe LAMP is installed.

000
  • 3,976
  • 4
  • 25
  • 39
milan
  • 2,179
  • 9
  • 24
  • 34
  • Turn on `display_errors` to see what the cause of the 500 error is. `ini_set('display_errors', 1); error_reporting(E_ALL);` Maybe Joomla has a debug mode or similar, which would enable these, but I'm not familiar with it. A blank white screen generally means a fatal error occurred – Michael Berkowski Nov 10 '12 at 02:10
  • @Michael Berkowski in index.php? – milan Nov 10 '12 at 02:11
  • @MichaelBerkowski Yes, at the top of the file, and also put in `ini_set('display_startup_errors', 1);` as well. – quickshiftin Nov 10 '12 at 02:12
  • Yes, index.php should be fine, up at the top. If Joomla has a bootstrap file of some sort that runs before index.php, you may need to put it there. Alternatively if you have access to php.ini, enable them there (but remember to turn them off in production) – Michael Berkowski Nov 10 '12 at 02:13
  • @Michael Berkowski I put it in index.php, I get the same thing. Trying in in php.ini now – milan Nov 10 '12 at 02:15
  • @Michael Berkowski I think I have to uncomment a line in php.ini, do you know which line? – milan Nov 10 '12 at 02:16
  • @milan Somewhere in there is `display_errors = off` search for `display_errors` and uncomment it or set it to `On`. Then find the `error_reporting` directive and set it to `E_ALL`. And changes there will require an Apache restart – Michael Berkowski Nov 10 '12 at 02:19
  • @Michael Berkowski I actually create a new html directory, backup'ed my old one and put in index.php. I get the same error. – milan Nov 10 '12 at 02:20
  • Incidentally, your error_log should also show all the PHP errors – Michael Berkowski Nov 10 '12 at 02:20
  • Check the Apache error_log then. PHP could be crashing – Michael Berkowski Nov 10 '12 at 02:21
  • @Michael Berkowsk where are the apache log files located, I uncomment'ed and turn on errors in php.ini and I still get the same thing. – milan Nov 10 '12 at 02:22
  • @Michael Berkowsk I'm looking /var/log, I don't see it there. – milan Nov 10 '12 at 02:25
  • @milan What kind of server? /var/log/httpd or /var/log/apache2, or maybe /etc/apache2/log or /etc/httpd/log – Michael Berkowski Nov 10 '12 at 02:28
  • @Michael Berkowsk just found it – milan Nov 10 '12 at 02:28
  • @Michael Berkowsk what am i looking for – milan Nov 10 '12 at 02:29
  • @Michael Berkowsk at the end of the file it says: php warning: unknown: open_basedir restription in effect. file(/var/www/html/index.php) is not within the allow paths /var/www/html/tmp – milan Nov 10 '12 at 02:34
  • See http://stackoverflow.com/questions/1846882/open-basedir-restriction-in-effect-file-is-not-within-the-allowed-paths – Michael Berkowski Nov 10 '12 at 02:36
  • @Michael Berkowsk looking at that link now trying to figure it out – milan Nov 10 '12 at 02:43
  • @Michael Berkowsk inside /etc/php.ini, i had open_basedir =/var/www/html/tmp. I changed it to open_basedir =/var/www/html. And I'm am still get the same error. – milan Nov 10 '12 at 02:48
  • @Michael Berkowsk: error log [Fri Nov 09 21:49:47 2012] [error] [client 10.10.15.3] PHP Warning: Unknown: open_basedir restriction in effect. File(/var/www/html/index.php) is not within the allowed path(s): (/var/www/html/tmp) in Unknown on line 0 [Fri Nov 09 21:49:47 2012] [error] [client 10.10.15.3] PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0 [Fri Nov 09 21:49:47 2012] [error] [client 10.10.15.3] PHP Fatal error: Unknown: Failed opening required '/var/www/html/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0 – milan Nov 10 '12 at 02:55
  • First, Joomla does indeed have a debug mode, you can just go to the configuraiton.php and change the error reporting to 'development'. You could also turn debug on but that's probabl not th issue. – Elin Aug 27 '13 at 02:32

2 Answers2

1

if I put just index.html in the /var/www/html, it display's it. depicts that there is no php configuration problem.

There may be some extension specific issue. You may try with a default Joomla installation and add extensions one at a time until you identify which ones specifically have an issue and then refer to the extension developers - they may not be aware of the issues.

000
  • 3,976
  • 4
  • 25
  • 39
1

Html doesn t need server intervention to display.

Try to put a php file instead: index.php

Inside put these codes :

<?php

ini_set('display_errors', 1); 
ini_set('log_errors', 1); 
ini_set('error_log', dirname(__FILE__) . '/error_log.txt'); 
error_reporting(E_ALL);

echo "Hello World!";
echo "php is working";
php_info();

//this should generate an error--->
echo $unknown_var;
    ?>
    <html>
    Html is working
    </html>

This should help you identify what is wrong.

My guess is that your server may need to be restarted.

EDIT

It seems you have a problem with the setting open_basedir

or a .htaccess is preventing you from acccessing your www director.

olso chek the value of doc_root

Jeffrey Nicholson Carré
  • 2,950
  • 1
  • 26
  • 44