-
Concerned About Upgrading Server PHP with ZC version 1.3.8a
Hello,
I have ZC version 1.3.8a with a number of addons, including SEO urls, Tag Cloud, User Tracking, and a couple of others. I installed ZC without using the hosting installer, and I have not upgraded the version of ZenCart since it was installed, a number of years ago. The PHP version of my server is 5.2.17, and I am concerned about upgrading the PHP version, and that it might cause the site to not load at all. Presently, we are not using the cart purchase functions, it is being used as a display gallery.
If I was to upgrade the PHP version from 5.2.17 to 5.4 or 5.5, which are both supported by my server, would it cause the add-ons shown above, or the site itself, to stop working entirely? This has been my main concern with upgrading the PHP version (and the ZC version), is that either the site would stop loading entirely, or that the add-ons would stop working.
Since I am not using the site for people to make purchases, but I do collect user data, and users can presently still register, I would like to know what such a PHP upgrade might do to this site. Any help would be appreciated. Thank you.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
For a Zen Cart 1.3.8a site, any PHP upgrade to a version past 5.4 is going to cause your site to go down due to PHP language changes over the past 10-11 years.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
It is possible even with ZC 1.5.5f to install that version while php 5.2.17 is being used to at least get the ZC software operational and then to upgrade the php version.
As to some of the plugins, not sure about SEO URLS or tag cloud, or the other plugins (not listed), but this would be a good point to identify their real need as part of the rebuild.
The recommended method to do this type of upgrade is provided here: http://www.zen-cart.com/entry.php?3-...d-of-upgrading
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Thank you very much! I just updated the php version, and it still works.
I have a related question, though. Is there an add-on or a website that would tell me all of the add-ons that this site has? I want to upgrade, but I no longer remember what all of the add-ons I installed on the site were, and I don't want to forget any.
So, for a wordpress site, you can visit whatwpthemeisthat.com and it will tell you all of the add-ons that a
site has on it. Is there something similar for zencart?
To my knowledge, from the tools and configure menu, I have the following add-ons. I would like to know if they will all work with the latest version of zc after I have upgraded, or are there any known issues:
Snapshot
User Tracking
Search Log Admin (not sure if this is an addon)
Snapshot
SEO Urls
Google Base Feeder
Sitemap XML
Captcha
Manufacturers All
Auctions (this didn't work before with the older version, so if it doesn't work, that's no problem)
Cross Sell
Thank you so much for your help!
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Quote:
Originally Posted by
starrysky
Is there an add-on or a website that would tell me all of the add-ons that this site has?
You can get some ideas using the Mod List contribution.
https://www.zen-cart.com/downloads.php?do=file&id=2039
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
After upgrading the php version, as mentioned above in the prior thread, the site had seemed to be working. However, now, instead of loading anything on the site, it says the following error message:
Deprecated: Function set_magic_quotes_runtime() is deprecated in /includes/application_top.php on line 18
I tried to replace this file with the newer application_top file, but then the page came up simply blank (although there was no longer an error message; it was just a white page with the favicon at the top.):( Is there a simple way to resolve this problem, without having to go through the whole upgrade?
This site has a lot of addons and quite a few modified files, and we were hoping not to have to upgrade it at this time, as it may take at least a week or more to do properly:frusty:0.
Any help in fixing this issue would be greatly appreciated. :smile::smile: Thank you!
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Quote:
Originally Posted by
starrysky
I tried to replace this file with the newer application_top file, but then the page came up simply blank (although there was no longer an error message; it was just a white page with the favicon at the top.):( Is there a simple way to resolve this problem, without having to go through the whole upgrade?
THings change over the years so, your adding the newer file was sorta like putting a cummins diesel in a volkswagen.
In the original fie, you should find something like
Code:
# set_magic_quotes_runtime(0);
You can replace it with
Code:
ini_set("magic_quotes_runtime",0);
Adjust accordingly. It may be something other than a 0 before the closing parentheses.
Once you get the site working again, follow the upgrade instructions given above. You may find that most of your mods not only don't work, but aren't needed with the newer version.
@swguy 1.3.8a?
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Hi, thank you so much for your help! However, when I changed line 18 as instructed, the following error comes up when the page is loaded:
Parse error: syntax error, unexpected ';', expecting :: (T_PAAMAYIM_NEKUDOTAYIM).... on the same line in the same file as referenced above.
I am not sure what to change in order to fix this error. Does it have to do with the 0 value being changed? What are the acceptable values to change that value to? Or, is this something else? Thanks!
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Try this instead, replacing " with a single-quote (')
ini_set('magic_quotes_runtime',0);
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Thank you very much. However, now when I load the page, in firefox it is a blank white page, with the favicon in the address bar. On google chrome, it comes up as an "HTTP Error 500". I am not sure what needs to be changed at this point, if it is in the same file, or a different file? :unsure:
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
When you see a "Server 500" (or a blank white-page), check your site's /logs directory for files named myDEBUG-*.log.
That/those files will identify the source of the PHP-related issue. If you're posting the contents of a log file named myDEBUG-adm-*.log, be aware that your "secret admin directory" will need to be xxx'd out!
Update: Since you're running zc138a, there's no /logs directory ... and logs are generated only if you've installed DrByte's error-logging plugin for that old version.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Is there any other way to get this site back up and running? There are no error logs, and I don't know of a way to determine what is going wrong and why it doesn't work at this time. :huh:
Any help would be much appreciated.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
is the site is down, and there are no error logs, that means you are failing PRIOR to the ZC function that captures the errors and writes them into your logs directory.
when a site does not work, there are ALWAYS error logs.
you need to contact your host and ask them how to access the error logs for your site. you can then post that data here, and then perhaps someone can help.
without an error log, its really hard to make guesses as to what can be wrong.
best.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
... actually, on a zc138a site, it's possible that there are no logs. It was in that era that DrByte provided the first (as a plugin) "enable_error_logging.php" functionality.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Yeah, if i remember correctly the first standard log files came in 1.39 in the cache folder.
Quote:
Originally Posted by
lat9
... actually, on a zc138a site, it's possible that there are no logs. It was in that era that DrByte provided the first (as a plugin) "enable_error_logging.php" functionality.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Quote:
Originally Posted by
Design75
Yeah, if i remember correctly the first standard log files came in 1.39 in the cache folder.
Your remembrance is correct!
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
So, I was able to find the error logs file, as I had already installed the Dr Byte error logging module. I had to rename the cache folder and create a new cache folder. Then, I replaced the following files with files from the new version, based on the error logs:
includes/classes/db/mysql/query_factory.php replace with new
includes/functions/functions_general.php replace with new file
includes/functions/functions_email.php replace with new file
includes/functions/sessions.php
The front end now works, apparently completely:smile: There are a few errors still being generated, so I will be working on those as well.
However, the admin area does not work correctly. There were some errors presented on the page when it was loaded, which I fixed in the same way as above, and the admin page does load.
I had to replace one file, adm1n/includes/classes/language.php, and also repair the application_top file in the same way as instructed earlier in this thread.
Just under the first bar when the admin page loads, where it says configuration, I receive the following error message:
Fatal error: Call to undefined function zen_draw_admin_box() in adm1n/includes/boxes/catalog_dhtml.php on line 44
Is there somewhere else that error logs for the admin area might be posted to? There are no specific error messages related to the admin area in the mydebug file.
Would it be a better idea to replace the whole admin folder with a new version of the same folder? Or is there an easier way to fix this error, shown above? Or is there a simpler solution to fix the error shown above?
Again, any help would be appreciated. Thanks!
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
You may have an old version of Stock By Attributes. See if https://www.zen-cart.com/showthread....-1-3-9/page166 doesn't help.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Hi, I don't think I ever installed that particular plugin to this cart. I checked the folder where the plugin would have installed a file (based on the files I downloaded for the new version), and there is no such file there. Is it possible that this plugin, if it has never been installed, would have now become necessary?
Can you tell me please what this add-on module does? If I never installed it before, would installing it now fix the problem mentioned in my thread with regard to the admin area? Thank you!
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
You would need to check based on the version for 1.3.8 as the newer is probably much different.
The plug-in for your situation is available at https://www.zen-cart.com/downloads.php?do=file&id=202 but your version may be all the way at the end.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Hi, I am having a problem still with this same website, using the old version of ZC (1.3.8a). Back in 2018, I was able to find where enable error logging was. I cannot seem to find it now. Can someone please tell me where I would activate or deactivate this plugin?
Also, could this plugin be responsible for the database ballooning, or is there a different add-on or plugin that might be causing the database to balloon. Back in March of 2019, the size was 584MB, and in October, it was 1.9GB. This has started causing problems with our hosting provider.
Is it possible to delete the entries in the database that were generated by the log files, or would this be a different issue? Is there a way to shrink the database?
The plugins on this site are EZ PAges, Developers Toolkit, Install SQL Patches, User Tracking, Search Log Admin, Snapshot, Google Base Feeder, and Sitemap XML. Is it possible that one of these plugins can be responsible for the database ballooning? Any help would be very much appreciated. Thank you.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Your best bet would be to upgrade your store to the latest Zen Cart and upgrade your PHP at the same time. You're running very old, hackable versions of both.
Log files don't generate database entries, so that's not the cause of your database size increase. To determine where the growth is in your database, use phpMyAdmin and sort on table size (it's a column at the far right). If I had to take a wild guess, I'd say the email archive table because your store has been converted to a spam server, but that's just a guess.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Quote:
Originally Posted by
starrysky
..., User Tracking, ....
This... This thing right there... I'm putting my money on that. If you don't purge those records often, you might end up with a huuuuge table with tracking info. I just recently saw that table alone being over 5 GB, and that was less than 6 months of data...
Of course, Mr. Chief Cook and Bottle-Washer :D might also be right - if you have Email Archiving turned on, that could be it. And yes, upgrade without thinking - 1.3.8a is now 12 years old and is full of vulnerabilities and exploits.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
No no I'm changing my vote. User tracking is a great guess. But having been hacked when running 1.3.8 is a virtual certainty.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Yes, the User Tracking seems to definitely be it. When I checked the email archive table, there are 0 rows so that wasn't it.
However, I would like to know if there is a quick sql command by which I can delete all the rows in the user tracking table.
When I use the User Tracking dashboard, and I click on "purge all records more than 72 hours old," I get a confirmation message that this was done, but all rows are still in the database table, AND the user tracking data still displays on the user tracking dashboard.
When I checked the plugin page on ZC, it looks like there were bugs related to purging in this older version that weren't fixed, but were fixed in newer versions, for the newer versions of ZC only.
So, I am attempting to delete the rows through the PHPMyAdmin, but it seems to just hang and give errors when I try to delete too many manually at one time (by using check all, then the delete command, and I am only trying to delete 500 rows at a time).
Is there an sql query that I can put into the SQL query field using php myadmin that will delete all 22,823 rows (since that is clearly the issue with the database ballooning)? I am not familiar with PHPMyAdmin command, so that would be very helpful. Thank you!
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
The Search Log table also has 25,000 rows in it (!) so I want to delete those as well. Is there anywhere on the site that this search logging can be turned off?
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Quote:
Originally Posted by
starrysky
The Search Log table also has 25,000 rows in it (!) so I want to delete those as well. Is there anywhere on the site that this search logging can be turned off?
be very careful. no warranty. no going back.
in sql:
Code:
delete from TABLE_NAME;
i'm assuming you know the table names....
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Thank you very much. It turns out that the "delete records more than 72 hours old" in the user tracking module does, in fact, work. The database size went from 1.9gb to 18mb. I have deactivated this plugin for now, and the problem seems to have been resolved. Thank you again.
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Thank you very much for your help! I have one other question:
Number one, I would like to deactivate SSL for the ZC, version 1.3.8a, as the new server I migrated to does not have an SSL certificate installed (and no purchases are presently being made on the cart).
I followed instructions for doing so that I found on the forum here https://www.zen-cart.com/content.php...zen-cart-store, involving changing the admin/includes/configure.php and the includes/configure.php files, by changing the web addresses that are https to http, and setting SSL to false.
However, now the admin page gives an internal server error, and it seems to be unable to get to the login page. I would like to be able to add new items to the catalog, and there are a few items that I need to edit, so I do need access to the admin page for this website.
Thank you for your help!:smile:
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Maybe you have something in your .htaccess file that forces https and redirects all non-https requests to https?
But, why are you doing that? You can get an SSL cert for free or buy one for like $5 per year. With both options in mind, why would you go back to being without it?
-
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!
-
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?
-
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:D
-
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.
-
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?
-
Re: Concerned About Upgrading Server PHP with ZC version 1.3.8a
Please only post in one thread. It confuses us old folks.