By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,729 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,729 IT Pros & Developers. It's quick & easy.

odd problem calling object methods

P: n/a
Hi.

I was wondering whether anyone else could see anything wrong with this code:

<input name="name" type="text" id="name"
value="<?php print @$_SESSION['elements']['name']->getValue();?>">

When my browser tries to display this page I get the page and form down to
this line where I get this displayed

<input name="name" type="text" id="name" value="

and the rendering stops.

It worked yesterday, then I suddenly got this problem and I don't know why.
It also works on another win2000 pc.

Also, if I change the above code to direct variable access like below, it
works fine :

<input name="name" type="text" id="name"
value="<?php print @$_SESSION['elements']['name']->value;?>">

Personally, I'm mystified.
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Bill wrote:
[edited]
<?php print @$_SESSION['elements']['name']->getValue();?>
does not work, however

<?php print @$_SESSION['elements']['name']->value;?>
works as expected

Personally, I'm mystified.


read
http://www.php.net/manual/en/languag...ialization.php
Do you have the class to which $_SESSION['elements']['name'] belongs
declared in the script with those print statements?
--
I have a spam filter working.
To mail me include "urkxvq" (with or without the quotes)
in the subject line, or your mail will be ruthlessly discarded.
Jul 17 '05 #2

P: n/a

"Pedro" <he****@hotpop.com> wrote in message
news:bo*************@ID-203069.news.uni-berlin.de...
Bill wrote:
[edited]
<?php print @$_SESSION['elements']['name']->getValue();?>
does not work, however

<?php print @$_SESSION['elements']['name']->value;?>
works as expected

Personally, I'm mystified.


read
http://www.php.net/manual/en/languag...ialization.php
Do you have the class to which $_SESSION['elements']['name'] belongs
declared in the script with those print statements?


Absolutely. As I said: exactly the same script works fine on another win2000
machine, and if I edit out the method call and replace it with the value
itself -

print @$_SESSION['elements']['name']->getValue()

to

print @$_SESSION['elements']['name']->value
it works fine. Change it back and bang, it crashes again.
Jul 17 '05 #3

P: n/a
Bill wrote:
[...]
it works fine. Change it back and bang, it crashes again.


do you have anything in the logs?

php.ini

error_reporting = E_ALL
log_errors = On
error_log = /path/to/error.log
--
I have a spam filter working.
To mail me include "urkxvq" (with or without the quotes)
in the subject line, or your mail will be ruthlessly discarded.
Jul 17 '05 #4

P: n/a

"Pedro" <he****@hotpop.com> wrote in message
news:bo*************@ID-203069.news.uni-berlin.de...
Bill wrote:
[...]
it works fine. Change it back and bang, it crashes again.


do you have anything in the logs?

php.ini

error_reporting = E_ALL
log_errors = On
error_log = /path/to/error.log


I set up php.ini as above, replicated the problem, and nothing was written.
:(

Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.