Results 1 to 10 of 21

Hybrid View

  1. #1
    Join Date
    Mar 2017
    Posts
    2
    Plugin Contributions
    0

    Default PHP Fatal error: Call to a member function read () on a non-object in \ zc_install \

    site URL: www.toscanadamare.eu ZC version: 1.5.5 , list of plugins, PHP version 5.6.3,

    hi, I am installing the 1.5.5 zen cart version and the installer don't start, this is the error:
    PHP Fatal error: Call to a member function read () on a non-object in \ zc_install \ includes \ classes \ class.systemChecker.php on line 600
    This is a portion of the class.systemChecker.php file containing the line 600:

    594 static function getAdminDirectoryList()
    595 {
    596 $adminDirectoryList = array();
    597
    598 $ignoreArray = array('.', '..', 'cache', 'logs', 'installer', 'zc_install', 'includes', 'testFramework', 'editors', 'extras', 'images', 'docs', 'pub', 'email', 'download', 'media');
    599 $d = @dir(DIR_FS_ROOT);
    600 while (false !== ($entry = $d->read())) {
    601 if (is_dir(DIR_FS_ROOT . $entry) && !in_array($entry, $ignoreArray))
    602 {
    603 if (file_exists(DIR_FS_ROOT . $entry . '/' . 'banner_manager.php'))
    604 {
    605 $adminDirectoryList[] = $entry;

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

    Default Re: PHP Fatal error: Call to a member function read () on a non-object in \ zc_instal

    Remove the @ in @dir on line 599 and see what the error is. I suspect it can't obtain a directory listing due to some restrictions in your server's configuration.
    .

    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
    Mar 2017
    Posts
    2
    Plugin Contributions
    0

    Default Re: PHP Fatal error: Call to a member function read () on a non-object in \ zc_instal

    I removed @ at 599 line and this is the error
    PHP Warning: dir(D:\inetpub\webs\toscanadamareeu\,D:\inetpub\webs\toscanadamareeu\): Access is denied. (code: 5) in D:\inetpub\webs\toscanadamareeu\zc_install\includes\classes\class.systemChecker. php on line 599
    PHP Warning: dir(D:\inetpub\webs\toscanadamareeu\): failed to open dir: Permission denied in D:\inetpub\webs\toscanadamareeu\zc_install\includes\classes\class.systemChecker. php on line 599
    PHP Fatal error: Call to a member function read() on boolean in D:\inetpub\webs\toscanadamareeu\zc_install\includes\classes\class.systemChecker. php on line 600

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PHP Fatal error: Call to a member function read () on a non-object in \ zc_instal

    Probably best to report this issue to your hosting company, because they're the ones who control permission for that. They can fix the Access Denied issue.
    Most likely your user account doesn't have the usual required permissions to allow scanning the list of files in the directory.
    .

    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.

  5. #5

    Default Re: PHP Fatal error: Call to a member function read () on a non-object in \ zc_instal

    I have a similar problem when trying to upgrade to ver 1.5.5 on an IIS server. The root of this problem in my case is, I believe, the DIR_FS_ROOT constant which is derived somehow from the DIR_FS_CATALOG. The logs show this error report:
    [27-Jun-2018 17:26:03 America/Los_Angeles] PHP Fatal error: Uncaught Error: Call to a member function read() on boolean in
    C:\HostingSpaces\ergonicauser1\ergonica.com\newroot\zc_install\includes\classes\ class.systemChecker.php:607
    Stack trace:#0 C:\HostingSpaces\ergonicauser1\ergonica.com\newroot\zc_install\includes\modules\ pages\index\header_php.php(12): systemChecker::getAdminDirectoryList()#1 C:\HostingSpaces\ergonicauser1\ergonica.com\newroot\zc_install\index.php(36): require('C:\\HostingSpace...')#2 {main} thrown in C:\HostingSpaces\ergonicauser1\ergonica.com\newroot\zc_install\includes\classes\ class.systemChecker.php on line 607

    In configure.php I define DIR_FS_CATALOG thusly: define('DIR_FS_CATALOG', '/C:/HostingSpaces/ergonicauser1/ergonica.com/newroot/');
    In my research it looks like the CATALOG and ROOT should be the same, but I have not been able to find any place in the code where this is defined. Somehow the functions create the DIR_FS_ROOT as ‘C:\\HostingSpace...’ . I have even tried to define it by adding code in the configure.php files, but it doesn’t work. The installation fails because it is looking for a folder that does not exist.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: PHP Fatal error: Call to a member function read () on a non-object in \ zc_instal

    Is your DIR_FS_CATALOG really set as define('DIR_FS_CATALOG', '/C:/HostingSpaces/ergonicauser1/ergonica.com/newroot/');? What happens if you remove that leading /?

    The \\ characters that you're seeing are due to the fact that you're running on a Windows server, so the forward-slashes in the directory tree are changed to back-slashes, which need to be 'escaped' for use, thus the double-backslash.

 

 

Similar Threads

  1. Replies: 15
    Last Post: 27 Sep 2013, 05:29 PM
  2. v139h PHP Fatal error: Call to a member function add_session() on a non-object
    By absoluteblock in forum General Questions
    Replies: 5
    Last Post: 27 Apr 2013, 01:23 AM
  3. Replies: 5
    Last Post: 31 Jul 2012, 11:33 AM
  4. Replies: 6
    Last Post: 4 Jun 2007, 11:42 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