php-general Digest 24 Jun 2009 08:52:45 -0000 Issue 6192

2009-06-24 Thread php-general-digest-help
php-general Digest 24 Jun 2009 08:52:45 - Issue 6192 Topics (messages 294486 through 294506): Re: supplied argument errors 294486 by: PJ 294489 by: Lex Braun 294491 by: kranthi 294497 by: Shawn McKenzie Re: delete insert ? 294487 by: Bastien Koert

Re: [PHP] Progressbar

2009-06-24 Thread Tom Sparks
have you looked at http://postlet.com/ ? tom_a_sparks Please avoid sending me Word or PowerPoint attachments. but instead use OpenDocument File Formats or use OpenOffice http://en.wikipedia.org/wiki/OpenDocument http://en.wikipedia.org/wiki/OpenOffice.org

Re: [PHP] Progressbar

2009-06-24 Thread Nitsan Bin-Nun
You can use either perl uploading with ajax or flash uploader. For the perl - google 'uber uploader' For the flash - google 'flash uploader site:de' and get into the first it should pop up something with fancy I think.. Good luck mate! On Wed, Jun 24, 2009 at 8:20 AM, Tom Sparks

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Robert Cummings
Michael A. Peters wrote: Robert Cummings wrote: Michael A. Peters wrote: Manuel Aude wrote: I'm giving a PHP course next semester (3 hours all saturdays for 22 weeks) and I just realized that PHP 5.3 is coming very soon (2 days now!). So, my plans of teaching PHP 5.2 are starting to

[PHP] Validation data - question

2009-06-24 Thread Dušan Novaković
Hi guys, Does anyone know how to write validation for data witch contains letters such as šđčćž (those are Serbian letters)? Here is part of my code where it does validation: $admins_validation = array('name'= '/^[[:alnum:][:punct:][:space:]]{1,50}$/',

Re: [PHP] Progressbar

2009-06-24 Thread Michael A. Peters
Teun Lassche wrote: I'm making an upload script with PHP, is there a way I can show a progressbar while uploading? Yes. Assuming you are using php 5.2.x you can use the PECL extension uploadprogress. http://pecl.php.net/package/uploadprogress/ I am successfully using it with php 5.2.9 on

Re: [PHP] Validation data - question

2009-06-24 Thread Per Jessen
Dušan Novaković wrote: Hi guys, Does anyone know how to write validation for data witch contains letters such as šđčćž (those are Serbian letters)? Here is part of my code where it does validation: $admins_validation = array('name' = '/^[[:alnum:][:punct:][:space:]]{1,50}$/',

[PHP] chmod - Opertaion not permitted in ....

2009-06-24 Thread Morris
Hi all Got a problem don't know how to get in really.. simple code: ?php chmod(/aaa/bbb.php, 0777); ? and I get a warning says Operations not permitted in . Anyone met this before? I've done quite a lot reading on Google but couldn't get to it. THanks

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Michael A. Peters
Robert Cummings wrote: Michael A. Peters wrote: Robert Cummings wrote: Michael A. Peters wrote: Manuel Aude wrote: I'm giving a PHP course next semester (3 hours all saturdays for 22 weeks) and I just realized that PHP 5.3 is coming very soon (2 days now!). So, my plans of teaching PHP

Re: [PHP] chmod - Opertaion not permitted in ....

2009-06-24 Thread Michael A. Peters
Morris wrote: Hi all Got a problem don't know how to get in really.. simple code: ?php chmod(/aaa/bbb.php, 0777); ? and I get a warning says Operations not permitted in . Anyone met this before? I've done quite a lot reading on Google but couldn't get to it. THanks Many servers do

Re: [PHP] Progressbar

2009-06-24 Thread Michael A. Peters
Morris wrote: Assumed you are using form uploading, could redirect to the page itself and play a Flash while uploading. I think this is the simplest way other than putting in mass codes I open up a small window via javascript that then uses javascript and css to make a progress bar. I'll

Re: [PHP] Progressbar

2009-06-24 Thread Teun Lassche
Thanks to you all guys, I'll try to get it working! On Wed, Jun 24, 2009 at 12:24, Michael A. Peters mpet...@mac.com wrote: Morris wrote: Assumed you are using form uploading, could redirect to the page itself and play a Flash while uploading. I think this is the simplest way other than

Re: [PHP] Progressbar

2009-06-24 Thread kranthi
you can give this a try http://www.uploadify.com/ a jquery plugin.

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Robert Cummings
Michael A. Peters wrote: Robert Cummings wrote: Michael A. Peters wrote: Robert Cummings wrote: Michael A. Peters wrote: Manuel Aude wrote: I'm giving a PHP course next semester (3 hours all saturdays for 22 weeks) and I just realized that PHP 5.3 is coming very soon (2 days now!). So, my

Re: [PHP] Progressbar

2009-06-24 Thread Michael A. Peters
Michael A. Peters wrote: Morris wrote: Assumed you are using form uploading, could redirect to the page itself and play a Flash while uploading. I think this is the simplest way other than putting in mass codes I open up a small window via javascript that then uses javascript and css to

[PHP] Including Due by in an email sent from PHP program

2009-06-24 Thread Ravi
Hi: does anyone know how to include a Due by attribute with a dare in an email that is sent from a PHP script. This value is acts as an reminder when the email is in Outlook. TIA -- Thank you, RaVi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] supplied argument errors

2009-06-24 Thread David Robley
PJ wrote: Lex Braun wrote: On Tue, Jun 23, 2009 at 4:10 PM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: I think there is something I do not understand in the manual about mysql_fetch_assoc(), mysql_affected_rows() The code works, but I get these annoying

[PHP] CSV file

2009-06-24 Thread Alain Roger
Hi, i would like to import the content of a CSV file into my database. but in order to show a progress bar to user (to let him know that process is still working on) i would like to determine before to start, how many records / lines are in the CSV file. is there a way to do that ? thanks a lot.

Re: [PHP] CSV file

2009-06-24 Thread Jonathan Tapicer
You can read the whole file (file_get_contents) and count the number of \n in it, or read it line by line with fgets and store the lines in an array, and then the number of lines is the count() of the array, and you can use that array to store it in the database. Jonathan On Wed, Jun 24, 2009 at

Re: [PHP] Including Due by in an email sent from PHP program

2009-06-24 Thread Bastien Koert
On Wed, Jun 24, 2009 at 6:54 AM, Ravirav...@cox.net wrote: Hi: does anyone know how to include a Due by attribute with a dare in an email that is sent from a PHP script. This value is acts as an reminder when the email is in Outlook. TIA -- Thank you, RaVi -- PHP General Mailing List

Re: [PHP] CSV file

2009-06-24 Thread Richard Heyes
Hi, You can read the whole file (file_get_contents) and count the number of \n in it, or read it line by line with fgets and store the lines in an array, and then the number of lines is the count() of the array, and you can use that array to store it in the database. If you have a billion

Re: [PHP] CSV file

2009-06-24 Thread Jonathan Tapicer
If you want to know how many lines there are *before* inserting to the database, you can't count as you go, you have to either read the file twice or read it once, store it memory in a variable and then insert in the database. On Wed, Jun 24, 2009 at 11:12 AM, Richard Heyesrich...@php.net wrote:

Re: [PHP] anyone using session_mysql successfully

2009-06-24 Thread Shawn McKenzie
Michael A. Peters wrote: Randy Paries wrote: Hello, i am trying to get session_mysql http://websupport.sk/~stanojr/projects/session_mysql/ It configured, compiled and installed ok (no errors anyways) but i am getting an error session_start() [a

Re: [PHP] CSV file

2009-06-24 Thread Stuart
2009/6/24 Jonathan Tapicer tapi...@gmail.com: If you want to know how many lines there are *before* inserting to the database, you can't count as you go, you have to either read the file twice or read it once, store it memory in a variable and then insert in the database. Do it in bytes

Re: [PHP] chmod - Opertaion not permitted in ....

2009-06-24 Thread Shawn McKenzie
Michael A. Peters wrote: Morris wrote: Hi all Got a problem don't know how to get in really.. simple code: ?php chmod(/aaa/bbb.php, 0777); ? and I get a warning says Operations not permitted in . Anyone met this before? I've done quite a lot reading on Google but couldn't get

RE: [PHP] best way to communicate between PHP, Flash/Actionscript across LAN

2009-06-24 Thread tedd
At 12:33 PM -0700 6/23/09, Daevid Vincent wrote: Other solutions seem to involve (hackishly) polling every x seconds. Seems there should be a better way. d There might not be a better solution. This is an example of javascript poling a php script: http://webbytedd.com/b/timed-php/ This is

RE: [PHP] best way to communicate between PHP, Flash/Actionscript across LAN

2009-06-24 Thread tedd
At 10:30 AM -0400 6/24/09, tedd wrote: At 12:33 PM -0700 6/23/09, Daevid Vincent wrote: Other solutions seem to involve (hackishly) polling every x seconds. Seems there should be a better way. d There might not be a better solution. This is an example of javascript poling a php script:

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Per Jessen
Robert Cummings wrote: It's hard to create a helpful application when fort knox is your delivery location. I'm not saying there's a problem with Fort Knoxes in the world, but this isn't necessary for everyone. if it were we wouldn't have banks, we wouldn't have credit unions, we'd all be

Re: [PHP] Progressbar

2009-06-24 Thread tedd
At 7:55 AM +0200 6/24/09, Teun Lassche wrote: I'm making an upload script with PHP, is there a way I can show a progressbar while uploading? -- Teun Lassche It's not a progress bar, but it's a heck of a lot simpler: http://webbytedd.com/bb/wait/ The biggest problem in uploading a file is

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Robert Cummings
Per Jessen wrote: Robert Cummings wrote: It's hard to create a helpful application when fort knox is your delivery location. I'm not saying there's a problem with Fort Knoxes in the world, but this isn't necessary for everyone. if it were we wouldn't have banks, we wouldn't have credit

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Robert Cummings
Per Jessen wrote: Robert Cummings wrote: Personally, I prefer having my code outside the DocumentRoot also, but I do not believe it is the simplest solution, and I do not think it is wrong to place such information within the DocumentRoot. The feature exists, application developers have

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Daniel Brown
On Wed, Jun 24, 2009 at 13:24, Robert Cummingsrob...@interjinn.com wrote: I prefer proceed with caution :) Robjects in mirror are closer than they appear? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All

Re: [PHP] chmod - Opertaion not permitted in ....

2009-06-24 Thread Ashley Sheridan
On Wed, 2009-06-24 at 09:23 -0500, Shawn McKenzie wrote: Michael A. Peters wrote: Morris wrote: Hi all Got a problem don't know how to get in really.. simple code: ?php chmod(/aaa/bbb.php, 0777); ? and I get a warning says Operations not permitted in . Anyone met

Re: [PHP] CSV file

2009-06-24 Thread Richard Heyes
Hi, If you want to know how many lines there are *before* inserting to the database, you can't count as you go, you have to either read the file twice or read it once, store it memory in a variable and then insert in the database. Sure you can, simply do the line count first, then the

Re: [PHP] chmod - Opertaion not permitted in ....

2009-06-24 Thread Shawn McKenzie
Ashley Sheridan wrote: On Wed, 2009-06-24 at 09:23 -0500, Shawn McKenzie wrote: Michael A. Peters wrote: Morris wrote: Hi all Got a problem don't know how to get in really.. simple code: ?php chmod(/aaa/bbb.php, 0777); ? and I get a warning says Operations not permitted in .

RE: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread HallMarc Websites
://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Information from ESET Smart Security, version of virus signature database 4185 (20090624

Re: [PHP] CSV file

2009-06-24 Thread Jonathan Tapicer
To do the line count first, you have to read the whole file, how would you do it? On Wed, Jun 24, 2009 at 3:00 PM, Richard Heyesrich...@php.net wrote: Hi, If you want to know how many lines there are *before* inserting to the database, you can't count as you go, you have to either read the

Re: [PHP] CSV file

2009-06-24 Thread Richard Heyes
Hi, To do the line count first, you have to read the whole file, how would you do it? Something like this: $fp = fopen('/tmp/foo', 'r'); $count = 0; while (!feof($fp)) { fgets($fp); ++$count; } -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 20th June) PHP mail: RMail

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Michael A. Peters
Robert Cummings wrote: * snip * No. It is not. The web root should be read only. Please cite references as to why it should be read only. Please explain why the feature exists if it should not be so. The feature exists because the web server runs as a standard user, and standard users

Re: [PHP] CSV file

2009-06-24 Thread Eddie Drapkin
or $arr = file('foo.csv'); $count = count($arr); On Wed, Jun 24, 2009 at 5:19 PM, Richard Heyesrich...@php.net wrote: Hi, To do the line count first, you have to read the whole file, how would you do it? Something like this: $fp = fopen('/tmp/foo', 'r'); $count = 0; while (!feof($fp))

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Daniel Brown
On Wed, Jun 24, 2009 at 17:19, Michael A. Petersmpet...@mac.com wrote: Jane, a non technical person [...] Betty's webmail account is compromised [...] Bottom line: hax0r5 hate g1rls. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ ||

[PHP] Re: idiot proofing

2009-06-24 Thread Shawn McKenzie
PJ wrote: I have a bit of a situation. I have set up addBooks, editBooks and deleteBooks pages. Before complicating my life mixing them up in one file, I am running tests. I'd like to make them idiot proof, up to a point. When the page is submitted and the code is parsed, the form inputs

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Robert Cummings
Michael A. Peters wrote: Robert Cummings wrote: * snip * No. It is not. The web root should be read only. Please cite references as to why it should be read only. Please explain why the feature exists if it should not be so. The feature exists because the web server runs as a standard

[PHP] idiot proofing

2009-06-24 Thread PJ
I have a bit of a situation. I have set up addBooks, editBooks and deleteBooks pages. Before complicating my life mixing them up in one file, I am running tests. I'd like to make them idiot proof, up to a point. When the page is submitted and the code is parsed, the form inputs remain on the

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Michael A. Peters
Robert Cummings wrote: I respectfully disagree with your position. Everything you have described about Jane is also true of an operating system. There are compromised machines all over the world just because installing an operating system is so easy. No amount of packaging is going to solve

[PHP] How to sort a two-D ARRAY

2009-06-24 Thread salmarayan
Can Anyone tell me how to sort two D Array for example like this one based on the gain Array ( [0] = Array ( [company_name] =X [gain] = 0.2 ) [1] = Array ( [company_name] = y[gain] = 0.34 )[2]1] = Array ( [company_name] =z[gain] = 2 ) ) Thanks in advance -- View this message in context:

Re: [PHP] Re: idiot proofing

2009-06-24 Thread Bastien Koert
On Wed, Jun 24, 2009 at 5:30 PM, Shawn McKenzienos...@mckenzies.net wrote: PJ wrote: I have a bit of a situation. I have set up addBooks, editBooks and deleteBooks pages. Before complicating my life mixing them up in one file, I am running tests. I'd like to make them idiot proof, up to a

Re: [PHP] Re: idiot proofing

2009-06-24 Thread Shawn McKenzie
Bastien Koert wrote: On Wed, Jun 24, 2009 at 5:30 PM, Shawn McKenzienos...@mckenzies.net wrote: PJ wrote: I have a bit of a situation. I have set up addBooks, editBooks and deleteBooks pages. Before complicating my life mixing them up in one file, I am running tests. I'd like to make them

Re: [PHP] CSV file

2009-06-24 Thread Jonathan Tapicer
Well, you are reading the whole file there (and throwing the data you read not assigning the fgets result to anything), and then to store it in the database you need to read it again, so you read the file twice. It will probably better to store the data you read the first time in an array and then

Re: [PHP] Re: idiot proofing

2009-06-24 Thread Bastien Koert
On Wed, Jun 24, 2009 at 8:24 PM, Shawn McKenzienos...@mckenzies.net wrote: Bastien Koert wrote: On Wed, Jun 24, 2009 at 5:30 PM, Shawn McKenzienos...@mckenzies.net wrote: PJ wrote: I have a bit of a situation. I have set up addBooks, editBooks and deleteBooks pages. Before complicating my

Re: [PHP] Re: idiot proofing

2009-06-24 Thread Michael A. Peters
Bastien Koert wrote: That's a good one, however I'm assuming you haven't been following PJ's posts :-) Once he tries AJAX, I feel for the js.general and ajax.general folks! Well, I have followed PJ's posts and agree that this [AJAX] is something that he's not ready for yet. Not to

Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-24 Thread Paul M Foster
On Wed, Jun 24, 2009 at 05:26:11PM -0400, Daniel Brown wrote: On Wed, Jun 24, 2009 at 17:19, Michael A. Petersmpet...@mac.com wrote: Jane, a non technical person [...] Betty's webmail account is compromised [...] Bottom line: hax0r5 hate g1rls. Or hax0r5 hate grrls. Paul --

Re: [PHP] Progressbar

2009-06-24 Thread Paul M Foster
On Wed, Jun 24, 2009 at 10:24:21AM -0400, tedd wrote: At 7:55 AM +0200 6/24/09, Teun Lassche wrote: I'm making an upload script with PHP, is there a way I can show a progressbar while uploading? -- Teun Lassche It's not a progress bar, but it's a heck of a lot simpler:

[PHP] Unable to load dynamic php_oci8.dll

2009-06-24 Thread Raj
Hi, I get the following error when i start the Apache Server. PHP Startup: Unable to load dynamic library 'F:\\Apps\\PHP\\ext\\php_oci8.dll' - The specified procedure could not be found.\r\n in Unknown on line 0 I dont see there is any issue with the dir as well as the ini file. everything is

Re: [PHP] Unable to load dynamic php_oci8.dll

2009-06-24 Thread Kun Niu
http://forums.oracle.com/forums/thread.jspa?threadID=412805 Will this be of help? 2009/6/25 Raj rameshs...@gmail.com Hi, I get the following error when i start the Apache Server. PHP Startup: Unable to load dynamic library 'F:\\Apps\\PHP\\ext\\php_oci8.dll' - The specified procedure could

RE: [PHP] Re: idiot proofing

2009-06-24 Thread Asher Snyder
He can even use http://www.ajaxload.info/ to create his own loading circle to just embed the code. He can then image's visibility to the css property display:none and on the form submit he can do a JavaScript document.getElementById(id).style.visibility = 'visible'; , assuming he gave the object

RE: [PHP] Re: idiot proofing

2009-06-24 Thread Asher Snyder
[EDITED FOR MISTAKES AND TYPOS] He can even use http://www.ajaxload.info/ to create his own loading circle to hide on the page. He can hide the image's visibility by using the css property display:none and on the form submit he can do a JavaScript document.getElementById(id).style.display = ''; ,

Re: [PHP] Unable to load dynamic php_oci8.dll

2009-06-24 Thread Raj
i tired this earlier, it is not working. On Thu, Jun 25, 2009 at 9:54 AM, Kun Niu haoniu...@gmail.com wrote: http://forums.oracle.com/forums/thread.jspa?threadID=412805 Will this be of help? 2009/6/25 Raj rameshs...@gmail.com Hi, I get the following error when i start the Apache Server.