Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Role User does not work
#9
(10-27-2011, 04:11 PM)steinm Wrote:
(10-27-2011, 12:26 AM)amwassil Wrote: Browser Error:
http://www..../install/install.php
inc/inc.Settings 1 OK
inc/inc.Settings 2 OK

Fatal error: Call to a member function xpath() on a non-object in /.../inc/inc.ClassSettings.php on line 232

The script fails here: inc/inc.Settings.php

049 echo 'inc/inc.Settings 1 OK</br>'; // added for debug
050 require_once('inc.ClassSettings.php');
051 echo 'inc/inc.Settings 2 OK</br>'; // added for debug
052 $settings = new Settings();
053 echo 'inc/inc.Settings 3 OK</br>'; // added for debug

So the script fails at: $settings = new Settings();

So it happens in the constructor of the class Settings(). The only reasonable cause for that is a failure in reading the configuration file.

Place some echos in the constructor of class Settings in inc/inc.ClassSettings.php.
You could for example echo the $configFilePath.

Uwe

Thanks for being patient and staying with me on this. Here's what I've got for you today:

http://.../install/install.php

file: inc/inc.ClassSettings.php
151: $configFilePath= ../conf/settings.xml
229: $configFilePath=../conf/settings.xml
231: $xml= no value for $xml

Fatal error: Call to a member function xpath() on a non-object in /.../inc/inc.ClassSettings.php on line 233

023: echo 'file: inc/inc.ClassSettings.php<br />';
142: function Settings($configFilePath='') { /* {{{ */
151: echo '151: $configFilePath= ', $configFilePath, '<br />';
228: function load($configFilePath) { /* {{{ */
229: if(!empty($configFilePath)) {echo '229: $configFilePath=', $configFilePath, '<br />';}
230: $xml = simplexml_load_string(file_get_contents($configFilePath));
231: if(!empty($xml)) {echo '231: ', $xml, '<br />';} else echo '231: $xml= no value for $xml</br />';

The file is where it's supposed to be:
/conf
settings.xml 8.2KB xml document -rw-r--r--

So it looks to fail at: $xml = simplexml_load_string(file_get_contents($configFilePath));
Reply


Messages In This Thread
Role User does not work - by amwassil - 10-24-2011, 12:35 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)