CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 Enumerate Parameters for SERVER, SESSION etc

Print topic Send  topic

Author Message
maxhugen

Posts: 272
Posted: 04/11/2008, 7:39 PM

Would you like a handy check of the parameters being stored in $_SESSION, $_COOKIE, $_SERVER etc? The code for this was provided by DonP in the PHP forum at http://forums.codecharge.com/posts.php?post_id=95811.

Add a Label to a page, change the Content property (under Data) from Text to HTML, then Add Code to the Server > Before Show event as follows:

$s = "<h4>Server Values</h4>";  
foreach($_SERVER as $key=>$value)  
$s = $s . "<strong>" . $key . "</strong> = " . $value . "<br>";  
  
$s = $s . "<p><h4>Session Values</h4>";  
foreach($_SESSION as $key=>$value)  
$s = $s . "<strong>" . $key . "</strong> = " . $value . "<br>";  
  
$s = $s . "<p><h4>Cookie Values</h4>";  
foreach($_COOKIE as $key=>$value)  
$s = $s . "<strong>" . $key . "</strong> = " . $value . "<br>";  
  
//$s = $s . "<p><h4>GD Support</h4>";  
//foreach(gd_info() as $key=>$value)  
//$s = $s . "<strong>" . $key . "</strong> = " . $value . "<br>";  
  
//$s = $s . "<p><h4>PHP Details</h4>";  
//foreach(phpinfo() as $key=>$value)  
//$s = $s . "<b>" . $key . "</b> = " . $value . "<br>";  
  
$Component->SetValue($s);

Re 'GD Support' and 'PHP Details', Don comments: "To answer a couple questions, the GD library lists info for the PHP GD library, which is used in creating and modifying images and supports truetype fonts. If it gives no values for you, then the GD library is not enabled or installed on your version of PHP. I use it all the time so this was a helpful area for me when getting it set up.

"Optionally the code will tell you anything you want to know about the PHP configuration but note that it could be a very long list! I leave it remarked out unless I really need it, which is rarely. I have not tested it with newer versions of PHP but it did work some years ago when I first wrote it."
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
View profile  Send private message

Add new topic Subscribe to topic   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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