That's when I ran into performance troubles...
Server Environment: Windows 2000 Server, Apache 2, Zend WinEnabler with PHP 5
Originally I was getting the user-entered key using $_POST['keyval'] when the user submitted the form. When I tried using http://www.someurl.com/pdf-gen.php?keyval=xxx, and getting the keyval using $_GET['keyval'], the script consistently took about 3 times longer to execute.
For the POST method, I used a single script with the following:
Code: Select all
if (!isset($_POST['submit'])) {
// display HTML form
}
else {
$keyval = $_POST['keyval'];
// generate PDF report
}Code: Select all
if (!isset($_GET['keyval'])) {
// display user notice
}
else {
$keyval = $_GET['keyval'];
// generate PDF report
}It seems GET is the culprit here, as all other elements are as equal as possible. I have tried using PATH_INFO but could not get it to work in this environment; perhaps it is Windows, perhaps using WinEnabler, or perhaps I just couldn't get it configured. GET was the only method I could (so far) successfully pass a value to my script.
The desired functionality (which we do have with GET) is to have the user click a link on a page that "opens" the PDF report -- but with better performance! Can anyone offer an explanation, or suggestions for improving performance?
Thanks for reading my first post!
Daniel