| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12) | ||||
|
|
Thread Tools |
#31
|
|||||||||
|
|||||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Have have recently revised our code in 4.0.19 to take on all the security fixes and these updates to fix PHP 5.4. On the surface all looks OK, but in the x-errors_php.txt error log we are now seeing various issues, these first 2 were fine under PHP 5.3, the last seems to be worst or more obvious since we have started to look at the logs more:
Issue1: Alot of these (1 every 20-40 seconds Code:
Issue 2: Seems MKTime() is depreciated: Quote:
Code:
I have looked at mktime() - I understand what is happening there, but a bit lost for a viable solution to replace it. Issue 3: Now these been around since our logs go back - is this a Hack attempt? Should we be worried? Code:
I have searched to see if anyone else reported this, but cant find anything. Surely we can not be the only site to see this if it is a hack/exploit attempt? Thanks |
|||||||||
#32
|
|||||||
|
|||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
1. Can't help on this one.
2. The php manual states that mktime()'s $is_dst param is depreciated, not the entire function. So look for mktime() useage that has 7 parameters (ignore those with 6 or less). The 7th param (when used) is the depreciated $is_dst. As a cheap workaround perhaps you could try removing the offending extra param and see what happens. 3. The weird names in the templatesC directory are the compiled templates. Have you tried admin->Maintenance: Clear templates/X-Cart cache? Or maybe temporarily disable Settings->General Settings: Do not check if templates are changed (Smarty compile_check), and see if any of the related warnings are suppressed. Not sure if you have this feature in your version, so don't panic if it's missing.
__________________
Thomas / USA XCart V4.4.5 Gold XCart Mobile V1.4.12 XCart X-PDF XCart X-HotProducts AlteredCart Checkout One (One Page Checkout) BCSE Back In Stock CFL Holiday Message CFL System Message Smack Digital (WebsiteCM) Remember Anon Carts xcartmods Testimonials xcartmods reCAPTCHA for X-Cart Classic Unix, PHP 7.0 (patched 5.4). MySQL 5.6 |
|||||||
#33
|
|||||||||
|
|||||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
For Issue 1, I'm taken the folder Smarty-2.6.19 from X-Cart 4.1.12 and testing that - this seems to have stopped the issues there (I thinking that is more PHP 5.4 happy). This means editing prepare.php and smarty.php to point to the new folder.
For Issue 2, from what I can see in the logs it appears when just mktime() is used, so I have replaced that with time() and that seems to have cureced that. A quick seach through the code base shows that users.php also has an ocurrance, so I have amended that also. Quote:
I am leaning toward my paranoia of hacks and malware, but when its on the live system I will see if the copy of Smarty in Issue 1 may clear this too. |
|||||||||
#34
|
|||||||||
|
|||||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Quote:
I am unable to access the php5.3.x-patch-2010-04-12_4.1.12.tgz Please advise Thank You |
|||||||||
#35
|
|||||||||
|
|||||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
I was provided the patch by the great folks at Qualiteam, thanks!
|
|||||||||
#36
|
|||||||
|
|||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
I did the patches explained here to update a 4.1.8 store. I am having an issue where now the order id numbers are not incrementing. Each order coming in is using the previous order number and overwriting the previous order. Does anyone have any suggestions?
__________________
X-Cart Gold 4.1.8 |
|||||||
#37
|
|||||||||
|
|||||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Have you checked the MySQL tables for orders make sure integraty check is all OK?
My understanding is the number is auto generated there that XCart then reads back and uses. Might be worth just running a check / repair |
|||||||||
#38
|
|||||||
|
|||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
ok so as an update it appears the problem is related to only orders processed through our credit card processor and not other payment methods. I will contact the developer of the mod we are using.
__________________
X-Cart Gold 4.1.8 |
|||||||
#39
|
|||||||||
|
|||||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Quote:
Could you please advise: 1. How do you count 162 lines? My Notepad has 15 long lines for this file. 2. Did you change it already in this code? "req_val" =>1, "real_val"=>"", "critical"=>0) In other words, did you have "req_val" =>1 and then change it to "req_val" =>0 ? Or did you have "critical"=>1) and then changed it to "critical"=>0) ? Which one? Thanks!
__________________
X-Cart Gold - 4.7.12 |
|||||||||
#40
|
|||||||
|
|||||||
Re: PHP 5.4 compatibility for older versions of X-Cart (4.0.19; 4.1.12)
Disappointed that T-HUB won't be supporting PHP7, causing such a delay for us to launch PHP7.
__________________
X-Cart Classic 4.4.X |
|||||||
|
|
|||
X-Cart forums © 2001-2020
|