[UNSOLVED] Help- edit folder somehow keeps getting deleted [UNSOLVED] Help- edit folder somehow keeps getting deleted
 

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

[UNSOLVED] Help- edit folder somehow keeps getting deleted

Started by erroneus, July 21, 2004, 06:05:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

erroneus

EDIT: I managed to somehow fix all the errors by simply re-creating the folder EDIT in /albums. But again today somehow it got deleted and my users are getting errors when trying to upload their picture.

---DISREGARD BELOW---
I don't know how this may have happened.  A user simply notified of them having problems uploading a file.

But first of all, when I click on Upload file I get an error message on top saying:
Warning: opendir(./albums/edit): failed to open dir: No such file or directory in /usr/home/sites/www.lmtchatonline.com/web/gallery/upload.php on line 409


Then after trying to upload a file, it doesn't work and I get the error message:

Warning: move_uploaded_file(./albums/edit/mHTTP_temp_37c04602.jpg): failed to open stream: No such file or directory in /usr/home/sites/www.lmtchatonline.com/web/gallery/upload.php on line 1197

Warning: move_uploaded_file(): Unable to move '/var/tmp/phpMCApDh' to './albums/edit/mHTTP_temp_37c04602.jpg' in /usr/home/sites/www.lmtchatonline.com/web/gallery/upload.php on line 1197

Notice: Undefined variable: escrow_array in /usr/home/sites/www.lmtchatonline.com/web/gallery/upload.php on line 1939

Notice: Undefined variable: URI_failure_array in /usr/home/sites/www.lmtchatonline.com/web/gallery/upload.php on line 1941

Notice: Undefined variable: zip_failure_array in /usr/home/sites/www.lmtchatonline.com/web/gallery/upload.php on line 1942

It says below that Error message: impossible to move.

Then I went to admin and clicked on Update database, then even more errors:
Notice: Undefined index: cat_thumb in /usr/home/sites/www.lmtchatonline.com/web/gallery/themes/default/theme.php on line 1124

Notice: Undefined index: cat_albums in /usr/home/sites/www.lmtchatonline.com/web/gallery/themes/default/theme.php on line 1126

(these appear right above the categories table)

Then when I click into a picture on top of the page I get:

Notice: Undefined variable: meta_keywords in /usr/home/sites/www.lmtchatonline.com/web/gallery/displayimage.php on line 632


then below that:
Notice: Undefined variable: header in /usr/home/sites/www.lmtchatonline.com/web/gallery/themes/default/theme.php on line 1404

Notice: Undefined variable: template_tab_display in /usr/home/sites/www.lmtchatonline.com/web/gallery/themes/default/theme.php on line 1407

Notice: Undefined variable: lang_thumb_view in /usr/home/sites/www.lmtchatonline.com/web/gallery/themes/default/theme.php on line 1409

Notice: Undefined index: inactive_tab in /usr/home/sites/www.lmtchatonline.com/web/gallery/themes/default/theme.php on line 1410


Here's the debug mode message:
USER:
------------------
Array
(
   [ID] => 48e59300205bc656eef4722a0d78f4a3
   [am] => 1
   [liv] => Array
       (
           [0] => 284
           [1] => 288
           [2] => 297
           [3] => 204
           [4] => 232
       )

   [sort] => ta
)

==========================
USER DATA:
------------------
Array
(
   [0] => 16
   [user_id] => 16
   [1] => erroneus
   [user_name] => erroneus
   [2] => 1
   [user_level] => 1
   [groups] => Array
       (
           [0] => 1
           [1] => 2
           [2] => 10
           [3] => 173
           [4] => 174
       )

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

==========================
Queries:
------------------
Array
(
   [0] => SELECT extension, mime, content FROM cpg130_filetypes;
   [1] => SELECT user_id, username as user_name, user_level FROM `lmt`.phpbb_sessions INNER JOIN `lmt`.phpbb_users ON session_user_id = user_id WHERE session_id='6a593351fcd30a28d87846db21a6a686' AND session_user_id ='16' AND user_active='1'
   [2] => SELECT (ug.group_id + 5) as group_id FROM `lmt`.phpbb_user_group as ug LEFT JOIN `lmt`.phpbb_groups as g ON ug.group_id = g.group_id WHERE user_id = 16 AND user_pending = 0 AND group_single_user = 0
   [3] => 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 cpg130_usergroups WHERE group_id in (1,2,10,173,174)
   [4] => SELECT group_name FROM  cpg130_usergroups WHERE group_id= 1
   [5] => DELETE FROM cpg130_banned WHERE expiry < 1090383102
   [6] => SELECT * FROM cpg130_banned WHERE ip_addr='66.136.49.184' OR ip_addr='66.136.49.184' OR user_id=16
)

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

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.6 - OK
------------------
mySQL version: 3.23.53
------------------
Coppermine version: 1.3.1
==========================
Module: gd
------------------
GD Support enabled
GD Version bundled (2.0.22 compatible)
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
JIS-mapped Japanese Font Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 2
Active Links 3
Client API version 3.23.53
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/include/mysql
MYSQL_LIBS -L/usr/local/lib/mysql -lmysqlclient  
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4
==========================
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/share/pear | .:/usr/local/share/pear
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | me@localhost.com | me@localhost.com
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 | -1 | -1
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.114 seconds - 7 queries in 0.009 seconds - Album set :

erroneus

OK the problem with not being able to upload a file has been fixed. I created the folder edit within albums (again, dont know how it got deleted in the first place) and that fixed the problem. But on top of the upload successful page I'm still getting:

Notice: Undefined variable: file_failure_array in /usr/home/sites/www.lmtchatonline.com/web/gallery/upload.php on line 1940

Notice: Undefined variable: URI_failure_array in /usr/home/sites/www.lmtchatonline.com/web/gallery/upload.php on line 1941

Notice: Undefined variable: zip_failure_array in /usr/home/sites/www.lmtchatonline.com/web/gallery/upload.php on line 1942


Any help would be greatly appreciated.

Joachim Müller

in case you're running cpg1.3.0, please upgrade to cpg1.3.1 and report if this fixes your issues.

GauGau

erroneus

I'm already running cpg1.3.1. I had fixed all of the errors already. But for some reason the EDIT folder keeps getting deleted, then my users get errors when trying to upload a picture. This will be the 3rd time I have to create the edit folder.

Joachim Müller

make sure you have replaced all cpg1.3.0 files with cpg1.3.1 ones - this sounds like the upgrade is incomplete.

GauGau

erroneus

Looks like this just might have been the problem. I uploaded some files from CPG1.3.1 to what I believe was the includes folder and I noticed that the file overwrite sizes were different. I'll test it out for 2 more days and if it doesn't do it anymore, consider this [Solved].  ;D

erroneus

Damn it happened again today, and I'm not sure why. I clicked on Upload file and got
Warning: opendir(./albums/edit): failed to open dir: No such file or directory in /usr/home/sites/www.lmtchatonline.com/web/gallery/upload.php on line 409

Of course it's fixed when I recreate the folder edit with /albums and CHMOD it to 777. Why is it being deleted though?

Joachim Müller

did you notice anything unusual in your server logs?

GauGau

erroneus

I don't have access to server logs.

Do you recommend backing up my cpg tables, custom theme, and albums folder, then just doing a fresh install?

Tarique Sani

No re-install has not solved this.... you will have to ask your host about the logs - I hope they are friendly and knowledgable.

We really want to get to the bottom of this BUT this has not happened to any of the Devs so far
SANIsoft PHP applications for E Biz

erroneus

What exactly should I ask them for? Should I just e-mail them and ask if they can send me the server logs? Also, I haven't really re-installed per se, as overwritten the files with fresh copies right out of the zip, I simply re-uploaded files from my backed up folder of cpg. Will I be fine as far as keeping all my settings, pics etc. if I simply back up my albums and themes folder, then copy in a fresh set of files?

Tarique Sani

You will have to explain the problem to the host and ask for server access logs for the day when this happened.

Yes your setting will remain undisturbed...
SANIsoft PHP applications for E Biz

erroneus

Did I maybe forget to run some kind of db update file? My tables are still prefixed as cpg130, rather than cpg131, might that have something to do with it?

Joachim Müller

no, the prefix remains the same even if you upgrade your coppermine install.
When ugrading, you're suppossed to run update.php - it won't hurt to run it once more in case you're not sure you already did.

GauGau

GGallery

happens here several times a day - a cronjob automatically recreates the dir every minute:

[root@tc01 root]# wc /tmp/edit_dir_recreated
    191    1146    5539 /tmp/edit_dir_recreated

in the last 24 days and I defunct both spring_cleaning functions like this:
function spring_cleaning($directory_path) {
return;

cpg 1.3.0... big strange mystery: I examined the log files a couple times but they look OK.
If anybody has an idea how to debug this let me know

erroneus

I'm confused GGallery, did you just post a fix for this?  ???

Tarique Sani

#16
This issue was solved in this thread -  http://forum.coppermine-gallery.net/index.php?topic=8861.0

If you want to patch your install - open the upload.php file
find

// Check for incoming album placement data.
    if ((isset($_POST['album'])) and (isset($_POST['unique_ID']))) {


after that add

        // Check if user selected an album to upload picture to. If not, die with error.
        // added by frogfoot
        $album = (int)$_POST['album'];
        if (!$album)cpg_die(ERROR, "Album Not selected" , __FILE__, __LINE__);

SANIsoft PHP applications for E Biz

erroneus

#17
Cool, thanks. You forgot the { at the end of the code you told me to add though. I was getting an expected } error, but then I just added the { at the end of the code and that fixed it.



erroneus

I thought this was the fix, but I was wrong to have not tested it before. I finally got time to test it right now. I added the code you told me to Tarique, and what happens now is:

I'll select a file to upload, then it takes me to the page that says:
Successful Uploads
1 uploads were successful.

Please click 'Continue' to add the files to albums.


So then I click on Continue, and it gives me the error message "Album not selected", then there's nothing else you can do. I was wondering why no one had uploaded any pictures in a while. Any help would be greatly appreciated.

Tarique Sani

try changing $HTTP_POST_VARS to $_POST I have modified my original post accordingly
SANIsoft PHP applications for E Biz