php-general Digest 5 Mar 2012 19:11:46 -0000 Issue 7713

Topics (messages 316877 through 316913):

'<?=' with PHP5.3.10
        316877 by: Lester Caine
        316878 by: Ashley Sheridan
        316879 by: Lester Caine
        316880 by: Alejandro Michelin Salomon
        316911 by: Marc ct
        316913 by: Lester Caine

Нужны памперсы
        316881 by: Deti

PHP passthru() blocks with bash process replacement?
        316882 by: Sander Marechal

Re: MySQL over TCP results on CLOSE_WAIT state in PHP 5.3.8
        316883 by: php-list.dubistmeinheld.de

Converting an unordered list into JSON
        316884 by: Jay Blanchard
        316885 by: Stuart Dallas
        316886 by: Jay Blanchard
        316887 by: Stuart Dallas
        316888 by: Jay Blanchard
        316889 by: Stuart Dallas
        316890 by: Jim Giner
        316891 by: Jay Blanchard
        316892 by: Jay Blanchard
        316893 by: Stuart Dallas
        316894 by: Jay Blanchard

iphone & php
        316895 by: Jim Giner
        316896 by: Stuart Dallas
        316897 by: Jim Giner
        316898 by: Mike Mackintosh
        316899 by: Jay Blanchard
        316900 by: Jim Giner
        316901 by: Mike Mackintosh
        316902 by: Mari Masuda
        316903 by: Jim Giner
        316904 by: Jim Giner
        316905 by: Ashley Sheridan
        316906 by: Jim Giner
        316907 by: Stuart Dallas
        316908 by: Jim Giner
        316909 by: Jim Giner
        316910 by: Marc Guay
        316912 by: Jim Giner

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message --- I am presuming that one of my customers hosts has upgraded to PHP5.3.10 over the weekend, and now the site is broken! It is currently codeignighter based, something which I am in the process of replacing anyway, but I need to get http://eveshamselfdrive.co.uk/ working again as it was last week. At this stage I am only assuming that the '<?=' is the problem, but it certainly looks like that and I'm not sure you can change short_open_tag with set_ini ? It certainly has not worked adding that ... Help

( I'm in the process of moving these sites to one of my own machines, but that is a few weeks away )

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---

Lester Caine <les...@lsces.co.uk> wrote:

>I am presuming that one of my customers hosts has upgraded to PHP5.3.10
>over the
>weekend, and now the site is broken! It is currently codeignighter
>based,
>something which I am in the process of replacing anyway, but I need to
>get
>http://eveshamselfdrive.co.uk/ working again as it was last week. At
>this stage
>I am only assuming that the '<?=' is the problem, but it certainly
>looks like
>that and I'm not sure you can change short_open_tag with set_ini ? It
>certainly
>has not worked adding that ... Help
>
>( I'm in the process of moving these sites to one of my own machines,
>but that
>is a few weeks away )
>
>--
>Lester Caine - G8HFL
>-----------------------------
>Contact - http://lsces.co.uk/wiki/?page=contact
>L.S.Caine Electronic Services - http://lsces.co.uk
>EnquirySolve - http://enquirysolve.com/
>Model Engineers Digital Workshop - http://medw.co.uk//
>Firebird - http://www.firebirdsql.org/index.php
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

You can't set it from ini_set(), see http://nl3.php.net/manual/en/ini.list.php 
and the link in there to the mode values as to what you can/not change and why.

You can set it in php.ini itself, or possibly from .htaccess. failing that, 
find/replace on the old short echo tags would do it.

Thanks,
Ash
http://ashleysheridan.co.uk

--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:
You can set it in php.ini itself, or possibly from .htaccess. failing that, 
find/replace on the old short echo tags would do it.

But I thought that '<?=' was SUPPOSED to have been protected? When did that change ...

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---
Leste Wrote:

>-----Mensagem original-----
>De: Lester Caine [mailto:les...@lsces.co.uk] 
>Enviada em: segunda-feira, 5 de março de 2012 08:18
>Para: php-gene...@lists.php.net
>Assunto: Re: [PHP] '<?=' with PHP5.3.10

>Ashley Sheridan wrote:
>> You can set it in php.ini itself, or possibly from .htaccess. failing that, 
>> find/replace on the old short echo tags would do it.

>But I thought that '<?=' was SUPPOSED to have been protected? When did that 
>change ...

Protected only in php 5.4.x, not in 5.3.x

Php 5.3 a prior, the only safe tag is <?php, in 5.4.x safes tags are <?php and 
<?=.

In my codes, i only use this <?php, 100% safe.

Alejandro M.S.

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
2012/3/5 Alejandro Michelin Salomon <amichel...@hotmail.com>:
> Leste Wrote:
>
>>-----Mensagem original-----
>>De: Lester Caine [mailto:les...@lsces.co.uk]
>>Enviada em: segunda-feira, 5 de março de 2012 08:18
>>Para: php-gene...@lists.php.net
>>Assunto: Re: [PHP] '<?=' with PHP5.3.10
>
>>Ashley Sheridan wrote:
>>> You can set it in php.ini itself, or possibly from .htaccess. failing that, 
>>> find/replace on the old short echo tags would do it.
>
>>But I thought that '<?=' was SUPPOSED to have been protected? When did that
>>change ...
>
> Protected only in php 5.4.x, not in 5.3.x
>
> Php 5.3 a prior, the only safe tag is <?php, in 5.4.x safes tags are <?php 
> and <?=.
>
> In my codes, i only use this <?php, 100% safe.
>
> Alejandro M.S.
>
> --

And also as you say that it is based with codeigniter you can use a
feature of the framework for emulate it.
http://codeigniter.com/user_guide/general/alternative_php.html

--- End Message ---
--- Begin Message ---
Marc ct wrote:
And also as you say that it is based with codeigniter you can use a
feature of the framework for emulate it.
http://codeigniter.com/user_guide/general/alternative_php.html

That was probably the other sort of hint I was looking for 9 hours ago ;)
Maintaining something one has not actually use in anger does not help, so half the problem fixing things was simply finding where they were.

I would have started moving things over by now, but I decided that I'd configure the new box with Apache2.4 and PHP5.4 while I was at it. I just need all the extras that haven't been converted over yet :(
Such as Magickwand and eaccelerator.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---
                                             Детям требуется Ваша помощь!       
                   
Благотворительный фонд «Милосердие» просит Вас оказать финансовую помощь на 
покупку памперсов для детей из Орехово-Зуевского дома ребенка (дети от 0 до 4 
лет) и для детей инвалидов из детского дома «Журавушка» д.Красная Дубрава. 

Так  же всегда требуются:

Одежда, обувь. Спортивная одежда, детские развивающие и настольные игры. 

Канцтовары (цветные карандаши, фломастеры, цветная бумага, тетради, альбомы, 
авторучки), бытовая химия (стиральный порошок, чистящие средства, туалетное 
мыло, зубная паста, туалетная бумага).

Реквизиты для перечисления денежных средств:

ИНН 5034027257 КПП 503401001 
БИК 044525219 
К/с 30101810500000000219 Р/с 40703810501590000001 
ОАО «Банк Москвы» г. Москва. 
Благотворительный Фонд "Милосердие".
Назначение платежа: Добровольное пожертвование.

Яндекс.Кошелек - 41001134122165 расчеты в сети Интернет с использованием 
платежной системы «Яндекс.Деньги»

Платеж через систему Webmoney В рублях: R398159818835 В долларах США: 
Z354813322720 В евро: E138356782921

С уважением, директор,  Благотворительного фонда «Милосердие» Ефанов Владимир 
Владимирович БЛАГОТВОРИТЕЛЬНЫЙ  ФОНД  "МИЛОСЕРДИЕ"
127051, Москва, Трубная ул., 23, корп. 1.

142605, Московская область, г. Орехово-Зуево, ул. Галочкина, дом 4.

Телефон: (495) 621-42-85; 8 (903) 533-82-62. E-mail: bfm...@mail.ru 

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

I have a problem with PHP passthru() blocking when it is supposed to start a
daemon and return.

I have a Node.js daemon with a bash script wrapper around it. Users can call
this bash script directly, but it is also used by our deployment system. Our
deployment system uses Phing, and Phing uses `exec()` and `passthru()`
internally to cann external programs.


The bash script wrapper around my Node.js uses a bit of process replacement
because my Node.js server can't directly log to syslog. Normally I'd start
Node.js like this:

    forever -l app.log app.js

But because I want it to log to syslog, I put this in the bash script:

    forever -l >(logger) app.js

The `logger` process replacement creates a file descriptor into syslog like
/dev/fd/63 whose path is passed to the forever command as the logfile to use.

This works great when I start the daemon using the bash script directly, but
when the bash script is executed using PHP passthru() or exec() then these
calls will block. If I use a regular logfile instead of the process
replacement then both passthru() and exec() work just fine, starting the
daemon in the background.

I have created a complete working example (using a simple PHP daemon instead
of Node.js) on Github's Gist: https://gist.github.com/1977896 (needs PHP 5.3.6+)

Why does the passthru() call block on the process replacement? And is there
anything I can do to work around it?

Kind regards,

-- 
Sander Marechal

--- End Message ---
--- Begin Message ---
> > I have a MySQL server A, a server B with PHP 5.3.8 and a server C with
> > PHP 5.3.3. I'm connecting to the MySQL server on A via TCP from B and C
> > using an internal network. Server B and C use the same PHP application.
> > There are also same PHP scripts that get data from the database and then
> > calculate up to 30 minutes. I close all database connection before doing
> > the calculation to save connections (and ports) using:
> > $thread_id = mysqli_thread_id( $this->handle );
> > mysqli_kill(  $this->handle, $thread_id );
> > mysqli_close( $this->handle );
> > 
> > During a review on our servers I discovered that server B has a lot of
> > network connection in the state "CLOSE_WAIT". Server C running the same
> > PHP application has not. I see the difference that server B is using
> > mysqlnd and server C not.
> > 
> > serverB# netstat -an | grep 3306
> > tcp        1      0 10.8.0.58:47455         10.8.0.1:3306          
> > CLOSE_WAIT
> > 
> > serverA# cat firewall
> > Feb 17 16:21:49 www kernel: [6587053.325075] SFW2-OUT-ERROR IN= OUT=tun0
> > SRC=10.8.0.1 DST=10.8.0.58 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF
> > PROTO=TCP SPT=3306 DPT=47455 WINDOW=0 RES=0x00 RST URGP=0
> > 
> > Does anybody have an idea why this happens? How can I avoid this or
> > investigate in this? Is this a know issue?
> 
> Is the underlying OS for servers B & C exactly the same? Down to
> kernel version (if Linux/Unix), NICs and driver version,
> configurations, etc.?  It would help if specify OS type and kernel
> version.

No, client B and C have different OS versions. You are right this can be a 
reason too. Do you have any hints how I can trace that down?

Details client B (newer OS with CLOSE_WAIT problems):
$ uname -a
Linux www3 3.1.9-1.4-default #1 SMP Fri Jan 27 08:55:10 UTC 2012 (efb5ff4) 
x86_64 x86_64 x86_64 GNU/Linux
$ mysql --version
mysql  Ver 14.14 Distrib 5.5.16, for Linux (x86_64) using readline 6.2
$ ethtool -i eth0
driver: r8169
version: 2.3LK-NAPI
firmware-version: rtl_nic/rtl8168e-2.fw
bus-info: 0000:04:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes

Details client C:
$ uname -a
Linux www13 2.6.34.10-0.4-default #1 SMP 2011-10-19 22:16:41 +0200 x86_64 
x86_64 x86_64 GNU/Linux
$ mysql --version
mysql  Ver 14.14 Distrib 5.1.57, for suse-linux-gnu (x86_64) using readline 
6.1
$ ethtool -i eth0
driver: r8169
version: 2.3LK-NAPI
firmware-version: 
bus-info: 0000:04:00.0

Server A:
Linux www 3.1.9-1.4-default #1 SMP Fri Jan 27 08:55:10 UTC 2012 (efb5ff4) 
x86_64 x86_64 x86_64 GNU/Linux
$ mysql --version
mysql  Ver 14.14 Distrib 5.5.16, for Linux (x86_64) using readline 6.2
$ ethtool -i eth0
driver: r8169
version: 2.3LK-NAPI
firmware-version: rtl_nic/rtl8168e-2.fw
bus-info: 0000:04:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes

I also have set wait_timeout 45 in my.cnf on server A and mysqli.reconnect On 
on client B and C in php.ini.

--- End Message ---
--- Begin Message ---
Good morning PHP groupies!

I am off on my next tangent now and I have not really thought about this too much yet but have you seen a method to convert a nested unordered list into JSON using PHP?

Thanks!

Jay

--- End Message ---
--- Begin Message ---
On 5 Mar 2012, at 15:50, Jay Blanchard wrote:

> I am off on my next tangent now and I have not really thought about this too 
> much yet but have you seen a method to convert a nested unordered list into 
> JSON using PHP?

There's a very useful search function for the PHP manual on the PHP site. 
Typing json into that would have got you to http://php.net/json_encode. If that 
can't natively handle your variable type then you'll need to massage the data 
into simple types first.

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
On 3/5/2012 9:53 AM, Stuart Dallas wrote:
On 5 Mar 2012, at 15:50, Jay Blanchard wrote:

I am off on my next tangent now and I have not really thought about this too 
much yet but have you seen a method to convert a nested unordered list into 
JSON using PHP?
There's a very useful search function for the PHP manual on the PHP site. 
Typing json into that would have got you to http://php.net/json_encode. If that 
can't natively handle your variable type then you'll need to massage the data 
into simple types first.

Stuart I have RTFM, I was hoping that someone had an example handy. :)

--- End Message ---
--- Begin Message ---
On 5 Mar 2012, at 16:02, Jay Blanchard wrote:

> On 3/5/2012 9:53 AM, Stuart Dallas wrote:
>> On 5 Mar 2012, at 15:50, Jay Blanchard wrote:
>> 
>>> I am off on my next tangent now and I have not really thought about this 
>>> too much yet but have you seen a method to convert a nested unordered list 
>>> into JSON using PHP?
>> There's a very useful search function for the PHP manual on the PHP site. 
>> Typing json into that would have got you to http://php.net/json_encode. If 
>> that can't natively handle your variable type then you'll need to massage 
>> the data into simple types first.
>> 
> Stuart I have RTFM, I was hoping that someone had an example handy. :)

$json = json_encode($nested_unordered_list);

As I said, whether that works or not depends on what type 
$nested_unordered_list is. If it's not made of standard types you'll need to 
massage it into a structure using standard types.

:D

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
[snip]
$json = json_encode($nested_unordered_list); As I said, whether that works or not depends on what type $nested_unordered_list is. If it's not made of standard types you'll need to massage it into a structure using standard types. :D
[/snip]

Stewie, Stewie, Stewie..... :)

So what you're saying is that I will need to turn the nested unordered list into an array? Because an array would more accurately represent the data.
--- End Message ---
--- Begin Message ---
On 5 Mar 2012, at 16:24, Jay Blanchard wrote:

> [snip]
> $json = json_encode($nested_unordered_list); As I said, whether that works or 
> not depends on what type $nested_unordered_list is. If it's not made of 
> standard types you'll need to massage it into a structure using standard 
> types. :D
> [/snip]
> 
> Stewie, Stewie, Stewie..... :)

Bla, Bla, Bla….. :)

> So what you're saying is that I will need to turn the nested unordered list 
> into an array? Because an array would more accurately represent the data.

Difficult to answer without knowing how your data is currently stored. Gimme a 
var_dump or var_export of your data and I'll be able to give you an answer.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
"Jay Blanchard" <jay.blanch...@sigmaphinothing.org> wrote in message 
news:4f54e388.7010...@sigmaphinothing.org...
> On 3/5/2012 9:53 AM, Stuart Dallas wrote:
>> On 5 Mar 2012, at 15:50, Jay Blanchard wrote:
>>
>>> I am off on my next tangent now and I have not really thought about this 
>>> too much yet but have you seen a method to convert a nested unordered 
>>> list into JSON using PHP?
>> There's a very useful search function for the PHP manual on the PHP site. 
>> Typing json into that would have got you to http://php.net/json_encode. 
>> If that can't natively handle your variable type then you'll need to 
>> massage the data into simple types first.
>>
> Stuart I have RTFM, I was hoping that someone had an example handy. :)

Jay,
Sounds like your tangents are efforts to accomplish things that you know too 
little about and don't want to spend too much time getting acquainted with. 
To borrow from your crude response to Mr. Dallas:  You may have RTFM, now 
try DTFW.  :)



--- End Message ---
--- Begin Message ---
[snip]
Difficult to answer without knowing how your data is currently stored. Gimme a var_dump or var_export of your data and I'll be able to give you an answer. -Stuart
[/snip]

It is an unordered nested list as in the following example -

<ul>
<li>foo</li>
<li>bar
<ul>
<li>glorp</li>
</ul>
</li>
</ul>


--- End Message ---
--- Begin Message ---
[snip]
Sounds like your tangents are efforts to accomplish things that you know too little about and don't want to spend too much time getting acquainted with. To borrow from your crude response to Mr. Dallas: You may have RTFM, now try DTFW. :)
[/snip]

Seriously Jim? I have been a member and contributor to this very list for a very long time. I do know about my tangents and I am quite acquainted with what is entailed but hoping that the community might have some insight that would cause me to look at things in a fresh light.

I appreciate your rude response to my rude response. You are quite clever :)


--- End Message ---
--- Begin Message ---
On 5 Mar 2012, at 16:45, Jay Blanchard wrote:

> [snip]
> Difficult to answer without knowing how your data is currently stored. Gimme 
> a var_dump or var_export of your data and I'll be able to give you an answer. 
> -Stuart
> [/snip]
> 
> It is an unordered nested list as in the following example -
> 
> <ul>
> <li>foo</li>
> <li>bar
> <ul>
> <li>glorp</li>
> </ul>
> </li>
> </ul>

Ahh, the list is in an HTML document, suddenly it all becomes clear. 
DOMDocument is probably your best bet here. Other HTML parsers are also 
available.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
[snip]
Ahh, the list is in an HTML document, suddenly it all becomes clear. DOMDocument is probably your best bet here. Other HTML parsers are also available. -Stuart
[/snip]

Ah! Thanks for the heads up on that Stuart - I'll start my work there this afternoon.


--- End Message ---
--- Begin Message ---
An appl that has been working fine for a year now and fine up through last 
week, suddenly is not working on my iphone.  The only differences between 
using it on a pc, ipad or iphone are for font sizes and such (handled by JS) 
so I'm puzzled as to what is going on.  I do the same exact thing on each of 
these 3 devices and the iphone fails.  The specifics are : I'm entering a 
date into an input field and php is supposed to retrieve it and display a 
record that is retrieved using that input.  The iphone for some reason is 
not getting my input (passed via POST) correctly, yet it's the same script 
being run for each device.

Trying not to paranoid, but does anyone think that Apple could have done 
something to my iphone in the last few days? 



--- End Message ---
--- Begin Message ---
On 5 Mar 2012, at 17:16, Jim Giner wrote:

> An appl that has been working fine for a year now and fine up through last 
> week, suddenly is not working on my iphone.  The only differences between 
> using it on a pc, ipad or iphone are for font sizes and such (handled by JS) 
> so I'm puzzled as to what is going on.  I do the same exact thing on each of 
> these 3 devices and the iphone fails.  The specifics are : I'm entering a 
> date into an input field and php is supposed to retrieve it and display a 
> record that is retrieved using that input.  The iphone for some reason is 
> not getting my input (passed via POST) correctly, yet it's the same script 
> being run for each device.
> 
> Trying not to paranoid, but does anyone think that Apple could have done 
> something to my iphone in the last few days? 

Of all the possible things that could have happened in order of likelihood, 
that's sandwiched between aliens having taken over your phone and the ghost of 
Steve Jobs up to mischief!

Have you debugged the code to see what your script is receiving from Safari? If 
not then I respectfully refer you to the advice you recently gave Jay.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
"Stuart Dallas" <stu...@3ft9.com> wrote in message 
news:a42f15bf-48a9-4118-bef5-ebc374fcb...@3ft9.com...
On 5 Mar 2012, at 17:16, Jim Giner wrote:

> An appl that has been working fine for a year now and fine up through last
> week, suddenly is not working on my iphone.  The only differences between
> using it on a pc, ipad or iphone are for font sizes and such (handled by 
> JS)
> so I'm puzzled as to what is going on.  I do the same exact thing on each 
> of
> these 3 devices and the iphone fails.  The specifics are : I'm entering a
> date into an input field and php is supposed to retrieve it and display a
> record that is retrieved using that input.  The iphone for some reason is
> not getting my input (passed via POST) correctly, yet it's the same script
> being run for each device.
>
> Trying not to paranoid, but does anyone think that Apple could have done
> something to my iphone in the last few days?

Of all the possible things that could have happened in order of likelihood, 
that's sandwiched between aliens having taken over your phone and the ghost 
of Steve Jobs up to mischief!

Have you debugged the code to see what your script is receiving from Safari? 
If not then I respectfully refer you to the advice you recently gave Jay.

-Stuart

Actually, I have been working on it for about 4 hours now.  Very simple 
script (like all of mine) that is working rock solid on 2 out of 3 boxes. 
In the last few mins I re-booted my phone and it is now doing something even 
worse!  As I fill in the date field using the iphone, the chars are showing 
up in the field onscreen.  But - once I close the keyboard (not submit)  - 
the input field reverts to ONLY one character!  This also happens if I hit 
the Next button on the keyboard to advance to the next input field.  And it 
is that character that my php script then receives when I do submit the 
form.  I have no code anywhere that addresses the input fields with JS so 
it's not something that I have 'forgotten' about - it is totally new and 
strange behavior.  And no, google has nothing to say about this (yet). 



--- End Message ---
--- Begin Message ---
On Mar 5, 2012, at 12:30, "Jim Giner" <jim.gi...@albanyhandball.com> wrote:
 
Download dolphin browser, it's a free safari replacement using webkit. Try you 
app in there and post back the results.

Mike Mackintosh
ZCE PHP5.3
www.highonphp.com

--- End Message ---
--- Begin Message --- [snip]In the last few mins I re-booted my phone and it is now doing something even worse! [/snip]

Have you also cleared the cache and the cookies?

You can also add Firebug to your iPhone - http://www.iphone-my.com/ipad/geting-firebug-iphone-ipad/
--- End Message ---
--- Begin Message ---
"Jay Blanchard" <jay.blanch...@sigmaphinothing.org> wrote in message 
news:4f54faf8.4030...@sigmaphinothing.org...
> [snip]In the last few mins I re-booted my phone and it is now doing 
> something even worse! [/snip]
>
> Have you also cleared the cache and the cookies?
>
> You can also add Firebug to your iPhone - 
> http://www.iphone-my.com/ipad/geting-firebug-iphone-ipad/

No - I didn't go that far, but I can.  More testing has revealed that Safari 
running on my PC also doesn't like to accept the date I'm inputting.  As 
soon as I tab off the field, it changes itself to whatever my first two 
digits were. 



--- End Message ---
--- Begin Message ---
On Mar 5, 2012, at 12:52, "Jim Giner" <jim.gi...@albanyhandball.com> wrote:

> 
> "Jay Blanchard" <jay.blanch...@sigmaphinothing.org> wrote in message 
> news:4f54faf8.4030...@sigmaphinothing.org...
>> [snip]In the last few mins I re-booted my phone and it is now doing 
>> something even worse! [/snip]
>> 
>> Have you also cleared the cache and the cookies?
>> 
>> You can also add Firebug to your iPhone - 
>> http://www.iphone-my.com/ipad/geting-firebug-iphone-ipad/
> 
> No - I didn't go that far, but I can.  More testing has revealed that Safari 
> running on my PC also doesn't like to accept the date I'm inputting.  As 
> soon as I tab off the field, it changes itself to whatever my first two 
> digits were. 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

Is your input an HTML 5 date time field?

--- End Message ---
--- Begin Message ---
On Mar 5, 2012, at 9:52 AM, Jim Giner wrote:

> 
> "Jay Blanchard" <jay.blanch...@sigmaphinothing.org> wrote in message 
> news:4f54faf8.4030...@sigmaphinothing.org...
>> [snip]In the last few mins I re-booted my phone and it is now doing 
>> something even worse! [/snip]
>> 
>> Have you also cleared the cache and the cookies?
>> 
>> You can also add Firebug to your iPhone - 
>> http://www.iphone-my.com/ipad/geting-firebug-iphone-ipad/
> 
> No - I didn't go that far, but I can.  More testing has revealed that Safari 
> running on my PC also doesn't like to accept the date I'm inputting.  As 
> soon as I tab off the field, it changes itself to whatever my first two 
> digits were. 

Do you have a maxlength set by accident?

--- End Message ---
--- Begin Message ---

----- Original Message ----- From: "Mari Masuda" <mari.mas...@stanford.edu>
To: "Jim Giner" <jim.gi...@albanyhandball.com>
Cc: <php-gene...@lists.php.net>
Sent: Monday, March 05, 2012 12:57 PM
Subject: Re: [PHP] iphone & php


On Mar 5, 2012, at 9:52 AM, Jim Giner wrote:


"Jay Blanchard" <jay.blanch...@sigmaphinothing.org> wrote in message
news:4f54faf8.4030...@sigmaphinothing.org...
[snip]In the last few mins I re-booted my phone and it is now doing
something even worse! [/snip]

Have you also cleared the cache and the cookies?

You can also add Firebug to your iPhone -
http://www.iphone-my.com/ipad/geting-firebug-iphone-ipad/

No - I didn't go that far, but I can. More testing has revealed that Safari
running on my PC also doesn't like to accept the date I'm inputting.  As
soon as I tab off the field, it changes itself to whatever my first two
digits were.

Do you have a maxlength set by accident?

No. As I said - this appl is a year old and works fine. Or did work. See next post for solution.



--- End Message ---
--- Begin Message ---
""Jim Giner"" <jim.gi...@albanyhandball.com> wrote in message 
news:35.42.35539.06df4...@pb1.pair.com...
>
> "Jay Blanchard" <jay.blanch...@sigmaphinothing.org> wrote in message 
> news:4f54faf8.4030...@sigmaphinothing.org...
>> [snip]In the last few mins I re-booted my phone and it is now doing 
>> something even worse! [/snip]
>>
>> Have you also cleared the cache and the cookies?
>>
>> You can also add Firebug to your iPhone - 
>> http://www.iphone-my.com/ipad/geting-firebug-iphone-ipad/
>
> No - I didn't go that far, but I can.  More testing has revealed that 
> Safari running on my PC also doesn't like to accept the date I'm 
> inputting.  As soon as I tab off the field, it changes itself to whatever 
> my first two digits were.
>

Okay - here's the scoop - although this is not the forum for it.

Ipads and Iphones respect an html input tag's type="number" attribute in 
order to trigger the device's different keyboard configurations.  This is a 
neat trick that I found on a couple of apple-related sites and has been 
working fine.  I just now removed that from my code that generates the html 
and Voila - problem gone.  Apparently Safari has been modified recently is 
my guess. 



--- End Message ---
--- Begin Message ---

Jim Giner <jim.gi...@albanyhandball.com> wrote:

>
>""Jim Giner"" <jim.gi...@albanyhandball.com> wrote in message
>news:35.42.35539.06df4...@pb1.pair.com...
>>
>> "Jay Blanchard" <jay.blanch...@sigmaphinothing.org> wrote in message
>> news:4f54faf8.4030...@sigmaphinothing.org...
>>> [snip]In the last few mins I re-booted my phone and it is now doing
>>> something even worse! [/snip]
>>>
>>> Have you also cleared the cache and the cookies?
>>>
>>> You can also add Firebug to your iPhone -
>>> http://www.iphone-my.com/ipad/geting-firebug-iphone-ipad/
>>
>> No - I didn't go that far, but I can.  More testing has revealed that
>
>> Safari running on my PC also doesn't like to accept the date I'm
>> inputting.  As soon as I tab off the field, it changes itself to
>whatever
>> my first two digits were.
>>
>
>Okay - here's the scoop - although this is not the forum for it.
>
>Ipads and Iphones respect an html input tag's type="number" attribute
>in
>order to trigger the device's different keyboard configurations.  This
>is a
>neat trick that I found on a couple of apple-related sites and has been
>
>working fine.  I just now removed that from my code that generates the
>html
>and Voila - problem gone.  Apparently Safari has been modified recently
>is
>my guess.
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

What format was your date in? It was my understanding that only numerical 
characters with a preceeeding sign and decimal point was allowed? I would 
expect a date to be in the form dd/mm/yyyy or dd-mm-yyyy (allowing for swapping 
months and days of course) but neither is a valid number.

Thanks,
Ash
http://ashleysheridan.co.uk

--- End Message ---
--- Begin Message ---
"Ashley Sheridan" <a...@ashleysheridan.co.uk> wrote in message 
news:caba1578-d923-4fa8-b824-db8f5ffea...@email.android.com...


Jim Giner <jim.gi...@albanyhandball.com> wrote:

>
>""Jim Giner"" <jim.gi...@albanyhandball.com> wrote in message
>news:35.42.35539.06df4...@pb1.pair.com...
>>
>> "Jay Blanchard" <jay.blanch...@sigmaphinothing.org> wrote in message
>> news:4f54faf8.4030...@sigmaphinothing.org...
>>> [snip]In the last few mins I re-booted my phone and it is now doing
>>> something even worse! [/snip]
>>>
>>> Have you also cleared the cache and the cookies?
>>>
>>> You can also add Firebug to your iPhone -
>>> http://www.iphone-my.com/ipad/geting-firebug-iphone-ipad/
>>
>> No - I didn't go that far, but I can.  More testing has revealed that
>
>> Safari running on my PC also doesn't like to accept the date I'm
>> inputting.  As soon as I tab off the field, it changes itself to
>whatever
>> my first two digits were.
>>
>
>Okay - here's the scoop - although this is not the forum for it.
>
>Ipads and Iphones respect an html input tag's type="number" attribute
>in
>order to trigger the device's different keyboard configurations.  This
>is a
>neat trick that I found on a couple of apple-related sites and has been
>
>working fine.  I just now removed that from my code that generates the
>html
>and Voila - problem gone.  Apparently Safari has been modified recently
>is
>my guess.
>
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

What format was your date in? It was my understanding that only numerical 
characters with a preceeeding sign and decimal point was allowed? I would 
expect a date to be in the form dd/mm/yyyy or dd-mm-yyyy (allowing for 
swapping months and days of course) but neither is a valid number.

Thanks,
Ash
http://ashleysheridan.co.uk

My entry is valid - mm/dd/yyyy.  Works great on teh ipad, not the iphone 



--- End Message ---
--- Begin Message ---
On 5 Mar 2012, at 18:12, Jim Giner wrote:
>>> Okay - here's the scoop - although this is not the forum for it.
>>> 
>>> Ipads and Iphones respect an html input tag's type="number" attribute
>>> in
>>> order to trigger the device's different keyboard configurations.  This
>>> is a
>>> neat trick that I found on a couple of apple-related sites and has been
>>> 
>>> working fine.  I just now removed that from my code that generates the
>>> html
>>> and Voila - problem gone.  Apparently Safari has been modified recently
>>> is
>>> my guess.
>>> 
>>> 
>>> 
>>> -- 
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> What format was your date in? It was my understanding that only numerical 
>> characters with a preceeeding sign and decimal point was allowed? I would 
>> expect a date to be in the form dd/mm/yyyy or dd-mm-yyyy (allowing for 
>> swapping months and days of course) but neither is a valid number.
>> 
>> Thanks,
>> Ash
>> http://ashleysheridan.co.uk
> 
> My entry is valid - mm/dd/yyyy.  Works great on teh ipad, not the iphone 


I might be wrong, but I think Ash was actually asking why the hell a date field 
had that type attribute set to number. That's just messed up!!

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
Solution!

Found this post from last Fall.  Didn't experience the problem because my 
appl is a NASCAR one and the season ended before this problem was created, 
apparently by an Apple update on my phone.

Here's a link to the story: 
https://discussions.apple.com/thread/3408352?tstart=0

To summarize - apparently ios 5.0 changed how the number attribute works on 
an input tag.  Now it sees any input using that feature as a purely numeric 
field which in my case causes my date entry to be truncated once the first 
slash was hit.  Now that I'm using my appl with the start of the new season, 
I'm running into it.

Thanks for all the interest and help. 



--- End Message ---
--- Begin Message ---
"Stuart Dallas" <stu...@3ft9.com> wrote in message 
news:797e930f-368c-43d1-8159-9608b6d53...@3ft9.com...
On 5 Mar 2012, at 18:12, Jim Giner wrote:
>>> Okay - here's the scoop - although this is not the forum for it.
>>>
>>> Ipads and Iphones respect an html input tag's type="number" attribute
>>> in
>>> order to trigger the device's different keyboard configurations.  This
>>> is a
>>> neat trick that I found on a couple of apple-related sites and has been
>>>
>>> working fine.  I just now removed that from my code that generates the
>>> html
>>> and Voila - problem gone.  Apparently Safari has been modified recently
>>> is
>>> my guess.
>>>
>>>
>>>
>>> -- 
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>> What format was your date in? It was my understanding that only numerical
>> characters with a preceeeding sign and decimal point was allowed? I would
>> expect a date to be in the form dd/mm/yyyy or dd-mm-yyyy (allowing for
>> swapping months and days of course) but neither is a valid number.
>>
>> Thanks,
>> Ash
>> http://ashleysheridan.co.uk
>
> My entry is valid - mm/dd/yyyy.  Works great on teh ipad, not the iphone


I might be wrong, but I think Ash was actually asking why the hell a date 
field had that type attribute set to number. That's just messed up!!

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

Cause it triggers the iphone to pop up a non-alpha keyboard which makes 
entering a data field easier (you don't have to explicitly switch to it with 
a keypress).  The default kyb is an all-alpha one.



--- End Message ---
--- Begin Message ---
And if you change your input type to "date", because it's a date, does
that bring up the numeric keys as well?

--- End Message ---
--- Begin Message ---
"Marc Guay" <marc.g...@gmail.com> wrote in message 
news:CAL0DAJq0y-iOMvt4Ko+D4Z_t+oo3PT9SYmR+9foa=9q9gsr...@mail.gmail.com...
> And if you change your input type to "date", because it's a date, does
 that bring up the numeric keys as well?

actually I have not seen anything that suggests that is a possible option. 
I am about to test something that I just received from Apple tho......



--- End Message ---

Reply via email to