Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
mysql_affected_rows was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used. [Refer: https://www.php.net/manual/en/functi...cted-rows.php]
On your web server, if you have PHP Extensions mysqli ticked simply change
mysql_affected_rows($db->link)), 'back_in_stock_notifications'); to
mysqli_affected_rows($db->link)), 'back_in_stock_notifications');
at approx line 273 in \admin\includes\functions\back_in_stock_notifications_functions.php
---------------------------
environment Dev: Zen Cart 156c; Apache 2.4.33; PHP 7.3.1; MySQL 5.7.21; Windows 10
environment Test: Zen Cart 156a; Apache 2.4.29; PHP 7.2.4; MySQL 5.7.24; Linux 4.15.0
packages / add-ons:
ckeditor ; clone template 1.2.0; payment module fee; Direct bank Deposit V1.5.revised; zencart155 securepayxml (modified); ozpost v4.2.7; ceon_back_in_stock_notifications.9 (modified); export_shipping_information_V1.3.5; edit_orders-4.3.5; master password 4; admin log in as customer; ZCA bootstrap template-for-156-v2.0.0c; image checker 2.0; sales report 3.2.2; email archive manager 1-8e; zenNoncaptcha v0.5
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Good evening everyone
i speak italian sorry my english i am using google traslator,
I have a problem with the installation of this module just downloaded I arrive from an Italian version of zen cart 1.3.9H and I have updated everything to the latest Italian version 1.5.5 and I have always used this module in the old version it was all ok,
in this new version if I go to catalog -> Ceon Back in stock notification to install it it gives me a blank page with this writing WARNING: An Error occurred, please refresh the page and try again.
I downloaded the log file that I paste below:
[28-May-2020 01:02:00 Europe/Rome] Request URI: /ADMIN/back_in_stock_notifications.php, IP address: 151.20.250.123
#1 trigger_error() called at [/web/htdocs/www.miosito.com/home/includes/classes/db/mysql/query_factory.php:167]
#2 queryFactory->show_error() called at [/web/htdocs/www.miosito.com/home/includes/classes/db/mysql/query_factory.php:139]
#3 queryFactory->set_error() called at [/web/htdocs/www.miosito.com/home/includes/classes/db/mysql/query_factory.php:266]
#4 queryFactory->Execute() called at [/web/htdocs/www.miosito.com/home/ADMIN/includes/classes/class.CeonBISNInstallOrUpgrade.php:124]
#5 CeonBISNInstallOrUpgrade->_checkCreateDatabase() called at [/web/htdocs/www.miosito.com/home/ADMIN/includes/classes/class.CeonBISNInstallOrUpgrade.php:82]
#6 CeonBISNInstallOrUpgrade->CeonBISNInstallOrUpgrade() called at [/web/htdocs/www.miosito.com/home/ADMIN/back_in_stock_notifications.php:38]
[28-May-2020 01:02:00 Europe/Rome] PHP Fatal error: 1067:Invalid default value for 'date_subscribed' ::
CREATE TABLE IF NOT EXISTS
`back_in_stock_notification_subscriptions`
(
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`product_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
`customer_id` int(10) UNSIGNED DEFAULT NULL,
`subscription_code` VARCHAR(10) DEFAULT NULL,
`name` varchar(64) NOT NULL DEFAULT '',
`email_address` VARCHAR(96) DEFAULT NULL,
`date_subscribed` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
); ==> (as called by) /web/htdocs/www.miosito.com/home/ADMIN/includes/classes/class.CeonBISNInstallOrUpgrade.php on line 124 <== in /web/htdocs/www.miosito.com/home/includes/classes/db/mysql/query_factory.php on line 167
I hope I have provided all the information to be able to receive help, thank you all for your time
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Hello there,
I have been using this fantastic for a long time. I just noticed since last week I get spam signups, but there's no actual item linked, where usually it mentions the item name. I realise Captcha isn't recommended for this moduel, is there perhaps a page where it might be a blank item page or similar? Thanks in advance :-)
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Quote:
Originally Posted by
HeathenMagic
Hello there,
I have been using this fantastic for a long time. I just noticed since last week I get spam signups, but there's no actual item linked, where usually it mentions the item name. I realise Captcha isn't recommended for this moduel, is there perhaps a page where it might be a blank item page or similar? Thanks in advance :-)
Have you solved this problem? We are getting the same problem that spammers are getting onto this module to send spam emails. Care to share your thought?
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Quote:
Originally Posted by
ericwu001
Have you solved this problem? We are getting the same problem that spammers are getting onto this module to send spam emails. Care to share your thought?
No wasn't able to solve this. Unless there is a way to add captcha somehow.
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
I'm not sure if this module is being updated anymore, but I wanted to report something I'm seeing in the log files.
Apparently, with the PHP 7.x, the current module is throwing this error:
Code:
--> PHP Deprecated: Non-static method CeonEmailValidation::isValid() should not be called statically in /home/userdir/public_html/store/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php on line 78.
Not sure how to get around it. Online, it talks about having to call the class function like this: $CeonEmailValidation->get(isValid()); However, I don't know if that is correct, or if I should just go around changing the code all willy-nilly!
Any workaround for adapting the module to be compatible with this deprecated code structure?
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Just add public static to the functions in the class.CeonEmailValidation
public static function isValid($email)
public static function isHeaderInjection($header)
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
One of my clients has started getting spam signups on this too. I'm considering a few options - maybe limiting it to logged in customers only. I'll post back with notes on what I did.
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Quote:
limiting it to logged in customers only
I don't think that would be the best option for this particular feature...in my experience it is mainly used by potential customers.