X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Smart Search and PHP7 (https://forum.x-cart.com/showthread.php?t=74902)

mattstyle2 02-22-2017 03:08 AM

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..

Dougrun 06-14-2017 02:39 PM

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.

mattstyle2 06-14-2017 04:49 PM

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.

Dougrun 06-15-2017 07:17 AM

Re: Smart Search and PHP7
 
yes, I did the grep command and fixed the files it mentioned. Maybe 4.7.8 changed something.

mattstyle2 06-15-2017 09:03 AM

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

Dougrun 06-15-2017 09:57 AM

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.

Dougrun 06-15-2017 10:32 AM

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


mattstyle2 06-15-2017 11:08 AM

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..

Dougrun 06-15-2017 12:20 PM

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

mattstyle2 06-15-2017 03:15 PM

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


All times are GMT -8. The time now is 02:52 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.