Okay, this has me really freaked out… (But first some background!)
I do development on my MacBook and use MAMP, and I have been working on a decent sized website for over a year. I am currently in the final week of development, and the site looks and runs awesome, except for one strange thing… (But first, some more info!)
The way I wrote this website is that when there an error, the user is usually taken to an Error Page. (Probably “old-school” to a lot of you JavaScript freaks, but I like the approach myself.)
So, let’s say some hacker changed my $_POST array to some bogus value. Well, int he ELSE part of my If-Then-Else, I would simply redirect to my “errors.php” script, which would look through a CASE tree, and display the appropriate hard-coded error.
This has worked perfectly over the last year, and is usually lightning-quick!
Well, about 3 weeks ago, I broke down, and went back and replaced the mail( ) function with phpMailer because I have read it is more secure. So out of approximately 40 scripts, I had to add code for phpMailer in maybe 10. (It’s a little fuzzy now, but as I recall sometimes my e-mails were taking forever to go out.) But as of late, things seem to be okay.
And around the same time, I noticed that sometimes my Error Page was taking forever to load. (I mean like 3-5 minutes “forever”!!)
At first, I thought this was something that I screwed up with phpMailer, or maybe the fact that going from phpMailer to MAMP to e-mailing my Gmail account was somehow funky in “Dev”.
Sometimes it worked quickly, but some days it was mysteriously slow.
Well, after I updated all of these scripts, I noticed the same problem in place where phpMailer was NOT involved.
For example, my final script is an “Interest Survey” where a user goes in, checks/unchecks what they are interested in, and clicks save. This is a mundane, 500 line script. Well, when I added an new error-code as mentioned above, the Error Page didn’t load for a few minutes. (We are talking about PHP/MAMP having to process maybe 100-200 lines of code?!)
Obviously without seeing my entire code-base, this could be tricky for any of you to trouble-shoot.
(And since this is my client’s website, that ain’t gonna happen!!)
Still, I have to ask, [b]What in the hell is going on??"
And how in the hell do I figure out what is going on??[/b]
I pray to God this is just some crap related to MAMP or that when I don’t reboot for several days that FireFox throws memory-leak fits!!
But it could also be a sign of some really F***ED UP problem with my entire code-base!! (That seems highly unlikely, but you never know?!)
It would be really devastating to upload my client’s website to our live webserver, and User #1 comes along, creates an error, and the whole website PUKES!!!
Any ideas???