Welcome Guest, Not a member yet? Register   Sign In
few errors with php 5.3 upgrade
#1

[eluser]Unknown[/eluser]
if (ereg("/$", $pref) === FALSE)

Error on this line of code


also this line

$DB =& new $driver($params);


the rest are

Severity: User Error

Message: Smarty error: unable to write to $cache_dir '/home/offers/public_html/application/libraries/smartyCore/cache'. Be sure $cache_dir is writable by the web server user.

Filename: smartyCore/Smarty.class.php

Line Number: 1095


and last is


Severity: Warning

Message: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Halifax' for 'ADT/-3.0/DST' instead

Filename: smartyCore/Smarty_Compiler.class.php

Line Number: 400


Don't know if their are any easy fixes for this or if i can just change the code to work with the new 5.3 i fixed a few with google already any help would be appreciated.
#2

[eluser]WanWizard[/eluser]
ereg() has been depricated in favor of preg_match(). In PHP5+, you should not assign objects by reference, this is by default (don't use the & operator). PHP 5.3 also requires a timezone to be set in php.ini.

This looks like 'old' PHP4 style code, so you'll have to update it.

The Smarty error is a disk access error, so check your rights.

As usual, before you upgrade your environment, be sure to read all related documentation. If you had done that, none if this would have been new to you, and you could have taken precautions.
#3

[eluser]Unknown[/eluser]
it is for a script that needs to be updated


I can set a timezone but the first 2 i need to know if it can be changed to work without much editing of the current code as I cannot code php.




Theme © iAndrew 2016 - Forum software by © MyBB