Title: php script execution time, downloads timing out
Last modified: September 1, 2016

---

# php script execution time, downloads timing out

 *  [bill7473](https://wordpress.org/support/users/bill7473/)
 * (@bill7473)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/php-script-execution-time-downloads-timing-out/)
 * Hello,
    I have a wordpress site with a members area. Members can download zipped
   files of images or video by clicking on a link. The files are in a directory 
   above the public_html directory. The files are served through a php script that
   purports to locate them in a directory in the public_html called “downloads”.
   But “downloads” is actually merely a wordpress page that links to the php script
   that calls the files from their true location. Thus the true path is hidden making
   the files more secure.In fact this php is contained in a plugin called “hide-
   real-download-path”. No longer supported or updated for a long time. But still,
   it’s not complicated and it used to work well. But following, it seems to me,
   a recent wordpress update, files now time out after 4 minutes. And so files in
   exess of around 25 – 30 mb fail to download.
 * The code includes the line
    **set_time_limit(0);** which ought by rights to keep
   the script open until completion.
 * I tried a different 4 line php script to force download without he location obscuring
   feature and that also timed out.
 * However, a straightforward entry of the path if the folder is placed below public-
   html allows the file to be downloaded completely
 * I’ve tried messing around with .htaccess code and wp-config code and user.ini
   code to extend php script execution time but haven’t found a solution.
 * The site is hosted on Godaddy shared hosting with level 3 resources. They say
   that they aren’t limiting the script execution time.
 * Anyone have any ideas what I should do to offer these files as downloads without
   publishing their address?
 * Has something changed in the latest version of WordPress to affect script execution
   times.?
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Rajesh Soni](https://wordpress.org/support/users/rajeshsoni/)
 * (@rajeshsoni)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/php-script-execution-time-downloads-timing-out/#post-7551180)
 * Some hosting providers force terminate a script after certain minutes under a
   shared hosting plan.
 * Try upgrading to a VPN / Dedicated plan.
 *  [Mark Ratledge](https://wordpress.org/support/users/songdogtech/)
 * (@songdogtech)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/php-script-execution-time-downloads-timing-out/#post-7551183)
 * [@bill7473](https://wordpress.org/support/users/bill7473/): There is no reason
   at this point to go to a bigger server. See [https://www.godaddy.com/help/php-upload-limits-on-shared-hosting-1475](https://www.godaddy.com/help/php-upload-limits-on-shared-hosting-1475)
   to check/change your upload limits in your php.ini file. The php.ini file should
   override the timeout in the plugin. You’re able to directly download the file
   from another folder because the plugin isn’t in the php execution loop.
 * If needed, you can also change the timeout itself with
 * `max_execution_time = 120`
 * on the same php.ini file, but try the upload limit first. GoDaddy may globally
   limit the actual timeout when they don’t limit the download size.
 *  Thread Starter [bill7473](https://wordpress.org/support/users/bill7473/)
 * (@bill7473)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/php-script-execution-time-downloads-timing-out/#post-8160714)
 * Thank you Mark and Rajesh for your replies. I’m astonished that 2 months have
   passed since I posted this. With Godaddy shared hosting it isn’t possible to 
   directly access the php.ini file. However via C Panel > Software > Select PHP
   version > Switch to PHP options you can enter a value for max_execution_time.
 * I wasn’t able however to solve my problem so I resorted, until I find a better
   solution, to putting the zip files in a folder below public_html and providing
   direct links, which isn’t very secure but does at least work. I limited access
   to the folder so no one can list its contents and gave the zips long obscure 
   alpha-numeric file names so they can’t be easily guessed.
 * Anyway I wanted to thank you for your advice and also, in case anyone else needs
   to search for the php.ini file with a Godaddy hosted site. That’s where it is.
   I had to call em to find out.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘php script execution time, downloads timing out’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [bill7473](https://wordpress.org/support/users/bill7473/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/php-script-execution-time-downloads-timing-out/#post-8160714)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
