Gordon, I'm not 100% sure what you want to do with this. However, when you have timeout issues with PHP, you may have to run the script from the commandline.
PHP has a max_execution_time which is set in the php.ini file. Also, the webserver will have a limited amount of time it will use to work on a web request. The key in this situation is to avoid the webserver entirely (unless it is essential for the code operation). On a Linux or other Unix system, if PHP is available on the commandline (`whereis php`) then you will generally not have a limit on the execution time or you can alter PHP's values with an ini_set() function call. Some filesystem functions may be best handled with a shell language such as bash (most popular in the Linux world) or csh (popular in the Unix side). These functions will sometimes be even faster than PHP's ability to open a file and write to it. You don't have to abandon PHP entirely, of course. I had a recent example at work where another developer created a program which connected to a database, executed a query, and then opened a text file for writing and saved the tab-delimited data. The process was quite slow. However, since I could run PHP from the commandline, I created a program to make the database connection and query and simply print (or echo) the results to the standard output. From the Linux xommandline I ran something like: php script.php > output.txt And the file was very quickly executed and I had the desired datafile. If I added an ampersand (&) to the end of the command, the process would run in the background. If I was curious about the execution time I could use: time php script.php > output.txt & While it's running, I could use a command to view the output.txt file: tail -f output.txt Although this may not apply to your specific problem, my point is that there are several ways to approach problems like this. 17M is quite large -- more than the 8M of RAM normally allocated to PHP, for example. Perhaps this will enable you to consider some different ways to approach your problem and possibly get some improved results. James _____ James D. Keeline http://www.Keeline.com http://www.Keeline.com/articles http://Stratemeyer.org http://www.Keeline.com/TSCollection http://www.ITeachPHP.com -- Free Computer Classes: Linux, PHP, etc. Fall Semester Begins Sep 7 -- New Classes Start Every Few Weeks. Spring Semester Begins in late January. Two new class topics. Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
