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
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: solved - fatal error: only variables can be passed by reference in line 241
POST# 346
Posted On: Fri Feb 29, 2008 12:01 pm
web hosting
Topic: 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


Mon Nov 20, 2006 9:28 pm
1
hostman
Reply #944
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: *
Tue Nov 21, 2006 4:20 pm
2
hostman
Reply #945
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

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload