Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Smart Search and PHP7

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #11  
Old 02-22-2017, 03:08 AM
 
mattstyle2 mattstyle2 is offline
 

Advanced Member
  
Join Date: Apr 2015
Posts: 54
 

Default Re: Smart Search and PHP7

Quote:
Originally Posted by Pop Electronics
Thanks, whis also works when still on php 5.6 but upgrading to X-Cart 4.7.7, I did not have to change mysql_query though for just 4.7.7 on php 5.5.


yes, the mysql stuff is removed in php 7 so 5.5, 5.6 will work great..
__________________
4.7.7.
php7.1, AWS RDS database
memcache, reboot theme AWS EC2 load balancer, 2 c5.large instances CDSEO Shop By Filters,
AC onepage checkout and checkout tools,
altercart cash rewards, bcse DPM for paypal
Reply With Quote
  #12  
Old 06-14-2017, 02:39 PM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 900
 

Default Re: Smart Search and PHP7

tried this on 4.7.8 version (checkout one on php7), made all the modifications, and i get a error when adding to cart and then a blank page.
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
  #13  
Old 06-14-2017, 04:49 PM
 
mattstyle2 mattstyle2 is offline
 

Advanced Member
  
Join Date: Apr 2015
Posts: 54
 

Default Re: Smart Search and PHP7

Quote:
Originally Posted by Dougrun
tried this on 4.7.8 version (checkout one on php7), made all the modifications, and i get a error when adding to cart and then a blank page.

Did you do the last part?

also, there's a few @mysql_query functions in the Checkout_One code you need to change to @db_query

find those..
cd modules/Checkout_One
grep -r --include="*.php" "@mysql_query"

find all instances and change to "@db_query"
there's not that many.
__________________
4.7.7.
php7.1, AWS RDS database
memcache, reboot theme AWS EC2 load balancer, 2 c5.large instances CDSEO Shop By Filters,
AC onepage checkout and checkout tools,
altercart cash rewards, bcse DPM for paypal
Reply With Quote
  #14  
Old 06-15-2017, 07:17 AM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 900
 

Default Re: Smart Search and PHP7

yes, I did the grep command and fixed the files it mentioned. Maybe 4.7.8 changed something.
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
  #15  
Old 06-15-2017, 09:03 AM
 
mattstyle2 mattstyle2 is offline
 

Advanced Member
  
Join Date: Apr 2015
Posts: 54
 

Default Re: Smart Search and PHP7

Quote:
Originally Posted by Dougrun
yes, I did the grep command and fixed the files it mentioned. Maybe 4.7.8 changed something.

oh yeah,.. not sure.. I'm on 4.7.7 still.. check the XC php and db error logs to see if you find anything when that blank screen issue appears..

The @mysql_query or @db_query thing is elusive and suppresses errors so you may want to remove the @ operator if you don't see anything..


-Matt
__________________
4.7.7.
php7.1, AWS RDS database
memcache, reboot theme AWS EC2 load balancer, 2 c5.large instances CDSEO Shop By Filters,
AC onepage checkout and checkout tools,
altercart cash rewards, bcse DPM for paypal
Reply With Quote
  #16  
Old 06-15-2017, 09:57 AM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 900
 

Default Re: Smart Search and PHP7

I got this in the php error log file..
Code:
[15-Jun-2017 17:53:12 UTC] PHP Fatal error: Uncaught Error: Call to undefined function dl() in /home/xxx/public_html/store478up/modules/Checkout_One/checkout_one_ajax.php:2 Stack trace: #0 /home/xxx/public_html/store478up/cart.php(69): require() #1 {main} thrown in /home/xxx/public_html/store478up/modules/Checkout_One/checkout_one_ajax.php on line 2 [15-Jun-2017 17:53:15 UTC] PHP Fatal error: Uncaught Error: Call to undefined function dl() in /home/xxx/public_html/store478up/modules/Checkout_One/checkout_one_ajax.php:2 Stack trace: #0 /home/xxx/public_html/store478up/cart.php(69): require() #1 {main} thrown in /home/xxx/public_html/store478up/modules/Checkout_One/checkout_one_ajax.php on line 2

I don't have php7 ioncube loader installed so that may be the cause.
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
  #17  
Old 06-15-2017, 10:32 AM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 900
 

Default Re: Smart Search and PHP7

I reprovisioned my easyapache, added ioncube for php7, now i get this:

Code:
[15-Jun-2017 18:30:08 UTC] PHP Fatal error: The file /home/xxx/public_html/store478up/modules/Checkout_One/checkout_one_ajax.php was encoded by the ionCube Encoder for PHP 5.0 and cannot run under PHP 7.0. Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0 [15-Jun-2017 18:30:12 UTC] PHP Fatal error: The file /home/xxx/public_html/store478up/modules/Checkout_One/checkout_one_ajax.php was encoded by the ionCube Encoder for PHP 5.0 and cannot run under PHP 7.0. Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
  #18  
Old 06-15-2017, 11:08 AM
 
mattstyle2 mattstyle2 is offline
 

Advanced Member
  
Join Date: Apr 2015
Posts: 54
 

Default Re: Smart Search and PHP7

Quote:
Originally Posted by Dougrun
I reprovisioned my easyapache, added ioncube for php7, now i get this:

Code:
[15-Jun-2017 18:30:08 UTC] PHP Fatal error: The file /home/xxx/public_html/store478up/modules/Checkout_One/checkout_one_ajax.php was encoded by the ionCube Encoder for PHP 5.0 and cannot run under PHP 7.0. Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0 [15-Jun-2017 18:30:12 UTC] PHP Fatal error: The file /home/xxx/public_html/store478up/modules/Checkout_One/checkout_one_ajax.php was encoded by the ionCube Encoder for PHP 5.0 and cannot run under PHP 7.0. Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0

send me a PM with your email address and I can send you something that will fix that..
__________________
4.7.7.
php7.1, AWS RDS database
memcache, reboot theme AWS EC2 load balancer, 2 c5.large instances CDSEO Shop By Filters,
AC onepage checkout and checkout tools,
altercart cash rewards, bcse DPM for paypal
Reply With Quote
  #19  
Old 06-15-2017, 12:20 PM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 900
 

Default Re: Smart Search and PHP7

I replaced all the module files (except skin dir files), and now get this:
Code:
[15-Jun-2017 20:17:51 UTC] PHP Fatal error: Cannot use "self" when no class scope is active in /home/xxx/public_html/store478up/modules/Checkout_One/checkout_one_functions.php on line 793
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
  #20  
Old 06-15-2017, 03:15 PM
 
mattstyle2 mattstyle2 is offline
 

Advanced Member
  
Join Date: Apr 2015
Posts: 54
 

Default Re: Smart Search and PHP7

is 793 this line:
$dirs[] = array_merge($file, $this->dirstats($filename));

if so go up to the top of the function and set $adv=false; so it doesn't execute the 'this->' statement..

up at 755 is the function declaration
Code:
function checkout_listfiles_nr($dir, $dirs_only=false, $adv=false){ $adv=false; $dirs = $files = array();
-- see what I did there? put the $adv=false; statement under the function declaration.

let me know if that helps.

regards,

Matt
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:14 PM.

   

 
X-Cart forums © 2001-2020