php-general Digest 28 Mar 2009 04:27:29 -0000 Issue 6036

2009-03-27 Thread php-general-digest-help
php-general Digest 28 Mar 2009 04:27:29 - Issue 6036 Topics (messages 290755 through 290782): Re: Regex 290755 by: Jesse.Hazen.arvatousa.com Regex help please 290756 by: Shawn McKenzie 290759 by: haliphax 290762 by: Shawn McKenzie Re: flushing AJAX scripts

Re: [PHP] Regex

2009-03-27 Thread Jochem Maas
jesse.ha...@arvatousa.com schreef: Hi, Brand new to regex. So I have a cli which runs a regex on users input, to make sure that only 0-9 and A-Z are accepted. It should strip everything else. My problem is that when you press control-Z (on Windows; I have not yet tested this on linux,

[PHP] WHILE LOOP PROBLEM

2009-03-27 Thread Andrew Williams
can some tell why the below loop stop running after some time. $start=10; const run=0; while($start run){ //do somthing } -- Best Wishes Andrew Williams

Re: [PHP] WHILE LOOP PROBLEM

2009-03-27 Thread Craig Whitmore
On Fri, 2009-03-27 at 08:11 +, Andrew Williams wrote: can some tell why the below loop stop running after some time. $start=10; const run=0; while($start run){ //do somthing } max_execution_time -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] PHP and making a ZIP file

2009-03-27 Thread Ashley Sheridan
On Fri, 2009-03-27 at 16:11 +1100, Chris wrote: Ron Piggott wrote: Does anyone know how to make a ZIP file using PHP? This is for an application where the files the user selected will be put into a ZIP file and then the ZIP file made available for download. Ron http://www.php.net/zip

[PHP] Exporting text with chinese characters in CSV

2009-03-27 Thread Ai Leen
Hi Everyone, I need to export data from database with UTF-8 encoding to an csv file. I am outputing html tables with the Content Type set to msexcel. The chinese texts came out as symbols. I tried using mb_convert_encoding the text from UTF-8 to UTF-16LE iconv from UTF8 to gb2312 iconv from

RE: [PHP] WHILE LOOP PROBLEM

2009-03-27 Thread Arno Kuhl
-Original Message- From: Andrew Williams [mailto:andrew4willi...@gmail.com] Sent: 27 March 2009 10:12 AM To: PHP LIST Subject: [PHP] WHILE LOOP PROBLEM can some tell why the below loop stop running after some time. $start=10; const run=0; while($start run){ //do somthing } -- The

Re: [PHP] Exporting text with chinese characters in CSV

2009-03-27 Thread Ashley Sheridan
On Fri, 2009-03-27 at 17:40 +0800, Ai Leen wrote: Hi Everyone, I need to export data from database with UTF-8 encoding to an csv file. I am outputing html tables with the Content Type set to msexcel. The chinese texts came out as symbols. I tried using mb_convert_encoding the text from

RE: [PHP] flushing AJAX scripts

2009-03-27 Thread Andrea Giammarchi
Some browser would like to receive at list N characters (bytes) even if you force the flush, before the browser will show those characters. In any case, the Ajax request will not be completed until its readyState will be 4, which means the page execution on the server has finished (released, php

RE: [PHP] Regex

2009-03-27 Thread Bob McConnell
From: Nitsan Bin-Nun If you can point me on the character which control-z creates it would make it easier, I have no idea of it ;) On Thu, Mar 26, 2009 at 11:06 PM, jesse.ha...@arvatousa.com wrote: Thanks again. Sad to say, same result. The second option looped an error: Warning:

[PHP] php5activescript.dll

2009-03-27 Thread Robert Johnson
I've been trying to locate this file and could not find it in the downloads area and got this message when I tried - http://pecl4win.php.net/ The pecl4win build box is temporarily out of service. We're preparing a new build system. Any suggestions? Thanks.

[PHP] Error printer_open()

2009-03-27 Thread Gerardo Picotti
Hi. I'm trying to use the printer functions in my php development. I add the php_printer.dll in the c:/php/ext/ path. I add the line in the php.ini file like that: extension=php_printer.dll. But that doesn't work and gives the next error: Fatal error: Call to undefined function printer_open().

Re: [PHP] Error printer_open()

2009-03-27 Thread Bastien Koert
On Fri, Mar 27, 2009 at 8:37 AM, Gerardo Picotti gpico...@erio.com.arwrote: Hi. I'm trying to use the printer functions in my php development. I add the php_printer.dll in the c:/php/ext/ path. I add the line in the php.ini file like that: extension=php_printer.dll. But that doesn't work and

Re: [PHP] Multiple cookies on the same computer

2009-03-27 Thread Ken Watkins
On 3/26/2009 at 11:12 PM, in message 70.12.30978.2144c...@pb1.pair.com, Shawn McKenzie nos...@mckenzies.net wrote: Shawn McKenzie wrote: Ken Watkins wrote: Hi all. Newbie here. I have set up a blog site where my family creates posts and they get emailed to members of the family. To keep

RE: [PHP] Regex

2009-03-27 Thread Jesse.Hazen
Jochem, Thanks, but this regex did not seem to work for me. At least, not on Windows. I will not be able to test on linux for a few hours. I spoke too soon yesterday, too. Control-Z is a problem on Windows, and not on Linux. However, on linux, control-D is a problem. Thanks, Jesse

Re: [PHP] Multiple cookies on the same computer

2009-03-27 Thread Ken Watkins
On 3/26/2009 at 10:24 PM, in message 0a88dc6e-0655-4565-b9a7-e21337fc0...@bluerodeo.com, dg dane...@bluerodeo.com wrote: On Mar 26, 2009, at 7:14 PM, Ken Watkins wrote: To keep up with their identities, I created a script for each family member to run (dad.php, mom.php, etc.), and it

RE: [PHP] Regex

2009-03-27 Thread Jesse.Hazen
Bruce, Sure thing. So basically what I am trying to accomplish is when this script runs, a menu is displayed to the user, it looks somewhat like this: Welcome To continue, please select your game mode. [Mode] [Description] A.) Mode A B.) Mode B

Re: [PHP] Error printer_open()

2009-03-27 Thread Gerardo Picotti
Yes, dll file exists in this folder: C:\PHP\EXT Bastien Koert escribió: On Fri, Mar 27, 2009 at 8:37 AM, Gerardo Picotti gpico...@erio.com.ar mailto:gpico...@erio.com.ar wrote: Hi. I'm trying to use the printer functions in my php development. I add the php_printer.dll in the

[PHP] Re: Error printer_open()

2009-03-27 Thread Shawn McKenzie
Gerardo Picotti wrote: Hi. I'm trying to use the printer functions in my php development. I add the php_printer.dll in the c:/php/ext/ path. I add the line in the php.ini file like that: extension=php_printer.dll. But that doesn't work and gives the next error: Fatal error: Call to

Re: [PHP] Multiple cookies on the same computer

2009-03-27 Thread Shawn McKenzie
Ken Watkins wrote: On 3/26/2009 at 11:12 PM, in message 70.12.30978.2144c...@pb1.pair.com, Shawn McKenzie nos...@mckenzies.net wrote: Shawn McKenzie wrote: Ken Watkins wrote: Hi all. Newbie here. I have set up a blog site where my family creates posts and they get emailed to members of

RE: [PHP] Regex

2009-03-27 Thread Jesse.Hazen
Jochem, To be more specific, the error I get when using this regex is No ending delimiter '/' found Thanks, Jesse Hazen -Original Message- From: Jochem Maas [mailto:joc...@iamjochem.com] Sent: Thursday, March 26, 2009 11:45 PM To: Hazen, Jesse, arvato digital services llc Cc:

[PHP] Regex help please

2009-03-27 Thread Shawn McKenzie
I'm normally OK with regex, especially if I fiddle with it long enough, however I have fiddled with this one so long that I'm either totally missing it or it's something simple. Does it have anything to do with the backref, or the fact that the value of the backref has a $? I have: $out = '

Re: RE: [PHP] flushing AJAX scripts

2009-03-27 Thread jim white
My page submits the AJAX request to complete a report that takes some time, and upon completion stores results in a database. A second AJAX request polls every 5 seconds and queries the database if the report is ready. This hopefully will get around any timeout problems I am having with a long

RE: [PHP] flushing AJAX scripts

2009-03-27 Thread Andrea Giammarchi
Sorry, Kim, but why on earth you are polling with a second request to know when the first one has finished? I mean, when the first request inserts data in the database that's it, you'll manage the end of the request. $A --- do stuff; do stuff; do stuff; report ready; $B --- report ready? $B

Re: [PHP] Regex help please

2009-03-27 Thread haliphax
On Fri, Mar 27, 2009 at 9:40 AM, Shawn McKenzie nos...@mckenzies.net wrote: I'm normally OK with regex, especially if I fiddle with it long enough, however I have fiddled with this one so long that I'm either totally missing it or it's something simple.  Does it have anything to do with the

RE: [PHP] flushing AJAX scripts

2009-03-27 Thread Andrea Giammarchi
Sorry Jim, I meant Jim when I wrote Kim ... and Phico: http://webreflection.blogspot.com/2008/04/phomet-changes-name-so-welcome-phico.html Regards From: an_...@hotmail.com To: php-general@lists.php.net Date: Fri, 27 Mar 2009 15:55:28 +0100 Subject: RE: [PHP] flushing AJAX scripts

Re: [PHP] utf-8-safe replacement for strtr()?

2009-03-27 Thread Tom Worster
On 3/26/09 11:36 AM, Nisse Engström news.nospam.0ixbt...@luden.se wrote: On Wed, 25 Mar 2009 11:32:42 +0100, Nisse Engström wrote: On Tue, 24 Mar 2009 08:15:35 -0400, Tom Worster wrote: strtr() with three parameters is certainly unsafe. but my tests are showing that it may be ok with two

Re: [PHP] Regex help please

2009-03-27 Thread Shawn McKenzie
haliphax wrote: On Fri, Mar 27, 2009 at 9:40 AM, Shawn McKenzie nos...@mckenzies.net wrote: I'm normally OK with regex, especially if I fiddle with it long enough, however I have fiddled with this one so long that I'm either totally missing it or it's something simple. Does it have anything

Re: [PHP] Multiple cookies on the same computer

2009-03-27 Thread Ken Watkins
On 3/27/2009 at 10:19 AM, in message 6f.57.30978.d60ec...@pb1.pair.com, Shawn McKenzie nos...@mckenzies.net wrote: Optionally, I just thought that if this was too much for them to do/remember, they could have their own bookmarks, like Dad - Yoursite

Re: [PHP] Multiple cookies on the same computer

2009-03-27 Thread Ashley Sheridan
On Fri, 2009-03-27 at 09:59 -0400, Ken Watkins wrote: On 3/26/2009 at 10:24 PM, in message 0a88dc6e-0655-4565-b9a7-e21337fc0...@bluerodeo.com, dg dane...@bluerodeo.com wrote: On Mar 26, 2009, at 7:14 PM, Ken Watkins wrote: To keep up with their identities, I created a script for

[PHP] fpdf adding font error

2009-03-27 Thread Thodoris
Hello gang, I know this is not an fpdf mailing list but if anyone has experience on the matter please help. I am working on a pdf generation part of a project and I am using fpdf to generate them. The content of the pdf needs to be in greek. But I am having difficulties to get the pdf

Re: [PHP] php5activescript.dll

2009-03-27 Thread Jacques Manukyan
The site is under maintenance. You could wait or download it from: http://kromann.info/download.php?strFolder=php5_1-Release_TSstrIndex=PHP5_1 Note that I do not know of the validity of that site so have your antivirus program ready. -- Jacques Manukyan Robert Johnson wrote: I've been

Re: [PHP] Multiple cookies on the same computer

2009-03-27 Thread Ken Watkins
On 3/27/2009 at 11:15 AM, in message 1238166938.3522.5.ca...@localhost.localdomain, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Fri, 2009-03-27 at 09:59 -0400, Ken Watkins wrote: On 3/26/2009 at 10:24 PM, in message 0a88dc6e-0655-4565-b9a7-e21337fc0...@bluerodeo.com, dg

Re: [PHP] Exporting text with chinese characters in CSV

2009-03-27 Thread Michael Shadle
The php script language has no bearing on the output unless you have characters In the php file itself. We had some issue like this at work. They found a way using iconv to to it but had to change because redhats iconv isn't updated. They do something with saving the output to a utf8

[PHP] hierarchies

2009-03-27 Thread PJ
I do have a bit of a problem which has not been clearly explained in the suggestions to my previous posts and that is the question of hierarchies. I have not yet understood how to include a file anywhere in a directory tree and have it point to the right file which may be in the top directory or,

Re: [PHP] hierarchies

2009-03-27 Thread Jason Pruim
PJ wrote: I do have a bit of a problem which has not been clearly explained in the suggestions to my previous posts and that is the question of hierarchies. I have not yet understood how to include a file anywhere in a directory tree and have it point to the right file which may be in the top

[PHP] pdflib greek problem

2009-03-27 Thread Thodoris
Hi, I am trying the following code to generate a pdf: try { // Create a new pdf handler $pdf = new PDFlib(); // open new PDF file if ($pdf-begin_document(, ) == 0) { die(Error: . $p-get_errmsg()); } // Set some info to the new pdf

Re: [PHP] hierarchies

2009-03-27 Thread PJ
Jason Pruim wrote: PJ wrote: I do have a bit of a problem which has not been clearly explained in the suggestions to my previous posts and that is the question of hierarchies. I have not yet understood how to include a file anywhere in a directory tree and have it point to the right file

[PHP] Re: fpdf adding font error

2009-03-27 Thread Tony Marston
If you want to use UTF-8 fonts with FPDF then switch to TCPDF (www.tcpdf.org) -- Tony Marston http://www.tonymarston.net http://www.radicore.org Thodoris t...@kinetix.gr wrote in message news:49ccee54.80...@kinetix.gr... Hello gang, I know this is not an fpdf mailing list but if anyone

Re: [PHP] hierarchies

2009-03-27 Thread Jason Pruim
PJ wrote: Jason Pruim wrote: PJ wrote: I do have a bit of a problem which has not been clearly explained in the suggestions to my previous posts and that is the question of hierarchies. I have not yet understood how to include a file anywhere in a directory tree and have it point to

[PHP] validating and sanitizing input string encoding

2009-03-27 Thread Tom Worster
the article at http://devlog.info/2008/08/24/php-and-unicode-utf-8, among other web pages, suggests checking for valid utf-8 string encoding using (strlen($str) !preg_match('/^.{1}/us', $str)). however, another article, http://www.phpwact.org/php/i18n/charsets, says this cannot be trusted. i work

Re: [PHP] hierarchies

2009-03-27 Thread Shawn McKenzie
PJ wrote: Not quite, but interesting option. This would be fine on my local intranet, if needed; but I don't think this would be allowed on a virtual hosted site. Actually, my problem is to use a header.php (for example) in pages in the webroot directory or any directory within (or under)

[PHP] SESSION values show up days later!

2009-03-27 Thread Mary Anderson
Hi all, I use session variables to store values from one page to another on my website. Alas, sometimes, but not always, the values persist from one invocation of the script to another! Just how, exactly, do I make them go away when a user exits the program? I assume my users will not

Re: [PHP] SESSION values show up days later!

2009-03-27 Thread Tom Worster
On 3/27/09 5:39 PM, Mary Anderson maryf...@demog.berkeley.edu wrote: Hi all, I use session variables to store values from one page to another on my website. Alas, sometimes, but not always, the values persist from one invocation of the script to another! Just how, exactly, do I

Re: [PHP] Multiple cookies on the same computer

2009-03-27 Thread Michael A. Peters
Ken Watkins wrote: Hi all. Newbie here. I have set up a blog site where my family creates posts and they get emailed to members of the family. To keep up with their identities, I created a script for each family member to run (dad.php, mom.php, etc.), and it sets a cookie on each computer

Re: [PHP] pdflib greek problem

2009-03-27 Thread Michael A. Peters
Thodoris wrote: Hi, I am trying the following code to generate a pdf: try { // Create a new pdf handler $pdf = new PDFlib(); // open new PDF file if ($pdf-begin_document(, ) == 0) { die(Error: . $p-get_errmsg()); } // Set some info

[PHP] Sort a multi-dimensional array on a certain key followed by another key

2009-03-27 Thread TS
Ok so, I have an array [0(index)][1st key][2nd key] Basically I don't care about the index. As a matter of fact I'd prefer it reset to still be in order afterwards. However, I need to sort the 1st key and keep correlation w the second key. Then sort on the second key. I have video volumes and

Re: [PHP] SESSION values show up days later!

2009-03-27 Thread Paul M Foster
On Fri, Mar 27, 2009 at 02:39:22PM -0700, Mary Anderson wrote: Hi all, I use session variables to store values from one page to another on my website. Alas, sometimes, but not always, the values persist from one invocation of the script to another! Just how, exactly, do I make them

Re: RE: [PHP] flushing AJAX scripts

2009-03-27 Thread jim white
Well, the point was that I had tried the first way, submitting one AJAX request and waiting for it to finish and it was timing out, probably on my firewall which it shouldn't have - but it did. The reports can take 10 seconds or 10 minutes to create. Doing it this way I can still load the

Re: [PHP] Sort a multi-dimensional array on a certain key followed by another key

2009-03-27 Thread Jim Lucas
TS wrote: Ok so, I have an array [0(index)][1st key][2nd key] Basically I don't care about the index. As a matter of fact I'd prefer it reset to still be in order afterwards. However, I need to sort the 1st key and keep correlation w the second key. Then sort on the second key. I have video