php-general Digest 2 Jun 2010 15:35:25 -0000 Issue 6778

Topics (messages 305734 through 305744):

Re: Credit Card encryption
        305734 by: Michael Shadle
        305737 by: Ashley Sheridan

Re: regular expression
        305735 by: Peter
        305736 by: Richard Quadling
        305744 by: Jan G.B.

strange problem of mysql_query
        305738 by: I am on the top of the world! Borlange University
        305739 by: Ashley Sheridan
        305743 by: Jim Lucas

Re: php accelorator
        305740 by: Dan Joseph
        305741 by: Nilesh Govindarajan

Re: Set up MySQL + Apache 2.2.4 on Win XP.
        305742 by: Bob McConnell

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Is this a joke?

Better hope your merchant provider isn't lookin...


On Jun 1, 2010, at 7:17 PM, Brandon Rampersad <brandon.add...@gmail.com> wrote:

I store CC # in plain text on my custom ecommerse website script so i can compare it with others. That way it's easier to convert to different hashes when i decide to integrate an encryption system. So far i havent had any
problems.

On Tue, Jun 1, 2010 at 11:15 AM, Paul M Foster <pa...@quillandmouse.com >wrote:

On Tue, Jun 01, 2010 at 10:42:11AM -0400, tedd wrote:

At 9:24 PM -0400 5/31/10, Paul M Foster wrote:
On Mon, May 31, 2010 at 05:06:23PM -0400, tedd wrote:

At 12:36 PM -0400 5/31/10, I wrote:
That's Okay, but I'm simply telling you what I KNOW to be true. You
may either accept what I have to say, or reject it, but to reply
that what I say is "Not true" is somewhat offensive and
confrontational. I hope you didn't mean it that way. :-)

My apologies for taking what you said as I did and my reply -- it was
wrong of me. I am sure you didn't mean anything offensive.

You are correct. I meant no offense. In turn, when I read your post, it appeared that you were making a blanket statement applicable under all conditions, to which I objected. However, reading back over it, you did
insert qualifiers.

Paul

Okay, let's not get a room over this.  :-)

Yes, dear. ;-}

Paul

--
Paul M. Foster

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
A Brandon_R Production

--- End Message ---
--- Begin Message ---
On Tue, 2010-06-01 at 19:39 -0700, Michael Shadle wrote:

> Is this a joke?
> 
> Better hope your merchant provider isn't lookin...
> 
> 
> On Jun 1, 2010, at 7:17 PM, Brandon Rampersad  
> <brandon.add...@gmail.com> wrote:
> 
> > I store CC # in plain text on my custom ecommerse website script so  
> > i can
> > compare it with others. That way it's easier to convert to different  
> > hashes
> > when i decide to integrate an encryption system. So far i havent had  
> > any
> > problems.
> >
> > On Tue, Jun 1, 2010 at 11:15 AM, Paul M Foster <pa...@quillandmouse.com 
> > >wrote:
> >
> >> On Tue, Jun 01, 2010 at 10:42:11AM -0400, tedd wrote:
> >>
> >>> At 9:24 PM -0400 5/31/10, Paul M Foster wrote:
> >>>> On Mon, May 31, 2010 at 05:06:23PM -0400, tedd wrote:
> >>>>
> >>>>> At 12:36 PM -0400 5/31/10, I wrote:
> >>>>>> That's Okay, but I'm simply telling you what I KNOW to be true.  
> >>>>>> You
> >>>>>> may either accept what I have to say, or reject it, but to reply
> >>>>>> that what I say is "Not true" is somewhat offensive and
> >>>>>> confrontational. I hope you didn't mean it that way. :-)
> >>>>>
> >>>>> My apologies for taking what you said as I did and my reply --  
> >>>>> it was
> >>>>> wrong of me. I am sure you didn't mean anything offensive.
> >>>>
> >>>> You are correct. I meant no offense. In turn, when I read your  
> >>>> post, it
> >>>> appeared that you were making a blanket statement applicable  
> >>>> under all
> >>>> conditions, to which I objected. However, reading back over it,  
> >>>> you did
> >>>> insert qualifiers.
> >>>>
> >>>> Paul
> >>>
> >>> Okay, let's not get a room over this.  :-)
> >>
> >> Yes, dear. ;-}
> >>
> >> Paul
> >>
> >> --
> >> Paul M. Foster
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> >
> > -- 
> > A Brandon_R Production
> 


Yeah, I'm pretty sure this is illegal, and if it isn't in your country,
then it's sure gonna be against the terms and conditions of your
merchant provider.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
Hi  Tanel,

1. only letters

$str = 'helloworld';

if(preg_match("/^[a-zA-Z]*$/",$str))
echo "only letters";
else
echo "failed";

2. only letters and spaces

$str = 'hello world';

if(preg_match("/^[a-zA-Z\s]*$/",$str))
echo "only letters and spaces";
else
echo "failed";


Regards
Peter.M

Tanel Tammik wrote:
How to check with regular expression (preg) if string has:

1. only letters
2. only letters and spaces

Br
Tanel



--- End Message ---
--- Begin Message ---
On 2 June 2010 06:12, Peter <pet...@egrabber.com> wrote:
> Hi  Tanel,
>
> 1. only letters
>
> $str = 'helloworld';
>
> if(preg_match("/^[a-zA-Z]*$/",$str))
> echo "only letters";
> else
> echo "failed";
>
> 2. only letters and spaces
>
> $str = 'hello world';
>
> if(preg_match("/^[a-zA-Z\s]*$/",$str))
> echo "only letters and spaces";
> else
> echo "failed";
>
>
> Regards
> Peter.M

Be careful with using *.

The issue of a zero length string is important.

* will allow a zero length string.

++ will force the regex to match something, so zero length strings are rejected.



/s will match space, formfeed, newline, carriage return, horizontal
tab, and vertical tab

So a string with newlines (for example a <textarea> with line breaks)
would match.





-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--- End Message ---
--- Begin Message ---
2010/6/1 Peter Lind <peter.e.l...@gmail.com>:
> On 1 June 2010 17:33, Ashley Sheridan <a...@ashleysheridan.co.uk> wrote:
>> On Tue, 2010-06-01 at 16:31 +0100, Richard Quadling wrote:
>>
>>> $re1 = '/^[a-z]++$/i';
>>> $re2 = '/^[a-z ]++$/i';
>>>
>>>
>>>
>>> --
>>> -----
>>> Richard Quadling
>>> "Standing on the shoulders of some very clever giants!"
>>> EE : http://www.experts-exchange.com/M_248814.html
>>> EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
>>> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
>>> ZOPA : http://uk.zopa.com/member/RQuadling
>>>
>>
>>
>> Why the double ++ in the expressions there? Surely one + would match the
>> 1 or more characters that you need and the second one would just be
>> surplus?
>>
>
> Equally important: why have three people already done this persons
> homework. 5 minutes googling would have answered this ...
>

Even more important: No answer is correct, because f.e. "äüßćéâ" are
also letters.

Bye

;-)

--- End Message ---
--- Begin Message ---
hey, i have a sql string like below:
select szs_content from szs_gy_ca where szs_shengchanhao='09-s525' and
szs_guige='48B32/14-1 1/8"' and szs_tuhao='48B32 1 1/8'

the problem is that using mysql_query to run this sql string returns
nothing,however, i can get one record through mysql query tool.

i was wondering whether the double quote 48B32/14-1 1/8" makes this trouble.

--- End Message ---
--- Begin Message ---
On Wed, 2010-06-02 at 17:36 +0800, I am on the top of the world!
Borlange University wrote:

> hey, i have a sql string like below:
> select szs_content from szs_gy_ca where szs_shengchanhao='09-s525' and
> szs_guige='48B32/14-1 1/8"' and szs_tuhao='48B32 1 1/8'
> 
> the problem is that using mysql_query to run this sql string returns
> nothing,however, i can get one record through mysql query tool.
> 
> i was wondering whether the double quote 48B32/14-1 1/8" makes this trouble.


The double quotes inside of that query won't cause any trouble, but you
haven't shown us how you're executing the query with PHP. The usual is
to do something like this:

$query = "select szs_content from szs_gy_ca where
szs_shengchanhao='09-s525' and szs_guige='48B32/14-1 1/8\"' and
szs_tuhao='48B32 1 1/8'";
$result = mysql_query($query);

Note that the double quote there is escaped because you're already using
double quotes as the string identifier in PHP.

If that still doesn't give you the results you expect, it's more likely
a logic problem than a syntax issue.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
I am on the top of the world! Borlange University wrote:
hey, i have a sql string like below:
select szs_content from szs_gy_ca where szs_shengchanhao='09-s525' and
szs_guige='48B32/14-1 1/8"' and szs_tuhao='48B32 1 1/8'

the problem is that using mysql_query to run this sql string returns
nothing,however, i can get one record through mysql query tool.

i was wondering whether the double quote 48B32/14-1 1/8" makes this trouble.


Break it down the basic of examples.

show us how you...

1. connect to mysql from php
2. select your database in mysql from php
3. prepare the SQL query
4. executing said query
5. collecting/displaying the results of executed query


As you can see, you gave us step 3. The problem could be in any of the other setups.

--
Jim Lucas

A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

--- End Message ---
--- Begin Message ---
Cool, thanks for the tips, I am going to check them out.


-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code "NEWTHINGS" for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry

--- End Message ---
--- Begin Message ---
If you're looking out for an accelerator then it means that you have a
custom server. Then I suggest, you use mod_fcgid with php-fcgi.
mod_fcgid uses the fastcgi protocol and also it serves the caching
part (that's the biggest difference between mod_fcgid and
mod_fastcgi).

-- 
Nilesh Govindarajan
Facebook: nilesh.gr
Twitter: nileshgr
Website: www.itech7.com
Cheap and Reliable VPS Hosting: http://j.mp/arHk5e

--- End Message ---
--- Begin Message ---
From: Shreyas

> What would be the exact installer which will let me have the MySQL
Server
> and the Query browser? I know this is the wrong forum but I am just
giving
> it a shot. When I do Start -> All Programs -> MYSQL, I used to get
only
> above options. I have lost the installer and the actual MySQL website
has
> quite a lot of things.

I don't know anything about the MySQL toy, but from scanning this thread
you already have a server installed if your java app is talking to it on
port 3306. You are now trying to install a second server on the same
computer, which can only be done if you change the port number.

How did you install the first server? Was it part of the java install or
did one of the other packages you installed put it there? Do you still
have the documents for that package with the default users and
passwords?

Bob McConnell

--- End Message ---

Reply via email to