Forums / General Questions / Admin works fine but blank page for website

Admin works fine but blank page for website

Locked

Views: 1,856

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
31 Jan 2008, 12:32 PM
#1
lou avatar

lou

New Zenner

Join Date:
Dec 2007
Posts:
21
Plugin Contributions:
0

Admin works fine but blank page for website

I created a sub directory on my server and set up a new zencart in it with it's own database, everything was fine.

Then, I uploaded all of the files from my local zencart to the directory (using FileZilla),
replaced the original configure.php files in /includes/configure.php and /admin/includes/configure.php,
dropped all of the tables in the db on the server,
restored the db with the backup from my local server,
now..........

I can access the admin panel of the sub directory, and everything seems to work properly, it shows all the products etc.

BUT, when I go to the actual page for the cart, all I get is a blank page .......??

I don't even know where to start looking ........

Can anyone point me in the right direction?

31 Jan 2008, 12:54 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin works fine but blank page for website

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

31 Jan 2008, 1:45 PM
#3
lou avatar

lou

New Zenner

Join Date:
Dec 2007
Posts:
21
Plugin Contributions:
0

Re: Admin works fine but blank page for website

These are the errors in the debug log (thanks for putting me onto that!)

[31-Jan-2008 08:11:38] PHP Warning: require(DIR_WS_TEMPLATEStemplate_default/common/html_header.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/xxxxxxxx/public_html/sub/index.php on line 43
[31-Jan-2008 08:11:38] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'DIR_WS_TEMPLATEStemplate_default/common/html_header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxxxx/public_html/sub/index.php on line 43

Now, am I crazy, or is the constant incorrectly appended to the rest of the filename?

This is the code from the index.php in the sub directory

require($template->get_template_dir('html_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/html_header.php');

And this is the code from \includes\init_includes\init_templates.php

  define('DIR_WS_TEMPLATE', DIR_WS_TEMPLATES . $template_dir . '/');

According to winmerge, init_templates.php is identical on both servers.

To me, it looks fine, so what am I missing??

31 Jan 2008, 2:30 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin works fine but blank page for website

It's not the definition of DIR_WS_TEMPLATE that is the problem, but rather DIR_WS_TEMPLATES. This is defined in includes/configure.php. I'd take a look at that definition and also the lines before it, in case there's something wrong with them which is causing problems.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

31 Jan 2008, 2:57 PM
#5
lou avatar

lou

New Zenner

Join Date:
Dec 2007
Posts:
21
Plugin Contributions:
0

Re: Admin works fine but blank page for website

Ugh!! Of course, you hit the nail on the head!

do you know how many times I'd looked at that file? Even compared the two in Winmerge and thought the only differences were layout and db specific stuff!

turns out that there were about 6 defines that I have on my local server config and not on that one - how did that happen?

well, it's day 3 and very little sleep, not to mention it's now 1am - thanks so much for your help kuroi, I might have an early night tonight!