[PHP] fighting with functions

2003-11-21 Thread Sara Daugherty
I could use a little help. click on the link to see my php code for a project that creates an array with a list or items and their cost and calculates tax by using a function called getTax() and also creates a balance by adding the cost plus the tax in a second function called getBalance(). I

Re: [PHP] On-the-fly encryption

2003-11-21 Thread Evan Nemerson
On Wednesday 19 November 2003 09:43 am, Ray wrote: I want to do two-way encryption on a file coming through the web server. In this context, I would want to generate a public and private key, encrypt Do you have any idea how much time and (and entropy) is required to create a reasonably

RE: [PHP] fighting with functions

2003-11-21 Thread Bronislav Klucka
I'm not sure, if I understood, but try this: ?php $items = array ( 0 = array (item=car,price=1, tax=0.06 ), 1 = array (item=pencil,price=1, tax=0.06 ), 2 = array (item=book,price=14.95, tax=0.065) ); function GetTax($item){ return $item[price]*$item[tax]; } function

RE: [PHP] On-the-fly encryption

2003-11-21 Thread Bronislav Klucka
Hi, Little semantic correction, the function GetBalance($item) should be called GetFullPrice($item) because it returns full price of the item, but the $balance variable seems to be partial sum of the current item and previous items; Bronislv Klucka. -Original Message- From: Bronislav

RE: [PHP] fighting with functions

2003-11-21 Thread Bronislav Klucka
Hi, Little semantic correction, the function GetBalance($item) should be called GetFullPrice($item) because it returns full price of the item, but the $balance variable seems to be partial sum of the current item and previous items; Bronislv Klucka. -Original Message- From: Bronislav

Re: [PHP] XML Parsing....

2003-11-21 Thread Evan Nemerson
On Thursday 20 November 2003 08:18 am, Scott Fletcher wrote: Hi Everyone! I'm having a little trouble understanding how exactly to use the XML parser. I haven't found the right settings to set up the XML Parser's option because of no definition of the encoding setting in the XML tags I

Re: [PHP] fighting with functions

2003-11-21 Thread Evan Nemerson
First off, please try to refrain from cross-posting, especially to that degree. I'm not sure I interpreted the your intentions correctly. If not, could you try to be a little more precise in saying what you _want_ the code to do? The first thing that jumps out at me is in the function getTax.

[PHP] help me

2003-11-21 Thread mansour shahabi nezhad
I have php 4.3.4 installed on a winxp system . also i use apache 2.0.48 / mysql 4.0.15 When i try some php program like phpnuke7.0 the page opened very slowly. can you please send me the php.ini file that correct this problem ? Thank You Mansour

[PHP] Re: Using JavaScript variables in PHP

2003-11-21 Thread Lars V. Nielsen
You might be able to share values between PHP and JavaScript by using cookies. -- Lars V. Nielsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using JavaScript variables in PHP

2003-11-21 Thread Larry_Li
form method=post action=your_php_file.php input name=id /form in your_php_file.php, try select * from somedatabase where field=$id Mike Knittel [EMAIL PROTECTED] 11/20/2003 11:45 PM To: [EMAIL PROTECTED] cc: Subject:[PHP] Using JavaScript variables

[PHP] Removing security-problematic chars from strings

2003-11-21 Thread Troy S
Greetings, What is the best way to remove the characters from strings that may cause security problems? Namely, `, ', , , , \ and all non-printing strings. Did I miss any? Thanks. Troy

Re: [PHP] fighting with functions

2003-11-21 Thread Tom Rogers
Hi, Friday, November 21, 2003, 7:56:34 PM, you wrote: SD I could use a little help. click on the link to see my php code for a SD project that creates an array with a list or items and their cost and SD calculates tax by using a function called getTax() and also creates a SD balance by adding

[PHP] encyption using sha1?

2003-11-21 Thread Erin
Hi all, I need some help with storing passwords does anyone have any thoughts on sha1()? Any other ideas are welcome. Am i right in thinking that to use sha1 ya do this: $hashed_string = sha1{$string); R -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Removing security-problematic chars from strings

2003-11-21 Thread Erin
use preg_match or eregi : Troy S [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greetings, What is the best way to remove the characters from strings that may cause security problems? Namely, `, ', , , , \ and all non-printing strings. Did I miss any? Thanks. Troy --

RE: [PHP] Is there a way to use the strpos() for next string...

2003-11-21 Thread Ford, Mike [LSS]
On 20 November 2003 20:39, Scott Fletcher wrote: Yea, the manual is clear but honestly, don't know what the offset really meant since there is no definition or explaination of how the offset work. Well, I really don't know how much clearer the sentence that says The optional offset parameter

Re: [PHP] Re: mail -f option for removing nobody@localhost Return-Path

2003-11-21 Thread Burhan Khalid
Manuel Lemos wrote: [ snip ] Anyway, you may want to try this class that has work arounds to mail function bugs and emulates what you want by passing the Return-Path header: http://www.phpclasses.org/mimemessage Another good one is http://phpmailer.sourceforge.net PEAR also has a good Mail

RE: [PHP] encyption using sha1?

2003-11-21 Thread Nigel Jones
Last Message Messed Up So here goes again... $hashed_string = sha1{$string); is correct except use $hashed_string = sha1($string); - watch out for Curly Brackets they give you those annoying Phase Errors Resource: http://nz2.php.net/manual/en/function.sha1.php -Original Message- From:

Re: [PHP] encyption using sha1?

2003-11-21 Thread Richard Cook
Many thanks, youre right about those curl ones...lol R - Original Message - From: Nigel Jones [EMAIL PROTECTED] To: Erin [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, November 21, 2003 10:20 AM Subject: RE: [PHP] encyption using sha1? Last Message Messed Up So here goes

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread Adam i Agnieszka Gasiorowski FNORD
Troy S wrote: What is the best way to remove the characters from strings that may cause security problems? Namely, `, ', , , , \ and all non-printing strings. Did I miss any? Thanks. Do it the other way, allow only characters you know are safe and strip the rest. Use, for

[PHP] detaching and running php processes in the background

2003-11-21 Thread Gary C. New
What is the best way to detach and run a command line based php script in the background from a web-based php script, without the need for reporting? I have a web-based php script that gathers information and then passes it off to several functions, which execute several other php scripts.

Re: [PHP] echo or print

2003-11-21 Thread David T-G
Eugene, et al -- ...and then Eugene Lee said... % % p class=tonue-in-cheek % % Also, the letter 'e' is smaller than 'p', so ASCII-based function % lookups will be faster as well. Most of these speed increases can't be noticed in a small script, where the end is within a few lines, but echo()

[PHP] Crossed paths?

2003-11-21 Thread MIKE YRABEDRA
A customer of mine has recently started to see a weird error. He will get the typical 'open_basedir' error, but it will say his allowed path is another clients allowed path??? See an example below. Warning : Unknown(): open_basedir restriction in effect.

Re: [PHP] Two-way on-the-fly encryption

2003-11-21 Thread David T-G
Ray -- ...and then Ray said... % % I want to do two-way encryption on a file coming through the web server. In That's an interesting name for it. % this context, I would want to generate a public and private key, encrypt the % file stream (i.e., don't want to write the unencrypted file to

Re: [PHP] detaching and running php processes in the background

2003-11-21 Thread Burhan Khalid
Gary C. New wrote: What is the best way to detach and run a command line based php script in the background from a web-based php script, without the need for reporting? Try something like : if (!($handle = popen(script.sh 21 /dev/null , r))) { echo Couldn't run process; }

[PHP] free PHP OOP book - Web applications desgin

2003-11-21 Thread Nagib Abi Fadel
Hi, can anyone suggest a free PHP Object Oriented Programming book ... Or an Object Oriented Book for web applications. Plus i want to design customizable web pages: - I can change the hole layout by changing one file - If i change a database table i don't have to change alot in the code ... Is

Re: [PHP] detaching and running php processes in the background

2003-11-21 Thread Eugene Lee
On Fri, Nov 21, 2003 at 03:40:05AM -0700, Gary C. New wrote: : : What is the best way to detach and run a command line based php script : in the background from a web-based php script, without the need for : reporting? How about exec('command ') ? -- PHP General Mailing List

Re: [PHP] Crossed paths?

2003-11-21 Thread Eugene Lee
On Fri, Nov 21, 2003 at 06:09:44AM -0500, MIKE YRABEDRA wrote: : : A customer of mine has recently started to see a weird error. He will get : the typical 'open_basedir' error, but it will say his allowed path is : another clients allowed path??? See an example below. : : Warning : Unknown():

[PHP] Re: free PHP OOP book - Web applications desgin

2003-11-21 Thread Lucian Cozma
If you want customizable layout without changing the logic, try the MVC approach (model-view-control). The best way to do it is to create the data from php in a XML (generate the logic), then create the layout with XSL. Thus, if you want to change the layout, all you have to do is to

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread John W. Holmes
Troy S wrote: What is the best way to remove the characters from strings that may cause security problems? Namely, `, ', , , , \ and all non-printing strings. Did I miss any? Thanks. Why do you need to remove them? So I can't type grin? Is that a security violation? All you need to do is

Re: [PHP] free PHP OOP book - Web applications desgin

2003-11-21 Thread Burhan Khalid
Nagib Abi Fadel wrote: Hi, can anyone suggest a free PHP Object Oriented Programming book ... I don't know of a free one. But http://www.php.net/manual/en/ref.classobj.php is good starting point. Also try http://www.zend.com/zend/tut/ Or an Object Oriented Book for web applications. Plus i

RE: [PHP] PHP to create Printable format

2003-11-21 Thread Jay Blanchard
[snip] Right now, I am trying to do generation of report using PHP in which the report should be in a printable format later on. How do you define a printable format? Ideally, you want to do this in CSS. The print version would just load a differnet style sheet than the main format. You can

Re: [PHP] Crossed paths?

2003-11-21 Thread MIKE YRABEDRA
on 11/21/03 6:47 AM, Eugene Lee at [EMAIL PROTECTED] wrote: : A customer of mine has recently started to see a weird error. He will get : the typical 'open_basedir' error, but it will say his allowed path is : another clients allowed path??? See an example below. : : Warning : Unknown():

[PHP] creating a module for php 4.2.2 with Apache 2.0. php 4.3.3

2003-11-21 Thread Bernd
Hello, my probelm is, if i create a module with apache 2.0 php 4.3.3 it doesn`t work on the server were apache 1.3.7 with php 4.2.2. is installed. how can i create a modul with apache 2.0. with php 4.3.3 that works fine with apache 1.3.7 and php 4.2.2 ? -- thanks Bernd -- PHP General Mailing

RE: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread Wouter van Vliet
-Oorspronkelijk bericht- Van: John W. Holmes [mailto:[EMAIL PROTECTED] Troy S wrote: What is the best way to remove the characters from strings that may cause security problems? Namely, `, ', , , , \ and all non-printing strings. Did I miss any? Thanks. Why do you need to

[PHP] Search File

2003-11-21 Thread Vernon Webb
I'm trying to find a way to search text files in a directory using php. I've done some researching under the filesystem section on php.net but seem to have come up empty handed. Is there a way to do keyword searches on a txt file in a directory hopefully with some type of relevance ranking?

RE: [PHP] Search File

2003-11-21 Thread Jay Blanchard
[snip] I'm trying to find a way to search text files in a directory using php. I've done some researching under the filesystem section on php.net but seem to have come up empty handed. Is there a way to do keyword searches on a txt file in a directory hopefully with some type of relevance ranking?

[PHP] xslt_create error

2003-11-21 Thread Mr. Me
Hi! I get the error: Fatal error: Call to undefined function: xslt_create() on line 5 when I try a call to the function... I'm using a webhotel with PHP: PHP Version 4.3.3 System FreeBSD web06.talkactive.net 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct i386 Build Date Aug 29 2003 16:48:03

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread John W. Holmes
Wouter van Vliet wrote: John W. Holmes Troy S wrote: What is the best way to remove the characters from strings that may cause security problems? Namely, `, ', , , , \ and all non-printing strings. Did I miss any? Thanks. Why do you need to remove them? So I can't type grin? Is that a security

Re: [PHP] Is there a way to use the strpos() for next string...

2003-11-21 Thread Scott Fletcher
Yea, plan to file a bug to include an example. As soon as the strpos() script work then I'll go ahead. Right now, mine doesn't work correctly with the 3rd and 4th line of code, so I'm trying to figure out why. :-) Scott Mike Ford [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On

Re: [PHP] PHP to create Printable format

2003-11-21 Thread David T-G
Jay, et al -- ...and then Jay Blanchard said... % % [snip] % report should be in a printable format later on. % % How do you define a printable format? ... % [/snip] % % I second John's How do you define a printable format? Right. % % I like his plan and just wish to add that you could

RE: [PHP] xslt_create error

2003-11-21 Thread Wouter van Vliet
In your configure command, you have enabled xml support, but not xslt support. Read http://nl3.php.net/manual/en/ref.xslt.php Installation On UNIX, run configure with the --enable-xslt --with-xslt-sablot options. The Sablotron library should be installed somewhere your compiler can find it.

[PHP] time out for mysql_connect

2003-11-21 Thread Diana Castillo
Is there anyway to set a time out on this command: mysql_connect($host, $UN, $PW); so that if it can´t connect after a certain amount of time, it returns an error and the program continues? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] tar and ownership

2003-11-21 Thread Rodney Green
Greetings! I'm writing a script that downloads a tarball from an FTP server and unpacks it into a directory. Here's the line of code that does this. exec(tar -C /scripts/ -zxv --preserve-permissions -f . /scripts/mailfiles.tar.gz) or die('Tar failed!'); My problem is that the files'

RE: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread Wouter van Vliet
-Oorspronkelijk bericht- Van: John W. Holmes [mailto:[EMAIL PROTECTED] Verzonden: vrijdag 21 november 2003 14:38 Wouter van Vliet wrote: John W. Holmes Troy S wrote: What is the best way to remove the characters from strings that may cause security problems? Namely, `, ', , , ,

RE: [PHP] Curious about something....

2003-11-21 Thread Dan Joseph
Hi, The question sounded more like a technical one - is it an advantage in terms of memory? CPU? startup overhead? etc. Yeah, it was mostly a technical one, and it was also one that left me scratching my head. I guess in other languages, I just import or include the library I want

Re: [PHP] tar and ownership

2003-11-21 Thread Marek Kilimajer
Rodney Green wrote: Greetings! I'm writing a script that downloads a tarball from an FTP server and unpacks it into a directory. Here's the line of code that does this. exec(tar -C /scripts/ -zxv --preserve-permissions -f . /scripts/mailfiles.tar.gz) or die('Tar failed!'); My problem is

Re: [PHP] time out for mysql_connect

2003-11-21 Thread Marek Kilimajer
Diana Castillo wrote: Is there anyway to set a time out on this command: mysql_connect($host, $UN, $PW); so that if it can´t connect after a certain amount of time, it returns an error and the program continues? ini_set('mysql.connect_timeout', ... ); -- PHP General Mailing List

Re: [PHP] Avoiding duplicate orders?

2003-11-21 Thread Curt Zirzow
* Thus wrote J J ([EMAIL PROTECTED]): What is the simplest way to avoid duplicate order entry on a form? Some people aren't patient enough to wait for the SSL/credit card processing and will click the submit button two, three, or more times causing duplicate orders. Is there a quick way

Re: [PHP] passthru gives error in httpd/error_log

2003-11-21 Thread Jesper Hansen
Tom Rogers [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] You probably have to put the full path to ls ? passthru('/bin/ls -l'); ? -- regards, Tom No, I've tried that along with all other obvious path stuff. /Jesper -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Curious about something....

2003-11-21 Thread Curt Zirzow
* Thus wrote Dan Joseph ([EMAIL PROTECTED]): Hi, The question sounded more like a technical one - is it an advantage in terms of memory? CPU? startup overhead? etc. Yeah, it was mostly a technical one, and it was also one that left me scratching my head. I guess in other

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread Chris Shiflett
--- Troy S [EMAIL PROTECTED] wrote: What is the best way to remove the characters from strings that may cause security problems? Namely, `, ', , , , \ and all non-printing strings. Did I miss any? As others have mentioned, this is the wrong approach if security is your concern. If someone is

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread Curt Zirzow
* Thus wrote Troy S ([EMAIL PROTECTED]): Greetings, What is the best way to remove the characters from strings that may cause security problems? Namely, `, ', , , , \ and all non-printing strings. Did I miss any? Thanks. Cause security problems in what sense? Curt -- My PHP key is

[PHP] system(traceroute host); not working with new apache upgrade

2003-11-21 Thread Robert Morrison
Hi there, I'm sorry if this is the wrong place to ask this question but I am new to these newsgroups. We have found that servers using php 4.3.3 that were happily running this command: system(traceroute wherever); have now ceased to work since the last apache upgrade. Ping still works fine. Does

RE: [PHP] system(traceroute host); not working with new apache upgrade

2003-11-21 Thread Jay Blanchard
[snip] I'm sorry if this is the wrong place to ask this question but I am new to these newsgroups. We have found that servers using php 4.3.3 that were happily running this command: system(traceroute wherever); have now ceased to work since the last apache upgrade. Ping still works fine. Does

[PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
strpos() is acting a little bit funny. When I do this... --snip-- $a = strpos($data,]]); --snip-- Problem is there are ]] characters in the $data string and it just doesn't see it. Anyone know why and what is the workaround to it? Scott F. -- PHP General Mailing List (http://www.php.net/)

RE: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Jay Blanchard
[snip] strpos() is acting a little bit funny. When I do this... --snip-- $a = strpos($data,]]); --snip-- Problem is there are ]] characters in the $data string and it just doesn't see it. Anyone know why and what is the workaround to it? [/snip] Does it need to be escaped? *shootin' from da'

[PHP] Timer and submit button

2003-11-21 Thread Frank Tudor
I am trying to create a timer tha would prevent someone from clicking submit until the timer reaches zero. THe reason is to keep an individual on a page for a certain amount of time. Does anyone know the best way to do this? PHP? Javascript? Any examples? Frank

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Curt Zirzow
* Thus wrote Scott Fletcher ([EMAIL PROTECTED]): strpos() is acting a little bit funny. When I do this... --snip-- $a = strpos($data,]]); --snip-- Problem is there are ]] characters in the $data string and it just doesn't see it. Anyone know why and what is the workaround to it? It

Re: [PHP] system(traceroute host); not working with new apache upgrade

2003-11-21 Thread Marek Kilimajer
Robert Morrison wrote: Hi there, I'm sorry if this is the wrong place to ask this question but I am new to these newsgroups. We have found that servers using php 4.3.3 that were happily running this command: system(traceroute wherever); have now ceased to work since the last apache upgrade. Ping

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
I thought about that also, so I took your suggestion and tried it. Still doens't work... I tried those... \]]; \]\]; Scott F. Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] strpos() is acting a little bit funny. When I do this... --snip-- $a =

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
Um, it seem to work. That's weird. Should have check for the string length first, so I wasn't looking at the same problem. So, I did further debugging and I'm going to post the script here. Still don't know what is the problem here... --snip-- $XML_Start = (strpos($res_str,![CDATA[)+9);

RE: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Jay Blanchard
[snip] I thought about that also, so I took your suggestion and tried it. Still doens't work... I tried those... \]]; \]\]; [/snip] I tried Curt's solution...no problem. What are you expecting from strpos()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Adding X days to a time string...

2003-11-21 Thread Jeff Lewis
Storing a date in seconds (Unix timestamp) in a database and want to add X number of days to this. So I want to extend a time by say 5 days, what is the best method to handle this? It's always stored as a timestamp for a day not an exact time. So dates are stored as day (March 5th, 2003). Jeff

RE: [PHP] Adding X days to a time string...

2003-11-21 Thread Jay Blanchard
[snip] Storing a date in seconds (Unix timestamp) in a database and want to add X number of days to this. So I want to extend a time by say 5 days, what is the best method to handle this? It's always stored as a timestamp for a day not an exact time. So dates are stored as day (March 5th, 2003).

RE: [PHP] Adding X days to a time string...

2003-11-21 Thread Jeff Lewis
Sorry, I may have muddled that...the issue isn't converting a string to a time, it's taking a time (102636 for example) and adding 30 days to that. Jeff -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 11:13 AM To: [EMAIL PROTECTED];

Re: [PHP] Timer and submit button

2003-11-21 Thread CPT John W. Holmes
From: Frank Tudor [EMAIL PROTECTED] I am trying to create a timer tha would prevent someone from clicking submit until the timer reaches zero. JavaScript. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Sophie Mattoug
Just a stupid idea : are you sure you have '' in your text and not 'gt;' ? Scott Fletcher wrote: I thought about that also, so I took your suggestion and tried it. Still doens't work... I tried those... \]]; \]\]; Scott F. Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL

RE: [PHP] Adding X days to a time string...

2003-11-21 Thread Kelly Hallman
On Fri, 21 Nov 2003, Jeff Lewis wrote: Sorry, I may have muddled that...the issue isn't converting a string to a time, it's taking a time (102636 for example) and adding 30 days Having it in seconds since the epoch makes this pretty easy (60 * 60) * 24 = 86400 // seconds in a day (86400 *

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
Yea, it's a and not a gt;.. It is pure XML tags Found the problem now, so no problem now. See other branch of this posting of a workaround to the problem I did... Thanks, Scott Sophie Mattoug [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Just a stupid idea : are you sure

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
Ah! Found the problem... It is probably a bug with strpos() because it seem to get stuck in there and couldn't get out of it somehow. The workaround the problem I did was just easily increment the $HTML_End by 1 and that fixed the problem. It look like this... --snip-- $XML_Start =

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
You can find more info about this on other branches, I found hte workaround to this problem. So, what am I expecting from strpos() is to find a starting point and ending point to the XML data and HTML data that are within the ![CDATA[]] tag...Like this

Re: [PHP] Adding X days to a time string...

2003-11-21 Thread joel boonstra
On Fri, Nov 21, 2003 at 11:15:20AM -0500, Jeff Lewis wrote: Sorry, I may have muddled that...the issue isn't converting a string to a time, it's taking a time (102636 for example) and adding 30 days to that. Ah, but it is an issue of converting a string to a time. strtotime() can Parse

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread CPT John W. Holmes
From: Wouter van Vliet [EMAIL PROTECTED] Let's make this personal: what would be your answer if I would advice the friendly person to do this: Heh.. I hope you're just kidding about making it personal... I was just presenting security problems with various solutions. ?php (..) $Content

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread Chris Shiflett
--- CPT John W. Holmes [EMAIL PROTECTED] wrote: Let's make this personal: what would be your answer if I would advice the friendly person to do this: Heh.. I hope you're just kidding about making it personal. I think it might be a language subtlety that wasn't intended to mean what we

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Kelly Hallman
On Fri, 21 Nov 2003, Scott Fletcher wrote: Ah! Found the problem... It is probably a bug with strpos() because it seem to get stuck in there and couldn't get out of it somehow. The workaround the problem I did was just easily increment the $HTML_End by 1 and that fixed the problem. It look

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread CPT John W. Holmes
From: Chris Shiflett [EMAIL PROTECTED] --- CPT John W. Holmes [EMAIL PROTECTED] wrote: I'm against letting users enter HTML in their data, also. I'd rather emply a bbcode type solution, turning [b] into b, etc. I disagree with John here, but that's OK. :-) We seem to have different

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
With a moment of studying to your comment, I am beginning to see why I am having the problem. I add the 9 in the first two lines of code, so I didn't realize that I would have encounter the problem if I didn't add the 9. Well, I seem to have problem understanding the word, 'offset' to the

RE: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread Wouter van Vliet
CPT John W. Holmes wrote: From: Wouter van Vliet [EMAIL PROTECTED] Let's make this personal: what would be your answer if I would advice the friendly person to do this: Heh.. I hope you're just kidding about making it personal... I was just presenting security problems with various

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread Chris Shiflett
--- CPT John W. Holmes [EMAIL PROTECTED] wrote: Heh... my turn to disagree again. You can do a simple str_replace() to convert lt;bgt; back into b, but you're going to have to do it for each case. Also by doing that blindly, you can end up with orphaned tags affecting the rest of your page

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Mark Charette
On Fri, 21 Nov 2003, Scott Fletcher wrote: Well, I seem to have problem understanding the word, 'offset' to the strpos() function because it is a bad choice of word strpos() and the word offset used with it is probably older than you ... :) -- PHP General Mailing List (http://www.php.net/)

[PHP] Java and PHP

2003-11-21 Thread Fredrik
Hi I want to start a java system from a php script, anybody who know how i can do that. Something like this: if(isset($trigger)){ java javasystem -scenario; } Is this possible and how can i do it. -Fred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] creating a module for php 4.2.2 with Apache 2.0. php 4.3.3

2003-11-21 Thread Robert Cummings
On Fri, 2003-11-21 at 07:33, Bernd wrote: Hello, my probelm is, if i create a module with apache 2.0 php 4.3.3 it doesn`t work on the server were apache 1.3.7 with php 4.2.2. is installed. how can i create a modul with apache 2.0. with php 4.3.3 that works fine with apache 1.3.7 and php

[PHP] session.cookie_domain problem

2003-11-21 Thread Dustin Machi
I have a small application that uses adodb and session for user management. The sessions are managed through the use of adodb-session-clob.inc.php. The code snippet below shows what I do related to sessions (minuse some variable assignment). $cookie_domain is set to '.whatever.com' However,

Re: [PHP] strpos() act funny when searching for ]]....

2003-11-21 Thread Scott Fletcher
Yea! :-) Don't we all hate it? :-) Mark Charette [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, 21 Nov 2003, Scott Fletcher wrote: Well, I seem to have problem understanding the word, 'offset' to the strpos() function because it is a bad choice of word strpos() and

Re: [PHP] Search File

2003-11-21 Thread Burhan Khalid
Vernon Webb wrote: I'm trying to find a way to search text files in a directory using php. I've done some researching under the filesystem section on php.net but seem to have come up empty handed. Is there a way to do keyword searches on a txt file in a directory hopefully with some type of

Re: [PHP] Mulitple selects from form drop down box

2003-11-21 Thread Matthew Vos
On Thu, 2003-11-20 at 17:12, CPT John W. Holmes wrote: select size=1 name=D1[] multiple Now $_POST['D1'] will be an array of all the items that were chosen. ---John Holmes... ps: wouldn't it be easier to select multiple items if you had a size larger than 1?? The 'size=1' in a select

Re: [PHP] tar and ownership

2003-11-21 Thread Rodney Green
Marek Kilimajer wrote: Rodney Green wrote: Greetings! I'm writing a script that downloads a tarball from an FTP server and unpacks it into a directory. Here's the line of code that does this. exec(tar -C /scripts/ -zxv --preserve-permissions -f . /scripts/mailfiles.tar.gz) or die('Tar

RE: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread Wouter van Vliet
Chris Shiflett wrote: --- CPT John W. Holmes [EMAIL PROTECTED] wrote: Heh... my turn to disagree again. You can do a simple str_replace() to convert lt;bgt; back into b, but you're going to have to do it for each case. Also by doing that blindly, you can end up with orphaned tags affecting

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread John W. Holmes
Chris Shiflett wrote: --- CPT John W. Holmes [EMAIL PROTECTED] wrote: Heh... my turn to disagree again. You can do a simple str_replace() to convert lt;bgt; back into b, but you're going to have to do it for each case. Also by doing that blindly, you can end up with orphaned tags affecting the

Re: [PHP] tar and ownership

2003-11-21 Thread Eugene Lee
On Fri, Nov 21, 2003 at 01:10:28PM -0500, Rodney Green wrote: : Marek Kilimajer wrote: : Rodney Green wrote: : : I'm writing a script that downloads a tarball from an FTP server and : unpacks it into a directory. Here's the line of code that does this. : : exec(tar -C /scripts/ -zxv

RE: [PHP] tar and ownership

2003-11-21 Thread Wouter van Vliet
Rodney Green wrote: Marek Kilimajer wrote: Rodney Green wrote: Greetings! I'm writing a script that downloads a tarball from an FTP server and unpacks it into a directory. Here's the line of code that does this. exec(tar -C /scripts/ -zxv --preserve-permissions -f .

RE: [PHP] echo or print

2003-11-21 Thread Wouter van Vliet
David T-G wrote: Eugene, et al -- ...and then Eugene Lee said... % % p class=tonue-in-cheek % % Also, the letter 'e' is smaller than 'p', so ASCII-based function % lookups will be faster as well. Most of these speed increases can't be noticed in a small script, where the end is within

[PHP] FW: [ERR] RE: [PHP] tar and ownership

2003-11-21 Thread Wouter van Vliet
[EMAIL PROTECTED] wrote: Transmit Report: To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED]) Is someone able to unsubscribe [EMAIL PROTECTED] .. I'm getting annoyed by all those User inbox full replies. ---BeginMessage--- Rodney Green wrote: Marek Kilimajer wrote:

RE: [PHP] echo or print

2003-11-21 Thread Chris W. Parker
Wouter van Vliet mailto:[EMAIL PROTECTED] on Friday, November 21, 2003 10:55 AM said: Point is, which of the inline printing style is preferred by you guyes. I tend to use ?=$Var? a lot, since it reads easier but get into struggles with myself when I do that multiple times in a row.

RE: [PHP] tar and ownership

2003-11-21 Thread Nigel Jones
I think if you are using the Unix Tar Version you can do tar -C /scripts/ -zxv -f ./scripts/mailfiles.tar.gz --owner=REPLACEME --group=REPLACEME -Original Message- From: Wouter van Vliet [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 7:42 AM To: 'Rodney Green'; [EMAIL

RE: [PHP] FW: [ERR] RE: [PHP] tar and ownership

2003-11-21 Thread Nigel Jones
I second that it's annoying CC'ed to List Owner :P -Original Message- From: Wouter van Vliet [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 7:57 AM To: 'PHP General list' Subject: [PHP] FW: [ERR] RE: [PHP] tar and ownership [EMAIL PROTECTED] wrote: Transmit

RE: [PHP] echo or print

2003-11-21 Thread Wouter van Vliet
Chris W. Parker wrote: Wouter van Vliet mailto:[EMAIL PROTECTED] on Friday, November 21, 2003 10:55 AM said: Point is, which of the inline printing style is preferred by you guyes. I tend to use ?=$Var? a lot, since it reads easier but get into struggles with myself when I do that

RE: [PHP] echo or print

2003-11-21 Thread Kelly Hallman
On Fri, 21 Nov 2003, Wouter van Vliet wrote: Point is, which of the inline printing style is preferred by you guyes. I tend to use ?=$Var? a lot, since it reads easier but get into struggles with myself when I do that multiple times in a row. Ultimately I think you'd want to be doing very

RE: [PHP] tar and ownership

2003-11-21 Thread Wouter van Vliet
Nigel Jones wrote: I think if you are using the Unix Tar Version you can do tar -C /scripts/ -zxv -f ./scripts/mailfiles.tar.gz --owner=REPLACEME --group=REPLACEME I sure hope this is NOT possible, since it would be a major security problem. Think for example in terms of the php safe_mode.

RE: [PHP] FW: [ERR] RE: [PHP] tar and ownership

2003-11-21 Thread Chris W. Parker
Nigel Jones mailto:[EMAIL PROTECTED] on Friday, November 21, 2003 11:44 AM said: I second that it's annoying CC'ed to List Owner :P Your best bet is to refuse @hanmir.com altogether. This has been happening for a long time (with different addresses all @hanmir.com) and I imagine it will

  1   2   >