Jump to content

Blank page with cubecart and xampp


Pharmacy First UK
 Share

Recommended Posts

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

Link to comment
Share on other sites

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 by Pharmacy First UK
Adding more information
Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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 by Pharmacy First UK
Adding additional information
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

pic001.png

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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");

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...