News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

there is a problem about php script

Started by dalga17, 29.11.2015 15:26:21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dalga17

Hi,

There is a problem about php script in jd.

When activate php script, zip file or image file is downloading but damaged opens zip file or image file. Is there a problem on my php ?

I use php 5.4
memory_limit : 64m
max_execution_time : 300
max_input_time : 300
post_max_size : 64m



  •  

ColinM

Hi
Apologies but I do not quite understand! :(

Are you saying pdf and img files download OK but a php file does not download properly?

Or are you saying that you have set field "Send Downloads using the PHP Script?"  in Config - Downloads tab to Yes but that when you download pdf files for example they do not get downloaded properly?  Also what type of img file?

If it is that files are downloading but not complete then have you set your site variables max_filesize and post_max_size high enough?  These are usually set in a file called php.ini.  That is it might be the upload that is 'incomplete'. Have you checked the file size on your PC and the size on your website? Typically I use

upload_max_filesize=40M
post_max_size=42M

If you are unsure what to do then you need to contact your hosting service.

Colin
Colin M
  •  

dalga17

#2
Quote from: ColinM on 29.11.2015 17:03:20
Hi
Apologies but I do not quite understand! :(

Are you saying pdf and img files download OK but a php file does not download properly?

Or are you saying that you have set field "Send Downloads using the PHP Script?"  in Config - Downloads tab to Yes but that when you download pdf files for example they do not get downloaded properly?  Also what type of img file?

If it is that files are downloading but not complete then have you set your site variables max_filesize and post_max_size high enough?  These are usually set in a file called php.ini.  That is it might be the upload that is 'incomplete'. Have you checked the file size on your PC and the size on your website? Typically I use

upload_max_filesize=40M
post_max_size=42M

If you are unsure what to do then you need to contact your hosting service.

Colin

Yes, i have set field "Send Downloads using the PHP Script?" in Config. All files (zip,jpg,pdf) are downloading and completing. But, all files were damaged . There is no problem file size on pc and website.
  •  

ColinM

Hi
Something strange as this works AOK on everywhere else I have tried!!
Could you perhaps PM (private message) with site details so I can look.  May need super user access

Colin
Colin M
  •  

dalga17

thanks for reply, i sent my site with pm
  •  

ColinM

Hi
I have had a brief look.  As you said the php script is not in use.  I downloaded a zip file OK but a strange thing occurred when I tried to download Pano için Atatürk Posterleri (model14) which is ID 64.  This is shown as a Zip by its symbol but is actuallys an rar file called model14-pano-icin-ataturk.rar .  The symbol is not important but when I downloaded it was opened in the browser (FireFox) which surprised me.  Then I looked at the jD config and there were no file types selected for opening by the browser.  This is not wrong but unusual.  It is possible that such a combination with no file types selected to be opened by the browser has not been tried.  So could you perhaps put in say that pdf files will be opened by the browser, switch back to the php script for downloading to see if that gives us a clue.
I did not do this as I do not want to upset any users!

Colin
Colin M
  •  

dalga17

Quote from: ColinM on 30.11.2015 22:40:14
Hi
I have had a brief look.  As you said the php script is not in use.  I downloaded a zip file OK but a strange thing occurred when I tried to download Pano için Atatürk Posterleri (model14) which is ID 64.  This is shown as a Zip by its symbol but is actuallys an rar file called model14-pano-icin-ataturk.rar .  The symbol is not important but when I downloaded it was opened in the browser (FireFox) which surprised me.  Then I looked at the jD config and there were no file types selected for opening by the browser.  This is not wrong but unusual.  It is possible that such a combination with no file types selected to be opened by the browser has not been tried.  So could you perhaps put in say that pdf files will be opened by the browser, switch back to the php script for downloading to see if that gives us a clue.
I did not do this as I do not want to upset any users!

Colin

Thank you for your interest.

Now, i changed symbol and entered html,htm,txt,pdf,doc file types to be opened by the browser. Then, i opened the using php. Finally, the same problem is happening again :( I could not solve this strange problem.

Now, php script is not in use. You can also turn off and open to see results .


  •  

ColinM

Hi
I have done some more testing.  Zip files work very well with either PHP scpit download on or off. But RAR archives have a problem!  If I have PHP Script download as Yes it appears to work but if I try to open with WinRar it tells me it is damagerde, as you first reported.  If I have PHP Script download as No then it opens up automatically in my browser as a load of strange characters.

As part of the investigation I installed ProFiles file manager.  That has a download capability and when I used it with RAR files it downloaded as expected.  So there appears to be a challenge downloading RAR files.
I will consult with Arno.
Colin
Incidentally why do you use RAR as WinRAR is not free, but 7z is free?
Colin M
  •  

dalga17

Quote from: ColinM on 01.12.2015 14:09:18
Hi
I have done some more testing.  Zip files work very well with either PHP scpit download on or off. But RAR archives have a problem!  If I have PHP Script download as Yes it appears to work but if I try to open with WinRar it tells me it is damagerde, as you first reported.  If I have PHP Script download as No then it opens up automatically in my browser as a load of strange characters.

As part of the investigation I installed ProFiles file manager.  That has a download capability and when I used it with RAR files it downloaded as expected.  So there appears to be a challenge downloading RAR files.
I will consult with Arno.
Colin
Incidentally why do you use RAR as WinRAR is not free, but 7z is free?

the problem is not just zip or RAR . If i upload jpeg image, it gives error, too
  •  

ColinM

Hi
I uploaded a jpg file into a Download called test-jpg, it is the bananas_2.jpg from Joomla!  There was no problem in downloading by either method. What was strange is that the name was changed to o_1a5fpj03afd23671eelcio7nsa.jpg. I have not looked into that.  I have left the download there but unpublished it

Similarly I found no problem with zip files.

For me it is only rar files that are giving a problem with both download methods.

Could you tell me how you create a Download.  I used the Upload facility in the Files panel at backend.
Have you noticed file name changes?  I set the admin language to English for my tests with the admin account you created.

Colin
Colin M
  •  

dalga17

#10
Hi,

I tested that you uploaded test-jpg. There is no problem in downloading by php script of, but there is a problem in downloading by php script on ? I again uploaded this your test-jpg from ftp for you look
Link : removed . It is not opened

And I tested another pc, same error. And guests said same error.

Could it be a problem in php on server ?
  •  

Arno

Hi,
maybe should you contact your hoster and tell him from your problem. This can only be a problem with your server settings.
Many thousands users works with jDownloads without to have a problem like this.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •