I get the PHP Warnings "Notice[8]: Only variables should be assigned" (see full warning below)
System:
Phpwiki 1.3.7-4
PHP 4.4.0-1
Apache 1.3.33
My question:
Is there a setting to disable these warnings?
Is this problem fixed in a newer version?
lib/WikiUser.php:59: Notice[8]: Only variables should be assigned by reference
lib/Template.php:112: Notice[8]: Only variables should be assigned by reference
lib/Template.php:114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'top') (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'top') (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'browse') (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'browse') (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'browse-footer') (In template 'browse') (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'browse-footer') (In template 'browse') (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'actionbar') (In template 'browse-footer') (In template 'browse') (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'actionbar') (In template 'browse-footer') (In template 'browse') (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm getting the same errors after upgrading to php 4.4.1 but I prefer not to upgrade at this time. How can I suppress the errors? Where do I make that modification and what do I remove?
Or tell me what files I need to get rid of the & in the function call. I can't find the files to make these changes.
.....
Hank
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I already commented out the hack at lib/Template.php:97
function _expandSubtemplate (&$template) {
// FIXME: big hack!
//if (!$template->_request)
// $template->_request = &$this->_request;
Thre's nothing left to my knowledge but I still need to test against 4.4.
And I need to fix the important database error I introduced lately on action=edit.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just installed phpWiki on my server and we are getting these kind of messages:
/usr/lib/php/DB/common.php:1295: Notice: Only variable references should be returned by reference (...repeated 4 times)
lib/DbSession/SQL.php:97: Notice: Only variables should be assigned by reference
I have: phpwiki-1.3.11p1
My PHP version is: 4.4.1
Besides ...
I saw the phpwiki-1.3.11-1.3.11p1.patch file but have no idea on how to use it??
Questions:
1. How could I fix the error messages
2. How could I use the referred patch file??
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
you might want to turn of warnings in your php.ini
below you find an excerpt from my php.ini (php 4.3.9). don't know if this answer pleases you ...
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; error_reporting is a bit-field. Or each number up to get desired error
; reporting level
; E_ALL - All errors and warnings
; E_ERROR - fatal run-time errors
; E_WARNING - run-time warnings (non-fatal errors)
; E_PARSE - compile-time parse errors
; E_NOTICE - run-time notices (these are warnings which often result
; from a bug in your code, but it's possible that it was
; intentional (e.g., using an uninitialized variable and
; relying on the fact it's automatically initialized to an
; empty string)
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
; initial startup
; E_COMPILE_ERROR - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated notice message
;
; Examples:
;
; - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE
;
; - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
; - Show all errors
;
;error_reporting = E_ALL
error_reporting = E_ALL & ~E_NOTICE
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I get the same notice messages with phpwiki 1.3.10 and php 4.3.10. Not changes to the php.ini file or .htaccess files have any effect. My hosting company recently upgraded php and now the messages. Now even if errors messages are turned off, the warning still appear. Is there a patch for this or do I need to upgrade to 1.3.11p1 to make the messages disappear?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I read a post in this forum to check out lib/main.php because I too was having this problem as well as hundreds of other sites on the web which made searching for the fix for this error extremely frustrating.
Anyway,
At line 84 in main.php, you'll see the lines:
// Fixme: Does pear reset the error mask to 1? We have to find the culprit
//$x = error_reporting();
Uncomment the second line and change it to:
$x = error_reporting(0);
My errors magically went bye-bye.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In my main.php I changed to the following line 935:
934:$x = error_reporting(); // why is it 1 here? should be E_ALL
935:error_reporting(E_ERROR);
from E_ALL.
The Notice message are suppressed and it will still report real errors.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just installed phpWiki on my server and we were getting these kind of messages:
/usr/lib/php/DB/common.php:1295: Notice: Only variable references should be returned by reference (...repeated 4 times)
lib/DbSession/SQL.php:97: Notice: Only variables should be assigned by reference
I have: phpwiki-1.3.11p1
My PHP version is: 4.4.1
I did what you said and changed E_ALL by E_ERROR at the end of main.php and the messaged are gone BUT ... I´m ussign the Theme named MonoBook and when we did this change the tabs named Discution and Information moved down vertically instead to stay horizontally !!! this causes that the tabs are now over the pages content...
How could we solve it???
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I get the PHP Warnings "Notice[8]: Only variables should be assigned" (see full warning below)
System:
Phpwiki 1.3.7-4
PHP 4.4.0-1
Apache 1.3.33
My question:
Is there a setting to disable these warnings?
Is this problem fixed in a newer version?
lib/WikiUser.php:59: Notice[8]: Only variables should be assigned by reference
lib/Template.php:112: Notice[8]: Only variables should be assigned by reference
lib/Template.php:114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'top') (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'top') (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'browse') (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'browse') (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'browse-footer') (In template 'browse') (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'browse-footer') (In template 'browse') (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'actionbar') (In template 'browse-footer') (In template 'browse') (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'actionbar') (In template 'browse-footer') (In template 'browse') (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):112: Notice[8]: Only variables should be assigned by reference
lib/Template.php (In template 'body') (In template 'html'):114: Notice[8]: Only variables should be assigned by reference
These warnings are fixed in about 1.3.10.
I'm getting the same errors after upgrading to php 4.4.1 but I prefer not to upgrade at this time. How can I suppress the errors? Where do I make that modification and what do I remove?
Or tell me what files I need to get rid of the & in the function call. I can't find the files to make these changes.
.....
Hank
Judging by my look back into CVS, I think that the offending references are in the printExpansion function in lib/Template.php.
They show up as:
&$this->_request;
You could try removing the '&' in each of these; I won't make any promises about whether that will work, though.
I already commented out the hack at lib/Template.php:97
function _expandSubtemplate (&$template) {
// FIXME: big hack!
//if (!$template->_request)
// $template->_request = &$this->_request;
Thre's nothing left to my knowledge but I still need to test against 4.4.
And I need to fix the important database error I introduced lately on action=edit.
Fellows,
I just installed phpWiki on my server and we are getting these kind of messages:
/usr/lib/php/DB/common.php:1295: Notice: Only variable references should be returned by reference (...repeated 4 times)
lib/DbSession/SQL.php:97: Notice: Only variables should be assigned by reference
I have: phpwiki-1.3.11p1
My PHP version is: 4.4.1
Besides ...
I saw the phpwiki-1.3.11-1.3.11p1.patch file but have no idea on how to use it??
Questions:
1. How could I fix the error messages
2. How could I use the referred patch file??
OK I understood now that trhe patch file is just the history of changes.
However, I still have the same issue with warnings.
you might want to turn of warnings in your php.ini
below you find an excerpt from my php.ini (php 4.3.9). don't know if this answer pleases you ...
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; error_reporting is a bit-field. Or each number up to get desired error
; reporting level
; E_ALL - All errors and warnings
; E_ERROR - fatal run-time errors
; E_WARNING - run-time warnings (non-fatal errors)
; E_PARSE - compile-time parse errors
; E_NOTICE - run-time notices (these are warnings which often result
; from a bug in your code, but it's possible that it was
; intentional (e.g., using an uninitialized variable and
; relying on the fact it's automatically initialized to an
; empty string)
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
; initial startup
; E_COMPILE_ERROR - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated notice message
;
; Examples:
;
; - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE
;
; - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
; - Show all errors
;
;error_reporting = E_ALL
error_reporting = E_ALL & ~E_NOTICE
I get the same notice messages with phpwiki 1.3.10 and php 4.3.10. Not changes to the php.ini file or .htaccess files have any effect. My hosting company recently upgraded php and now the messages. Now even if errors messages are turned off, the warning still appear. Is there a patch for this or do I need to upgrade to 1.3.11p1 to make the messages disappear?
I read a post in this forum to check out lib/main.php because I too was having this problem as well as hundreds of other sites on the web which made searching for the fix for this error extremely frustrating.
Anyway,
At line 84 in main.php, you'll see the lines:
// Fixme: Does pear reset the error mask to 1? We have to find the culprit
//$x = error_reporting();
Uncomment the second line and change it to:
$x = error_reporting(0);
My errors magically went bye-bye.
Sorry, with this "fix" the errors are not gone.
You experience no errors at all, just warnings from the source parser.
With this workaround you omit all warnings and errors to be printed at all.
In my main.php I changed to the following line 935:
934:$x = error_reporting(); // why is it 1 here? should be E_ALL
935:error_reporting(E_ERROR);
from E_ALL.
The Notice message are suppressed and it will still report real errors.
Fellows,
I just installed phpWiki on my server and we were getting these kind of messages:
/usr/lib/php/DB/common.php:1295: Notice: Only variable references should be returned by reference (...repeated 4 times)
lib/DbSession/SQL.php:97: Notice: Only variables should be assigned by reference
I have: phpwiki-1.3.11p1
My PHP version is: 4.4.1
I did what you said and changed E_ALL by E_ERROR at the end of main.php and the messaged are gone BUT ... I´m ussign the Theme named MonoBook and when we did this change the tabs named Discution and Information moved down vertically instead to stay horizontally !!! this causes that the tabs are now over the pages content...
How could we solve it???