bsmither Posted March 26, 2017 Share Posted March 26, 2017 My bad: From: echo realpath(dirname(__FILE__)."<br/>"; To: echo realpath(dirname(__FILE__))."<br/>"; My programmer's editor is configured to not auto-complete delimiters. Thus, sometimes I forget to match opening and closing parens. Quote Link to comment Share on other sites More sharing options...
PeteW1959 Posted March 26, 2017 Author Share Posted March 26, 2017 test1test3test4template: login.php template_directories: Array ( [0] => /var/sites/s/shop.whitbygothweekend.co.uk/public_html/admin_XXXXXX/skins/default/ ) /var/sites/s/shop.whitbygothweekend.co.uk/public_html /var/sites/s/shop.whitbygothweekend.co.uk/public_html Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 26, 2017 Share Posted March 26, 2017 Nothing from the try/catch??? How unfortunate. Well, this script has determined that it is sitting in /public_html/. But you say otherwise. But the error_log (re: tcp wrapper) says this so. Are you sure you are not in /public_html/? Quote Link to comment Share on other sites More sharing options...
PeteW1959 Posted March 26, 2017 Author Share Posted March 26, 2017 this is a screenshot from Filezilla Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 26, 2017 Share Posted March 26, 2017 I see this, but please examine your Cpanel "Subdomains". I think the "shop" subdomain should have a Document Root of: <house icon>/shop where <house icon> is your "home directory" (as seen somewhere in Cpanel's General Information). Quote Link to comment Share on other sites More sharing options...
PeteW1959 Posted March 26, 2017 Author Share Posted March 26, 2017 It isn't a Cpanel account. This is a screenshot of the subdomains page of control panel. However I can't see how any paths can have changed; I haven't changed them, and TSO Host have confirmed that there haven't been any configuration changes in the last week. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 26, 2017 Share Posted March 26, 2017 I have not seen this control panel, so excuse the stupid questions. The Home Directory column shows a simple name (newshop, shop, etc), but how does the folder /subdomains/ come into play? Is this just "understood"? That is, when a subdomain is created, this control panel automatically creates the folder and automatically puts it in /subdomains/? Well, the storefront seems to work -- so the above line of questioning is irrelevant. So, making wild guesses: Is there anything suspicious in the "shop" site's .htaccess file? Anything suspicious in the site's globals.inc.php file? Does the term "DYNSRV" mean anything? Quote Link to comment Share on other sites More sharing options...
PeteW1959 Posted March 26, 2017 Author Share Posted March 26, 2017 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! Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 26, 2017 Share Posted March 26, 2017 I noticed that there is an /admin/ folder, as well as an /admin_xxxxx/ folder. But I can't conclude that this would matter. We need to find out where the /public_html/ is coming from when real_path() is executed. In the admin script: Find: ## Include the ini file (required) require 'ini.inc.php'; Change to: echo "Filename: ".__FILE__."<br/>"; echo "Directory: ".dirname(__FILE__)."<br/>"; echo "Path: ".realpath(dirname(__FILE__))."<br/>"; ## Include the ini file (required) require 'ini.inc.php'; This is before CubeCart does anything. The filename should be what is expected, so too the directory. Put this in the index.php script as well. For just long enough for you to see what it shows. Quote Link to comment Share on other sites More sharing options...
PeteW1959 Posted March 26, 2017 Author Share Posted March 26, 2017 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 Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 26, 2017 Share Posted March 26, 2017 Now do the same to the two script files in the shop that is working correctly. Quote Link to comment Share on other sites More sharing options...
PeteW1959 Posted March 26, 2017 Author Share Posted March 26, 2017 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. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 26, 2017 Share Posted March 26, 2017 FileZilla likely won't show it, but your hosting control panel File Manager should have some sort of indication on the folder contents pane (not the folder tree pane) about what might be redirects. Still, between the two shops, these reports indicate everything but the named specifics are the same. Did we get any "tcp wrapper" resolution? Quote Link to comment Share on other sites More sharing options...
PeteW1959 Posted March 26, 2017 Author Share Posted March 26, 2017 No, TSO Host are saying it is a CubeCart issue, however I am getting exactly the same warnings in the working store. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 26, 2017 Share Posted March 26, 2017 Is the test store that is working properly also on 6.1.5? Do they have the same plugins/mods? Quote Link to comment Share on other sites More sharing options...
PeteW1959 Posted March 26, 2017 Author Share Posted March 26, 2017 Yes, it is an exact copy I made from the live store after upgrading to 6.1.5, and besides it has been working since the upgrade (performed on 6th March); it is only sometime in the last week it has gone wrong. Quote Link to comment Share on other sites More sharing options...
PeteW1959 Posted March 26, 2017 Author Share Posted March 26, 2017 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. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 26, 2017 Share Posted March 26, 2017 Fantastic! And thank you for explaining what the issue was and how you solved it. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 26, 2017 Share Posted March 26, 2017 " I got an error when downloading the admin_XXXX folder. " Still gonna blame the hosting provider and/or the server involved. Not a CubeCart problem! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.