php-general Digest 17 Mar 2011 02:06:27 -0000 Issue 7230

Topics (messages 311885 through 311893):

Re: Deleting elements from the middle of an array
        311885 by: Tom Barrett
        311886 by: Marc Guay

MySQL Unbuffered Query Behavior Change
        311887 by: Nicholas Williams

Array of Error Codes: Key/Values
        311888 by: Brendan_Crowley.DellTeam.com

[Semi-OT] Request for help: Squirrelmail, PHP and RTL-Languages
        311889 by: Michelle Konzack
        311890 by: Dotan Cohen
        311891 by: Michelle Konzack
        311892 by: Michelle Konzack

PHP4 vs PHP5 overrides
        311893 by: Tom Robinson

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
http://en.wikipedia.org/wiki/Two_Little_Dickie_Birds

--- End Message ---
--- Begin Message ---
I copied this thread to some co-workers with the subject line "Be glad
that you're not programmers".

Is it Friday yet?

Marc

--- End Message ---
--- Begin Message ---
I was previously on PHP 5.1.6 and was using the following code:

$dbr = mysql_unbuffered_query($query, $this->con);

while($row = mysql_fetch_array($dbr, $assoc ? MYSQL_ASSOC : MYSQL_NUM))
    $this->result[] = $row;

$this->rows = mysql_num_rows($dbr);

It worked properly. The documentation at
http://www.php.net/manual/en/function.mysql-num-rows.php indicates
that mysql_num_rows won't return the correct result on unbuffered
queries until all of the rows had been fetched, but since I was
looping through and fetching all rows with mysql_fetch_array, it
worked properly and wasn't a problem.

I've upgraded to PHP 5.3.5 and now mysql_num_rows always returns 0. I
am fetching all rows before calling mysql_num_rows, just like the
documentation says to do, so mysql_num_rows should return the correct
result. Why is it not? Is the documentation wrong now (should it have
been updated to say that mysql_num_rows now NEVER works with
unbuffered queries instead of saying you have to fetch all rows
first)? Is there a bug in PHP? Or am I doing something wrong and it
just coincidentally worked before?

Thanks,

Nick

--- End Message ---
--- Begin Message ---
Hi,

I'm new to php and i'm looking to setup an array (or what work best) of codes 
and corresponding error strings, for example (pseudo code):
ERROR_CODES = array('-1' => 'Error opening file', '-2' => 'General File IO 
Error', '-3' => 'Database connection error');

Access these string values using the key codes (negative key values) to 
formulate a SoapFault, e.g.:
throw new SoapFault('-1', ERROR_CODES[-1], 'actor', 'detail', 'name', 'header');

How best to implement this in php?

Thanks,
Brendan

--- End Message ---
--- Begin Message ---
Hello,

I am wotking in an environent where it is required to  support  LTR  and
RTL languages at once. My own website support this but with squirrelmail
there is a problem.

Is there an Iranien, Israelian or Arabic Programmer which can  help  out
to get RTL support in the Squirrelmail interface including the New  Mail
form?

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems@tdnet France EURL       itsystems@tdnet UG (limited liability)
Owner Michelle Konzack            Owner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz                 Kinzigstraße 17
67100 Strasbourg/France           77694 Kehl/Germany
Tel: +33-6-61925193 mobil         Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber [email protected]

Linux-User #280138 with the Linux Counter, http://counter.li.org/

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
On Wed, Mar 16, 2011 at 21:59, Michelle Konzack
<[email protected]> wrote:
> Hello,
>
> I am wotking in an environent where it is required to  support  LTR  and
> RTL languages at once. My own website support this but with squirrelmail
> there is a problem.
>
> Is there an Iranien, Israelian or Arabic Programmer which can  help  out
> to get RTL support in the Squirrelmail interface including the New  Mail
> form?
>
> Thanks, Greetings and nice Day/Evening
>    Michelle Konzack
>

What exactly is the problem? I have an associate using SquirrelMail in
Hebrew, it even has a Hebrew interface. Are you getting directional
display issues? Gibberish?


-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

--- End Message ---
--- Begin Message ---
Shalom Dotan,

thanks for your VERY fast answer.

Am 2011-03-16 22:39:43, hacktest Du folgendes herunter:
> What exactly is the problem? I have an associate using SquirrelMail in
> Hebrew, it even has a Hebrew interface. Are you getting directional
> display issues? Gibberish?

The locale on my workstation  is  set  to  de_DE.UTF8  and  the  default
charset in squirrelmail utf-8.

I can set the interface of squirrelmail to hebrew, farsi or  arabic  and
it is working RTL.

But if I have E-Mails from Al-Djasira, Jerusalem Post or Kaleme (I am on
there news lists), all text is aligned LEFT and not right.

Also it is not possibel to write E-Mails (Subject + Body) in RTL.

So what is needed, is to  get  the  Mail-View  corrected  and  then  the
"New Mail" input form.

And then, I need a solution if text is a mix of RTL and LTR.

Currently I am using the Squirelmail Version 1.4.21 from Debian/Squeeze
but I can update to any higher versions (>1.5) since it s my own server

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems@tdnet France EURL       itsystems@tdnet UG (limited liability)
Owner Michelle Konzack            Owner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz                 Kinzigstraße 17
67100 Strasbourg/France           77694 Kehl/Germany
Tel: +33-6-61925193 mobil         Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber [email protected]
ICQ    #328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
Again...

Here is a screenshoot (squirrelmail 1.4.21 from Debian/Squeeze): 

http://vserver04.tamay-dogan.net/squirrelmail/20110316221617_squirrelmail_prersian_error.jpg

which is set to Persian interface and even Firefox is  set  to  prefered
Language fa_IR and it does not work here (in 1.5.x persia is shown)

Also there are problems in the From: and latin text should  not  aligned
right, exspecialy if the entired mail is in latin characters

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems@tdnet France EURL       itsystems@tdnet UG (limited liability)
Owner Michelle Konzack            Owner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz                 Kinzigstraße 17
67100 Strasbourg/France           77694 Kehl/Germany
Tel: +33-6-61925193 mobil         Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber [email protected]
ICQ    #328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
Hi,

I'm trying to decipher inherited code (I did not write this) and I'm
having great difficulty understanding the override of a method in PHP4
vs PHP5

Here's the code:

form.php
22 class FormClass
23 {
...
/* some method calls to _dispatchSave() */
572                         if($this->_dispatchSave($key) === FALSE)
573                         {
574                                 return FALSE;
575                         }
...
/* _dispatchSave is defined */
692         function _dispatchSave($key)
693         {

arform.php
17 class ActiveRecordFormClass extends FormClass
18 {
...
/* _dispatchSave is defined */
84         function _dispatchSave(&$key)
85         {

In PHP 4.3.9:

The arform.php implementation of _dispatchSave is called
(i.e.ActiveRecordFormClass::_dispatchSave())in preference to the one
defined in it's own class. This is the desired call BTW but why does
this happening? I would expect the parent implementation to be called,
not a child implementation???

In PHP 5.1.6:

I get the warning:

"PHP Strict Standards:  Declaration of
ActiveRecordFormClass::_dispatchSave() should be compatible with that of
FormClass::_dispatchSave() in ..."

which is expected since the parameters are defined differently. As I
expected, the FormClass::_dispatchSave() implementation is called in
PHP5. This implementation does not have the desired effect (the
application crashes).

What is happening? Maybe I'm not seeing something simple. I look forward
to any responses.

Regards,

Tom




Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to