Jump to content

PeteW1959

Member
  • Posts

    107
  • Joined

  • Last visited

Posts posted by PeteW1959

  1. I've been checking and experimenting and have found that the 2 problems (can't access closed storefront and errors on the maintenance tab) are not connected.

    The closed store problem is connected to PHP 7.1, or more specifically to my php.ini file. The error on the maintenance tab is to do with 6.1.13 as I rolled back to 6.1.12 and all is OK. I'll try the upgrade manually when I have sorted out the closed storefront issue.

    To run PHP 7.1 on my server (TSOHost shared hosting) I have to edit a line in .htaccess from

    AddType x-httpd-php56 .php

    to 

    AddType x-httpd-php71 .php

    In addition I had to have a copy of the ioncube folder in the root of CC, and php.ini with two lines at the end of it

    zend_extension="/var/sites/w/mysite.co.uk/subdomains/shop/ioncube/ioncube_loader_lin_7.1.so"
    zend_extension_ts="/var/sites/w/mysite.co.uk/subdomains/shop/ioncube/ioncube_loader_lin_7.1_ts.so"

    With this configuration I can't access the closed storefront. I edited .htaccess and the two lines in php.ini back to 5.6, and I still can't access it. However if I delete php.ini (and I assume use the hosting provider's default settings) all is fine.

    The problem is I need the 2 lines in php.ini to be able to use PHP 7.1 with Zend so I am a bit stuck.

    How can I get my store working with PHP 7.1?

     

  2. As the title says, my storefront is closed and when I try to access it from the link on the admin control panel I just get the store closed dialog, with an error message above it:- Warning: filesize(): stat failed for /var/sites/s/shop.mysite.co.uk/public_html/cache/88711.sql.empties.cache in /var/sites/s/shop.mysite.co.uk/public_html/classes/cache/file.class.php on line 168.

    It was fine this morning, and the store is fine when not offline.

    I don't know if it is connected, but I get 5 identical error messages on the Maintenance page, but the page still loads below the messages. Message is:- Warning: Invalid argument supplied for foreach() in /var/sites/s/shop.mysite.co.uk/public_html/admin_XXxxXx/sources/maintenance.index.inc.php on line 850

    Any ideas?

  3. I've been looking into this some more, and have discovered that the value of $STORE_URL is wrong; it has the admin file name added to the store url.

    I have checked the store url in Store Settings and it is correct.

    A further bit of digging and I think the value gets assigned in classes\seo.class.php line 710:-

    $store_url = (CC_SSL) ? $GLOBALS['config']->get('config', 'ssl_url') : $GLOBALS['config']->get('config', 'standard_url');

    This is as far as I got with my limited knowledge of php. Can anyone take it from here?

  4. CubeCart is in a subdomain, not a subdirectory, and my development store (in a different subdomain) is working correctly. I am not using a shortcut, just entering the URL in the address bar.

    Both copies of global.inc.php are the same, apart from the different admin filenames and DB details, which are correct.

     

     

  5. I haven't used CC for a few months, and during that time we have changed the home site from a custom php application to Wordpress.

    I came to log in today to look at using CC again and the admin panel is in plain text. It was on 6.1.5 so I upgraded to 6.1.12 but that hasn't fixed it.

    The CC logo is showing as broken, so I looked at the image address, which doesn't look correct (exact URL and admin file names hidden!)

    http://shop.mysite.co.uk/admin_XXXXXX.php/admin_YYYYYYY/skins/default/images/logo.cubecart.png

    I have another working instance of CC and that doesn't have admin_XXXXXX.php in the address

    Any idea how to fix this?

  6. I'VE FIXED IT!!!!!

    I tried some pretty extreme experimentation to try to narrow it down. First of all I pointed the working development installation to the live DB by editing global.inc.php, and I was able to access the control panel, proving my DB is OK.

    I was then going to back up the live shop file structure to my PC and copy the development file system to the non-working shop, however I got an error when downloading the admin_XXXX folder. Turns out it was corrupt, and when Windows got hold of it, it didn't recognise it as a folder; it thought it was a file. I copied the admin_ZZZZZ folder from the working development store, renamed it and bingo, I'm in.

    Thanks for all your efforts today Brian. I know that your suggestions didn't solve it, but it eliminated an awful lot of stuff, and I have learnt loads about php/CubeCart.

  7. Output from admin script:-
     

    Filename: /var/sites/c/ccdev.whitbygothweekend.co.uk/public_html/admin_ZZZZZZ.php
    Directory: /var/sites/c/ccdev.whitbygothweekend.co.uk/public_html
    Path: /var/sites/c/ccdev.whitbygothweekend.co.uk/public_html
    
    Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/sites/c/ccdev.whitbygothweekend.co.uk/public_html/ini.inc.php on line 30

    output from index.php

    Filename: /var/sites/c/ccdev.whitbygothweekend.co.uk/public_html/index.php
    Directory: /var/sites/c/ccdev.whitbygothweekend.co.uk/public_html
    Path: /var/sites/c/ccdev.whitbygothweekend.co.uk/public_html

    I am wondering if the directory name I see from Filezilla (subdomains/shop), is an alias for shop.whitbygothweekend.co.uk/public_html.

  8. Output from admin script:-

    Filename: /var/sites/s/shop.whitbygothweekend.co.uk/public_html/admin_XXXXXX.php
    Directory: /var/sites/s/shop.whitbygothweekend.co.uk/public_html
    Path: /var/sites/s/shop.whitbygothweekend.co.uk/public_html
    
    Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/sites/s/shop.whitbygothweekend.co.uk/public_html/ini.inc.php on line 34
    
    Warning: session_start() [function.session-start.php]: Cannot send session cache limiter - headers already sent (output started at /var/sites/s/shop.whitbygothweekend.co.uk/public_html/admin_XXXXXXX.php:20) in /var/sites/s/shop.whitbygothweekend.co.uk/public_html/classes/session.class.php on line 640
    
    Warning: Cannot modify header information - headers already sent by (output started at /var/sites/s/shop.whitbygothweekend.co.uk/public_html/admin_XXXXXXX.php:20) in /var/sites/s/shop.whitbygothweekend.co.uk/public_html/classes/session.class.php on line 535
    test1test3test4template: login.php
    template_directories: Array ( [0] => /var/sites/s/shop.whitbygothweekend.co.uk/public_html/admin_XXXXX/skins/default/ )
    /var/sites/s/shop.whitbygothweekend.co.uk/public_html
    /var/sites/s/shop.whitbygothweekend.co.uk/public_html

    output from index.php

    Filename: /var/sites/s/shop.whitbygothweekend.co.uk/public_html/index.php
    Directory: /var/sites/s/shop.whitbygothweekend.co.uk/public_html
    Path: /var/sites/s/shop.whitbygothweekend.co.uk/public_html

     

  9. Yes, the control panel automatically creates a new folder in subdomains.

    .htaccess is the same for the live shop and development shop.

    global.inc.php looks OK, adminFile and adminFolder are both correct, as are the DB details (but the storefront wouldn't work if the DB details were wrong).

    I am beginning to think I need to pay for a month of CC support and let them sort this out. It is all getting way beyond my skill level!

  10. Quote

    test1test3test4template: login.php
    template_directories: Array ( [0] => /var/sites/s/shop.whitbygothweekend.co.uk/public_html/admin_XXXXXX/skins/default/ )

    I've redacted the admin folder name for security, but it is the folder name set in global.inc.php.

    However there is no such folder /var/sites/s/shop.whitbygothweekend.co.uk/public_html, CC is in the root of the subdomain and there is no public_html

  11. TSO have finally sorted the error logging out (changes needed in php.ini), and there are no errors being recorded.

    I have compared the two php info reports for my live and development stores, and they are identical.

    I have been doing some investigation, and inserted a few echo statements into the admin php file. This is the section where it is going wrong:-

    echo test1;
    if (Admin::getInstance()->is() || (isset($_GET['_g']) && $_GET['_g']=='products' && $_GET['node']=='export' && !empty($_GET['format']) && $_GET['access']==$feed_access_key && !empty($feed_access_key))) {
        echo test2;
        if (version_compare(PHP_VERSION, '5.4') >= 0) {
            error_reporting(E_ALL ^ (E_NOTICE | E_DEPRECATED | E_USER_DEPRECATED));
        } else {
            $GLOBALS['main']->setACPWarning("WARNING: PHP ".PHP_VERSION." detected. Please upgrade to PHP 5.4 or above.");
        }
        include CC_ROOT_DIR.CC_DS.'controllers'.CC_DS.'controller.admin.session.true.inc.php';
    } else {
        echo test3;
        include CC_ROOT_DIR.CC_DS.'controllers'.CC_DS.'controller.admin.session.false.inc.php';
        echo test4;
        $GLOBALS['smarty']->display('templates/'.$global_template_file['session_false']);
        echo test5;
        exit;
    }

    This is the result I get:-

    test1test3test4 

    The first if statement is evaluating as FALSE, so the ELSE clause is followed ('test2' isn't getting echoed, but 'test3' is). The first statement (include CC_ROOTDIR.CC_DS.......) is executing because echo test 4 is executing, but it doesn't get as far as executing echo test5.

    I know the basics of php, but this is beyond me. I am assuming that the first if statement is checking if I am logged in (which I am not), so the ELSE clause is executed, the include statement is executing but it is going wrong in the $GLOBALS line.

    This is getting really desperate now; I have to get orders in the post tomorrow. Ultimately I can try to get the order info direct from the DB, but that would create a considerable amount of work to produce reasonable looking documentation, but I also need to check and amend stock levels, and that looks a bit more complicated to do in the DB.

  12. TSO Host has generated an error file for me, and it is exactly the same as the one generated by Brian's method, just giving this warning:-

    Quote

    [25-Mar-2017 19:39:58 UTC] PHP Warning:  file_exists() [<a href='http://docs.php.net/manual/en/function.file-exists.php'>function.file-exists.php</a>]: Unable to find the wrapper &quot;tcp&quot; - did you forget to enable it when you configured PHP? in /var/sites/s/shop.whitbygothweekend.co.uk/public_html/classes/session.class.php on line 621

     

  13. I have discovered that there is something wrong that is specific to this installation.

    I have a duplicate installation of CC running on a different subdomain on the same host (used for testing) that is working OK. This proves that it isn't anything to do with my host's PHP installation. As far as I know if there were any differences between the two subdomains, it would be in the .htaccess files, but they are both identical.

  14. The file generated immediately after I attempt to load the admin page has only one line:

    __client|a:6:{s:10:"ip_address";s:14:"www.xxx.yyy.zzz";s:9:"useragent";s:73:"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0";s:13:"session_start";i:1490462183;s:12:"session_last";i:1490468556;s:8:"language";s:5:"en-GB";s:8:"currency";s:3:"GBP";}__system|a:2:{s:5:"token";s:32:"9e854c0bd56743433a2e899066ee795d";s:4:"back";s:56:"http://shop.whitbygothweekend.co.uk/index.php?_a=account";}__recaptcha|a:2:{s:5:"error";N;s:9:"confirmed";b:0;}

×
×
  • Create New...