forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: jpaffett on April 26, 2005, 03:17:51 pm

Title: Browsable interface for batch add files
Post by: jpaffett on April 26, 2005, 03:17:51 pm
Running 1.4.1 on Windows XP/Apache the browsable interface works fine. With the same version on OS X/Apache I get the message 'There are no folders inside the "albums" folder yet etc.' I can see folders in the normal interface.
Title: Re: Browsable interface for batch add files
Post by: Tranz on April 26, 2005, 04:27:11 pm
Do you have the version from the cvs? I know there was some issue with the interface a while back. It had to do with the server setup.
Title: Re: Browsable interface for batch add files
Post by: jpaffett on April 26, 2005, 04:39:16 pm
I'm running the latest version from anonymous cvs. This is the dump from the debugger:

Quote
USER:
------------------
Array
(
    [ID] => d996ada4c9bf80652e644b35e7bd1843
    [am] => 1
    [liv] => Array
        (
           
  • => 22
  • [1] => 23
                [2] => 24
                [3] => 25
                [4] => 26
            )

       
[lap] => 2
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 2
    [user_name] => Jeff
    [groups] => Array
        (
           
  • => 1

        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content, player FROM cpg132_filetypes; (0.02s)
  • [1] => select * from cpg132_plugins order by priority asc; (0.001s)
        [2] => SELECT group_id FROM cpg132_usergroups WHERE has_admin_access  (0.001s)
        [3] => SELECT user_id as user_id FROM `cpg140`.cpg132_users WHERE user_group in (1) (0.001s)
        [4] => delete from `cpg140`.cpg132_sessions where time<1114522524 and remember=0; (0.001s)
        [5] => delete from `cpg140`.cpg132_sessions where time<1113316524; (0s)
        [6] => select user_id from `cpg140`.cpg132_sessions where session_id=md5("0dafc9b0539edf747c53c746aa27b4cd9f0dbd4c070f8f008b31c6205d4eb03b"); (0.001s)
        [7] => select user_id as id, user_password as password from `cpg140`.cpg132_users where user_id=2 (0.001s)
        [8] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `cpg140`.cpg132_users AS u INNER JOIN `cpg140`.cpg132_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='2' (0.001s)
        [9] => SELECT user_group_list FROM `cpg140`.cpg132_users AS u WHERE user_id='2' and user_group_list <> ''; (0s)
        [10] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg132_usergroups WHERE group_id in (1) (0.001s)
        [11] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 1 (0s)
        [12] => update `cpg140`.cpg132_sessions set time='1114526124' where session_id=md5('0dafc9b0539edf747c53c746aa27b4cd9f0dbd4c070f8f008b31c6205d4eb03b'); (0.001s)
        [13] => SELECT user_favpics FROM cpg132_favpics WHERE user_id = 2 (0.001s)
        [14] => SHOW TABLES LIKE 'cpg132_cms_config' (0.001s)
        [15] => SELECT * FROM cpg132_cms_config (0.001s)
        [16] => SELECT * FROM cpg132_mark_users WHERE user_id = 2 (0.001s)
        [17] => SELECT * FROM cpg132_mark_config (0.001s)
        [18] => DELETE FROM cpg132_banned WHERE expiry < '2005-04-26 14:35:24' (0.001s)
        [19] => SELECT * FROM cpg132_banned WHERE (ip_addr='192.168.0.1' OR ip_addr='192.168.0.1' OR user_id=2) AND brute_force=0 (0.001s)
        [20] => SELECT aid, title FROM cpg132_albums WHERE 1 (0.001s)
        [21] => SELECT COUNT(*) FROM cpg132_pictures WHERE approved = 'NO' (0.001s)
        [22] => UPDATE cpg132_config SET value = '1' WHERE name = 'browse_batch_add' (0.001s)
    )

    ==========================
    GET :
    ------------------
    Array
    (
    )

    ==========================
    POST :
    ------------------
    Array
    (
       
[browse_batch_add] => 1
    [update_config] => 1
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.4 - OK
------------------
mySQL version: 4.0.16-standard
------------------
Coppermine version: 1.4.1(beta)
==========================
Module: GD
------------------
GD Version: bundled (2.0.15 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
GIF Read Support: 1
GIF Create Support:
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 3.23.49
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /Private/tmp/mysql.sock
MYSQL_INCLUDE no value
MYSQL_LIBS no value
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.3
Linked Version 1.1.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/local/php/lib/php | .:/usr/local/php/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i  | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.51 seconds - 23 queries in 0.039 seconds - Album set : ; Meta set: ;
Title: Re: Browsable interface for batch add files
Post by: donnoman on April 27, 2005, 04:04:51 am
Post a PHPinfo JP, I bet you anything the problem is something like SCRIPT_NAME or PATH_TRANSLATED is being used to try and establish the absolute physical path which may not be available on your setup.
Title: Re: Browsable interface for batch add files
Post by: jpaffett on April 27, 2005, 06:26:43 am
Here's phpinfo:

Quote
PHP Version => 4.3.10

System => Darwin OSXSamba.local 7.8.0 Darwin Kernel Version 7.8.0: Wed Dec 22 14:26:17 PST 2004; root:xnu/xnu-517.11.1.obj~1/RELEASE_PPC  Power Macintosh
Build Date => Jan 23 2005 21:21:25
Configure Command =>  '/SourceCache/apache_mod_php/apache_mod_php-17.5/php/configure' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-apxs' '--with-ldap=/usr' '--with-kerberos=/usr' '--enable-cli' '--with-zlib-dir=/usr' '--enable-trans-sid' '--with-xml' '--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-mbregex' '--enable-dbx' '--enable-sockets' '--with-iodbc=/usr' '--with-curl=/usr' '--with-config-file-path=/etc' '--sysconfdir=/private/etc'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20021010
Debug Build => no
Thread Safety => disabled
Registered PHP Streams => php, http, ftp, compress.zlib 


This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


 _______________________________________________________________________


Configuration

PHP Core

Directive => Local Value => Master Value
allow_call_time_pass_reference => On => On
allow_url_fopen => On => On
always_populate_raw_post_data => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => no value => no value
default_mimetype => text/html => text/html
define_syslog_variables => Off => Off
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => On => On
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => no value => no value
expose_php => On => On
extension_dir => /usr/lib/php/extensions/no-debug-non-zts-20020429 => /usr/lib/php/extensions/no-debug-non-zts-20020429
file_uploads => On => On
gpc_order => GPC => GPC
highlight.bg => #FFFFFF => #FFFFFF
highlight.comment => #FF8000 => #FF8000
highlight.default => #0000BB => #0000BB
highlight.html => #000000 => #000000
highlight.keyword => #007700 => #007700
highlight.string => #DD0000 => #DD0000
html_errors => Off => On
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => Off
include_path => .:/usr/lib/php => .:/usr/lib/php
log_errors => Off => Off
log_errors_max_len => 1024 => 1024
magic_quotes_gpc => On => On
magic_quotes_runtime => Off => Off
magic_quotes_sybase => Off => Off
max_execution_time => 0 => 30
max_input_time => -1 => -1
open_basedir => no value => no value
output_buffering => 0 => 0
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
register_argc_argv => On => On
register_globals => Off => Off
report_memleaks => On => On
safe_mode => Off => Off
safe_mode_exec_dir => /usr/local/php/bin => /usr/local/php/bin
safe_mode_gid => Off => Off
safe_mode_include_dir => no value => no value
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i  => /usr/sbin/sendmail -t -i
serialize_precision => 100 => 100
short_open_tag => On => On
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
variables_order => no value => no value
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
y2k_compliance => On => On

ctype

ctype functions => enabled

curl

CURL support => enabled
CURL Information => libcurl/7.10.2 OpenSSL/0.9.7b zlib/1.1.4

dbx

dbx support => enabled
dbx version => 1.0.0
supported databases => MySQL
ODBC
PostgreSQL
Microsoft SQL Server
FrontBase
Oracle 8 (oci8)
Sybase-CT

Directive => Local Value => Master Value
dbx.colnames_case => unchanged => unchanged

exif

EXIF Support => enabled
EXIF Version => 1.4 $Id: exif.c,v 1.118.2.29 2004/11/10 01:44:58 iliaa Exp $
Supported EXIF Version => 0220
Supported filetypes => JPEG,TIFF

ftp

FTP support => enabled

ldap

LDAP Support => enabled
RCS Version => $Id: ldap.c,v 1.130.2.10 2004/06/01 21:05:33 iliaa Exp $
Total Links => 0/unlimited
API Version => 2004
Vendor Name => OpenLDAP
Vendor Version => 20122

mbstring

Multibyte Support => enabled
Japanese support => enabled
Simplified chinese support => enabled
Traditional chinese support => enabled
Korean support => enabled
Russian support => enabled
Multibyte (japanese) regex support => enabled

                                        mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.                                       

Directive => Local Value => Master Value
mbstring.detect_order => no value => no value
mbstring.encoding_translation => Off => Off
mbstring.func_overload => 0 => 0
mbstring.http_input => pass => pass
mbstring.http_output => pass => pass
mbstring.internal_encoding => ISO-8859-1 => no value
mbstring.language => neutral => neutral
mbstring.substitute_character => no value => no value

mysql

MySQL Support => enabled
Active Persistent Links => 0
Active Links => 0
Client API version => 3.23.49
MYSQL_MODULE_TYPE => builtin
MYSQL_SOCKET => /tmp/mysql.sock
MYSQL_INCLUDE => 
MYSQL_LIBS => 

Directive => Local Value => Master Value
mysql.allow_persistent => On => On
mysql.connect_timeout => 60 => 60
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => no value => no value
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysql.trace_mode => Off => Off

odbc

ODBC Support => enabled
Active Persistent Links => 0
Active Links => 0
ODBC library => iodbc
ODBC_INCLUDE => -I/usr/include
ODBC_LFLAGS => -L/usr/lib
ODBC_LIBS => -liodbc

Directive => Local Value => Master Value
odbc.allow_persistent => On => On
odbc.check_persistent => On => On
odbc.default_db => no value => no value
odbc.default_pw => <i>no value</i> => <i>no value</i>
odbc.default_user => no value => no value
odbc.defaultbinmode => return as is => return as is
odbc.defaultlrl => return up to 4096 bytes => return up to 4096 bytes
odbc.max_links => Unlimited => Unlimited
odbc.max_persistent => Unlimited => Unlimited

overload

User-Space Object Overloading Support => enabled

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 4.5 01-December-2003

posix

Revision => $Revision: 1.51.2.2 $

session

Session Support => enabled
Registered save handlers => files user

Directive => Local Value => Master Value
session.auto_start => Off => Off
session.bug_compat_42 => On => On
session.bug_compat_warn => On => On
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => no value => no value
session.entropy_length => 0 => 0
session.gc_divisor => 100 => 100
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => /tmp => /tmp
session.serialize_handler => php => php
session.use_cookies => On => On
session.use_only_cookies => Off => Off
session.use_trans_sid => Off => Off

sockets

Sockets Support => enabled

standard

Regex Library => Bundled library enabled
Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i

Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
safe_mode_allowed_env_vars => PHP_ => PHP_
safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH
url_rewriter.tags => a=href,area=href,frame=src,form=,fieldset= => a=href,area=href,frame=src,form=,fieldset=
user_agent => no value => no value

tokenizer

Tokenizer Support => enabled

xml

XML Support => active
XML Namespace Support => active
EXPAT Version => 1.95.6

zlib

ZLib Support => enabled
Compiled Version => 1.1.4
Linked Version => 1.1.4

Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value

Additional Modules

Module Name

Environment

Variable => Value
TERM_PROGRAM => Apple_Terminal
TERM => xterm-color
SHELL => /bin/bash
TERM_PROGRAM_VERSION => 100.1.4
USER => jeffpaff
SSH_AUTH_SOCK => /tmp/501/SSHKeychain.socket
__CF_USER_TEXT_ENCODING => 0x1F5:0:2
PATH => /bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/local/mysql/bin
PWD => /Users/jeffpaff/Sites
SHLVL => 1
HOME => /Users/jeffpaff
LOGNAME => jeffpaff
CVS_RSH => ssh
SECURITYSESSIONID => 210bb0
_ => /usr/bin/php
OLDPWD => /Users/jeffpaff

PHP Variables

Variable => Value
_SERVER["TERM_PROGRAM"] => Apple_Terminal
_SERVER["TERM"] => xterm-color
_SERVER["SHELL"] => /bin/bash
_SERVER["TERM_PROGRAM_VERSION"] => 100.1.4
_SERVER["USER"] => jeffpaff
_SERVER["SSH_AUTH_SOCK"] => /tmp/501/SSHKeychain.socket
_SERVER["__CF_USER_TEXT_ENCODING"] => 0x1F5:0:2
_SERVER["PATH"] => /bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/local/mysql/bin
_SERVER["PWD"] => /Users/jeffpaff/Sites
_SERVER["SHLVL"] => 1
_SERVER["HOME"] => /Users/jeffpaff
_SERVER["LOGNAME"] => jeffpaff
_SERVER["CVS_RSH"] => ssh
_SERVER["SECURITYSESSIONID"] => 210bb0
_SERVER["_"] => /usr/bin/php
_SERVER["OLDPWD"] => /Users/jeffpaff
_SERVER["PHP_SELF"] => test.php
_SERVER["SCRIPT_NAME"] => test.php
_SERVER["SCRIPT_FILENAME"] => test.php
_SERVER["PATH_TRANSLATED"] => test.php
_SERVER["DOCUMENT_ROOT"] =>
_SERVER["argv"] => Array
(
   
  • => test.php

)

_SERVER["argc"] => 1
_ENV["TERM_PROGRAM"] => Apple_Terminal
_ENV["TERM"] => xterm-color
_ENV["SHELL"] => /bin/bash
_ENV["TERM_PROGRAM_VERSION"] => 100.1.4
_ENV["USER"] => jeffpaff
_ENV["SSH_AUTH_SOCK"] => /tmp/501/SSHKeychain.socket
_ENV["__CF_USER_TEXT_ENCODING"] => 0x1F5:0:2
_ENV["PATH"] => /bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/local/mysql/bin
_ENV["PWD"] => /Users/jeffpaff/Sites
_ENV["SHLVL"] => 1
_ENV["HOME"] => /Users/jeffpaff
_ENV["LOGNAME"] => jeffpaff
_ENV["CVS_RSH"] => ssh
_ENV["SECURITYSESSIONID"] => 210bb0
_ENV["_"] => /usr/bin/php
_ENV["OLDPWD"] => /Users/jeffpaff

PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file:  LICENSE

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact license@php.net.
Title: Re: Browsable interface for batch add files
Post by: donnoman on April 28, 2005, 05:02:54 am
well now that I actually went and looked at the code, thats not the problem.

Code: [Select]
$dir_path = $CONFIG['fullpath'] . $folder

is whats used.

None of you files or folders have a single quote in them would they?
Title: Re: Browsable interface for batch add files
Post by: jpaffett on April 28, 2005, 06:12:47 am
No. I just took all the folders out and put in an empty one called test and still got the same problem.
Title: Re: Browsable interface for batch add files
Post by: tutone on May 26, 2005, 01:59:16 am
I am having the same problem...  Let me know what information i should provide that would be helpful.
Title: Re: Browsable interface for batch add files
Post by: donnoman on May 26, 2005, 03:45:38 am
tutone or JP can you post a directory structure listing so I can see all the filenames and folders that you are dealing with?
Title: Re: Browsable interface for batch add files
Post by: tutone on May 26, 2005, 08:31:42 am
donnoman,

I am not sure what you are asking for... a listing of my albums folder? What is the best way to get this? or are you asking for which cvs i am testing... i am updated as of today.  Sorry... let me know exactly what you want and the best way to give it to you and i will right away.

Title: Re: Browsable interface for batch add files
Post by: Tranz on May 26, 2005, 08:38:09 am
What OS are you using?
Title: Re: Browsable interface for batch add files
Post by: tutone on May 26, 2005, 08:43:50 am
Linux server. Win Xp Computer.
Title: Re: Browsable interface for batch add files
Post by: donnoman on May 28, 2005, 03:19:27 am
If you've been batch adding and you have a copy of the directory structure on your win xp machine go to the root of your albums directory and do

Code: [Select]
dir /s /b > files.txt

On windows that will create a text file with all the filenames.
Title: Re: Browsable interface for batch add files
Post by: tutone on May 28, 2005, 05:51:26 am
sorry... i don't have them on a local machine... would be about quite a bit to download.  Easier way?
Title: Re: Browsable interface for batch add files
Post by: kegobeer on May 28, 2005, 05:55:34 am
I'm running into the exact same issue.  1.4.1, browsable interface shows no albums, non-browsable interface shows "uploads".

Linux/PHP4.3.11/Apache1.3.33

Here's how I fixed it for my particular server setup:

In functions.inc.php, find

Code: [Select]
$filename = ltrim(strrchr($_SERVER['PHP_SELF'], '/'), '/');
replace with

Code: [Select]
//$filename = ltrim(strrchr($_SERVER['PHP_SELF'], '/'), '/');
$filename = substr($_SERVER["SCRIPT_FILENAME"],0,strrpos($_SERVER["SCRIPT_FILENAME"],'/'));
Title: Re: Browsable interface for batch add files
Post by: tutone on May 28, 2005, 07:48:46 am
kegobeer,

Tried that... didn't work for me.

My setup is:

Linux/PHP 4.3.11/Apache 1.3.31
Title: Re: Browsable interface for batch add files
Post by: kegobeer on May 28, 2005, 01:47:48 pm
@tutone: Make a phpinfo file and then paste the output into your next message.  We need to see what variables are being set.
Title: Re: Browsable interface for batch add files
Post by: tutone on May 28, 2005, 06:33:12 pm
Here you go... let me know if you need anything else

Quote



PHP Version 4.3.11

System  Linux linhost210.prod.mesa1.secureserver.net 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 
Build Date  Apr 12 2005 13:30:20 
Configure Comxd  './configure' '--with-cgi' '--enable-fastcgi' '--with-config-file-path=/web/conf' '--with-gd' '--with-xml' '--with-gettext' '--with-zlib-dir=/usr/src/zlib' '--disable-posix' '--with-jpeg-dir=../jpeg-6b' '--enable-gd-native-ttf' '--enable-ftp' '--with-freetype-dir=/usr' '--with-freetype' '--with-sybase=/usr/src/freetds' '--with-curl=/usr/bin/curl' '--with-dom' '--enable-calendar' '--enable-soap' '--enable-bcmath' 
Server API  CGI/FastCGI 
Virtual Directory Support  disabled 
Configuration File (php.ini) Path  /web/conf/php.ini 
PHP API  20020918 
PHP Extension  20020429 
Zend Extension  20021010 
Debug Build  no 
Thread Safety  disabled 
Registered PHP Streams  php, http, ftp, compress.zlib 

This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with Zend Extension xager v1.0.6, Copyright (c) 2003-2004, by Zend Technologies with Zend Optimizer v2.5.7, Copyright (c) 1998-2004, by Zend Technologies 


--------------------------------------------------------------------------------

Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 2047 2039
expose_php Off Off
extension_dir ./ ./
file_uploads On On
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/local/lib/php .:/usr/local/lib/php
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 30 30
max_input_time 60 60
open_basedir no value no value
output_buffering no value no value
output_handler no value no value
post_max_size 8M 8M
precision 12 12
register_argc_argv On On
register_globals On On
report_memleaks On On
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir ~ ~
sendmail_from me@localhost.com me@localhost.com
sendmail_path /usr/sbin/sendmail -t -i  /usr/sbin/sendmail -t -i 
serialize_precision 100 100
short_open_tag On On
SMTP relay-hosting.secureserver.net relay-hosting.secureserver.net
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 8M 8M
upload_tmp_dir /tmp /tmp
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On


Zend Optimizer
Optimization Pass 1  enabled 
Optimization Pass 2  enabled 
Optimization Pass 3  enabled 
Optimization Pass 4  enabled 
Optimization Pass 9  disabled 
Zend Loader  enabled 
License Path  no value 


bcmath
BCMath support  enabled 


calendar
Calendar support  enabled 


ctype
ctype functions  enabled 


curl
CURL support  enabled 
CURL Information  libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.1.4 


domxml
DOM/XML  enabled 
DOM/XML API Version  20020815 
libxml Version  20609 
HTML Support  enabled 
XPath Support  enabled 
XPointer Support  enabled 


ftp
FTP support  enabled 


gd
GD Support  enabled 
GD Version  bundled (2.0.28 compatible) 
FreeType Support  enabled 
FreeType Linkage  with freetype 
GIF Read Support  enabled 
GIF Create Support  enabled 
JPG Support  enabled 
PNG Support  enabled 
WBMP Support  enabled 
XBM Support  enabled 


gettext
GetText Support  enabled 


mysql
MySQL Support enabled
Active Persistent Links  0 
Active Links  1 
Client API version  3.23.49 
MYSQL_MODULE_TYPE  builtin 
MYSQL_SOCKET  /tmp/mysql.sock 
MYSQL_INCLUDE  no value 
MYSQL_LIBS  no value 

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout -1 -1
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off


overload
User-Space Object Overloading Support  enabled 


pcre
PCRE (Perl Compatible Regular Expressions) Support  enabled 
PCRE Library Version  4.5 01-December-2003 


session
Session Support  enabled 
Registered save handlers  files user 

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off


standard
Regex Library  Bundled library enabled 
Dynamic Library Support  enabled 
Path to sendmail  /usr/sbin/sendmail -t -i 

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ LANG LANG_ PHP_ LANG LANG_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset= a=href,area=href,frame=src,input=src,form=,fieldset=
user_agent no value no value


sybase
Sybase Support  enabled 
Allow Persistent Links  Yes 
Persistent Links  0/unlimited 
Total Links  0/unlimited 
Application Name  PHP 4.3.11 
Client API Version  $Id: dblib.c,v 1.59 2002/09/14 20:36:22 jklowden Exp $ 


tokenizer
Tokenizer Support  enabled 


xml
XML Support  active 
XML Namespace Support  active 
EXPAT Version  1.95.6 


zlib
ZLib Support  enabled 
Compiled Version  1.1.4 
Linked Version  1.1.4 

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value


Additional Modules
Module Name


Environment
Variable Value
SCRIPT_NAME  /portal/gallery/phpinfo.php 
PATH_TRANSLATED  /home/content/m/a/n/xickel/html/portal/gallery/phpinfo.php 
SCRIPT_FILENAME  /cgi-bin/php 
DOCUMENT_ROOT  /home/content/m/a/n/xickel/html 
HTTP_ACCEPT_ENCODING  gzip, deflate 
HTTP_ACCEPT_LANGUAGE  en-us 
HTTP_CONNECTION  Keep-Alive 
HTTP_COOKIE  mosadmin=f270ef31c1a589f7adba8c56d1897daf; webfxtab_configPane=9; PHPSESSID=1a5e2570a67f5953aac2c66b6ad7d951; cpg132_data=YTo0OntzOjI6IklEIjtzOjMyOiIxYzg4NzcwMTI0NjEyOWM0MmI1MWIxZTVlNGRiM2ViMyI7czoyOiJhbSI7aToxO3M6MzoibGl2IjthOjU6e2k6MDtzOjM6IjMyNyI7aToxO3M6MzoiMzI2IjtpOjI7czozOiIzMjUiO2k6MztzOjM6IjMyNCI7aTo0O3M6MzoiMzIzIjt9czozOiJ1aWQiO2k6ODA7fQ%3D%3D; sessioncookie=58c0c17613e97814a52bd3ec1212c57a; 1d8399ec45daf946f5c131b56055422a=6aa9a7fbfa2e2072ae6141d733442ee0; usercookie[username]=x; usercookie[password]=3674dce0e2adf99ff3646d56868b324e 
HTTP_HOST  www.xickel.com 
HTTP_REFERER  http://www.xickel.com/portal/gallery/util.php 
HTTP_USER_AGENT  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) 
REMOTE_ADDR  68.231.29.148 
REMOTE_PORT  62807 
SCRIPT_URI  http://www.xickel.com/portal/gallery/phpinfo.php 
SCRIPT_URL  /portal/gallery/phpinfo.php 
SERVER_ADMIN  support@supportwebsite.com 
SERVER_NAME  www.xickel.com 
SERVER_PORT  80 
SERVER_SOFTWARE  Apache/1.3.31 (Unix) mod_tsunami/2.0 FrontPage/5.0.2.2634 mod_ssl/2.8.19 OpenSSL/0.9.7a 
GATEWAY_INTERFACE  CGI/1.1 
SERVER_PROTOCOL  HTTP/1.1 
REQUEST_METHOD  GET 
QUERY_STRING  no value 
REQUEST_URI  /portal/gallery/phpinfo.php 
PATH_INFO  /portal/gallery/phpinfo.php 
PATH  /bin:/usr/bin:/usr/local/bin 


PHP Variables
Variable Value
PHP_SELF  phpinfo.php 
_REQUEST["mosadmin"] f270ef31c1a589f7adba8c56d1897daf
_REQUEST["webfxtab_configPane"] 9
_REQUEST["PHPSESSID"] 1a5e2570a67f5953aac2c66b6ad7d951
_REQUEST["cpg132_data"] YTo0OntzOjI6IklEIjtzOjMyOiIxYzg4NzcwMTI0NjEyOWM0MmI1MWIxZTVlNGRiM2ViMyI7czoyOiJhbSI7aToxO3M6MzoibGl2IjthOjU6e2k6MDtzOjM6IjMyNyI7aToxO3M6MzoiMzI2IjtpOjI7czozOiIzMjUiO2k6MztzOjM6IjMyNCI7aTo0O3M6MzoiMzIzIjt9czozOiJ1aWQiO2k6ODA7fQ==
_REQUEST["sessioncookie"] 58c0c17613e97814a52bd3ec1212c57a
_REQUEST["1d8399ec45daf946f5c131b56055422a"] 6aa9a7fbfa2e2072ae6141d733442ee0
_REQUEST["usercookie"] Array
(
    [username] => x
    [password] => 3674dce0e2adf99ff3646d56868b324e
)
 
_COOKIE["mosadmin"] f270ef31c1a589f7adba8c56d1897daf
_COOKIE["webfxtab_configPane"] 9
_COOKIE["PHPSESSID"] 1a5e2570a67f5953aac2c66b6ad7d951
_COOKIE["cpg132_data"] YTo0OntzOjI6IklEIjtzOjMyOiIxYzg4NzcwMTI0NjEyOWM0MmI1MWIxZTVlNGRiM2ViMyI7czoyOiJhbSI7aToxO3M6MzoibGl2IjthOjU6e2k6MDtzOjM6IjMyNyI7aToxO3M6MzoiMzI2IjtpOjI7czozOiIzMjUiO2k6MztzOjM6IjMyNCI7aTo0O3M6MzoiMzIzIjt9czozOiJ1aWQiO2k6ODA7fQ==
_COOKIE["sessioncookie"] 58c0c17613e97814a52bd3ec1212c57a
_COOKIE["1d8399ec45daf946f5c131b56055422a"] 6aa9a7fbfa2e2072ae6141d733442ee0
_COOKIE["usercookie"] Array
(
    [username] => x
    [password] => 3674dce0e2adf99ff3646d56868b324e
)
 
_SERVER["SCRIPT_NAME"] phpinfo.php
_SERVER["PATH_TRANSLATED"] /home/content/m/a/n/xickel/html/portal/gallery/phpinfo.php
_SERVER["SCRIPT_FILENAME"] /cgi-bin/php
_SERVER["DOCUMENT_ROOT"] /home/content/m/a/n/xickel/html
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us
_SERVER["HTTP_CONNECTION"] Keep-Alive
_SERVER["HTTP_COOKIE"] mosadmin=f270ef31c1a589f7adba8c56d1897daf; webfxtab_configPane=9; PHPSESSID=1a5e2570a67f5953aac2c66b6ad7d951; cpg132_data=YTo0OntzOjI6IklEIjtzOjMyOiIxYzg4NzcwMTI0NjEyOWM0MmI1MWIxZTVlNGRiM2ViMyI7czoyOiJhbSI7aToxO3M6MzoibGl2IjthOjU6e2k6MDtzOjM6IjMyNyI7aToxO3M6MzoiMzI2IjtpOjI7czozOiIzMjUiO2k6MztzOjM6IjMyNCI7aTo0O3M6MzoiMzIzIjt9czozOiJ1aWQiO2k6ODA7fQ%3D%3D; sessioncookie=58c0c17613e97814a52bd3ec1212c57a; 1d8399ec45daf946f5c131b56055422a=6aa9a7fbfa2e2072ae6141d733442ee0; usercookie[username]=x; usercookie[password]=3674dce0e2adf99ff3646d56868b324e
_SERVER["HTTP_HOST"] www.xickel.com
_SERVER["HTTP_REFERER"] http://www.xickel.com/portal/gallery/util.php
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
_SERVER["REMOTE_ADDR"] 68.231.29.148
_SERVER["REMOTE_PORT"] 62807
_SERVER["SCRIPT_URI"] http://www.xickel.com/portal/gallery/phpinfo.php
_SERVER["SCRIPT_URL"] /portal/gallery/phpinfo.php
_SERVER["SERVER_ADMIN"] support@supportwebsite.com
_SERVER["SERVER_NAME"] www.xickel.com
_SERVER["SERVER_PORT"] 80
_SERVER["SERVER_SOFTWARE"] Apache/1.3.31 (Unix) mod_tsunami/2.0 FrontPage/5.0.2.2634 mod_ssl/2.8.19 OpenSSL/0.9.7a
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /portal/gallery/phpinfo.php
_SERVER["PATH_INFO"] /portal/gallery/phpinfo.php
_SERVER["PATH"] /bin:/usr/bin:/usr/local/bin
_SERVER["PHP_SELF"] phpinfo.php
_SERVER["argv"] Array
(
)
 
_SERVER["argc"] 0
_ENV["SCRIPT_NAME"] /portal/gallery/phpinfo.php
_ENV["PATH_TRANSLATED"] /home/content/m/a/n/xickel/html/portal/gallery/phpinfo.php
_ENV["SCRIPT_FILENAME"] /cgi-bin/php
_ENV["DOCUMENT_ROOT"] /home/content/m/a/n/xickel/html
_ENV["HTTP_ACCEPT_ENCODING"] gzip, deflate
_ENV["HTTP_ACCEPT_LANGUAGE"] en-us
_ENV["HTTP_CONNECTION"] Keep-Alive
_ENV["HTTP_COOKIE"] mosadmin=f270ef31c1a589f7adba8c56d1897daf; webfxtab_configPane=9; PHPSESSID=1a5e2570a67f5953aac2c66b6ad7d951; cpg132_data=YTo0OntzOjI6IklEIjtzOjMyOiIxYzg4NzcwMTI0NjEyOWM0MmI1MWIxZTVlNGRiM2ViMyI7czoyOiJhbSI7aToxO3M6MzoibGl2IjthOjU6e2k6MDtzOjM6IjMyNyI7aToxO3M6MzoiMzI2IjtpOjI7czozOiIzMjUiO2k6MztzOjM6IjMyNCI7aTo0O3M6MzoiMzIzIjt9czozOiJ1aWQiO2k6ODA7fQ%3D%3D; sessioncookie=58c0c17613e97814a52bd3ec1212c57a; 1d8399ec45daf946f5c131b56055422a=6aa9a7fbfa2e2072ae6141d733442ee0; usercookie[username]=x; usercookie[password]=3674dce0e2adf99ff3646d56868b324e
_ENV["HTTP_HOST"] www.xickel.com
_ENV["HTTP_REFERER"] http://www.xickel.com/portal/gallery/util.php
_ENV["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
_ENV["REMOTE_ADDR"] 68.231.29.148
_ENV["REMOTE_PORT"] 62807
_ENV["SCRIPT_URI"] http://www.xickel.com/portal/gallery/phpinfo.php
_ENV["SCRIPT_URL"] /portal/gallery/phpinfo.php
_ENV["SERVER_ADMIN"] support@supportwebsite.com
_ENV["SERVER_NAME"] www.xickel.com
_ENV["SERVER_PORT"] 80
_ENV["SERVER_SOFTWARE"] Apache/1.3.31 (Unix) mod_tsunami/2.0 FrontPage/5.0.2.2634 mod_ssl/2.8.19 OpenSSL/0.9.7a
_ENV["GATEWAY_INTERFACE"] CGI/1.1
_ENV["SERVER_PROTOCOL"] HTTP/1.1
_ENV["REQUEST_METHOD"] GET
_ENV["QUERY_STRING"] no value
_ENV["REQUEST_URI"] /portal/gallery/phpinfo.php
_ENV["PATH_INFO"] /portal/gallery/phpinfo.php
_ENV["PATH"] /bin:/usr/bin:/usr/local/bin



Title: Re: Browsable interface for batch add files
Post by: kegobeer on May 28, 2005, 10:07:18 pm
Try this.  Change

Code: [Select]
$filename = substr($_SERVER["SCRIPT_FILENAME"],0,strrpos($_SERVER["SCRIPT_FILENAME"],'/'));
to

Code: [Select]
$filename = substr($path_from_serverroot[0],0,strrpos($path_from_serverroot[0],'/'));
Title: Re: Browsable interface for batch add files
Post by: kegobeer on May 29, 2005, 03:51:44 am
On my Linux server, this works great:

Code: [Select]
function cpg_get_webroot_path() {
    $rootpath = __FILE__;
    $strloc = strrpos($rootpath, '/include/');
    return substr($rootpath, 0, $strloc-8);
}

Any reason why this wouldn't be better than the current code, other than the obvious additions for a Windows host?
Title: Re: Browsable interface for batch add files
Post by: tutone on May 29, 2005, 08:50:37 am
kegobeer,

that didn't work either.  I made the change in functions.inc.php that you said... still says "There 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." But it works fine in non browsable mode.
Title: Re: Browsable interface for batch add files
Post by: Joachim Müller on May 29, 2005, 10:06:19 am
The function cpg_get_webroot_path()  was introduced by me as a cheap workaround to catch the webroot path on as many server setups as possible. I tested in on all servers I could (which are not that many though ;)). The function is still "experimental". Feel free to add whatever you could come up with that will improve the probability to catch the correct path even on exocit server setups.
This issue is tricky however: I had a look into many other openSource apps that need to have the webroot path: they all have some way of workaround and fallback option that should catch the path for most server setups, but not all.
In the particular case of tutone I recommend just switching to the "traditional" batch-add interface that displays all folders on one screen at once, i.e. skip the "browsable batch-add" interface feature.
Title: Re: Browsable interface for batch add files
Post by: kegobeer on May 29, 2005, 01:52:18 pm
Hmm.  I'll also do some looking and playing around with this.  Joachim, I also noticed when I "fixed" my browsasble interface problem that limits were ignored.  Started at /albums/, navigated one deep to /albums/uploads/, navigated back to /albums/, and I get the go up link.  I could then browse my entire root directory.

What do you think about a link tree type display - the initial browse will grab all valid directories and display them as clickable links.
Title: Re: Browsable interface for batch add files
Post by: Joachim Müller on May 29, 2005, 04:53:03 pm
link tree would be another option imo that should rather replace the first screen of the "traditional" batch-add interface in the future. The reason why I created the browsable batch-add interface was that I didn't want all sub-folders to be expanded in the first place. If you could come up with a good mixture (i.e. a linktree where only the first level is displayed by default and all sub-level are only visisble if the particular branch is clicked; similar to Windows Explorer) this would be a big plus imo. I'm not sure though if this should go into cpg1.4, as it would be an additional feature, not a fix for an existing one.
Title: Re: Browsable interface for batch add files
Post by: kegobeer on May 30, 2005, 03:52:29 am
I was thinking more of a left/right window division, with a linktree in the left pane, and when a link is clicked, the files will display in the right pane.
Title: Re: Browsable interface for batch add files
Post by: tutone on May 30, 2005, 09:09:07 pm
GauGau,

Are you implying that there is something incompatible with my server?  It appears that some people have had this same problem... is this a feature that when released will work for some and not for others?  Let me know if you need more info or if it is not worth pursuing any further.

Title: Re: Browsable interface for batch add files
Post by: kegobeer on May 30, 2005, 09:31:12 pm
@tutone:  Not all servers are the same - depending on how an administrator wants to set up the server is how that server will function and what $_SERVER variables will be available.  Writing an interface that works with all servers is hard, and quite often a particular setup will not work with the code.  We will do our best to achieve the most compatibility, but there is always a chance that someone won't be able to use the browsable interface.

Let's see if this works for you.  Make a new php file called testroot.php with this in it:

Code: [Select]
<?php
function cpg_get_webroot_path() {
    
$rootpath __FILE__;
    
$strloc strrpos($rootpath'/include/');
    return 
substr($rootpath0$strloc-8);
}
echo 
cpg_get_webroot_path();
?>

Put it in your Coppermine's /include/ directory.  Execute the file and post your results.
Title: Re: Browsable interface for batch add files
Post by: kegobeer on May 31, 2005, 12:03:18 am
The code in my previous post is incorrect.  Use this instead:

Code: [Select]
<?php
// Let's see what's enabled!

$path= (__FILE__);
echo 
$path.'<br>';

if (
eregi("win",getenv('OS'))) {
  
$schstr chr(92);
} else {
  
$schstr '/';
}

$loc strrpos($path$schstr);

if (
$loc 0) {
  
$testpath substr($path0$loc-8);
  echo 
$testpath;
}

?>
Title: Re: Browsable interface for batch add files
Post by: tutone on May 31, 2005, 03:57:33 am
kegobeer,

I totally understand.  I am just trying to be helpful and test it out and report back to you guys.  I just wanted to know if you guys wanted me to try anything else.  I was not implying, nor was I intending anything negative.  I have not seen the browsable interface... i am actually happy with the current meathod.  But if i can be of help to you guys to improve the code i am willing to be of assistance (especially since i am out of law school for the summer).  If my setup just won't work (or would take to much work) please let me know... it is by no means a big deal.

I put the code you indicated in a file called testroot.php

testroot.php has the following in it:

Quote
<?php
// Let's see what's enabled!

$path= (__FILE__);
echo $path.'<br>';

if (eregi("win",getenv('OS'))) {
  $schstr = chr(92);
} else {
  $schstr = '/';
}

$loc = strrpos($path, $schstr);

if ($loc > 0) {
  $testpath = substr($path, 0, $loc-8);
  echo $testpath;
}

?>

The following appeared when i browsed to the file:

/home/content/w/e/b/website/html/portal/gallery/include/testroot.php
/home/content/w/e/b/website/html/portal/gallery


I have a hunch you were looking for something more (so i must have done something wrong).  Either way... let me know what you would like me to do next. Even if it is to take a flying leep or stick something somewhere...  ;)
Title: Re: Browsable interface for batch add files
Post by: Joachim Müller on May 31, 2005, 05:04:08 am
@tutone: don't get me wrong, I appreciate your readiness to help and improve coppermine. What kegobeer said is right: server setups differ, that's all. The "traditional" batch-add uses relative paths, that's why it works on all server setup. The browsable interface has the option to go down in the tree, but to go up as well. That's why we have to take care that the user doesn't go up the tree too much. To do this, we have to determine the webroot. This is hard to accomplish, as there is no server var that reliably holds this piece of information on all setups. Windows servers cause most troubles in this aspect: the server sided vars are nearly the same on most Lunix systems, but somehow the IIS versions as well as the apache installs on Windows differ very much.
Title: Re: Browsable interface for batch add files
Post by: kegobeer on May 31, 2005, 05:27:23 am
@tutone:  That's exactly what I was looking for.  That script should spit out the Coppermine root directory, which is what happened.  I'm working on a slightly different browser interface that will hopefully eliminate this issue.
Title: Re: Browsable interface for batch add files
Post by: tutone on May 31, 2005, 05:43:04 am
GauGau,

I totally understand how difficult it is.  I apologize if i gave the impression that i didn't think that or i was trying to rush you guys. Previous to Law School i worked as a program/project manager working with developers... they were always getting pissed at me thinking that i was rushing them... when i was really just trying to figure out what the problem was... just because i am curious by nature.  You guys have created an awesome piece of work.  Whatever little help i can do... please let me know.

Title: Re: Browsable interface for batch add files
Post by: kegobeer on June 01, 2005, 11:26:38 pm
@tutone:  Make a small change to your init.inc.php file and upload the attached file (rename it to path.php) to your Coppermine root directory.  See if you get a browsable listing.  You should get a list of valid directories on the left (indented entries mean subdirectories), and a list of files on the right when you click one of the directories on the left.  All files except directories are listed as there is no filter set up.

In init.inc.php, after

Code: [Select]
// Check for GD GIF Create support
if ($CONFIG['thumb_method'] == 'im' || function_exists('imagecreatefromgif'))
  $CONFIG['GIF_support'] = 1;
else
  $CONFIG['GIF_support'] = 0;

add

Code: [Select]
// Windows or *nix? keg
if (eregi("win",getenv('OS'))) {
  $CONFIG['filesep'] = chr(92);
} else {
  $CONFIG['filesep'] = '/';
}

$tmppath = (__FILE__);

$tmploc = strrpos($tmppath, $CONFIG['filesep']);

if ($tmploc > 0) {
  $CONFIG['rootpath'] = substr($tmppath, 0, $tmploc-7);
}

Tested on Linux/Apache 1.3.33/PHP 4.3.11 and Windows XP Pro/Apache 2.0.54/PHP 5.0.4
Title: Re: Browsable interface for batch add files
Post by: tutone on June 02, 2005, 04:08:29 am
still get the same message:

There 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.
Title: Re: Browsable interface for batch add files
Post by: kegobeer on June 02, 2005, 04:24:30 am
Uhhh, just point your browser to path.php and see what happens.
Title: Re: Browsable interface for batch add files
Post by: kegobeer on June 02, 2005, 05:05:08 am
Found an error in my previous code.  I corrected my previous post, tutone, so copy and paste the init.inc.php code again.
Title: Re: Browsable interface for batch add files
Post by: tutone on June 02, 2005, 08:04:48 am
Sorry... i didn't know i was supposed to point to path.php.  When i point to path.php i can see the folders on the left and then when i click on a folder it shows the files in that folder on the right.  All of the folders under albums/ appear on the left.
Title: Re: Browsable interface for batch add files
Post by: kegobeer on June 02, 2005, 12:29:43 pm
Good, I was hoping it would work for you.  I'll work on a better interface and incorporate it into Coppermine for further testing.
Title: Re: Browsable interface for batch add files
Post by: tutone on July 04, 2005, 10:46:47 pm
kegobeer,

Anything new with this?  Do you need help testing anything?
Title: Re: Browsable interface for batch add files
Post by: kegobeer on July 05, 2005, 12:57:10 am
Things are progressing nicely - seems to be working for nix and windows without any errors.  The code is pretty different from what I've posted here, and it works better.

I haven't integrated it with 1.4.1 yet, so nothing to be tested.  I'm working on other things that are directly related, so everything will be rolled up into one update.  I'll post when it's done.
Title: Re: Browsable interface for batch add files
Post by: eugenecjr on July 05, 2005, 03:20:47 am
No sure of all of the configurations that are involved in this issue, however I am running Windows Server 2003, with IIS 6.0 PHP 4 and CPG V1.4.x.  I have the same issue as presented in this post so if you would like it to be tested please let me know.

Thanks,
Title: Re: Browsable interface for batch add files
Post by: Joachim Müller on July 31, 2005, 03:34:00 pm
[moderation]
bumping this unresolved thread to the top...
Title: Re: Browsable interface for batch add files
Post by: Joachim Müller on August 15, 2005, 07:19:44 am
the very same thing is being discussed in Trouble with batch upload (http://forum.coppermine-gallery.net/index.php?topic=20534), so I'm closing this thread now, leaaving it there for reference.