Jump to content

Long Parse times by PHP


phporcaffeine

Recommended Posts

I know this is like shooting a fish in the Pacific Ocean from 100 yards away but ....

I have several scripts, and they don't do anything intense ( no arrays, no queries ... etc)

All they do is take some given information and perform some mathmatical calculations.

Now when you execute through a browser, sometimes PHP finishes in miliseconds, other times it takes almost 40-50 seconds (on any given execution it is processing the same data, the same way). There isn't any indentifiable pattern to when it executes quick or slow.

These scripts run on a Win XP box with Apache 2.0.55, PHP 5.1.2, MySQL 5.0.19

The Server has 2GB of Ram with a P4 3.8Ghz Processor

There is no user load - this is a dev. box.

In PHP.ini the garbage collection for session data is set as 1/100

I'm just looking for someone who can tell me some areas that I should "look at" to help explain this oddity.

I want to know whats happening before I goto a production box, and I see this as a BIG deal because when you multiply this oddity X 200+ users .... etc


TIA
Link to comment
Share on other sites

[!--quoteo(post=370039:date=Apr 30 2006, 01:01 AM:name=Hooker)--][div class=\'quotetop\']QUOTE(Hooker @ Apr 30 2006, 01:01 AM) [snapback]370039[/snapback][/div][div class=\'quotemain\'][!--quotec--]
hrm maybe you can show us the code so we can take a quick look through it?
[/quote]

Here is the script in question:
<?php

//GET STAMP

$savedstamp = trim($_POST['stamp']);

$seconds = $savedstamp%60;

$i = floor($savedstamp / 60);

?>

I honestly think this has something to do with php.in and/or httpd.conf. I probably have something set I shouldn't have or vicea versa.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.