CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 ALL PHP DEVELOPERS MUST READ!!!!

Print topic Send  topic

Author Message
jjtoubia
Posted: 04/29/2002, 11:47 PM

This is a warning to all PHP developers. Generated code from CodeCharge will not work with the new PHP 4.2.0 build. I do not know if CodeCharge has addressed this problem with the new CodeCharge Studio, but everyone will experience this problem very soon as soon as all the hosting providors upgrade to the new build.

If you are having problems with your program where a user cannot login, or cookies do seem like they work anymore...this is why!

These are the old variable names that PHP used before 4.2.0 and that CodeCharge generates:

Example using a variable named $variable
Posted variables: $HTTP_POST_VARS
Get variables: $HTTP_GET_VARS
Cookies: $HTTP_COOKIE_VARS
Sessions: $HTTP_SESSION_VARS
Files: $HTTP_POST_FILES & others apply to this

These are the new variable names that must be used instead of the above from now on. CodeCharge does not generate these!

Example using a variable named $variable
Posted variables: $_POST['variable']
Get variables: $_GET["varaible']
Cookies: $_COOKIE['variable']
Sessions: $_SESSION['variable']
Files: $_FILE['variable'] & others apply to this

These are now know as 'superglobals', or automatic globals, variable. This simply means that it is available in all scopes throughout a script. You don't need to do a global $_POST; (for example) to access posted variable within functions or methods, as you do with $HTTP_POST_VARS.

Will post more as soon as I am informed on all the new changes. If you want you programs to continue to work...do not upgrade your PHP yet.

Bye!
jjtoubia
Posted: 04/30/2002, 12:15 AM

Well I think I may have spoken too soon. I have numerous scripts that I have distributed around and when a fellow PHP developer told me about the changes...I paniced. After posting these messages I was thinking about it and thought to myself that why would PHP do something so stupid. Well they are not stupid...only me. I went to php.net to research this alittle more for myself and found out that these variables are still available if set. THANK GOD! I wish I could delete this post but I dont think I can. If nothing else, atleast you all know the new changes...

Forgive me!

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.