Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3   Go Down

Author Topic: CPG 1.4.8 - Error after installation is successful  (Read 18844 times)

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPG 1.4.8 - Error after installation is successful
« Reply #20 on: August 18, 2006, 06:51:28 am »

Time to find a new webhost then imo.
Logged

callingrohit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: CPG 1.4.8 - Error after installation is successful
« Reply #21 on: August 18, 2006, 08:10:33 am »

well i would totally disagree with you. I don't see this as a correct approach to solving a technical problem.

Its alright if you say you can't help me solve my problem but don't atleast ask someone else to give up. next thing i know, if mysql doesn't work, you may ask me to again change my webhost.

Sorry gau gau but I totally disagree with this attitude. This may be a bug with the software or may not be a bug. See it from a technical point of view. Isn't open source for that ??? Broaden your views.....well, if anyone else has any technical suggestions as to what I can do to get CPG working on my webhost. I would be very glad.

Gaugau i hope you don't get offended by my above statements. Sorry if you do.

cheers
rohit
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: CPG 1.4.8 - Error after installation is successful
« Reply #22 on: August 18, 2006, 08:55:47 am »

okey let's check your host for those php functions ....
please copy the attached file to the root of gallery and execute it
it's safe file it just try to execute urldecode and getimagesize functions
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPG 1.4.8 - Error after installation is successful
« Reply #23 on: August 18, 2006, 08:59:28 am »

You're right - I misread your posting, should have read more carefully. You wrote
urldecode or getimagesize functions are not disabled by our host....
, but I misread it as
Quote
urldecode or getimagesize functions are disabled by our host....
. As a webhost shouldn't disable those innocent functions I suggested finding a new one. Sorry again for misreading and subsequently giving wrong advice, please accept my apologies.
Logged

callingrohit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: CPG 1.4.8 - Error after installation is successful
« Reply #24 on: August 18, 2006, 09:04:09 am »

Hi,

here's the output :

Executing urldecode Function:
Url of image is: /usr/shared/web/george/IMP/cpg/images/thumbnails.gif
Executing getimagesize Function:
Size Of image is: Array (
  • => 16 [1] => 16 [2] => 1 [3] => width="16" height="16" [bits] => 6 [channels] => 3 [mime] => image/gif )


I just made a little change in your code, i changed this line from backslash(\) to forward slash(/)
$tumb_path=$abpath.'/images/thumbnails.gif';


cheers
rohit
Logged

callingrohit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: CPG 1.4.8 - Error after installation is successful
« Reply #25 on: August 18, 2006, 09:06:30 am »

hey gau gau,

not a problem...glad we are on the same side .....

 :) ;) ;D

cheers
rohit
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: CPG 1.4.8 - Error after installation is successful
« Reply #26 on: August 18, 2006, 09:29:16 am »

Sorry but could you please check this again (I use urlencode to check patern matching or security mod on srver)

Quote
i changed this line from backslash(\) to forward slash(/)
:P windows stuff !
Logged
‍I don't answer to PM with support question
Please post your issue to related board

callingrohit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: CPG 1.4.8 - Error after installation is successful
« Reply #27 on: August 18, 2006, 09:48:02 am »

here you go,

here is encoded path: %2Fusr%2Fshared%2Fweb%2Fgeorge%2FIMP%2Fcpg%2Fimages%2Fthumbnails.gif
Executing urldecode Function:
Url of image is: /usr/shared/web/george/IMP/cpg/images/thumbnails.gif
Executing getimagesize Function:
Size Of image is: Array (
  • => 16 [1] => 16 [2] => 1 [3] => width="16" height="16" [bits] => 6 [channels] => 3 [mime] => image/gif )
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: CPG 1.4.8 - Error after installation is successful
« Reply #28 on: August 18, 2006, 10:10:12 am »

here is the code on line 1790 of functions.inc.php
Code: [Select]
$image_info = getimagesize(urldecode($pic_url));
It will be execute within cpg_get_system_thumb() function
when I check login.php I also got the error but there is no calling of cpg_get_system_thumb() function !!!
So it's occure on include statment under init.inc.php !
Sorry I can't help you more
Logged
‍I don't answer to PM with support question
Please post your issue to related board

callingrohit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: CPG 1.4.8 - Error after installation is successful
« Reply #29 on: August 18, 2006, 10:26:15 am »

i checked init.inc.php there is a statement " require 'include/functions.inc.php'; "....

when the getimagesize and urldecode functions work fine, why is this statement causing line 1790 to come up as a error ????

gaugau whatz your view on this...i noticed you have written the code ....its a nice software i must say......but i can't use it  :'( :'( :'(
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPG 1.4.8 - Error after installation is successful
« Reply #30 on: August 18, 2006, 07:09:04 pm »

I haven't actually written all of it, just some parts. My name just shows through in the header of that file, because I was the last developer editing the file before it got released - that's a feature of the colaboration software we use to maintain the code (Subversion). Often happens that users who are not familiar with such apps mistake the existance of a dev name in the file header for the actual dev who coded it. Usually, this is not the case, as Coppermine is a team effort.

Back to your issue: I'm a bit confused about this thread, I'm not sure what to suggest. To me, it still appears as if some of your files are corrupt. I have no idea what else to suggest except replacing all files with fresh ones, using a fresh copy from a different mirror. You might as well try uploading it using another FTP client from another desktop PC. I'm convinced that you tried all this before, but I can't help it - looks like a file corruption error to me.
Logged

Nibbler

  • Guest
Re: CPG 1.4.8 - Error after installation is successful
« Reply #31 on: August 18, 2006, 07:41:44 pm »

Rename include/functions.inc.php to functions.txt on your server so we can take a look at it.
Logged

callingrohit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: CPG 1.4.8 - Error after installation is successful
« Reply #32 on: August 19, 2006, 06:23:00 am »

Here you go nibbler

http://www.georgesofnorwood.com.au/IMP/cpg/include/functions.txt

Also, gau gau i'll try to upload the files again with another FTP software.

cheers
rohit
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPG 1.4.8 - Error after installation is successful
« Reply #33 on: August 19, 2006, 06:32:54 am »

Not sure where you got your copy from, it differs from the one that was released with cpg1.4.8. Get the most recent file from the stable branch of the svn: http://svn.sourceforge.net/viewvc/coppermine/trunk/stable/include/functions.inc.php
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: CPG 1.4.8 - Error after installation is successful
« Reply #34 on: August 19, 2006, 06:36:39 am »

you have this code from line 1790~1844 ( all these lines are wrong and are not belong here)
Code: [Select]
$ readdir($dir))!==false) {
                        if (is_file($folder . $file) && strpos($file,$thumb_pfx) === 0) {
                                // Store filenames in an array
                                $thumbs[] = array('filename' => $file);
                        }
                }
                closedir($dir);
                return $thumbs;
        } elseif ($folder == $search_folder) {
                // Search folder is the same as coppermine images folder; just return the array
                return $thumbs;
        } else {
                // Search folder is the different; check for files in the given folder
                $results = array();
                foreach ($thumbs as $thumb) {
                        if (is_file($search_folder.$thumb['filename'])) {
                                $results[] = array('filename' => $thumb['filename']);
                        }
                }
                return $results;
        }
}


/**
 * cpg_get_system_thumb()
 *
 * Gets data for system thumbs
 *
 * @param string $filename
 * @param integer $user
 * @return array
 **/

function& cpg_get_system_thumb($filename,$user=10001)
{
        global $CONFIG,$USER_DATA;

        // Correct user_id
        if ($user<10000)
        {
                $user += 10000;
        }

        if ($user==10000) {
                $user = 10001;
        }

        // Get image data for thumb
        $picdata = array('filename'=>$filename,
                         'filepath'=>$CONFIG['userpics'].$user.'/',
                         'url_prefix'=>0);
        $pic_url = get_pic_url($picdata,'thumb',true);
        $picdata['thumb'] = $pic_url;
        $image_info = getimagesize(urldecode($pic_url));
This is not orginal function.inc.php !!! this is totally coruppted ! (may be wrong copy & paste)
Do as gaugau suggested
Logged
‍I don't answer to PM with support question
Please post your issue to related board

callingrohit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: CPG 1.4.8 - Error after installation is successful
« Reply #35 on: August 19, 2006, 06:40:49 am »

ok, I went to that site, now did you guys want me to just download that functions.inc.php file only or the whole package. if so do you have a zip/ tar file to download because otherwise it will take a long time for me to click on all individual files to download them.

I usually go to CPG's download centre which directs me to sourceforge and from there i select cpg148 stable and select any mirror to download it.....

i hope this works...so that we can close this post.....i'm starting to get sucidal on this.... ;D

cheers
rohit
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: CPG 1.4.8 - Error after installation is successful
« Reply #36 on: August 19, 2006, 06:48:12 am »

Do as GauGau Suggested:
Only update your function.inc.php ,
download it from:
http://svn.sourceforge.net/viewvc/coppermine/trunk/stable/include/functions.inc.php
if you have problem let me know I'll attach it to this thread ;)

Update:
Easiest way could be just remove those lines from your functions.inc.php
« Last Edit: August 19, 2006, 07:06:25 am by bmossavari »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPG 1.4.8 - Error after installation is successful
« Reply #37 on: August 19, 2006, 07:02:54 am »

There's something fishy with WebSVN - just use the file I attached to my posting (you'll have to rename it to functions.inc.php).
Logged

callingrohit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: CPG 1.4.8 - Error after installation is successful
« Reply #38 on: August 19, 2006, 09:28:36 am »

hey guys,

no luck.....i guess cpg just doesn't like me.......hee hee

well i'll download the folder again and upload it tomorrow....do you guys recommend any particular mirror that comes listed under sourceforge.....

do let me know....
cheers
rohit
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPG 1.4.8 - Error after installation is successful
« Reply #39 on: August 19, 2006, 09:38:15 am »

What's wrong with the file I attached to my previous posting? Why didn't you use that?
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.023 seconds with 19 queries.