When you have an import script that takes long to execute, the browser seem to lock up and you cannot access the website anymore. this is because a request is reading and locking the session file to prevent corruption.
you can either
- use a different session handler with session_set_save_handler()
- use session_write_close() in the import script as soon you don't need session anymore (best moment is just before the long during part takes place), you can session_start when ever you want and as many times you like if your import script requires session variables changed.
example
<?php
session_start(); $_SESSION['count'] = 0; session_write_close(); for($i=0; $i<=100; $i++){ session_start(); $_SESSION['count'] += 1; session_write_close(); sleep(2); }
?>