Please I need your help with a php
script I am trying to build.
I have created this script to send multiple sms to some recipients.All data are stored into a database table (data > 1500 rows).I use select
query with LIMIT 0, 1
. When the message goes I delete the specific row and I include
the file again to proceed to the next row
. The problem is that at the time the rows
= 300 I have a CONNECTION TIMEOUT ERROR. Please let me know how can I solve this or if there is another way to figure this out..
Asked
Active
Viewed 7,976 times
-1

GeoDim
- 171
- 2
- 3
- 11
2 Answers
1
You need to change in your php.ini
file these two lines based on your requiredment
max_execution_time = 60; // sec
Or Put this line at the top of your page
set_time_limit(100); // Sec

Janen R
- 729
- 10
- 21
-
Thanks but if I don't want to change `php.in` at all..What other options I have? – GeoDim Jun 06 '17 at 12:11
-
Change through your code by adding this line `set_time_limit(20);`..refer manual http://php.net/manual/en/function.set-time-limit.php – Janen R Jun 06 '17 at 12:19
0
There is max_execution_time limit in php.ini file, the file will execute 30seconds (default execution time in php), so you can add this code in top of your file.
ini_set('max_execution_time', 600);
here 600 means seconds.

user3259856
- 44
- 2
-
I will try it..Is there another way to make execution time initialize again?Something like `shell_exec` instead of `include` which I use? – GeoDim Jun 06 '17 at 12:15
-
shell_exec is for executing linux commands in php. so in order to increase file execution time, you need to set time limit in particular file or else change in php.ini file.. – user3259856 Jun 06 '17 at 12:19