[PHP] Re: Greetings

2006-01-13 Thread Gabor Hojtsy
Dear Pop Mihai Sergiu, By sending this email you (again) posted to a public mailing list which is archived at multiple places, of which really few are under our control. There would be no point in removing your message from our archives, as it is also posted to an unknown number of other archives

Re: [PHP] PHP for Mac

2006-01-13 Thread David Grant
Richard, Caveat: I'm not a OS X user, so this information may not help you. Richard Correia wrote: I want to install PHP5 on Mac powerbook G4. Can someone please let me know where I can find it and it's related module? The installation instructions for OS X on PHP.net[1] points to this[2]

[PHP] I have stange problem

2006-01-13 Thread sufinoon
Hi, I'm trying to install winxp\apache2\php5.1.2\MySql. The installation was good i have apache recognized php ( Apache/2.0.55 (Win32) PHP/5.1.2 Server at localhost Port 8080 ) so i wrote test script (? phpinfo();?) and sometimes the script is working and i got the data and some time i got Cannot

[PHP] Regex help

2006-01-13 Thread Mike Smith
I'm trying to save myself some time by extracting certain variables from a string: 102-90 E 42 X 42 X 70 3/8 I've been testing with: http://www.quanetic.com/regex.php and have been somewhat successful. Using this pattern: /[0-9]{2,}( X| x|x )/ I have: 102-90 E [!MATCH!] [!MATCH!] 70 3/8

RE: [PHP] Regex help

2006-01-13 Thread Albert
Mike Smith wrote: I'm trying to save myself some time by extracting certain variables from a string: 102-90 E 42 X 42 X 70 3/8 If this string is always in this format xxx E panel X width X height then you could try something like: // Very much untested $unit = '102-90 E 42 X 42 X 70 3/8';

Re: [PHP] Regex help

2006-01-13 Thread Eric Martel
This should do the trick: /(\d+) ?X ?(\d+) ?X ?(\d+ [\d\/]+)/i (at least it would in Perl) Le 13 Janvier 2006 08:25, Mike Smith a écrit : I'm trying to save myself some time by extracting certain variables from a string: 102-90 E 42 X 42 X 70 3/8 I've been testing with:

[PHP] Parsing a large file

2006-01-13 Thread Wolf
I have large log files from a web server (about a gig in size) and need to parse each line looking for a string, and when encountered push that line to a new file. I was thinking I could have PHP read in the whole file, but thinking it could be a major pain since I have about 20 log files to read

[PHP] PHP 4.4.2 released!

2006-01-13 Thread Derick Rethans
Hello! The PHP Development Team would like to announce the immediate release of PHP 4.4.2. This is a maintenance release that addresses a number of minor security problems and fixes a few regressions that shown up in PHP 4.4.1. All users of PHP 4 are recommended to upgrade to PHP 4.4.2. A

RE: [PHP] Parsing a large file

2006-01-13 Thread Albert
Wolf wrote: I have large log files from a web server (about a gig in size) and need to parse each line looking for a string, and when encountered push that line to a new file. I was thinking I could have PHP read in the whole file, but thinking it could be a major pain since I have about 20

Re: [PHP] Parsing a large file

2006-01-13 Thread Wolf
Windows server, though I may dump it to linux to get my smaller file, however not sure my admin would like that. :) Albert wrote: Wolf wrote: I have large log files from a web server (about a gig in size) and need to parse each line looking for a string, and when encountered push that line to

Re: [PHP] Regex help

2006-01-13 Thread Mike Smith
Eric, thanks for replying. I couldn't quite get that to work. Albert, I'm currently working with what you suggested, though the unit names are not that consistent: $vals = preg_split(' ?X? ',$unit[1]); echo strong.$unit[1]./strongbr /\n; echo Panel: .$vals[0].br /Width: .$vals[1].br /Height:

Re: [PHP] Parsing a large file

2006-01-13 Thread Stut
Wolf wrote: Windows server, though I may dump it to linux to get my smaller file, however not sure my admin would like that. :) Get a Windows build of grep (and other useful stuff) here: http://unxutils.sourceforge.net/ Albert wrote: cat filename | grep string newfile Why cat?

Re: [PHP] PHP 4.4.2 released!

2006-01-13 Thread David Grant
Derick, Derick Rethans wrote: The PHP Development Team would like to announce the immediate release of PHP 4.4.2. This is a maintenance release that addresses a number of minor security problems and fixes a few regressions that shown up in PHP 4.4.1. All users of PHP 4 are recommended to

[PHP] ftp_nlist problem

2006-01-13 Thread Giulio
I have a script using some ftp functions that runs just fine on various server I have tested. Now that I've installed it om a customer's server, it ( obviously ) stopped working. claning the script to isolate the problem, I've discovered that the problem is on the ftp_nlist command that

Re: [PHP] Parsing a large file

2006-01-13 Thread Richard Correia
best way I think is nohup grep -i string log1 log2 log3 ...logx newfile This will run this command in background and you can work on other meanwhile. Thanks Richard On 1/13/06, Wolf [EMAIL PROTECTED] wrote: I have large log files from a web server (about a gig in size) and need to parse

[PHP] Re: Greetings

2006-01-13 Thread Mark
Gabor Hojtsy wrote: Dear Pop Mihai Sergiu, By sending this email you (again) posted to a public mailing list which is archived at multiple places, of which really few are under our control. There would be no point in removing your message from our archives, as it is also posted to an

Re: [PHP] Re: Greetings

2006-01-13 Thread Stut
Mark wrote: Gabor Hojtsy wrote: Dear Pop Mihai Sergiu, By sending this email you (again) posted to a public mailing list which is archived at multiple places, of which really few are under our control. There would be no point in removing your message from our archives, as it is also posted

Re: [PHP] Re: Greetings

2006-01-13 Thread Wolf
Stut wrote: Mark wrote: ! -- SNIpped for brevity -- OK, here's the deal. Even if every email address was randomized (stupid) it still does not sole the issue of someone sending it to lists. Even randomized anonymous email addresses wind up going back to you, however it puts more load on a

[PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread Jay Blanchard
I am having a problem with a an ampersand sign. I have a list of things on a page, in which one category is 'Oil Gas'. I store it in the database as 'Oil amp; Gas'. When the category is clicked the query string shows just an ampersand, i.e.

Re: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread Stut
Jay Blanchard wrote: I am having a problem with a an ampersand sign. I have a list of things on a page, in which one category is 'Oil Gas'. I store it in the database as 'Oil amp; Gas'. When the category is clicked the query string shows just an ampersand, i.e.

Re: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread Dotan Cohen
On 1/13/06, Jay Blanchard [EMAIL PROTECTED] wrote: I am having a problem with a an ampersand sign. I have a list of things on a page, in which one category is 'Oil Gas'. I store it in the database as 'Oil amp; Gas'. When the category is clicked the query string shows just an ampersand, i.e.

Re: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread David Grant
Jay, Jay Blanchard wrote: I am having a problem with a an ampersand sign. I have a list of things on a page, in which one category is 'Oil Gas'. I store it in the database as 'Oil amp; Gas'. When the category is clicked the query string shows just an ampersand, i.e.

Re: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread John Nichel
Jay Blanchard wrote: I am having a problem with a an ampersand sign. I have a list of things on a page, in which one category is 'Oil Gas'. I store it in the database as 'Oil amp; Gas'. When the category is clicked the query string shows just an ampersand, i.e.

Re: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread Dotan Cohen
On 1/13/06, Jay Blanchard [EMAIL PROTECTED] wrote: I am having a problem with a an ampersand sign. I have a list of things on a page, in which one category is 'Oil Gas'. I store it in the database as 'Oil amp; Gas'. When the category is clicked the query string shows just an ampersand, i.e.

Re: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread Jochem Maas
Jay Blanchard wrote: I am having a problem with a an ampersand sign. I have a list of things on a page, in which one category is 'Oil Gas'. I store it in the database as 'Oil amp; Gas'. When the category is clicked the query string shows just an ampersand, i.e. 'problem' 1 is the form in

RE: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread Jay Blanchard
[snip] hope the kick didn't break anything. :-) [/snip] Nah, just having a senior moment. Since it is a query string issue I converted the database (even though it is strictly a web database in this case) to 'Oil Gas'. The query string sees the ampersand and doesn't show anything past that in

Re: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread Richard Correia
I think right you need to check urlencode. You can check a nice example at following php mysql resource site http://www.weberdev.com/get_example-481.html Thanks Richard Correia On 1/13/06, Jay Blanchard [EMAIL PROTECTED] wrote: I am having a problem with a an ampersand sign. I have a list of

Re: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread David Grant
Jay, Jay Blanchard wrote: [snip] hope the kick didn't break anything. :-) [/snip] Nah, just having a senior moment. Since it is a query string issue I converted the database (even though it is strictly a web database in this case) to 'Oil Gas'. The query string sees the ampersand and

Re: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread Jochem Maas
Jay Blanchard wrote: [snip] hope the kick didn't break anything. :-) [/snip] Nah, just having a senior moment. Since it is a query string issue I converted the database (even though it is strictly a web database in this case) to 'Oil Gas'. The query string sees the ampersand and doesn't show

[PHP] mcrypt

2006-01-13 Thread Duffy, Scott E
Trying to encrypt then decrypt text with php using mcrypt. The encrypt seems to work but when I decrypt it with a different script I get most of it but some garbage. Using blowfish. So to test. Encrypt.php $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB); $iv =

Re: [PHP] mcrypt

2006-01-13 Thread Jason Gerfen
Duffy, Scott E wrote: Trying to encrypt then decrypt text with php using mcrypt. The encrypt seems to work but when I decrypt it with a different script I get most of it but some garbage. Using blowfish. So to test. Encrypt.php $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH,

Re: [PHP] PHP for Mac

2006-01-13 Thread Ted Zeng
Go here: http://www.entropy.ch/home/ Download the installer you want and run it. Easy and works great for me. GD is included I believe. Ted zeng On 1/12/06 10:29 PM, Richard Correia [EMAIL PROTECTED] wrote: Hi, I want to install PHP5 on Mac powerbook G4. Can someone please let me know

Re: [PHP] Re: Greetings

2006-01-13 Thread Mark
Stut wrote: Mark wrote: Gabor Hojtsy wrote: Dear Pop Mihai Sergiu, By sending this email you (again) posted to a public mailing list which is archived at multiple places, of which really few are under our control. There would be no point in removing your message from our archives, as it

[PHP] RE: mcrypt

2006-01-13 Thread Duffy, Scott E
Doh! Nm. _ From: Duffy, Scott E Sent: Friday, January 13, 2006 11:47 AM To: 'php-general@lists.php.net' Subject: mcrypt Trying to encrypt then decrypt text with php using mcrypt. The encrypt seems to work but when I decrypt it with a different script

Re: [PHP] ftp_nlist problem

2006-01-13 Thread Andrew Brampton
When you do FTP its actually two TCP connections, a outgoing to port 21, and then a incoming. The most common problem with FTP is that the incoming connection gets blocked by a firewall or NAT. So most people use passive FTP where instead it makes two outgoing TCP connections. I think the

Re: [PHP] Parsing a large file

2006-01-13 Thread Jay Paulson
I have large log files from a web server (about a gig in size) and need to parse each line looking for a string, and when encountered push that line to a new file. I was thinking I could have PHP read in the whole file, but thinking it could be a major pain since I have about 20 log files to

Re: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread Richard Lynch
On Fri, January 13, 2006 10:55 am, Jay Blanchard wrote: I am having a problem with a an ampersand sign. I have a list of things on a page, in which one category is 'Oil Gas'. I store it in the database as 'Oil amp; Gas'. Don't. The DATA to be stored in the database is 'Oil Gas' When it's

Re: [PHP] mysqli bind_param and store_result don't work well together

2006-01-13 Thread anirudh dutt
On 1/5/06, Curt Zirzow [EMAIL PROTECTED] wrote: On Wed, Jan 04, 2006 at 12:31:02AM +0530, anirudh dutt wrote: hi the subject is pretty much what the problem is. if i use $st1 = $sql-stmt_init(); // $sql is a mysqli obj/conn $st1-prepare(select `num` from `activity` where `id` = ?);

RE: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread Jay Blanchard
[snip] [/snip] Well said Richard, well said. That is ultimately what I went and did. I am just operating on too little sleep right now, and a couple of times today the simplest things eluded me. I made sure that all of the amp;'s were change to in the database (one I inherited, not an

[PHP] Re: preg_replace - I don't have a clue

2006-01-13 Thread Frank Bax
Is this the wrong forum for this question - or does no-one else have a clue about this either? At 09:43 AM 1/12/06, Frank Bax wrote: As I understand the docs for preg_replace(), I can enclose an PCRE expression in parenthesis and use a backreference in the replace string; but it's not

Re: [PHP] preg_replace - I don't have a clue

2006-01-13 Thread Anthony Best
On 1/12/06, Frank Bax [EMAIL PROTECTED] wrote: reg_replace( ' (\d+\$)', '+$0', $prop ); /* results in dollar-alpha-space-space-plus-digits-dollar */ $Fencing +11$Lumber +17$Weight: 317 Stones$Energy Resist 2%$ Try: preg_replace( '/ (\d+\$)/', '+$1', $prop ); -- Anthony Best

RE: [PHP] Parsing a large file

2006-01-13 Thread Richard Lynch
On Fri, January 13, 2006 8:37 am, Albert wrote: Wolf wrote: I have large log files from a web server (about a gig in size) and need to parse each line looking for a string, and when encountered push that line to a new file. I was thinking I could have PHP read in the whole file, but

Re: [PHP] Parsing a large file

2006-01-13 Thread Richard Lynch
On Fri, January 13, 2006 3:33 pm, Jay Paulson wrote: $buf = ; Probably better to initialize it to an empty array();... while (!feof($fhandle)) { $buf[] = fgets($fhandle); ... since you are going to initialize it to an array here anyway. if ($i++ % 10 == 0) { Buffering 10 lines of

Re: [PHP] preg_replace - I don't have a clue

2006-01-13 Thread Frank Bax
At 05:15 PM 1/13/06, Anthony Best wrote: On 1/12/06, Frank Bax [EMAIL PROTECTED] wrote: reg_replace( ' (\d+\$)', '+$0', $prop ); /* results in dollar-alpha-space-space-plus-digits-dollar */ $Fencing +11$Lumber +17$Weight: 317 Stones$Energy Resist 2%$ Try: preg_replace( '/

Re: [PHP] Re: Greetings

2006-01-13 Thread Richard Lynch
On Fri, January 13, 2006 10:32 am, Stut wrote: However, his rant does present a real issue. Forcing people to use real email addresses exposes them to SPAM and abuse. I would suggest, if possible and resources permit, that some sort of aliasing/registration system be deployed where every post is

Re: [PHP] Parsing a large file

2006-01-13 Thread Jay Paulson
On Fri, January 13, 2006 3:33 pm, Jay Paulson wrote: $buf = ; Probably better to initialize it to an empty array();... Yep right. while (!feof($fhandle)) { $buf[] = fgets($fhandle); ... since you are going to initialize it to an array here anyway. if ($i++ % 10 == 0) {

Re: [PHP] I have stange problem

2006-01-13 Thread Richard Lynch
On Thu, January 12, 2006 5:55 pm, sufinoon wrote: I'm trying to install winxp\apache2\php5.1.2\MySql. The installation was good i have apache recognized php ( Apache/2.0.55 (Win32) PHP/5.1.2 Server at localhost Port 8080 ) so i wrote test script (? phpinfo();?) and sometimes the script is

[PHP] most reliable way to test if using https

2006-01-13 Thread James Benson
What is the most reliable way to test if a connection is already using the https protocol, is their a PHP constant or something builtin already? Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] most reliable way to test if using https

2006-01-13 Thread Ray Hauge
if( !preg_match(/HTTPS/, $_SERVER['SERVER_PROTOCOL']) ){ } That's what I have been using. HTH -- Ray Hauge Programmer/Systems Administrator American Student Loan Services http://www.americanstudentloan.com 1.800.575.1099 On Friday 13 January 2006 04:05 pm, James Benson wrote:

Re: [PHP] question about compositing objects

2006-01-13 Thread Richard Lynch
On Thu, January 12, 2006 4:13 pm, jonathan wrote: I have a class which creates another class within it such as: class Loc{ public function outputInfo() { $map=new Map(); $map-setKey(); } } In my main page can I access the $map object like this: $loc=new Loc();

Re: [PHP] Parsing a large file

2006-01-13 Thread Richard Lynch
On Fri, January 13, 2006 4:47 pm, Jay Paulson wrote: Buffering 10 lines of text in PHP is probably not going to make a significant difference... This is true. It's what I have written to start with. Basically I'm just trying to make sure that I'm not hogging system memory with a huge file

Re: [PHP] Help for ISPs rolling out PHP

2006-01-13 Thread Richard Lynch
On Thu, January 12, 2006 1:51 pm, Ben Rockwood wrote: I'm working with a medium sized ISP to start rolling out PHP and MySQL services to customers. I've been looking around for best practices or help with such a roll out but not found anything. I'm confident I can roll out the services but

Re: [PHP] input validation?

2006-01-13 Thread PHP Superman
input type=text maxlength=300 I think the attribute is called maxlength but i'm not sure, oh well add the maxlength attribute to your input tag to have a quick, clean non-javascript-realiant solution On 1/12/06, John Meyer [EMAIL PROTECTED] wrote: Stut wrote: Ok, you're clearly missing my

Re: [PHP] most reliable way to test if using https

2006-01-13 Thread Matt
James Benson wrote: What is the most reliable way to test if a connection is already using the https protocol, is their a PHP constant or something builtin already? Thanks, James Something like? if (isset($_SERVER[HTTPS]) 'on' == $_SERVER[HTTPS]) {// ssl } else { // non-ssl } -- PHP

Re: [PHP] mysqli bind_param and store_result don't work well together

2006-01-13 Thread Curt Zirzow
On Sat, Jan 14, 2006 at 03:18:55AM +0530, anirudh dutt wrote: On 1/5/06, Curt Zirzow [EMAIL PROTECTED] wrote: On Wed, Jan 04, 2006 at 12:31:02AM +0530, anirudh dutt wrote: hi the subject is pretty much what the problem is. if i use $st1 = $sql-stmt_init(); // $sql is a mysqli

Re: [PHP] most reliable way to test if using https

2006-01-13 Thread Curt Zirzow
On Fri, Jan 13, 2006 at 04:12:08PM -0700, Ray Hauge wrote: if( !preg_match(/HTTPS/, $_SERVER['SERVER_PROTOCOL']) ){ } That's what I have been using. Thats odd cause all my servers report this as SERVER_PROTOCOL via https: $_SERVER[SERVER_PROTOCOL] == HTTP/1.1 Thats odd cause

Re: [PHP] most reliable way to test if using https

2006-01-13 Thread Curt Zirzow
On Sat, Jan 14, 2006 at 04:20:27AM +, Matt wrote: James Benson wrote: What is the most reliable way to test if a connection is already using the https protocol, is their a PHP constant or something builtin already? Thanks, James Something like? if (isset($_SERVER[HTTPS])

Re: [PHP] Lions and tigers and slashes, oh my!

2006-01-13 Thread Curt Zirzow
Bear (pun intened) with me on this one i havn't read the whole thread, so you may get a repeat answer. On Fri, Jan 13, 2006 at 10:55:00AM -0600, Jay Blanchard wrote: I am having a problem with a an ampersand sign. I have a list of things on a page, in which one category is 'Oil Gas'. I store

Re: [PHP] Parsing a large file

2006-01-13 Thread Curt Zirzow
On Fri, Jan 13, 2006 at 04:21:10PM -0600, Richard Lynch wrote: If you DO use grep, don't cat the whole file out to grep it... grep __filename__ __newfile__ oops, forgot the expression :) grep findthis __filename__ __newfile__ -- cat .signature: No such file or directory -- PHP

Re: [PHP] Parsing a large file

2006-01-13 Thread Curt Zirzow
On Fri, Jan 13, 2006 at 04:47:11PM -0600, Jay Paulson wrote: On Fri, January 13, 2006 3:33 pm, Jay Paulson wrote: $buf = ; Probably better to initialize it to an empty array();... Yep right. while (!feof($fhandle)) { $buf[] = fgets($fhandle); ... since you are going to