Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2010
    Posts
    14
    Plugin Contributions
    0

    Default Blank admin login page - PHP Fatal error: Call to undefined function zen_get_ip_addr

    I am upgrading from 1.3.9 to 1.5.4 (attempting to do it by the official Zen Cart method). After running zc_install when I attempted to log in to the admin area I got a blank screen. No error messages, nothing.

    Checking the mydebug log I found
    Code:
    PHP Fatal error:  Call to undefined function zen_get_ip_address() in /xxxxxxxxxxxxx[admin]/includes/init_includes/init_sessions.php on line 34
    Lines 30-37 of admin /includes/init_includes/init_sessions.php read as follows:
    PHP Code:

    /**
     * tidy up $_SERVER['REMOTE_ADDR'] before we use it anywhere else
     */
    $ipAddressArray explode(','zen_get_ip_address());
    $ipAddress = (sizeof($ipAddressArray) > 0) ? $ipAddressArray[0] : '';
    $_SERVER['REMOTE_ADDR'] = $ipAddress
    It is $ipAddressArray = explode(',', zen_get_ip_address()); which appears at line 34. When I comment out that line I am able to access my admin area and doing that has not led to any apparent problems, but since I do not understand the intent of that line and have not tried to go live I worry about unforeseen consequences. Can anyone tell me what problems may arise from commenting out that line and what I should do to fix it?

    If relevant, PHP shows as version 5.4.45 and MySQL as version 5.5.45.

    Thank you.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Blank admin login page - PHP Fatal error: Call to undefined function zen_get_ip_

    Apparently you haven't upgraded your /admin/includes/functions/general.php ... which is where that function is defined.

    Or, you've replaced the new one with an old one when installing a plugin for an older version, instead of merging the changes into it.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Oct 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: Blank admin login page - PHP Fatal error: Call to undefined function zen_get_ip_

    Quote Originally Posted by DrByte View Post
    ... replaced the new one with an old one when installing a plugin for an older version, instead of merging the changes into it.
    Exactly right, Stock by Attributes caused my problem, and I now realized that the latest version of that is reported to be incompatible with ZC 1.5.4. I think I am under control now, and appreciate the information.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Blank admin login page - PHP Fatal error: Call to undefined function zen_get_ip_

    Quote Originally Posted by batta View Post
    Exactly right, Stock by Attributes caused my problem, and I now realized that the latest version of that is reported to be incompatible with ZC 1.5.4. I think I am under control now, and appreciate the information.
    Latest version of SBA is available from https://github.com/mc12345678/Stock_...butes_Combined and *is* compatible with ZC 1.5.4.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Apr 2017
    Location
    vedchhi
    Posts
    4
    Plugin Contributions
    0

    Default Re: Blank admin login page - PHP Fatal error: Call to undefined function zen_get_ip_

    Quote Originally Posted by DrByte View Post
    Apparently you haven't upgraded your /admin/includes/functions/general.php ... which is where that function is defined.

    Or, you've replaced the new one with an old one when installing a plugin for an older version, instead of merging the changes into it.
    I have Same Issues please help me when i upgrade zencart 1.5.5x to 5e

    I AM HERE product_info
    sidebox:

    Explain
    select products_type from zen_products where products_id = '839';



    I AM HERE product_info
    sidebox:

    Explain
    select type_handler from zen_product_types where type_id = '1';



    I AM HERE product_info
    sidebox:

    Explain
    select products_type from zen_products where products_id = '842';



    I AM HERE product_info
    sidebox:

    Explain
    select type_handler from zen_product_types where type_id = '1';

 

 

Similar Threads

  1. Fatal error: Call to undefined function:
    By Spdster in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 10 May 2008, 05:17 AM
  2. Fatal error: Call to undefined function
    By Brenda in forum General Questions
    Replies: 1
    Last Post: 9 Oct 2006, 08:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR