4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: jjo on November 09, 2005, 01:28:46 AM

Title: Select an Image File! error
Post by: jjo on November 09, 2005, 01:28:46 AM
Why would my gallery (http://www.joelfan.com/gallery) not permit any uploads of MP3 files?  I have the MP3 extension set in the control panel as an acceptable upload extension, and I added the MP3 mime type line added in the upload_definitions.php file, and I have an MP3 template html file created.

But when you try to upload an MP3 file, it uploads the file, but then the upload form is shown again with the "Select an Image File!" error on top.  And yes, the MP3 file is below the max file size.

Any thoughts?
Title: Re: Select an Image File! error
Post by: V@no on November 09, 2005, 02:49:28 AM
What about other extensions?
What 4images version?
PHP version?
Title: Re: Select an Image File! error
Post by: jjo on November 09, 2005, 02:53:15 AM
What about other extensions?
What 4images version?
PHP version?

-Other extensions seem to work fine.
-4Images 1.71
-PHP 4.3.11 with Zend Optimizer

Also, recently, my gallery is behaving very slowly.  Is there something I can flush or reset to quicken the gallery?
Title: Re: Select an Image File! error
Post by: V@no on November 09, 2005, 03:01:50 AM
-Other extensions seem to work fine.
-4Images 1.71
-PHP 4.3.11 with Zend Optimizer
Can you create a test category were we could upload?


Also, recently, my gallery is behaving very slowly. Is there something I can flush or reset to quicken the gallery?
Make sure you dont have remote images, 4images does not like these.
Title: Re: Select an Image File! error
Post by: jjo on November 09, 2005, 03:04:15 AM
Test category created.  Anyone can upload there.

And, how do I know if I have "remote images"?
Title: Re: Select an Image File! error
Post by: V@no on November 09, 2005, 03:06:58 AM
well, you could try search in ACP for images with http:// in their filenames
Title: Re: Select an Image File! error
Post by: V@no on November 09, 2005, 03:08:26 AM
I can tell you right now http://joelfan.orlowski.com/gallery/details.php?image_id=40
is a remote file.
Title: Re: Select an Image File! error
Post by: V@no on November 09, 2005, 03:11:19 AM
But when you try to upload an MP3 file, it uploads the file, but then the upload form is shown again with the "Select an Image File!" error on top.
Not only! it also shows this:
Quote
fword.mp3: Invalid file type (mp3, application/octet-stream)
And the solution is:
http://www.4homepages.de/forum/index.php?topic=7277.0
Title: Re: Select an Image File! error
Post by: jjo on November 09, 2005, 03:11:49 AM
Is it possible to disable remote image/file hosting?
Title: Re: Select an Image File! error
Post by: V@no on November 09, 2005, 03:13:21 AM
just remove the field from member_upload.html template.
Title: Re: Select an Image File! error
Post by: jjo on November 09, 2005, 03:13:36 AM
But when you try to upload an MP3 file, it uploads the file, but then the upload form is shown again with the "Select an Image File!" error on top.
Not only! it also shows this:
Quote
fword.mp3: Invalid file type (mp3, application/octet-stream)
And the solution is:
http://www.4homepages.de/forum/index.php?topic=7277.0

I already have this line in my upload_definitions.php file:

$mime_type_match['mp3'] = array("audio/mpeg", "audio/x-mpeg", "audio/mp3", "audio/mpg");

Is that syntax wrong?

Title: Re: Select an Image File! error
Post by: V@no on November 09, 2005, 03:16:34 AM
No, you don't have the correct mime, I mean the syntax is correct, but you are missing the mime type needed, please read more carefuly the FAQ topic I've showed above
Title: Re: Select an Image File! error
Post by: jjo on November 09, 2005, 03:16:48 AM
just remove the field from member_upload.html template.

I removed (remarked-out) that field, and did an MP3 upload test, and it uploaded fine.

I changed nothing else.

Odd?
Title: Re: Select an Image File! error
Post by: V@no on November 09, 2005, 03:25:27 AM
I removed (remarked-out) that field, and did an MP3 upload test, and it uploaded fine.

I changed nothing else.

Odd?

indeed....:?
I had openend your "old" page with URL field in it, and it didnt let me upload, but after page referesh and tryed again - it worked...never seen this before :?

P.S. remote thumbnails also might slow down your gallery.
Title: Re: Select an Image File! error
Post by: jjo on November 09, 2005, 03:41:19 AM
Looks like its very picky when it comes to MP3 files.

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.

My upload file size limit is capped at 10mb.

Here are those files zipped...
http://www.joelfan.com/files.zip

Any thoughts?
Title: Re: Select an Image File! error
Post by: V@no 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).
Title: Re: Select an Image File! error
Post by: jjo 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.
Title: Re: Select an Image File! error
Post by: V@no 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
();
?>
Title: Re: Select an Image File! error
Post by: jjo 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
Title: Re: Select an Image File! error
Post by: V@no on November 09, 2005, 04:05:41 AM
Quote
upload_max_filesize = 2M
Ask your hoster to increase upload size limit
Title: Re: Select an Image File! error
Post by: jjo 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.
Title: Re: Select an Image File! error
Post by: jjo 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.
Title: Re: Select an Image File! error
Post by: Acidgod on November 24, 2005, 02:39:52 PM
The max_execution_time can be the Problem... 30 sec. is very few...
Title: Re: Select an Image File! error
Post by: jjo 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?
Title: Re: Select an Image File! error
Post by: V@no 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.
Title: Re: Select an Image File! error
Post by: jjo 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?
Title: Re: Select an Image File! error
Post by: V@no 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...
Title: Re: Select an Image File! error
Post by: jjo 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?
Title: Re: Select an Image File! error
Post by: jjo 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).

Title: Re: Select an Image File! error
Post by: jjo 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.

Title: Re: Select an Image File! error
Post by: V@no on November 26, 2005, 07:45:06 PM
That's something I've never heard before...so what if you move your php.php file into your gallery folder, will it show different result? 8O
Title: Re: Select an Image File! error
Post by: jjo on November 27, 2005, 01:31:29 AM
Looks like it:

http://joelfan.com/gallery/php.php
http://joelfan.com/php.php
Title: Re: Select an Image File! error
Post by: Acidgod on November 27, 2005, 03:52:22 AM
Looks like it:

http://joelfan.com/gallery/php.php
http://joelfan.com/php.php

strange... (o:
Title: Re: Select an Image File! error
Post by: V@no on November 27, 2005, 05:18:52 AM
(http://www.futurama-madhouse.com.ar/forum/Smileys/fmset/wall.gif)