Advertisement:

Author Topic: upload images  (Read 8321 times)

spevoli

  • Jr. Member
  • **
  • Posts: 83
upload images
« on: April 08, 2016, 12:31:51 am »
Hi,

a new installation with 3.61.. a new problem :-)

http://www.jamengo.de/lokalanzeiger/marktplatz/kleinanzeigen/index.php?page=item&action=item_add

an installation with 3.59 with the same hoster, works perfectly ...
use the current "bender theme"

have their an idea why it does not work?

regards, spevoli

« Last Edit: April 08, 2016, 12:38:52 am by spevoli »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: upload images
« Reply #1 on: April 08, 2016, 01:00:11 am »
Hi,

I can see you're using my plugin Pre-resize Images, is it working fine if you disable the plugin? ???

Regards

spevoli

  • Jr. Member
  • **
  • Posts: 83
Re: upload images
« Reply #2 on: April 08, 2016, 01:05:30 am »
Hi Teseo :-)
I had hoped that your plugin helps: D

in the clean version was not already...

regards, spevoli

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: upload images
« Reply #3 on: April 08, 2016, 01:30:50 am »
Sorry I don't understand you... Same problem with no plugin? ???

Regards

spevoli

  • Jr. Member
  • **
  • Posts: 83
Re: upload images
« Reply #4 on: April 08, 2016, 01:42:06 am »
" Same problem with no plugin?" - yes!

i do not understand why it works sometimes and sometimes not ...
3:59 ok .. 3.61 not ...

confused :-(

regards, spevoli

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: upload images
« Reply #5 on: April 08, 2016, 01:49:17 am »
That what's not making sense, exactly the same file on 3.5.9 and 3.6.1 ???

Just to identify the problem, make this modification on the plugin, preResize_images\prziAjaxUploader.php.

Locate this block:

Quote
            if (function_exists('finfo_file') && function_exists('finfo_open')) {
                $finfo = finfo_open(FILEINFO_MIME_TYPE);
                $fileMime = finfo_file($finfo, $file);
            } else if (function_exists('mime_content_type')) {
                $fileMime = mime_content_type($file);
            } else {
                // *WARNING* There's no way check the mime type of the file, you should not blindly trust on your users' input!
                $ftmp = Params::getFiles('qqfile');
                $fileMime = @$ftmp['type'];
            }

and replace with:

Code: [Select]
/*            if (function_exists('finfo_file') && function_exists('finfo_open')) {
                $finfo = finfo_open(FILEINFO_MIME_TYPE);
                $fileMime = finfo_file($finfo, $file);
            } else if (function_exists('mime_content_type')) {
                $fileMime = mime_content_type($file);
            } else {*/
                // *WARNING* There's no way check the mime type of the file, you should not blindly trust on your users' input!
                $ftmp = Params::getFiles('qqfile');
                $fileMime = @$ftmp['type'];
//            }

Regards

spevoli

  • Jr. Member
  • **
  • Posts: 83
Re: upload images
« Reply #6 on: April 08, 2016, 02:02:16 am »
my mistake...
« Last Edit: April 08, 2016, 02:17:20 am by spevoli »

spevoli

  • Jr. Member
  • **
  • Posts: 83
Re: upload images
« Reply #7 on: April 08, 2016, 02:16:43 am »
 jippi teseo,

it works... :-)

what was the reason?

regards, spevoli


teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: upload images
« Reply #8 on: April 08, 2016, 02:22:07 am »
Maybe some problem with those functions finfo_open and finfo_file, what version of PHP are you running?

spevoli

  • Jr. Member
  • **
  • Posts: 83
Re: upload images
« Reply #9 on: April 08, 2016, 12:28:20 pm »
Hi,

PHP Version is 5.2.17

regards , spevoli

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: upload images
« Reply #10 on: April 08, 2016, 12:44:16 pm »
That explains it. Try this, restore the original block:

Code: [Select]
           if (function_exists('finfo_file') && function_exists('finfo_open')) {
                $finfo = finfo_open(FILEINFO_MIME_TYPE);
                $fileMime = finfo_file($finfo, $file);
            } else if (function_exists('mime_content_type')) {
                $fileMime = mime_content_type($file);
            } else {
                // *WARNING* There's no way check the mime type of the file, you should not blindly trust on your users' input!
                $ftmp = Params::getFiles('qqfile');
                $fileMime = @$ftmp['type'];
            }

But replace "FILEINFO_MIME_TYPE" with "FILEINFO_MIME", see if then everything's all right.

Regards

Aficionado

  • Guest
Re: upload images
« Reply #11 on: April 08, 2016, 01:25:11 pm »
Hi,

PHP Version is 5.2.17

regards , spevoli

Do you know how old 5.2 is ?

spevoli

  • Jr. Member
  • **
  • Posts: 83
Re: upload images
« Reply #12 on: April 08, 2016, 02:29:56 pm »
Hi,

I uploaded a file for php info on the server (all-inkl)

http://www.jamengo.de/php-info.php

@ teseo
will test it equal

I can * Create .htaccess file ...
what would be better?

PHP 7.0.x als CGI -> AddHandler php70-cgi .php
PHP 5.6.x als CGI -> AddHandler php56-cgi .php
PHP 5.5.x als CGI -> AddHandler php55-cgi .php
PHP 5.4.x als CGI -> AddHandler php54-cgi .php
PHP 5.3.x als CGI -> AddHandler php53-cgi .php
PHP 5.2.x als CGI -> AddHandler php52-cgi .php

regards, spevoli
« Last Edit: April 08, 2016, 02:34:24 pm by spevoli »

spevoli

  • Jr. Member
  • **
  • Posts: 83
Re: upload images
« Reply #13 on: April 08, 2016, 02:45:56 pm »
That explains it. Try this, restore the original block:

Code: [Select]
           if (function_exists('finfo_file') && function_exists('finfo_open')) {
                $finfo = finfo_open(FILEINFO_MIME_TYPE);
                $fileMime = finfo_file($finfo, $file);
            } else if (function_exists('mime_content_type')) {
                $fileMime = mime_content_type($file);
            } else {
                // *WARNING* There's no way check the mime type of the file, you should not blindly trust on your users' input!
                $ftmp = Params::getFiles('qqfile');
                $fileMime = @$ftmp['type'];
            }

But replace "FILEINFO_MIME_TYPE" with "FILEINFO_MIME", see if then everything's all right.

Regards


have changed it...
does not work, I am now trying to put everything back to the beginning and create a htacces ...
PHP 7.0.x als CGI -> AddHandler php70-cgi .php
maybe it works then? :-)

regards, spevoli

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: upload images
« Reply #14 on: April 08, 2016, 03:32:17 pm »
That would be a better solution, upgrading your PHP, try:

PHP 5.6.x als CGI -> AddHandler php56-cgi .php

With no modifications to the plugin.

Regards