ID:               21886
 User updated by:  technik at infoworxx dot de
-Summary:          parameters sometimes not submitted
 Reported By:      technik at infoworxx dot de
-Status:           No Feedback
+Status:           Open
 Bug Type:         Session related
 Operating System: Linux 7.2
 PHP Version:      4.3.0
 New Comment:

Hi @all,

sorry for that long time to answer - a lot things to do in the last
weeks :-(

Finally I have figured out under what circumstances the behaviour
occurs.

Here is an clean sample code:

---- index.phtml ----
<?
// Classes //
require_once "foo-class.php4";

// test-class //
$foo = new fooclass();

@error_log("Start with: ".$_SERVER["REQUEST_URI"],0);

// start a session.
session_start();

// if $unintialized is set to something, everything is fine.

// $uninitalized="test";

$save_hid=$uninitalized;
$sess_action="two";
session_register('sess_action');
session_register('save_hid');

// and now the problem - $dummy will not be given to the function
$dummy=$_SERVER["PHP_SELF"]."?step=2";
@error_log("var dummy: ".$dummy,0);

$foo->samplefunc($dummy);

exit;
?>
---- END index.phtml ----

---- foo-class.php4 ----
<? 
// file:        foo-class.php4

class fooclass {

    function samplefunc($pathInfo) {

                @error_log("SESSION [redirectTo]: Parameter: ".$pathInfo,0);

    }


} 

?>
---- END foo-class.php4 ----

And here my Syslog when I try to open the page the first time - when I
do an refresh everything is fine !!!!!

---- error_log ----
[Tue Mar  4 14:53:38 2003] [error] Start with: /php-4.3.x-test/
[Tue Mar  4 14:53:38 2003] [error] var dummy:
/php-4.3.x-test/index.phtml?step=2
[Tue Mar  4 14:53:38 2003] [error] SESSION [redirectTo]: Parameter:
---- END error_log ----

As you can see, the function in my foo-class do not recieve their
parameters. This only happens if the $unintialized var in index.phtml
is uninitialized.

If you need anything more, please let me know.

Again - with 4.2.3 there were no those behaviour.

I know - an unintilized var is not good - but I guess there should not
be such an error.

Regards,
Sebastian


Previous Comments:
------------------------------------------------------------------------

[2003-02-22 20:17:03] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



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

[2003-02-15 10:13:42] [EMAIL PROTECTED]

Then you must also know that some behaviour of them was fixed in 4.3.0
and most likely you're just relying on the
broken behaviour...can't really tell without a short and 
complete example script. 


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

[2003-02-14 04:21:08] technik at infoworxx dot de

I am sorry, actually I do not have time, I hope I can give you an
example in the next two days - sorry for that (but your first reply
took more than two days :-).

But - it is NOT an misunderstanding how sessions work. I am using
sessions since the beginning of PHP 4 and the same code is running
under 4.2.3 perfect.

Regards,
Sebastian

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

[2003-02-13 02:01:03] [EMAIL PROTECTED]

Please provide a complete but short example 
that _clearly_ shows the problem.


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

[2003-01-26 07:52:28] technik at infoworxx dot de

Hi @all,

I have just mentioned a strange behaviour of PHP 4.3.0.

At first of all: I have recompiled my hole config with PHP 4.2.3 and my
program runs - without any change - fine !

Just have a look at the source:

In index2.phtml:
-----
$dummy="index2.phtml?step=printchecklist&mode=".$mode."&besuchid=".$besuch_id."&hid=".$form_hid."&sessvalid=".$s_sessvalid;

if ($debug) @error_log("Redirect [origin=checklist] to: ".$dummy,0);

$session->redirectTo($dummy);
-----

in my Session-Class:
-----
function redirectTo($pathInfo) {

        if ($this->debug) @error_log("SESSION [redirectTo]: Parameter:
".$pathInfo,0);

        [.......]

}
-----

and now my error-log:
-----
[Sun Jan 26 14:24:43 2003] [error] Redirect [origin=checklist] to:
index2.phtml?step=printchecklist&mode=&besuchid=&hid=16&sessvalid=951227295
[Sun Jan 26 14:24:43 2003] [error] SESSION [redirectTo]: Parameter:

-----

The Parameter given to $session->redirectTo will not be recieved by the
function. When I try this several times (my "$dummy" does NOT !!!
change) after the second or the third try it works.

Again - with 4.2.3 and excatly the same config *everything* is fine.

Regards,
Sebastian



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


-- 
Edit this bug report at http://bugs.php.net/?id=21886&edit=1

Reply via email to