forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: mc0676 on April 11, 2008, 08:40:49 pm

Title: "Only variables should be assigned by reference"
Post by: mc0676 on April 11, 2008, 08:40:49 pm
He,
i've a little problem.
I'm installing my "second" cpmfetch and i have a strange problem that i did have in first board.

Look here:
http://www.er6italia.com/cpg/cpmfetch/screen.php

Why i receive this ?
Notice: Only variables should be assigned by reference in /web/htdocs/www.er6italia.com/home/cpg/cpmfetch/cpmfetch.php on line 419

And why if i click in on of that 4 photos after i can see the album and not the single photo ?

This is the other perfect workly board:
http://www.vwgolfcommunity.com/cpg/cpmfetch/screen.php

Thanks.

Title: Re: "Only variables should be assigned by reference"
Post by: Nibbler on April 11, 2008, 08:47:28 pm
Post your code and what version of cpmfetch you are running.
Title: Re: "Only variables should be assigned by reference"
Post by: mc0676 on April 11, 2008, 08:54:41 pm
cpmfetch version is 2.1.1

Which code i need to post ?

Thanks.

If i use this code:

<?php
  include "./cpg/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./cpg/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>

in this file:
http://www.er6italia.com/test.php

it runs but, how u can see, if i link i one photo, atfer i will redirect in the album and not in the single photo.


Title: Re: "Only variables should be assigned by reference"
Post by: mc0676 on April 12, 2008, 08:39:51 am
It's sufficient my answer ?
Thanks.
Title: Re: "Only variables should be assigned by reference"
Post by: mc0676 on April 13, 2008, 06:25:31 pm
Can someone help me ?
Title: Re: "Only variables should be assigned by reference"
Post by: mc0676 on April 14, 2008, 09:26:37 am
Nothing to do, i receive this error:

Notice: Only variables should be assigned by reference in /web/htdocs/www.er6italia.com/home/cpg/cpmfetch/cpmfetch.php on line 801
Title: Re: "Only variables should be assigned by reference"
Post by: vuud on April 14, 2008, 05:18:43 pm

I'd have to get into the code and see what lines those are.

Is there a difference in the versions of PHP on each server?

You could actually be getting the error on both, but one is set to not display notice level errors...



Title: Re: "Only variables should be assigned by reference"
Post by: mc0676 on April 14, 2008, 05:54:43 pm
Yes, the php version is differente.
v5.0.4 in the board where cpmfetch work perfectly.
v4.4.7 in the other.

In the test php there are this lines:
<?php
error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on
include "./cpg/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpg/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewRandomMedia(1,5);
$objCpm->cpm_close();
?>

Thanks for support.