The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Strict Standards: Only variables should be assigned by reference

Discussion in 'General Discussion' started by fidividi, May 11, 2014.

  1. fidividi

    fidividi Active Member

    Joined:
    Feb 15, 2013
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello,

    I have a new cPanel/WHM installation with PHP 5.4.28 and I migrated a Joomla 3 website to the server, and I get the error:

    "Strict Standards: Only variables should be assigned by reference in...."

    As soon as I recompile to PHP 5.3.27, the error goes away.

    Can you please tell me what could be the issue?

    Error_logs don't show anything.

    Thank you.
     
  2. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    That's a warning, not really an error. In your /usr/local/lib/php.ini file, see what you have for error_reporting.

    If you don't see:

    Code:
    ~E_STRICT
    
    in that line, please add it, and then restart Apache with:

    Code:
    # /scripts/restartsrv_httpd
    
    See if that resolves the warning you're seeing.
     
  3. fidividi

    fidividi Active Member

    Joined:
    Feb 15, 2013
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I had:

    and I changed it to:


    restarted apache, still the same.
     
  4. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    The problem in this case was that several of the PHP scripts were resetting the error_reporting log... The fix in this case was to modify the file in question and remove the & from that file. The error now no longer appears. But there may be other places where it will appear. There is not much that can be done if many of the php files simply reset the error_reporting line.
     
  5. fidividi

    fidividi Active Member

    Joined:
    Feb 15, 2013
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thanks a lot Peter. Fully understood your points.

    In case anyone else having same problems, my errors were raising from:
    And as Peter said, remove the & from that file, and the line being reported.

    Thank you.
     
Loading...

Share This Page