Elxis CMS Forum

Support => General => Topic started by: wbread on December 29, 2013, 13:08:21

Title: Some php error occurred after restoring site
Post by: wbread on December 29, 2013, 13:08:21
Changed to a new server, all fully downloaded to the new server, and there are errors, that's one of them.

PHP Ошибка [Warning]
URI: index.php?option=com_eforum&Itemid=39&task=reply&id=94
Path: /administrator/components/com_eforum/includes/eforum.class.php
Line: 887
Creating default object from empty value
php settings:
error_reporting   E_ERROR
.htaccess
php_flag display_errors off

what could be wrong?


Title: Re: Some php error occurred after restoring site
Post by: datahell on December 29, 2013, 13:48:01
I don't see anything wrong in this line except if you have different line numbers in that file. Do you see this error every time you reply to a post or happened only once?
Title: Re: Some php error occurred after restoring site
Post by: wbread on December 29, 2013, 14:09:22
every time

another one

PHP Ошибка [Warning]
URI: index.php?option=com_content&task=blogcategory§ionid=1&id=1&Itemid=12
Path: /includes/Core/elxis.php
Line: 3593
Parameter 2 to botAjaxVote() expected to be a reference, value given
Title: Re: Some php error occurred after restoring site
Post by: wbread on December 29, 2013, 14:18:14
most importantly, it's for all migrated sites.
Title: Re: Some php error occurred after restoring site
Post by: datahell on December 29, 2013, 14:45:07
It is due to the newer php version in your new server.
Such errors are easy to be solved, 99.99% are cause to the existence of ampersand in some functions.

To solve this specific one open file:
mambots/bot_ajaxvote.php
and change line 20 from this:
function botAjaxVote( &$row, &$params, $page=0 ) {
to this:
function botAjaxVote( &$row, $params, $page=0 ) {

Do the same for any other mambot causes you the same error.
Title: Re: Some php error occurred after restoring site
Post by: wbread on December 29, 2013, 15:16:53
It is due to the newer php version in your new server.
:) thanks

transfer the latest version I think should be no problem?
Title: Re: Some php error occurred after restoring site
Post by: datahell on December 29, 2013, 15:27:53
If, by "last version", you mean Elxis 4.x then it has no such problems.
You may try Elxis Converter (https://www.elxis.net/edc/miscellaneous/57.html) to upgrade from Elxis 200x.x to Elxis 4.1
Title: Re: Some php error occurred after restoring site
Post by: wbread on December 29, 2013, 15:39:00
If, by "last version", you mean Elxis 4.x then it has no such problems.
You may try Elxis Converter (https://www.elxis.net/edc/miscellaneous/57.html) to upgrade from Elxis 200x.x to Elxis 4.1
1 - yes
2 - i test that, before change all my site on Elxis 4
Title: Re: Some php error occurred after restoring site
Post by: wbread on December 29, 2013, 17:41:32
new problem
IOS Downloads upload double images
http://prntscr.com/2evls0
Title: Re: Some php error occurred after restoring site
Post by: datahell on December 29, 2013, 19:45:52
You upgraded to a very new php version without thinking that you have software that is, at least, 4 years old. You will have many similar issues. Check your error log for errors and warnings and fix them one by one.
Title: Re: Some php error occurred after restoring site
Post by: wbread on December 29, 2013, 20:24:08
I just changed the server on which version was newer.
5.3->5.4
I think now how to get the old version
Title: Re: Some php error occurred after restoring site
Post by: wbread on January 18, 2014, 08:43:55
new problem on php5.3.3

URI: index.php?option=com_content&task=view&id=88&Itemid=33
Path: /includes/Core/elxis.php
Line: 3591
Parameter 3 to boteHide() expected to be a reference, value given

bot gives this error only on one site, on other sites there is no problem
it is not used, just activated
Title: Re: Some php error occurred after restoring site
Post by: datahell on January 18, 2014, 11:37:13
I told you what to do with bots. The problem is the ampersant character  &, remove it!
Title: Re: Some php error occurred after restoring site
Post by: wbread on January 18, 2014, 11:44:36
forgot to update all bots on websites  ;D
Title: Re: Some php error occurred after restoring site
Post by: webgift on January 19, 2014, 10:59:19
Here are the Backward incompatible changes (http://www.php.net/manual/en/migration54.incompatible.php) when migrating from PHP 5.3 to 5.4. One of them is: Call-time pass by reference (http://www.php.net/manual/en/language.references.pass.php) has been removed.