View Single Post
  #31  
Old 07-22-2014, 12:19 PM
  cliffo4's Avatar 
cliffo4 cliffo4 is offline
 

Member
  
Join Date: Jul 2005
Location: Leicester, UK
Posts: 19
 

Default 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:
[22-Jul-2014 20:49:11 Europe/London] PHP Strict Standards: Only variables should be passed by reference in /home/user/public_html/Smarty-2.6.9/Smarty_Compiler.class.php on line 804
I have no idea where this could be and as its very vague. Any suggestions on how to start to find out what / where it is caused?


Issue 2: Seems MKTime() is depreciated:
Quote:
Note:
As of PHP 5.1.0, this parameter became deprecated. As a result, the new timezone handling features should be used instead.
This is generating the following in the log:
Code:
[21-Jul-2014 18:27:41 UTC] PHP Strict Standards: mktime(): You should be using the time() function instead in /home/user/public_html/admin/statistics.php on line 98
Seems to be 5 or so uses of MKTime() in statistics.php
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:
[19-Jul-2014 21:13:00 Europe/London] PHP Warning: include(/home/user/public_html/templates_c/%%3D^3DF^3DF7CB4F%%checkout.tpl.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in /home/user/public_html/Smarty-2.6.9/Smarty.class.php on line 1861 [20-Jul-2014 09:30:59 Europe/London] PHP Warning: readfile(/home/user/public_html/image_path) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: No such file or directory in /home/user/public_html/include/func.php on line 5124 [20-Jul-2014 14:11:48 Europe/London] PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening '/home/user/public_html/templates_c/%%70^70F^70F20BF0%%product.tpl.php' for inclusion (include_path='/home/user/public_html/include/templater:/home/user/public_html/Smarty-2.6.9/:.:/usr/lib/php:/usr/local/lib/php::.:/usr/local/php5.2.17/usr/lib/php') in /home/user/public_html/Smarty-2.6.9/Smarty.class.php on line 1861

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
__________________
X-Cart Gold 4.0.19
http://interstellarsounds.com
Reply With Quote