PacketFence - BTS - PacketFence
View Issue Details
0001251PacketFenceweb adminpublic2011-08-24 09:102011-09-21 22:16
psnizek 
obilodeau 
normaltweakalways
closedfixed 
2.2.1 
3.0.0 
3d07d816bc63c929e842d49bc304909661610f99
0001251: eliminate php_value register_long_arrays from httpd.conf
If you replace $HTTP_*_VARS against $_SERVER in the corresponding php files (see patches below), you will be able to eliminate register_long_arrays in httpd.conf.
$HTTP_*_VARS are deprecated as of PHP 4.1.
--- common.php.orig 2011-07-21 17:10:06.695112906 +0200
+++ common.php 2011-08-08 16:58:52.433995623 +0200
@@ -1255,7 +1255,7 @@ function PrintSubNav($menu){
     $formname = "form_$error_$line";

     print "<form name='$formname' action='http://www.packetfence.org/bug_report.php' [^] method='post'>";
- print " <input type='hidden' name='referrer' value='https://{$errcontext[HTTP_SERVER_VARS][HTTP_HOST]}{$errcontext[HTTP_SERVER_VARS][SCRIPT_NAME]}'>"; [^]
+ print " <input type='hidden' name='referrer' value='https://{$errcontext[$_SERVER][HTTP_HOST]}{$errcontext[$_SERVER][SCRIPT_NAME]}'>"; [^]
     print " <input type='hidden' name='context' value='".serialize($errcontext)."'>";
     print " <input type='hidden' name='error' value='{$error_types[$severity]}: $error in $file on line $line'>";
     print "</form>";


--- login.php.orig 2011-08-08 15:54:17.860369600 +0200
+++ login.php 2011-07-21 17:14:22.642212929 +0200
@@ -196,7 +196,7 @@
   return false;
 }

-$abs_url="https://$HTTP_SERVER_VARS[HTTP_HOST]"; [^]
+$abs_url="https://$_SERVER[HTTP_HOST]"; [^]

 if(!function_exists('session_start')){
   die("<div id='error'>Error: Your version of PHP does not have session support. Session support is needed for this application</div>");


--- check_login.php.orig 2011-07-21 17:17:57.713018815 +0200
+++ check_login.php 2011-07-21 17:18:11.445772014 +0200
@@ -28,7 +28,7 @@

   session_start();
   $timeout = 3600; // session timeout in seconds
- $abs_url="https://$HTTP_SERVER_VARS[HTTP_HOST]"; [^]
+ $abs_url="https://$_SERVER[HTTP_HOST]"; [^]

   require_once 'common/helpers.inc';
   require_once 'common/adminperm.inc';

No tags attached.
Issue History
2011-08-24 09:10psnizekNew Issue
2011-09-08 12:12obilodeauStatusnew => assigned
2011-09-08 12:12obilodeauAssigned To => obilodeau
2011-09-08 12:23obilodeauNote Added: 0002188
2011-09-08 12:36obilodeaumtn revision => 3d07d816bc63c929e842d49bc304909661610f99
2011-09-08 12:36obilodeauNote Added: 0002189
2011-09-08 12:36obilodeauStatusassigned => resolved
2011-09-08 12:36obilodeauFixed in Version => trunk
2011-09-08 12:36obilodeauResolutionopen => fixed
2011-09-21 22:07obilodeauFixed in Versiontrunk => 3.0.0
2011-09-21 22:15obilodeauNote Added: 0002243
2011-09-21 22:16obilodeauStatusresolved => closed

Notes
(0002188)
obilodeau   
2011-09-08 12:23   
Reading set_error_handler's documentation, I'm not sure that your common.php patch is good. I'm pretty sure that I need to access the errcontext array by using _SERVER and not $_SERVER. I'm not the best php programmer so I might be wrong but I think I'll go with _SERVER and not $_SERVER for now.
(0002189)
obilodeau   
2011-09-08 12:36   
Fix committed in trunk. Send me your fullname and work place (if you want) so I can put the appropriate credits in README and NEWS.

Thanks!
(0002243)
obilodeau   
2011-09-21 22:15   
fix released in 3.0