OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 27 Oct 2004 13:39:57 -0000 Issue 3077

php-general-digest-helplists.php.net
Date: Wed Oct 27 2004 - 08:39:57 CDT


php-general Digest 27 Oct 2004 13:39:57 -0000 Issue 3077

Topics (messages 200395 through 200437):

alias a function
        200395 by: Justin French
        200400 by: Curt Zirzow
        200426 by: Justin French

__PHP_Incomplete_Class Errors...
        200396 by: Stephen Craton
        200401 by: Curt Zirzow

Re: file upload
        200397 by: Zareef Ahmed
        200412 by: Akshay
        200433 by: raditha dissanayake

Re: Compiling PHP with extension; CLI works, Apache doesn't
        200398 by: Curt Zirzow

Re: Protecting Commercial PHP Scripts
        200399 by: Curt Zirzow

Re: Validation and session variables
        200402 by: Ligaya Turmelle
        200403 by: Stuart Felenstein
        200420 by: Ford, Mike
        200421 by: Stuart Felenstein
        200422 by: Marek Kilimajer
        200423 by: Stuart Felenstein
        200425 by: Ford, Mike
        200427 by: Stuart Felenstein
        200435 by: Chris Shiflett

Re: Register Globals
        200404 by: Curt Zirzow

Re: HTTP AUTH in PHP5
        200405 by: Christophe Chisogne

Re: Sessions problem bug
        200406 by: Jason Barnett
        200428 by: Reinhart Viane

Re: Classes and Interface tool
        200407 by: Jason Barnett

Re: Parsing
        200408 by: Jason Barnett

[SOLUTION] Re: [PHP] Convert an array in an object instance
        200409 by: Francisco M. Marzoa Alonso
        200418 by: Francisco M. Marzoa Alonso

Re: Serializing objects with protected members
        200410 by: Jason Barnett

Newbie: get no $QUERY_STRING
        200411 by: Horst Jäger
        200414 by: John Holmes

Re: relative paths with "require"
        200413 by: Jason Barnett

Re: Extracting relevant text from a text file
        200415 by: Jason Barnett

Newbie again: get no $QUERY_STRING
        200416 by: Horst Jäger
        200417 by: Horst Jäger
        200432 by: Ben Ramsey

Problem with Regular expression
        200419 by: kioto
        200424 by: Francisco M. Marzoa Alonso

PHP5 on IBM PowerPC; good combination?
        200429 by: Aaron Gould
        200431 by: Pierre Ancelot
        200434 by: Brent Clements
        200436 by: Pierre Ancelot
        200437 by: Aaron Gould

DOM XML/XSL questions
        200430 by: Dusty Bin

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


Hi,

What's the quickest way to alias a user function?

I have a function which uses english spelling (eg categorise instead of
categorize), and I want to alias the function with an "Americanized"
spelling.

I'd rather that the alias categorize() did not have to be altered in
any way to "keep up" with changes to the parent function categorise()
-- in particular, having the correct number of attributes and default
values, for example.

TIA
Justin French

attached mail follows:


* Thus wrote Justin French:
> Hi,
>
> What's the quickest way to alias a user function?
>
> I have a function which uses english spelling (eg categorise instead of
> categorize), and I want to alias the function with an "Americanized"
> spelling.
>
> I'd rather that the alias categorize() did not have to be altered in
> any way to "keep up" with changes to the parent function categorise()
> -- in particular, having the correct number of attributes and default
> values, for example.

Instead of aliasing, I would deprecate the function, so the old
function would be:

function categorise($arg1, $arg2) {
  trigger_error('Deprecated categorise used', E_USER_NOTICE);
  return categorize($arg1, $arg2);
}

As far eliminating the parameter changes, I can only think that
you'd need to use func_get_args() and call_user_func_array():

function categorise() {
  call_user_func_array('categorize', func_get_args());
}

The latter solution is quite a bit of overhead just to get an alias,
perhaps trigger_error with that method as you migrate old code.

Curt
--
Quoth the Raven, "Nevermore."

attached mail follows:


On 27/10/2004, at 1:46 PM, Curt Zirzow wrote:

> Instead of aliasing, I would deprecate the function, so the old
> function would be:

really hoping to alias rather than deprecate, but since it's not too
easy, I'll just ditch the idea I think :)

Thanks,
Justin

attached mail follows:


I've been working on a script for a while now and it works perfectly on my
local machine. I'm using a couple of classes, mainly my database and users
classes.

After logging in, I assign a session variable to the user's row in the
database: $_SESSION['user'] = $db->row;

This works fine locally, but on my hosted machine, it settings the variable
to this:

__PHP_Incomplete_Class Object
(
    [__PHP_Incomplete_Class_Name] => users
    [user] =>
    [loggedin] => 1
    [ip] => 12.222.81.78
    [db] => __PHP_Incomplete_Class Object
        (
            [__PHP_Incomplete_Class_Name] => thedatabase
            [host] => localhost
            [user] => melchior_clients
            [pass] => ****************
            [data] => melchior_clients
            [linkid] => 0
            [res] => 0
            [num] => 0
            [row] =>
            [logger] => __PHP_Incomplete_Class Object
                (
                    [__PHP_Incomplete_Class_Name] => logger
                    [logdir] => logs/
                    [fp] =>
                )

        )

    [logger] => __PHP_Incomplete_Class Object
        (
            [__PHP_Incomplete_Class_Name] => logger
            [logdir] => logs/
            [fp] =>
        )

)

For some reason, as far as I can tell, it's making every class variable to
__PHP_Incomplete_Class for some reason. The way I'm accessing the classes
via another class this something like this:

$db = new theDatabase;
$user = new Users;
$user->db = $db;

And then, within the class, I access it as such:

$this->db->query($sql);

This works perfectly on my local machine, but it gets all weirded once I
upload it. I have NO idea why or how to fix it. Does anyone have any ideas?

------------------------------------
Stephen Craton
webmastermelchior.us
IM: webmastermelchior.us
http://www.melchior.us
------------------------------------

attached mail follows:


* Thus wrote Stephen Craton:
> I've been working on a script for a while now and it works perfectly on my
> local machine. I'm using a couple of classes, mainly my database and users
> classes.
>
> After logging in, I assign a session variable to the user's row in the
> database: $_SESSION['user'] = $db->row;
>
> This works fine locally, but on my hosted machine, it settings the variable
> to this:
>
> __PHP_Incomplete_Class Object

This means you are not defining your class before starting your
session.

If you store classes in a session you must define you class before
the call to session_start(). If you have session.auto_start = 1 in
your configuration, you will have to disable that so you can define
your classes before starting the session.

Curt
--
Quoth the Raven, "Nevermore."

attached mail follows:


Hi,
Here is a small but working script which emulate post. You can post any
type of data as a form field.

http://www.zend.com/codex.php?id=77&single=1

But as many other users have suggested, I think SOAP is the best thing
to try.

Visit
http://sourceforge.net/projects/nusoap/

 
Zareef Ahmed

-----Original Message-----
From: Jesse Castro [mailto:jesse.castroniicommunications.com]
Sent: Tuesday, October 26, 2004 7:13 PM
To: Victor C.
Cc: php-generallists.php.net
Subject: RE: [PHP] file upload

> Ahh, if you *have* to push the data (which you obviously do) and the
> authentication site has no other authentication methods then you have
> to POST the file with PHP. It can be done, there are many classes for
> it, I can't recommend any specific class, but I'm sure someone else
> here could.
>
> I would surprise me if something in PEAR ( http://pear.php.net/ )
> couldn't do it. Just look for an HTTP class that can POST files.
>
> Chris
>
> Victor C. wrote:
>
>> See... basically, I have two sites. One site provides user
>> authentication and another one requests the authentication. The
>> requesting site need
to
>> send to the authentication site its request in an XML. The
>> authentication
>> site is suppose to get the XML file using $HTTP_POST_FILES. I'm
>> using PHP
>> to dynamically generate the request XML file and I need to submit it
>> to the
>> authenticating site; but I don't want to use file upload and browse
>> functionality, because the authentication process is suppose to be
>> transparent to the end users.
>>
>> Again, thanx for the help and any insights would be greatly
>> appreciated. :)
>>
>
Victor,

I have recently come across the same problem. Microsoft supplied a very
nice method to submit xml files in asp. Unfortunately, it is harder to
implement in PHP. The script below is what I eventually came up with,
and it works for me. Don't know if it applies to your situation
exactly, but hope it helps at any rate.

Cheers,
Jesse R. Castro

$xmlRequest = "<request>\n";
$xmlRequest.= "\t<contents>foo</contents>\n";
$xmlRequest.= "</request>";

$url = "http://www.wherever.com";
$port = "83";
$path = "/path/to/script.asp"

/*
* $errno and $errstr are blank, see the docs for fsockopen
*/

$sockXml = fsockopen($url, $port, $errno, $errstr, 30);

if (!$sockXml) {
   echo $errstr." (".$errno.")<br />\n";
} else {
/*
* http headers
*/
         $out = "POST ".$path." HTTP/1.1\n";
        $out .= "Host: www.wherever.com:83\n";
        $out .= "Content-Type: application/x-www-form-urlencoded\n";
        $out .= "Content-Length: ".strlen($xmlRequest)."\n";
        $out .= "Connection: Close\n";
        $out .= "\n".$xmlRequest;
        $out .= "\n" ;

/*
* write the http headers to the open socket
*/
   fwrite($sockXml, $out);

/*
* get the results back
*/
   $strReturned = "";
   while (!feof($sockXml)) {
                   $strReturned.= fgets($sockXml, 4096);
   }
   echo $strReturned."\n";

------------------------------------------------------------------------
--
Zareef Ahmed :: A PHP develoepr in Delhi ( India )
Homepage :: http://www.zasaifi.com

attached mail follows:


I've been trying to come up with an algorithm that will allow me to upload
all the files in a folder.

The scheme I have in mind is to use a feedback form that will let me pick
out a target folder on my local machine. Upon submitting the form, I'd
like the script to upload all the files in that folder into a
predetermined folder on the host machine. Its easy with a single file, but
I've run into a conundrum of sorts for a complete folder. Is there any way
to pass the source path as a parameter in PHP, and have PHP upload all the
files in that path?
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

attached mail follows:


Akshay wrote:

>
> I've been trying to come up with an algorithm that will allow me to
> upload all the files in a folder.
>
> The scheme I have in mind is to use a feedback form that will let me
> pick out a target folder on my local machine. Upon submitting the
> form, I'd like the script to upload all the files in that folder into
> a predetermined folder on the host machine. Its easy with a single
> file, but I've run into a conundrum of sorts for a complete folder.
> Is there any way to pass the source path as a parameter in PHP, and
> have PHP upload all the files in that path?

The answer is no you cannot because. PHP does not have access to the
remote machine, because PHP runs on the server. The only way to do this
is with an activex or with a java applet (SHAMLESS PLUG: such as rad
upload).

--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.

attached mail follows:


* Thus wrote Aaron Gould:
> I just compiled PHP with an extension for testing purposes
> (mnoGoSearch). After all was said and done, the CLI version sees the
> mnogosearch extension just fine ("php -m"), but the Apache module
> doesn't see it at all (nothing "mnogosearch" related at all in "PHPINFO()").

Looks good, few things I would check:
  1. Did you restart apache?
  2. did the libphp.so make it to the right apache directory
  3. the extension_dir set to the right place.

Curt
--
Quoth the Raven, "Nevermore."

attached mail follows:


* Thus wrote Nick Wilson:
> Hello all,
>
> I was wondering if anyone might have suggestions or useful links on
> protecting commercial php scripts.

One thing that is always overlooked besides trying to obscure the
code so only reverse engineering is possible, is to include a
license in the source and with the package you distribute.

It doesn't prevent the code from being stolen, but does officially
declare proper usage.

Curt
--
Quoth the Raven, "Nevermore."

attached mail follows:


Without seeing the code:
Try putting session_start() at the VERY beginning. Also try having the
action go to the page itself ($PHP_SELF or putting in the path). Is the
session variables being set using $SESSION['']?

Respectfully,
Ligaya Turmelle

Stuart Felenstein wrote:
> Having some odd behaviour.
> First , let me mention this is a multi page form using
> session variables. (This might be important)
>
> So I am doing a page by page validation, and have
> tried putting the code before session_start or after.
> Either way my session variables are getting lost.
>
> Now in order to do my validation on the same page, I
> have set form action to nothing action=""
> And upon sucess of happy validation added this code:
>
> if ($_SERVER["REQUEST_METHOD"] == "POST") {
> $url = "success.php";
> Header("Location: $url");
> }
> ?>
>
> The page progresses correctly but it seems the
> variables are gone.
> Sound like it makes sense ? Any suggestions or ideas.
>
> Thank you,
> Stuart
>

attached mail follows:


Yes the session variables are set with $SESSION[''}.
The way it works is the variable gets set on the
follwing pages:

So, example on page 1:
I have this user input field:
<td width="172"><input name="ListingName" type="text"
id="ListingName" maxlength="20" /></td>

On the following page (page 2):
$_SESSION['f1a'] = $_POST['ListingName'];

And all the pages follow the same method. Inputs on
page 2 are $_SESSION[''] = $_POST['']; on page 3.

I did try putting the session_start() at the top of
the page. Didn't seem to make any difference.

Just to show the validation code (and it's from a
class):

<?php
require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php");
?>
<?php
require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php");
?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
  $WAFV_Redirect = "";
  $_SESSION['WAVT_Page1'] = "";
  if ($WAFV_Redirect == "") {
    $WAFV_Redirect = $_SERVER["SCRIPT_NAME"];
  }
  $WAFV_Errors = "";
  $WAFV_Errors .=
WAValidateAN(((isset($_POST["ListingName"]))?$_POST["ListingName"]:"")
. "",true,true,true,true,"",true,1);

  if ($WAFV_Errors != "") {
    PostResult($WAFV_Redirect,$WAFV_Errors,"Page1");
  }
}
?>
if ($_SERVER["REQUEST_METHOD"] == "POST") {
 $url = "Page2.php";
 Header("Location: $url");
}
?>

So, for every page I add validation too, I can see at
the end from the printout, that the variables are
gone, missing .

Stuart

--- Ligaya Turmelle <ligmgpt.com> wrote:

> Without seeing the code:
> Try putting session_start() at the VERY beginning.
> Also try having the
> action go to the page itself ($PHP_SELF or putting
> in the path). Is the
> session variables being set using $SESSION['']?
>
> Respectfully,
> Ligaya Turmelle
>
>
> Stuart Felenstein wrote:
> > Having some odd behaviour.
> > First , let me mention this is a multi page form
> using
> > session variables. (This might be important)
> >
> > So I am doing a page by page validation, and have
> > tried putting the code before session_start or
> after.
> > Either way my session variables are getting lost.
> >
> > Now in order to do my validation on the same page,
> I
> > have set form action to nothing action=""
> > And upon sucess of happy validation added this
> code:
> >
> > if ($_SERVER["REQUEST_METHOD"] == "POST") {
> > $url = "success.php";
> > Header("Location: $url");
> > }
> > ?>
> >
> > The page progresses correctly but it seems the
> > variables are gone.
> > Sound like it makes sense ? Any suggestions or
> ideas.
> >
> > Thank you,
> > Stuart
> >
>
> > --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm

> -----Original Message-----
> From: Stuart Felenstein [mailto:stuart4myahoo.com]
> Sent: 27 October 2004 00:01
>
> Having some odd behaviour.
> First , let me mention this is a multi page form using
> session variables. (This might be important)
>
> So I am doing a page by page validation, and have
> tried putting the code before session_start or after.
> Either way my session variables are getting lost.
>
> Now in order to do my validation on the same page, I
> have set form action to nothing action=""
> And upon sucess of happy validation added this code:
>
> if ($_SERVER["REQUEST_METHOD"] == "POST") {
> $url = "success.php";
> Header("Location: $url");
> }
> ?>
>
> The page progresses correctly but it seems the
> variables are gone.
> Sound like it makes sense ? Any suggestions or ideas.

The only circumstance under which I can think this might happen is if the
session id is not being propagated by cookie -- either because they're
blocked in the browser, or because you have them switched off in php.ini.
Even if you have session.use_trans_sid enabled, PHP cannot rewrite URLs in
the header() call, so you have to include the session ID manually. You
should do this regardless of whether you expect cookies to be enabled, so
that it will work ok even in the unexpected situation of having cookies
turned off.

Fortunately, the standard PHP constant SID is provided for exactly this
purpose, so your header call above should be:

   header("Location: $url?".SID);

Finally, you should note that HTTP requires the Location: URL to be a full
absolute one (i.e. starting http://) -- whilst it's true that all current
mainstream browsers do the expected with a relative URL, it's better
defensive programming to use only absolute URLs (just in case someone
produces a browser that adheres to the standard!).

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services, JG125, James
Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS,
LS6 3QS, United Kingdom
Email: m.fordleedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

attached mail follows:


See inline:

--- "Ford, Mike" <M.Fordleedsmet.ac.uk> wrote:

> The only circumstance under which I can think this
> might happen is if the
> session id is not being propagated by cookie --
> either because they're
> blocked in the browser, or because you have them
> switched off in php.ini.

They are not switched off in php.ini. I do have them
"semi blocked" in the browser, i.e. set to "allow for
session"

> Even if you have session.use_trans_sid enabled,

It is enabled.

> PHP cannot rewrite URLs in the header() call, so you
> have to include the session ID manually.
> You should do this regardless of whether you expect
> cookies to be enabled, so that it will work ok even
> > in the unexpected situation of having cookies
> turned off.
>
> Fortunately, the standard PHP constant SID is
> provided for exactly this
> purpose, so your header call above should be:
>
> header("Location: $url?".SID);

This is all I need to include the SID ?

Thank you
Stuart

attached mail follows:


Stuart Felenstein wrote:
> Yes the session variables are set with $SESSION[''}.
> The way it works is the variable gets set on the
> follwing pages:
>
> So, example on page 1:
> I have this user input field:
> <td width="172"><input name="ListingName" type="text"
> id="ListingName" maxlength="20" /></td>
>
> On the following page (page 2):
> $_SESSION['f1a'] = $_POST['ListingName'];
>
> And all the pages follow the same method. Inputs on
> page 2 are $_SESSION[''] = $_POST['']; on page 3.
>
> I did try putting the session_start() at the top of
> the page. Didn't seem to make any difference.

You MUST have session_start() at the beginning of every page that uses
session, and if you allow session id to be included in urls you MUST
have session_start() in every page.

attached mail follows:


Yes I do have session_start on every page at the top.

Stuart
--- Marek Kilimajer <listskilimajer.net> wrote:

> Stuart Felenstein wrote:
> > Yes the session variables are set with
> $SESSION[''}.
> > The way it works is the variable gets set on the
> > follwing pages:
> >
> > So, example on page 1:
> > I have this user input field:
> > <td width="172"><input name="ListingName"
> type="text"
> > id="ListingName" maxlength="20" /></td>
> >
> > On the following page (page 2):
> > $_SESSION['f1a'] = $_POST['ListingName'];
> >
> > And all the pages follow the same method. Inputs
> on
> > page 2 are $_SESSION[''] = $_POST['']; on page 3.
> >
> > I did try putting the session_start() at the top
> of
> > the page. Didn't seem to make any difference.
>
> You MUST have session_start() at the beginning of
> every page that uses
> session, and if you allow session id to be included
> in urls you MUST
> have session_start() in every page.
>

attached mail follows:


To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm

> -----Original Message-----
> From: Stuart Felenstein [mailto:stuart4myahoo.com]
> Sent: 27 October 2004 12:18
>
> --- "Ford, Mike" <M.Fordleedsmet.ac.uk> wrote:

> > header("Location: $url?".SID);
>
> This is all I need to include the SID ?

Yup. If PHP thinks cookies are enabled, SID will actually evaluate to a
blank string; otherwise it will contain the "sessionname=sessionid" pair.

Oh, and it can't hurt to do a session_write_close() just before the
redirect.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services, JG125, James
Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS,
LS6 3QS, United Kingdom
Email: m.fordleedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

attached mail follows:


Okay, I altered the code. Same thing, session
variables gone.
I then deleted the "session only" cookie. Also took
the rule out in the browser , so browser is accepting
all cookies from site.
Still no change.

Not to be redundant but here is the code again:(I
xxx'ed out some fields in the restrict access line so
they are not public)

<?php
//Connection statement
require_once('Connections/MYSQLWH.php');

//Aditional Functions
require_once('includes/functions.inc.php');

//load the tNG classes
require_once('tNG/KT_tNG.inc.php');

//Start the Session - begin Block
session_start();

restrictAccessToPage($MYSQLWH,'xxxxx','AccessDenied.php','xxxxx','SignUpID','Username','password','level',false,array("xxxxx"));
?>
<?php
require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php");
?>
<?php
require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php");
?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
  $WAFV_Redirect = "";
  $_SESSION['WAVT_TestMulti2'] = "";
  if ($WAFV_Redirect == "") {
    $WAFV_Redirect = $_SERVER["SCRIPT_NAME"];
  }
  $WAFV_Errors = "";
  $WAFV_Errors .=
WAValidateRQ(((isset($_POST["LurkerEdu"]))?$_POST["LurkerEdu"]:"")
. "",false,1);
  $WAFV_Errors .=
WAValidateRQ(((isset($_POST["LurkerAuth"]))?$_POST["LurkerAuth"]:"")
. "",false,2);
  $WAFV_Errors .=
WAValidateRQ(((isset($_POST["LurkerExperience"]))?$_POST["LurkerExperience"]:"")
. "",false,3);
  $WAFV_Errors .=
WAValidateRQ(((isset($_POST["LurkerLevel"]))?$_POST["LurkerLevel"]:"")
. "",false,4);

  if ($WAFV_Errors != "") {
   
PostResult($WAFV_Redirect,$WAFV_Errors,"TestMulti2");
  }
}
?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
 $url = "TestMulti3.php";
 Header("Location: $url?".SID);
}
?>

Stuart

attached mail follows:


--- Stuart Felenstein <stuart4myahoo.com> wrote:
> Having some odd behaviour.
> First , let me mention this is a multi page form using
> session variables. (This might be important)
>
> So I am doing a page by page validation, and have
> tried putting the code before session_start or after.
> Either way my session variables are getting lost.
>
> Now in order to do my validation on the same page, I
> have set form action to nothing action=""
> And upon sucess of happy validation added this code:
>
> if ($_SERVER["REQUEST_METHOD"] == "POST") {
> $url = "success.php";
> Header("Location: $url");
> }
> ?>
>
> The page progresses correctly but it seems the
> variables are gone.

This is most likely due to your malformed Location header. It requires an
absolute URL, and some browsers (notably several versions of IE, but there
may be others) do not send the proper Cookie header when requesting the
new URL if you use a relative one.

So, the first thing to try is using a proper Location header:

header('Location: http://example.org/success.php');

Hope that helps.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly HTTP Developer's Handbook - Sams
Coming December 2004 http://httphandbook.org/

attached mail follows:


* Thus wrote Matthew Sims:
>
> I just signed up with a new hosting site. So first thing I did was check
> what phpinfo() had to say.
>
> I see that register_globals is turned on. Now I always use the $_GET and
> $_POST vars but will this still affect me?

As long as you dont use third party software you will be perfectly
fine. As Mr. Holmes pointed out, its all depends on how the code
was written, having register gobals off makes it more obvious of the
insesurity:

globals == on:

/script.php?loggedin=1
<?php

/* a major mistake when one uses
 * session_register('loggedin');
 * which forces any variable that is defined in
 * global scope aka, _GET, _POST, SESSION...
 */
if ($loggedin) {
  echo "Display confidential information";
}
?>

globals == off; secured
<?php
/* know exactly where the loggedin variable comes from */
$loggedin = $_SESSION['loggedin'];
if ($loggedin) {
  echo "Display confidential information";
}

The major differnce between the two is that in the first example
the variable is never officially defined within the php code, and
where it actually is being set is rather undpredictable.

With the latter example, you are ensuring that the variable
$loggedin is from the session variable. But then now the quesion
arises, was that session variable set properly...

So in summary, register_globals=off ensures the script how the
variables are being accessed, but it doesn't mean they were set
properly in the first place.

HTH,

Curt
--
Quoth the Raven, "Nevermore."

attached mail follows:


Nunners wrote:
> I'm having some problems with using HTTP Auth in PHP5

IIRC, php 5.0 had a bug related to HTTP auth, corrected in php 5.0.1: [1]

"Fixed bug #29132 [http://bugs.php.net/29132]
  ($_SERVER["PHP_AUTH_USER"] isn't defined). (Stefan)"
Note, I cant access bugs.php.net right now.

If you use PHP 5, upgrade to PHP 5.0.2 (released 23-Sep-2004),
which correct a (security) pblm related to GPC processing.

Christophe

[1] Changelog for 5.0.1
http://www.php.net/ChangeLog-5.php#5.0.1

attached mail follows:


Are you using cookie-based sessions? Thus sayeth the manual:

Note: When using session cookies, specifying an id for session_id() will always
send a new cookie when session_start() is called, regardless if the current
session id is identical to the one being set.

Thanks google.

Reinhart Viane wrote:
> Some days ago I asked some questions concerning php and sessions
>
> Apparently it seems to be a bug:
> 'When you use a session name that has only numbers, each call to
> session_start seems to regenerate a new session id, so the session does
> not persist.'
>
> http://bugs.php.net/search.php?search_for=session&boolean=0&limit=10&ord
> er_by=&direction=ASC&cmd=display&status=Open&bug_type%5B%5D=Session+rela
> ted&php_os=&phpver=&assign=&author_email=&bug_age=0
>
> And there you pick bug with ID 27688
>
> Just to let everyone know.
> Greetz,
>
> Reinhart Viane
>
>
>
> Reinhart Viane
> rvdomos.be
> Domos || D-Studio
> Graaf Van Egmontstraat 15/3 -- B 2800 Mechelen -- tel +32 15 44 89 01 --
> fax +32 15 43 25 26
>
> STRICTLY PERSONAL AND CONFIDENTIAL
> This message may contain confidential and proprietary material for the
> sole use of the intended
> recipient. Any review or distribution by others is strictly prohibited.
> If you are not the intended
> recipient please contact the sender and delete all copies.

attached mail follows:


On the server i use:

Session.auto_start is off
Session.use_cookie is on
Session.use_trans_sid is 1

I do not set the session id myself
All pages that requite the sessions have session_start() at the very
first line

-----Original Message-----
From: Jason Barnett [mailto:jasbarneindiana.edu]
Sent: woensdag 27 oktober 2004 11:41
To: php-generallists.php.net
Subject: [PHP] Re: Sessions problem bug

Are you using cookie-based sessions? Thus sayeth the manual:

Note: When using session cookies, specifying an id for session_id()
will always
send a new cookie when session_start() is called, regardless if the
current
session id is identical to the one being set.

Thanks google.

Reinhart Viane wrote:
> Some days ago I asked some questions concerning php and sessions
>
> Apparently it seems to be a bug:
> 'When you use a session name that has only numbers, each call to
> session_start seems to regenerate a new session id, so the session
> does not persist.'
>
> http://bugs.php.net/search.php?search_for=session&boolean=0&limit=10&o
> rd
>
er_by=&direction=ASC&cmd=display&status=Open&bug_type%5B%5D=Session+rela
> ted&php_os=&phpver=&assign=&author_email=&bug_age=0
>
> And there you pick bug with ID 27688
>
> Just to let everyone know.
> Greetz,
>
> Reinhart Viane
>
>
>
> Reinhart Viane
> rvdomos.be
> Domos || D-Studio
> Graaf Van Egmontstraat 15/3 -- B 2800 Mechelen -- tel +32 15 44 89 01
--
> fax +32 15 43 25 26
>
> STRICTLY PERSONAL AND CONFIDENTIAL
> This message may contain confidential and proprietary material for the
> sole use of the intended
> recipient. Any review or distribution by others is strictly
prohibited.
> If you are not the intended
> recipient please contact the sender and delete all copies.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


Jonel Rienton wrote:

> hi again guys, is there a tool that can allow you view the available
> interfaces of a class, like an object/class browser that can help you view
> the signatures of those interfaces?
>
> thanks and regards,
> Jonel

You should be able to use the Reflection API to find out what you want to know
about Interfaces. Specifically, you can use

ReflectionClass::export('nameOfYourInterface');

attached mail follows:


Jerry Swanson wrote:

> I have huge html file. I want to parse the data and get everything between
> <b class="class1"> and <!-- Comments -->
>
> What function is good for this purpose?
>
> TH

preg_match() is a good choice.

attached mail follows:


Ok, I've write a function that emulates the Perl's bless one. It works
pretty well.

The idea comes to me when Rob suggest to parse the serialized data. I
think this is better -or at least faster- than parsing all serialized
data to modify object values: Just convert the object to an array,
modify whatever values you want -no matter about member visibility-, and
then convert the array again in an object.

Note that you should NEVER modify private and protected members outside
its visibility environment... well, never UNLESS you're writting your
own serialization routines indeed (that's exactly because I need to do
it ;-) )

<?

function bless ( &$Instance, $Class ) {
    $serdata = serialize ( $Instance );

    /* For an array serialized data seems to meant:
         array_tag:array_count:{array_elems}

        array_tag is always 'a'
        array_count is the number of elements in the array
        array_elems are the elemens in the array

      For an object seems to meant:

          
object_tag:object_class_name_len:"object_class_name":object_count:{object_members}

        object_tag is always 'O'
        object_class_name_len is the length in chars of
object_class_name string
        object_class_name is a string with the name of the class
        object_count is the number of object members
        object_members is the object_members itself (exactly equal to
array_elems)
    */

    list ($array_params, $array_elems) = explode ('{', $serdata, 2);
    list ($array_tag, $array_count) = explode (':', $array_params, 3 );
    $serdata = "O:".strlen
($Class).":\"$Class\":$array_count:{".$array_elems;

    $Instance = unserialize ( $serdata );
    return $Instance;
}

class TestClass {
    private $One=1;
    protected $Two=2;
    public $Three=3;

    public function sum() {
        return $this->One+$this->Two+$this->Three;
    }
}

$Obj = new TestClass ();
$Clone = (array) $Obj;

echo "As an array:<br>";
print_r ($Clone);

bless ( $Clone, TestClass );

echo "<br><br>After blessing as a TestClass instance:<br>";
print_r ($Clone);

echo "<br><br>Calling sum method: ";
echo $Clone->sum();

echo "<br>The array was blessed! miracle!!! ;-)<br>";

?>

attached mail follows:


Erm... I've seen there're some aspects to perform... it fails because
the name of the members is changed during conversion to the array. It
puts the class name using '\0' (0 is a zero, not a caps 'o') character
as separator before member name in private and an '*' in protected.

It's not an unaffordable issue, because you still can modify array
values having this in account. For example, if you want to modify the
$One private member in the array, you cannot do:

$Clone['One']=5;

you should do

$Clone["\0TestClass\0One"]=5;

instead.

Anyway I think it should be easily fixed (when I've time to do it, now I
must work in another thing :-| )

Francisco M. Marzoa Alonso wrote:

> Ok, I've write a function that emulates the Perl's bless one. It works
> pretty well.
>
> The idea comes to me when Rob suggest to parse the serialized data. I
> think this is better -or at least faster- than parsing all serialized
> data to modify object values: Just convert the object to an array,
> modify whatever values you want -no matter about member visibility-,
> and then convert the array again in an object.
>
> Note that you should NEVER modify private and protected members
> outside its visibility environment... well, never UNLESS you're
> writting your own serialization routines indeed (that's exactly
> because I need to do it ;-) )
>
> <?
>
> function bless ( &$Instance, $Class ) {
> $serdata = serialize ( $Instance );
>
> /* For an array serialized data seems to meant:
> array_tag:array_count:{array_elems}
>
> array_tag is always 'a'
> array_count is the number of elements in the array
> array_elems are the elemens in the array
>
> For an object seems to meant:
>
>
> object_tag:object_class_name_len:"object_class_name":object_count:{object_members}
>
>
> object_tag is always 'O'
> object_class_name_len is the length in chars of
> object_class_name string
> object_class_name is a string with the name of the class
> object_count is the number of object members
> object_members is the object_members itself (exactly equal to
> array_elems)
> */
>
> list ($array_params, $array_elems) = explode ('{', $serdata, 2);
> list ($array_tag, $array_count) = explode (':', $array_params, 3 );
> $serdata = "O:".strlen
> ($Class).":\"$Class\":$array_count:{".$array_elems;
>
> $Instance = unserialize ( $serdata );
> return $Instance;
> }
>
>
> class TestClass {
> private $One=1;
> protected $Two=2;
> public $Three=3;
>
> public function sum() {
> return $this->One+$this->Two+$this->Three;
> }
> }
>
>
> $Obj = new TestClass ();
> $Clone = (array) $Obj;
>
> echo "As an array:<br>";
> print_r ($Clone);
>
> bless ( $Clone, TestClass );
>
> echo "<br><br>After blessing as a TestClass instance:<br>";
> print_r ($Clone);
>
> echo "<br><br>Calling sum method: ";
> echo $Clone->sum();
>
> echo "<br>The array was blessed! miracle!!! ;-)<br>";
>
> ?>
>

attached mail follows:


Francisco M. Marzoa Alonso wrote:

> Hi,
>
> I'm trying to wrote my own serialization routines and I've found a
> previsible problem: protected members are not visible to my
> serialization routine. This is ok and it should be as is, but I've seen
> that PHP's serialize function have access to that members anyway, so the
> question is: Is there any kind of hack that I can use to access those
> variables from my own serialization routine?
>
> Thx. a lot in advance,

An easy hack to get private / protected members:

class read_only_hack {

   // overload the get "magic" function
   function __get($var) {
     return $this->$var;
   }
}

Another way that should work (untested):

class serialize_me {
   function __sleep() {
     $copy = clone($this);
     // inside your class, so you can access private and push onto array
     $copy->_private_vars = array();
     $copy->_protected_vars = array();
     return $copy;
   }

   // object being unserialized, so now you assign the properties
   function __wakeup() {
     foreach ($this->_protected_vars as $key=>$val) {
       $this->$key = $val;
     }
     foreach ($this->_private_vars as $key=>$val) {
       $this->$key = $val;
     }
     unset ($this->_private_vars, $this->_protected_vars);
   }

}

attached mail follows:


Hi,

I'm afraid this might be a stupid question but this is my first PHP-day.

I get no $QUERY_STRING (and no GET- or POST-Params).

I'm using PHP 4.3.3 on a SUSE LINUX 9.0 Machine. When I view the following
page:

<html><head></head><body>
<?php
echo gettype($QUERY_STRING);
  ?>
</body></html>

I get:

NULL

I copy my phpinfo below in case someone wants to have a look at it.

Thanks

Horst

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

PHP Version 4.3.3

System Linux wittgenstein 2.4.21-99-smp4G #1 SMP Wed Sep 24 14:13:20 UTC
2003 i686
Build Date Sep 24 2003 00:27:33
Configure Command './configure' '--prefix=/usr/share'
'--datadir=/usr/share/php' '--bindir=/usr/bin' '--libdir=/usr/share'
'--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib'
'--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin'
'--disable-debug' '--enable-bcmath' '--enable-calendar' '--enable-ctype'
'--enable-dbase' '--enable-discard-path' '--enable-exif' '--enable-filepro'
'--enable-force-cgi-redirect' '--enable-ftp' '--enable-gd-imgstrttf'
'--enable-gd-native-ttf' '--enable-inline-optimization'
'--enable-magic-quotes' '--enable-mbstr-enc-trans' '--enable-mbstring'
'--enable-mbregex' '--enable-memory-limit' '--enable-safe-mode'
'--enable-shmop' '--enable-sigchild' '--enable-sysvsem' '--enable-sysvshm'
'--enable-track-vars' '--enable-trans-sid' '--enable-versioning'
'--enable-wddx' '--enable-yp' '--with-bz2'
'--with-dom=/usr/include/libxml2' '--with-ftp' '--with-gdbm'
'--with-gettext' '--with-gmp' '--with-imap=yes' '--with-iodbc'
'--with-jpeg-dir=/usr' '--with-ldap=yes' '--with-mcal=/usr' '--with-mcrypt'
'--with-mhash' '--with-mysql=/usr' '--with-ndbm' '--with-pgsql=/usr'
'--with-png-dir=/usr' '--with-readline' '--with-snmp' '--with-t1lib'
'--with-tiff-dir=/usr' '--with-ttf' '--with-freetype-dir=yes' '--with-xml'
'--with-xpm-dir=/usr/X11R6' '--with-zlib=yes' '--with-qtdom=/usr/lib/qt3'
'--with-gd' '--with-openssl' '--with-curl'
'--with-swf=/usr/src/packages/BUILD/swf/dist/' '--with-imap-ssl'
'--enable-xslt' '--with-xslt-sablot' '--with-iconv' '--with-mm'
'--with-apxs=/usr/sbin/apxs' 'i586-suse-linux'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, https, ftps, compress.bzip2,
compress.zlib

  This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

--------------------------------------------------------------------------------

PHP Credits

--------------------------------------------------------------------------------

Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 2039 2039
expose_php On On
extension_dir /usr/share/extensions/no-debug-non-zts-20020429
/usr/share/extensions/no-debug-non-zts-20020429
file_uploads On On
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/share/php .:/usr/share/php
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 30 30
max_input_time 60 60
memory_limit 8M 8M
open_basedir no value no value
output_buffering no value no value
output_handler no value no value
post_max_size 8M 8M
precision 12 12
register_argc_argv On On
register_globals Off Off
report_memleaks On On
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from melocalhost.com melocalhost.com
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On

apache
APACHE_INCLUDE no value
APACHE_TARGET no value
Apache Version Apache/1.3.28
Apache Release 10328100
Apache API Version 19990320
Hostname:Port wittgenstein.local:80
User/Group wwwrun(30)/8
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 15
Server Root /srv/www
Loaded Modules mod_userdir, mod_php4, mod_setenvif, mod_so, mod_usertrack,
mod_headers, mod_expires, mod_cern_meta, mod_proxy, mod_digest,
mod_auth_db, mod_auth_dbm, mod_auth_anon, mod_auth, mod_access,
mod_rewrite, mod_alias, mod_speling, mod_actions, mod_imap, mod_asis,
mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status,
mod_negotiation, mod_mime, mod_mime_magic, mod_log_referer, mod_log_agent,
mod_log_config, mod_define, mod_env, mod_vhost_alias, mod_mmap_static,
http_core

Directive Local Value Master Value
child_terminate 0 0
engine 1 1
last_modified 0 0
xbithack 0 0

Apache Environment
Variable Value
DOCUMENT_ROOT /srv/www/htdocs
HTTP_ACCEPT application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/x-shockwave-flash, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE de
HTTP_CONNECTION Keep-Alive
HTTP_HOST 194.77.118.94
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
PATH
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin

REMOTE_ADDR 194.77.118.111
REMOTE_PORT 1486
SCRIPT_FILENAME /srv/www/htdocs/localhorst/experiment/phpinfo.php
SERVER_ADDR 194.77.118.94
SERVER_ADMIN webmasterwittgenstein.local
SERVER_NAME wittgenstein.local
SERVER_PORT 80
SERVER_SIGNATURE <ADDRESS>Apache/1.3.28 Server at wittgenstein.local Port
80</ADDRESS>
SERVER_SOFTWARE Apache/1.3.28 (Linux/SuSE) PHP/4.3.3
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /localhorst/experiment/phpinfo.php
SCRIPT_NAME /localhorst/experiment/phpinfo.php

HTTP Headers Information
HTTP Request Headers
HTTP Request GET /localhorst/experiment/phpinfo.php HTTP/1.1
Accept application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/x-shockwave-flash, */*
Accept-Encoding gzip, deflate
Accept-Language de
Connection Keep-Alive
Host 194.77.118.94
User-Agent Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
HTTP Response Headers
X-Powered-By PHP/4.3.3
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html

bcmath
BCMath support enabled

bz2
BZip2 Support Enabled
BZip2 Version 1.0.2, 30-Dec-2001

calendar
Calendar support enabled

ctype
ctype functions enabled

curl
CURL support enabled
CURL Information libcurl/7.10.5 OpenSSL/0.9.7b ipv6 zlib/1.1.4

dba
DBA support enabled
Supported handlers gdbm ndbm cdb cdb_make inifile flatfile

domxml
DOM/XML enabled
DOM/XML API Version 20020815
libxml Version 20510
HTML Support enabled
XPath Support enabled
XPointer Support enabled

exif
EXIF Support enabled
EXIF Version 1.4 $Id: exif.c,v 1.118.2.23 2003/06/25 13:21:54 edink Exp $
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF

ftp
FTP support enabled

gd
GD Support enabled
GD Version bundled (2.0.15 compatible)
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

gettext
GetText Support enabled

gmp
gmp support enabled

iconv
iconv support enabled
iconv implementation glibc
iconv library version 2.3.2

Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1

imap
IMAP c-Client Version 2001
SSL Support enabled

ldap
LDAP Support enabled
RCS Version $Id: ldap.c,v 1.130.2.4 2003/04/30 21:54:02 iliaa Exp $
Total Links 0/unlimited
API Version 2004
Vendor Name OpenLDAP
Vendor Version 20122

mbstring
Multibyte Support enabled
Japanese support enabled
Multibyte (japanese) regex support enabled

mbstring extension makes use of "streamable kanji code filter and
converter", which is distributed under the GNU Lesser General Public
License version 2.1.

Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.internal_encoding UTF-8 UTF-8
mbstring.language neutral neutral
mbstring.substitute_character no value no value

mcal
MCAL Support enabled
MCAL Version 0.6 - 20000121

mcrypt
mcrypt support enabled
version >= 2.4.x
Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256
loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent
xtea blowfish enigma rc2 tripledes
Supported modes cbc cfb ctr ecb ncfb nofb ofb stream

Directive Local Value Master Value
mcrypt.algorithms_dir no value no value
mcrypt.modes_dir no value no value

mhash
MHASH support Enabled
MHASH API Version 20020524

mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 4.0.15
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off

odbc
ODBC Support enabled
Active Persistent Links 0
Active Links 0
ODBC library iodbc
ODBC_INCLUDE -I/usr/local/include
ODBC_LFLAGS -L/usr/local/lib
ODBC_LIBS -liodbc

Directive Local Value Master Value
odbc.allow_persistent On On
odbc.check_persistent On On
odbc.default_db no value no value
odbc.default_pw no value no value
odbc.default_user no value no value
odbc.defaultbinmode return as is return as is
odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes
odbc.max_links Unlimited Unlimited
odbc.max_persistent Unlimited Unlimited

openssl
OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.7b 10 Apr 2003

overload
User-Space Object Overloading Support enabled

pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 4.3 21-May-2003

pgsql
PostgreSQL Support enabled
PostgreSQL(libpq) Version 7.3.4
Multibyte character support enabled
SSL support enabled
Active Persistent Links 0
Active Links 0

Directive Local Value Master Value
pgsql.allow_persistent On On
pgsql.auto_reset_persistent Off Off
pgsql.ignore_notice Off Off
pgsql.log_notice Off Off
pgsql.max_links Unlimited Unlimited
pgsql.max_persistent Unlimited Unlimited

posix
Revision $Revision: 1.51.2.2 $

qtdom
qtdom support enabled

session
Session Support enabled
Registered save handlers files user mm

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off

shmop
shmop support enabled

snmp
UCD-SNMP Support enabled
UCD-SNMP Version 4.2.6

standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset=
a=href,area=href,frame=src,input=src,form=,fieldset=
user_agent no value no value

swf
swf support enabled

tokenizer
Tokenizer Support enabled

wddx
WDDX Support enabled
WDDX Session Serializer enabled

xml
XML Support active
XML Namespace Support active
EXPAT Version 1.95.6

xslt
XSLT support enabled
Backend Sablotron
Sablotron Version 0.98
Sablotron Information Cflags: -O2 -march=i586 -mcpu=i686
-fmessage-length=0 Libs: -L/usr/lib -lexpat Prefix: /usr

yp
YP Support enabled

zlib
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

Additional Modules
Module Name
dbase
filepro
sysvsem
sysvshm

Environment
Variable Value
LD_PRELOAD /usr/lib/GL/libGL.so.1
LESSKEY /etc/lesskey.bin
MANPATH /usr/share/man:/usr/local/man:/usr/X11R6/man:/opt/gnome/man
INFODIR /usr/local/info:/usr/share/info:/usr/info
NNTPSERVER news
KDE_MULTIHEAD false
HOSTNAME wittgenstein
XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB
GPG_AGENT_INFO /tmp/gpg-5u04vo/S.gpg-agent:2073:1
SHELL /bin/bash
TERM xterm
HOST wittgenstein
STYLE keramik
XDM_MANAGED /var/run/xdmctl/xdmctl-:0,maysd,mayfn,sched,rsvd
HISTSIZE 1000
PROFILEREAD true
GTK2_RC_FILES
/etc/opt/gnome/gtk-2.0/gtkrc:/opt/gnome/share/themes/Geramik/gtk-2.0/gtkrc:/root/.gtkrc-2.0-keramik:/root/.kde/share/config/gtkrc

GTK_RC_FILES
/etc/opt/gnome/gtk/gtkrc:/opt/gnome/share/themes/Geramik/gtk/gtkrc:/root/.gtkrc-keramik:/root/.kde/share/config/gtkrc

GNOME_PATH :/opt/gnome:/usr
KDEHOME /root/.kde
XSESSION_IS_UP yes
KDE_FULL_SESSION true
USER root
JRE_HOME /usr/lib/java/jre
LD_LIBRARY_PATH :/lib
LS_COLORS
no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31:ex=00;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:

OPENWINHOME /usr/openwin
XNLSPATH /usr/X11R6/lib/X11/nls
HOSTTYPE i386
KDEROOTHOME /root/.kde
SESSION_MANAGER local/wittgenstein:/tmp/.ICE-unix/2119
COLUMNS 80
PAGER less
LD_HWCAP_MASK 0x20000000
MINICOM -c on
KONSOLE_DCOP DCOPRef(konsole-2170,konsole)
PATH
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin

GNOMEDIR /opt/gnome
CPU i686
JAVA_BINDIR /usr/lib/java/jre/bin
PWD /srv/www/htdocs/localhorst/experiment
INPUTRC /etc/inputrc
KONSOLE_DCOP_SESSION DCOPRef(konsole-2170,session-1)
JAVA_HOME /usr/lib/java/jre
XMODIFIERS im=local
LINES 24
DBROOT /dev/null
TEXINPUTS
::/root/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/root/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX

HOME /root
SHLVL 3
OSTYPE linux
LESS_ADVANCED_PREPROCESSOR no
XCURSOR_THEME blueprint-cursor-theme
no_proxy localhost
LS_OPTIONS -a -N --color=tty -T 0
WINDOWMANAGER /usr/X11R6/bin/kde
LOGNAME root
MACHTYPE i686-suse-linux
LESS -M -I
CVS_RSH ssh
LC_CTYPE de_DEeuro
LESSOPEN lessopen.sh %s
PKG_CONFIG_PATH /opt/gnome/lib/pkgconfig
USE_FAM no value
INFOPATH /usr/local/info:/usr/share/info:/usr/info
ACLOCAL_PATH /opt/gnome/share/aclocal
DISPLAY :0.0
ORACLE_HOME no value
LESSCLOSE lessclose.sh %s %s
G_BROKEN_FILENAMES 1
COLORTERM no value
JAVA_ROOT /usr/lib/java
_ /sbin/startproc
PREVLEVEL N
RUNLEVEL 5
DAEMON /usr/sbin/httpd
SWFFONTPATH /usr/share/php/swffonts

PHP Variables
Variable Value
_SERVER["DOCUMENT_ROOT"] /srv/www/htdocs
_SERVER["HTTP_ACCEPT"] application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/x-shockwave-flash, */*
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
_SERVER["HTTP_ACCEPT_LANGUAGE"] de
_SERVER["HTTP_CONNECTION"] Keep-Alive
_SERVER["HTTP_HOST"] 194.77.118.94
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
_SERVER["PATH"]
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin

_SERVER["REMOTE_ADDR"] 194.77.118.111
_SERVER["REMOTE_PORT"] 1486
_SERVER["SCRIPT_FILENAME"] /srv/www/htdocs/localhorst/experiment/phpinfo.php
_SERVER["SERVER_ADDR"] 194.77.118.94
_SERVER["SERVER_ADMIN"] webmasterwittgenstein.local
_SERVER["SERVER_NAME"] wittgenstein.local
_SERVER["SERVER_PORT"] 80
_SERVER["SERVER_SIGNATURE"] <ADDRESS>Apache/1.3.28 Server at
wittgenstein.local Port 80</ADDRESS>
_SERVER["SERVER_SOFTWARE"] Apache/1.3.28 (Linux/SuSE) PHP/4.3.3
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /localhorst/experiment/phpinfo.php
_SERVER["SCRIPT_NAME"] /localhorst/experiment/phpinfo.php
_SERVER["PATH_TRANSLATED"] /srv/www/htdocs/localhorst/experiment/phpinfo.php
_SERVER["PHP_SELF"] /localhorst/experiment/phpinfo.php
_SERVER["argv"] Array
(
)

_SERVER["argc"] 0
_ENV["LD_PRELOAD"] /usr/lib/GL/libGL.so.1
_ENV["LESSKEY"] /etc/lesskey.bin
_ENV["MANPATH"] /usr/share/man:/usr/local/man:/usr/X11R6/man:/opt/gnome/man
_ENV["INFODIR"] /usr/local/info:/usr/share/info:/usr/info
_ENV["NNTPSERVER"] news
_ENV["KDE_MULTIHEAD"] false
_ENV["HOSTNAME"] wittgenstein
_ENV["XKEYSYMDB"] /usr/X11R6/lib/X11/XKeysymDB
_ENV["GPG_AGENT_INFO"] /tmp/gpg-5u04vo/S.gpg-agent:2073:1
_ENV["SHELL"] /bin/bash
_ENV["TERM"] xterm
_ENV["HOST"] wittgenstein
_ENV["STYLE"] keramik
_ENV["XDM_MANAGED"] /var/run/xdmctl/xdmctl-:0,maysd,mayfn,sched,rsvd
_ENV["HISTSIZE"] 1000
_ENV["PROFILEREAD"] true
_ENV["GTK2_RC_FILES"]
/etc/opt/gnome/gtk-2.0/gtkrc:/opt/gnome/share/themes/Geramik/gtk-2.0/gtkrc:/root/.gtkrc-2.0-keramik:/root/.kde/share/config/gtkrc

_ENV["GTK_RC_FILES"]
/etc/opt/gnome/gtk/gtkrc:/opt/gnome/share/themes/Geramik/gtk/gtkrc:/root/.gtkrc-keramik:/root/.kde/share/config/gtkrc

_ENV["GNOME_PATH"] :/opt/gnome:/usr
_ENV["KDEHOME"] /root/.kde
_ENV["XSESSION_IS_UP"] yes
_ENV["KDE_FULL_SESSION"] true
_ENV["USER"] root
_ENV["JRE_HOME"] /usr/lib/java/jre
_ENV["LD_LIBRARY_PATH"] :/lib
_ENV["LS_COLORS"]
no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31:ex=00;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:

_ENV["OPENWINHOME"] /usr/openwin
_ENV["XNLSPATH"] /usr/X11R6/lib/X11/nls
_ENV["HOSTTYPE"] i386
_ENV["KDEROOTHOME"] /root/.kde
_ENV["SESSION_MANAGER"] local/wittgenstein:/tmp/.ICE-unix/2119
_ENV["COLUMNS"] 80
_ENV["PAGER"] less
_ENV["LD_HWCAP_MASK"] 0x20000000
_ENV["MINICOM"] -c on
_ENV["KONSOLE_DCOP"] DCOPRef(konsole-2170,konsole)
_ENV["PATH"]
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin

_ENV["GNOMEDIR"] /opt/gnome
_ENV["CPU"] i686
_ENV["JAVA_BINDIR"] /usr/lib/java/jre/bin
_ENV["PWD"] /srv/www/htdocs/localhorst/experiment
_ENV["INPUTRC"] /etc/inputrc
_ENV["KONSOLE_DCOP_SESSION"] DCOPRef(konsole-2170,session-1)
_ENV["JAVA_HOME"] /usr/lib/java/jre
_ENV["XMODIFIERS"] im=local
_ENV["LINES"] 24
_ENV["DBROOT"] /dev/null
_ENV["TEXINPUTS"]
::/root/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/root/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX

_ENV["HOME"] /root
_ENV["SHLVL"] 3
_ENV["OSTYPE"] linux
_ENV["LESS_ADVANCED_PREPROCESSOR"] no
_ENV["XCURSOR_THEME"] blueprint-cursor-theme
_ENV["no_proxy"] localhost
_ENV["LS_OPTIONS"] -a -N --color=tty -T 0
_ENV["WINDOWMANAGER"] /usr/X11R6/bin/kde
_ENV["LOGNAME"] root
_ENV["MACHTYPE"] i686-suse-linux
_ENV["LESS"] -M -I
_ENV["CVS_RSH"] ssh
_ENV["LC_CTYPE"] de_DEeuro
_ENV["LESSOPEN"] lessopen.sh %s
_ENV["PKG_CONFIG_PATH"] /opt/gnome/lib/pkgconfig
_ENV["USE_FAM"] no value
_ENV["INFOPATH"] /usr/local/info:/usr/share/info:/usr/info
_ENV["ACLOCAL_PATH"] /opt/gnome/share/aclocal
_ENV["DISPLAY"] :0.0
_ENV["ORACLE_HOME"] no value
_ENV["LESSCLOSE"] lessclose.sh %s %s
_ENV["G_BROKEN_FILENAMES"] 1
_ENV["COLORTERM"] no value
_ENV["JAVA_ROOT"] /usr/lib/java
_ENV["_"] /sbin/startproc
_ENV["PREVLEVEL"] N
_ENV["RUNLEVEL"] 5
_ENV["DAEMON"] /usr/sbin/httpd
_ENV["SWFFONTPATH"] /usr/share/php/swffonts

PHP License
This program is free software; you can redistribute it and/or modify it
under the terms of the PHP License as published by the PHP Group and
included in the distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions
about PHP licensing, please contact licensephp.net.

1

Horst Jäger
Schaafenstr. 25
50676 Köln
Tel: 0221/93187015

attached mail follows:


Horst Jäger wrote:

> I get no $QUERY_STRING (and no GET- or POST-Params).

$_SERVER['QUERY_STRING'], $_GET['param'], $_POST['param'], etc..

> register_globals Off Off

Or turn this on.

--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

attached mail follows:


If you need relative require's, I have always found the constant __FILE__ to be
useful. Just something like:

require_once (__FILE__ . "../b/b.php");

If you go this route, be sure to check out the user notes on the page here:
http://us2.php.net/constants

Joey Morwick wrote:

> Hello, I'm experiencing a problem with PHP4. On the server where our code
> used to reside, the relative path used in an include started from the
> directory in which the file containing the require statement resided. On
> our new server, the relative paths seem to start from where the first php
> script in the chain of "require"'s resides.
>
> An example would be three files in two directories as follows:
>
> /test/index.php
> /test/a/a.php
> /test/b/b.php
>
> index.php:
> require("a/a.php");
>
> a.php:
> require("../b/b.php");
>
> On our old server, this would be fine, as the path searched in a.php would
> start in /test/a. On the new server, if you start processing index.php,
> you will get a file not found error in a.php since it's starting from the
> path "/test".
>
> I've tried every config option I can think of and am nearly ready to try to
> hack in a workaround. Does anyone know how this could be configured?
>
> Thanks,
>

attached mail follows:


Stuart Felenstein wrote:

> Best way for me to explain this is by example -
> I just applied for a job and cut and past my resume
> into a textarea.
> After submitting it had extracted all the information
> and placed them into textfields. So my first name was
> now in the first name textfield, city was in the city
> field.
> Also , work experience and companies were also
> extracted to certain areas.
>
> How sophisticted a search is this and are there
> functions within PHP that make this accomplishable ?

preg_match()
The only question that remains is, what pattern do you want to use to match
against the resume / text? A resume has a predictable format of newlines,
commas and so forth so preg_match should be fairly reliable for this purpose.

attached mail follows:


Date: Wed, 27 Oct 2004 12:50:36 +0200
To: php-generallists.php.net
From: Horst Jäger [h.jaegermedienkonzepte.de]
Subject: Newbie: get no $QUERY_STRING

Hi,

when I received my own mail back from the list I found that my example page
has been removed. Maybe my mail program thought I was sending styled text.
So I'm using these brackets [] in my example in order to fool the damned thing.

I'm afraid this might be a stupid question but this is my first PHP-day.

I get no $QUERY_STRING (and no GET- or POST-Params).

I'm using PHP 4.3.3 on a SUSE LINUX 9.0 Machine. When I view the following
page:

[html][head][/head][body]
[?php
echo gettype($QUERY_STRING);
  ?]
[/body][/html]

I get:

NULL

I copy my phpinfo below in case someone wants to have a look at it.

Thanks

Horst

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

PHP Version 4.3.3

System Linux wittgenstein 2.4.21-99-smp4G #1 SMP Wed Sep 24 14:13:20 UTC
2003 i686
Build Date Sep 24 2003 00:27:33
Configure Command './configure' '--prefix=/usr/share'
'--datadir=/usr/share/php' '--bindir=/usr/bin' '--libdir=/usr/share'
'--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib'
'--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin'
'--disable-debug' '--enable-bcmath' '--enable-calendar' '--enable-ctype'
'--enable-dbase' '--enable-discard-path' '--enable-exif' '--enable-filepro'
'--enable-force-cgi-redirect' '--enable-ftp' '--enable-gd-imgstrttf'
'--enable-gd-native-ttf' '--enable-inline-optimization'
'--enable-magic-quotes' '--enable-mbstr-enc-trans' '--enable-mbstring'
'--enable-mbregex' '--enable-memory-limit' '--enable-safe-mode'
'--enable-shmop' '--enable-sigchild' '--enable-sysvsem' '--enable-sysvshm'
'--enable-track-vars' '--enable-trans-sid' '--enable-versioning'
'--enable-wddx' '--enable-yp' '--with-bz2'
'--with-dom=/usr/include/libxml2' '--with-ftp' '--with-gdbm'
'--with-gettext' '--with-gmp' '--with-imap=yes' '--with-iodbc'
'--with-jpeg-dir=/usr' '--with-ldap=yes' '--with-mcal=/usr' '--with-mcrypt'
'--with-mhash' '--with-mysql=/usr' '--with-ndbm' '--with-pgsql=/usr'
'--with-png-dir=/usr' '--with-readline' '--with-snmp' '--with-t1lib'
'--with-tiff-dir=/usr' '--with-ttf' '--with-freetype-dir=yes' '--with-xml'
'--with-xpm-dir=/usr/X11R6' '--with-zlib=yes' '--with-qtdom=/usr/lib/qt3'
'--with-gd' '--with-openssl' '--with-curl'
'--with-swf=/usr/src/packages/BUILD/swf/dist/' '--with-imap-ssl'
'--enable-xslt' '--with-xslt-sablot' '--with-iconv' '--with-mm'
'--with-apxs=/usr/sbin/apxs' 'i586-suse-linux'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, https, ftps, compress.bzip2,
compress.zlib

  This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

--------------------------------------------------------------------------------

PHP Credits

--------------------------------------------------------------------------------

Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 2039 2039
expose_php On On
extension_dir /usr/share/extensions/no-debug-non-zts-20020429
/usr/share/extensions/no-debug-non-zts-20020429
file_uploads On On
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/share/php .:/usr/share/php
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 30 30
max_input_time 60 60
memory_limit 8M 8M
open_basedir no value no value
output_buffering no value no value
output_handler no value no value
post_max_size 8M 8M
precision 12 12
register_argc_argv On On
register_globals Off Off
report_memleaks On On
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from melocalhost.com melocalhost.com
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On

apache
APACHE_INCLUDE no value
APACHE_TARGET no value
Apache Version Apache/1.3.28
Apache Release 10328100
Apache API Version 19990320
Hostname:Port wittgenstein.local:80
User/Group wwwrun(30)/8
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 15
Server Root /srv/www
Loaded Modules mod_userdir, mod_php4, mod_setenvif, mod_so, mod_usertrack,
mod_headers, mod_expires, mod_cern_meta, mod_proxy, mod_digest,
mod_auth_db, mod_auth_dbm, mod_auth_anon, mod_auth, mod_access,
mod_rewrite, mod_alias, mod_speling, mod_actions, mod_imap, mod_asis,
mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status,
mod_negotiation, mod_mime, mod_mime_magic, mod_log_referer, mod_log_agent,
mod_log_config, mod_define, mod_env, mod_vhost_alias, mod_mmap_static,
http_core

Directive Local Value Master Value
child_terminate 0 0
engine 1 1
last_modified 0 0
xbithack 0 0

Apache Environment
Variable Value
DOCUMENT_ROOT /srv/www/htdocs
HTTP_ACCEPT application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/x-shockwave-flash, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE de
HTTP_CONNECTION Keep-Alive
HTTP_HOST 194.77.118.94
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
PATH
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin

REMOTE_ADDR 194.77.118.111
REMOTE_PORT 1486
SCRIPT_FILENAME /srv/www/htdocs/localhorst/experiment/phpinfo.php
SERVER_ADDR 194.77.118.94
SERVER_ADMIN webmasterwittgenstein.local
SERVER_NAME wittgenstein.local
SERVER_PORT 80
SERVER_SIGNATURE [ADDRESS]Apache/1.3.28 Server at wittgenstein.local Port
80[/ADDRESS]
SERVER_SOFTWARE Apache/1.3.28 (Linux/SuSE) PHP/4.3.3
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /localhorst/experiment/phpinfo.php
SCRIPT_NAME /localhorst/experiment/phpinfo.php

HTTP Headers Information
HTTP Request Headers
HTTP Request GET /localhorst/experiment/phpinfo.php HTTP/1.1
Accept application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/x-shockwave-flash, */*
Accept-Encoding gzip, deflate
Accept-Language de
Connection Keep-Alive
Host 194.77.118.94
User-Agent Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
HTTP Response Headers
X-Powered-By PHP/4.3.3
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html

bcmath
BCMath support enabled

bz2
BZip2 Support Enabled
BZip2 Version 1.0.2, 30-Dec-2001

calendar
Calendar support enabled

ctype
ctype functions enabled

curl
CURL support enabled
CURL Information libcurl/7.10.5 OpenSSL/0.9.7b ipv6 zlib/1.1.4

dba
DBA support enabled
Supported handlers gdbm ndbm cdb cdb_make inifile flatfile

domxml
DOM/XML enabled
DOM/XML API Version 20020815
libxml Version 20510
HTML Support enabled
XPath Support enabled
XPointer Support enabled

exif
EXIF Support enabled
EXIF Version 1.4 $Id: exif.c,v 1.118.2.23 2003/06/25 13:21:54 edink Exp $
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF

ftp
FTP support enabled

gd
GD Support enabled
GD Version bundled (2.0.15 compatible)
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

gettext
GetText Support enabled

gmp
gmp support enabled

iconv
iconv support enabled
iconv implementation glibc
iconv library version 2.3.2

Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1

imap
IMAP c-Client Version 2001
SSL Support enabled

ldap
LDAP Support enabled
RCS Version $Id: ldap.c,v 1.130.2.4 2003/04/30 21:54:02 iliaa Exp $
Total Links 0/unlimited
API Version 2004
Vendor Name OpenLDAP
Vendor Version 20122

mbstring
Multibyte Support enabled
Japanese support enabled
Multibyte (japanese) regex support enabled

mbstring extension makes use of "streamable kanji code filter and
converter", which is distributed under the GNU Lesser General Public
License version 2.1.

Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.internal_encoding UTF-8 UTF-8
mbstring.language neutral neutral
mbstring.substitute_character no value no value

mcal
MCAL Support enabled
MCAL Version 0.6 - 20000121

mcrypt
mcrypt support enabled
version ]= 2.4.x
Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256
loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent
xtea blowfish enigma rc2 tripledes
Supported modes cbc cfb ctr ecb ncfb nofb ofb stream

Directive Local Value Master Value
mcrypt.algorithms_dir no value no value
mcrypt.modes_dir no value no value

mhash
MHASH support Enabled
MHASH API Version 20020524

mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 4.0.15
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off

odbc
ODBC Support enabled
Active Persistent Links 0
Active Links 0
ODBC library iodbc
ODBC_INCLUDE -I/usr/local/include
ODBC_LFLAGS -L/usr/local/lib
ODBC_LIBS -liodbc

Directive Local Value Master Value
odbc.allow_persistent On On
odbc.check_persistent On On
odbc.default_db no value no value
odbc.default_pw no value no value
odbc.default_user no value no value
odbc.defaultbinmode return as is return as is
odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes
odbc.max_links Unlimited Unlimited
odbc.max_persistent Unlimited Unlimited

openssl
OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.7b 10 Apr 2003

overload
User-Space Object Overloading Support enabled

pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 4.3 21-May-2003

pgsql
PostgreSQL Support enabled
PostgreSQL(libpq) Version 7.3.4
Multibyte character support enabled
SSL support enabled
Active Persistent Links 0
Active Links 0

Directive Local Value Master Value
pgsql.allow_persistent On On
pgsql.auto_reset_persistent Off Off
pgsql.ignore_notice Off Off
pgsql.log_notice Off Off
pgsql.max_links Unlimited Unlimited
pgsql.max_persistent Unlimited Unlimited

posix
Revision $Revision: 1.51.2.2 $

qtdom
qtdom support enabled

session
Session Support enabled
Registered save handlers files user mm

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off

shmop
shmop support enabled

snmp
UCD-SNMP Support enabled
UCD-SNMP Version 4.2.6

standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset=
a=href,area=href,frame=src,input=src,form=,fieldset=
user_agent no value no value

swf
swf support enabled

tokenizer
Tokenizer Support enabled

wddx
WDDX Support enabled
WDDX Session Serializer enabled

xml
XML Support active
XML Namespace Support active
EXPAT Version 1.95.6

xslt
XSLT support enabled
Backend Sablotron
Sablotron Version 0.98
Sablotron Information Cflags: -O2 -march=i586 -mcpu=i686
-fmessage-length=0 Libs: -L/usr/lib -lexpat Prefix: /usr

yp
YP Support enabled

zlib
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

Additional Modules
Module Name
dbase
filepro
sysvsem
sysvshm

Environment
Variable Value
LD_PRELOAD /usr/lib/GL/libGL.so.1
LESSKEY /etc/lesskey.bin
MANPATH /usr/share/man:/usr/local/man:/usr/X11R6/man:/opt/gnome/man
INFODIR /usr/local/info:/usr/share/info:/usr/info
NNTPSERVER news
KDE_MULTIHEAD false
HOSTNAME wittgenstein
XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB
GPG_AGENT_INFO /tmp/gpg-5u04vo/S.gpg-agent:2073:1
SHELL /bin/bash
TERM xterm
HOST wittgenstein
STYLE keramik
XDM_MANAGED /var/run/xdmctl/xdmctl-:0,maysd,mayfn,sched,rsvd
HISTSIZE 1000
PROFILEREAD true
GTK2_RC_FILES
/etc/opt/gnome/gtk-2.0/gtkrc:/opt/gnome/share/themes/Geramik/gtk-2.0/gtkrc:/root/.gtkrc-2.0-keramik:/root/.kde/share/config/gtkrc

GTK_RC_FILES
/etc/opt/gnome/gtk/gtkrc:/opt/gnome/share/themes/Geramik/gtk/gtkrc:/root/.gtkrc-keramik:/root/.kde/share/config/gtkrc

GNOME_PATH :/opt/gnome:/usr
KDEHOME /root/.kde
XSESSION_IS_UP yes
KDE_FULL_SESSION true
USER root
JRE_HOME /usr/lib/java/jre
LD_LIBRARY_PATH :/lib
LS_COLORS
no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31:ex=00;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:

OPENWINHOME /usr/openwin
XNLSPATH /usr/X11R6/lib/X11/nls
HOSTTYPE i386
KDEROOTHOME /root/.kde
SESSION_MANAGER local/wittgenstein:/tmp/.ICE-unix/2119
COLUMNS 80
PAGER less
LD_HWCAP_MASK 0x20000000
MINICOM -c on
KONSOLE_DCOP DCOPRef(konsole-2170,konsole)
PATH
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin

GNOMEDIR /opt/gnome
CPU i686
JAVA_BINDIR /usr/lib/java/jre/bin
PWD /srv/www/htdocs/localhorst/experiment
INPUTRC /etc/inputrc
KONSOLE_DCOP_SESSION DCOPRef(konsole-2170,session-1)
JAVA_HOME /usr/lib/java/jre
XMODIFIERS im=local
LINES 24
DBROOT /dev/null
TEXINPUTS
::/root/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/root/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX

HOME /root
SHLVL 3
OSTYPE linux
LESS_ADVANCED_PREPROCESSOR no
XCURSOR_THEME blueprint-cursor-theme
no_proxy localhost
LS_OPTIONS -a -N --color=tty -T 0
WINDOWMANAGER /usr/X11R6/bin/kde
LOGNAME root
MACHTYPE i686-suse-linux
LESS -M -I
CVS_RSH ssh
LC_CTYPE de_DEeuro
LESSOPEN lessopen.sh %s
PKG_CONFIG_PATH /opt/gnome/lib/pkgconfig
USE_FAM no value
INFOPATH /usr/local/info:/usr/share/info:/usr/info
ACLOCAL_PATH /opt/gnome/share/aclocal
DISPLAY :0.0
ORACLE_HOME no value
LESSCLOSE lessclose.sh %s %s
G_BROKEN_FILENAMES 1
COLORTERM no value
JAVA_ROOT /usr/lib/java
_ /sbin/startproc
PREVLEVEL N
RUNLEVEL 5
DAEMON /usr/sbin/httpd
SWFFONTPATH /usr/share/php/swffonts

PHP Variables
Variable Value
_SERVER["DOCUMENT_ROOT"] /srv/www/htdocs
_SERVER["HTTP_ACCEPT"] application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/x-shockwave-flash, */*
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
_SERVER["HTTP_ACCEPT_LANGUAGE"] de
_SERVER["HTTP_CONNECTION"] Keep-Alive
_SERVER["HTTP_HOST"] 194.77.118.94
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
_SERVER["PATH"]
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin

_SERVER["REMOTE_ADDR"] 194.77.118.111
_SERVER["REMOTE_PORT"] 1486
_SERVER["SCRIPT_FILENAME"] /srv/www/htdocs/localhorst/experiment/phpinfo.php
_SERVER["SERVER_ADDR"] 194.77.118.94
_SERVER["SERVER_ADMIN"] webmasterwittgenstein.local
_SERVER["SERVER_NAME"] wittgenstein.local
_SERVER["SERVER_PORT"] 80
_SERVER["SERVER_SIGNATURE"] [ADDRESS]Apache/1.3.28 Server at
wittgenstein.local Port 80[/ADDRESS]
_SERVER["SERVER_SOFTWARE"] Apache/1.3.28 (Linux/SuSE) PHP/4.3.3
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /localhorst/experiment/phpinfo.php
_SERVER["SCRIPT_NAME"] /localhorst/experiment/phpinfo.php
_SERVER["PATH_TRANSLATED"] /srv/www/htdocs/localhorst/experiment/phpinfo.php
_SERVER["PHP_SELF"] /localhorst/experiment/phpinfo.php
_SERVER["argv"] Array
(
)

_SERVER["argc"] 0
_ENV["LD_PRELOAD"] /usr/lib/GL/libGL.so.1
_ENV["LESSKEY"] /etc/lesskey.bin
_ENV["MANPATH"] /usr/share/man:/usr/local/man:/usr/X11R6/man:/opt/gnome/man
_ENV["INFODIR"] /usr/local/info:/usr/share/info:/usr/info
_ENV["NNTPSERVER"] news
_ENV["KDE_MULTIHEAD"] false
_ENV["HOSTNAME"] wittgenstein
_ENV["XKEYSYMDB"] /usr/X11R6/lib/X11/XKeysymDB
_ENV["GPG_AGENT_INFO"] /tmp/gpg-5u04vo/S.gpg-agent:2073:1
_ENV["SHELL"] /bin/bash
_ENV["TERM"] xterm
_ENV["HOST"] wittgenstein
_ENV["STYLE"] keramik
_ENV["XDM_MANAGED"] /var/run/xdmctl/xdmctl-:0,maysd,mayfn,sched,rsvd
_ENV["HISTSIZE"] 1000
_ENV["PROFILEREAD"] true
_ENV["GTK2_RC_FILES"]
/etc/opt/gnome/gtk-2.0/gtkrc:/opt/gnome/share/themes/Geramik/gtk-2.0/gtkrc:/root/.gtkrc-2.0-keramik:/root/.kde/share/config/gtkrc

_ENV["GTK_RC_FILES"]
/etc/opt/gnome/gtk/gtkrc:/opt/gnome/share/themes/Geramik/gtk/gtkrc:/root/.gtkrc-keramik:/root/.kde/share/config/gtkrc

_ENV["GNOME_PATH"] :/opt/gnome:/usr
_ENV["KDEHOME"] /root/.kde
_ENV["XSESSION_IS_UP"] yes
_ENV["KDE_FULL_SESSION"] true
_ENV["USER"] root
_ENV["JRE_HOME"] /usr/lib/java/jre
_ENV["LD_LIBRARY_PATH"] :/lib
_ENV["LS_COLORS"]
no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31:ex=00;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:

_ENV["OPENWINHOME"] /usr/openwin
_ENV["XNLSPATH"] /usr/X11R6/lib/X11/nls
_ENV["HOSTTYPE"] i386
_ENV["KDEROOTHOME"] /root/.kde
_ENV["SESSION_MANAGER"] local/wittgen