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);
> >
> > ...
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
--
P
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
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
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
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(); //
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
}
--
P
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 point and while I don't wa
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 service
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 hug
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=
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:
>
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
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 () and sometimes the script is
> working
> 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++ %
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
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( '/ (\d
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 line
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
>> f
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
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 working
[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 &'s were
change to & in the database (one I inherited, not an excuse,
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` wh
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 & Gas'.
Don't.
The DATA to be stored in the database is 'Oil & Gas'
When it's
> 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
> file
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 dire
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
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
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 m
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, MCRYPT_MODE_ECB);
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 = mcrypt_create_
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
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
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
[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 th
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 & Gas'. When the category is clicked the query string shows just an
ampersand, i.e.
'problem' 1 is the form in which y
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 & Gas'. When the category is clicked the query string shows just an
> ampersand, i.e
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 & Gas'. When the category is clicked the query string shows just an
ampersand, i.e.
"Filter=Process&FilterKey=Oil%20&%20
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 & Gas'. When the category is clicked the query string shows just an
> ampersand, i.e.
> "Filter=Process&Filter
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 & Gas'. When the category is clicked the query string shows just an
> ampersand, i.e
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 & Gas'. When the category is clicked the query string shows just an
ampersand, i.e.
"Filter=Process&FilterKey=Oil%20&%2
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 & Gas'. When the category is clicked the query string shows just an
ampersand, i.e.
"Filter=Process&FilterKey=Oil%20&%20Gas&Order=Application&D
Stut wrote:
> Mark wrote:
>
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 server in the process.
RT
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
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
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
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 f
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 t
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 | grep >
Why cat? Sorry, but this is o
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 "".$unit[1]."\n";
echo "Panel: ".$vals[0]."Width: ".$vals[1]."Height:
".$vals[2]."\n";
202
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
>>
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 2
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 sepa
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
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: http://www.q
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
E X X
then you could try something like:
// Very much untested
$unit = '102-90 E 42 X 42 X 70 3/8';
$split1 = explo
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
Ideall
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 () and sometimes the script is working
and i got the data and some time i got "Cannot find server
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]
r
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
60 matches
Mail list logo