Strict Standards:Only variables should be assigned by refere
Moderators: pe7er, General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 10
- Joined: Fri May 06, 2011 10:19 am
Strict Standards:Only variables should be assigned by refere
Hello Guys,
I am using joomla 1.6 and each time I tried to install a new component and module that is expected to work fine and to compatible with 1.6 version i receive the following error:
Strict Standards: Only variables should be assigned by reference in C:\xampp\.......
following is my joomla1.6 System info:
PHP Built On Windows NT
Database Version 5.5.8
Database Collation utf8_general_ci
PHP Version 5.3.5
Web Server Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 1.6.3 Stable [ Onward ] 18-Apr-2011 23:00 GMT
User Agent Mozilla/5.0 (Windows NT 6.0) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24
I am using joomla 1.6 and each time I tried to install a new component and module that is expected to work fine and to compatible with 1.6 version i receive the following error:
Strict Standards: Only variables should be assigned by reference in C:\xampp\.......
following is my joomla1.6 System info:
PHP Built On Windows NT
Database Version 5.5.8
Database Collation utf8_general_ci
PHP Version 5.3.5
Web Server Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 1.6.3 Stable [ Onward ] 18-Apr-2011 23:00 GMT
User Agent Mozilla/5.0 (Windows NT 6.0) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24
- OOmNezar
- Joomla! Ace
- Posts: 1869
- Joined: Mon Sep 07, 2009 3:18 am
Re: Strict Standards:Only variables should be assigned by re
May be http://forum.joomla.org/viewtopic.php?f=615&t=605274 same issue ?
coffee & smoke just fine
OOm Nezar
-
- Joomla! Apprentice
- Posts: 10
- Joined: Fri May 06, 2011 10:19 am
Re: Strict Standards:Only variables should be assigned by re
in the php.ini there are 2 lines related to error reporting:
;error_reporting = E_ALL | E_STRICT
error_reporting = E_ALL & ~E_STRICT
which one should be commented out? by default first is commented but when I comment second one and uncomment first line , still will get the same error!
;error_reporting = E_ALL | E_STRICT
error_reporting = E_ALL & ~E_STRICT
which one should be commented out? by default first is commented but when I comment second one and uncomment first line , still will get the same error!
- OOmNezar
- Joomla! Ace
- Posts: 1869
- Joined: Mon Sep 07, 2009 3:18 am
Re: Strict Standards:Only variables should be assigned by re
What if you try
Or try http://forum.joomla.org/viewtopic.php?p ... 6#p2492426
Code: Select all
error_reporting = E_ALL
display_errors = Off
coffee & smoke just fine
OOm Nezar
-
- Joomla! Apprentice
- Posts: 10
- Joined: Fri May 06, 2011 10:19 am
Re: Strict Standards:Only variables should be assigned by re
Many thanks to OOmNezar for the help and providing useful comments and links.
what I did is the following to remove the Error:
1-completely uninstall XAMP
2-install WAMP 2.0
3-find and modify php.ini and modification is:
error_reporting = E_ALL
display_errors = Off
Error is gone and site and its module are working fine.
Cheers (Amir)
what I did is the following to remove the Error:
1-completely uninstall XAMP
2-install WAMP 2.0
3-find and modify php.ini and modification is:
error_reporting = E_ALL
display_errors = Off
Error is gone and site and its module are working fine.
Cheers (Amir)
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Jun 01, 2011 3:45 pm
Re: Strict Standards:Only variables should be assigned by re
I had this issue too.
I did not see any change after altering:
error_reporting = E_ALL
display_errors = Off
Closed my browser, and stopped and started Apache in Xamp en error messages were gone.
I did not see any change after altering:
error_reporting = E_ALL
display_errors = Off
Closed my browser, and stopped and started Apache in Xamp en error messages were gone.
-
- Joomla! Apprentice
- Posts: 15
- Joined: Fri Jan 28, 2011 4:36 pm
Re: Strict Standards:Only variables should be assigned by re
How about for those of us who are not on xampp? I have this issue using 1.7.3 on justhost.com.
Any help?
Any help?
- OOmNezar
- Joomla! Ace
- Posts: 1869
- Joined: Mon Sep 07, 2009 3:18 am
Re: Strict Standards:Only variables should be assigned by re
Already try set in Global Configuration?
Site > Global Configuration > Server Settings > Error Reporting
http://docs.joomla.org/Help17:Site_Glob ... ion#Server
Site > Global Configuration > Server Settings > Error Reporting
http://docs.joomla.org/Help17:Site_Glob ... ion#Server
coffee & smoke just fine
OOm Nezar
-
- Joomla! Enthusiast
- Posts: 133
- Joined: Sat Aug 18, 2007 5:23 pm
- Location: SoCal
Re: Strict Standards:Only variables should be assigned by re
You don't have to uninstall XAMPP and install WAMP to fix this! that just create a mess.
You have to adjust the "error_reporting" setting in your php.ini to get Joomla working.
- Open your php.ini
- search for
- change to
- save the file
- STOP and restart Apache (A MUST)
I rather edit the php file than changing the Joomla backend error report because then you have to do that to all of your local sites. It's easier editing one file.
You have to adjust the "error_reporting" setting in your php.ini to get Joomla working.
- Open your php.ini
- search for
Code: Select all
error_reporting = E_ALL | E_STRICT
Code: Select all
error_reporting = E_ALL
- STOP and restart Apache (A MUST)
I rather edit the php file than changing the Joomla backend error report because then you have to do that to all of your local sites. It's easier editing one file.
- BraveAli
- Joomla! Intern
- Posts: 55
- Joined: Thu Oct 27, 2011 8:50 am
Re: Strict Standards:Only variables should be assigned by re
Hello, i have the same problem, i put E_All in font of Error_reporting, and stop and restarted my Apachi, but still the following appearing on my screen
Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\modules\mod_susnet_likebox\mod_susnet_likebox.php on line 18
php.ini output
; error_reporting = E_All
; Default Value: E_ALL
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
Please help...
thanks
Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\modules\mod_susnet_likebox\mod_susnet_likebox.php on line 18
php.ini output
; error_reporting = E_All
; Default Value: E_ALL
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
Please help...
thanks
-
- Joomla! Fledgling
- Posts: 2
- Joined: Wed Apr 25, 2012 3:52 am
Re: Strict Standards:Only variables should be assigned by re
i have the same problem and tried your solves but doesn't work
my case : when i install K2 the errors is
Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\dr-abdeltawab\plugins\system\k2\k2.php on line 306
Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\dr-abdeltawab\plugins\system\k2\k2.php on line 27
and more
my php.ini is
;error_reporting = E_ALL & ~E_NOTICE
; Default Value: E_ALL
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
My .htaccess i renamed to ".htaccess.txt"
contained ..
# supress php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_value docref_root 0
php_value docref_ext 0
RewriteEngine On
please help me and thanks
my case : when i install K2 the errors is
Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\dr-abdeltawab\plugins\system\k2\k2.php on line 306
Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\dr-abdeltawab\plugins\system\k2\k2.php on line 27
and more
my php.ini is
;error_reporting = E_ALL & ~E_NOTICE
; Default Value: E_ALL
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
My .htaccess i renamed to ".htaccess.txt"
contained ..
# supress php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_value docref_root 0
php_value docref_ext 0
RewriteEngine On
please help me and thanks
- BraveAli
- Joomla! Intern
- Posts: 55
- Joined: Thu Oct 27, 2011 8:50 am
Re: Strict Standards:Only variables should be assigned by re
i have solved that problem with the help of joomla forum, all you need is to go your Joomla main page, where you'll find Global Cofiguration, open it... >> click on Server Tab... >>in the Error Reporting.. put Maximum in it and just refresh your page, the Strict Standars will go away hope this would work for you!!
-
- Joomla! Fledgling
- Posts: 2
- Joined: Wed Apr 25, 2012 3:52 am
Re: Strict Standards:Only variables should be assigned by re
really thank you a lot
i didn't have any words to say
you are the man
it works very well
thanks again
i didn't have any words to say
you are the man
it works very well
thanks again
- BraveAli
- Joomla! Intern
- Posts: 55
- Joined: Thu Oct 27, 2011 8:50 am
Re: Strict Standards:Only variables should be assigned by re
You are very welcome!!
-
- Joomla! Apprentice
- Posts: 6
- Joined: Fri Apr 27, 2012 4:30 pm
Re: Strict Standards:Only variables should be assigned by re
Tons of Thanks BraveAli
-
- Joomla! Fledgling
- Posts: 1
- Joined: Fri Jun 01, 2012 6:05 pm
Re: Strict Standards:Only variables should be assigned by re
Thank you everyone, especially Brave Ali and MahmoudKalif, for your comments and suggestions. I modified the php.ini as suggested and also changed the ERROR REPORTING on Global Configuration / SERVER / Error Reporting to MAXIMUM. The error message was resolved. Thank you again.
-
- Joomla! Enthusiast
- Posts: 101
- Joined: Mon Nov 12, 2007 5:43 am
Re: Strict Standards:Only variables should be assigned by re
This is the correct value for
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
I don't why people are saying to use E_ALL. This will display all errors.
Including strict errors which joomla shows on Xampp
You can also use E_ALL & ~E_STRICT which will show all errors except strict ones.
I tried to change it to E_ALL and nothing happened. Then I just decided to read the instructions in the php.ini and its so clear there.
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
I don't why people are saying to use E_ALL. This will display all errors.
Including strict errors which joomla shows on Xampp
You can also use E_ALL & ~E_STRICT which will show all errors except strict ones.
I tried to change it to E_ALL and nothing happened. Then I just decided to read the instructions in the php.ini and its so clear there.
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Mar 06, 2008 12:22 am
Re: Strict Standards:Only variables should be assigned by re
Does anyone know how to resolve these errors, not just changing the error reporting to hide them? I've been searching Google and the only information I can find are suggestions to change php.ini. Yes, this is a temp fix to get ride of the error on my site, however, I am an extension developer and I'd like to know what went wonky with my code (in regards to php5.4>)
Anyone?
Thanks in advance!
Anyone?
Thanks in advance!
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Aug 09, 2012 10:34 pm
Re: Strict Standards:Only variables should be assigned by re
@justbrock, please let me know when you finally learn about the errors and find out a solution to it.
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Aug 09, 2012 10:34 pm
Re: Strict Standards:Only variables should be assigned by re
@quan, what is the difference between what you said and the solution about what @BraveAli has given? Because I use the one BraveAli gave and it worked - this is very easy. My question is, does it mean there might be a place where the error might occur i wouldnt know. Please explain.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sat Sep 08, 2012 12:17 pm
- Contact:
Re: Strict Standards:Only variables should be assigned by re
You saved my day @BraveAli.
Thank you.
Thank you.
- BraveAli
- Joomla! Intern
- Posts: 55
- Joined: Thu Oct 27, 2011 8:50 am
Re: Strict Standards:Only variables should be assigned by re
Thanks for liking my post, wish you good luck with your work in joomla
-
- Joomla! Fledgling
- Posts: 2
- Joined: Wed Aug 03, 2011 2:17 pm
Re: Strict Standards:Only variables should be assigned by re
Had same problems with Joomla 2.5 - after installing an extension, the error started to appear. I found my answer at stackoverflow (by Ozair Kafray):
In this context, line 4 is reffering to a line inside files at which your errors are pointing.You should remove the & (ampersand) symbol, so that line 4 will look like this:
$conn = ADONewConnection($config['db_type']);
From php's manual on assignment by reference:
As of PHP 5, the new operator returns a reference automatically, so assigning the result of new by reference results in an E_DEPRECATED message in PHP 5.3 and later, and an E_STRICT message in earlier versions.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Tue Sep 14, 2010 4:38 pm
Re: Strict Standards:Only variables should be assigned by re
So if the problem persists after changes in php.ini and in global options this means the module scripts are bugged at the listed lines because of the ampersand, is that correct?c47 wrote:Had same problems with Joomla 2.5 - after installing an extension, the error started to appear. I found my answer at stackoverflow (by Ozair Kafray):
In this context, line 4 is reffering to a line inside files at which your errors are pointing.You should remove the & (ampersand) symbol, so that line 4 will look like this:
$conn = ADONewConnection($config['db_type']);
From php's manual on assignment by reference:
As of PHP 5, the new operator returns a reference automatically, so assigning the result of new by reference results in an E_DEPRECATED message in PHP 5.3 and later, and an E_STRICT message in earlier versions.
-
- Joomla! Enthusiast
- Posts: 142
- Joined: Sat Apr 28, 2012 3:20 pm
Re: Strict Standards:Only variables should be assigned by re
if there is an error in a php file , I think it should be solved not just hide them!
i have done so and when i turned on the error reporting there was tons of error! this is not a good way. do you hide your symptoms when you are sick?
i have done so and when i turned on the error reporting there was tons of error! this is not a good way. do you hide your symptoms when you are sick?
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sun Mar 03, 2013 4:38 pm
- Location: Florida, US
Re: Strict Standards:Only variables should be assigned by re
Ok guys, since I see you are suffering, I'm going to give you a hand. I will give you a few fixes in order to get these issues out of the way.
First Fix:
DO NOT ALTER THE FOLLOWING LINES
Document Name: php.ini
Line #
line 535
line 552
YOU DO NEED TO MODIFY THE FOLLOWING LINES AND DOCUMENTS
Second Fix:
Document Name: default.php
line 25
From
To
line 283
From
To
line 284
From
To
line 293
From
To
Third Fix
Document Name: css_vars.php
line 10
From
To
These fixes resolve the issues NOT just hide them, like the posts before mine suggested. Like my comment so others can see it, subscribe/follow me.
First Fix:
DO NOT ALTER THE FOLLOWING LINES
Document Name: php.ini
Line #
line 535
Code: Select all
error_reporting = E_ALL | E_STRICT
Code: Select all
display_errors = On
Second Fix:
Document Name: default.php
line 25
From
Code: Select all
$pageclass = & $app->getParams('com_content');
Code: Select all
$pageclass = $app->getParams('com_content');
line 283
From
Code: Select all
$conf = & JFactory::getConfig();
Code: Select all
$conf = JFactory::getConfig();
line 284
From
Code: Select all
$sitename = $conf->getValue('config.sitename');
Code: Select all
$sitename = $conf->get('config.sitename');
From
Code: Select all
$ice_session = & JFactory::getSession();
Code: Select all
$ice_session = JFactory::getSession();
Document Name: css_vars.php
line 10
From
Code: Select all
$doc = & JFactory::getDocument();
Code: Select all
$doc = JFactory::getDocument();
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Jun 05, 2008 2:50 pm
Re: Strict Standards:Only variables should be assigned by re
Where is the file that need to edit locate? Thank you.
sigfreed77 wrote:Ok guys, since I see you are suffering, I'm going to give you a hand. I will give you a few fixes in order to get these issues out of the way.
First Fix:
DO NOT ALTER THE FOLLOWING LINES
Document Name: php.ini
Line #
line 535line 552Code: Select all
error_reporting = E_ALL | E_STRICT
YOU DO NEED TO MODIFY THE FOLLOWING LINES AND DOCUMENTSCode: Select all
display_errors = On
Second Fix:
Document Name: default.php
line 25
FromToCode: Select all
$pageclass = & $app->getParams('com_content');
Code: Select all
$pageclass = $app->getParams('com_content');
line 283
FromToCode: Select all
$conf = & JFactory::getConfig();
Code: Select all
$conf = JFactory::getConfig();
line 284
FromToCode: Select all
$sitename = $conf->getValue('config.sitename');
line 293Code: Select all
$sitename = $conf->get('config.sitename');
FromToCode: Select all
$ice_session = & JFactory::getSession();
Third FixCode: Select all
$ice_session = JFactory::getSession();
Document Name: css_vars.php
line 10
FromToCode: Select all
$doc = & JFactory::getDocument();
These fixes resolve the issues NOT just hide them, like the posts before mine suggested. Like my comment so others can see it, subscribe/follow me.Code: Select all
$doc = JFactory::getDocument();
-
- Joomla! Apprentice
- Posts: 8
- Joined: Thu Aug 15, 2013 4:40 am
Re: Strict Standards:Only variables should be assigned by re
Hi All. I got the strict standards errors on all Joomla sites (and Wordpress) after moving all sites to a new server. The cause is PHP 5.4. Rolling back to 5.3.27 solved the problem.
- pishro
- Joomla! Explorer
- Posts: 301
- Joined: Tue Oct 09, 2012 7:22 am
Re: Strict Standards:Only variables should be assigned by re
What exactly does this mean? I'm using JFactory just like it says in the docs. Should I be worried?Strict Standards: Only variables should be assigned by reference
Googling the error only gives me a bunch of Joomla people saying I should just disable E_STRICT !
-
- Joomla! Intern
- Posts: 94
- Joined: Fri Dec 02, 2005 3:52 am
Re: Strict Standards:Only variables should be assigned by re
Our ISP advised us all server being upgraded to 5.4 so I took out a short term hosting elsewhere that already had 5.4.2 installed. I loaded up a copy of one of my sites (2.5.7).
I got the Strict Standards errors so, since I did not have access to php.ini I created one in notepad and just added the lines
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
and loaded the file into the root folder and that worked for me.
General Config setting for server is still System Default.
If you get errors like that in admin area just load the same php.ini file into the root folder of the admin area.
Cheers
Chris
I got the Strict Standards errors so, since I did not have access to php.ini I created one in notepad and just added the lines
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
and loaded the file into the root folder and that worked for me.
General Config setting for server is still System Default.
If you get errors like that in admin area just load the same php.ini file into the root folder of the admin area.
Cheers
Chris