October 15, 2010 at 6:31 pm #2043birdius69Member
I’m just setting up my website and have bought your fab product today. However, when you purchase my digital content the zip file, or jpg file, its saying it is either an invalid or corrupt file. Now if you download the same file directly from my website and not through estore its fine. Can you tell me what I’m doing wrong please!
Thank you so much!October 15, 2010 at 7:49 pm #25479birdius69Member
Hi, after a lot of head scratching, we’ve managed to resolve the problem, so thought I would like you know what it was, incase it happens again to somebody else.
I opened the downloaded file with notepad and found the first few lines of it were a PHP error:
set_time_limit() has been disabled for security reasons in ..path to file here.. download.php on line 134
This line has now been commented out, and the downloads now work. Are there any problems in not having this in there?
Thank youOctober 15, 2010 at 8:56 pm #25480wzpModerator
Your server is running in PHP “Safe Mode.” In Safe Mode, the operation of certain PHP functions is restricted or ignored. The set_time_limit() function is one of them.
If you were to create a PHP file, called “test.php” containing the following one line:
<?php phpinfo(INFO_ALL); ?>
…And then execute it as yoursite.com/test.php you will get a whole bunch of stuff about your PHP configuration. One of those is “max_execution_time” under the “PHP Core” section. It specifies the maximum number of seconds any given PHP script is allowed to run.
So, by default, any file that is downloaded must be downloaded in under that number of seconds, “…or else” the Hosting Gods step in and terminate the download script. The download script attempts to “turn off” the timer.
It is preferred that you try to get your hosting provider to turn Safe Mode “off.”
P.S. If you do create the “test.php” file, please delete it after you see the information; so that your configuration remains confidential.December 27, 2011 at 3:58 am #25481mitchjburneMember
I have the same problem as ‘birdius69’ however safe mode is already off. I also opened the .jpg and .zip files in notepad and both have the following markup:
<b>Notice</b>: Use of undefined constant ESTORE_DLVS_HI1 – assumed ‘ESTORE_DLVS_HI1’ in <b>xampphtdocswordpresswp-contentpluginswp-cart-for-digital-productsdownload.php</b> on line <b>3</b>
this loops each time for the following and with the difference:
‘ESTORE_DLVS_CPT’ 21December 27, 2011 at 4:05 am #25482wzpModerator
And you are running PHP 5.3.x, right? Problem has been resolved.
Please download the latest version.December 29, 2011 at 1:19 am #25483mitchjburneMember
Beautiful, fixed, thankyou….
And yes it is php 5.3.8.
- You must be logged in to reply to this topic.