Code works in Development but not Production

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

WebbieDave
Forum Contributor
Posts: 213
Joined: Sun Jul 15, 2007 7:07 am

Re: Code works in Development but not Production

Post by WebbieDave »

If it's still erroring at 60, you'll need to re-verify that you're editing the correct .ini file. As suggested above, do another phpinfo(). If the changes aren't being reflected, check for entries near the top of the phpinfo output labeled:

Configuration File (php.ini) Path

and/or

Loaded Configuration File

You may not have the second one, depending on your configuration.
James0816
Forum Newbie
Posts: 10
Joined: Thu Jun 19, 2008 9:10 am

Re: Code works in Development but not Production

Post by James0816 »

Ok...it still had the 60 in for the max_input. Changed it and reset the server

max_input_time = 360


It is uploading now but extrememly slow. For a 7.5mb file it took 3 minutes. The production machine is beefed up more so than the development one. Don't see how it can be running so much more slower on that box.
WebbieDave
Forum Contributor
Posts: 213
Joined: Sun Jul 15, 2007 7:07 am

Re: Code works in Development but not Production

Post by WebbieDave »

Try uploading and timing it outside of PHP to see if this is even a PHP problem still.
James0816
Forum Newbie
Posts: 10
Joined: Thu Jun 19, 2008 9:10 am

Re: Code works in Development but not Production

Post by James0816 »

Not sure what you are referring to by uploading outside of PHP but here's an interesting stat:

Upload the same file (7.5Mb) in both Development and Production instances.

Development - ~ 15 seconds
Production - ~ 3 minutes
WebbieDave
Forum Contributor
Posts: 213
Joined: Sun Jul 15, 2007 7:07 am

Re: Code works in Development but not Production

Post by WebbieDave »

James0816 wrote:Not sure what you are referring to by uploading outside of PHP
I just meant upload the same 7.5MB file from your box to the production by say, using, FTP and see how long it takes. Basically, test your connection speed to the box.
James0816 wrote:Development - ~ 15 seconds
Production - ~ 3 minutes
Well, you said your dev box is localhost so it should be flying!
nowaydown1
Forum Contributor
Posts: 169
Joined: Sun Apr 27, 2008 1:22 am

Re: Code works in Development but not Production

Post by nowaydown1 »

I am using my machine as my development machine.
It's going to fly locally. You aren't sending data across a network link. That said, if you aren't going out over the internet, and are staying within your local network, I would agree 3 minutes is excessive.

If it is over internet though, that sounds about right I guess unless you have a really beefy upstream. You said your file was 7.5MB. So 7500KB. Assuming you have an average broadband connection, your upstream is probably someplace around 500kbps up. So, 50KB a second. 7500KB / 50 KB = 150 / 60 = 2.5 minutes. Throw in a little packet loss and sure I can see 3 minutes.
James0816
Forum Newbie
Posts: 10
Joined: Thu Jun 19, 2008 9:10 am

Re: Code works in Development but not Production

Post by James0816 »

I understand the local part of it all...however....

when i use the Production machine (instead of my desktop)

I can upload the 7.5mb file to both Prod and Dev instances in just a matter of seconds.

Will have to conduct a bit more testing to try and figure out where the lag is coming from. I'm just not getting it at the moment.
Post Reply