Re: [PHP] preg_replace - regex for replace string

2002-03-27 Thread Miguel Cruz
On Wed, 27 Mar 2002, James Taylor wrote: > I'm trying to do something to the effect of this for a preg_replace statement: > > $string = "Hello\n\n\n\n\n\n\nHow are you?\n\n\n\n\n\n\n\nHi"; > $string = preg_replace("/\n\n/", "/\n/", $string); > > > But, it appears the 'replace' portion of the fu

Re: [PHP] preg_replace - regex for replace string

2002-03-27 Thread James Taylor
This is just an example. There are some cases where I need the second option to be a regular expression, the same way that you can do in Perl regex... On Wednesday 27 March 2002 02:49 pm, you wrote: > On Wed, 27 Mar 2002, James Taylor wrote: > > I'm trying to do something to the effect of this

Re: [PHP] preg_replace - regex for replace string

2002-03-27 Thread Miguel Cruz
On Wed, 27 Mar 2002, James Taylor wrote: > On Wednesday 27 March 2002 02:49 pm, you wrote: >> On Wed, 27 Mar 2002, James Taylor wrote: >>> I'm trying to do something to the effect of this for a preg_replace >>> statement: >>> >>> $string = "Hello\n\n\n\n\n\n\nHow are you?\n\n\n\n\n\n\n\nHi"; >>> $

Re: [PHP] preg_replace - regex for replace string

2002-03-27 Thread James Taylor
Ok, let me try to refine this as the big picture. User enters something into a form. We take that form value and convert newlines into though nl2br. Then, I want the limit the number of consecutive 's a user can enter, to avoid abuse via a person just holding down enter for a while. $message

Re: [PHP] preg_replace - regex for replace string

2002-03-27 Thread Miguel Cruz
On Wed, 27 Mar 2002, James Taylor wrote: > Ok, let me try to refine this as the big picture. User enters something into > a form. > > We take that form value and convert newlines into though nl2br. > > Then, I want the limit the number of consecutive 's a user can enter, > to avoid abuse via a

Re: [PHP] preg_replace - regex for replace string

2002-03-27 Thread James Taylor
Hm, nevermind my question :) I'm not thinking straight, not enough sleep. On Wednesday 27 March 2002 02:53 pm, you wrote: > On Wed, 27 Mar 2002, James Taylor wrote: > > On Wednesday 27 March 2002 02:49 pm, you wrote: > >> On Wed, 27 Mar 2002, James Taylor wrote: > >>> I'm trying to do something t

Re: [PHP] odbc_fetch_array() Not Available?

2002-03-27 Thread Miguel Cruz
On Wed, 27 Mar 2002 [EMAIL PROTECTED] wrote: > I am running php 4.1.1, and when i try to use odbc_fetch_array, it says > "Call to undefined function" > > Why is this? Maybe your installation of PHP was not built with ODBC support? It's a compile-time option. miguel -- PHP General Mailing Li

Re: [PHP] odbc_fetch_array() Not Available?

2002-03-27 Thread eric.coleman
Well, why would all the other ODBC function works? Thanks, Eric - Original Message - From: "Miguel Cruz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, March 27, 2002 5:58 PM Subject: Re: [PHP] odbc_fetch_array() Not Available? > On Wed, 27 Mar 20

Re: [PHP] odbc_fetch_array() Not Available?

2002-03-27 Thread Miguel Cruz
On Wed, 27 Mar 2002 [EMAIL PROTECTED] wrote: >>> I am running php 4.1.1, and when i try to use odbc_fetch_array, it says >>> "Call to undefined function" >>> >>> Why is this? >> >> Maybe your installation of PHP was not built with ODBC support? It's a >> compile-time option. > > Well, why woul

[PHP] Re: Nevermind I figured it out

2002-03-27 Thread Prolog
David, There is a better way to do through a similar operator. $variable = "hello and welcome"; $variable .= " to www.newimagedesign.com"; therefore... print ($variable); would result in... hello and welcome to www.newimagedesign.com hope this helps. -Jordan K. Martin New Image Design ---

Re: [PHP] odbc_fetch_array() Not Available?

2002-03-27 Thread eric.coleman
Good one.. hehe Maybe Rasmus was going to notice this, and fix it ;P Hehe, Eric - Original Message - From: "Miguel Cruz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, March 27, 2002 6:41 PM Subject: Re: [PHP] odbc_fetch_array() Not Available? > O

[PHP] regex expession problems

2002-03-27 Thread Carl E Shmidt
But hey, who doesn't have em eh? Anyway, here's my predicament. I want to look for either the string "http://"; or for 1 or more spaces in a string. Here's the regex I've got preg_match("/http:\/\/ | [[:space:]]/i",$valToEval); I can get each test case working individually, but as soon as I c

RE: [PHP] regex expession problems

2002-03-27 Thread Martin Towell
I don't have that much experience with preg* functions but if that's exactly how you've got it in your code, shouldn't there be no spaces?? that is: preg_match("/http:\/\/ | [[:space:]]/i",$valToEval); * * \-\both of these should be removed ?

Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's location tag?

2002-03-27 Thread webapprentice
I now recall that ColdFusion's location tag accepts no data parameters, so you can't pass data to it. It is essentially a redirect. Thus, it may be doing an HTTP header location under the hood. In ColdFusion, I may have logic like so: - OK! I don't ge

[PHP] db driven site on IIS

2002-03-27 Thread olinux
Hi all, My company is considering a move from static to db driven site. I am looking for a solution to allow URL's to be structured in "search engine friendly" format [i.e. http://website.com/region/article/article_id ] as search engine traffic is very important. I have found some great resour

[PHP] Header - cache control depends of the server ?

2002-03-27 Thread pierre . marcandella
Hi I am using this to make sure a page is refreshed when the user uses the back button of his browser : When I try on local (Win NT) it works. The page is refreshed. When I try on an other server (UNIX) it doesn't work. Is it normal ? Any idea how I can solve this ? Thanks for any assistance.

Re: [PHP] db driven site on IIS

2002-03-27 Thread Ben Turner
In my experiances ASP didn't handle this task well. I would suggest looking at www.microsoft.com to see how they accomplish what you are attempting. It isn't as pretty as Apache handles it but their's works. They accomplish it by sending the files via querystring and then parsing out the querys

[PHP] Again my question about Building Libraries

2002-03-27 Thread Alexandre Soares
> Hi All, > > > This is my first participation in this group, so my question is I > write a function in c, but I need use this function and more joined in a > library make using the command ar rc alexlib.a x.o, but this procedure show > a error when I use this in my browser, please anyone

[PHP] Sessions/Cookies and HTTP Auth

2002-03-27 Thread David McInnis
Here is the scenario. 1. I set my browser to block all cookies. 2. I access this script. 3. I am thinking that I should get an error because I presume that session_start() will attempt to set a cookie (which it appears to do). (I tried setcookie() too and the cookie was accepted.) My quest

[PHP] using return in fucntions

2002-03-27 Thread Justin French
Hi all, I've USED fucntions, i've MODIFIED functions, but to date I haven't written much in the way of reuseable code/functions. I'm at the point now where I can identify what sort of code could better be controlled by a function library, and want to get started on creating my own. However, I'm

[PHP] Can you use null?

2002-03-27 Thread Chuck \"PUP\" Payne
I am wanting to know if I can use null to call up an image? I am writing a page that talks to calls to a database for cars. There a field where calls on photo names, but if someone doesn't have a photo. Mysql puts null, I want to be able to use that null to call an image. --

RE: [PHP] using return in fucntions

2002-03-27 Thread Martin Towell
How do you mean, it didn't work in other cases? Did the file(s) get included? did they execute? did they execute properly? I'm thinking, just by looking at it, that the answer to the last question is "no". The reason why I say that can be shown in a very simple example: main.php other.inc $x\

[PHP] regex

2002-03-27 Thread Carl E Shmidt
Now I'm looking to find 1 or more digits in an input: preg_match("[[:digit:]]",$valToEval); I'm passing the value "12" and this thing still returns 0. What's going on? Carl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] imap problems

2002-03-27 Thread gaukia 345
Hi Duncan, Also working with IMAP because I'm writing a webmail. Haven't met this problem before but if I were you, I'd consider the following steps 1) Check if the IMAP daemon is running. Type "nmap localhost" at your shell to see if IMAP daemon (port 143, and it appears as imap2 on my server

[PHP] raven & register & site_s & spafinder

2002-03-27 Thread Martin Towell
I have finally figured out why I get logged straight out of tabby as soon as I log in. When I log onto tabby (through cc.dev.syd.world.net), I get $SITE_S as "wtb_tabby" (as it's meant to be) but when register.syd.world.net/RSEARCH.html loads, it changes it to "spafinder_trade". Whoever is doing

RE: [PHP] raven & register & site_s & spafinder

2002-03-27 Thread Martin Towell
oops sorry for that - wrong address! -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 3:16 PM To: '[EMAIL PROTECTED]' Subject: [PHP] raven & register & site_s & spafinder Importance: High I have finally figured out why I get logged str

[PHP] HELP PLEASE!

2002-03-27 Thread GENESiS DESiGNS
Hello, My problem is I have a form that submits it info to a mysql table, well then I have a page that calls it from the mysql table and displays whatever is in the mysql table. So, what script do I use to make it display multiple entrys?? Here is the code: ---

Re: [PHP] Sessions/Cookies and HTTP Auth

2002-03-27 Thread maxwello
When using cookies, if you don't set an expiration time, the cookie is only good until the session expires. It doesn't get saved, and it disappears when the user closes their browser. Many browsers have different settings/preferences for session cookies, and because they don't get saved to your

[PHP] Help! Recent PHP security patch => high server load?

2002-03-27 Thread Jason Murray
Hi folks, Just curious to know if anyone has experienced a high server load since installing the recent security patch to PHP 4.0.6? Our Production team is reporting that the web servers running www.melbourneit.com.au are currently running at a load average of 30+, and this has been the case sin

Re: [PHP] Can you use null?

2002-03-27 Thread Justin French
Hi, Just do a test on the result of the image URL field, and if the field value is "null" (or ""), change the field to a default image URL... "; ?> Justin French Creative Director http://Indent.com.au on 28/03/02 2:32 PM, Chuck "PUP" Payne ([EMAIL

Re: [PHP] Help! Recent PHP security patch => high server load?

2002-03-27 Thread Rasmus Lerdorf
I don't really see how that patch could cause that. Any chance of an truss or a gdb backtrace or something on one of these guys to give us a clue? -Rasmus On Thu, 28 Mar 2002, Jason Murray wrote: > Hi folks, > > Just curious to know if anyone has experienced a high server > load since installi

[PHP] Uploading big files

2002-03-27 Thread pierre . marcandella
Hi, I need confirmation on this matter : The scripts I use to upload files work fine until the file exceed 7 M. No specific error message appears. The hidden input MAX_FILE_SIZE is included in the scripts. My scripts are running on php 4.1.2. The php.ini file is set up as follow : max

Re: [PHP] regex

2002-03-27 Thread Matt Moreton
preg syntax is different to ereg (which you are using). You also need to provide an output variable. This would work: preg_match( "/[0-9]+/", $input, $output ); -- Matt "Carl E Shmidt" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Now I'm looking to find

Re: [PHP] Uploading big files

2002-03-27 Thread Rasmus Lerdorf
> Is it because of the memory_limit that it doesn't work ? Yes > Do I have a way to upload files (over 7M) on the server without increasing the > memory_limit ? Not until PHP 4.2 -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] while loop: detect next loop?

2002-03-27 Thread Jason Wong
On Thursday 28 March 2002 05:20, Erik Price wrote: > On Wednesday, March 27, 2002, at 04:11 PM, Matt Friedman wrote: > > When you have all your items in an array use implode to add a character > > in between every item. > > > > $str = implode($yourArray, $separator); > > > > This will add the sep

[PHP] Get a specified amount of text?

2002-03-27 Thread Donald
In Visual Basic there is a function called left. usage: left(string, len) It allows you to get the first 'len' characters of 'string'. Is there a similar function in PHP? I have a value: "3.405" That I just want to crop to "3.40" If I pass "3.405" to MySQL it adds it like this: "3.41" Thanks -D

[PHP] How to write file containing shell script?

2002-03-27 Thread Dalton Hunter
Hi, I am trying to write a file that contains a shell script. The file writes to the server but when I try to execute it it fails with a command not found error. But if I copy and paste the files contents into a new text file using Textpad on my PC and upload it to the same directory it works?! It

Re: [PHP] Get a specified amount of text?

2002-03-27 Thread Miguel Cruz
On Sat, 23 Mar 2002, Donald wrote: > In Visual Basic there is a function called left. > usage: left(string, len) > It allows you to get the first 'len' characters of 'string'. > > Is there a similar function in PHP? > > I have a value: > "3.405" > That I just want to crop to "3.40" > If I pass "

Re: [PHP] How to write file containing shell script?

2002-03-27 Thread Miguel Cruz
On Wed, 27 Mar 2002, Dalton Hunter wrote: > Hi, I am trying to write a file that contains a shell script. The file > writes to the server but when I try to execute it it fails with a > command not found error. But if I copy and paste the files contents into > a new text file using Textpad on my PC

[PHP]:Remote mail access

2002-03-27 Thread Vimala
Hi, Does anyone have php scripts/program that can be used to access PINE mails (LINUX) from Netscape browser? Please help Thank you in advance vim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to write file containing shell script?

2002-03-27 Thread Dalton Hunter
"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Wed, 27 Mar 2002, Dalton Hunter wrote: > > Hi, I am trying to write a file that contains a shell script. The file > > writes to the server but when I try to execute it it fails with a > > command n

Re: [PHP] How to write file containing shell script?

2002-03-27 Thread Miguel Cruz
On Wed, 27 Mar 2002, Dalton Hunter wrote: > "Miguel Cruz" <[EMAIL PROTECTED]> wrote: >> Make sure you use unix-style line endings (just \n and no \r). > > Hi, thanks for your reply. I should have been a little clearer. The file is > created as a result of a PHP script not in TextPad. I am only co

Re: [PHP] How to write file containing shell script?

2002-03-27 Thread Jason Wong
On Thursday 28 March 2002 15:03, Dalton Hunter wrote: > them in Textpad afterward. For example the script contains ... > > > // BEGIN PHP SCRIPT THAT GENERATES SHELL SCRIPT > > $sbackup = "#!/bin/sh Do you actually terminate each line of your shell script with \n? ie shouldn't that be: $sback

Re: [PHP] How to write file containing shell script?

2002-03-27 Thread Miguel Cruz
On Thu, 28 Mar 2002, Miguel Cruz wrote: > Right. I think the "No such file or directory" message is because it's > failing to find an interpreter called "/bin/bash\r". Sorry, I mean "/bin/sh\r". Habit. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

Re: [PHP] How to write file containing shell script?

2002-03-27 Thread Dalton Hunter
"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Thu, 28 Mar 2002, Miguel Cruz wrote: > > Right. I think the "No such file or directory" message is because it's > > failing to find an interpreter called "/bin/bash\r". > > Sorry, I mean "/bin/sh\r

[PHP] does this newsserver work with office x entourage?

2002-03-27 Thread andy
Hi there, I am trying to get the php news on my apple machine. The newsgroups are listed and I can connect to the newsserver. Signing up for a newsgroup works, too. But the trouble starts, when I try to read the news. I am getting the message: can't find server did anybody experiance the same pr

[PHP] Re: PHP-CGI and script files not found

2002-03-27 Thread Donald
Hey, I tried to open a php file on my server that dosn't exist and php gave me a 404 error. I am running w2k, apache, php 4.1.2 as a module. Try having them run the php as a mod. with apache (if possible). -Donald www.magentica.com -- PHP General Mailing List (http://www.php.net/) To unsubs

[PHP] Break up query into pages using PHP from MsSQL

2002-03-27 Thread Dean Householder
I'm trying to split results into different pages and number the pages accordingly. I'm using PHP and accessing a MsSQL database. I've been able to build a fairly intelligent page numbering system which knows which rows it should pull (at least by numbering each row numerically) but I don't know ho

[PHP] login library

2002-03-27 Thread Michal Dvoracek
Hello, i want to write some application that requires users login. So i have question how i can check duplicity login (eg. browser crash, login from one computer using two browsers, ...). I need some idea (the best will be some example code :) ). Thank you. Michal Dvoracek

Re: [PHP] login library

2002-03-27 Thread Andrey Hristov
For example use session_ids. This does not mean that use MUST use PHP session module. Store a unique string in the DB and set it as cookie for the user. When someone logs generate a string, write it in the members table and old session is removed, so the user with old session will be not able to

<    1   2