Hey everyone!
I just finished up installing Drupal at http://209.249.37.234/, and was configuring it to my tastes when I ran into this weird problem. I was at admin > settings > drupal (?q=admin/settings), and it would not let me save my changes. I get this error every time....
Fatal error: Only variables can be passed by reference in /usr/local/psa/home/vhosts/dart.co.uk/httpdocs/modules/system.module on line 212
I'm not sure what could be causing it, since I installed using wget & tar straight from the drupal site - no uploading or anything. To be sure, I did upload a replacement system.module file - no change.
Any ideas? The weird thing is that it will let me "Reset to Defaults" without error.
Comments
What are you running?
What's your PHP and MySQL version ? That line is trying to create a temp directory. So the path and the permissions have to be correct.
---------------------------
info for Drupal installation
__________________________
Carl McDade
Information Technology Consult
Team Macromedia
www.hivemindz.com
http://209.249.37.234/php.php is the output of phpinfo();
The versions I have are... php 4.3.9, and MySQL 4.0.20. I can't really understand what is going on. Everything else works. Very weird.
Founder, Quabbo Internet Services
PHP Hosting Solutions with the Zend Performance Suite and Urchin
http://www.quabbo.com
The status has changed. I
The status has changed. I had commented out the php directives in .htaccess, perferring to set them another way, and using the ones in .htaccess I am totaly unable to even load the system.module pages.
Every error has to do with line 212, which is...
file_check_directory(file_create_path($directory_temp), FILE_CREATE_DIRECTORY, 'file_directory_temp');..and here's the area it's in...
Founder, Quabbo Internet Services
PHP Hosting Solutions with the Zend Performance Suite and Urchin
http://www.quabbo.com
Same error, different page
I also get the same sort of error at ?q=admin/themes/settings/pushbutton. Arg! I've tried everything I can think of. Any ideas anyone?
"Fatal error: Only variables can be passed by reference in /usr/local/psa/home/vhosts/dart.co.uk/httpdocs/modules/system.module on line 638"
Everything on my end checks out according to http://drupal.org/node/270, the system requirements.
--Matthew Runo
Founder, Quabbo Internet Services
PHP Hosting Solutions with the Zend Performance Suite and Urchin
http://www.quabbo.com
The following pages
The following pages work:
?q=admin/settings/forum
?q=admin/settings/drupal
?q=admin/settings/search
?q=admin/settings/story
The ones that do not work are..
?q=admin/settings
?q=admin/themes/settings/pushbutton
Very, very werid. Is there something wrong with my PHP configuration? Can I see someone's phpinfo() output? Maybe there is something I can find that's wrong.
--Matthew Runo
Founder, Quabbo Internet Services
PHP Hosting Solutions with the Zend Performance Suite and Urchin
http://www.quabbo.com
Problem Solved
I was able to get everything to work by changing...
$directory_temp = variable_get('file_directory_temp', FILE_DIRECTORY_TEMP);
to...
$directory_temp = "/tmp";
Should I submit this somewhere? There is obviously something wrong in the variable_get() function, where it passes variables around.
Matthew Runo
Founder, Quabbo Internet Services
PHP Hosting Solutions with the Zend Performance Suite and Urchin
http://www.quabbo.com
Seems to be a PHP change
Recent versions of PHP started being more picky about this issue.
The solution seems to be to use a temporary variable.
For example, I ran into this issue on the following code:
and solved it by replacing the above with:
Hope this helps!
Curious
I have tried all of the solutions here and I have not had any luck. I am getting the error all the time. MySQL 4.0.24 and apache 2.0.54 and php 5.1.0b3.
Fatal error: Only variables can be passed by reference in /home/www/default/themes/civicspace/template.php on line 62
Just wanted to post my 2 cents.
It seems that this is a bug in PHP
I have found the same error in another place:
Fatal error: Only variables can be passed by reference in ....\drupal\modules\image\image.module on line 730
The bug is documented at http://bugs.php.net/bug.php?id=33643
The workaround is to introduce a local variable, like this:
Instead of:
Change to:
--------------------------------------------------
http://shorinel.blogspot.com