Usermgr.php link don't work Usermgr.php link don't work
 

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]

Main Menu

Usermgr.php link don't work

Started by djboxny, March 03, 2004, 12:56:03 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

djboxny

Usermgr.php link don't work.  when i click on it it just stays there and doesn't do nothing.  Before i uploaded the 1.2 it used to work fine.  No idea wat is causing the proble.  PLease help need to manage users

hyperion

More info or some HTML source posted here would do wonders.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

djboxny

the server is http://www.djboxny.com/gallery1/ i am using image maigck.  All was fine until i updated from vertion 1.1 something to 1.2 since there were no intructions on updating i when thru the update.php on the 1.2 vertion hopes this helps


thanks in advance

hyperion

The link can't help as much as the HTML source.  (The link requires admin credentials, which we don't need just yet.)

Have you tried logging in as an admin, then calling usermgr.php directly for your browser's address bar? This could at least give you the ability to manage users until you find out why the link is not working.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

djboxny

i send u a private message hope u can help me

hyperion

I took a look around, and your link is not broken.  For some reason, the usermgr.php script is not responding.  This could be due to a timeout of some sort or a corrupted file.  

Here are some things you can try:

1. Try downloading a fresh copy of usermgr.php and overwrite the old copy.

2. Use a database tool like PHPMyAdmin to inspect the CPG users table in your database.  Check it, repair it if necessary, index it, optimize it, etc.

3. Most often in upgrades the trouble comes from database changes. You could install a test version of 1.2 and then compare the structure of the two CPG users tables.  If there is a difference, you would need to fix it.

4. I don't know how many users you have, but if you had a tremendous number, there could be problems with timeouts or low memory allocation  for result sets in MySQL.

5. If the above things fail, you can also try downgrading back to 1.1.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

hyperion

Via PM:

Quote from: "djboxny"Well, I have more than 3,000 users. Could that be it?



Possibly.  You'll have to experiment to be sure.

To see if this could be a time out,  try the following edit to usermgr.php:


// ------------------------------------------------------------------------- //

set_time_limit(300);

define('IN_COPPERMINE', true);


The addition of set_time_limit(300); tells the server to give the script five minutes to run.

You can also get general information about your server setup by saving the following code in a php file:


<?php

phpinfo
&#40;&#41;;

?>



Running that code will cause the server to tell you important information such as maximum execution time, etc.

I am inclined to think this problem is less related to timeouts and more likely related to the MySQL result memory setting. To find out if this is the case, you'll need to use PHPMyAdmin to run this SQL query:

SELECT count(*) FROM {$CONFIG['TABLE_USERS']} WHERE 1;

{$CONFIG['TABLE_USERS']} should be replaced with your database's user table name.  If PHPMyAdmin can't return a result, chances are good that the MySQL result set is larger than the MySQL memory limit.  The other option is that the result set is larger than PHP's memory limit, but I doubt that is the case.

Your server administrator will have to change the MySQL result set memory limit if that is the problem.

Also, please use this thread, http://forum.coppermine-gallery.net/index.php?topic=4210, to respond instead of PMs.  That way everyone who may have your problem can benefit from this discussion.
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

djboxny

<?php 
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.2.1                                            //
// ------------------------------------------------------------------------- //
// Copyright &#40;C&#41; 2002,2003 Gregory DEMAR                                     //
// http&#58;//www.chezgreg.net/coppermine/                                       //
// ------------------------------------------------------------------------- //
// Updated by the Coppermine Dev Team                                        //
// &#40;http&#58;//coppermine.sf.net/team/&#41;                                          //
// see /docs/credits.html for details                                        //
// ------------------------------------------------------------------------- //
// This program is free software; you can redistribute it and/or modify      //
// it under the terms of the GNU General Public License as published by      //
// the Free Software Foundation; either version 2 of the License, or         //
// &#40;at your option&#41; any later version.                                       //
// ------------------------------------------------------------------------- // 

define&#40;'IN_COPPERMINE', true&#41;;
define&#40;'USERMGR_PHP', true&#41;;
define&#40;'PROFILE_PHP', true&#41;;

require&#40;'include/init.inc.php'&#41;;

if &#40;defined&#40;'UDB_INTEGRATION'&#41;&#41; udb_edit_users&#40;&#41;;

if &#40;!GALLERY_ADMIN_MODE&#41; cpg_die&#40;ERROR, $lang_errors['access_denied'&#93;, __FILE__, __LINE__&#41;;

function list_users&#40;&#41;
&#123;
    
global $CONFIG$PHP_SELF$HTTP_GET_VARS;
    global 
$lang_usermgr_php$lang_byte_units$register_date_fmt;

    
$sort_codes = array&#40;'name_a' => 'user_name ASC',
        
'name_d' => 'user_name DESC',
        
'group_a' => 'group_name ASC',
        
'group_d' => 'group_name DESC',
        
'reg_a' => 'user_regdate ASC',
        
'reg_d' => 'user_regdate DESC',
        
'pic_a' => 'pic_count ASC',
        
'pic_d' => 'pic_count DESC',
        
'disku_a' => 'disk_usage ASC',
        
'disku_d' => 'disk_usage DESC',
        &
#41;;

    
$sort = &#40;!isset&#40;$HTTP_GET_VARS['sort'&#93;&#41; || !isset&#40;$sort_codes[$HTTP_GET_VARS['sort'&#93;&#93;&#41;&#41; ? 'reg_d' &#58; $HTTP_GET_VARS['sort'&#93;;

    
$tab_tmpl = array&#40;'left_text' => '<td width="100%%" align="left" valign="middle" class="tableh1_compact" style="white-space&#58; nowrap"><b>' . $lang_usermgr_php['u_user_on_p_pages'&#93; . '</b></td>' . "\n",
        
'tab_header' => '',
        
'tab_trailer' => '',
        
'active_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' "\n" '<td align="center" valign="middle" class="tableb_compact"><b>%d</b></td>',
        
'inactive_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' "\n" '<td align="center" valign="middle" class="navmenu"><a href="' $PHP_SELF '?page=%d&sort=' $sort '"<b>%d</b></a></td>' "\n"
        
&#41;;

    
$result db_query&#40;"SELECT count&#40;*&#41; FROM &#123;$CONFIG['TABLE_USERS'&#93;&#125; WHERE 1"&#41;;
    
$nbEnr mysql_fetch_array&#40;$result&#41;;
    
$user_count $nbEnr[0&#93;;
    
mysql_free_result&#40;$result&#41;;

    
if &#40;!$user_count&#41; cpg_die&#40;CRITICAL_ERROR, $lang_usermgr_php['err_no_users'&#93;, __FILE__, __LINE__&#41;;

    
$user_per_page 25;
    
$page = isset&#40;$HTTP_GET_VARS['page'&#93;&#41; ? &#40;int&#41;$HTTP_GET_VARS['page'&#93; &#58; 1;
    
$lower_limit = &#40;$page-1&#41; * $user_per_page;
    
$total_pages ceil&#40;$user_count / $user_per_page&#41;;

    
$sql "SELECT user_id, user_name, user_email, UNIX_TIMESTAMP&#40;user_regdate&#41; as user_regdate, group_name, user_active, " "COUNT&#40;pid&#41; as pic_count, ROUND&#40;SUM&#40;total_filesize&#41;/1024&#41; as disk_usage, group_quota " "FROM &#123;$CONFIG['TABLE_USERS'&#93;&#125; AS u " "INNER JOIN &#123;$CONFIG['TABLE_USERGROUPS'&#93;&#125; AS g ON user_group = group_id " "LEFT JOIN &#123;$CONFIG['TABLE_PICTURES'&#93;&#125; AS p ON p.owner_id = u.user_id " "GROUP BY user_id " "ORDER BY " $sort_codes[$sort&#93; . " " . "LIMIT $lower_limit, $user_per_page";

    
$result db_query&#40;$sql&#41;;

    
$tabs create_tabs&#40;$user_count, $page, $total_pages, $tab_tmpl&#41;;

    
starttable&#40;'100%'&#41;;
    
echo <<< EOT

        <tr>
                <td class="tableh1"><b><span class="statlink">&#123;
$lang_usermgr_php['name'&#93;&#125;</span></b></td>
                <td class="tableh1"><b><span class="statlink">&#123;
$lang_usermgr_php['group'&#93;&#125;</span></b></td>
                <td class="tableh1"><b><span class="statlink">&#123;
$lang_usermgr_php['registered_on'&#93;&#125;</span></b></td>
                <td class="tableh1" colspan="2" align="center"><b><span class="statlink">&#123;
$lang_usermgr_php['operations'&#93;&#125;</span></b></td>
                <td class="tableh1" align="center"><b><span class="statlink">&#123;
$lang_usermgr_php['pictures'&#93;&#125;</span></b></td>
                <td class="tableh1" colspan="2" align="center"><b><span class="statlink">&#123;
$lang_usermgr_php['disk_space'&#93;&#125;</span></b></td>
        </tr>
EOT;

    while &
#40;$user = mysql_fetch_array&#40;$result&#41;&#41; &#123;
        
if &#40;$user['user_active'&#93; == 'NO'&#41; $user['group_name'&#93; = '<i>' . $lang_usermgr_php['inactive'&#93; . '</i>';
        
$user['user_regdate'&#93; = localised_date&#40;$user['user_regdate'&#93;, $register_date_fmt&#41;;
        
if &#40;$user['pic_count'&#93;&#41; &#123;
            
$usr_link_start '<a href="thumbnails.php?album=lastupby&uid=' $user['user_id'&#93; . '" target="_blank">';
            
$usr_link_end '</a>';
        &
#125; else &#123;
            
$usr_link_start '';
            
$usr_link_end '';
        &
#125; 

        
echo <<< EOT
        <tr>
                <td class="tableb">
$usr_link_start&#123;$user['user_name'&#93;&#125;$usr_link_end</td>
                <td class="tableb">&#123;
$user['group_name'&#93;&#125;</td>
                <td class="tableb">&#123;
$user['user_regdate'&#93;&#125;</td>
                <td class="tableb" align="center"><div class="admin_menu"><a href="
$PHP_SELF?op=edit&user_id=&#123;$user['user_id'&#93;&#125;">&#123;$lang_usermgr_php['edit'&#93;&#125;</a></div></td>
                <td class="tableb"  align="center"><div class="admin_menu"><a href="delete.php?id=&#123;
$user['user_id'&#93;&#125;&what=user"  onclick="return confirm&#40;'&#123;$lang_usermgr_php['confirm_del'&#93;&#125;'&#41;;">&#123;$lang_usermgr_php['delete'&#93;&#125;</a></div></td>
                <td class="tableb" align="center">&#123;
$user['pic_count'&#93;&#125;</td>
                <td class="tableb" align="right">&#123;
$user['disk_usage'&#93;&#125; &#123;$lang_byte_units[1&#93;&#125;</td>
                <td class="tableb" align="right">&#123;
$user['group_quota'&#93;&#125; &#123;$lang_byte_units[1&#93;&#125;</td>
        </tr>

EOT;
    &
#125; // while
    
mysql_free_result&#40;$result&#41;;

    
$lb "<select name=\"album_listbox\" class=\"listbox\" onChange=\"if&#40;this.options[this.selectedIndex&#93;.value&#41; window.location.href='$PHP_SELF?page=$page&sort='+this.options[this.selectedIndex&#93;.value;\">\n";
    foreach&
#40;$sort_codes as $key => $value&#41; &#123;
        
$selected = &#40;$key == $sort&#41; ? "SELECTED" &#58; "";
        
$lb .= "        <option value=\"" $key "\" $selected>" $lang_usermgr_php[$key&#93; . "</option>\n";
    
&#125; 
    
$lb .= "</select>\n";

    echo <<<EOT
        <tr>
                <form method="post" action="
$PHP_SELF?op=new_user">
                <td colspan="8" align="center" class="tablef">
                <table cellpadding="0" cellspacing="0">
                <tr>
                        <td><input type="submit" value="&#123;
$lang_usermgr_php['create_new_user'&#93;&#125;" class="button"></td>
                        <td><img src="images/spacer.gif" width="50" height="1" alt="" /></td>
                        <td><b>&#123;
$lang_usermgr_php['sort_by'&#93;&#125;</b></td>
                        <td><img src="images/spacer.gif" width="10" height="1" alt="" /></td>
                        <td>
$lb</td>
                </tr>
                </table>
                </td>
                </form>
        </tr>
        <tr>
                <td colspan="8" style="padding&#58; 0px;">
                        <table width="100%" cellspacing="0" cellpadding="0">
                                <tr>
                                        
$tabs
                                </tr>
                        </table>
                </td>
        </tr>

EOT;

    
endtable&#40;&#41;;
&#125; 

function edit_user&#40;$user_id&#41;
&#123;
    
global $CONFIG$PHP_SELF;
    global 
$lang_usermgr_php$lang_yes$lang_no;

    
$form_data = array&#40;
        
array&#40;'input', 'user_name', $lang_usermgr_php['name'&#93;, 25&#41;,
        
array&#40;'password', 'user_password', $lang_usermgr_php['password'&#93;, 25&#41;,
        
array&#40;'yesno', 'user_active', $lang_usermgr_php['user_active'&#93;&#41;,
        
array&#40;'group_list', 'user_group', $lang_usermgr_php['user_group'&#93;&#41;,
        
array&#40;'input', 'user_email', $lang_usermgr_php['user_email'&#93;, 255&#41;,
        
array&#40;'input', 'user_location', $lang_usermgr_php['user_location'&#93;, 255&#41;,
        
array&#40;'input', 'user_interests', $lang_usermgr_php['user_interests'&#93;, 255&#41;,
        
array&#40;'input', 'user_website', $lang_usermgr_php['user_web_site'&#93;, 255&#41;,
        
array&#40;'input', 'user_occupation', $lang_usermgr_php['user_occupation'&#93;, 255&#41;
        
&#41;;

    
$sql "SELECT * FROM &#123;$CONFIG['TABLE_USERS'&#93;&#125; WHERE user_id = '$user_id'";
    
$result db_query&#40;$sql&#41;;
    
if &#40;!mysql_num_rows&#40;$result&#41;&#41; cpg_die&#40;CRITICAL_ERROR, $lang_usermgr_php['err_unknown_user'&#93;, __FILE__, __LINE__&#41;;
    
$user_data mysql_fetch_array&#40;$result&#41;;
    
mysql_free_result&#40;$result&#41;;

    
starttable&#40;500, $lang_usermgr_php['modify_user'&#93;, 2&#41;;
    
echo <<<EOT
        <form method="post" action="$PHP_SELF?op=update&user_id=$user_id">

EOT;

    foreach &
#40;$form_data as $element&#41; switch &#40;$element[0&#93;&#41; &#123;
        
case 'input' &#58;
            
$user_data[$element[1&#93;&#93; = $user_data[$element[1&#93;&#93;;
            
echo <<<EOT
        <tr>
            <td width="40%" class="tableb">
                        &#123;
$element[2&#93;&#125;
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="text" style="width&#58; 100%" name="&#123;
$element[1&#93;&#125;" maxlength="&#123;$element[3&#93;&#125;" value="&#123;$user_data[$element[1&#93;&#93;&#125;" class="textinput">
                </td>
        </tr>

EOT;
            break;

        case 
'password' &#58;
            
echo <<<EOT
        <tr>
            <td width="40%" class="tableb">
                        &#123;
$element[2&#93;&#125;
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="input" style="width&#58; 100%" name="&#123;
$element[1&#93;&#125;" maxlength="&#123;$element[3&#93;&#125;" value="" class="textinput">
                </td>
        </tr>

EOT;
            break;

        case 
'yesno' &#58;
            
$value $user_data[$element[1&#93;&#93;;
            
$yes_selected = &#40;$value == 'YES'&#41; ? 'selected' &#58; '';
            
$no_selected = &#40;$value == 'NO'&#41; ? 'selected' &#58; '';
            
echo <<< EOT
        <tr>
            <td class="tableb">
                        &#123;
$element[2&#93;&#125;
        </td>
                <td class="tableb">
                        <select name="&#123;
$element[1&#93;&#125;" class="listbox">
                                <option value="YES" 
$yes_selected>$lang_yes</option>
                                <option value="NO" 
$no_selected>$lang_no</option>
                        </select>
                </td>
        </tr>

EOT;
            break;

        case 
'group_list' &#58;
            
$sql "SELECT group_id, group_name FROM &#123;$CONFIG['TABLE_USERGROUPS'&#93;&#125; ORDER BY group_name";
            
$result db_query&#40;$sql&#41;;
            
$group_list db_fetch_rowset&#40;$result&#41;;
            
mysql_free_result&#40;$result&#41;;

            
$sel_group $user_data[$element[1&#93;&#93;;
            
$user_group_list = &#40;$user_data['user_lang'&#93; == ''&#41; ? ',' . $sel_group . ',' &#58; ',' . $user_data['user_lang'&#93; . ',' . $sel_group . ',';

            
echo <<<EOT
        <tr>
            <td class="tableb">
                        &#123;
$element[2&#93;&#125;
        </td>
        <td class="tableb" valign="top">
                <select name="&#123;
$element[1&#93;&#125;" class="listbox">

EOT;
            
$group_cb '';
            foreach&
#40;$group_list as $group&#41; &#123;
                
echo '                        <option value="' $group['group_id'&#93; . '"' . &#40;$group['group_id'&#93; == $sel_group ? ' selected' &#58; ''&#41; . '>' . $group['group_name'&#93; . "</option>\n";
                
$checked strpos&#40;' ' . $user_group_list, ',' . $group['group_id'&#93; . ','&#41; ? 'checked' &#58; '';
                
$group_cb .= '<input name="group_list[&#93;" type="checkbox" value="' $group['group_id'&#93; . '" ' . $checked . '>' . $group['group_name'&#93; . "<br />\n";
            
&#125; 
            
echo <<<EOT
                        </select><br />
                        
$group_cb
                </td>
        </tr>

EOT;
            break;

        default&
#58;
            
cpg_die&#40;CRITICAL_ERROR, 'Invalid action for form creation ' . $element[0&#93;, __FILE__, __LINE__&#41;;
    
&#125; 

    
echo <<<EOT
        <tr>
                <td colspan="2" class="tableh2">
                        <b>&#123;
$lang_usermgr_php['notes'&#93;&#125;</b>
                </td>
        </tr>
        <tr>
                <td colspan="2" class="tableb">
                        <ul>
                        &#123;
$lang_usermgr_php['note_list'&#93;&#125;
                        </ul>
                </td>
        </tr>
        <tr>
                <td colspan="2" align="center" class="tablef">
                        <input type="submit" value="&#123;
$lang_usermgr_php['modify_user'&#93;&#125;" class="button">
                </td>
                </form>
        </tr>

EOT;

    
endtable&#40;&#41;;
&#125; 

function update_user&#40;$user_id&#41;
&#123;
    
global $CONFIG$PHP_SELF$HTTP_POST_VARS;
    global 
$lang_usermgr_php$lang_register_php;

    
$user_name addslashes&#40;trim&#40;$HTTP_POST_VARS['user_name'&#93;&#41;&#41;;
    
$user_password addslashes&#40;trim&#40;$HTTP_POST_VARS['user_password'&#93;&#41;&#41;;
    
$user_email addslashes&#40;trim&#40;$HTTP_POST_VARS['user_email'&#93;&#41;&#41;;
    
$user_location addslashes&#40;$HTTP_POST_VARS['user_location'&#93;&#41;;
    
$user_interests addslashes&#40;$HTTP_POST_VARS['user_interests'&#93;&#41;;
    
$user_website addslashes&#40;$HTTP_POST_VARS['user_website'&#93;&#41;;
    
$user_occupation addslashes&#40;$HTTP_POST_VARS['user_occupation'&#93;&#41;;
    
$user_active $HTTP_POST_VARS['user_active'&#93;;
    
$user_group $HTTP_POST_VARS['user_group'&#93;;
    
$group_list = isset&#40;$HTTP_POST_VARS['group_list'&#93;&#41; ? $HTTP_POST_VARS['group_list'&#93; &#58; '';

    
$sql "SELECT user_id " "FROM &#123;$CONFIG['TABLE_USERS'&#93;&#125; " "WHERE user_name = '" addslashes&#40;$user_name&#41; . "' AND user_id != $user_id";
    
$result db_query&#40;$sql&#41;;

    
if &#40;mysql_num_rows&#40;$result&#41;&#41; &#123;
        
cpg_die&#40;ERROR, $lang_register_php['err_user_exists'&#93;, __FILE__, __LINE__&#41;;
        
return false;
    &
#125; 
    
mysql_free_result&#40;$result&#41;;

    
if &#40;strlen&#40;$user_name&#41; < 2&#41; cpg_die&#40;ERROR, $lang_register_php['err_uname_short'&#93;, __FILE__, __LINE__&#41;;
    
if &#40;strlen&#40;$user_password&#41; && strlen&#40;$user_password&#41; < 2&#41; cpg_die&#40;ERROR, $lang_register_php['err_password_short'&#93;, __FILE__, __LINE__&#41;;

    
if &#40;is_array&#40;$group_list&#41;&#41; &#123;
        
$user_group_list '';
        foreach&
#40;$group_list as $group&#41; $user_group_list .= &#40;$group != $user_group&#41; ? $group . ',' &#58; '';
        
$user_group_list substr&#40;$user_group_list, 0, -1&#41;;
    
&#125; else &#123;
        
$user_group_list '';
    &
#125; 

    
$sql_update "UPDATE &#123;$CONFIG['TABLE_USERS'&#93;&#125; " "SET " "user_name           = '$user_name', " "user_email          = '$user_email', " "user_active    = '$user_active', " "user_group           = '$user_group', " "user_location  = '$user_location', " "user_interests = '$user_interests', " "user_website          = '$user_website', " "user_occupation= '$user_occupation', " "user_lang      = '$user_group_list'";
    if &
#40;strlen&#40;$user_password&#41;&#41; $sql_update .= ", user_password = '$user_password'";
    
$sql_update .= " WHERE user_id = '$user_id'";

    
db_query&#40;$sql_update&#41;;
&#125; 

$op = isset&#40;$HTTP_GET_VARS['op'&#93;&#41; ? $HTTP_GET_VARS['op'&#93; &#58; '';

switch &#40;$op&#41; &#123;
    
case 'edit' &#58;
        
$user_id = isset&#40;$HTTP_GET_VARS['user_id'&#93;&#41; ? &#40;int&#41;$HTTP_GET_VARS['user_id'&#93; &#58; -1;

        
if &#40;USER_ID == $user_id&#41; cpg_die&#40;ERROR, $lang_usermgr_php['err_edit_self'&#93;, __FILE__, __LINE__&#41;;

        
pageheader&#40;$lang_usermgr_php['title'&#93;&#41;;
        
edit_user&#40;$user_id&#41;;
        
pagefooter&#40;&#41;;
        
ob_end_flush&#40;&#41;;
        
break;

    case 
'update' &#58;
        
$user_id = isset&#40;$HTTP_GET_VARS['user_id'&#93;&#41; ? &#40;int&#41;$HTTP_GET_VARS['user_id'&#93; &#58; -1;

        
update_user&#40;$user_id&#41;;

        
db_query&#40;"DELETE FROM &#123;$CONFIG['TABLE_USERS'&#93;&#125; WHERE user_name = '' LIMIT 1"&#41;;

        
pageheader&#40;$lang_usermgr_php['title'&#93;&#41;;
        
list_users&#40;&#41;;
        
pagefooter&#40;&#41;;
        
ob_end_flush&#40;&#41;;
        
break;

    case 
'new_user' &#58;
        
db_query&#40;"INSERT INTO &#123;$CONFIG['TABLE_USERS'&#93;&#125;&#40;user_regdate, user_active&#41; VALUES &#40;NOW&#40;&#41;, 'YES'&#41;"&#41;;

        
$user_id mysql_insert_id&#40;&#41;;

        
pageheader&#40;$lang_usermgr_php['title'&#93;&#41;;
        
edit_user&#40;$user_id&#41;;
        
pagefooter&#40;&#41;;
        
ob_end_flush&#40;&#41;;
        
break;

    default &
#58;
        
db_query&#40;"DELETE FROM &#123;$CONFIG['TABLE_USERS'&#93;&#125; WHERE user_name = '' LIMIT 1"&#41;;

        
pageheader&#40;$lang_usermgr_php['title'&#93;&#41;;
        
list_users&#40;&#41;;
        
pagefooter&#40;&#41;;
        
ob_end_flush&#40;&#41;;
        
break;
&
#125; 

?>

djboxny

when i changed only the usrmgr.php from the gallery to the 1 in the gallery 1.1 i had before it worked fine.  The only filei changed the usrmgr file for the old one and it work.  Are there any special features in the new.  Or do u think u know whats the problem

hyperion

Nothing changed in the usermgr.php file between 1.1 and 1.2, so the copy that did not work was most likely corrupted.
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

djboxny

Now with the beta vertion.   Its really odd i just upload the Old usermgr.php from vertion 1.1 and it works great with the new beta.  but as before when i try to use the one that comes with the release it just stands there and never goes anywere

gromeck

Quote from: hyperion on March 04, 2004, 07:52:01 AM
Nothing changed in the usermgr.php file between 1.1 and 1.2, so the copy that did not work was most likely corrupted.

Hmm, not quite right.
The  SQL statement in list_users() changed!

gromeck

Quote from: djboxny on March 04, 2004, 05:08:21 AM
when i changed only the usrmgr.php from the gallery to the 1 in the gallery 1.1 i had before it worked fine.  The only filei changed the usrmgr file for the old one and it work.  Are there any special features in the new.  Or do u think u know whats the problem

It should be ok to just copy the SQL statement from list_users() over.

I guess, its a MySQL resource limit issue. If have that problem only on a tiny box.
The big box works fine with the original 1.2 release.