odd problem calling object methods

This is a discussion on odd problem calling object methods within the PHP Language forums, part of the PHP Programming Forums category; Hi. I was wondering whether anyone else could see anything wrong with this code: <input name="name" ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-04-2003
Bill
 
Posts: n/a
Default odd problem calling object methods

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.


Reply With Quote
  #2 (permalink)  
Old 11-05-2003
Pedro
 
Posts: n/a
Default Re: odd problem calling object methods

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.
Reply With Quote
  #3 (permalink)  
Old 11-05-2003
Bill
 
Posts: n/a
Default Re: odd problem calling object methods


"Pedro" <hexkid@hotpop.com> wrote in message
news:bo9bbv$1b31on$1@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.


Reply With Quote
  #4 (permalink)  
Old 11-05-2003
Pedro
 
Posts: n/a
Default Re: odd problem calling object methods

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.
Reply With Quote
  #5 (permalink)  
Old 11-05-2003
Bill
 
Posts: n/a
Default Re: odd problem calling object methods


"Pedro" <hexkid@hotpop.com> wrote in message
news:bo9fg6$1c84rp$1@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.
:(



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:49 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0