some small bugs in minibrowser.php some small bugs in minibrowser.php
 

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

some small bugs in minibrowser.php

Started by Andi, February 18, 2005, 04:07:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andi

Hello :)

note before: i've commented out the debugger function, because it hides me to much errors in my devel (vkpMx-Port) installation.

Now in minibrowser.php i get some small errors:

QuoteNotice: Undefined index: select_directory in D:\Localhost\dev-Coppermine\devel\minibrowser.php on line 82
The language variable $lang_minibrowser_php['select_directory']  is not defined everywhere.
I change the language array in /lang/english.php to this:
if (defined('MINIBROWSER_PHP')) $lang_minibrowser_php = array(
 'close' => 'close', //cpg 1.4
 'submit' => 'OK', //cpg 1.4
 'up' => 'up one level', //cpg 1.4
 'current_path' => 'current path', //cpg 1.4
 'select_directory' => 'please select a directory', //cpg 1.4
);


QuoteNotice: Undefined index: folder in D:\Localhost\dev-Coppermine\devel\minibrowser.php on line 151
On Startpage from minibrowser.php this variable is not defined. I've change this line to the following:
if ((!empty($_REQUEST['folder']) || !empty($_REQUEST['startfolder'])) && ($folder != '' && $folder!= '/')) {
Hmm, not sure if it's ok, but it seams to work...

QuoteNotice: Undefined index: PATH_TRANSLATED in D:\Localhost\dev-Coppermine\devel\include\functions.inc.php on line 2680
Notice: Undefined variable: HTTP_SERVER_VARS in D:\Localhost\dev-Coppermine\devel\include\functions.inc.php on line 2681
Notice: Undefined variable: HTTP_SERVER_VARS in D:\Localhost\dev-Coppermine\devel\include\functions.inc.php on line 2682
- $_SERVER['PATH_TRANSLATED'] is not defined on every PHP-Installations.
- the old servervariable HTTP_SERVER_VARS is not global in this function
my solution:
change line 2680 to this:
   if (isset($_SERVER["PATH_TRANSLATED"])) $path_from_serverroot[] = $_SERVER["PATH_TRANSLATED"];
and delete line 2681-2682
hope, I could help you... :)

Andi

Uuuups, edit the previous post...  :o

QuoteNotice: Undefined index: select_directory in D:\Localhost\dev-Coppermine\devel\minibrowser.php on line 82

I've seen, that the correct caption is printed out over the iFrame...

change line 82 in minibrowser.php to this:
starttable('99%');
hope, I could help you... :)

Andi

 still one ;)

The html-title Tag is not correct.

<title><?php echo $CONFIG['gallery_name'?>: <?php echo $lang_fullsize_popup['click_to_close'];
    
?>
</title>


The Variable $lang_fullsize_popup is not defined when minibrowser.php is active. And the message is not indicated anyway in a iframe.
i've change this lines to:
<title><?php echo $CONFIG['gallery_name'?></title>



ps, my versioninfo:
  Coppermine version: 1.4.1
  $Source: /cvsroot/coppermine/devel/minibrowser.php,v $
  $Revision: 1.9 $
  $Author: gaugau $
  $Date: 2005/01/23 08:05:29 $
hope, I could help you... :)

Joachim Müller

not sure how to keep track of the issues brought up on this thread - I committed some of the changes you suggested here, please check out minibrowser.php, include/functions.inc.php and lang/english.php
Please confirm changes and report what issues are still open for you.

Joachim

Andi

Ok, the "main-error" is fixed.
a picture says more than words:
hope, I could help you... :)

Tranz

Maybe it's a windows/apache2 thing. I get this in Notices:
Quote\bridge\coppermine.inc.php

    * Notice line 45: Undefined index: HTTP_PROTOCOL

\searchnew.php

    * Notice line 551: Undefined variable: iframe_startfolder

I do have folders in the albums folder but it says:
QuoteThere are no folders inside the "albums" folder yet. Make sure to create at least one custom folder within "albums" folder and ftp-upload your files there. You mustn't upload to the "userpics" nor "edit" folders, they are reserved for http uploads and internal purposes.

If I say No to the browsable interface, the folders show up.

On my webhost server running linux, apache 1, the minibrowser works.

donnoman

we've fixed a few problems with the minibrowser due to some cross platform problems.

These issues are probably fixed as well, can you retest.

Andi

Hi :)

here the errors in detail:

QuoteNotice: Undefined index: HTTP_PROTOCOL in D:\Localhost\dev-Coppermine\devel\bridge\coppermine.inc.php on line 45
$_SERVER[HTTP_PROTOCOL] is never defined. Not in Windows and not in Linux.
- $_SERVER under Windows: http://pragma.cjb.net/inf.php
- the same file under Linux: http://vkp.shiba.de/inf.php
Should it be SERVER_PROTOCOL instead HTTP_PROTOCOL ?

QuoteNotice: Undefined variable: HTTP_SERVER_VARS in D:\Localhost\dev-Coppermine\devel\include\functions.inc.php on line 2672
Notice: Undefined variable: HTTP_SERVER_VARS in D:\Localhost\dev-Coppermine\devel\include\functions.inc.php on line 2673
$HTTP_SERVER_VARS is not superglobal. Use global $HTTP_SERVER_VARS; before line 2672.
Or delete this 2 Lines, because this:     $path_from_serverroot[] = $_SERVER["SCRIPT_FILENAME"];
    if (isset($_SERVER["PATH_TRANSLATED"])) {
       $path_from_serverroot[] = $_SERVER["PATH_TRANSLATED"];
    }
does exactly the same.


ps.
CVS checkout from today :)
hope, I could help you... :)

kegobeer

I'm not sure about the HTTP_PROTOCOL, but I think you are correct.  However, I'll let someone else comment on this.  The old globals are wrong and shouldn't be used.  They were all removed a long time ago, so I'm not sure where they came from.  I see a few more files with old variables in them as well.

Thanks.  Will fix shortly.
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

kegobeer

I fixed everything except the HTTP_PROTOCOL, until someone verifies SERVER_PROTOCOL is what should be used.  See if those notices go away now.
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

kegobeer

Changing HTTP_PROTOCOL to SERVER_PROTOCOL works fine for me.  Fixed but awaiting confirmation before I commit.
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

donnoman

#11
I believe omni is the one that added that code; I don't think it matters much if we change it to "SERVER_PROTOCOL", matter of fact I do think thats what was intended.

It is just used to create a semi-unique key to keep from having id collisions.


Joachim Müller

I agree, HTTP_PROTOCOL was added only recently. It doesn't work anywhere I tested this on - Donnoman, please commit your suggested changes.

Joachim

donnoman

Kego since you already have it done and tested, go ahead and commit.

Joachim Müller

urm, sorry - I didn't read carefully enough. Of course I meant you (Dave) as well, as you already prepared the fix.

Joachim

kegobeer

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