WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Changing the default 30 seconds time limit of PHP scripts
Categories : PHP, PHP Options and Info
Boaz Yahav
Date : Jul 24th 1999
Grade : 3 of 5 (graded 7 times)
Viewed : 12102
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Boaz Yahav
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

QUESTION
=======

I'd like to know if it's possible to make the global 30-second time limit
that PHP3 has, to make it 5 minutes for example for a specified Virtual
host, or even for a directory.


Answer
=====


Use the set_time_limit() function :

set_time_limit -- limit the maximum execution time


Description
========

void set_time_limit(int seconds);

Set the number of seconds a script is allowed to run. If this is reached, the script returns
a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value
defined in php3.ini. If seconds is set to zero, no time limit is imposed.

When called, set_time_limit() restarts the timeout counter from zero. In other words, if the
timeout is the default 30 seconds, and 25 seconds into script execution a call such as
set_time_limit(20) is made, the script will run for a total of 45 seconds before timing out.

NOTE : This function can't be used if you are running under safe mode




Security, Password lock out after three tries, authorization fails and is logged locked out of account till admin decides he will unlock it.
Categories : Sessions, PHP, MySQL, PHP Options and Info
Step by Step installation manual for PHP4.1.x on Windows 2000 based systems running IIS5 using CGI or ISAPI
Categories : PHP, PHP Configuration, PHP Options and Info, Windows 2000
Pageinfo: Array containing page URI, page query string (parameters), request method (GET or POST) and the complete URI
Categories : Variables, PHP Options and Info, Arrays, URLs, PHP
database,php,mysql,demo,example,php3,training,tutorial,codes,code
Categories : Databases, MySQL, PHP, PHP Options and Info
PHP and IE 6. The new privacy option in IE 6 blocks an important cookie if you ever want a session.
Categories : PHP, PHP Options and Info
Sessions and -enable-trans-sid
Categories : PHP, PHP Configuration, PHP Options and Info, Sessions
PHP, simple, counter, bala
Categories : HTML and PHP, PHP, PHP Options and Info
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query
Categories : PHP, PHP, HTML, PDF, Excel
PhpView 0.1 - simple php viewer, using temporary files and frames.
Categories : PHP, PHP Options and Info, Debugging, HTML and PHP
dl -- load a PHP extension at runtime
Categories : PHP, PHP Functions, PHP Options and Info
Make your PHP 4.1 (or higher) script compatible with PHP 4.0 (still used by some prviders)
Categories : PHP, PHP Options and Info, Variables
Simple PHP program which calls other PHP program you can pass the variables to other PHP program : by Raju
Categories : PHP, PHP Options and Info, Regexps, Program Execution
Audio-Enable Discussion Boards with this Web-page Audio Recorder / Player!
Categories : PHP Extensions, Java, PHP
The su doku solver in PHP
Categories : PHP, Games
Contents Page - a script to build contents pages.
Categories : Complete Programs, PHP, Utilities, Filesystem