I've got this warning due to moving a site to a new server. Off the top of my head it's to do with a function not switched on in php.ini, however I'm not able to modify the ini file on the server. This is the full error I get: Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /#/local/home/#/index.php on line 28 Code (markup): The files in question are: $php_file1 = getRandomImage1($path_to_pages1, $default_file1, &$img1); $php_file2 = getRandomImage2($path_to_pages2, $default_file2, &$img2); $php_file3 = getRandomImage3($path_to_pages3, $default_file3, &$img3); Code (markup): I know it relates to the "&" before $img1/2/3, but I tried to remove it and place an array(xx) around it but still no luck - any advice? Thanks
You mentioned the problem wasn't in your PHP.INI file- try restarting the PHP engine and see what happens. Also, ensure that allow_call_time_pass_reference is set to true. Let us know how it goes
No I think if I had access to php.ini then the problem would be solved, but I'm hosted with Dreamhost and they won't let me touch it! My thinking was just change the current code. I read that it relates to the & symbol, when I remove it the errors go...but no images (with relative url) are displayed. I sort of used a knocked-up Image Rotator on the site.
Can you verify that allow_call_time_pass_reference is set to true? Just look at your php configuration and if it isn't, open a support ticket. Can we see what the image-getting function does in terms of code?
I don't think I can even access the php config. Dreamhost are pretty strict and already shot an email back saying they can't help. I'd imagine it's not set to true as I tested it on my own server (which was set to true) and it worked fine... Would you have an idea on changing the code? Thanks
Actually I think I can edit the php.ini file (although can't seem to access it via Putty), then I know I need to set to true: php_value allow_call_time_pass_reference Cheers!