How can we increase the execution time of a PHP script?

Answers were Sorted based on User's Feedback



How can we increase the execution time of a PHP script?..

Answer / devasundaram

Three ways we can solve this.

1) set_time_limit() function

2) ini_set() function

3) Modifying `max_execution_time' value in PHP
configuration(php.ini) file

1 and 2 are using for temporarily purpose. 3 is for permanent.

Is This Answer Correct ?    66 Yes 9 No

How can we increase the execution time of a PHP script?..

Answer / rakesh kumar nautiyal

with the help of set_time_limit

Is This Answer Correct ?    61 Yes 16 No

How can we increase the execution time of a PHP script?..

Answer / raj

Through PHP INI FILE Max_exection_time function

Is This Answer Correct ?    19 Yes 4 No

How can we increase the execution time of a PHP script?..

Answer / anonymous

Using the funtion set_time_limit().It sets the number of
seconds a script is allowed to run .If this is reached
script returns a fatal error.The default limit is 30
seconds .If seconds is set to zero
no time limit is imposed.When called , set_time_limit()
restarts the timeout counter from zero.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.

Is This Answer Correct ?    27 Yes 13 No

How can we increase the execution time of a PHP script?..

Answer / chheena

Although there are more then one way to increase the
execution time but better to use
<?php set_time_limit(3600); ?>//increase the execution time
to 1hour,
//put above line on the top of your code

Is This Answer Correct ?    13 Yes 8 No

How can we increase the execution time of a PHP script?..

Answer / rachna

In which page we want to increase the execution time of the queries we put set_time_limit(3600); in that page.

Is This Answer Correct ?    6 Yes 2 No

How can we increase the execution time of a PHP script?..

Answer / aamir

set_time_limit(3600);

Is This Answer Correct ?    6 Yes 4 No

How can we increase the execution time of a PHP script?..

Answer / sibtain

//set_time_limit(600);//temporary way
//ini_set();// temporary way
//C:\wamp\bin\apache\Apache2.2.11\bin\php.config ///permanent
way

Is This Answer Correct ?    1 Yes 0 No

How can we increase the execution time of a PHP script?..

Answer / waseem khan

set_time_limit(-1)

Is This Answer Correct ?    0 Yes 0 No

How can we increase the execution time of a PHP script?..

Answer / abhi

by changing the following setup at php.inimax_execution_time
= 30
; Maximum execution time of each script, in seconds

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More PHP Interview Questions

How can I rotate an image?

1 Answers   Rushmore Consultancy,


Dear Sir, i am a frasher and now i got a job offer from AentteQ Software Technologies for PHP developer.. so i am in confusion that is PHP correct for my carrer or i shud choose other then php for my carrer...plz suggest me

4 Answers   NIIT,


What are the new features available in php 7?

0 Answers  


What is class extend in php?

0 Answers  


Suppose your Zend engine supports the mode <? ?> Then how can u configure your PHP Zend engine to support <?PHP ?> mode ?

1 Answers   Rushmore Consultancy,






how to track user logged out or not? when a user is idle?

0 Answers  


what is PHP accelerator ?

2 Answers  


hey i m a trainee n jus wanted to ask that initially i was given the opportunity for .NET bt that project is abt to complete , nw i m asked to join a project of php on linux which is about to start , so wt say . is it a wise decision to join this project . will i be having job opportunities when i l complete my training after 4 months ? Plz suggest something ASAP .

1 Answers  


How can we know that a session is started or not? Rushmore-Consultancy 3 why we use @symbol before the variable HCL 3 How can you insert javascript in php code? TCS 9 How can you parse files that were not ending with .php by using Apache? 1 What is the difference between InnoDb tables and MyIsam Tables in php 1 Hi all, I have a problem in Apache on windows xp.I tried to unistall apache and install it again. But when in did the installation again, and tried to run apache, i get the following error message, Socketaddresse can just be used once. Make_sock: could not build to address 0.0.0.0.80 No listening sockets available.Shutting down Unable to open logs. and i also get (error) OS2. The system cannot fine the installed service named "Apache2". Please i need some one to help me out with this.I'm really fustrated cuz i need this stuff working as fast as possible. PLEASE HELP ME 2 1.Where are the sessions storing ? 2.What are the contents of a session file ? 3.If the server is loaded with too many session files there is a possibility of server crash. How can we solve this issue? 4. How does php server identify that the particular session belongs to particular user ? For ex: If two users A and B logged from different machine, separate session files (say 1 and 2) will be created in the server. But how the php knows that 1 belongs to A and 2 belongs to B ? TCS 3 How to send Email using PHP with MySQL in Linux Server?.. 3 Write a query to to delete duplicate rows? 3 How i can integrate merchant payment get way in zen cart? in php? plz help me BA-Continnum-Solutions 1 how to maintained the session from one page to another page based on the url and then entered into the first page is logging into instead of secondpage it goes to the another url.ie first login session togoes to the one url and next login session it goes to another url how is it possible in php please give me answer in that question iCynergy 1 Is there a way to encrypt text from php? 4 What’s the difference between sort(), assort() and ksort? Under what circumstances would you use each of these? 1 Write the code for upload a video file in PHP.How will You Play this in Your Page.? Convex-Digital 2 how to select the multiple data in selection button xasis-technologies 1 what are the current or latest versions of LAMP ? Linux, Apache, MySql, PHP 3 WWhat is the functionality of md5 function in PHP? 6 how php works with oracle? 1 what mode to use when creating dirs with mkdir? 1 How to upload a file (may be a .txt or a .doc file) from a php script/file? 1 For more PHP Interview Questions Click Here Copyright Policy | Terms of Service | Help | Site Map 1 | Articles | Site Map | Site Map | Contact Us | interview questions urls External Links

3 Answers   eMantras, HCL,


Why php is used in html?

0 Answers  


How check submit button is clicked in php?

0 Answers  


if i give Limit for mysql query through php command line script like this for ex. $limit=500; $total_items = 1500; for($start=0;$start<$total_items;){ $command = "/usr/bin/php -q /home/sitename/public_html/admin/feedmanager/test.php feedid ".$_GET['feedid']." start ".$start." end ".$limit ; $start = $start+$limit; $command_result = system($command); } so it's execute command for 3 times so it give limit to sql query but if i have 27000 data so it takes long time? so my question is that is that any way from php command line script that i can use for collect all the data at once?

0 Answers  


Categories