Solved - Fatal Error: Only Variables Can Be Passed By Reference In Line 241


Solved - Fatal Error: Only Variables Can Be Passed By Reference In Line 241
  Forums Index
      » PHP Forums
        » » Solved - Fatal error: Only variables can be passed by reference in line 241



Solved - Fatal Error: Only Variables Can Be Passed By Reference In Line 241
Post Description:
Post Tags: solved, fatal, error, only, variables, can, be, passed, by, reference, in, line, 241, free php support, php scripts, php questions, php answers, programming, codes, scripts
This Post Has Been Viewed 659 Times Since Mon Nov 20, 2006 9:18 pm Posted By hostman with 2 replies
Solved - Fatal Error: Only Variables Can Be Passed By Reference In Line 241
Fatal error: Only variables can be passed by reference in /var/www/html/home/orders/solidworks/DBConnection.class.php on line 241

Hi, I just installed a new script and for some reason i am getting this error

can you please show me how to fix this problem

Thanks

Leave Your Comments
* Your Name

  * Your Email Address (Will Not Be Published)

* Your Comments


Add Picture To Comments
Yes No             upload
Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

     




Comments and replies About Solved - Fatal Error: Only Variables Can Be Passed By Reference In Line 241






:: 1 :: #137 - Reply By hostman On Mon Nov 20, 2006 9:28 pm
I've seen this error come up on several popular scripts like:

Vbulletin
PHPBB
Wordpress
Drupal
SolidState

the only real solution for this is to downgrade your php.

if you want to know what version you have type this command:

     Code:
php -v


I have two servers, one one server, i get this error, but on the other server i don't.


here is the server where i do get the error: (PHP Version 5.0.5)

     Code:
[root@host1 web]# php -v
PHP 5.0.5 (cli) (built: Apr 26 2006 09:47:41)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.5, Copyright (c) 1998-2004 Zend Technologies



Here is my php version on ther server i DON'T get the error (PHP Version 5.1.4 with Zend Optimizer)

     Code:
[root@host2 ~]# php -v
PHP 5.1.4 (cli) (built: May 8 2006 08:41:41)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies
with Zend Optimizer v3.0.1, Copyright (c) 1998-2006, by Zend Technologies



So to fix your problem, install PHP Version 5.1.4 by either upgrading or downgrading. Hope this helps...

Also, i found this at http://bugs.php.net/bug.php?id=33643

Bug #33643 Fatal error: Only variables can be passed by reference
Submitted: 11 Jul 2005 1:06pm UTC Modified: 16 Aug 2005 9:04pm UTC
From: Jason at hybd dot net
Status: Wont fix Category: Scripting Engine problem
Version: 4CVS-2005-07-18 OS: *
:: 2 :: #138 - Reply By hostman On Tue Nov 21, 2006 4:20 pm
Yes, you are right, this may be a bug with the PHP version, I upraded PHP and now i am not getting this error anymore.

this is my php -v now that i upgraded


     Code:
PHP 5.1.6 (cli) (built: Nov 3 2006 07:27:53)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies


Thanks for your support