CPG 1.4.8 - Error after installation is successful - Page 2 CPG 1.4.8 - Error after installation is successful - Page 2
 

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

CPG 1.4.8 - Error after installation is successful

Started by callingrohit, August 14, 2006, 07:45:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joachim Müller


callingrohit

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

Sami

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
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

You're right - I misread your posting, should have read more carefully. You wrote
Quote from: callingrohit on August 18, 2006, 04:44:31 AM
urldecode or getimagesize functions are not disabled by our host....
, but I misread it as
Quoteurldecode 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.

callingrohit

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

callingrohit

hey gau gau,

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

:) ;) ;D

cheers
rohit

Sami

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

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

callingrohit

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 )

Sami

here is the code on line 1790 of functions.inc.php

$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
‍I don't answer to PM with support question
Please post your issue to related board

callingrohit

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  :'( :'( :'(

Joachim Müller

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.

Nibbler

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

callingrohit

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

Joachim Müller

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

Sami

you have this code from line 1790~1844 ( all these lines are wrong and are not belong here)

$ 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
‍I don't answer to PM with support question
Please post your issue to related board

callingrohit

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

Sami

#36
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
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

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).

callingrohit

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

Joachim Müller

What's wrong with the file I attached to my previous posting? Why didn't you use that?