change theme = 404 change theme = 404
 

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

change theme = 404

Started by rl096, July 23, 2004, 09:15:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rl096

Hello,

I am using:
  • CPG: 1.3.1
    hosted by: canaca
    web server: Apache/2.0.48 (Fedora)
    my gallery url:  http://photos.mptpro.com
    no mods or changes.

When changing themes from the .index page using the drop down selector I get a 404 error.



http://photos.mptpro.com/var/subdomain/photos/html/config.php?theme=rainy_day



Obviosuly, somewhere there is a path mistake, because it is going to the subdomain path of my server.

When changing themes via the "config" area there is no problem.  I have checked my paths and the *seem* to be correct.  In config, the "Target address for the 'See more pictures' link in e-cards" is http://www.photos.mptpro.com

any help is greatly appreciated.

Joachim Müller

This boils down to your webserver having some "exotic" server var setting, the line in question is$cpgCurrentTheme = $_SERVER["SCRIPT_NAME"]."?";in include/functions.inc.php
Please consult your phpinfo and see what it says for $_SERVER["SCRIPT_NAME"] and report back. Thanks.

GauGau

rl096

thanks

Do you mean the phpinfo.php file?  In that file I didn't find any such reference.  Here is a dump of it...


<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.3.1                                            //
// ------------------------------------------------------------------------- //
// Copyright (C) 2002-2004 Gregory DEMAR                                     //
// http://www.chezgreg.net/coppermine/                                       //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team                                        //
// (http://coppermine.sf.net/team/)                                          //
// see /docs/credits.html for details                                        //
// ------------------------------------------------------------------------- //
// 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.                                       //
// ------------------------------------------------------------------------- //
// CVS version: $Id: phpinfo.php,v 1.4 2004/07/09 06:57:34 gaugau Exp $
// ------------------------------------------------------------------------- //

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

$CONFIG['debug_mode']=0;



pageheader($lang_cpg_debug_output['phpinfo']);

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

} else {

    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();
}
?>

Joachim Müller

I wanted you to inspect the output of the file, not the file itself. You will have to post the output here, you can not post a link (it's not accessible for non-admins).

You could as well generate a file called foo.php with this content <?php phpinfo(); ?>, upload it and browse it, the result would be the same.

GauGau

rl096

thanks.

_SERVER["SCRIPT_NAME"] /var/subdomain/photos/html/phpinfo.php

Joachim Müller

ok, apparently this var is configured "exoticly" on your server. Consult your phpinfo page again, and look for all vars that contain /phpinfo.php only with nothing in front of it. Post the results here.

GauGau

Dasani

 ???
I use that hosting and have the same problem.
Here my phpinfo file:
http://photos.quzel.com/foo.php
And I actually have the same problems with other scripts and the hosting support keep saying me, that this is scripts errors. :(
Help me please to fix this problem.
Thank u.

kegobeer

If you use that hosting and have the same problem I recommend finding another host.  You also need to read this thread and do what Joachim requested: post all variables and their output if they contain phpinfo.php.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

try $_SERVER["PHP_SELF"]. Posting a link to your phpinfo file is not a good idea. Remove it from your server, a possible attacker might use it against you.

Dasani

Ok... I can change the skins now :) Thank u... but others scripts doesn't work well as well... is it possible to make any changes to php.ini?
Thank u very much for all your help!

Joachim Müller

You can only change php.ini if the server is yours to administer (i.e. you're self-hosted). If you're webhosted, you usually can't change php.ini. You could ask your webhost to change it for you though.

Dasani

Quote from: GauGau on June 07, 2005, 06:50:07 AM
You can only change php.ini if the server is yours to administer (i.e. you're self-hosted). If you're webhosted, you usually can't change php.ini. You could ask your webhost to change it for you though.
I can change php.ini
I have access to anywhere :)
http://www.quzel.com/ftp.gif
Could u please tell me, what can I change in php.ini
Thank u.