PHP Help
- Started
- Last post
- 8 Responses
- estlin
PHP newbie here. My PHP script was working fine on my server, then transferred over to client and everything got jacked. Realized later it was due to register globals being off on their side and mine's being on. So I recoded making sure variables were available globally and some things worked fine and some didn't. I don't understand what else it could be. Does the serialize function get affected by this too? I have a file with data written to it that I serialize/unserialize, and i figure this is probably the last thing I haven't checked. I guess if worst comes to worse I could set local domain register globals to on with an .htaccess file.
Also, anyone know how to hide the querystring request when outputted from flash to php? So instead of havinf variables tacked on to the end of the URL like ?var1=hello"&var2="bye" it would be encrypted somehow?
Thanks.
- dc_again0
excuse me if this is a bit obvious, but most time it's the obvious things that people miss...
have you checked the file and directory permissions of the client's server, for the file that you are writting/reading the data too/from?
- mrming0
Also on the flash sie of things, if you send the variables to the script via POST instead of GET then they will not be appended to the URL. This doesn't mean that they're encrypted however so don't send anything confidential.
- Mimio0
Use POST in the flash movie and then just call the php page's URL.
- Mimio0
DO this:
loadVariables("yourFile.php", this, "POST");
- estlin0
you guys are saints.
The register globals thing was correct. Nothing wrong with my recoding there.
As for permissions, that was my first instinct and it seemed to check out. So I just double checked. Even though the folder was set to 777, the files being written to it by default was set to 644. After setting those to 777 too, it worked!
And the POST instead of GET worked exactly like I wanted. I knew POST would not append the variables, but for some reason I was thinking you couldn't substitute one for the other if a script called for it.
Thanks a million!
- heavyt0
i wonder why you are setting to 777?
i think that is a little dangerous perhaps. Just a thought, but you may want to at least drop to 755.
TR1
- estlin0
good call with the 755, script seems to work fine with that setting.
- heavyt0
yeah, no sense in giving the entire world write permissions on your stuff if you dont have to.
have fun,TR1