[SOLVED] File upload ceased to work

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
User avatar
ChH
Forum Members
Forum Members
Posts: 18
Joined: Tue Dec 02, 2008 3:56 pm

[SOLVED] File upload ceased to work

Post by ChH »

Yesterday, all of a sudden, file upload ceased to work on one of my cms-installations. Another CMS instance, running on the same server but inside another MySQL-DB (same demon, though), runs as it should.

I already turned on the debug mode, but want to start off with the system information:

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

Cms Version: 1.6.6

Installed Modules:

   * CMSMailer: 1.73.14
   * FileManager: 1.0.1
   * MenuManager: 1.6.2
   * ModuleManager: 1.3.1
   * News: 2.10.3
   * nuSOAP: 1.0.1
   * Printing: 1.0.4
   * Search: 1.6.1
   * ThemeManager: 1.1.1
   * TinyMCE: 2.5.5
   * Calendar: 0.8.2
   * Guestbook: 1.1.12
   * Album: 0.9.3
   * HitCounter: 1.1
   * Captcha: 0.4
   * CGExtensions: 1.17.6
   * CGGoogleMaps: 1.4.1
   * FrontEndUsers: 1.6.11
   * SelfRegistration: 1.2.5


Config Information:

   * php_memory_limit:
   * process_whole_template: true
   * max_upload_size: 8000000
   * default_upload_permission: 664
   * assume_mod_rewrite: false
   * page_extension:
   * internal_pretty_urls: false
   * use_hierarchy: false


Php Information:

   * phpversion: 5.2.10
   * md5_function: An (Ja)
   * gd_version: 2
   * tempnam_function: An (Ja)
   * magic_quotes_runtime: Aus (Nein)
   * memory_limit: 32M
   * max_execution_time: 30
   * safe_mode: Aus (Nein)
   * session_save_path: Keine Prüfung, da eine "open basedir"-Beschränkung aktiviert ist
   * session.use_cookies: An (Ja)


Server Information:

   * Server Api: cgi-fcgi
   * Server Db Type: MySQL (mysql)
   * Server Db Version: 5.0.88


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

And this is the debug output:

Code: Select all

Debug: (5.9999999999505E-6) - (617132)

loading smarty

Debug: (0.0036529999999999) - (889484)

loading adodb

Debug: (0.0048539999999999) - (974096)

loading page functions

Debug: (0.0072509999999999) - (1149116)

loading content functions

Debug: (0.0093939999999999) - (1347112)

loading pageinfo functions

Debug: (0.0099009999999999) - (1379924)

loading translation functions

Debug: (0.010242) - (1396744)

loading events functions

Debug: (0.011308) - (1479700)

loading php4 entity decode functions

Debug: (0.01288) - (1682136)

done loading files

Debug: (0.020075) - (2371084)

<br>
(mysql): SELECT sitepref_name, sitepref_value from cms_siteprefs<br>
 Error (0): <br>

Debug: (0.022512) - (2464088)

<br>
(mysql): SELECT * FROM cms_userplugins<br>
 Error (0): <br>

Debug: (0,041524) - (3114984)

<br>
(mysql): SELECT * FROM cms_modules WHERE active = 1 ORDER by module_name<br>
 Error (0): <br>

Debug display of 'End of include':(0,0863) - (7273308)
Debug: (0,086374) - (7225028)

Session found.  Moving on...

Debug: (0,086416) - (7225780)

Session found.  Moving on...

Debug: (0,087573) - (7300468)

<br>
(mysql): SELECT ug.user_id FROM cms_user_groups ug
                     WHERE ug.user_id = '1' AND ug.group_id = 1<br>
 Error (0): <br>

Debug: (0,08778) - (7302020)

<br>
(mysql): SELECT DISTINCT permission_name FROM cms_user_groups ug INNER JOIN cms_group_perms gp ON gp.group_id = ug.group_id INNER JOIN cms_permissions p ON p.permission_id = gp.permission_id INNER JOIN cms_groups gr ON gr.group_id = ug.group_id WHERE ug.user_id = '1' AND gr.active = 1<br>
 Error (0): <br>

Debug: (0,094376) - (7738816)

Session found.  Moving on...

Debug: (0,094518) - (7741564)

<br>
(mysql): SELECT preference, value FROM cms_userprefs WHERE user_id = '1'<br>
 Error (0): <br>

Debug: (0,094634) - (7740668)

Session found.  Moving on...

Debug: (0,120723) - (8321076)

<br>
(mysql): SELECT htmlblob_id FROM cms_additional_htmlblob_users WHERE user_id = '1'<br>
 Error (0): <br>

Debug: (0,120908) - (8322744)

<br>
(mysql): SELECT group_id FROM cms_user_groups WHERE user_id = '1'<br>
 Error (0): <br>

Debug: (0,121071) - (8322204)

<br>
(mysql): SELECT htmlblob_id FROM cms_additional_htmlblob_users WHERE user_id IN (-1)<br>
 Error (0): <br>

Debug: (0,121258) - (8322344)

<br>
(mysql): SELECT content_id FROM cms_content WHERE owner_id = '1'<br>
 Error (0): <br>

Debug: (0,12144) - (8323688)

<br>
(mysql): SELECT user_id,content_id FROM cms_additional_users<br>
 Error (0): <br>

Debug: (0,126434) - (8398636)

<br>
(mysql): SELECT count(news_id) FROM cms_module_news n
                   WHERE status != 'published'
                     AND (( IFNULL(end_time, '1970-01-01 01:00:01')  = '1970-01-01 01:00:01') OR (end_time > '2009-12-06 15:52:41')) <br>
 Error (0): <br>

Debug: (0,126678) - (8393580)

<br>
(mysql): SELECT version from cms_version<br>
 Error (0): <br>

Debug: (0,12751) - (8428868)

<br>
(mysql): SELECT bookmark_id, user_id, title, url FROM cms_admin_bookmarks WHERE user_id = '1' ORDER BY title<br>
 Error (0): <br>
In this case, MySQL Error 0 (could not start mysql) does not make any sence (I do get correct results, else system info could not have worked...), thus I can't really understand that one...

Of course, I already checked the file and folder own, grp and mod settings and measured 'em correct.

Any ideas? Thanks in advance :)

Chris

[edit]by the way, the break-tag () is really printed - as if it were <br> in html code
Last edited by ChH on Thu Dec 10, 2009 3:29 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: File upload ceased to work

Post by Dr.CSS »

Error 0 means no error, this installation may have run out of disk space even if it is on the same server most times each one gets a disk space quota...
User avatar
ChH
Forum Members
Forum Members
Posts: 18
Joined: Tue Dec 02, 2008 3:56 pm

Re: File upload ceased to work

Post by ChH »

Nope, still 400 MB free space available. Quota can't be the problem.

Could a phpinfo(); help? I assumed everything of interest is told through "system information"
Last edited by ChH on Mon Dec 07, 2009 7:54 am, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: File upload ceased to work

Post by Rolf »

Yesterday, all of a sudden, file upload ceased to work on one of my cms-installations.
Perhaps a problem with your folder permissions? To low in your case...
Try to increase the permissions of the uploads folder. (chmod)

®olf

[edit]
* max_upload_size: 8000000
Or you are trying to upload a file larger as 8MB?

[/edit]
Last edited by Rolf on Mon Dec 07, 2009 8:25 am, edited 1 time in total.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
ChH
Forum Members
Forum Members
Posts: 18
Joined: Tue Dec 02, 2008 3:56 pm

Re: File upload ceased to work

Post by ChH »

ChH wrote:Of course, I already checked the file and folder own, grp and mod settings and measured 'em correct.
They're 777, which I don't like at all. Funny thing is: It worked before, set 755. Seems as if Apache runs with some strange "i am the user whose file I am working on"-modification...

And it doesn't matter which size the file is. 12MB, 2MB, 120kb - nothing will be accepted. Can't be a maxfilesize-problem, thus.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: File upload ceased to work

Post by Rolf »

LOL  ;)
If we ask for more info, we should read it in the first place   :-[

Uploads folder and folders in it are chmod 777...
Have you tried setting the umask to 000? Might be an ownership problem.

Site Admin >> Global Settings >> Advanced Setup >> File Creation Mask (umask)

Grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
ChH
Forum Members
Forum Members
Posts: 18
Joined: Tue Dec 02, 2008 3:56 pm

Re: File upload ceased to work

Post by ChH »

Umask was originally set to 022 (I think I'm gonna set it back), in both, 022 and 000 file uploads don't work, and in both cases no "usable" error message but "Die Datei konnte nicht hochgeladen werden. Berechtigungsprobleme?" (dunno the exact english text, the german one means "File could not be uploaded. Wrong permissions?")
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: File upload ceased to work

Post by Rolf »

Can you pm me some temporarily login data, so I can see for myself.

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
ChH
Forum Members
Forum Members
Posts: 18
Joined: Tue Dec 02, 2008 3:56 pm

Re: File upload ceased to work

Post by ChH »

sure...
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: File upload ceased to work

Post by Rolf »

Hi ChH

I looked in your admin, German is no problem btw  ;)

With Uploads-folder chmod 777 and umask 000 it shouldn't be a problem uploading a file to your server.
(Testing umask gives: 3 times read, write)
But somehow it points at a ownership problem... I can't get my finger behind it.

1. Uploading and deleting files with FTP, is that a problem?

2. You could try to install a module throught the ModuleManager and see if this is possible? But better make a full backup first!

3. Where there any errors with debug on?

4. Do you have access to the PHP_Errorlog? Any leads there?


There are some attentions points at the System Information. I don't think they are directly related to this problem, but you never know... Better to solve them anyway:

Maximale Ausführungszeit (max_execution_time): 30
---> Add to the config.php file: ini_set('max_execution_time', 60);

PHP - register_globals (register_globals): An (Ja)
---> Let this be switched off by your webhost.

Deaktivierte PHP-Funktionen (disable_functions):  dl, shell_exec, system, passthru, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, pfsockopen, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, set_time_limit, show_source
---> Your webhost has a lot of php functions disabled, I don't know which one might be a problem here. Perhaps you could check these ones with your working site at the same host.

For now, Rolf  :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
ChH
Forum Members
Forum Members
Posts: 18
Joined: Tue Dec 02, 2008 3:56 pm

Re: File upload ceased to work

Post by ChH »

Hi Rolf,

to 1: uploading and deleting via FTP works - no problem here.

to 2: also works, as far as I figured.

to 3: only Error(0) - debug log that came after a failed upload is in my first post.

to 4: not directly, but I can ask the admin to grep out output from my account.

all settings in the working copy seem identical.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: File upload ceased to work

Post by Rolf »

ChH,

I tried a lot of other things...
Create folders, deleted them again, renamed .htaccess in the uploads folder, etc. FileManager, ImageManager, Tried TinyMCE file upload (fixed your buttons btw)
No luck at all.

But when I looked int the adminlog I found this:
H...   Rügen 2009 (17).JPG Uploaded File 07.12.2009 17:50:33
H...   Rügen 2009 (17).JPG Uploaded File 07.12.2009 17:48:48
H...   Rügen 2009 (12).JPG Uploaded File 07.12.2009 17:48:08
H...   Rügen 2009 (12).JPG Uploaded File 07.12.2009 17:47:54
H...   Rügen 2009 (11).JPG Uploaded File 07.12.2009 17:47:44
H...   Rügen 2009 (11).JPG Uploaded File 07.12.2009 17:47:36
H...   Rügen 2009 (7).JPG Uploaded File 07.12.2009 17:47:14
H.   Rügen 2009 (5).JPG Uploaded File 07.12.2009 17:47:06
H...   Rügen 2009 (4).JPG Uploaded File 07.12.2009 17:46:58
H...   2009-Ostsee-Rügen Created Directory 07.12.2009 17:46:25
H...   2009 Created Directory 07.12.2009 17:45:39
H... 3 Hans User Login 07.12.2009 17:45:23
Huhh  ???

H... is an editor, so I created another account (editor) perhaps...
But no luck either.

ChH, this happened after an upgrade perhaps?
Try to reupload the files, perhaps something went wrong there...  :-\

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
ChH
Forum Members
Forum Members
Posts: 18
Joined: Tue Dec 02, 2008 3:56 pm

Re: File upload ceased to work

Post by ChH »

Actually, this happened before the update from 1.5.2... I had hoped to solve the problem with that update. I could roll back to before the update, as I always do backups before I change the system, but I don't believe this could fix anything...

But still, I'm reupping the files right now...
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: File upload ceased to work

Post by Rolf »

But why could admin user H... upload some files this afternoon???
It doesn't make sense  :-\

Rolf  ;)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
ChH
Forum Members
Forum Members
Posts: 18
Joined: Tue Dec 02, 2008 3:56 pm

Re: File upload ceased to work

Post by ChH »

I know. It doesn't. Not any. But then again, the files numbers are not increasing regular - which made me ask about this, and the answer made even less sence: with some files it worked, and with others it didn't.

Most confusing: The upload is reproducable for the files it worked with, and the upload failure is reproducable for the files it didn't.

Right now all I can think of is wait for the server admin's answer about PHP_Errorlog and in the meantime hate Murphy for his law.
Post Reply

Return to “CMSMS Core”