Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Troubleshooting › Invalid/Corrupt Files when purchased
- This topic has 5 replies, 3 voices, and was last updated 13 years ago by mitchjburne.
-
AuthorPosts
-
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 #25479birdius69MemberHi, 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 you
October 15, 2010 at 8:56 pm #25480wzpModeratorYour 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 #25481mitchjburneMemberI 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_CP1’ 4
‘ESTORE_DLVS_TA1’ 5
‘ESTORE_DLVS_TU1’ 6
‘ESTORE_DLVS_IR1’ 7
‘ESTORE_DLVS_LCT’ 8
‘ESTORE_DLVS_LDB’ 9
‘ESTORE_DLVS_LEX’ 10
‘ESTORE_DLVS_PID’ 11
‘ESTORE_DLVS_APM’ 12
‘ESTORE_DLVS_APC’ 13
‘ESTORE_DLVS_S3M’ 14
‘ESTORE_DLVS_S3C’ 15
‘ESTORE_DLVS_FNF’ 16
‘ESTORE_DLVS_OPN’ 17
‘ESTORE_DLVS_FQN’ 18
‘ESTORE_DLVS_CNI’ 19
‘ESTORE_DLVS_CSI’ 20
‘ESTORE_DLVS_CPT’ 21
December 27, 2011 at 4:05 am #25482wzpModeratorAnd you are running PHP 5.3.x, right? Problem has been resolved.
https://support.tipsandtricks-hq.com/forums/topic/php-error-from-digital-product-url
Please download the latest version.
December 29, 2011 at 1:19 am #25483mitchjburneMemberBeautiful, fixed, thankyou….
And yes it is php 5.3.8.
-
AuthorPosts
- You must be logged in to reply to this topic.