We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


404 Error on PHP/MySQL Page

Medium Priority
Last Modified: 2012-05-11
Hi, all!

Have a rather complex PHP/MySQL page.  It uses a bit of JavaScript to display/hide fields according to user type, change values shown without re-submitting, format and validate input, etc.  It will submit fine, as long as I don't try to insert/update.  If that logic is called, I get a 404 "Not Found" error.  Never seen this before.  Either it won't submit at all (usually the "action" value in the form tag) or, if there is some kind of error, it displays the page with whatever error occurs.

The page flow is pretty standard.  If parameter indicates a new record, defaults for the field are set.  If not, I look for $_POST for the fields and use them.  If they are not there, I load from the database.

Following that logic, I test for insert/update being requested. (Was testing for the $_POST from the Save button, but when I started troubleshooting I switched that to a value from a field that I set with JavaScript.)

Don't think it's data access rights because other forms update OK and all use the same DB connection.  Might be memory limit or other setting of some kind on the server, but that's over my head.

Generally, has anyone seen this before?  It's new to me and I could use some help.  I can cut/paste some of the relevant code if you can point me to what may be relevant.


Watch Question

Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
one more point  , make sure in your form action you are submitting to the right script .
if you are submitting to the same script use its name and don't just leave it blank.

Let me be "honest" with you.  I'm a dumb #@!.  It was a 550 error, not a 404.  I guess when you look at something too long you just don't see it.

Anyway, research here at Experts Exchange for the correct (550) problem revealed that changing an IE setting to not "Show friendly HTTP error messages" allowed the echos I put in to debug to show on the screen.  (The form still didn't show.)  Then it was just a matter of tracking down where the error was occuring.

It was a mis-spelled function name for a call to the PHP include file that verified data just before the record was written.  Simple, stupid finger check.

Thanks for making me step back from it.  More importantly, thank you for responding so quickly.  Don't know what I'd do without the help you and other experts provide.

Made me go back and look at problem again.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.