Jump to content

Blank screen


dawsmich

Recommended Posts

Hi

 

I have just installed the latest version of Cubecart 5 on a new website, no previous installation.

 

I can access the admin section fine but the main site is coming up with a blank page. I contact my host to ensure there were no issues with the PHP version and I received the following response:

 

The web server error logs seem to be complaining about it can't access a file in the directory path "/var/www/vhosts/jacksfabrics.co.uk/httpdocsini.inc.php" but it doesn't exist. It appears the web sites settings may need updating to include a / before "ini.inc.php" so it will end up looking like "/var/www/vhosts/jacksfabrics.co.uk/httpdocs/ini.inc.php"

 

 

Can anyone advise what I need to change to correct the path?

 

Many thanks

 

Michael

 

Link to comment
Share on other sites

This is the relevant statement in admin.php (store admin):
require 'ini.inc.php';
 
This is the relevant statement in index.php (store front):
require dirname(__FILE__).DIRECTORY_SEPARATOR.'ini.inc.php';
 
We know that dirname(__FILE__) is working, as that gives us the /var/www/vhosts/jacksfabrics.co.uk/httpdocs portion of the path.
 
What does not seem to be working is: DIRECTORY_SEPARATOR
 
But then, the file ini.inc.php also uses DIRECTORY_SEPARATOR to do certain things -- and ini.inc.php is used by both store front and store admin code. So this is weird.
 
The relevant PHP documentation says:
The constants below are defined by this [Directory] extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
DIRECTORY_SEPARATOR (string)
 

The documentation says the Directory extension is a core part of PHP.

 

I fear there will be many problems running CubeCart if there is this problem with PHP. Please consult your host again.

 

Also, open the file index.php and find line 2. Make sure line 2 looks like the statement above.

Link to comment
Share on other sites

Hi

 

Thank you for the quick response.

 

I think there have been an issue with the install as when I have downloaded the ZIP file again from Cubecart and compared the index.php to the one on my website it is different. When I copy the new version across it works fine.

 

Kind regards

 

Michael

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.

×
×
  • Create New...