Author Topic: Select an Image File! error  (Read 32006 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Select an Image File! error
« Reply #15 on: November 09, 2005, 03:48:54 AM »
A test 3.84 MB MP3 file at 44kh 16-bit Stereo won't upload, but that same file reduced to 860k 22kh mono will.
Saying "wont upload" is not helpfull. As I was trying to show you above, the full error message is very important in debuging.
So, post the full message or be more describtive what happens (if no error messages).
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline jjo

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Select an Image File! error
« Reply #16 on: November 09, 2005, 03:50:38 AM »
A test 3.84 MB MP3 file at 44kh 16-bit Stereo won't upload, but that same file reduced to 860k 22kh mono will.
Saying "wont upload" is not helpfull. As I was trying to show you above, the full error message is very important in debuging.
So, post the full message or be more describtive what happens (if no error messages).

As mentioned in the first message in this thread, if you try to upload [certain] MP3 files, the file uploads, but then the upload form is shown with the error, "Select an Image File!" up top.  That's all.  No other errors are given.  I can't tell you anymore, as 4Images isn't giving up any more secrets.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Select an Image File! error
« Reply #17 on: November 09, 2005, 03:59:57 AM »
ok, then what about what is the upload limit set on your server?
Check in phpinfo():

Code: [Select]
<?php
phpinfo
();
?>
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline jjo

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Select an Image File! error
« Reply #18 on: November 09, 2005, 04:02:09 AM »
ok, then what about what is the upload limit set on your server?
Check in phpinfo():

Here are the results:
http://www.joelfan.com/php.php

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Select an Image File! error
« Reply #19 on: November 09, 2005, 04:05:41 AM »
Quote
upload_max_filesize = 2M
Ask your hoster to increase upload size limit
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline jjo

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Select an Image File! error
« Reply #20 on: November 09, 2005, 04:10:03 AM »
Quote
upload_max_filesize = 2M
Ask your hoster to increase upload size limit

Done.  Thanks.  That seems to be the root of all my problems.

Thanks.

Offline jjo

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Select an Image File! error
« Reply #21 on: November 24, 2005, 02:22:21 PM »
Well, I enjoyed about 15 days of my gallery working after the max_upload_size problem was raised from 2M to 10M.  But now, my ISP changed something, and now I'm back down to 2M file limits.

But according to my PHP settings (http://www.joelfan.com/php.php), it's still at 10M.

But if I try to upload anything larger than 2M, the upload fails, and the user is placed back at the upload form with the error, "Please Select an Image File!".

Any thoughts?

http://www.joelfan.com/gallery

The "Test" gallery is open to recieve uploads from anyone.

Please help.

Offline Acidgod

  • Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Select an Image File! error
« Reply #22 on: November 24, 2005, 02:39:52 PM »
The max_execution_time can be the Problem... 30 sec. is very few...

Offline jjo

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Select an Image File! error
« Reply #23 on: November 24, 2005, 02:50:49 PM »
How can I up that time?

I upped the max_file_upload by adding an entry in an php.ini file in the root.  Would I just add another line in that file to change that setting?

If so, what's the syntax?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Select an Image File! error
« Reply #24 on: November 24, 2005, 02:57:33 PM »
Its strange, indeed...
not sure if this helps, but try add in global.php:
Code: [Select]
 @ini_set('max_execution_time', 180); (doubt it will help though)

If that wont help, try to debug it: in member.php find:
Code: [Select]
$uploaderror = 0;insert below:
Code: [Select]
print_r($HTTP_POST_FILES);
echo "<br>";
print_r($_FILES);
It should show you something on top of the page after upload.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline jjo

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Select an Image File! error
« Reply #25 on: November 25, 2005, 02:47:30 AM »
I made those two changes.  The first didn't help.

The second yeilded the following result with a 5MEG upload test MPG file:

Array ( [media_file] => Array ( [name] => Kryptonite.mp3 [type] => [tmp_name] => [error] => 1 [size] => 0 ) [thumb_file] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) )
Array ( [media_file] => Array ( [name] => Kryptonite.mp3 [type] => [tmp_name] => [error] => 1 [size] => 0 ) [thumb_file] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) )


Suggestions?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Select an Image File! error
« Reply #26 on: November 25, 2005, 03:36:17 AM »
this is strange (oh, wait, I already said that before!)

Acording http://us2.php.net/manual/en/features.file-upload.errors.php this error applyed:
Quote
The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form

I'm running out of ideas...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline jjo

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Select an Image File! error
« Reply #27 on: November 25, 2005, 05:30:11 AM »
Here's what my ISP changed on their servers the other day.

They enabled something called "PHPsuexec". 

I don't know what that is.  Could something related to this be causing problems with the gallery on my site?

Offline jjo

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Select an Image File! error
« Reply #28 on: November 25, 2005, 03:12:32 PM »
I think the problem is that the command, upload_max_filesize = 10M, in my php.ini isn't really upping the size from 2M to 10M even though it's reported as 10M in my settings (http://www.joelfan.com/php.php).

Is this possible?

Is there another way to up my upload_max_filesize?

I added a line in my .htaccess file, but it just causes a 500 Internal Server Error.  (The line was php_value upload_max_filesize 10M).


Offline jjo

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Select an Image File! error
« Reply #29 on: November 26, 2005, 06:54:28 PM »
I think I figured it out..again.

I had to put a php.ini file with the "upload_max_filesize = 10M" line in the directory where the upload php script is located, not just in the "root" of the website.