Page 4 of 4 FirstFirst ... 234
Results 31 to 36 of 36
  1. #31
    Join Date
    Aug 2013
    Posts
    37
    Plugin Contributions
    0

    Default Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a

    Hi Balihr,

    Unfortunately, the server we migrated the site to does not allow external certificates to be installed. So, until we migrate again, we need to just disable it. It isn't worthwhile to pay almost $200 from the hosting company for their own SSL certificates.

    Where can I get them for free? That would be great, as I have a couple of other sites that I DO need SSL certificates for. Thanks!

    I am having a couple of other issues, after getting the SSL false to work. When I go to a product information page, and update a product (to have a quantity of zero, for example), and click save, then click update, I am given this error message:

    Fatal error: Call to undefined function usu_reset_cache_data() in##.../admin/product.php##on line##17

    I am not sure where I would define this particular function, as far as what I would place into which file.

    In addition, when I click on the MyAccount link on the cart itself, it goes to an error page that says:

    CAPTCHA Error: GD-Library does not support JPG. The CAPTCHA cannot be used!

    Where would I place a new captcha file, and are there any examples that I could use for a new file?

    Thanks in advance for your help!

  2. #32
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a

    If your host charges $200 for SSL certificates, I'm guessing you don't have Let's Encrypt as an option in your cPanel... But then again, what are you still doing with that hosting company?
    Try to Google "free ssl certificate" and you'll get plenty of results. The downside is you need to renew every 30-90 days. If your host offered Let's Encrypt, that cert would automatically renew every 90 days and you wouldn't have to worry about it ever again.
    I know there are hosts that sell SSL certs at ridiculously high prices and with margins over 1500% (no, that's not a typo), but that's a whole different topic...

    IMHO, if you don't want to bother and spend time renewing your cert every month, just grab your wallet and cash out the 5 bucks and sleep tight for a year. Or, 15 bucks for 4 years validity... Is that even worth thinking about? I'm not sure if it's against the rules to post the link, although I'm not affiliated or anything, but check ssls.com and their PositiveSSL.

    As for the rest of your problems - sorry, but I have no idea. You're using a system that has museum value and much has changed since. I'm guessing the USU error is because you're missing the functions file. Try creating a file in your admin/includes/functions/extra_functions/usu.php and put the following in that file:
    Code:
    <?php
    /**
     * Part of Ultimate URLs for Zen Cart.
     *
     * @copyright Copyright 2012 - 2015 Andrew Ballanger
     * @license http://www.gnu.org/licenses/gpl.txt GNU GPL V3.0
     */
    
    /**
     * Checks the value of the reset URL cache option. If the value is true
     * the value will be updated in the database to "false" and the URL cache reset.
     *
     * @param string $value the current value for the reset URL cache option
     * @return string the value to display for the reset URL cache option
     */
    function usu_reset_cache_data($value) {
    	global $db;
    	switch($value){
    		case 'false':
    			// Do nothing
    			break;
    		case 'true':
    			// Update the value to false to disable
    			zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => 'false'), 'update', '`configuration_key`=\'USU_CACHE_RESET\'');
    
    		default:
    			// Reset the cache
    			$db->Execute("DELETE FROM " . TABLE_USU_CACHE . " WHERE cache_name LIKE 'usu_v3_%'");
    
    	}
    
    	return 'false';
    }
    
    /**
     * Checks the value of the cPath option. If the value has been changed, the
     * new value will be saved to the database and the URL cache reset.
     *
     * @param string $value the current value for the cPath option
     * @return string the value to display for the cPath option
     */
    function usu_check_cpath_option($value) {
    	switch($value) {
    		case 'disable':
    			$value = 'off';
    			zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $value), 'update', '`configuration_key`=\'USU_CPATH\'');
    			usu_reset_cache_data('true');
    			break;
    
    		case 'enable-auto':
    			$value = substr($value, 7);
    			zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $value), 'update', '`configuration_key`=\'USU_CPATH\'');
    			usu_reset_cache_data('true');
    
    		default:
    	}
    
    	return $value;
    }
    
    /**
     * Checks the value of the URL format option. If the value has been changed, the
     * new value will checked for compatibility issues. If compatibility issues exist
     * with the category directory option the category directory option will be
     * updated to avoid issues. The new option will be saved to the database and the
     * URL cache reset.
     *
     * @param string $value the current value for the URL format option
     * @return string the value to display for the URL format option
     */
    function usu_check_url_format_option($value) {
    	switch($value) {
    		case 'enable-parent':
    			if(USU_CATEGORY_DIR == 'full') {
    				zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => 'short'), 'update', '`configuration_key`=\'USU_CATEGORY_DIR\'');
    				echo '<div><span class="alert">' . sprintf(USU_PLUGIN_WARNING_CONFIG_ADJUSTED, usu_get_configuration_title('USU_FORMAT'), usu_get_configuration_title('USU_CATEGORY_DIR'), 'short') . '</span></div>';
    			}
    		case 'enable-original':
    			// Update with the correct setting and reset the cache
    			$value = substr($value, 7);
    			zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $value), 'update', '`configuration_key`=\'USU_FORMAT\'');
    			usu_reset_cache_data('true');
    
    		default:
    	}
    
    	return $value;
    }
    
    /**
     * Checks the value of the category directory option. If the value has been
     * changed, the new value will checked for compatibility issues. If compatibility
     * issues exist with the URL format option the URL format option will be
     * updated to avoid issues. The new option will be saved to the database and the
     * URL cache reset.
     *
     * @param string $value the current value for the category directory option
     * @return string the value to display for the category directory option
     */
    function usu_check_category_dir_option($value) {
    	switch($value) {
    		case 'disable':
    			$value = 'off';
    			zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $value), 'update', '`configuration_key`=\'USU_CATEGORY_DIR\'');
    			usu_reset_cache_data('true');
    			break;
    
    		case 'enable-full':
    			if(USU_FORMAT == 'parent') {
    				zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => 'original'), 'update', '`configuration_key`=\'USU_FORMAT\'');
    				echo '<div><span class="alert">' . sprintf(USU_PLUGIN_WARNING_CONFIG_ADJUSTED, usu_get_configuration_title('USU_CATEGORY_DIR'), usu_get_configuration_title('USU_FORMAT'), 'original') . '</span></div>';
    			}
    		case 'enable-short':
    			$value = substr($value, 7);
    			zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $value), 'update', '`configuration_key`=\'USU_CATEGORY_DIR\'');
    			usu_reset_cache_data('true');
    
    		default:
    	}
    
    	return $value;
    }
    
    /**
     * Checks the value of the remove characters option. If the value has been
     * changed, the value will be updated in the database and the URL cache reset.
     *
     * @param string $value the current value for the remove characters option
     * @return string the value to display for the remove characters option
     */
    function usu_check_remove_chars_option($value) {
    	switch($value) {
    		case 'enable-non-alphanumerical':
    		case 'enable-punctuation':
    			$value = substr($value, 7);
    			zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $value), 'update', '`configuration_key`=\'USU_REMOVE_CHARS\'');
    			usu_reset_cache_data('true');
    
    		default:
    	}
    
    	return $value;
    }
    
    /**
     * Checks the value of the short words option. If the value is not an
     * integer, the value will be changed to 0.
     *
     * @param string $value the current value for the short words option
     * @return string the value to display for the short words option
     */
    function usu_check_short_words($value) {
    	if(is_int($value)) {
    		$value = '0';
    		zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $value), 'update', '`configuration_key`=\'USU_FILTER_SHORT_WORDS\'');
    		echo '<div><span class="alert">' . sprintf(USU_PLUGIN_WARNING_CONFIG_INVALID, usu_get_configuration_title('USU_FILTER_SHORT_WORDS'), $value) . '</span></div>';
    	}
    
    	return $value;
    }
    
    /**
     * Checks the value of the various URL cache options. If the value has been
     * changed, the value will be updated in the database and the URL cache reset.
     *
     * @param string $value the current value for the URL cache option
     * @return string the value to display for the URL cache option
     */
    function usu_check_cache_options($value) {
    	$temp = explode('-', $value);
    	if(sizeof($temp) < 2) $temp[] = 'global';
    	$temp[1] = strtoupper($temp[1]);
    
    	switch($temp[0]) {
    		case 'enable':
    			$value = 'true';
    			if(USU_CACHE_GLOBAL == 'false' && $temp[1] != 'GLOBAL') {
    				zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $value), 'update', '`configuration_key`=\'USU_CACHE_GLOBAL\'');
    				echo '<div><span class="alert">' . sprintf(USU_PLUGIN_WARNING_CONFIG_ADJUSTED, usu_get_configuration_title('USU_CACHE_' . $temp[1]), usu_get_configuration_title('USU_CACHE_GLOBAL')) . '</span></div>';
    				unset($text, $option_text);
    			}
    			zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $value), 'update', '`configuration_key`=\'USU_CACHE_' . $temp[1] . '\'');
    			usu_reset_cache_data('true');
    			break;
    
    		case 'disable':
    			$value = 'false';
    			if($temp[1] == 'GLOBAL') {
    				echo '<div><span class="alert">' . USU_PLUGIN_WARNING_GLOBAL_DISABLED . '</span></div>';
    			}
    			zen_db_perform(TABLE_CONFIGURATION, array('configuration_value' => $value), 'update', '`configuration_key`=\'USU_CACHE_' . $temp[1] . '\'');
    			usu_reset_cache_data('true');
    			break;
    
    		default:
    	}
    
    	return $value;
    }
    
    /**
     * Sets the HTML to display for changing the cPath option.
     *
     * @param string $value the current value for the cPath option
     * @return string the HTML to display
     */
    function usu_set_cpath_option($value) {
    	$options = array();
    	if($value == 'auto') {
    		$options = array(
    			'auto',
    			'disable'
    		);
    	}
    	else {
    		$options = array(
    			'enable-auto',
    			'off'
    		);
    	}
    	return zen_cfg_select_option($options, $value);
    }
    
    /**
     * Sets the HTML to display for changing the URL format option.
     *
     * @param string $value the current value for the URL format option
     * @return string the HTML to display
     */
    function usu_set_url_format_option($value) {
    	$options = array();
    	if($value == 'original') {
    		$options = array(
    			'original',
    			'enable-parent'
    		);
    	}
    	else {
    		$options = array(
    			'enable-original',
    			'parent'
    		);
    	}
    	return zen_cfg_select_option($options, $value);
    }
    
    /**
     * Sets the HTML to display for changing the category directory option.
     *
     * @param string $value the current value for the category directory option
     * @return string the HTML to display
     */
    function usu_set_category_dir_option($value) {
    	$options = array();
    	if($value == 'off') {
    		$options = array(
    			'off',
    			'enable-short',
    			'enable-full'
    		);
    	}
    	else if($value == 'full') {
    		$options = array(
    			'disable',
    			'enable-short',
    			'full'
    		);
    	}
    	else {
    		$options = array(
    			'disable',
    			'short',
    			'enable-full'
    		);
    	}
    	return zen_cfg_select_option($options, $value);
    }
    
    /**
     * Sets the HTML to display for changing the remove characters option.
     *
     * @param string $value the current value for the remove characters option
     * @return string the HTML to display
     */
    function usu_set_remove_chars_option($value) {
    	$options = array();
    	if($value == 'non-alphanumerical') {
    		$options = array(
    			'non-alphanumerical',
    			'enable-punctuation'
    		);
    	}
    	else {
    		$options = array(
    			'enable-non-alphanumerical',
    			'punctuation'
    		);
    	}
    	return zen_cfg_select_option($options, $value);
    }
    
    /**
     * Sets the HTML to display for changing the global cache option.
     *
     * @param string $value the current value for the global cache option
     * @return string the HTML to display
     */
    function usu_set_global_cache_option($value) {
    	$options = array();
    
    	if($value == 'true') {
    		$options = array(
    			'true',
    			'disable'
    		);
    	}
    	else {
    		$options = array(
    			'enable',
    			'false'
    		);
    	}
    
    	return zen_cfg_select_option($options, $value);
    }
    
    /**
     * Sets the HTML to display for changing the various cache options.
     *
     * @param string $value the current value for the various cache options
     * @return string the HTML to display
     */
    function usu_set_cache_options($cache, $value) {
    	$options = array();
    
    	$cache = strtolower($cache);
    	$key = 'USU_CACHE_' . strtoupper($cache);
    	if(constant($key) == 'true') {
    		$options = array(
    			'true',
    			'disable-' . $cache
    		);
    	}
    	else {
    		$options = array(
    			'enable-' . $cache,
    			'false'
    		);
    	}
    
    	return zen_cfg_select_option($options, $value);
    }
    
    /**
     * Retrieve the current configuration title stored in the database for the
     * specified configuration option.
     *
     * @param string $key the configuration key for the option
     * @param string $default text to use if the key cannot be found
     * @return string the configuration title
     */
    function usu_get_configuration_title($key, $default = null) {
    	global $db;
    
    	if($default === null) $default = $key;
    
    	$option_text = $db->Execute(
    		'SELECT `configuration_title` FROM `' . TABLE_CONFIGURATION . '` ' .
    		'WHERE `configuration_key`=\'' . $key . '\''
    	);
    	if(!$option_text->EOF) {
    		$default = $option_text->fields['configuration_title'];
    	}
    	return $default;
    }
    It's something I pulled from USU 2.215 but I have no idea if it'll work.

    Captcha error - are you sure you have GD library installed on the server?

  3. #33
    Join Date
    Aug 2013
    Posts
    37
    Plugin Contributions
    0

    Default Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a

    Hi Balihr,

    Thank you so much, the file you suggested i upload did the trick!

    As far as the captcha, we found an older file, we just had to reactivate it.

    Are you familiar with any lazy loaders that might work on this site? I see there are a few different options that work with ZC. Perhaps the "Image Handler" plugin would also add this functionality, but that seems to just reduce the image sizes. I would like a lazy loader as it could potentially reduce the load time of some of the pages that are rather image heavy. Thanks again, and thank you in advance for your suggestions

  4. #34
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a

    Image Handler is helpful because you load a resized image, so instead of loading a let's say 500 kB image, you're loading a small size version of maybe 30-50 kB. Now, on a product listing page, where you're loading 40 images, the difference is huge.

    IH doesn't add lazy loader, but can be modified to include it. However, this is up to you how to implement it. There are also numerous jQuery plugins available that can do lazy-loading, but I don't recall seeing anything ready-made for Zen Cart. I might be wrong, tho.

  5. #35
    Join Date
    Jun 2012
    Posts
    94
    Plugin Contributions
    0

    Default Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a

    We are currently on version v1.5.5a using PHP 5.6. We have our DEVELOPER site pointing to PHP 7.3 and it's working. What are the consequences of moving to PHP 7.3 and staying on ZenCart version v1.5.5a?

  6. #36
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,143
    Plugin Contributions
    11

    Default Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a

    Please only post in one thread. It confuses us old folks.

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Replies: 4
    Last Post: 7 May 2016, 05:46 PM
  2. Replies: 1
    Last Post: 31 Aug 2012, 06:35 PM
  3. v139h Upgrading PHP version from 4.4.9?
    By PudzPud in forum General Questions
    Replies: 4
    Last Post: 22 Mar 2012, 06:32 PM
  4. Upgrading PHP Version
    By kdipaolo in forum General Questions
    Replies: 2
    Last Post: 2 Mar 2012, 05:15 PM
  5. live and upgrading version on same server
    By icikite in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 4 Jan 2012, 03:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR