If you are in a shared server environment, and you don’t have access to the php.ini file, or you want to set php parameters on a per-site basis, you can use the .htaccess
file (when running on an Apache webserver).
For instance, in order to change the max_execution_time
value, all you need to do is edit .htaccess
(located in the root of your website, usually accesible by FTP), and add this line:
php_value max_execution_time 300
where 300 is the number of seconds you wish to set the maximum execution time for a php script.
There is also another way by using ini_set function in the php file
eg. TO set execution time as 5 second, you can use
ini_set('max_execution_time', 300); //300 seconds = 5 minutes
Please let me know if you need any more clarification.
phpinfo()
on your server. See if there is a value in the section Scan this dir for additional .ini files. If so, let me know.