php-general Digest 1 Jun 2006 01:19:59 -0000 Issue 4159

2006-05-31 Thread php-general-digest-help
php-general Digest 1 Jun 2006 01:19:59 - Issue 4159 Topics (messages 237144 through 237174): Re: $_FILES doesn't work but $_POST works 237144 by: chris smith 237145 by: Rabin Vincent Re: corrupt pdfs 237146 by: John Nichel 237173 by: Richard Lynch

Re: [PHP] $_FILES doesn't work but $_POST works

2006-05-31 Thread Rabin Vincent
On 5/31/06, kartikay malhotra [EMAIL PROTECTED] wrote: However, with Mbuni MMS Gateway (which provides HTTP POST), the above condition in if loop isn't satisfied. I think $_FILES isn't working. However the following code works: ?php $in='/usr/share/wallpapers/alien-night.jpg';

[PHP] corrupt pdfs

2006-05-31 Thread Ross
I have pdfs saved as BLOBs I create the links dynamically but only some of the PDFs display an error message 'error opening this files...this file cannot be repaired... Is there a file size limit in kb for Blobs and what is it? What size of file can a LONG BLOB accomodate? If it is not this

Re: [PHP] corrupt pdfs

2006-05-31 Thread Chris
Ross wrote: I have pdfs saved as BLOBs I create the links dynamically but only some of the PDFs display an error message 'error opening this files...this file cannot be repaired... Is there a file size limit in kb for Blobs and what is it? What size of file can a LONG BLOB accomodate? Who

Re: [PHP] $_FILES doesn't work but $_POST works

2006-05-31 Thread kartikay malhotra
Thanks for your replies. 1. Did you put the enctype=multipart/form-data into the FORM tag? Ans: I do not have a form! I'm using a gateway utility to upload files From documentation of Mbuni MMS gateway: post-url Response content is obtained as result of sending a HTTP POST request to the

Re: [PHP] corrupt pdfs

2006-05-31 Thread André Medeiros
A quick google search tells you that LONGBLOB can contain string with a maximum length of 4294967295 characters, which translates into 4gb+/- Maybe a MEDIUMBLOB (16777215 characters) would already do the trick, no? It supports as much as 16mb +/- On 5/31/06, Chris [EMAIL PROTECTED] wrote:

[PHP] Parse string with variables

2006-05-31 Thread Merlin
Hi there, I am trying to parse a plain text which contains variables. The string looks like this: P=1 U=test T=ok P=2 U=test2 T=anything How could I create arrays out of this. To be able to access the values like this: echo $P[1]; parse_str does not work here and I could not find another

[PHP] Re: Parse string with variables

2006-05-31 Thread Barry
Merlin schrieb: Hi there, I am trying to parse a plain text which contains variables. The string looks like this: P=1 U=test T=ok P=2 U=test2 T=anything How could I create arrays out of this. To be able to access the values like this: echo $P[1]; parse_str does not work here and I could

Re: [PHP] Re: Parse string with variables

2006-05-31 Thread Dimiter Ivanov
On 5/31/06, Barry [EMAIL PROTECTED] wrote: Merlin schrieb: Hi there, I am trying to parse a plain text which contains variables. The string looks like this: P=1 U=test T=ok P=2 U=test2 T=anything How could I create arrays out of this. To be able to access the values like this:

Re: [PHP] $_FILES doesn't work but $_POST works

2006-05-31 Thread chris smith
On 5/31/06, kartikay malhotra [EMAIL PROTECTED] wrote: Thanks for your replies. 1. Did you put the enctype=multipart/form-data into the FORM tag? Ans: I do not have a form! I'm using a gateway utility to upload files From documentation of Mbuni MMS gateway: post-url Response content is

Re: [PHP] $_FILES doesn't work but $_POST works

2006-05-31 Thread Rabin Vincent
On 5/31/06, chris smith [EMAIL PROTECTED] wrote: On 5/31/06, kartikay malhotra [EMAIL PROTECTED] wrote: 2. Have you tried simply saving $_POST['userfile'] to a file? $save = $_POST['userfile']; $f=fopen($out,'a'); copy($save, $out); Files don't go into $_POST - they go into

Re: [PHP] corrupt pdfs

2006-05-31 Thread John Nichel
Ross wrote: I have pdfs saved as BLOBs I create the links dynamically but only some of the PDFs display an error message 'error opening this files...this file cannot be repaired... Is there a file size limit in kb for Blobs and what is it? What size of file can a LONG BLOB accomodate? If it

Re: [PHP] Addtime is for 4.1, what can i use for 3.23? (pretty much 0T)

2006-05-31 Thread Ryan A
Hey, Might be quicker for you to ask on a mysql mailing list :) Yep, am waiting for the confirmation email... I tried a couple of different things looking at the mysql page (http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html) but couldn't come up with a proper

[PHP] is there a faster file command?

2006-05-31 Thread Merlin
Hi there, I am reading a remote plain text file from another server via the file command: $str = file (http:/x); This is a feed so there is no other way then reading it remote. Now this reading takes up between 0.5 and 1.0 s which is far to slow. The whole other process on the site

Re: [PHP] is there a faster file command?

2006-05-31 Thread Brad Bonkoski
Merlin wrote: Hi there, I am reading a remote plain text file from another server via the file command: $str = file (http:/x); This is a feed so there is no other way then reading it remote. Now this reading takes up between 0.5 and 1.0 s which is far to slow. The whole other

Re: [PHP] is there a faster file command?

2006-05-31 Thread Dimiter Ivanov
On 5/31/06, Merlin [EMAIL PROTECTED] wrote: Hi there, I am reading a remote plain text file from another server via the file command: $str = file (http:/x); This is a feed so there is no other way then reading it remote. Now this reading takes up between 0.5 and 1.0 s which is far to

[PHP] [PHP5] safe_mode_exec_dir

2006-05-31 Thread James Nunnerley
Hi Folks, Should be a nice easy one - if running PHP5, how do I add more than one exec_dir into the list? i.e. what is the separator? Cheers Nunners

Re: [PHP] is there a faster file command?

2006-05-31 Thread Rory Browne
As I believe someone else said, file_get_contents() is the perfered way. Bare in mind however that reading off a network will probably be slow compared to other operations. This of course depends on the speed of your network, and the complexity of the other operations.

Re: [PHP] [PHP5] safe_mode_exec_dir

2006-05-31 Thread Jochem Maas
James Nunnerley wrote: Hi Folks, Should be a nice easy one - if running PHP5, how do I add more than one exec_dir into the list? i.e. what is the separator? I have never used the directive but I imagine it hasn't changed between php4 and php5 ... and I would hazard a guess that the dir

[PHP] Session variables and words with spaces

2006-05-31 Thread Beauford
Hi, I have a form in which a drop down field is populated from a MySQL database. I am also using sessions. The problem is this. After I submit the form the session variable only shows the part of the input before the space. Example: if I choose Niagra Falls from the drop down list, then I only

Re: [PHP] Session variables and words with spaces

2006-05-31 Thread Brad Bonkoski
Perhaps you should load up your initial form and then use the view source option in your browser as this will probably give you insight into your problems... -Brad Beauford wrote: Hi, I have a form in which a drop down field is populated from a MySQL database. I am also using sessions. The

Re: [PHP] Session variables and words with spaces

2006-05-31 Thread John Nichel
Beauford wrote: Hi, I have a form in which a drop down field is populated from a MySQL database. I am also using sessions. The problem is this. After I submit the form the session variable only shows the part of the input before the space. Example: if I choose Niagra Falls from the drop down

[PHP] ob_flush() problems

2006-05-31 Thread cajbecu
Hello, for ($i=0; $i 10; $i++) { $output = ccc2; print pre; echo $output; print /pre; ob_flush(); flush(); sleep(1); } I want to show on the browser, ccc2 (example) every 1 second, but it shows all the text when the for stops... any

Re: [PHP] ob_flush() problems

2006-05-31 Thread Brad Bonkoski
cajbecu wrote: Hello, for ($i=0; $i 10; $i++) { $output = ccc2; print pre; echo $output; print /pre; ob_flush(); flush(); sleep(1); } I want to show on the browser, ccc2 (example) every 1 second, but it shows all the text when the for

RE: [PHP] Session variables and words with spaces

2006-05-31 Thread Beauford
Thanks - Done that though. It shows the way it should be. Example: option value=Niagara FallsNiagara Falls/option -Original Message- From: Brad Bonkoski [mailto:[EMAIL PROTECTED] Sent: May 31, 2006 2:28 PM To: Beauford Cc: php-general@lists.php.net Subject: Re: [PHP] Session

Re: [PHP] Session variables and words with spaces

2006-05-31 Thread Brad Bonkoski
Beauford wrote: Thanks - Done that though. It shows the way it should be. Example: option value=Niagara FallsNiagara Falls/option which of course is wrong and explains perfectly why you are getting the results you are getting... it *should* display: option value=Niagra

Re: [PHP] Session variables and words with spaces

2006-05-31 Thread cajbecu
option value=Niagara FallsNiagara Falls/option replace with option value=Niagara FallsNiagara Falls/option (note the quotes) because you will post only Niagara instead Niagara Falls cheers, On 5/31/06, Beauford [EMAIL PROTECTED] wrote: Thanks - Done that though. It shows the way it should

RE: [PHP] Session variables and words with spaces

2006-05-31 Thread Beauford
Not sure why I would get a parse error, but that did correct the problem. I just completely missed the single quote. I never even clue'd in when I looked at the source of the page. Sometimes another pair of eyes does the trick. Maybe it's time for a break. Thanks I'm surprised you're not

RE: [PHP] Session variables and words with spaces

2006-05-31 Thread Beauford
Yep, I see that now. I really need to take a break - been at this way to long. Thanks to all. -Original Message- From: Brad Bonkoski [mailto:[EMAIL PROTECTED] Sent: May 31, 2006 3:02 PM To: Beauford Cc: php-general@lists.php.net Subject: Re: [PHP] Session variables and words with

[PHP] Am I supposed to be using SPL?

2006-05-31 Thread D. Dante Lorenso
I was about to write code to recursively list the contents of a directory when I remembered seeing an object in SPL that would do it for me: http://us3.php.net/manual/en/function.recursivedirectoryiterator-next.php But there is no documentation on this object, and although I have it in

Re: [PHP] ob_flush() problems

2006-05-31 Thread Adam Zey
Brad Bonkoski wrote: cajbecu wrote: Hello, for ($i=0; $i 10; $i++) { $output = ccc2; print pre; echo $output; print /pre; ob_flush(); flush(); sleep(1); } I want to show on the browser, ccc2 (example) every 1 second, but it shows all

[PHP] [ANNOUNCEMENT] Sparse 1.03b Released

2006-05-31 Thread Daniel Orner
New beta release of Sparse, my framework for writing MySQL-based programs without any code. This release includes search capability and completely removes all external dependencies (also allowing for Sparse tags to be embedded in regular tags). Try it out!

Re: [PHP] Am I supposed to be using SPL?

2006-05-31 Thread Jochem Maas
your not supposed to do anything ;-) but you can if you like :-) ... D. Dante Lorenso wrote: I was about to write code to recursively list the contents of a directory when I remembered seeing an object in SPL that would do it for me:

[PHP] get directory paths recursively using SPL ... was Re: [PHP] Am I supposed to be using SPL?

2006-05-31 Thread D. Dante Lorenso
Jochem Maas wrote: also take a look here: http://www.wiki.cc/php/RecursiveDirectoryIterator yes it's meant to be used, yes you can use it in production BUT your a little on the bleeding edge (not very many people using it full on) AND the whole of SPL is still a little in flex (as is php5-php6

Re: [PHP] ob_flush() problems

2006-05-31 Thread Richard Lynch
On Wed, May 31, 2006 1:29 pm, cajbecu wrote: for ($i=0; $i 10; $i++) { $output = ccc2; print pre; echo $output; print /pre; ob_flush(); flush(); sleep(1); } I want to show on the browser, ccc2 (example) every 1 second,

Re: [PHP] ob_flush() problems

2006-05-31 Thread Richard Lynch
On Wed, May 31, 2006 1:36 pm, Brad Bonkoski wrote: PHP is a server side scripting language, so the information would not be sent to the browser( aka client) until the server side script has completed its execution. This is just plain incorrect. While buffering within various pieces of

Re: [PHP] is there a faster file command?

2006-05-31 Thread Richard Lynch
On Wed, May 31, 2006 9:19 am, Merlin wrote: I am reading a remote plain text file from another server via the file command: $str = file (http:/x); This is a feed so there is no other way then reading it remote. Now this reading takes up between 0.5 and 1.0 s which is far to slow. The

Re: [PHP] corrupt pdfs

2006-05-31 Thread Richard Lynch
On Wed, May 31, 2006 3:56 am, Ross wrote: I have pdfs saved as BLOBs We've been through this a zillion time, so search the archives for the pros and cons. Is there a file size limit in kb for Blobs and what is it? I believe it depends on compile-time settings, but this is really a MySQL

Re: [PHP] corrupt pdfs

2006-05-31 Thread tedd
At 6:26 PM -0500 5/31/06, Richard Lynch wrote: On Wed, May 31, 2006 3:56 am, Ross wrote: I have pdfs saved as BLOBs We've been through this a zillion time, so search the archives for the pros and cons. Is there a file size limit in kb for Blobs and what is it? I believe it depends on