Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Urgent help required.. Website all blank after editing configure.php to add SSL

Urgent help required.. Website all blank after editing configure.php to add SSL

Locked

Views: 2,052

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
22 Mar 2010, 8:57 PM
#1
hamid84 avatar

hamid84

Zen Follower

Join Date:
Feb 2007
Location:
Walsall
Posts:
223
Plugin Contributions:
0

Urgent help required.. Website all blank after editing configure.php to add SSL

Hi,

Don't know why but all of sudden my website has gone down since morning and only showing blank page.

I was trying to make changes in both configure.php file to enable ssl. That's all

I have also restored these files from previous back up but no luck. My hosting company has been very useful and provided the following error.

PHP Fatal error: Call to a member function Execute() on a non-object in public_html/includes/classes/currencies.php on line 31

I have replaced currencies.php but no luck.

My website is here

Urgent help is required please.

Thanks

22 Mar 2010, 10:18 PM
#2
hamid84 avatar

hamid84

Zen Follower

Join Date:
Feb 2007
Location:
Walsall
Posts:
223
Plugin Contributions:
0

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

I purchased static ip address for ssl... Could this be issue?

I have asked host company to change my ip address...

22 Mar 2010, 11:26 PM
#4
hamid84 avatar

hamid84

Zen Follower

Join Date:
Feb 2007
Location:
Walsall
Posts:
223
Plugin Contributions:
0

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

I have gone through so many posts but no luck.

Need quick fix:no:

22 Mar 2010, 11:52 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

There's a handy FAQ article which provides a utility to help you find out what exact errors are occurring on your site. I found it by simply searching the FAQs area for "blank page": https://www.zen-cart.com/tutorials/index.php?article=82

The debug logs that the mentioned utility will generate are likely going to point you to an error which this additional FAQ article will help you sort out: https://www.zen-cart.com/tutorials/index.php?article=87

23 Mar 2010, 12:01 AM
#6
hamid84 avatar

hamid84

Zen Follower

Join Date:
Feb 2007
Location:
Walsall
Posts:
223
Plugin Contributions:
0

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

Dr Byte,

This is what im getting from debug error logging

[22-Mar-2010 23:56:00] PHP Fatal error: Call to a member function Execute() on a non-object in /home/softhand/public_html/includes/classes/currencies.php on line 31

I am just lost

23 Mar 2010, 12:03 AM
#7
hamid84 avatar

hamid84

Zen Follower

Join Date:
Feb 2007
Location:
Walsall
Posts:
223
Plugin Contributions:
0

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

This is my currencies.php

 
<?php
/**
 * currencies Class.
 *
 * @package classes
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license [URL]http://www.zen-cart.com/license/2_0.txt[/URL] GNU Public License V2.0
 * @version $Id: currencies.php 3041 2006-02-15 21:56:45Z wilt $
 */
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}
/**
 * currencies Class.
 * Class to handle currencies
 *
 * @package classes
 */
class currencies extends base {
  var $currencies;
  // class constructor
  function currencies() {
    global $db;
    $this->currencies = array();
    $currencies_query = "select code, title, symbol_left, symbol_right, decimal_point,
                                  thousands_point, decimal_places, value
                          from " . TABLE_CURRENCIES;
    $currencies = $db->Execute($currencies_query);
    while (!$currencies->EOF) {
      $this->currencies[$currencies->fields['code']] = array('title' => $currencies->fields['title'],
      'symbol_left' => $currencies->fields['symbol_left'],
      'symbol_right' => $currencies->fields['symbol_right'],
      'decimal_point' => $currencies->fields['decimal_point'],
      'thousands_point' => $currencies->fields['thousands_point'],
      'decimal_places' => $currencies->fields['decimal_places'],
      'value' => $currencies->fields['value']);
      $currencies->MoveNext();
    }
  }
...
23 Mar 2010, 10:34 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

The $db->Execute is the statement that's triggering the error.
That can only be caused if the $db variable isn't properly initialized as a database object.
And, since $db is the database object that drives everything in Zen Cart, it doesn't make sense that it wouldn't be set unless you had something broken before it could be set.
That means backtracing everything all the way back to the first line of code, and stepping your way through everything one line at a time until you find what exactly is broken.
That'll take you months if you're not used to doing it and don't have the tools to make the process even thinkable.

Instead, I recommend you undo whatever changes you made just before the problem started happening, including any edits to your configure.php files or whatever.
And if undoing that stuff doesn't completely solve the problem, then the next logical step is to find out which files are broken by comparing everything on your server against your last known good backup from when the site was working just fine. You can use a tool like WInMerge for the actual file comparisons once you have all the files on your PC. Related article: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

23 Mar 2010, 1:51 PM
#9
hamid84 avatar

hamid84

Zen Follower

Join Date:
Feb 2007
Location:
Walsall
Posts:
223
Plugin Contributions:
0

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

My hosting company has been looking into this and suggested that if it all fails, fresh installation would be only option.

I am very much happy with new installation provided i do not lose anything. My main concerns are customers, orders, products.. That's all.

I don't want add ons because i can upload them again.

I have backed up whole database from phpmyadmin just to be on very safe side.

Now after reinstallation, would it be just fine to restore the database and have everything up and running?

Thanks

23 Mar 2010, 2:17 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

That all depends on what the real problem is.
Blindly restoring from backup could be a huge waste of time and create unnecessary risk of data loss (ie: all orders placed SINCE that backup was made).

I think your issue is PHP-based, and not database-based, hence the recommendation to verify the contents of all your PHP files by comparing them all against your known good backups.

23 Mar 2010, 3:11 PM
#11
hamid84 avatar

hamid84

Zen Follower

Join Date:
Feb 2007
Location:
Walsall
Posts:
223
Plugin Contributions:
0

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

Hi Drbyte,

Update!! I created a fresh install on my local machine, exported SQL DB from online version to local installation.

Now i can see all customers and orders and that's all i wanted.

I am just one step behind from removing complete site from domain and reinstall and then restore database as i have done on local machine.

That should resolve all issues.

I can't compare files due to not having much knowledge of php.

Any more suggestions?

23 Mar 2010, 9:51 PM
#12
hamid84 avatar

hamid84

Zen Follower

Join Date:
Feb 2007
Location:
Walsall
Posts:
223
Plugin Contributions:
0

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

Hi all, My site is now back to normal and much better than before because i did fresh installation and all junk is now removed.

I have encountered one error only. Under tools, send email i get the following error.

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as s left join gjh6_customers as c on c.customers_id = s.customers_id' at line 1
in:
[select c.customers_firstname, c.customers_lastname, s.email_address as customers_email_address from as s left join gjh6_customers as c on c.customers_id = s.customers_id ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

No idea what it is. Any fix for it please?:clap:

23 Mar 2010, 10:34 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

Sounds like you had the "newsletter subscribe" addon installed previously, and its remnants are still kicking around in your database?

23 Mar 2010, 10:37 PM
#14
hamid84 avatar

hamid84

Zen Follower

Join Date:
Feb 2007
Location:
Walsall
Posts:
223
Plugin Contributions:
0

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

Yes i had that module installed but dont want it as it does not let me send emails to non subscribers.

Best would be to reinstall and then uninstall?

23 Mar 2010, 10:45 PM
#15
hamid84 avatar

hamid84

Zen Follower

Join Date:
Feb 2007
Location:
Walsall
Posts:
223
Plugin Contributions:
0

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

DrByte, i have just installed the newsletter module and send email option is back.

Is there any fix available for not sending emails to non subscribers?

23 Mar 2010, 11:02 PM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Urgent help required.. Website all blank after editing configure.php to add SSL

That addon changes one of the records in the query_builder table to make it point to the new subscribers table added by the addon.
To undo that, you'll have to delete that record from the query_builder table manually, and put back the original version of it from a clean Zen Cart install.