Partners & Affiliates














Re: [phplib] Problem with newly commited user4.inc From: Marko Kaening (marko <email protected>)
Date: 01/05/01

Privet Max,

finally I found my error!
Up to now I successfully coded as follows:

+ $user->register('LFC'); if(!isset($LFC)) $LFC=new LFilterClass;

i.e. without applying $user->is_registered() before.
And the second error is also immediately clear: I do the new after the
registration... Bad idea...
This way it works fine:

+ if(!isset($EFC)) $EFC=new EFilterClass;
+ if(!$user->is_registered('EFC')) $user->register('EFC');

I think that's the way it should be done. ;)

That was the reason why in my case on one variable was saved. Uff, what a
luck that I understood that I made something logically wrong.

BUT: This shows that there is another potential problem for porting
phplib3 style scripts to phplib4! Don't you think so? Well, I am happy
that I got this finally working. ;) THanks very much for your immediate
help.

You know, I think this is stable enough to work in my production
environment already. Great!!!

By the way: I understood your argument concerning the possibility to use
the old tables. Of course, their structure didn't change after all. It's
only the coding of the val. I only mentioned that the old style of saving
that as a real script allows to switched without problems between
different phplib versions. But okay, it looks like this is not necessary
anyway, because your port seems to be working fine so far, even for
the user class, eventually!!!!! ;)

Well, Max, I am still not quite clear in my head concerning this mixing of
session and user class... I understood that there is a certain
interference in PHP4 between session and user, but does it actually mean
that still these classes shouldn't already be used together. At first
glance I still can't see any problems. The user class saves all user
variables properly and session is totally independent from that.
Sorry, I have to admit that I probably don't understand all this very
deeply... :(

OK, I am content with the current status, Max. From now on I will use your
class instead of Brian's code. It's working fine.

Poka i horoshi novy god!!!!

Marko

P.S.:

 I use the following configuration:
 Apache/1.3.9 (Unix) (SuSE/Linux) PHP/4.0.4 mod_ssl/2.4.7 OpenSSL/0.9.4
 with zend optimizer or abcache, alternatively.

                    O _ O
                     0 0
 ------------------m-\o/-m------------------------------------------
 Dr. Marko K"aning Tel/Fax: +49-3834 554 442 / -3834 554 301
 INP Greifswald email : kaening <email protected>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>