Build Your Own Arcade Controls Forum
Main => Everything Else => Topic started by: SirPoonga on June 19, 2004, 01:19:00 am
-
I hve run into a problem and I just don't know the language enough to figure out a solution. Ok, for the controls.dat project one of the things I need to do is output an xml file. Well there is getting to be enough data where that option times out the server limit (30 seconds). Now I know the first thing to do is lok and see if I can slim down the xml. Well, I might beable to but that won't help in the long run.
However there may be an easier way of duming the information from several tables into an xml file that I haven't though of yet.
-
...
-
Someone's looking to get banned for LIFE. >:(
-
that was rude...
sirp... you should be able to (host depending) your php.ini file to adjust the time out settings...
if you don't have access to edit php.ini on your host, you *may* get lucky and be able to modify php server variables via .htaccess file.
I don't know the declaration off hand, but a little bit of googling should unearth it...
lmk if you want any other advice sirp... i also suggest checking out php adodb database abstraction layer (it also handles xml parsing if i'm not mistaken... not sure if that'll help... but *shrug*
good luck!
rampy
-
that was rude...
sirp... you should be able to (host depending) your php.ini file to adjust the time out settings...
if you don't have access to edit php.ini on your host, you *may* get lucky and be able to modify php server variables via .htaccess file.
Well, you know who own the fe.donkeyfly.com server, right!
I've tried php's xml stuff. It is extremely slow. It even caused' pj's server to fillup the swap.
-
is mysql the backend?
where are you pushing the output xml too (i.e. a local file on the server, or over http to the webbrowser?)
can I get access to the scripts you are using (i'm a bit of hack but... maybe i can see something obvious...)
are you using an existing php library to do the xml creation?
I would think XML reading/parsing would be more intensive than xml file creation... but what do i know...
rampy
-
I know I am doing it an not so efficient way, I am still learning php. Here's what I am doing now.
MySQL backend.
header("Cache-control: private"); //IE 6 Fix
header("Pragma: no-cache");
header("Content-type: text/xml");
header('Content-Disposition: attachment; filename="controls.xml"');
...
$tempxml = $tempxml . "<dat>\r\n";
$tempxml = $tempxml . " <meta>\r\n";
$tempxml = $tempxml . " <description name=\"Controls.dat XML file\"/>\r\n";
$tempxml = $tempxml . " <version name=\"0.01\"/>\r\n";
...
if($nowhite == 1)
{
$tempxml = str_replace("\r\n", "", $tempxml);
$tempxml = str_replace(" ", "", $tempxml);
}
$tempxml = str_replace( '&', '&', $tempxml );
print $tempxml;
-
I know it's probably not the "best" way to do it, but consider creating a folder writeable by apache/php... and having your program write the xml to local file (instead of sending it through the browser), then create a link to finished output file.
i'm probably misunderstanding the intent of the application... but all the overhead of sending it via browser can make it timeout... i've had simillar fustrations when dumping/uploading HUGE mysql database backups via phpmyadmin... but i digress...
do you know if the script works properly if given enough time to execute? i.e. a smaller slice of XML, or if you get an upp'ed script execution time on the mamehost server?
rampy
-
Yes, I know it works because it has been working until the dataset has been too large.
Writing to file will actually be slightly slower. Right now I write all the data to memory then send it.
I've been thinking of making it a file on the but that is more complicated than it sounds.
I am going to look at the source for phpmyadmin and see how they do it.
-
Yes, I know it works because it has been working until the dataset has been too large.
Writing to file will actually be slightly slower. Right now I write all the data to memory then send it.
I've been thinking of making it a file on the but that is more complicated than it sounds.
I am going to look at the source for phpmyadmin and see how they do it.
I really dont' think writing to a "local" file will be slower (just a gut feeling)... I think the http transfer forces the php interpretter to be loaded too long for long datasets. but that's just my gut feeling... of course storing/retrieving stuff from memory is faster, but in this case... for a large dataset... hmm...
*Shrug*
rampy