I want to run a .sql file using PHP and PDO.
It is working fine in my local environment. But in live it executes only 3500 lines from my SQL file.
Below this is my PHP code:
define('SITE_URL', 'http://' . $_SERVER["SERVER_NAME"] . '/');
define('DIR_URL', $_SERVER["DOCUMENT_ROOT"] . '/');
$db = new PDO("mysql:host=$db_host;dbname=$db_name",$db_username,$db_pass);
$sql = file_get_contents(SITE_URL.'database/mysql.sql');
$db->exec($sql);
My problem is mysql.sql
file is executing only 3500 lines after that it does not execute the remaining lines in live environment.
Thanks in advance.