this is driving me crazy some one help im stuck
Warning: The magic method __unset() must have public visibility and cannot be static in /var/www/html/avantfax/includes/FormRules.php on line 461 Warning: The magic method __isset() must have public visibility and cannot be static in /var/www/html/avantfax/includes/FormRules.php on line 472 Warning: The magic method __get() must have public visibility and cannot be static in /var/www/html/avantfax/includes/FormRules.php on line 486 Warning: The magic method __set() must have public visibility and cannot be static in /var/www/html/avantfax/includes/FormRules.php on line 507 Warning: The magic method __unset() must have public visibility and cannot be static in /var/www/html/avantfax/includes/AFUserAccount.php on line 754 Warning: The magic method __isset() must have public visibility and cannot be static in /var/www/html/avantfax/includes/AFUserAccount.php on line 767 Warning: The magic method __get() must have public visibility and cannot be static in /var/www/html/avantfax/includes/AFUserAccount.php on line 783 Warning: The magic method __set() must have public visibility and cannot be static in /var/www/html/avantfax/includes/AFUserAccount.php on line 800 Warning: 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/New_York' for 'EDT/-4.0/DST' instead in /var/www/html/avantfax/includes/Smarty/Smarty_Compiler.class.php on line 400 Fatal error: Smarty error: unable to write to $compile_dir '/var/www/html/avantfax/includes/templates/main_theme/templates_c'. Be sure $compile_dir is writable by the web server user. in /var/www/html/avantfax/includes/Smarty/Smarty.class.php on line 1113
this is what i am using
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. Maybe someone else is stuck too with this situation as I was since I upgraded my server to PHP 5.4. So, for the community and mutual benefit I will share my fix (I'm not a programmer, just wanted to share it since it worked for me, it can be useful for others):
GENERAL ANNOYANCE: "PHP Strict Standards" and "PHP Warnings" error messages for avantfax
One option is trying to disable the STRICT reports in error for PHP.ini (it was advised in some forums),
However, I tried to fix the code by myself as the following instructions (also found in forums):
(Note: Before making any changes, I did backups of the files being edited. Do it for yours too, in case of breaking something)
(Note 2: review your paths. My solution includes customized paths where I installed the scripts, so be careful with just "copy and paste")
Files with the error to be FIXED:
PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /var/www/html/fax/includes/SQL.php on line 76, referer: https://xxxxxxxxxx.com/fax/outbox.php
PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /var/www/html/fax/includes/MDBO.php on line 264, referer: https://xxxxxxxxxxx.com/fax/admin/admin.php
ERROR 2): "Only variables should be assigned by reference in"
PHP Strict Standards: Only variables should be assigned by reference in /var/www/html/fax/includes/SQL.php on line 74, referer: https://xxxxxxxxxxxxxx.com/fax/archive.php
PHP Strict Standards: Only variables should be assigned by reference in /var/www/html/fax/includes/SQL.php on line 87, referer: https://xxxxxxxxxxxx.com/fax/archive.php
PHP Strict Standards: Only variables should be assigned by reference in /var/www/html/faxx/includes/SQL.php on line 153, referer: https://xxxxxxxxxxxx.com/fax/archive.php
PHP Warning: The magic method set() must have public visibility and cannot be static in /var/www/html/fax/includes/AFUserAccount.php on line 800, referer: https://xxxxxxxxxxxx.com/fax/outbox.php
PHP Warning: The magic method unset() must have public visibility and cannot be static in /var/www/html/fax/includes/FormRules.php on line 461, referer: https://xxxxxxxxxxxx.com/fax/outbox.php
PHP Warning: The magic method isset() must have public visibility and cannot be static in /var/www/html/fax/includes/FormRules.php on line 472, referer: https://xxxxxxxxxxxx.com/fax/outbox.php
PHP Warning: The magic method get() must have public visibility and cannot be static in /var/www/html/fax/includes/FormRules.php on line 486, referer: https://xxxxxxxxxxxx.com/fax/outbox.php
PHP Warning: The magic method set() must have public visibility and cannot be static in /var/www/html/fax/includes/FormRules.php on line 507, referer: https://xxxxxxxxxxxx.com/fax/outbox.php
PHP Warning: The magic method unset() must have public visibility and cannot be static in /var/www/html/fax/includes/AFUserAccount.php on line 754, referer: https://xxxxxxxxxxxx.com/fax/archive.php
PHP Warning: The magic method isset() must have public visibility and cannot be static in /var/www/html/fax/includes/AFUserAccount.php on line 767, referer: https://xxxxxxxxxxxx.com/fax/archive.php
PHP Warning: The magic method get() must have public visibility and cannot be static in /var/www/html/fax/includes/AFUserAccount.php on line 783, referer: https://xxxxxxxxxxxx.com/fax/archive.php
ERROR 4) PHP Deprecated: Function split() is deprecated in....
and also this one: preg_split(): Empty regular expression in.........
That's it Folks. No more error messages, and not needed to disabled WARNING in php.ini (which could lead to bypass some REAL errors you may have with other scripts)
Any comment or improvement, let us know.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
this is what i am using
PHP 5.3.3 (cli) (built: Nov 22 2011 20:43:05)
Copyright (C) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (C) 1998-2010 Zend Technologies
with Zend Guard Loader v3.3, Copyright (C) 1998-2010, by Zend Technologies
Please anyone im still stuck on this….please!
ANY ONE PLEASE!!!!
Hi. Maybe someone else is stuck too with this situation as I was since I upgraded my server to PHP 5.4. So, for the community and mutual benefit I will share my fix (I'm not a programmer, just wanted to share it since it worked for me, it can be useful for others):
GENERAL ANNOYANCE: "PHP Strict Standards" and "PHP Warnings" error messages for avantfax
One option is trying to disable the STRICT reports in error for PHP.ini (it was advised in some forums),
However, I tried to fix the code by myself as the following instructions (also found in forums):
(Note: Before making any changes, I did backups of the files being edited. Do it for yours too, in case of breaking something)
(Note 2: review your paths. My solution includes customized paths where I installed the scripts, so be careful with just "copy and paste")
ERROR 1) "Non-static method PEAR::isError()"
Helpful posts for reviewing:
http://pear.php.net/bugs/bug.php?id=18254
http://forum.status.net/discussion/1575/after-i-install-the-statusnet-with-xampp-errors-show-like-this-in-the-home
http://forums.devshed.com/php-development-5/non-static-method-db-connect-should-not-be-called-statically-462291.html
Fixed tryping @ before function PEAR.
Files with the error to be FIXED:
PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /var/www/html/fax/includes/SQL.php on line 76, referer: https://xxxxxxxxxx.com/fax/outbox.php
PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /var/www/html/fax/includes/MDBO.php on line 264, referer: https://xxxxxxxxxxx.com/fax/admin/admin.php
ERROR 2): "Only variables should be assigned by reference in"
Helpful posts for reviewing:
http://stackoverflow.com/questions/11777908/strict-standards-only-variables-should-be-assigned-by-reference-php-5-4
Fixed Deleting the "&" symbol
// $this->db =& MDB2::singleton($dsn, $options);
$this->db = MDB2::singleton($dsn, $options);
PHP Strict Standards: Only variables should be assigned by reference in /var/www/html/fax/includes/SQL.php on line 74, referer: https://xxxxxxxxxxxxxx.com/fax/archive.php
PHP Strict Standards: Only variables should be assigned by reference in /var/www/html/fax/includes/SQL.php on line 87, referer: https://xxxxxxxxxxxx.com/fax/archive.php
PHP Strict Standards: Only variables should be assigned by reference in /var/www/html/faxx/includes/SQL.php on line 153, referer: https://xxxxxxxxxxxx.com/fax/archive.php
PHP Strict Standards: Only variables should be assigned by reference in /var/www/html/fax/includes/SQL.php on line 194, referer: https://xxxxxxxxxxxx.com/fax/outbox.php
PHP Strict Standards: Only variables should be assigned by reference in /var/www/html/fax/includes/SQL.php on line 194, referer: https://xxxxxxxxxxxx.com/fax/outbox.php?kill=576
Error 3) "The magic method __get() must have public visibility "
Helpful topics:
http://stackoverflow.com/questions/8231090/why-do-php-magical-methods-have-to-be-public
http://stackoverflow.com/questions/3832624/php-warning-magic-method-set-class-xmlhttprequest-php
http://framework.zend.com/issues/browse/ZF-3978
Fixed changing "private" with "public"
PHP Warning: The magic method set() must have public visibility and cannot be static in /var/www/html/fax/includes/AFUserAccount.php on line 800, referer: https://xxxxxxxxxxxx.com/fax/outbox.php
PHP Warning: The magic method unset() must have public visibility and cannot be static in /var/www/html/fax/includes/FormRules.php on line 461, referer: https://xxxxxxxxxxxx.com/fax/outbox.php
PHP Warning: The magic method isset() must have public visibility and cannot be static in /var/www/html/fax/includes/FormRules.php on line 472, referer: https://xxxxxxxxxxxx.com/fax/outbox.php
PHP Warning: The magic method get() must have public visibility and cannot be static in /var/www/html/fax/includes/FormRules.php on line 486, referer: https://xxxxxxxxxxxx.com/fax/outbox.php
PHP Warning: The magic method set() must have public visibility and cannot be static in /var/www/html/fax/includes/FormRules.php on line 507, referer: https://xxxxxxxxxxxx.com/fax/outbox.php
PHP Warning: The magic method unset() must have public visibility and cannot be static in /var/www/html/fax/includes/AFUserAccount.php on line 754, referer: https://xxxxxxxxxxxx.com/fax/archive.php
PHP Warning: The magic method isset() must have public visibility and cannot be static in /var/www/html/fax/includes/AFUserAccount.php on line 767, referer: https://xxxxxxxxxxxx.com/fax/archive.php
PHP Warning: The magic method get() must have public visibility and cannot be static in /var/www/html/fax/includes/AFUserAccount.php on line 783, referer: https://xxxxxxxxxxxx.com/fax/archive.php
ERROR 4) PHP Deprecated: Function split() is deprecated in....
and also this one: preg_split(): Empty regular expression in.........
Helpful topics:
http://stackoverflow.com/questions/3453915/deprecated-function-split-is-deprecated-how-to-rewrite-this-statement
http://www.webmasterworld.com/php/4459233.htm
Replace split with "preg_split" and " " with "/ /" :
PHP Deprecated: Function split() is deprecated in /var/www/html/fax/includes/functions.php on line 593, referer: https://xxxxxxxxxxxx.com/fax/sendfax.php
Original: $output = split(" ", $result);
New: $output = preg_split("/ /", $result);
That's it Folks. No more error messages, and not needed to disabled WARNING in php.ini (which could lead to bypass some REAL errors you may have with other scripts)
Any comment or improvement, let us know.