Re: [PHP] Timeout for fopen ?

2007-10-13 Thread heavyccasey
You could use Javascript/XMLHTTP to call a PHP script that opens the file. On 10/13/07, debussy007 <[EMAIL PROTECTED]> wrote: > > Hello, > > I want to use "fopen" to open an URL, but is it possible to add a timeout ? > This to avoid that fopen slows down my script ? > Because if site I access take

Re: [PHP] Fast prefix search?

2007-10-13 Thread js
On 10/14/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > how big is your dataset; have you tested against a potential data set and > gotten > long execution times? The dataset consists of about several million lines and I've tested script like above against the dataset. it took almost a hour. (perl

Re: [PHP] How to convert URL's to Links in User posted text in forms ?

2007-10-13 Thread Hemanth
I found this on searching for "links in submitted text" its in Ruby gotta convert to php and try there are many regex samples in the php manual itself but maybe incomplete in = "go check out www.xyz.com or http://xyz.com"; in.gsub!(/([^/])(www.([w/_.~])*)/, '\1http://\2"; target="_blank">\2')

[PHP] Timeout for fopen ?

2007-10-13 Thread debussy007
Hello, I want to use "fopen" to open an URL, but is it possible to add a timeout ? This to avoid that fopen slows down my script ? Because if site I access takes 10 secs to respond, I suppose my script will just wait fopen returns something. Thank you. -- View this message in context: http:/

Re: [PHP] Fast prefix search?

2007-10-13 Thread Nathan Nobbe
On 10/13/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Sun, 2007-10-14 at 02:07 +0900, js wrote: > > On 10/14/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > > can you use the php string manipulation functions ? > > > > I'll probably use strstr() to check whether a string starts with some >

Re: [PHP] Fast prefix search?

2007-10-13 Thread Robert Cummings
On Sun, 2007-10-14 at 02:07 +0900, js wrote: > On 10/14/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > can you use the php string manipulation functions ? > > I'll probably use strstr() to check whether a string starts with some prefix. >From the help for PHP's strstr() function: "Note: If

Re: [PHP] Fast prefix search?

2007-10-13 Thread Nathan Nobbe
On 10/13/07, js <[EMAIL PROTECTED]> wrote: > > On 10/14/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > can you use the php string manipulation functions ? > > I'll probably use strstr() to check whether a string starts with some > prefix. > But problem I like to solve is how to effectively pick st

Re: [PHP] Weird mystery error

2007-10-13 Thread Nathan Nobbe
On 10/13/07, Nathan Hawks <[EMAIL PROTECTED]> wrote: > > I think I misunderstood the question. All 5 apps in the project are > installed on their server, and all working at 99-100% except this one. > (can't be sure the rest is bug free because this is my white whale at > the moment) are the 5 ap

Re: [PHP] Weird mystery error

2007-10-13 Thread Nathan Hawks
I think I misunderstood the question. All 5 apps in the project are installed on their server, and all working at 99-100% except this one. (can't be sure the rest is bug free because this is my white whale at the moment) On Sat, 2007-10-13 at 13:13 -0400, Nathan Nobbe wrote: > On 10/13/07, Nathan

Re: [PHP] Weird mystery error

2007-10-13 Thread Nathan Nobbe
On 10/13/07, Nathan Hawks <[EMAIL PROTECTED]> wrote: > > Ps: I have 4 other apps installed in this project and they all work > fine :\ Believe me, in a file as short as a symfony front controller, > and after checking about 40 times, I'm pretty sure the file is OK :) > is this the first symphony

Re: [PHP] Fast prefix search?

2007-10-13 Thread js
On 10/14/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > can you use the php string manipulation functions ? I'll probably use strstr() to check whether a string starts with some prefix. But problem I like to solve is how to effectively pick strings starting with a prefix from a large dataset, like

Re: [PHP] Weird mystery error

2007-10-13 Thread Nathan Hawks
I don't use lists regularly, sorry for the double-reply to Nathan. Sadly: - no ssh on the client box - can't 100% mimic because I have a different Apache However, I did use symfony freeze to move all the Pear modules etc that it needs, into the local site. An additional clue might be: the

Re: [PHP] Weird mystery error

2007-10-13 Thread Nathan Nobbe
are there any php extensions your code requires that arent on the production system? have you checked the php.ini settings on the new host to ensure theyre the same as your test box? that would be a good idea no matter what, and you might turn something up regarding your problem. can you run the s

[PHP] Weird mystery error

2007-10-13 Thread Nathan Hawks
Hey all, I wrote a symfony app this week for a client, and I'm trying to install it on their server today. I am getting a Fatal that I can only assume is either an Apache 1.3.37 bug, or a PHP 5.2.4 bug. It's madness. PHP is reporting an undefined function, but it's undefined because it's only a

Re: [PHP] Fast prefix search?

2007-10-13 Thread Nathan Nobbe
On 10/13/07, js <[EMAIL PROTECTED]> wrote: > > HI. > > I'm writing a script which extracts text which starts with some string. can you use the php string manipulation functions ? -nathan

Re: [PHP] How to convert URL's to Links in User posted text in forms ?

2007-10-13 Thread Nathan Nobbe
On 10/13/07, Hemanth <[EMAIL PROTECTED]> wrote: > > Hi, > I am trying to display as links the url's posted in the forms > at my site valueads_dot_biz > > I am removing all codes and special chars when they post to avoid any > injection > > but when i retrive back form the database and display > I

[PHP] How to convert URL's to Links in User posted text in forms ?

2007-10-13 Thread Hemanth
Hi, I am trying to display as links the url's posted in the forms at my site valueads_dot_biz I am removing all codes and special chars when they post to avoid any injection but when i retrive back form the database and display I want to find the url's in the text and display as clickable links.

[PHP] Fast prefix search?

2007-10-13 Thread js
HI. I'm writing a script which extracts text which starts with some string. I tried to solve this by using Berkeley DB's B-tree and found that PHP provides Berkeley DB access through DBA[1] module. But , as the doc says collectly, "functionality is limited to a common subset of features" so I cou