Re: [PHP] mysql_fetch_array()

2004-08-18 Thread Chris Shiflett
--- Anthony Ritter [EMAIL PROTECTED] wrote: When using mysql_fetch_array() is it necsessary to specify the second argument - meaning the constant of MYSQL_NUM or MYSQL_ASSOC? Whenever you have a question about a function, you can look it up using a URL formatted as follows:

Re: [PHP] mysql_fetch_array()

2004-08-18 Thread Anthony Ritter
Thank you Chris. My question was the call to mysql_fetch_array() will also return a result set without the additional argument constant as in: while ($row = mysql_fetch_array($sql)) {... // no constant is being used There are many times that I see that used in textbooks - without the

Re: [PHP] mysql_fetch_array()

2004-08-18 Thread Chris Shiflett
--- Anthony Ritter [EMAIL PROTECTED] wrote: My question was the call to mysql_fetch_array() will also return a result set without the additional argument constant as in: while ($row = mysql_fetch_array($sql)) {... // no constant is being used There are many times that I see that

[PHP] [Newbie Guide] For the benefit of new members

2004-08-18 Thread Ma SivaKumar
=== Please feel free to add more points and send to the list. === 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it offline also. Please also try

Re: [PHP] Re: How to understand this Warning?

2004-08-18 Thread Curt Zirzow
* Thus wrote Labunski with modifications: ?php if ($handle = opendir('news')) { while (false !== ($topic = readdir($handle))) { if ($topic != . $topic != ..) { while (false !== ($topic = readdir($handle))) { // this will never happen! if($topic != .

[PHP] MySql DATABASE creation date

2004-08-18 Thread Kevin
Is there any way to find out MySql DATABASE creation date using PHP and MySql functions? -- Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: How to understand this Warning?

2004-08-18 Thread Jason Wong
On Wednesday 18 August 2004 10:26, Labunski wrote: Hi, note the 2 in that message. You are prob. resetting the readdir() parameter in the script somewhere No, as far as I can see, I'm not resetting the readdir().. but.. You loop twice throu the same dir? Yes I do. Why? I don't

Re: [PHP] ftp_connect returns false

2004-08-18 Thread Jason Wong
On Wednesday 18 August 2004 09:06, DBW wrote: Just wondering if someone has some suggestions here. Using ftp_connect($server, $port) returns a false on the server I am trying to use. Doesn't matter which server I am trying to connect to. According to the provider, ftp from the server is

[PHP] I need unique max number

2004-08-18 Thread Pieter from SA
Hi all I have data in one field in a database, all is numbers that can be duplicated. 200, 200, 100, 50, 30. i need to get all data from this field, terminate the duplicates and get the max nuber that is not a duplicate, in the numbers above that would be 100. I had a look at array_unique, but

Re: [PHP] I need unique max number

2004-08-18 Thread Ni Shurong
Hi all I have data in one field in a database, all is numbers that can be duplicated. 200, 200, 100, 50, 30. i need to get all data from this field, terminate the duplicates and get the max nuber that is not a duplicate, in the numbers above that would be 100. I had a look at

[PHP] Re: php question

2004-08-18 Thread Torsten Roehr
Michael Crane [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hello, I have a webpage which includes a frame containing a table made of 24 tds which in turn contain little images. When the mouse clicks on a little image the appropriate larger image is loaded into an adjacent frame.

[PHP] Re: I need unique max number

2004-08-18 Thread Torsten Roehr
Pieter From Sa [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all I have data in one field in a database, all is numbers that can be duplicated. 200, 200, 100, 50, 30. i need to get all data from this field, terminate the duplicates and get the max nuber that is not a

Re: [PHP] I need unique max number

2004-08-18 Thread Torsten Roehr
Ni Shurong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all I have data in one field in a database, all is numbers that can be duplicated. 200, 200, 100, 50, 30. i need to get all data from this field, terminate the duplicates and get the max nuber that is not a

[PHP] Reg Exp.

2004-08-18 Thread Jay
Hi! Why can´t i get this code to work: $html = $_POST[htmlIn]; $patterns[0] = /strike/; $patterns[1] = //strike/; $patterns[2] = /align=\left\/; $replacements[0] = del; $replacements[1] = /del; $replacements[2] = style=\text-align:left;\; $xhtml = preg_replace($patterns, $replacements, $html);

Re: [PHP] I need unique max number

2004-08-18 Thread Ni Shurong
Ni Shurong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all I have data in one field in a database, all is numbers that can be duplicated. 200, 200, 100, 50, 30. i need to get all data from this field, terminate the duplicates and get the max nuber

Re: [PHP] Reg Exp.

2004-08-18 Thread Ni Shurong
Hi! Why can? i get this code to work: $html = $_POST[htmlIn]; $patterns[0] = /strike/; $patterns[1] = //strike/; $patterns[1] = /\/strike/; $patterns[2] = /align=\left\/; $replacements[0] = del; $replacements[1] = /del; $replacements[2] = style=\text-align:left;\; $xhtml =

Re: [PHP] Reg Exp.

2004-08-18 Thread Wudi
On Wed, 18 Aug 2004 10:42:54 +0200 Jay [EMAIL PROTECTED] wrote: Hi! Why can? i get this code to work: $html = $_POST[htmlIn]; $patterns[0] = /strike/; $patterns[1] = //strike/; $patterns[2] = /align=\left\/; $replacements[0] = del; $replacements[1] = /del; $replacements[2] =

[PHP] Reg Exp.

2004-08-18 Thread John Legg
To start with try replacing: $patterns[1] = //strike/; with $patterns[1] = /\/strike/; Rgds John --- Hi! Why can´t i get this code to work: $html = $_POST[htmlIn]; $patterns[0] = /strike/; $patterns[1] = //strike/; $patterns[2] = /align=\left\/; $replacements[0] = del;

Re: [PHP] Reg Exp.

2004-08-18 Thread Jay
Ni Shurong wrote: Hi! Why can? i get this code to work: $html = $_POST[htmlIn]; $patterns[0] = /strike/; $patterns[1] = //strike/; $patterns[1] = /\/strike/; $patterns[2] = /align=\left\/; $replacements[0] = del; $replacements[1] = /del; $replacements[2] = style=\text-align:left;\;

Re: [PHP] Reg Exp.

2004-08-18 Thread Jay
Ni Shurong wrote: Hi! Why can? i get this code to work: $html = $_POST[htmlIn]; $patterns[0] = /strike/; $patterns[1] = //strike/; $patterns[1] = /\/strike/; $patterns[2] = /align=\left\/; $replacements[0] = del; $replacements[1] = /del; $replacements[2] = style=\text-align:left;\;

Re: [PHP] Reg Exp.

2004-08-18 Thread Jay
Wudi wrote: On Wed, 18 Aug 2004 10:42:54 +0200 Jay [EMAIL PROTECTED] wrote: Hi! Why can? i get this code to work: $html = $_POST[htmlIn]; $patterns[0] = /strike/; $patterns[1] = //strike/; $patterns[2] = /align=\left\/; $replacements[0] = del; $replacements[1] = /del; $replacements[2] =

[PHP] bytecode interpreter in GD

2004-08-18 Thread tibyke
hi, i enabled bytecode interpreter and some other rendering/hinting settings in freetype, recompiled and installed freetype (2.1.9), ttf fonts just as good as they do in M$. the problem is when using this lib from php thru gd, the text is still garbled when antialiasing is off. the question

[PHP] [PHP-GEN] Check Boxes

2004-08-18 Thread balwantsingh
balwantsingh wrote: can somebody advise me i want to use checkboxes on my website, i want that if user selects some checkboxes (there will be more than 20 checkboxes), checkbox's value will be stored in variables and than SELECT query command will be run using these variables through PHP.

Re: [PHP] Move_uploaded_file()

2004-08-18 Thread [EMAIL PROTECTED]
Thanks for the explaination!! That was the problem. One of the directories in the path did not have execute permissions. /T on 8/17/04 7:58, Jason Wong at [EMAIL PROTECTED] wrote: Please do not top post. On Tuesday 17 August 2004 19:31, [EMAIL PROTECTED] wrote: How do you do that

Re: [PHP] Reg Exp.

2004-08-18 Thread John Holmes
Jay wrote: Why cant i get this code to work: $html = $_POST[htmlIn]; $patterns[0] = /strike/; $patterns[1] = //strike/; $patterns[2] = /align=\left\/; $replacements[0] = del; $replacements[1] = /del; $replacements[2] = style=\text-align:left;\; $xhtml = preg_replace($patterns, $replacements,

[PHP] .htaccess

2004-08-18 Thread Vclav Slovek
hi, i would like to ask what happens when a user is downloading a large file from apache server and i modify the .htaccess file affecting the folder where is the file beeing downloaded by the user. For example i rewrite the list of ips allowed to access the file/folder and i remove the

[PHP] .thaccess

2004-08-18 Thread Vclav Slovek
hi, i would like to ask what happens when a user is downloading a large file from apache server and i modify the .htaccess file affecting the folder where is the file beeing downloaded by the user. For example i rewrite the list of ips allowed to access the file/folder and i remove the

RE: [PHP] .htaccess

2004-08-18 Thread Jay Blanchard
[snip] i would like to ask what happens when a user is downloading a large file from apache server and i modify the .htaccess file affecting the folder where is the file beeing downloaded by the user. For example i rewrite the list of ips allowed to access the file/folder and i remove the

[PHP] debugging messages in popup windows

2004-08-18 Thread Jad Madi
guys, I'm working on a project, and running a php debug script while testing the script, How can I make the debug messages(including error and warning) appears only in popup window? and update automaticly when clicking on another link Thanks in advance -- PHP General Mailing List

RE: [PHP] debugging messages in popup windows

2004-08-18 Thread Jay Blanchard
[snip] guys, I'm working on a project, and running a php debug script while testing the script, How can I make the debug messages(including error and warning) appears only in popup window? and update automaticly when clicking on another link [/snip] JavaScript -- PHP General Mailing List

Re: [PHP] .htaccess

2004-08-18 Thread John Nichel
Vclav Slovek wrote: hi, i would like to ask what happens when a user is downloading a large file from apache server and i modify the .htaccess file affecting the folder where is the file beeing downloaded by the user. For example i rewrite the list of ips allowed to access the file/folder

Re: [PHP] OO Theory Question

2004-08-18 Thread Ricardo Cezar
Probably it’s a dumb question, but I’m new to OO Programming, so... How can I store the instance of the class in the session Thanks, Rics Thomas Goyne [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] On Tue, 17 Aug 2004 12:25:42 -0600, Jed R. Brubaker [EMAIL PROTECTED]

RE: [PHP] debugging messages in popup windows

2004-08-18 Thread Jay Blanchard
[snip] i'm not talking about How to make the popup window I want to know how can I make the popup window track page errors and display it thats it :-) [/snip] At the risk of repeating myself.JavaScript. PHP is server-side, JavaScript is client-side where the action needs to take place. PHP

Re: [PHP] Re: php question

2004-08-18 Thread michael crane
Torsten Roehr wrote: Michael Crane [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hello, I have a webpage which includes a frame containing a table made of 24 tds which in turn contain little images. When the mouse clicks on a little image the appropriate larger image is loaded into an

Re: [PHP] OO Theory Question

2004-08-18 Thread Torsten Roehr
Ricardo Cezar [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Probably it’s a dumb question, but I’m new to OO Programming, so... How can I store the instance of the class in the session Thanks, Rics That's no different to storing any other variable into the session:

[PHP] Save Dialog Box

2004-08-18 Thread PHP Junkie
Ave, I'm working on creating a File Manager for my Company, in PHP MySQL. I had a question The File Manager allows authenticated users to download upload various types of files from the available Zones. What I basically do is specify a link to the Original file stored on the server so that

[PHP] Object Fatal Error?

2004-08-18 Thread Dan Joseph
Howdy, I am getting a PHP Fatal error (below). I've tried calling the method with both $sql-getRow and SQL::getRow. I checked the SQL, its fine. Could someone tell me what I've done wrong?? couple errors: [Wed Aug 18 09:59:05 2004] [error] PHP Fatal error: Call to a member function

[PHP] preg_match question

2004-08-18 Thread Nicklas Bondesson
Hello, How do I find an exact match of a string with preg_match? Example: String1: www.test.com/ String2: www.test.com/somepage.php?param1=true How do you write the regexp to only return String1 and not String2 when you match against www.test.com ?? Thanks in advance. Nicke -- PHP General

[PHP] tpl editor

2004-08-18 Thread Naty
Hello! I'm using eclipse and phpeclipse to manage my php project, but still I have problems trying to edit for example tpl files. Threre is some possible way to see this files in a graphic way with eclipse, like for example macromedia dreamweaver ? Regards Natalia -- PHP General Mailing List

Re: [PHP] mail() on *nix using ssmtp or an external smtp server?

2004-08-18 Thread Markus Mayer
I've been trying further to get ssmtp working with apache/php in a chrooted envrionment and have had some success on Linux, so I'm sharing it with everyone else. I've also come to understand quite well how the mail() function is implemented in php too, and actually it's quite simple. All

Re: [PHP] mail() on *nix using ssmtp or an external smtp server?

2004-08-18 Thread Markus Mayer
Just an addennum to my previous post 10 minutes ago: For ssmtp to work with apache/php in a chrooted environment, some kind of shell needs to be present in the /bin directory. This seems to be a limitation of PHP rather than some kind of deficiency with ssmtp. This in itself is a kind of

Re: [PHP] preg_match question

2004-08-18 Thread John Legg
Try using a pattern set to the following: $pattern = /^www.test.com$/; and refer to: http://uk.php.net/manual/en/reference.pcre.pattern.syntax.php Rgds John --- Hello, How do I find an exact match of a string with preg_match? Example: String1: www.test.com/ String2:

Re: [PHP] preg_match question

2004-08-18 Thread Matt M.
On Wed, 18 Aug 2004 17:16:24 +0200, Nicklas Bondesson [EMAIL PROTECTED] wrote: Hello, How do I find an exact match of a string with preg_match? Example: String1: www.test.com/ String2: www.test.com/somepage.php?param1=true How do you write the regexp to only return String1 and not

RE: [PHP] preg_match question

2004-08-18 Thread Nicklas Bondesson
Is it clever to use word boundary here? /b? Nicke From: John Legg [mailto:[EMAIL PROTECTED] Sent: den 18 augusti 2004 18:02 To: Nicklas Bondesson Cc: [EMAIL PROTECTED] Subject: Re: [PHP] preg_match question Try using a pattern set to the following: $pattern

RE: [PHP] preg_match question

2004-08-18 Thread John Legg
Hi Nicke Difficult to say without knowing exactly what you are trying to achieve. If you are just comparing two strings for 'exactness' then it would probably be better to just do a direct string comparison (without regex). Regex's are generally more expensive operations. One thing you

RE: [PHP] preg_match question

2004-08-18 Thread Nicklas Bondesson
Actually I think I got it working now (without escaping the .). If I run into trouble I will post again. Thanks! Nicke From: John Legg [mailto:[EMAIL PROTECTED] Sent: den 18 augusti 2004 18:15 To: Nicklas Bondesson Cc: [EMAIL PROTECTED] Subject: RE: [PHP]

[PHP] PHP HTML text editor issues...

2004-08-18 Thread Tim Traver
Hi all, ok, I've made my own version of a file manager complete with a text editor, and I'm having troubles figuring out some issues. I present the text to be edited retrieved from a file in a textarea box for a user to edit, and then POST that to my PHP application, which then saves it to

Re: [PHP] tpl editor

2004-08-18 Thread Robby Russell
On Wed, 2004-08-18 at 08:26, Naty wrote: Hello! I'm using eclipse and phpeclipse to manage my php project, but still I have problems trying to edit for example tpl files. Threre is some possible way to see this files in a graphic way with eclipse, like for example macromedia dreamweaver ?

Re: [PHP] PHP HTML text editor issues...

2004-08-18 Thread Jason Davidson
Do you have magic quotes turned on in your php ini file? Jason Tim Traver [EMAIL PROTECTED] wrote: Hi all, ok, I've made my own version of a file manager complete with a text editor, and I'm having troubles figuring out some issues. I present the text to be edited retrieved from a

Re: [PHP] preg_match question

2004-08-18 Thread Curt Zirzow
* Thus wrote Nicklas Bondesson: Actually I think I got it working now (without escaping the .). cause . is any character wwwatestbcom will get matched as well. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our

Re: [PHP] PHP HTML text editor issues...

2004-08-18 Thread Tim Traver
No, magic quotes are turned off... Tim. At 09:44 AM 8/18/2004, Jason Davidson wrote: Do you have magic quotes turned on in your php ini file? Jason Tim Traver [EMAIL PROTECTED] wrote: Hi all, ok, I've made my own version of a file manager complete with a text editor, and I'm having troubles

Re: [PHP] PHP HTML text editor issues...

2004-08-18 Thread Curt Zirzow
* Thus wrote Tim Traver: Hi all, ok, I've made my own version of a file manager complete with a text editor, and I'm having troubles figuring out some issues. ... I've tried to use addslashes and stripslashes to prevent some of the clobbering of the text, but it doesn't seem to be

[no subject]

2004-08-18 Thread Justin Patrin
ek [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable References: [EMAIL PROTECTED] Subject: Re: [PHP] .thaccess On Wed, 18 Aug 2004 14:00:10 +0200, V=C3=A1clav

Re: [PHP] OO Theory Question

2004-08-18 Thread Justin Patrin
On Wed, 18 Aug 2004 11:03:47 -0300, Ricardo Cezar [EMAIL PROTECTED] wrote: Probably it's a dumb question, but I'm new to OO Programming, so... How can I store the instance of the class in the session I answered this a long time ago in this thread. Did you not get my mail? Thanks,

[PHP] WAS: PHP HTML text editor issues... NOW:{Magic Quotes}

2004-08-18 Thread Kevin Rosenthal
HI Jason, OK, I am real new to all this so please bare with me. Can you explain what the Magic Quotes do? Thanks, Kevin -Original Message- From: Jason Davidson [mailto:[EMAIL PROTECTED] Do you have magic quotes turned on in your php ini file? Jason -- PHP General Mailing List

Re: [PHP] Securing Forms???

2004-08-18 Thread Gerard Samuel
Chris Shiflett wrote: You might find these resources helpful: http://education.nyphp.org/phundamentals/PH_spoofed_submission.php http://shiflett.org/talks/oscon2004/php-security/36 Hope that helps. Just wanted to chime in to the list and to Chris. I've been mulling the example in the second link

[PHP] mkdir() permissions

2004-08-18 Thread Percy Cabello
Hi I am new to PHP and I'm trying that my script checks if a directory exists and if not, it should create it. I'm doing it with mkdir() but it returns this error message: Warning: mkdir(0): Permission denied in /xx on line 32 I wonder what kind of permissions should I set. This should be

Re: [PHP] PHP HTML text editor issues...

2004-08-18 Thread Justin Patrin
On Wed, 18 Aug 2004 17:17:26 +, Curt Zirzow [EMAIL PROTECTED] wrote: * Thus wrote Tim Traver: Hi all, ok, I've made my own version of a file manager complete with a text editor, and I'm having troubles figuring out some issues. ... I've tried to use addslashes and stripslashes

Re: [PHP] WAS: PHP HTML text editor issues... NOW:{Magic Quotes}

2004-08-18 Thread Robby Russell
On Wed, 2004-08-18 at 10:16, Kevin Rosenthal wrote: HI Jason, OK, I am real new to all this so please bare with me. Can you explain what the Magic Quotes do? Thanks, Kevin http://us4.php.net/manual/en/function.get-magic-quotes-gpc.php -- /*** *

Re: [PHP] preg_match question

2004-08-18 Thread John Holmes
Nicklas Bondesson wrote: How do I find an exact match of a string with preg_match? Example: String1: www.test.com/ String2: www.test.com/somepage.php?param1=true How do you write the regexp to only return String1 and not String2 when you match against www.test.com ?? I've heard == works well. Or

Re: [PHP] PHP HTML text editor issues...

2004-08-18 Thread Tim Traver
Darnit if the php.ini file that I was looking at was the wrong one... looks like turning the magic quotes off in the correct php.ini file worked... thanks, Tim. At 10:17 AM 8/18/2004, Curt Zirzow wrote: * Thus wrote Tim Traver: Hi all, ok, I've made my own version of a file manager complete

Re: [PHP] PHP HTML text editor issues...

2004-08-18 Thread Curt Zirzow
* Thus wrote Justin Patrin: On Wed, 18 Aug 2004 17:17:26 +, Curt Zirzow [EMAIL PROTECTED] wrote: * Thus wrote Tim Traver: I just want to get the EXACT text that is in the textarea to be saved to disk... Here is an example of a line that gets clobbered : $value =~

[PHP] membership via folders

2004-08-18 Thread Mag
Hi, I have searched for this kind of an app on hotscritps and also at phpclsases, I have found a couple that come close and am confused which one to download, this is my requirment: 1.Visitor joins (and becomes a member), a folder is created just for him (i have done this) 2.He is allowed to

[PHP] Cannot Load DLLs (WinXP, Apache 2, PHP 5)

2004-08-18 Thread Chris Jenkinson
Hi, I can't get PHP to load php_mysql.dll, required to use the mysql_*() functions. I have tried a variety of values for extension_dir, including C:/php/ext, C:\php\ext, C:\php\, ./ext/, ext/. I have copied php_mysql to all these directories, but it is not loading it. PHP is stored in C:/php,

Re: [PHP] mkdir() permissions

2004-08-18 Thread Matthew Sims
Hi I am new to PHP and I'm trying that my script checks if a directory exists and if not, it should create it. I'm doing it with mkdir() but it returns this error message: Warning: mkdir(0): Permission denied in /xx on line 32 I wonder what kind of permissions should I set. This

Re: [PHP] Cannot Load DLLs (WinXP, Apache 2, PHP 5)

2004-08-18 Thread John Holmes
Chris Jenkinson wrote: I can't get PHP to load php_mysql.dll, required to use the mysql_*() functions. I have tried a variety of values for extension_dir, including C:/php/ext, C:\php\ext, C:\php\, ./ext/, ext/. I have copied php_mysql to all these directories, but it is not loading it. PHP

[PHP] PHP/PearDB works on commandline but not via http....

2004-08-18 Thread pw
Hello, I have an interesting problem with PostgreSQL via PearDB and PHP 4.3.3 . I have a php page that opens a remote connection to a Postgres database, performs a query, lists the results and then closes the connection. If I run the php from the command line the connection and query work fine.

Re: [PHP] PHP/PearDB works on commandline but not via http....

2004-08-18 Thread Justin Patrin
On Wed, 18 Aug 2004 12:53:25 -0700, pw [EMAIL PROTECTED] wrote: Hello, I have an interesting problem with PostgreSQL via PearDB and PHP 4.3.3 . I have a php page that opens a remote connection to a Postgres database, performs a query, lists the results and then closes the connection.

[PHP] Weather php SDK for weather - Historical, current and forecast

2004-08-18 Thread Eugene Voznesensky
I am looking for sources for weather information and found the site http://www.nws.noaa.gov/forecasts/xml/ Is there any way to get historical weather data via a PHP Script or any available SDK?

Re: [PHP] PHP/PearDB works on commandline but not via http....

2004-08-18 Thread Matthew Sims
On Wed, 18 Aug 2004 12:53:25 -0700, pw [EMAIL PROTECTED] wrote: Hello, I have an interesting problem with PostgreSQL via PearDB and PHP 4.3.3 . I have a php page that opens a remote connection to a Postgres database, performs a query, lists the results and then closes the connection. If

Re: [PHP] PHP/PearDB works on commandline but not via http....

2004-08-18 Thread pw
Justin Patrin wrote: Can't help you unless you give us an error... There's no error. DB_Error::toString() returns the following. [: message= code=0 mode= level= prefix= info=] Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Securing Forms???

2004-08-18 Thread Peter Brodersen
On Fri, 13 Aug 2004 12:39:07 -0700 (PDT), in php.general [EMAIL PROTECTED] (Chris Shiflett) wrote: http://shiflett.org/talks/oscon2004/php-security/36 $token = md5(uniqid(rand(), true)); .. is a pretty bad idea, since the output could include quotes, newlines, low-ascii-characters, thereby

Re: [PHP] PHP/PearDB works on commandline but not via http....

2004-08-18 Thread pw
Matthew Sims wrote: And check to see that PostgreSQL is accepting network connections rather than localhost. Is it listening to a port? Connecting remotely to postgres via the command line: psql -h nnn.nnn.nnn.nnn database_name -p 5432 -U user -W works fine. Like I wrote before, if I run the same

[PHP] Support dbase problems

2004-08-18 Thread Bernardo
Hello: I have a RedHat 9 linux distribution and y have already install the httpd and the php and it works well, but i have to install the dbase support (httpd + php + dbase). I was found a rpm packages for this support (php-dbase x.x-i386.rpm and php-common x.x-i386.rpm) but it doesn't work, i

Re: [PHP] OO Theory Question

2004-08-18 Thread Kevin Waterson
This one time, at band camp, Justin Patrin [EMAIL PROTECTED] wrote: On Wed, 18 Aug 2004 11:03:47 -0300, Ricardo Cezar [EMAIL PROTECTED] wrote: Probably it's a dumb question, but I'm new to OO Programming, so... How can I store the instance of the class in the session I answered

[PHP] form items lost their values when start using sessions

2004-08-18 Thread Leticia Campos
Why since I put session_start(); in my php code the input items lost values previously entered if user goes back to the form page? Leticia Campos IT Programming -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] form items lost their values when start using sessions

2004-08-18 Thread Matt M.
On Wed, 18 Aug 2004 14:35:19 -0700, Leticia Campos [EMAIL PROTECTED] wrote: Why since I put session_start(); in my php code the input items lost values previously entered if user goes back to the form page? might have something to do with session.cache_limiter , get rid of it and see if you

[PHP] Delete a file after it has been downloaded?

2004-08-18 Thread Yngve
Hi! I wonder if it´s possible (and how) to delete a file after it has been downloaded, without running anything on the server except for the PHP page which the user gets the file from. If it is not possible, i wonder how i could create a script which deletes all files in a directory which are

Re: [PHP] Securing Forms???

2004-08-18 Thread John Holmes
Peter Brodersen wrote: http://shiflett.org/talks/oscon2004/php-security/36 $token = md5(uniqid(rand(), true)); .. is a pretty bad idea, since the output could include quotes, newlines, low-ascii-characters, thereby messing up the form. How do you figure that? md5() only returns 0-9 and a-f

[PHP] Modifying this PHP-based sourceforge.net web proxy

2004-08-18 Thread news.php.net
Attached is an awesome web proxy, which totally meets my needs, but I need it to be transparent. I need anyone accessing the computer that this is on to be automatically proxy-ed to a URL, but then let them navigate through the links just fine. I also do not want them to see the banner that's

Re: [PHP] Weather php SDK for weather - Historical, current and forecast

2004-08-18 Thread Gerard Samuel
Eugene Voznesensky wrote: I am looking for sources for weather information and found the site http://www.nws.noaa.gov/forecasts/xml/ Is there any way to get historical weather data via a PHP Script or any available SDK? Take a look at http://www.weather.com/services/xmloap.html Unfortunately they

Re: [PHP] Delete a file after it has been downloaded?

2004-08-18 Thread John Holmes
Yngve wrote: I wonder if its possible (and how) to delete a file after it has been downloaded, without running anything on the server except for the PHP page which the user gets the file from. unlink() You need a middle man script to manage the download and delete the file. The script receives

Re: [PHP] Delete a file after it has been downloaded?

2004-08-18 Thread Matt M.
On Wed, 18 Aug 2004 23:56:57 +0200, Yngve [EMAIL PROTECTED] wrote: Hi! I wonder if it´s possible (and how) to delete a file after it has been downloaded, without running anything on the server except for the PHP page which the user gets the file from. If it is not possible, i wonder how i

Re: [PHP] Securing Forms???

2004-08-18 Thread Peter Brodersen
On Wed, 18 Aug 2004 17:59:34 -0700, in php.general [EMAIL PROTECTED] (John Holmes) wrote: $token = md5(uniqid(rand(), true)); .. is a pretty bad idea, since the output could include quotes, newlines, low-ascii-characters, thereby messing up the form. How do you figure that? md5() only

[PHP] Re: preg_match question

2004-08-18 Thread Chris Jenkinson
Nicklas Bondesson wrote: How do I find an exact match of a string with preg_match? Example: String1: www.test.com/ String2: www.test.com/somepage.php?param1=true How do you write the regexp to only return String1 and not String2 when you match against www.test.com ?? You should use the ^ and $

Re: [PHP] Modifying this PHP-based sourceforge.net web proxy

2004-08-18 Thread Curt Zirzow
* Thus wrote news.php.net: Attached is an awesome web proxy, which totally meets my needs, but I need it to be transparent. I need anyone accessing the computer that this is on to be automatically proxy-ed to a URL, but then let them navigate through the links just fine. I also do not want

Re: [PHP] Securing Forms???

2004-08-18 Thread Chris Shiflett
--- Peter Brodersen [EMAIL PROTECTED] wrote: http://shiflett.org/talks/oscon2004/php-security/36 $token = md5(uniqid(rand(), true)); .. is a pretty bad idea, since the output could include quotes, newlines, low-ascii-characters, thereby messing up the form. That's incorrect. An MD5 is a

Re: [PHP] Securing Forms???

2004-08-18 Thread Peter Brodersen
On Wed, 18 Aug 2004 15:26:34 -0700 (PDT), in php.general [EMAIL PROTECTED] (Chris Shiflett) wrote: $token = md5(uniqid(rand(), true)); .. is a pretty bad idea, since the output could include quotes, newlines, low-ascii-characters, thereby messing up the form. That's incorrect. An MD5 is a

Re: [PHP] Securing Forms???

2004-08-18 Thread Curt Zirzow
* Thus wrote Peter Brodersen: On Wed, 18 Aug 2004 17:59:34 -0700, in php.general [EMAIL PROTECTED] (John Holmes) wrote: $token = md5(uniqid(rand(), true)); .. is a pretty bad idea, since the output could include quotes, newlines, low-ascii-characters, thereby messing up the form. How

Re: [PHP] Securing Forms???

2004-08-18 Thread Jennifer Goodie
$token = md5(uniqid(rand(), true)); .. is a pretty bad idea, since the output could include quotes, newlines, low-ascii-characters, thereby messing up the form. How do you figure that? md5() only returns 0-9 and a-f characters. From the manual: http://php.net/md5 string md5 (

Re: [PHP] Securing Forms???

2004-08-18 Thread Chris Shiflett
--- Peter Brodersen [EMAIL PROTECTED] wrote: raw_output is set to true, meaning that md5() will not just return a hexdump of the digest, but a raw binary format, which could contain quotes and other special characters. I see your mistake now. That second argument is for the uniqid() function.

[PHP] Fw: Greetings.

2004-08-18 Thread Research
I dont need to report bugs as i didnt see any. All i need is some info regarding the following request. Can i see CPU ID / STORAGE ID with php or javascript, or both combined. I realy need this, please reply ASAP if you can help me, at least give me some hope for it. Best wishes,

Re: [PHP] Securing Forms???

2004-08-18 Thread Peter Brodersen
On Wed, 18 Aug 2004 15:57:26 -0700 (PDT), in php.general [EMAIL PROTECTED] (Chris Shiflett) wrote: I see your mistake now. That second argument is for the uniqid() function. Have another look and pay close attention to parentheses. :-) My arch enemy, Parenthesis, we meet again. And I can see

Re: [PHP] Securing Forms???

2004-08-18 Thread Michal Migurski
$token = md5(uniqid(rand(), true)); .. is a pretty bad idea, since the output could include quotes, newlines, low-ascii-characters, thereby messing up the form. How do you figure that? md5() only returns 0-9 and a-f characters. From the manual: http://php.net/md5 string md5 ( string

Re: [PHP] Securing Forms???

2004-08-18 Thread John Holmes
Peter Brodersen wrote: $token = md5(uniqid(rand(), true)); .. is a pretty bad idea, since the output could include quotes, newlines, low-ascii-characters, thereby messing up the form. How do you figure that? md5() only returns 0-9 and a-f characters. From the manual: http://php.net/md5 string md5

Re: [PHP] Securing Forms???

2004-08-18 Thread Chris Shiflett
--- Gerard Samuel [EMAIL PROTECTED] wrote: http://education.nyphp.org/phundamentals/PH_spoofed_submission.php http://shiflett.org/talks/oscon2004/php-security/36 Hope that helps. Just wanted to chime in to the list and to Chris. Hi. :-) I've been mulling the example in the

Re: [PHP] Securing Forms???

2004-08-18 Thread Gerard Samuel
Peter Brodersen wrote: On Wed, 18 Aug 2004 17:59:34 -0700, in php.general [EMAIL PROTECTED] (John Holmes) wrote: $token = md5(uniqid(rand(), true)); .. is a pretty bad idea, since the output could include quotes, newlines, low-ascii-characters, thereby messing up the form. How do you figure that?

Re: [PHP] Securing Forms???

2004-08-18 Thread Gerard Samuel
Chris Shiflett wrote: This doesn't provide any benefit that I can see, but I'm ready to admit that I might be missing something. If the token is captured, the conditional statement can still be bypassed, because the value of $some_hidden_key isn't necessary for this at all. Anyway, I'm a bit

[PHP] Re: Modifying this PHP-based sourceforge.net web proxy

2004-08-18 Thread Hannes Magnusson
On Wed, 18 Aug 2004 14:59:20 -0700 [EMAIL PROTECTED] (News.Php.Net) wrote: Attached is an awesome web proxy, which totally meets my needs, but I need it to be transparent. I need anyone accessing the computer that this is on to be automatically proxy-ed to a URL, but then let them navigate

[PHP] Please have a look at my function

2004-08-18 Thread Mag
Hello, I dont know regex very well but I am using one below that I modified from the web: ** Start code** function RStripHeader($string) { return eregi_replace('!-- .*Hstart(|\')?([^ \']*)(| \')?.*([^]*)!-- Hend --', '', $string); } $the_file = something.html; $content =

  1   2   >