generating 1500 files to the server via php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fishnfrogs
    New Member
    • Nov 2009
    • 20

    generating 1500 files to the server via php

    Hi all! I have some data on my database that only gets update once a month. I'm interested in caching that data to xml and storing on my server so that the database isnt being called everytime someone visits the site. Instead, itll just load the newest version of the xml. I have it all set up to work correctly, however, I'm getting an Internal Server Error when I tried to write around 100 files to the server. I stored all the Sql queries into an array and use a counter to go through and hit my database and generate the xml. Theres about 1500 different options which means itll be about 1500 xml files. Is it possible to save 1500 files to the server or is it going to time out? Not sure if Im posting enough info so if theres any questions, I can answer them more thoroughly. Thanks in advanced!!
  • Niheel
    Recognized Expert Moderator Top Contributor
    • Jul 2005
    • 2432

    #2
    Increase the timeout limit in your php.ini file and also run the file using CLI (command line).

    Those two steps should help you create the full 1500 files you need.
    niheel @ bytes

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      Furthermore, check your server error logs, etc. for any helpful information on what caused the error.

      Mark.

      Comment

      • fishnfrogs
        New Member
        • Nov 2009
        • 20

        #4
        Hi, thanks for the response. I'm googling around and trying to find information on the CLI. From what I've read so far, it isn't for a web server. Also, I don't think I have access to the php.ini file. I have tried using set_time_limit function and passed it both 0 and 240, but to no avail. My error.log is giving me the 'Premature end of script headers:' error. If there are any more suggestions or questions, I'd appreciate it. I'm going to keep searching. Thanks!

        Comment

        Working...