Re: [PHP] Re: help condensing regular expressions

2002-04-06 Thread Tom Rogers
Hi I have never used .htaccess but I'll read up on it, I am the ISP so it won't be a problem :) Tom At 06:12 PM 6/04/2002, Chris Adams wrote: In article [EMAIL PROTECTED], Tom Rogers wrote: Thats what I was after :) Glad I could help. At the top of each page I now do $reltoroot =

[PHP] Re: Headers not working

2002-04-06 Thread Michael Virnstein
this might be because you use the cgi version of php. to be able to send e.g. 404 header, you have to run php as webserver module which currently only works with apache and linux afaik. otherwise these headers get send by the webserver and you cannot affect them. if you use php with apache as

[PHP] limit posts and have a next page?

2002-04-06 Thread Hawk
This is just speculations, but I thought I'd as well ask now before I get to work Lets say I have a news page, and I only want the last ten posts to show on it, then I ORDER BY id ASC LIMIT 10 right? but how do I add the next page? count rows from the database and see if its more than 10 lines,

Re: [PHP] limit posts and have a next page?

2002-04-06 Thread Jason Wong
On Saturday 06 April 2002 16:57, Hawk wrote: This is just speculations, but I thought I'd as well ask now before I get to work Lets say I have a news page, and I only want the last ten posts to show on it, then I ORDER BY id ASC LIMIT 10 right? but how do I add the next page? count rows

[PHP] htmlentities

2002-04-06 Thread Joerg Hanke [ML-php]
hi! i've got the following problem and hope one of you is able to help me solving that: i've got a system in php that writes data (e.g. variable-name = $data) to a mysql database. there are two more scripts: one for displaying the data and one for writing the data into a formular. the

Re: [PHP] nl2br returns BR /? normality or a bug?

2002-04-06 Thread James Arthur
On Saturday 06 Apr 2002 07:56, Miguel Cruz wrote: On Sat, 6 Apr 2002, Justin French wrote: on 06/04/02 11:05 AM, Maxim Maletsky ([EMAIL PROTECTED]) wrote: It DOES NOT work fine in every browser. I'd love to give you a prov, but because I am lazy I will just tell you this formula:

Re: [PHP] htmlentities

2002-04-06 Thread Jason Wong
On Saturday 06 April 2002 18:34, Joerg Hanke [ML-php] wrote: hi! i've got the following problem and hope one of you is able to help me solving that: i've got a system in php that writes data (e.g. variable-name = $data) to a mysql database. there are two more scripts: one for displaying

[PHP] using font properties in generated posts.

2002-04-06 Thread Randum Ian
Hi there, I want to use text in a textarea to be submitted and converted into an email with Rich Text. Can someone please tell me what I need to add in the additional headers in order for me to do this please? Kind Regards, Ian Roke Webmaster, DancePortal (UK) Limited [EMAIL PROTECTED]

[PHP] How to convert a website to a txtfile....?

2002-04-06 Thread Raymond Lilleodegard
Hi! I have this website with a webshop that customers can order some products. And when the products are listed up in the cart on the screen, would I like to get the output into a new txtfile and save it on the server. Then it is possible to get it faxed, and that is the goal. Anyone who has

[PHP] regular expressions: HUGE speed differences

2002-04-06 Thread Ando
Im using a regular expression, to get all urls from a file. When using it on the webserver, it processes a 25kb html file about 0.25 seconds (PIII 350, 128mb ram, linux 2.2.13-7mdk, php 3.0.12). When i try the same on my machine (Celeron 300A, 192mb ram.), it does it about 14-17 seconds, which

[PHP] Executing functions within ereg_replace() output

2002-04-06 Thread Adam Wan
I'm really curious as to how to output data from ereg_replace() in a standard way. I'm familiar with \\1 to ouput the original string, but not sure as to how I can use functions within the output parameter to process this value further. - // here is a simple example of what

[PHP] Mystery Binary Characters in My Files

2002-04-06 Thread Jeff Levy
or How I Learned To Stop Breathing and Oxygenate By Osmosis... Hello, I'm having a problem, hopefully the experts in this group can help me around it. I read in the contents of an old mysql database, and made XML files out of the data contained in it. The total job came out to about 6800

[PHP] F/U on Returned Mail

2002-04-06 Thread Anthony Rodriguez
In line 6 (below) I tried both Return_Path:[EMAIL PROTECTED] and [EMAIL PROTECTED]. I still don't get back the e-mail sent to a non-existent address. Can you help? Thank you! Anthony Rodriguez ([EMAIL PROTECTED]) --- PHP script --- (1) ?php (2) mail([EMAIL PROTECTED], (3) Test, (4) Test,

Re: [PHP] F/U on Returned Mail

2002-04-06 Thread Jason Wong
On Saturday 06 April 2002 21:33, Anthony Rodriguez wrote: In line 6 (below) I tried both Return_Path:[EMAIL PROTECTED] and There needs to be a space after the colon - Return_Path: [EMAIL PROTECTED] -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems

Re: [PHP] regular expressions: HUGE speed differences

2002-04-06 Thread heinisch
PIII 400MHz, 512Mb, SuSe 6.4, 2.2.14 smp, php 3.0.16, Completed in 0.76187908649445 seconds PIII 350MHz, 256Mb, Suse 7.3, 2.4.9, php 4.0.6, Completed in 2.6342689990997 seconds File Size:28537kb, But for real tests, send the original file you use direct BTW How the hell did you develop this

Re: [PHP] F/U on Returned Mail

2002-04-06 Thread heinisch
At 06.04.2002 08:33, you wrote: In line 6 (below) I tried both Return_Path:[EMAIL PROTECTED] and [EMAIL PROTECTED]. I still don't get back the e-mail sent to a non-existent address. Can you help? (1) ?php (2) mail([EMAIL PROTECTED], (3) Test, (4) Test, (5) From:SBW Research [EMAIL

Re: [PHP] Mystery Binary Characters in My Files

2002-04-06 Thread heinisch
At 06.04.2002 08:36, you wrote: I read in the contents of an old mysql database, and made XML files out of the data contained in it. The total job came out to about 6800 files, or Documents. I'm finding that, sporadically, when reading these XML files, and passing the xmldata to sablotron, I'm

Re: [PHP] F/U on Returned Mail

2002-04-06 Thread Jason Wong
On Saturday 06 April 2002 22:58, [EMAIL PROTECTED] wrote: Maybe you should replace \r\n by a single \n (only a suggestion as I work on LAMP, never dealed with \r\n, but never had probs) The standard (ie correct) way is \r\n. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open

Re: [PHP] limit posts and have a next page?

2002-04-06 Thread The_RadiX
Yes I have built many a forums and product listings/search engines like this.. simply make it check using COUNT how many rows there are total.. now let's say your viewing page 1.. so we can see listing 1 - 10 therefore the first offset is 1 so the next set will logically be 11-20 so with

[PHP] - Flock manual clarification please ;-)

2002-04-06 Thread Matt Friedman
From the manual: snip Note: Because flock() requires a file pointer, you may have to use a special lock file to protect access to a file that you intend to truncate by opening it in write mode (with a w or w+ argument to fopen()). /snip The manual indicates that you may need to use a special

Re: [PHP] Mystery Binary Characters in My Files

2002-04-06 Thread Jeff Levy
I already do an htmlentities/specialchars on input data, but some of these characters are still creeping in... is there any way, on fread(), to strip out these boolsh*t chars? On Sat, 06 Apr 2002 10:04:11 -0500, heinisch wrote: At 06.04.2002 08:36, you wrote: I read in the contents of an

[PHP] how to sort by value in associative array

2002-04-06 Thread Peter J. Schoenster
Hi, I have the array below and I want to sort on language. Can't figure it out. Below the array is what I tried $ArrayOfNewsLinks = array( http://dailynews.yahoo.com/fc/World/Brazil/; = array( title = 'Yahoo Brazil News', category = 'news', language = 'English', ),

[PHP] MAC file upload

2002-04-06 Thread Shane McBride
Hello, I am able to upload and download Macintosh files but they seem to lose their MIME type or extensions. I'm not sure what it is. I'm not a Mac dude. When you download the file It loses the file association. It's for a company I do work for that uses a lot of .ai and .psd files. Any ideas

Re: [PHP] Can't get this code to work...

2002-04-06 Thread Analysis Solutions
On Sat, Apr 06, 2002 at 12:32:33AM -0500, Analysis Solutions wrote: input type=checkbox name=checkbox['Name'] value=validate / And following up to my own following up... As I shut down the computer, I realized I made a boo boo. The single quotes shouldn't be there. So, make that:

[PHP] Newbie and includes

2002-04-06 Thread Dean Ouellette
Newbie who has my include working with this ?php include ('includes/footer.php'); ? Problem is when I try to use this with files in other directories I use ?php include ('/includes/footer.php'); ? Then get file cannot be found. Is there a way to do this? Dean

[PHP] Re: Newbie and includes

2002-04-06 Thread Timothy J. Luoma
On Sat, 6 Apr 2002, Dean Ouellette wrote: Newbie who has my include working with this ?php include ('includes/footer.php'); ? Problem is when I try to use this with files in other directories I use ?php include ('/includes/footer.php'); ? Then get file cannot be found. Is there a way

Re: [PHP] MAC file upload

2002-04-06 Thread Miguel Cruz
On Sat, 6 Apr 2002, Shane McBride wrote: I am able to upload and download Macintosh files but they seem to lose their MIME type or extensions. I'm not sure what it is. I'm not a Mac dude. When you download the file It loses the file association. It's for a company I do work for that uses a

[PHP] HELP!

2002-04-06 Thread Georgie Casey
I need to execute a script on another server in one of my scripts, eg by visiting a link http://www.com.com/script.php?var1=blahvar2=blah i cant use curl or sockets as my server dont have them insatlled. what other options do i have? the variables being passed are sensitive so they cant be

Re: [PHP] using font properties in generated posts.

2002-04-06 Thread Miguel Cruz
On Sat, 6 Apr 2002, Randum Ian wrote: Hi there, I want to use text in a textarea to be submitted and converted into an email with Rich Text. Can someone please tell me what I need to add in the additional headers in order for me to do this please? Content-Type: text/enriched

Re: [PHP] HELP!

2002-04-06 Thread Miguel Cruz
On Sat, 6 Apr 2002, Georgie Casey wrote: I need to execute a script on another server in one of my scripts, eg by visiting a link http://www.com.com/script.php?var1=blahvar2=blah i cant use curl or sockets as my server dont have them insatlled. what other options do i have? the variables

Re: [PHP] How to convert a website to a txtfile....?

2002-04-06 Thread Miguel Cruz
On Sat, 6 Apr 2002, Raymond Lilleodegard wrote: I have this website with a webshop that customers can order some products. And when the products are listed up in the cart on the screen, would I like to get the output into a new txtfile and save it on the server. Then it is possible to get it

Re: [PHP] nl2br returns BR /? normality or a bug?

2002-04-06 Thread Justin French
links 0.96 lynx 2.8.3 Opera 5.0.498 (Mac) IE 5.1.3 (Mac) Mozilla 0.9.9 (Mac) Netscape 6.1 (Mac) Add Konqueror on Linux to this list. Also note that links 0.84 (the latest version on Debian Stable) does _not_ parse XHTML tags correctly. Okay, I've tested it on everything I've got, and

[PHP] redirector

2002-04-06 Thread Joerg Hanke [ML-php]
hi, i've got the possibility to create alias subdomains, which redirect all to the document-root... e.g.: http://adam.domain.com redirects to http://domain.com i want to redirect the users who access http://adam.domain.com to http://domain.com/home/adam how to do this best in php??

Re: [PHP] Can't get this code to work...

2002-04-06 Thread Rob Packer
Dan, Really, thanks for the help. Yeah, as you know I'm not experienced near enough with PHP. Maybe you could provide me with an e-mail and prices for consultation(I suppose this is what 'Analysis Solutions' does?) Regards, Robert Packer Analysis Solutions [EMAIL PROTECTED] wrote in

Re: [PHP] redirector

2002-04-06 Thread Miguel Cruz
On Sat, 6 Apr 2002, Joerg Hanke [ML-php] wrote: i've got the possibility to create alias subdomains, which redirect all to the document-root... e.g.: http://adam.domain.com redirects to http://domain.com i want to redirect the users who access http://adam.domain.com to

[PHP] superglobals -sessions-clookies

2002-04-06 Thread cyberskydive
I think I've got down how to use the new superglobals with data sent from forms using whichever method needed. Now I need to learn how to do it with sessions! this is what I'm trying to accomplish. my website/ client list is growing and I want to add the ability for them to login, edit account

[PHP] PHP on Apache 2.0 -- Does it work?

2002-04-06 Thread Steve Magruder, D2 Director
Hello, I'm currently running PHP 1.1.2 on Apache 1.3.24/Win2K in SAPI mode (and this configuration has run incredibly well since last summer, albeit with changing PHP and Apache sub-versions). I couldn't find any info at php.net that indicated whether the current or the next version of PHP

Re: [PHP] superglobals -sessions-clookies

2002-04-06 Thread heinisch
At 06.04.2002 12:48, you wrote: I think I've got down how to use the new superglobals with data sent from forms using whichever method needed. Now I need to learn how to do it with sessions! this is what I'm trying to accomplish. my website/ client list is growing and I want to add the

[PHP] Re: redirector

2002-04-06 Thread phplists
First things first, when you say domain.com/home/adam do you mean /home/httpd/htdocs/home/adam or /home/adam/public_html.. Once you know that you can make a more educated decision.. Either way, you should be able to specifiy DocumentRoot /home/adam/public_html or DocumentRoot

Re: [PHP] nl2br returns BR /? normality or a bug?

2002-04-06 Thread Lars Torben Wilson
On Fri, 2002-04-05 at 18:34, Justin French wrote: on 06/04/02 11:05 AM, Maxim Maletsky ([EMAIL PROTECTED]) wrote: You're deadly wrong, Justin. Years of coding and I have never seen this behavior of nl2br(). Perhaps I missed its new behavior's introduction (guilty as charged if so) but I

php-general Digest 6 Apr 2002 20:30:48 -0000 Issue 1271

2002-04-06 Thread php-general-digest-help
php-general Digest 6 Apr 2002 20:30:48 - Issue 1271 Topics (messages 91849 through 91888): Re: help condensing regular expressions 91849 by: Tom Rogers Re: Headers not working 91850 by: Michael Virnstein limit posts and have a next page? 91851 by: Hawk

[PHP] Re: regular expressions: HUGE speed differences

2002-04-06 Thread Chris Adams
On Sat, 06 Apr 2002 15:01:24 +0300, Ando [EMAIL PROTECTED] wrote: (eregi((frame[^]*src[[:blank:]]*=|href[[:blank:]]*=|http-equiv=['\]refresh['\] You might want to try using preg_match instead. The PCRE engine should be significantly faster. You might also find the ability to pass an array of

[PHP] Re: how to sort by value in associative array

2002-04-06 Thread Chris Adams
On Sat, 6 Apr 2002 10:36:18 -0600, Peter J. Schoenster [EMAIL PROTECTED] wrote: $ArrayOfNewsLinks = array( http://dailynews.yahoo.com/fc/World/Brazil/; = array( title = 'Yahoo Brazil News', category = 'news', language = 'English', ), ... function cmp ($a, $b) { if

[PHP] The PHP Filter did not receive suitable input data

2002-04-06 Thread bvr
Hello! I'm expirimenting with apache 2 and PHP, I've got things running but there's one problem left: When I request a directory, and the index is a PHP script, the following error is reported to the client: 'The PHP Filter did not receive suitable input data' Apache also reports this

Re: [PHP] Re: redirector

2002-04-06 Thread Bob
Well, then you probably can't do much with Apaches mod_rewrite then either.. I know of a Javascript command for doing that history.replace() but if you're looking for something in PHP, I'm pretty new to PHP and don't know of anything offhand.. My programmer integrates some Javascript into our

Re: [PHP] Re: redirector

2002-04-06 Thread Bob
Oh hey, I found this.. It looks like it might be something along the lines of what you need.. http://www.php.net/manual/en/function.header.php#AEN23288 Now that I look back through the stuff my programmer did that I send earlier, he uses the header() function.. I just has to be send first and

Re: [PHP] Re: how to sort by value in associative array

2002-04-06 Thread Peter J. Schoenster
On 6 Apr 2002, at 14:38, Chris Adams wrote: On Sat, 6 Apr 2002 10:36:18 -0600, Peter J. Schoenster [EMAIL PROTECTED] wrote: $ArrayOfNewsLinks = array( http://dailynews.yahoo.com/fc/World/Brazil/; = array( title = 'Yahoo Brazil News', category = 'news', language =

[PHP] Re: Executing functions within ereg_replace() output

2002-04-06 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Adam Wan) wrote: $content = 'string string 12463409834234 string string'; $content = ereg_replace( [0-9]{14} , substr(\\1,0,5) , $content ); // this is the output i want, but the above doesnt seem to be the right way to generate it.

RE: [PHP] nl2br returns BR /? normality or a bug?

2002-04-06 Thread Maxim Maletsky
Thanks Torben, I have rushed into this discussion because I didn't know anything about this change. Later on I've discovered the rest. Thank you all. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original

[PHP] What's wrong with php??

2002-04-06 Thread Gerard Samuel
Well yesterday, my test box went down because of the powersupply failed. I replaced it today, and I just so happened to pull up a phpinfo() page, and it would display half the page and hang. The test site seems to be operating normally, but phpinfo page isn't like it should. I tried

[PHP] Phone number validation

2002-04-06 Thread Gary
Hi All, I tried to cut a corner and use an alphabetic validation I am using elsewhere $stuff = /^[a-zA-Z]+$/; if(preg_match($stuff, $value)) looks like I forgot about +( )- being in phone number. What is the easiest way to allow these 4 characters? Are there any other characters that

Re: [PHP] Phone number validation

2002-04-06 Thread Jason Cribbins
Some people use period '.' in between fields...me for one. Its an old habit I have although I forget where I picked that up from. I am sure it was when I was working overseas...maybe Asia where I saw all phone numbers using . between fields. - Original Message - From: Gary [EMAIL

Re: [PHP] Phone number validation

2002-04-06 Thread Justin French
FWIW, In Australia, phone numbers are commonly formatted with brackets for area codes: (03) 9876 5432 +61 (3) 9876 5432 +61 3 9876 5432 Also the usual array of +,-,.,etc I'd include ()'s in your reg exp for sure. Justin on 07/04/02 1:47 PM, Jason Cribbins ([EMAIL PROTECTED]) wrote: Some

Re: [PHP] Phone number validation

2002-04-06 Thread Richard Baskett
What I do is strip all non-numeric numbers out and just store the number as a string of numbers.. Then do validation on those numbers.. Make sure the right amount of numbers are there, valid country, city codes etc. Probably an easier approach :) Rick Nothing is more common than unsuccessful

[PHP] Can I fopen() files in .htaccess protected directories?

2002-04-06 Thread Dalton Hunter
Hi, does fopen() support the opening and reading of remote files in directories protected with .htaccess files like ... fopen(http://user:[EMAIL PROTECTED]/directory/file.php,r;); If not, is there an alternative way to do this? Thanks! -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] PHP on Apache 2.0 -- Does it work?

2002-04-06 Thread Tyler Longren
Well, php 4.1.2 for windows probably wasn't compiled to work with apache 2. Apache 2 has changed too much for the php developers to keep on top of it. If you were using unix/linux, you could compile php to work with apache 2, but since you're using Windows, you're stuck with using Apache 1.3.24

[PHP] /usr/bin/php Question

2002-04-06 Thread Chris Kay
Hi I have compiled php -with-apxs option and I read in the archives it don't create a /usr/bin/php. But I wish to run 2 scripts I have made by command line, I have the 2 scripts outside the web server Root. Is there a way to compile a php binary to use for my scripts? Or does someone have any

Re: [PHP] /usr/bin/php Question

2002-04-06 Thread Rasmus Lerdorf
Just compile again with --with-apxs On Sun, 7 Apr 2002, Chris Kay wrote: Hi I have compiled php -with-apxs option and I read in the archives it don't create a /usr/bin/php. But I wish to run 2 scripts I have made by command line, I have the 2 scripts outside the web server Root. Is

Re: [PHP] /usr/bin/php Question

2002-04-06 Thread Jason Wong
On Sunday 07 April 2002 13:18, Chris Kay wrote: Hi I have compiled php -with-apxs option and I read in the archives it don't create a /usr/bin/php. But I wish to run 2 scripts I have made by command line, I have the 2 scripts outside the web server Root. Is there a way to compile a php

Re: [PHP] What's wrong with php??

2002-04-06 Thread Tyler Longren
It's very possible something went horribly wrong with your entire box when your ps went out. Was is a violent outing (sparks), or was is silent (no sparking or explosions)? I've had violent ps failures really screw up some of my machines before. Tyler Longren Captain Jack Communications [EMAIL

[PHP] Re: Newbie and includes

2002-04-06 Thread G-no / |{iller
try ?php require (includes/footer.php) ? Hint: You May or may-not need parenthesis around includes/footer.php. Dean Ouellette [EMAIL PROTECTED] wrote in message 005801c1dd8c$4c6e9500$0200a8c0@yoda">news:005801c1dd8c$4c6e9500$0200a8c0@yoda... Newbie who has my include working with this ?php

Re: [PHP] Re: Newbie and includes

2002-04-06 Thread Rasmus Lerdorf
But you will most certainly need quotes. And no, you don't need the ()'s but it works for exactly the same reason that (1)+(2) is a valid expression with unneccesary brackets. -Rasmus On Sun, 7 Apr 2002, G-no / |{iller wrote: try ?php require (includes/footer.php) ? Hint: You May or

[PHP] move_uploaded_file returning true but not working

2002-04-06 Thread Leif K-Brooks
I run a site where users can, among other things, adopt virtual pets. I have several admisistrators on the site, and I am trying to create a thing that adds a new pet species through the administrator control panel without me having to ftp it. It takes four files: red happy, red sad, blue

[PHP] counter for HIGH traffic site

2002-04-06 Thread Craig Westerman
I'm needing counter for site that receives 60 to 80 hits a minute. Many I have tried cause excessive server load and need to be deactivated or they lose data and return to zero without warning. All tried so far have been written in Perl. Anyone here know of a PHP counter that would handle HIGH

RE: [PHP] How to convert a website to a txtfile....?

2002-04-06 Thread Sebastian A.
You can try using fopen() and fwrite(), they are the primary file manipulation tools you should use in this instance. -Original Message- From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 06, 2002 5:52 PM To: [EMAIL PROTECTED] Subject: [PHP] How to convert a

[PHP] Multiple Selection Menu Dilemma

2002-04-06 Thread Phillip S. Baker
Okay I have the following code so far. $sql = SELECT stass_warrior FROM staff_assignments WHERE stass_pos = $pos_id AND stass_weekend = $initiation; if (!$query = mysql_query($sql))error(mysql_error()); $query = mysql_fetch_row($query); $sql = SELECT