Pharmacy First UK Posted April 22, 2016 Share Posted April 22, 2016 Hi, I am building a webserver as we are migrating to a new website soon and I'm installing our current website onto an in-house webserver running xampp. All the databases and files are configured and ready for use however the homepage (index.php) is blank as is any other php file for cubecart. I have tested to see if it is a php issue by installing wordpress and wordpress works fine. As our website was tailor made and running cubecart version 4.4.4 we were unable to update the version as it would have broken our system. I'm wondering if it is a license issue or a config issue that is causing the blank screen. This is the only thing that is stopping me from completing the migration and any help on this would be much appreciated. Thank you in advance Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted April 22, 2016 Share Posted April 22, 2016 Welcome to the forums, Pharmacy First UK! Have you made the changes to 4.4.4 that take out the call to CC licensing? Quote Link to comment Share on other sites More sharing options...
Pharmacy First UK Posted April 22, 2016 Author Share Posted April 22, 2016 Thanks for the fast reply. I did ponder that but I cannot remember where that is stored. What file directory/name would that be under? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted April 22, 2016 Share Posted April 22, 2016 I'll have to search - but the directions are here on the forum. You may find it faster than I can and then reply. brb Ignore the restore to 5.2.12 part - that was post specific advice. Quote Link to comment Share on other sites More sharing options...
Pharmacy First UK Posted April 22, 2016 Author Share Posted April 22, 2016 Thanks in advance. I was searching earlier but had trouble as they stated newer versions and wasn't very clear on where the files were stored or what to do. (maybe I didn't look hard enough!) Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted April 22, 2016 Share Posted April 22, 2016 As far as I know these two 5.2.17 files should work on v4, but of course backup before trying. WRONG!!!!! Quote Link to comment Share on other sites More sharing options...
Pharmacy First UK Posted April 22, 2016 Author Share Posted April 22, 2016 My apologies, Which 2 files? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted April 22, 2016 Share Posted April 22, 2016 NO!!!!!! I told you wrong. see Quote Link to comment Share on other sites More sharing options...
Pharmacy First UK Posted April 22, 2016 Author Share Posted April 22, 2016 (edited) Unfortunately that did not work. I tried version 4.4.8 (the latest build of version 4) and it still has a blank page EDIT: Just realised that I updated the admin.php file on our live site to avoid this issue so that was already configured. Any other suggestions? Edited April 22, 2016 by Pharmacy First UK Adding more information Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted April 22, 2016 Share Posted April 22, 2016 I don't know anything at all about xampp. There are posts on here by Bsmither and Havenswift that you might get ideas from, and hopefully one of them will be on soon to be of help. Sorry I wasn't so easy to fix. Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 22, 2016 Share Posted April 22, 2016 Please create a file called ini-custom.inc.php, and have as its contents: <?php # Custom initialization commands # Filename: ini-custom.inc.php # File location: main CubeCart folder ini_set('memory_limit', '256M'); ini_set('max_execution_time', '60'); ini_set('error_log', 'error_log'); ini_set('log_errors', 'on'); ?> Place this file in CubeCart's main folder at your site. Then, edit the CC448 file ini.inc.php, near line 139, find: ## default encoding UTF-8 ini_set('default_charset','UTF-8'); //date_default_timezone_set('UTC'); Add AFTER: // Include a custom ini file, if it exists if (file_exists(CC_ROOT_DIR.'/ini-custom.inc.php')) { include CC_ROOT_DIR.'/ini-custom.inc.php'; } Save the file back to your site. When you request a page from your site, if there is a PHP error, there will be a new file in CubeCart's main folder named error_log. Examine the contents of this file. Quote Link to comment Share on other sites More sharing options...
Pharmacy First UK Posted April 25, 2016 Author Share Posted April 25, 2016 (edited) On 4/22/2016 at 9:24 PM, bsmither said: Please create a file called ini-custom.inc.php, and have as its contents: <?php # Custom initialization commands # Filename: ini-custom.inc.php # File location: main CubeCart folder ini_set('memory_limit', '256M'); ini_set('max_execution_time', '60'); ini_set('error_log', 'error_log'); ini_set('log_errors', 'on'); ?> Place this file in CubeCart's main folder at your site. Then, edit the CC448 file ini.inc.php, near line 139, find: ## default encoding UTF-8 ini_set('default_charset','UTF-8'); //date_default_timezone_set('UTC'); Add AFTER: // Include a custom ini file, if it exists if (file_exists(CC_ROOT_DIR.'/ini-custom.inc.php')) { include CC_ROOT_DIR.'/ini-custom.inc.php'; } Save the file back to your site. When you request a page from your site, if there is a PHP error, there will be a new file in CubeCart's main folder named error_log. Examine the contents of this file. Ok I tried this just now and restarted the apache before checking. Unfortunately this did not work and still showed a blank page. I checked the error log and all it states is a depreciated MYSQL error. I'm not worried about the sql error as it is only being used internally so this is not a security risk for us. Do you have any further ideas as to how this can be fixed? EDIT: After searching through a thread on apachefriends (LINK). Could it still be trying to read a license file? If so how can I change it so it either ignores the license or renew the license. Quote I have heard their licenses are server-specific, and to run on localhost you need a new license file (or whatever) - I think its free if you own the production license.A quick test for PHP/MySQL working right would be a WordPress install. Its fast and if it works right, you know its most likely not an XAMPP issue.You could even use the same database info, as during the install WP allows a 'prefix' to be set on the tables it will use -- thus easy to kill off later - and you know your database is working. EDIT 2: I have also checked ioncube to see if that was the issue and it is installed fine. I have disabled the license key and it still doesn't load. Edited April 25, 2016 by Pharmacy First UK Adding additional information Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 25, 2016 Share Posted April 25, 2016 Using CC448 (or at least, the admin.php and index.php files from CC448) dispenses with the licensing. If you copied over your existing store to the local XAMPP (but using the new files), have you examined the file /includes/global.inc.php? There is unique data in that file. Quote Link to comment Share on other sites More sharing options...
Pharmacy First UK Posted April 25, 2016 Author Share Posted April 25, 2016 5 minutes ago, bsmither said: Using CC448 (or at least, the admin.php and index.php files from CC448) dispenses with the licensing. If you copied over your existing store to the local XAMPP (but using the new files), have you examined the file /includes/global.inc.php? There is unique data in that file. I have copied it exactly over. I have attached a screenshot on the global.inc.php file Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 25, 2016 Share Posted April 25, 2016 Even though the following probably does not matter, set the $glob['storeURL'] to NOT have a trailing slash. I do not recognize $glob['storeURLs'], but that's because I am not that familiar with CC4. Remove it's trailing slash, just to be sure. Did you have SSL enabled when you copied over the database? If so, then you will need a SSL Certificate for 'localhost'. Obviously, that will be a problem. So, see this file to switch off SSL. It's for CC3 but should work with CC4. Quote Link to comment Share on other sites More sharing options...
Pharmacy First UK Posted April 25, 2016 Author Share Posted April 25, 2016 (edited) Okay I have removed the trailing slash, Also the live site does use SSL certificates but only from login/register on-wards. I have also downloaded the editconf.php file. Where does this go and do I have to make any changes to it Edited April 25, 2016 by Pharmacy First UK Adding information Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 25, 2016 Share Posted April 25, 2016 It goes in CubeCart's main folder and is called directly:www.example.com/editconf.php Make this change. From: include_once("includes/ini.inc.php"); include_once("includes/global.inc.php"); include_once("classes/db.inc.php"); $db = new db(); include_once("includes/functions.inc.php"); include_once("admin/includes/functions.inc.php"); To: require "ini.inc.php"; require "includes/global.inc.php"; require_once "classes/db.inc.php"; $db = new db(); require "includes/functions.inc.php"; require($glob['adminFolder']."/includes/functions.inc.php"); $config = fetchDbConfig("config"); Quote Link to comment Share on other sites More sharing options...
Pharmacy First UK Posted April 26, 2016 Author Share Posted April 26, 2016 Ok I tried this and this is what it loaded; Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 26, 2016 Share Posted April 26, 2016 The error, "include_once(includes/ini.inc.php)" says that you did not make the edit to that file as suggested. Or, if you did make the edit, it didn't stick. Quote Link to comment Share on other sites More sharing options...
Pharmacy First UK Posted April 26, 2016 Author Share Posted April 26, 2016 I have checked the change for the ini.inc.php file and I have attached the file below. I don't think I have missed anything Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 26, 2016 Share Posted April 26, 2016 The error, "include_once(includes/ini.inc.php)" says that you did not make the edit to editconf.php as suggested. Quote Link to comment Share on other sites More sharing options...
Pharmacy First UK Posted April 26, 2016 Author Share Posted April 26, 2016 Ok I've just changed it (sorry). Now the page loads as this: Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 26, 2016 Share Posted April 26, 2016 Didn't catch that one: Change: require_once "classes/db.inc.php"; To: require_once "classes/db/db.php"; Also, delete this line: require($glob['adminFolder']."/includes/functions.inc.php"); Quote Link to comment Share on other sites More sharing options...
Pharmacy First UK Posted April 26, 2016 Author Share Posted April 26, 2016 Ok we seem to be getting somewhere. This is the status now Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 26, 2016 Share Posted April 26, 2016 Also, delete this line: require($glob['adminFolder']."/includes/functions.inc.php"); Ignore the Deprecated warning. 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.