After moving my site huge error ?!? After moving my site huge error ?!?
 

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

Main Menu

After moving my site huge error ?!?

Started by skywarp, February 12, 2004, 04:05:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

skywarp

:(  I moved my website to a new server and I get this mega error when I try to open copermine. It looks like a header but I can browse the entyer gallery.


-------------------- // // Copyright (C) 2002,2003 Gregory DEMAR // // http://www.chezgreg.net/coppermine/ // // ------------------------------------------------------------------------- // // Updated by gtroll // // (http://coppermine.sf.net/team/) // // ------------------------------------------------------------------------- // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // ------------------------------------------------------------------------- // /* moved to english.php customized in your language file if you wish $lang_pagetitle_php = array( 'viewing' => 'Viewing Photo', 'usr' => "'s Photo Gallery", 'photogallery' => 'Photo Gallery', ); END of moved */ // customize if you wish define('divider' , '>'); /* END OF USER DEFINED VARIABLES*/ global $user_prefix; // initialize vars for the script it processes before init.inc $CPG_M_DIR = 'modules/' . $name; //$CPG_URL = 'modules.php?name=' . $name; // Process language selection global $lang_pagetitle_php, $currentlang, $language,$CPG_M_DIR; if (file_exists($CPG_M_DIR . "/lang/$currentlang.php")) { $USER['lang'] = $currentlang; } else { $USER['lang'] = $language; } if (!file_exists($CPG_M_DIR . "/lang/{$USER['lang']}.php")) { if (!file_exists($CPG_M_DIR . "/lang/{$CONFIG['lang']}.php")) { $CONFIG['lang'] = 'english'; } } else { $CONFIG['lang'] = $USER['lang']; } include $CPG_M_DIR . "/lang/{$CONFIG['lang']}.php"; //sengsara // define variables $pos = isset($pos) ? (int)$pos : 0; $humanpos = $pos + 1; $cat = isset($cat) ? (int)$cat : 0; $album = isset($album) ? $album : ''; $file = isset($file) ? $file : ''; switch ($album) { case 'lastup': $ttrail = " ".divider." $lang_meta_album_names[lastup] "; //Last Uploads break; case 'lastcom': $ttrail = " ".divider." $lang_meta_album_names[lastcom] "; //Last Comments break; case 'topn': $ttrail = " ".divider." $lang_meta_album_names[topn] "; //Top Viewed break; case 'toprated': $ttrail = " ".divider." $lang_meta_album_names[toprated] "; //Top Rated break; case 'search': $ttrail = " ".divider." $lang_meta_album_names[search] "; //Search Results'; break; case 'random': $ttrail = " ".divider." $lang_meta_album_names[random] "; //Random Picture break; default: $ttrail = ''; break; } //end sorted galleries switch ($file) { case 'thumbnails': // filename thumbnail if (is_numeric($album)) { $sql = "SELECT title FROM cpg_albums WHERE aid='$album'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $albumname = $row['title']; $pagetitle = "$lang_pagetitle_php[photogallery] ".divider." $albumname $ttrail"; //regular album } else { // meta album if (isset($cat) && $cat != 0) { // have category if ($cat < 0) { $sql = "SELECT title FROM cpg_albums WHERE aid='" . (- $cat) . "'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $albumname = $row['title']; } elseif ($cat < 10000) { $sql = "SELECT owner_id FROM cpg_categories WHERE cid='$cat'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $albumname = $row['owner_id']; } else { $sql = <<sql_query($sql); $row = $db->sql_fetchrow($result); $albumname = $row['username']; $albumname = "$albumname$lang_pagetitle_php[usr]"; } } else { $pagetitle = "$lang_cat_list[pictures] $ttrail"; if ($search) $pagetitle = "$lang_cat_list[pictures] $ttrail: $search"; } } // end album selection break; case 'displayimage': // filename displayimage if (is_numeric($album)) { // regular album $sql = "SELECT title FROM cpg_albums WHERE aid='$album'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $albumname = $row[title]; if ($slideshow) { $pagetitle = "$albumname $lang_pagetitle_php[photogallery] Slideshow"; } else { // Viewing Normal Picture $sql = "SELECT filename, title FROM cpg_pictures WHERE pid=$pid"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $pictitle = $row[title]; $picfilename = $row[filename]; $humanpos = $pos + 1; if ($pictitle != '') { $pagetitle = "$albumname ".divider." $lang_pagetitle_php[viewing] ".divider." $pictitle $ttrail"; } elseif ($picname != '') { $pagetitle = "$albumname ".divider." $lang_pagetitle_php[viewing] ".divider." $picname $ttrail"; } else { $pagetitle = "$albumname ".divider." $lang_pagetitle_php[viewing] ".divider." $humanpos $ttrail"; } } } else { // meta album if ($pos < 0) { // neg pos $sql = "SELECT aid, filename, title,caption FROM cpg_pictures WHERE pid='" . (- $pos) . "'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $sql2 = "SELECT title WHERE aid='" . $row['aid'] . "'"; $result2 = $db->sql_query($sql); $row2 = $db->sql_fetchrow($result); $albumname = $row2['title']; $pictitle = $row['title']; $picfilename = $row['filename']; $picname = $row['caption']; $humanpos = $pos + 1; if ($pictitle != '') { $pagetitle = "$albumname ".divider." $lang_pagetitle_php[viewing] ".divider." $pictitle $ttrail"; } elseif ($picname != '') { $pagetitle = "$albumname ".divider." $lang_pagetitle_php[viewing] ".divider." $picname $ttrail"; } else { $pagetitle = "$albumname ".divider." $lang_pagetitle_php[viewing] ".divider." $humanpos $ttrail"; } //end neg pos } else { // positive pos if ($cat) { if ($cat < 0) { // if less 0 $sql = "SELECT title FROM cpg_albums WHERE aid='" . (- $cat) . "'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $albumname = $row[title]; $pagetitle = "$albumname $ttrail ".divider." $lang_pagetitle_php[viewing] $humanpos $ttrail"; } } else { $pagetitle = "$lang_pagetitle_php[photogallery] $ttrail ".divider." $lang_pagetitle_php[viewing] $humanpos $ttrail"; } } // end positive pos } //end meta album break; case 'search': $pagetitle = "$lang_pagetitle_php[photogallery] ".divider." $lang_search_php[0]"; break; case 'upload' : $pagetitle = "$lang_pagetitle_php[photogallery] ".divider." $lang_main_menu[upload_pic_lnk]"; break; case 'displayimagepopup' : $pagetitle = "$lang_pagetitle_php[photogallery] ".divider." $lang_main_menu[upload_pic_lnk]"; break; case 'ecard' : $pagetitle = "$lang_pagetitle_php[photogallery] ".divider." $lang_ecard_php[title]"; break; case 'editpics' : $pagetitle = "$lang_editpics_php[edit_pics]"; break; case 'groupmgr' : $pagetitle = "$lang_groupmgr_php[title]"; break; case 'reviewcom' : $pagetitle = "$lang_reviewcom_php[title]"; break; case 'searchnew' : $pagetitle = "$lang_search_new_php[page_title]"; break; case 'upload' : $pagetitle = "$lang_upload_php[title]"; break; default: $pagetitle = "$lang_pagetitle_php[photogallery] "; break; } //end switch switch ($cat) { // have category case ($cat < 0): $sql = "SELECT title FROM cpg_albums WHERE aid='" . (- $cat) . "'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $albumname = $row['title']; break; case (($cat > 0) && ($cat < 10000)) : $sql = "SELECT catname FROM cpg_categories WHERE cid='$cat'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $albumname = $row[catname]; break; case ($cat > 10000) :// cat is between 1 and 9999 user gallery $theid = 3; $sql = "SELECT username FROM ".$user_prefix."_users WHERE user_id = '".$theid."'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $albumname = $row['username']; $albumname = "$albumname$lang_pagetitle_php[usr]"; break; } //end category switch cases if ($cat != 0)$pagetitle = "$lang_pagetitle_php[photogallery] ".divider." $albumname $ttrail"; ?> sername']; $albumname = "$albumname$lang_pagetitle_php[usr]"; break; } //end category switch cases if ($cat != 0)$pagetitle = "$lang_pagetitle_php[photogallery] ".divider." $albumname $ttrail"; ?>

Casper

This is because the first couple of lines are missing from your index.php file.
This is what you have;
------------------------------------------------------------------------- //
// Copyright (C) 2002,2003 Gregory DEMAR                                     //
// http://www.chezgreg.net/coppermine/                                       //


This is what you should have;
<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.2.1                                            //
// ------------------------------------------------------------------------- //
// Copyright &#40;C&#41; 2002,2003 Gregory DEMAR                                     //
// http&#58;//www.chezgreg.net/coppermine/                                       //
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

skywarp

Hmmm I have checked the index.php and the

<?php
 
is there.

I have to tell you that it runs under phpnuke 6.9

 :roll:

Casper

Having looked again at the code above, it seems to be a nuke version.  Are you now trying to run this as a standalone version.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

hyperion

&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

skywarp

I think so. Its all running on a redhat 9 server.

moorey

You think so? Does the server have PHP installed, pretty much either yes or no. Get a phpinfo going and give us a link to it.