Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: "Only variables should be assigned by reference" Cpmfetch error on homepage  (Read 8727 times)

0 Members and 1 Guest are viewing this topic.

Rye

  • Coppermine newbie
  • Offline Offline
  • Posts: 7

Hi everyone. We have a "Latest Images" portion of our homepage and I am seeing this "Notice: Only variables should be assigned by reference in /home/content/n/o/d/nodoubter1/html/coppermine/cpmfetch/cpmfetch.php on line 419" above the pictures throwing off everything. Does anyone know anything about cpmfetch or how to fix it through our homepage html?

Here is a picture of the homepage with the error:
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fi117.photobucket.com%2Falbums%2Fo73%2Fchrisevansvnet%2Fhomepage.jpg&hash=1382ccf61baaec3333482041cf771b9c26fa22ee)

We are running the CuteNews 1.4.6 © 2008 CutePHP version on our site.
We have CpmFetch Installer for release 2.1.1 version and here is the

CpmFetch Script/code: (I think?)

CpmFetch Install Script version 2.1.1
do=
path=
force=
Running default command: install
* * BEGIN SERVER SETTINGS * *
SERVER DOCUMENT_ROOT: /home/content/n/o/d/nodoubter1/html
SERVER GATEWAY_INTERFACE: CGI/1.1
SERVER HTTP_ACCEPT: application/xml,application/xhtml+xml,text/html;q=0.9,text/p
lain;q=0.8,image/png,*/*;q=0.5
SERVER HTTP_ACCEPT_ENCODING: gzip, deflate
SERVER HTTP_ACCEPT_LANGUAGE: en-us
SERVER HTTP_CONNECTION: keep-alive
SERVER HTTP_COOKIE: CNpass=8dd45a08d919bba887d5dbd3482b01e5; cpg130_data=YTo0Ont
zOjI6IklEIjtzOjMyOiJhNGE5ZWFlZTU5NTI2N2JiOGFlNjBkMzdhNDA4MGIyZSI7czoyOiJhbSI7aTo
xO3M6MzoibGl2IjthOjU6e2k6MDtzOjQ6IjcyNjUiO2k6MTtzOjQ6IjMyMzAiO2k6MjtzOjQ6Ijg4Nzk
iO2k6MztzOjQ6Ijg5MDciO2k6NDtzOjQ6Ijg4ODgiO31zOjM6ImxhcCI7aTo0O30%3D; e85514fbf13
8b6cc0bbfb9de34739d4b=de9cf46a704e801abfafeb40d61aa649
SERVER HTTP_HOST: www.chris-evansv.net
SERVER HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us)
 AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10
SERVER PATH: /bin:/usr/bin:/usr/local/bin
SERVER PATH_INFO: /coppermine/cpmfetch/install.php
SERVER PHPRC: /home/content/n/o/d/nodoubter1/html
SERVER QUERY_STRING:
SERVER RAILS_ENV: production
SERVER REDIRECT_STATUS: 200
SERVER REMOTE_ADDR: 68.46.119.95
SERVER REMOTE_PORT: 5293
SERVER REQUEST_METHOD: GET
SERVER REQUEST_URI: /coppermine/cpmfetch/install.php
SERVER SCRIPT_FILENAME: /home/content/n/o/d/nodoubter1/html/coppermine/cpmfetch/
install.php
SERVER SCRIPT_NAME: /coppermine/cpmfetch/install.php
SERVER SCRIPT_URI: http://www.chris-evansv.net/coppermine/cpmfetch/install.php
SERVER SCRIPT_URL: /coppermine/cpmfetch/install.php
SERVER SERVER_ADDR: 208.109.138.83
SERVER SERVER_ADMIN: support@supportwebsite.com
SERVER SERVER_NAME: www.chris-evansv.net
SERVER SERVER_PORT: 80
SERVER SERVER_PROTOCOL: HTTP/1.1
SERVER SERVER_SIGNATURE:
Apache/1.3.33 Server at www.chris-evansv.net P
ort 80


SERVER SERVER_SOFTWARE: Apache
SERVER SPI: TRUE
SERVER PHP_SELF: /coppermine/cpmfetch/install.php
* * END SERVER SETTINGS * *
Found config file at ../include/config.inc.php
Found init file at ../include/init.inc.php
Checking for existing cpmfetch config file
Found cpmfetch_config.php file - now reading
Config file is version 2.1.1 read in
Last flagged version is 1.9.9
Config written version same or newer than last flagged version - reinstall optio
nal
Producing output screen and exiting
Logged

Rye

  • Coppermine newbie
  • Offline Offline
  • Posts: 7

The attachment is a screen cap of the homepage with the error circled. The website link is www.chris-evansv.net. Our gallery link is http://www.chris-evansv.net/coppermine/index.php
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

Rye

  • Coppermine newbie
  • Offline Offline
  • Posts: 7

I don't know anything about coding, scripts or PHP. I would like it someone could walk me through getting rid of that on the homepage. Thank you.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

Don't play stupid. From the thread that I refered to already:
Quote
Things to include in a cry for help:

    * The Exact error message.  "I get an error about something..." - Copy and paste
    * What version of coppermine you are using
    * What version of CoppermineFetch you are using
    * A link to your website and gallery
    * A link to an example of the problem (if possible)
    * How computer savvy you are (newbie, intermediate, damn good)
    * What kind of web server you are running on (if known)
    * Include the code you are using.

Include anything that makes your situation unique.  Believe it or not, we do test the software - so when it breaks, sometimes it is because you are doing something we did not forsee (not bad, just not thought of).  These are most important to include:

Examples:
  • Bridiging
  • Different domains, gallery on one, cpmfetch on another
  • Modifications to cpg


That's not too much asked and not related to coding, scripts or PHP. If you can't follow this simple set of instructions, then you should not try to do what you're trying to do, as you then don't qualify as target audience for this script. Just whining about lack of skills is childish and will not be tolerated, as you haven't even tried to provide the information needed. Actualy, what is missing from your posting is the code you used. Don't say you don't know about code: you must have come up with code - the one that triggers the error you get.

We are running the CuteNews 1.4.6 © 2008 CutePHP version on our site.
What's that and how is that related?

Here is a picture of the homepage with the error:
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fi117.photobucket.com%2Falbums%2Fo73%2Fchrisevansvnet%2Fhomepage.jpg&hash=1382ccf61baaec3333482041cf771b9c26fa22ee)
The attachment is a screen cap of the homepage with the error circled. The website link is www.chris-evansv.net. Our gallery link is http://www.chris-evansv.net/coppermine/index.php
You're not meant to hotlink screenshots, but to attach them (as per board rules).
Logged

Rye

  • Coppermine newbie
  • Offline Offline
  • Posts: 7

Exact error message: "Notice: Only variables should be assigned by reference in /home/content/n/o/d/nodoubter1/html/coppermine/cpmfetch/cpmfetch.php on line 419"
Coppermine Version: 1.4.26
CoppermineFetch Version: 2.1.1
Website Gallery: http://chris-evansv.net/coppermine/index.php
Link to an example of the problem: http://chris-evansv.net/    Message in "Lastest Images Coding also in CpmFetch: http://www.chris-evansv.net/coppermine/cpmfetch/install.php
How computer savvy are you? Newbie
Include the code you are using: http://www.chris-evansv.net/coppermine/cpmfetch/install.php CPMFetch Coding
Coppermine Script:
Quote
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2010 Coppermine Dev Team
  v1.0 originally written by Gregory Demar

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.
 
  ********************************************
  Coppermine version: 1.4.26
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/scripts.js $
  $Revision: 6987 $
  $Author: gaugau $
  $Date: 2010-01-02 11:46:39 +0100 (Sa, 02 Jan 2010) $
**********************************************/

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function writeCookie(name, data, noDays){
  var cookieStr = name + "="+ data
  if (writeCookie.arguments.length > 2){
    cookieStr += "; expires=" + getCookieExpireDate(noDays)
    }
  document.cookie = cookieStr
}

function readCookie(cookieName){
   var searchName = cookieName + "="
   var cookies = document.cookie
   var start = cookies.indexOf(cookieName)
   if (start == -1){ // cookie not found
     return ""
     }
   start += searchName.length //start of the cookie data
   var end = cookies.indexOf(";", start)
   if (end == -1){
     end = cookies.length
     }
   return cookies.substring(start, end)
}

function blocking(nr, cookie, vis_state)
{
        if (document.layers)
        {
                current = (document.layers[nr].display == 'none') ? vis_state : 'none';
                if (cookie != '')
                        writeCookie(nr, current);
                document.layers[nr].display = current;
        }
        else if (document.all)
        {
                current = (document.all[nr].style.display == 'none') ? vis_state : 'none';
                if (cookie != '')
                        writeCookie(nr, current);
                document.all[nr].style.display = current;
        }
        else if (document.getElementById)
        {
                display = (document.getElementById(nr).style.display == 'none') ? vis_state : 'none';
                if (cookie != '')
                        writeCookie(nr, display);
                document.getElementById(nr).style.display = display;
        }
}


function adjust_popup()
{
        var w, h, fixedW, fixedH, diffW, diffH;
        if (document.documentElement && document.body.clientHeight==0) {     // Catches IE6 and FF in DOCMODE
                fixedW = document.documentElement.clientWidth;
                fixedH = document.documentElement.clientHeight;
                window.resizeTo(fixedW, fixedH);
                diffW = fixedW - document.documentElement.clientWidth;
                diffH = fixedH - document.documentElement.clientHeight;
                w = fixedW + diffW + 16; // Vert Scrollbar Always On in DOCMODE.
                h = fixedH + diffH;
                if (w >= screen.availWidth) h += 16;
        } else if (document.all) {
                fixedW = document.body.clientWidth;
                fixedH = document.body.clientHeight;
                window.resizeTo(fixedW, fixedH);
                diffW = fixedW - document.body.clientWidth;
                diffH = fixedH - document.body.clientHeight;
                w = fixedW + diffW;
                h = fixedH + diffH;
                if (h >= screen.availHeight) w += 16;
                if (w >= screen.availWidth)  h += 16;
        } else {
                fixedW = window.innerWidth;
                fixedH = window.innerHeight;
                window.resizeTo(fixedW, fixedH);
                diffW = fixedW - window.innerWidth;
                diffH = fixedH - window.innerHeight;
                w = fixedW + diffW;
                h = fixedH + diffH;
                if (w >= screen.availWidth)  h += 16;
                if (h >= screen.availHeight) w += 16;
        }
        w = Math.min(w,screen.availWidth);
        h = Math.min(h,screen.availHeight);
        window.resizeTo(w,h);
        window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);
}

function show_section(e) {
    if (document.getElementById(e).style.display == 'none') {
        document.getElementById(e).style.display = 'block';
    } else {
        document.getElementById(e).style.display = 'none';
    }
}


function expand()
{
        var Nodes = document.getElementsByTagName("table")
        var max = Nodes.length
        for(var i = 0;i < max;i++) {
                var nodeObj = Nodes.item(i)
                var str = nodeObj.id
                if (str.match("section")) {
                        nodeObj.style.display = 'block';
                }
        }
}

function hideall()
{
        var Nodes = document.getElementsByTagName("table")
        var max = Nodes.length
        for(var i = 0;i < max;i++) {
                var nodeObj = Nodes.item(i)
                var str = nodeObj.id
                if (str.match("section")) {
                        nodeObj.style.display = 'none';
                }
        }
}

PHP Script:
Quote
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2010 Coppermine Dev Team
  v1.0 originally written by Gregory Demar

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.
 
  ********************************************
  Coppermine version: 1.4.26
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/phpinfo.php $
  $Revision: 6987 $
  $Author: gaugau $
  $Date: 2010-01-02 11:46:39 +0100 (Sa, 02 Jan 2010) $
**********************************************/

error_reporting (E_ALL ^ E_NOTICE);
define('IN_COPPERMINE', true);
define('PHPINFO_PHP', true);
require('include/init.inc.php');

$CONFIG['debug_mode']=0;

if (!GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied']);

pageheader($lang_cpg_debug_output['phpinfo']);

ob_start();
phpinfo();
$string = ob_get_contents();
$string = strchr($string, '</style>');
$string = str_replace('</style>','',$string);
$string = str_replace('class="p"','',$string);
$string = str_replace('class="e"','class="tableb"',$string);
$string = str_replace('class="v"','class="tablef"',$string);
$string = str_replace('class="h"','class="tableh2"',$string);
$string = str_replace('class="center"','',$string);
ob_end_clean();

print '<div align="left" style="overflow:hidden;width:800px;text-align:left;">';
starttable('100%', $lang_phpinfo_php['php_info'], 1);
print '<tr><td class="tableb">';
print $lang_phpinfo_php['explanation'];
print '<br />';
print $lang_phpinfo_php['no_link'];
print '</td></tr>';
endtable();
print '<br />';


print $string;
print "</div>\n";


pagefooter();
ob_end_flush();

?>

Is that the coding you need? I hope my request is more easy to understand since it follows the rules.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me

Before we go on you need to upgrade to 1.4.27 as there is a little security fix.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Rye

  • Coppermine newbie
  • Offline Offline
  • Posts: 7

How do I do that? Will all the settings stay the same with the upgrade?
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me

We have a one question per thread policy.

If you read the docs it will tell you all you want to know. The same goes for using the search facility on these forums. You will not believe how many times that question has been asked and answered.

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upgrade_why

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upgrade

Having said all that you should consider upgrading to the latest 1.5.x release as support for the 1.4.x line will run out sometime in the coming year so why not take the opportunity now?
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Rye

  • Coppermine newbie
  • Offline Offline
  • Posts: 7

This is the code to show the latest images from the gallery on the main page


Quote
<?php
  include "./coppermine/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./coppermine/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(2,2);
  $objCpm->cpm_close();
?>
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me

Eh? What has that got to do with upgrading?
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.031 seconds with 20 queries.