Server PHP Errors

Why would some people in certain parts of the country be getting a PHP error on a website and other people in different parts of the country not be getting the error?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent WSr. Network / Systems AdminCommented:
The error they are receiving would be a good thing to post.

Does the site use any geo based DNS?
rgranlundAuthor Commented:
Let me know if you get the error: fill out form and submit.  That is where folk get the error.
Kent WSr. Network / Systems AdminCommented:
I did get this error.  It really looks like you need to track down the cause of the "Undefined variable: DB".   Wether it's the direct or indirect cause, that's probably the key.  Not being able to see the actual code, I can only say what I would do.  Have you checked the line number and code around it to see if there was something amiss?
Looks like you have PHP running on a Windows system.  May be a permissions issue?  You can turn on debugging in PHP also, and look at your web logs, these are going to hold the biggest clues.
I'm also hitting through a proxy, so tried hitting it direct.  Got the same error.

{!-- ra:00000000378f30ae000000004b0ff026 --}
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: DB

Filename: libraries/Functions.php(688) : eval()'d code

Line Number: 69
Fatal error: Call to a member function query() on a non-object in C:\inetpub\StarrSpokeDev\system\expressionengine\libraries\Functions.php(688) : eval()'d code on line 69 

Open in new window

Chris StanyonWebDevCommented:
OK. This is what I can see and it seems odd, but it might help you to track down what's going on.

Yesterday when I tested this for you, I didn't get the errors. Just tested it again and didn't get any errors initially. Here's the weird part - If I enter an email address of, it works fine. Any other email address and it bombs out.

This tells me that somewhere in your code it's doing a database lookup regarding the email address. I'm guessing that is probably in your database (it's a common address people use when testing), and so no error is generated. Addresses not in your database are causing problems.

Have a look at your database and try the form using an address that already exists, and then try it with addresses that don't exist.

I know that won't solve your problem, but it may help you focus your attention in the right place.

Of course, I could be way of the mark, and something else is going on :)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rgranlundAuthor Commented:
That was it.   There was a spelling mistake in on of the if clauses.  Man, I feel dumb right now.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.