After change of Server no request from class function

Alles, was PHP betrifft, kann hier besprochen werden.

After change of Server no request from class function

Postby Christian Deinert » 18. December 2009 11:21

Hello everyone,

after a Serverchange from Suse-Linux to a Debian server I got a problem, I´ll try to explain.

I use a function canShowNavigationEntry($id), which checks the Rights from the logged-in-User. When I load the Admin-asset I check for example this.
in admin.asset.php
Code: Select all
if ( $loggedInUser->canShowNavigationEntry ( 21 ) )
{
...
}


in User.class.php
Code: Select all
function canShowNavigationEntry ( $id )
{
return in_array ( $id, $this->fetchNavigationEntryIds() );
}


The problem is that the function fetchNavigationEntryIds don´t make a request. The failure occured in the following statement for getting the database connection data. But only for the admin-page. I also use this funtion(fetchNavigationEntryIds) for the main navigation, and it works. But on the admin-asset the function $this->getDatabase() didn´t call/select.

in User.class.php
Code: Select all
function fetchNavigationEntryIds ( $disabled = NULL )
{
   // Rückgabe initialisieren
   $ret = array();
   // Standardwerte setzen
   if ( !is_bool ( $disabled ) ) $disabled = false;
      
   // Globale Variablen
   $database =& $this->getDatabase();
...
}


On our old server all functions worked fine. I put the entry "register_globals = on" in the php.ini and restart the apache2, but nothing happend. Someone have any ideas??

Greetings,

Christian
Christian Deinert
 
Posts: 2
Joined: 12. January 2007 11:33
Location: Hamm / NRW / Germany

Re: After change of Server no request from class function

Postby Christian Deinert » 18. December 2009 13:16

Hat sich erledigt.

Problem mit Referenzen. Umstellung von Php 4 auf 5.
Christian Deinert
 
Posts: 2
Joined: 12. January 2007 11:33
Location: Hamm / NRW / Germany


Return to PHP

Who is online

Users browsing this forum: No registered users and 18 guests