forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: handsome on June 20, 2006, 08:19:31 am

Title: index is not working :-s
Post by: handsome on June 20, 2006, 08:19:31 am
My gallery is OK every think is ok all pages are working

but index page is not opening :(

plz check

http://pakmale.awardspace.com/gallery/
Title: Re: index is not working :-s
Post by: Vargha on June 20, 2006, 08:22:50 am
mayb i see the code of your index.php
what version are you using
Title: Re: index is not working :-s
Post by: Sami on June 20, 2006, 08:31:46 am
- everything is ok but index.php ( cpg ver is 1.4.8 )
- did you delete or edit your index.php
- may be your hosting add redirect or somthing to index.php
Title: Re: index is not working :-s
Post by: Vargha on June 20, 2006, 08:37:55 am
hey i think you have a index.htm or html in ur directory too
but umm you mustve done something in ur index.php
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 08:46:44 am
mayb i see the code of your index.php
what version are you using


cpg ver is 1.4.8
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 08:48:59 am
- everything is ok but index.php ( cpg ver is 1.4.8 )
- did you delete or edit your index.php
- may be your hosting add redirect or somthing to index.php


hmmmmmm


i have no change any think in page index.php


so what did i do now ?
Title: Re: index is not working :-s
Post by: Vargha on June 20, 2006, 08:49:37 am
yeah :)
i asked you to paste the code of your index.php with the insert code function :)
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 08:52:31 am
hey i think you have a index.htm or html in ur directory too
but umm you mustve done something in ur index.php


:-s

so now what can i do ?
Title: Re: index is not working :-s
Post by: Vargha on June 20, 2006, 08:53:18 am
 ::) do as i suggested please  :)
Title: Re: index is not working :-s
Post by: Sami on June 20, 2006, 09:02:32 am
first try to copy your index.php again
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 09:09:19 am
::) do as i suggested please  :)


Quote
<?php
/*************************
  Coppermine Photo Gallery
  Coppermine version: 1.4.8
  $Date: 2006-06-08
**********************************************/
/*
Coppermine Photo Gallery index.php
This file is main display for categories and album, also displays thumbnails
*/

if (!$file) {
    /**
    * Sets the flag for lang file
    */
    define('INDEX_PHP', true);

    require('include/init.inc.php');

    if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) {
        $redirect = $redirect . "login.php";
        header("Location: $redirect");
        exit();
    }

    if ($CONFIG['enable_smilies']) include("include/smilies.inc.php");

///////////////////////////////////////////////
// Main code
//
if (!$file) {

    /**
    * See if $page has been passed in GET
    */
    if (isset($_GET['page'])) {
        $PAGE = max((int)$_GET['page'], 1);
        $USER['lap'] = $PAGE;
    } elseif (isset($USER['lap'])) {
        $PAGE = max((int)$USER['lap'], 1);
    } else {
        $PAGE = 1;
    }

    /**
    * Loop through the $elements array to build the page using the parameters
    * set in the config
    */


    /**
    * See if $cat has been passed in GET
    */

    if (isset($_GET['cat'])) {
        $cat = (int)$_GET['cat'];
    }
    // Gather data for categories
    $breadcrumb = '';
    $cat_data = array();
    $statistics = '';
    $STATS_IN_ALB_LIST = false;

    $cpg_show_private_album = ($CONFIG['allow_private_albums'])?($CONFIG['show_private']):(true);

    if (isset($cat)) {
        get_meta_album_set($cat,$META_ALBUM_SET);
    } else {
        get_meta_album_set(0,$META_ALBUM_SET);
    }

    get_cat_list($breadcrumb, $cat_data, $statistics);

    pageheader($BREADCRUMB_TEXT ? $BREADCRUMB_TEXT : $lang_index_php['welcome']);

    $elements = preg_split("|/|", $CONFIG['main_page_layout'], -1, PREG_SPLIT_NO_EMPTY);

    foreach ($elements as $element) {
        if (preg_match("/(\w+),*(\d+)*/", $element, $matches)){
            if (!isset($matches[2])) { // added to fix notice about undefined index
                $matches[2] = 0;
            }

            $matches = CPGPluginAPI::filter('plugin_block', $matches);

            if (is_array($matches)) {
                switch ($matches[1]) {
                    case 'breadcrumb':
                        // Added breadcrumb as a separate listable block from config
                        if (($breadcrumb != '' || count($cat_data) > 0) && $cat != 0) theme_display_breadcrumb($breadcrumb, $cat_data);
                        break;

                    case 'catlist':
                        if ($breadcrumb != '' || count($cat_data) > 0) theme_display_cat_list($breadcrumb, $cat_data, $statistics);
                        if (isset($cat) && $cat == USER_GAL_CAT) {
                            list_users();
                        }
                        flush();
                        break;

                    case 'alblist':
                        list_albums();
                        flush();
                        break;

                    case 'random':
                        display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break;

                    case 'lastup':
                        display_thumbnails('lastup', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break;

                    case 'lastalb':
                        display_thumbnails('lastalb', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        break;

                    case 'topn':
                        display_thumbnails('topn', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break;

                    case 'toprated':
                        display_thumbnails('toprated', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break;

                    case 'lastcom':
                        display_thumbnails('lastcom', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break;

                    case 'lasthits':
                        display_thumbnails('lasthits', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                        flush();
                        break;

                    case 'anycontent':
                        if ($cat == 0) {
                            ob_start();
                            /**
                             * Any php code or HTML can be put in this file and will be displayed
                             */
                            include('anycontent.php');
                            $anycontent = CPGPluginAPI::filter('anycontent',ob_get_contents());
                            ob_end_clean();
                            echo ($anycontent);
                        }
                        flush();
                        break;
                }
            }
        }
    }

    pagefooter();
}

ob_end_flush();
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 09:17:28 am
first try to copy your index.php again


i have done it

but still not working :(
Title: Re: index is not working :-s
Post by: Vargha on June 20, 2006, 09:18:46 am
ur index.php has problems
wait actually u didnt copy the whole code did u  ???
Title: Re: index is not working :-s
Post by: Sami on June 20, 2006, 09:20:11 am
this is not regular index.php !
- are you using any auto installer, somthing like fantastico ?
- the solution (as I said before) is to copy orginal index.php that comes with 1.4.8 package.
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 09:33:34 am
ur index.php has problems
wait actually u didnt copy the whole code did u  ???


yes it is the whole cod
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 09:36:01 am
this is not regular index.php !
- are you using any auto installer, somthing like fantastico ?
- the solution (as I said before) is to copy orginal index.php that comes with 1.4.8 package.


hmm ok itry it again
Title: Re: index is not working :-s
Post by: Vargha on June 20, 2006, 09:39:13 am
look if it didnt work delete your index.php and use the one i attached
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 09:44:18 am
look if it didnt work delete your index.php and use the one i attached


can u plz send me this code at handsomeprince1@gmail.com ?


i can not attach the file due to some server problem
Title: Re: index is not working :-s
Post by: Vargha on June 20, 2006, 09:53:23 am
if u look i have attached it 4u
its here
http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=32887.0;attach=4223
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 09:59:26 am
if u look i have attached it 4u
its here
http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=32887.0;attach=4223

yeah thanks for it

but dear i can not download it due to server problem plz send me at handsomeprince1@gmail.com
Title: Re: index is not working :-s
Post by: Vargha on June 20, 2006, 10:01:15 am
sorry i misunderstood u i sent it ;)
Title: Re: index is not working :-s
Post by: Sami on June 20, 2006, 10:04:52 am
Quote
- are you using any auto installer, somthing like fantastico ?
would you please nswer that Question
thank you
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 10:45:23 am
would you please nswer that Question
thank you


oppes sorry

 no i am not using any auto installer, somthing like fantastico
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 11:00:21 am
hmm thanks for help every body


i think problem with Hsting not with gallery

any way can any body tell me a web from where i can get some good gallery like coppermine gallery or some hosting web from where i can get free hosting fo coppermine gallery
Title: Re: index is not working :-s
Post by: Sami on June 20, 2006, 11:06:45 am
- first search, then ask
search the board for "hosting" or "free hosting" or ...
- one issue per thread (if you can't find your answer with searching the forum then create a new thread and ask it)
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 11:13:38 am
is it working now ???


http://pakmale.awardspace.com/gallery/index.php
Title: Re: index is not working :-s
Post by: Vargha on June 20, 2006, 11:18:24 am
no its not, it said that mysql error
u didnt install it properly
delete include/install.lock and run install.php again
Title: Re: index is not working :-s
Post by: Sami on June 20, 2006, 11:24:03 am
No!
- now you have a database issue , it said:
Code: [Select]
Coppermine critical error:
Unable to connect to database !
I'm sure , all this issue is from your index.php , may be your webhost (they modified index.php or they inject live code to it or something simillar) do that.
- deleting install.lock will not help you (cause other pages are fine check admin.php you will see),ask for hosting support

Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 11:44:24 am
now it is working

http://pakmale.awardspace.com/gallery/index.php


bale bale  ;D


its time of party  :D
Title: Re: index is not working :-s
Post by: Vargha on June 20, 2006, 11:45:21 am
nice work  ;)
bale bale? LOL sounds persian  ;D
wat did u do to fix it  :)
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 11:49:07 am
i have delete include/install.lock and run install.php again

bale bale is sound of happines in Urdu (Pakistani language) muahahahhaha
Title: Re: index is not working :-s
Post by: Vargha on June 20, 2006, 11:50:05 am
nice  ;)
okay it doesnt sound persian anymore  ;D
Title: Re: index is not working :-s
Post by: handsome on June 20, 2006, 11:57:45 am
nice  ;)
okay it doesnt sound persian anymore  ;D


lolz ok jeee  ::)
Title: Re: index is not working :-s
Post by: Joachim Müller on June 20, 2006, 10:48:03 pm
Don't use attachments posted here, but a fresh copy from the most recent package (currently cpg1.4.8) from the downloads page. If downloading an attachment doesn't work for you, try another browser.