PDA

View Full Version : Fucking PHP


Useless
2005-11-30, 09:30 AM
|waves|
Any guesses on why a php form using 'post' would not work? It has worked just dandy on 3-4 consecutive hosts, but doesn't do anything except reload the page on my newest one. No errors are printed, not even if the form is left blank.

rich06
2005-11-30, 10:39 AM
i'd guess that it's because on your new host register_globals is off. Does your code rely on register_globals being on?

run phpinfo() to see if it is set to off or on.

what does var_dump($_POST) show when you put it on the top of your script that processes the form data?

hth
rich

Useless
2005-11-30, 11:21 AM
Yup, globals are off. I've got a ticket into my host now to edit my php.ini. I shell'd in and tried to edit it myself, but it said I didn't have permission. Don't know why I have root access if I can't do anything...

var_dump($_POST) produces an error.

Thank you, fingers crossed.

cd34
2005-11-30, 11:33 AM
in your .htaccess, try

php_flag register_globals on

Useless
2005-11-30, 11:47 AM
in your .htaccess, try

php_flag register_globals on
You, sir, are far too good to me.

Thanks, Chris - it works like a charm.

rich06
2005-11-30, 01:51 PM
if your script ain't too complex then try and get it changed to to run in a globals off compliant fashion as that will run fine in both scenarios and will be future proof for when php drops support completely for register_globals....

just a thought :)

rich

Dr Bizzaro
2005-11-30, 04:04 PM
Did you try banging or kicking the side of your harddrive?

That use to work on an old TV of mine.

Chop Smith
2005-11-30, 04:27 PM
Damn, I came in here thinking I was going to read a racy story about a new lady with the initials PHP.

In additon to being a smart cocksucker, Sparky has to be a nice guy.

Agent
2005-11-30, 05:06 PM
Damn, I came in here thinking I was going to read a racy story about a new lady with the initials PHP. I thought it was going to be a post about kids using and getting high off PHP. All the kids are using it these days I hear. ;)