Menu

PHP ERROR

Ralph
2009-01-30
2013-05-17
  • Ralph

    Ralph - 2009-01-30

    Hi,

    on CentOS 5.2 there is the following error :

    Notice: Undefined variable: err in /var/www/html/dhcpadmin/index.php on line 164

    Fatal error: Call to a member function GenerateErrorLink() on a non-object in /var/www/html/dhcpadmin/index.php on line 164

    Can anybody help me ?

    Apache 2.2.3
    PHP 5.1.6

    Ralph

     
    • Anonymous

      Anonymous - 2009-08-19

      I have this error as well with the following configuration....

      / database configuration
      $defined['hostname'] = "http://host.domain.org";
      $defined['dbhost'] = "localhost";
      $defined['username'] = "localuser";
      $defined['password'] = "localuserpass";
      $defined['dbname'] = "phpDHCPAdmin";

      any ideas?

       
    • Anonymous

      Anonymous - 2009-08-19

      background information:

      OS = debian lenny
      apache = 2.2.9
      php = 5.2.6-1+lenny3 with Suhosin-Patch 0.9.6.2

      ERROR:
      Fatal error: Call to a member function GenerateErrorLink() on a non-object in /var/www/secure/phpDHCPAdmin-0.9.4-beta/index.php on line 164

      I must add i am accessing the url over a forwarded ssh connection (if that matters).

       
    • Ralph

      Ralph - 2009-01-30

      I have found the problem.
      In the README file there is an example for

      $defined['hostname'] <-- This is the domain or web
      server name (ex. http://phpdhcpadmin.com)

      With http:// in hostname

      $defined['hostname'] doesn't match with $_SERVER['SERVER_NAME'] )

      on line 14 in index.php.

       
  • jas

    jas - 2009-11-17

    My apologies. I just barely saw this.

    This error message is an indication of a misconfiguration within the
    inc.config.php file.

    Specifically the $defined directive. This field MUST match the server address
    found in global php variable; $_SERVER

    The latest release I uploaded today is phpDHCPAdmin=0.9.5-beta.

     
  • Amit

    Amit - 2013-05-17

    Hi, I am using phpDHCPAdmin-0.9.5-beta and configured as per the instruction in README file.
    but I am also facing the above mentioned error. Also I have configured corrected hostname

    $defined['hostname'] = "192.168.1.2:8080";

    in index.php file, I have also changed "if" condition to forcefully match to check whether the problem is with the hostname, But it still doesn't solve my problem. Pls find below error

    [Fri May 17 17:09:34 2013] [error] [client 192.168.1.2] PHP Notice: Undefined variable: err in /home/phpDHCPAdmin-0.9.5-beta/index.php on line 262
    [Fri May 17 17:09:34 2013] [error] [client 192.168.1.2] PHP Fatal error: Call to a member function GenerateErrorLink() on a non-object in /home/phpDHCPAdmin-0.9.5-beta/index.php on line 262
    [Fri May 17 17:09:34 2013] [error] [client 192.168.1.2] File does not exist: /home/phpDHCPAdmin-0.9.5-beta/favicon.ico

     
  • jas

    jas - 2013-05-17

    Try the following:

    $defined['hostname'] = "http://192.168.1.2:8080";

    Or if your using HTTPS...

    $defined['hostname'] = "https://192.168.1.2:8080";

    I should probably rewrite this software or the documentation as it seems most ommit this configuration option or configure it incorrectly.

    I should also note that while at the time of initial development of this software great care was taken to prevent SQL, XSS & CSRF attacks. However, it has been close to five years that any real updates to the code base has been done to address new attack vectors.

    I would strongly advice against placing this service on a forward facing internet connection. The use of ACL's within the web server & allowed ranges is highly advised. For more information on how to perform this configuration I would suggest reading the Apache ACL documentation @ http://httpd.apache.org/docs/2.2/howto/access.html (if you aren't aware of it already).

    Based on the NAT address & port forwarding you are using, I am assuming you are merely evaluating this product, but just as a suggestion until I can find time to rewrite the software to bring it up to date.

     

    Last edit: jas 2013-05-17

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.