[PHP] Re: search parse?

2002-06-15 Thread Jason Morehouse
If you use fulltext search (assuming you are using MySQL), it deals with stop words on its own as well as some additional search logic. http://www.mysql.com/doc/F/u/Fulltext_Search.html -J On Sat, 15 Jun 2002 10:19:04 +1200, Ed Lazor wrote: Does anyone have a good function for parsing a

[PHP] Re: Evaluation. Easy Question but I need some help

2002-06-15 Thread Jason Morehouse
input type=checbox value=1 name=check? if($_POST[check] == 1) { print ' checked';}? -J On Sat, 15 Jun 2002 04:53:11 +1200, Dan McCullough wrote: I'm trying to evaluate form submissions. When I return a form submission cause of a missing field I want the radio and checkboxes to reflect what

Re[4]: [PHP] Re: php server on Windows

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 3:48:03 AM, you wrote: An opinion was requested, and I gave it. And everyone is entitled to an opinion, but what you gave was the typical down with windows response when you clearly have not evidence to back it up. I will make a few pointed comments and then I

[PHP] Downside to using login sessions?

2002-06-15 Thread Leif K-Brooks
I am planning to change how my site stores logins to using sessions. Are there any reasons not to do this? Reasons against it I should know? Thanks for your input. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Downside to using login sessions?

2002-06-15 Thread Justin French
How is it currently storing it? Sessions are fine, depending on how the code is written, and the obviouse downside to COOKIE based sessions is that they will break on non-cookie browsers, so a smarter move is to use URL based sessions. A more focused question will of course result in a more

Re: [PHP] Confusion with the $_name $_type $_size Variable Extensions

2002-06-15 Thread Nathan Taylor
I know it has nothing to do with filesize because I am the server and I set the configuration. But lemme show you some code, maybe that'll help. Here we go: (please no ripping) function MyFiles() { global $username, $Upload, $Rename, $Delete, $PHP_SELF, $File, $File_size, $File_name,

Re: [PHP] Downside to using login sessions?

2002-06-15 Thread Leif K-Brooks
I'm currently storing the username and password directly in cookies (the password isn't even md5()'d). I'm just wondering if there's security risks/whatever in sessions. I've seen that most sites seem to store the login data directly in the cookie (with the password md5()'d). Is that

[PHP] PHP timeout

2002-06-15 Thread Kim Bauters
I'm running PHP script that check for the existance of certain pages on the web. The problem is that fopen to check for the existance of a page and this seems to consume time. It has to check for a nuber of pages, conforming to a certain pattern. This pattern is Ab# What I want to do is

Re: [PHP] Downside to using login sessions?

2002-06-15 Thread Nathan Taylor
As a general rule it is always good to store data that is secure in a encrypted format. My website for example uses a mysql database and I store the encrypted mysql password in the cookie so I get somethign like 435gcg34tsskhj57 to equal 123. It's far more secure because cookies are on the

Re: [PHP] Downside to using login sessions?

2002-06-15 Thread Justin French
Well, all passwords on my sites are stored md5'd, so i'm comparing an md5() of the password they have supplied with the one stored in the DB, so I don't need to know what the original password was -- only if the two encrypted passwords match. Since md5() is one-way encryption, it makes sense to

Re: [PHP] PHP timeout

2002-06-15 Thread Nathan Taylor
Hmm, I haven't heard of such a thing. That's kinda weird though because just yesterday I modified my timeout settings for my script that parses logfiles that are several thousand lines long, and it worked. Did you perhaps forget to reboot the server? If you have my suggestion is perhaps taking

Re: [PHP] PHP timeout

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 10:52:14 AM, Kim Bauters wrote: In the file php.ini, the 2 timeout settings are both changed from 30 to 300, but I keep on getting an error like CGI script Timeout. I think you'll find that's the IIS CGI timeout, not PHPs. You can find that setting in the site

Re: [PHP] PHP timeout

2002-06-15 Thread Kim Bauters
Hi, indeed, it is a IIS CGI timeout. However, when I take a look at the tab you gave me, I can only seem to find the tabs called App Mappings, App Options and App Debugging. Is this the right place and is the tab just missing or is there a problem on my behalf? thx Stuart Dallas [EMAIL

Re[2]: [PHP] PHP timeout

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 11:43:05 AM, Kim Bauters wrote: indeed, it is a IIS CGI timeout. However, when I take a look at the tab you gave me, I can only seem to find the tabs called App Mappings, App Options and App Debugging. Is this the right place and is the tab just missing or is

Re: [PHP] Regular expression newbie question, convert this: [::word1\ word2 \ word3::] to : .word1 word2 word3.

2002-06-15 Thread Lance
hi, thanks for the code. i tried. it only worked if the string is simply the one i wanna convert. but that particular string is in the middle of a long text, and there are multiple occurance, it won't. however, i did manage to come up with this code that worked. but i believe it can be

Re: Re[2]: [PHP] PHP timeout

2002-06-15 Thread Kim Bauters
hi, My IIS version is 5.0 Stuart Dallas [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Saturday, June 15, 2002 at 11:43:05 AM, Kim Bauters wrote: indeed, it is a IIS CGI timeout. However, when I take a look at the tab you gave me, I can only seem to find

[PHP] Re: Change Password

2002-06-15 Thread Jason Morehouse
No practical way I know of w/ PHP... Try (Perl): http://search.cpan.org/doc/SSNODGRA/Unix-ConfigFile-0.06/PasswdFile.pm Though I wouldn't be able to sleep at night knowing browsers had access to the passwd file! Cheers, -J On Fri, 14 Jun 2002 10:08:56 +1200, Brian V Bonini wrote: Anyone

[PHP] Re: Creatng a PHP chatroom

2002-06-15 Thread Jason Morehouse
http://stutter.screwdriver.net is a good clean example. -J On Thu, 13 Jun 2002 12:02:12 +1200, Phil Powell wrote: I am intrested in creating a chatroom entirely in PHP involving streaming text. Where can someone help me to find such a means of doing so? Thanx Phil

[PHP] Apache/2.0.36 + Win98 + PHP4=Error(31)

2002-06-15 Thread Prachait Saxena
Hello !!! I am using Apache/2.0.36 (Win32) DAV/2 on Win98. my server is running very fine when i use PHP4 as a interpreter. but as i use LoadModule to use PHP4 as a modules i am getting the error as (31) A device attached to the system is not functioning: This error also come when i try to

Re: [PHP] 'CC' and 'BCC' in mail function

2002-06-15 Thread Christoph Grottolo
Stuart Dallas wrote: On Friday, June 14, 2002 at 10:01:24 PM, Sridhar Moparthy wrote: Does any one know how to make mail() function to send mail to 'CC' and 'BCC' address. I have tried to keep 'CC' and BCC' in header, but it is not working. Mail function is sending the message to 'To'

Re: [PHP] Apache/2.0.36 + Win98 + PHP4=Error(31)

2002-06-15 Thread Chris Garaffa
Prachait, If I recall correctly, PHP 4.x doesn't work with Apache 2... Actually, no Apache 1.x modules do, because of the new apxs architechture. Apache 2 support is planned for the 4.3 release (someone correct me if I'm wrong). On UNIX, I compiled with a -apxs2=[path] option to the configure

[PHP] massive find/replace on MySQL db

2002-06-15 Thread Steve Clay
Hello, I've inherited a MySQL db (4MB on disk) that's riddled with inconsistent storage of character entities from being pasted from Word. At very least I hope to convert all quotes #145; - #148; to HTML's #34; and #39;. I imagine I'll run a big query, save the id's needing edit in a file than

Re: [PHP] massive find/replace on MySQL db

2002-06-15 Thread Julie Meloni
SC I've inherited a MySQL db (4MB on disk) that's riddled with SC inconsistent storage of character entities from being pasted from SC Word. At very least I hope to convert all quotes #145; - #148; SC to HTML's #34; and #39;. For each entity you wanted to replace, you could: update tablename

[PHP] saving a jpeg via HTTP

2002-06-15 Thread Jeff Bearer
What is the best way using only PHP to grab a image file off a website a d save it locally? I know I can use wget and this would be a piece of cake, but in this case I don't want to rely on external programs. I'm trying to read it with fsockopen and writing it with fopen to the file but the

Re[2]: [PHP] massive find/replace on MySQL db

2002-06-15 Thread Steve Clay
Saturday, June 15, 2002, 11:11:49 AM, Julie wrote: JM update tablename set fieldwithcrap = replace(fieldwithcrap, JM 'oldstring', 'newstring'); Julie, lovely solution and shockingly fast. Thanks. Steve -- [EMAIL PROTECTED] ** http://mrclay.org -- PHP General Mailing List

Re[2]: [PHP] Apache/2.0.36 + Win98 + PHP4=Error(31)

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 3:34:06 PM, Chris Garaffa wrote: If I recall correctly, PHP 4.x doesn't work with Apache 2 There is a module specifically for Apache 2 in PHP 4.2.0 onwards. I'm not sure what error using the module for Apache 1.3.x would produce. This could be the problem. The

Re: [PHP] Regular expression newbie question, convert this: [::word1 \ word2 \ word3::] to : .word1 word2 word3.

2002-06-15 Thread Analysis Solutions
Hi Lance: On Sat, Jun 15, 2002 at 06:54:24PM +0800, Lance wrote: hi, thanks for the code. i tried. it only worked if the string is simply the one i wanna convert. but that particular string is in the middle of a long text, and there are multiple occurance, it won't. Strange. It should

Re: [PHP] saving a jpeg via HTTP

2002-06-15 Thread Nathan Taylor
Perhaps you could try a cURL or some other FTP approach? - Original Message - From: Jeff Bearer Sent: Saturday, June 15, 2002 11:16 AM To: [EMAIL PROTECTED] Subject: [PHP] saving a jpeg via HTTP What is the best way using only PHP to grab a image file off a website a d save it locally?

[PHP] Can't set a cookie?

2002-06-15 Thread Lazor, Ed
Hi Everyone, Any idea why I'm getting this error? Warning: setcookie() expects parameter 3 to be long, string given in *my script* on line 2 Here's the entire script generating the error: ?php setcookie(mytest, 1, , /); ? The script doesn't work on a new hosting service I subscribed to, but

Re: [PHP] Can't set a cookie?

2002-06-15 Thread Julie Meloni
LE Any idea why I'm getting this error? LE Warning: setcookie() expects parameter 3 to be long, string given in *my LE script* on line 2 LE setcookie(mytest, 1, , /); It needs the time to be something not null. If you mean to set 0, use 0 instead of . Or, time()+somenum (not in quotes). -

Re: [PHP] Can't set a cookie?

2002-06-15 Thread Nathan Taylor
The 3rd parameter is an optional time to expire parameter, if you don't want to set it, leave it out. setcookie(cookiename,value); works fine - Original Message - From: Lazor, Ed Sent: Saturday, June 15, 2002 11:48 AM To: php-general Subject: [PHP] Can't set a cookie? Hi Everyone,

Re: [PHP] saving a jpeg via HTTP

2002-06-15 Thread Daniel Tryba
On Sat, Jun 15, 2002 at 11:15:42AM -0400, Jeff Bearer wrote: I'm trying to read it with fsockopen and writing it with fopen to the file but the file is no good when it's saved, I saw that it saved the http headers in there so I cut those out but still, the image wan't viewable. Are you

Re: [PHP] saving a jpeg via HTTP

2002-06-15 Thread Daniel Tryba
On Sat, Jun 15, 2002 at 06:02:58PM +0200, Daniel Tryba wrote: This works for me: Hmmm, one while(!feof()) to many not that it really matters :) ?php if($fi=fsockopen(host,80)) { fputs($fi,GET /image.gif HTTP/1.0\r\n\r\n); while(!preg_match(/^\r?\n$/,fgets($fi,1024))); //skip headers

RE: [PHP] massive find/replace on MySQL db

2002-06-15 Thread John Holmes
Yeah, do it all with regular queries. You shouldn't have to do any replacing in PHP. You can even use the MySQL regular expressions in your query for some more complex matching and replacing... It's all in the manual... ---John Holmes... -Original Message- From: Julie Meloni

[PHP] Search - 'AND' ... 'OR'

2002-06-15 Thread Scott 'INtense!' Reismanis
Hey all, I am in the middle of writing a script to allow users to search through news archives on my website. Anyhow I am just wondering which logic you believe best suits a search. i.e. say a user types in 'games AND playstation' then only results containing both those words will be returned

RE: [PHP] Can't set a cookie? [SOLVED]

2002-06-15 Thread Lazor, Ed
Thanks for your help Everyone =) I needed the 3rd parameter set in order to specify the fourth /, because the cookie is being set by a script located in a sub-directory. One of the old documents I read said would work as the third parameter - and it did on my old servers. Setting the third

RE: [PHP] Search - 'AND' ... 'OR'

2002-06-15 Thread Lazor, Ed
Funny. I asked a very similar question the other day. Jason Morehouse was nice enough to offer this advice: If you use fulltext search (assuming you are using MySQL), it deals with stop words on its own as well as some additional search logic. http://www.mysql.com/doc/F/u/Fulltext_Search.html

[PHP] Parsing Text File

2002-06-15 Thread Jason D. Williard
I am trying to input data from a text file into a MySQL database and would like to be able to input the data using a single script. What's the easiest way to parse a line, such as below, and turn it into variables to be placed in the database. While I can simply place the data in by importing

Re: [PHP] Regular expression newbie question, convert this: [::word1\ word2 \ word3::] to : .word1 word2 word3.

2002-06-15 Thread Lance
hi, i was developing an application that will read in the content of a html file. and within this html file contains php variables which will be replaced using the eval() function with its required value. and within this html, i want to be able to run php functions. however, due to the fact

Re[4]: [PHP] PHP timeout

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 11:58:44 AM, Kim Bauters wrote: My IIS version is 5.0 Hmm, same as mine. Have a look in the master properties of the server. If it's not there then I suggest you search the MS site for help. -- Stuart -- PHP General Mailing List (http://www.php.net/) To

[PHP] Can I use a template with this site?

2002-06-15 Thread Randum Ian
Hi All, Hope you are all well. I am coding a website for a client and they involve a series of files: logobanner.php navbar.php leftmenu.php main.php rightmenu.php copyright.php These are all just simple HTML files which are placed in a Global dir apart from main.php which is in the same dir

php-general Digest 15 Jun 2002 19:41:07 -0000 Issue 1407

2002-06-15 Thread php-general-digest-help
php-general Digest 15 Jun 2002 19:41:07 - Issue 1407 Topics (messages 102319 through 102358): Re: Evaluation. Easy Question but I need some help 102319 by: Jason Morehouse Re: php server on Windows 102320 by: Stuart Dallas Downside to using login sessions? 102321

Re: [PHP] Parsing Text File

2002-06-15 Thread Nathan Taylor
This is all really straight forward stuff. Here's some code that will get the file parsed to an array, what you do from there is up to you. ?php $open = fopen(file.txt,r+); while($contents = fgets($open)) { $line_array[$x] = $contents; $x++; } ? Note: if you have a precise structure for

Re[2]: [PHP] Parsing Text File

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 9:05:40 PM, Nathan Taylor wrote: ?php $open = fopen(file.txt,r+); while($contents = fgets($open)) { $line_array[$x] = $contents; $x++; } ? This wheel exists: http://www.php.net/file ?php $line_array = file('file.txt'); ? -- Stuart -- PHP General

[PHP] PHP LICENCE

2002-06-15 Thread Kevin Waterson
Just how much can the php name be used in applications? The license says 3. The name PHP must not be used to endorse or promote products derived from this software without prior permission from the PHP Group. This does not apply to add-on libraries or tools that work in

[PHP] printf()

2002-06-15 Thread Gerard Samuel
Im trying to make a dynamic printf(). By that I mean - function this($foo, $bar) { if (strlen($bar) == '0') { print($foo); } else { printf($foo, $bar); } } Now it works if there is one argument passed, but it doesn't when there is more than one. $str =

[PHP] Determine week

2002-06-15 Thread Rosen
Hi, how can I determine dates (start end ) in one week. I.e. 30th week is between 22.07.2002 and 28.07.2002 . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] printf()

2002-06-15 Thread Danny Shepherd
On Sunday 16 June 2002 12:46 am, Gerard Samuel wrote: Im trying to make a dynamic printf(). By that I mean - function this($foo, $bar) { if (strlen($bar) == '0') { print($foo); } else { printf($foo, $bar); } } Now it works if there is one

Re: [PHP] printf()

2002-06-15 Thread Gerard Samuel
Well I figured out a solution. Using a combination of explode() to create an array from $bar, check to see if $bar is an array and feed the array to vprintf() Gerard Samuel wrote: Im trying to make a dynamic printf(). By that I mean - function this($foo, $bar) { if (strlen($bar)

[PHP] Sharing form information

2002-06-15 Thread Frank Kicenko
Hi, Hopefully I didn't send this to the wrong list...:-) I have a couple of questions if you don't mind... the PHP help files seem to be very vague with respect to html issues. Questions: How can I get the selected info from a selectbox that is in another form on the same page... I've tried

Re: [PHP] printf()

2002-06-15 Thread Danny Shepherd
On Sunday 16 June 2002 1:13 am, Gerard Samuel wrote: check to see if $bar is an array and feed the array to vprintf() Wow, didn't even know that one existed! Might come in handy though :) Danny. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Sharing form information

2002-06-15 Thread Justin French
on 16/06/02 10:42 AM, Frank Kicenko ([EMAIL PROTECTED]) wrote: I have a couple of questions if you don't mind... the PHP help files seem to be very vague with respect to html issues. Questions: How can I get the selected info from a selectbox that is in another form on the same page...

Re: [PHP] Regular expression newbie question, convert this: [::word1 \ word2 \ word3::] to : .word1 word2 word3.

2002-06-15 Thread Analysis Solutions
Hi Lance: On Sun, Jun 16, 2002 at 01:31:45AM +0800, Lance wrote: i was developing an application that will read in the content of a html file. and within this html file contains php variables which will be replaced using the eval() function with its required value. and within this html,

RE: [PHP] Determine week

2002-06-15 Thread John Holmes
You'll need a combination of date() and mktime(). I'm too lazy to write the exact code right now, but date('w') will return the day of the week, 0 = Sunday, 6 = Saturday. Then use mktime() to subtract the number returned from date('w') from the days component, and you'll have the start of the

Re: [PHP] row pointer

2002-06-15 Thread Analysis Solutions
Zac: foreach($kywrd as $val) { $fndWrds .= wrd = '$val' OR ; } FYI, a simpler way to do that... $fndWrds = wrd IN (' . implode(',', $kywrd) . '); That aside, w/o completely analyzing your entire set of code, it sounds like John is on the right track with putting a unique index on the wrd

Re: [PHP] Parsing Text File

2002-06-15 Thread Analysis Solutions
403 -770 -4904 ,CALGARY,AB,CAN,T2,Y,Y,Apr 29 2002 12:00:00:000AM,I,GMT-0700,, Untested, off the top of my head, code... $pointer = fopen('./file.csv', 'r'); while ( $Data = fgetcsv($pointer, 500) ) { # Do what you need, for example... echo 'Their city is: ' . $Data[1]; } --Dan --

[PHP] Passing value between 2 Flash movies

2002-06-15 Thread J0s
Hi, Does anyboy know how to pass values between 2 Flash movies. Thanks. JS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Apache/2.0.36 + Win98 + PHP4=Error(31)

2002-06-15 Thread PHPGeek
It does work: jwynia.myvnc.com/phpinfo.php. Is experimental, but it does work on Windows. Chris Garaffa wrote: Prachait, If I recall correctly, PHP 4.x doesn't work with Apache 2... Actually, no Apache 1.x modules do, because of the new apxs architechture. Apache 2 support is planned for

RE: [PHP] Can I use a template with this site?

2002-06-15 Thread César Aracena
Hi Ian, I don't know if I'm getting the hole idea of what you're looking for, but here's something. I'm using a schema that was written by Ying Zhang for the myMarket PHP application which is like this: a) One main file which holds all the site's configurations, like DB settings and golbals (OO

Re: [PHP] Can't set a cookie? [SOLVED]

2002-06-15 Thread C
I've recently been learning about cookies myself, and had the same problem with vs. 0 (PHP FastEasy Web Development showed the in their book). I know that setting the expire parameter to 0 is supposed to kill the cookie when browser is closed, but I can't seem to make that happen. I've

[PHP] Code Structure/Errors

2002-06-15 Thread Jason Soza
I'm just curious if there's a way to restructure my code so as to avoid getting Undefined Variable errors. I keep getting them and I know they're nothing to worry about for the most part, I'd like to get rid of them without turning off error reporting if possible. In the following code, I get an

Re: [PHP] Code Structure/Errors

2002-06-15 Thread Pushkar Pradhan
Quick soln. is to put a symbol in front of the error generating line. E.g.@$i++; actual soln. would be to do some initialization like $i = 0; outside your while loop and $last_name=; I'm just curious if there's a way to restructure my code so as to avoid getting Undefined Variable errors. I

Re: [PHP] Apache/2.0.36 + Win98 + PHP4=Error(31)

2002-06-15 Thread Prachait Saxena
Hi I had downloaded new PHP 4.2.1 from www.php.net and add its modules in Apache Now It is working very fine. But Same Problem in SSL and Perl, So can any one tell me where can i get modules for this Thanks in Advance Prachait Phpgeek [EMAIL PROTECTED] wrote in message [EMAIL