php-general Digest 5 Aug 2009 10:47:47 -0000 Issue 6268

Topics (messages 296306 through 296317):

Re: Need quick  got written up yesterday!! OUCH (RESOLVED)
        296306 by: HallMarc Websites
        296307 by: Paul M Foster
        296308 by: Govinda
        296309 by: Eric Butera
        296310 by: Shawn McKenzie

Re: Multiple MySQL Queries
        296311 by: sono-io.fannullone.us
        296315 by: sono-io.fannullone.us

Warning: OutsourcingRoom.com
        296312 by: Daniel Brown
        296313 by: Steve
        296316 by: Ashley Sheridan

Re: Compare PHP settings of two different servers
        296314 by: Dave M G
        296317 by: Robert Cummings

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 ---
> -----Original Message-----
> From: Paul M Foster [mailto:pa...@quillandmouse.com]
> Sent: Tuesday, August 04, 2009 5:44 PM
> To: php-gene...@lists.php.net
> Subject: Re: [PHP] Need quick got written up yesterday!! OUCH
> (RESOLVED)
> 
> On Tue, Aug 04, 2009 at 12:42:11PM -0500, Shawn McKenzie wrote:
> 
> > Miller, Terion wrote:
> > > Shawn you know repeatedly have been nothing but an asshole to me on
> > > this list, I have said before I'm not a php programmer, I was a
> front
> > > end designer, need graphics , need a css layout...see me....need
> > > backend programming..I'm trying... Stop being such a egomaniacal
> > > dickhead, a social life may do you good.
> >
> > Dearest Terion,
> >
> > If by "repeatedly", you mean twice, then yes I'll agree.  I've also
> > helped and/or solved your issues more than twice (once being today if
> > you've read it and followed it).  Most often my intent was to get you
> to
> > try and learn and troubleshoot your own issues instead of posting the
> > same code problems and syntax errors over and over.  You come to this
> > list "repeatedly" with errors that are caused by a total lack of
> > understanding, and in my opinion, a total lack of due diligence on
> your
> > part.  It's not today or the past week or the past several weeks,
> it's
> > been for quite some time with little or no improvement.
> >
> > If by being an "asshole", you mean the time that I suggested that you
> > get an editor with syntax checking/highlighting because you posted a
> > whole page of wrapped code that had a syntax error (missing
> semicolon),
> > then yes I have been, though a helpful asshole with good intentions.
> At
> > some point it gets obnoxious.  When is that point?  It differs
> depending
> > upon the person.  Many on this list have just stopped replying to
> your
> > posts altogether. I like them need to see an attempt to help ones
> self
> > occasionally before I continue with help.
> >
> > I wasn't defending your boss yelling at you, that's rarely
> appropriate.
> >  However, after the many posts from you on this list, to see "Need
> quick
> > got written up yesterday!! OUCH", I felt like yelling at you, "Need
> > payment doing your work!! CONSTANTLY" :-)
> >
> > As a CSS/HTML/graphics designer, did you take this job with the
> > understanding that you'd have to learn PHP or did they just thrust it
> > upon you?  If the former, then you need to buckle down and learn it
> in a
> > constructive manner.  If your social life needs to suffer for a short
> > time, then that's what it takes. If the latter, then maybe talk to
> them
> > about some company paid training and mentoring from someone helpful
> that
> > knows backend programming and PHP.
> >
> > I may be a "dickhead", but not "egomaniacal". There are many better
> PHP
> > gurus on this list than I, and I know it. Unfortunately, many of them
> > are ignoring your posts entirely.  At present my social life is
> actually
> > overwhelming my ability to devote time to PHP coding, however if
> you'd
> > like to send pictures I'll give them a look see.
> >
> > I can understand your frustration and can tell that you're very
> > stressed, so I will attempt to not be an "asshole" nor a "dickhead",
> but
> > please show a little more devotion to learning and helping yourself.
> 
> I have to agree with Shawn on most everything. I'm one of those people
> who've chosen not to pay attention to your posts. The masses of code
> you
> post are nearly indecipherable, and you seem to be constantly tripped
> up
> by syntax errors, etc.
> 
> PJ blew it with me in the same way. PJ, too, is not a professional
> coder. And like you, he seems to be unwilling to buckle down and study
> the language, preferring instead to come to experts here to get free
> tutoring. But at some point, the patience of people on this list runs
> out, and rather than excoriating you, they simply stop helping you.
> 
> My point here is not to insult you or denigrate your abilities. You may
> be a very nice person, and quite talented at doing the things you're
> trained to do. But programming in PHP is apparently not one of them.
> And
> if you're going to be doing this for a living, then you're going to
> have
> to either stop doing this for a living, or actually study the subject.
> Because sooner or later, no one here will listen, no matter how nice
> you
> are, and no matter how well you do the other parts of your job.
> 
> Paul
> 
> --
> Paul M. Foster
> 
> --
[HallMarc Websites] 

God I love this planet. I agree with Paul.
 

__________ Information from ESET Smart Security, version of virus signature
database 4306 (20090804) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 


--- End Message ---
--- Begin Message ---
On Tue, Aug 04, 2009 at 06:10:30PM -0400, HallMarc Websites wrote:

> [HallMarc Websites]
> 
> God I love this planet. I agree with Paul.
> 

Yeah, great planet, this. A little touristy, but still a good travel
value. 

;-}

Paul

-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---
Terion,

I've done a lot of backend programming, but I'm even more newbie than you in PHP... so take this from an equal, & FWIW: I think we in this work can all get dry/impersonal and grouchy at times, but to rephrase the others, in perhaps more encouraging terms: I think the guys just want the natural satisfaction of seeing you grow in understanding. it is really fulfilling to help people; we all love helping someone in need! But we all also want to see our investment stick and make a difference in the long run. Putting out fires is ok once in a while, but much more satisfying is contributing to someone getting good at this stuff, even if at a humble pace.

------------
John Butler (Govinda)
govinda.webdnat...@gmail.com




--- End Message ---
--- Begin Message ---
On Tue, Aug 4, 2009 at 7:19 PM, Govinda<govinda.webdnat...@gmail.com> wrote:
> Terion,
>
> I've done a lot of backend programming, but I'm even more newbie than you in
> PHP...  so take this from an equal, & FWIW:
> I think we in this work can all get dry/impersonal and grouchy at times, but
> to rephrase the others, in perhaps more encouraging terms:
> I think the guys just want the natural satisfaction of seeing you grow in
> understanding.  it is really fulfilling to help people; we all love helping
> someone in need!  But we all also want to see our investment stick and make
> a difference in the long run.  Putting out fires is ok once in a while, but
> much more satisfying is contributing to someone getting good at this stuff,
> even if at a humble pace.
>
> ------------
> John Butler (Govinda)
> govinda.webdnat...@gmail.com
>
>
>
>

Yea that whole teach a person to fish... yadda yadda. :)

-- 
http://www.ericbutera.us/

--- End Message ---
--- Begin Message ---
Eric Butera wrote:
> On Tue, Aug 4, 2009 at 7:19 PM, Govinda<govinda.webdnat...@gmail.com> wrote:
>> Terion,
>>
>> I've done a lot of backend programming, but I'm even more newbie than you in
>> PHP...  so take this from an equal, & FWIW:
>> I think we in this work can all get dry/impersonal and grouchy at times, but
>> to rephrase the others, in perhaps more encouraging terms:
>> I think the guys just want the natural satisfaction of seeing you grow in
>> understanding.  it is really fulfilling to help people; we all love helping
>> someone in need!  But we all also want to see our investment stick and make
>> a difference in the long run.  Putting out fires is ok once in a while, but
>> much more satisfying is contributing to someone getting good at this stuff,
>> even if at a humble pace.
>>
>> ------------
>> John Butler (Govinda)
>> govinda.webdnat...@gmail.com
>>
>>
>>
>>
> 
> Yea that whole teach a person to fish... yadda yadda. :)
> 

Ya, the on fire thing or whatever is the weird part.

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message --- I've run up against something else here that I can't find an answer for. This line of the script:

$cats = array('01100-01200-01300-06403' => 'Starter Units', '01100-02201-01300-06403' => 'Add-On Units', '01100-99222-11341-18451' => 'Extra Shelves');

is supposed to pull all items from each category and gives each table a heading. Unfortunately, if a product in the db has more than one category assigned to it, it will not show up in the generated table. So, if an Extra Shelf has a second category, the categories are stored as 01100-99222-11341-18451``07108-05253-12341-01451 and if it has 3 categories assigned to it, they're stored like 01100 -99222-11341-18451``07108-05253-12341-01451``07108-01254-39341-01451, and so on.

Is there a way that I can tell the array to find all products whose categories either equal exactly the category I'm giving it or if it _contains_ that particular category? I've tried using the * wildcard but that didn't work. I've also tried WHERE categories CONTAINS '$cat' but that didn't work either.

Any insight into this would be greatly appreciated. If I can't find a fix for this problem, this whole script is useless to me, as most of our products have multiple categories and so it will only display a portion of the products that it should, if any at all.

Thanks a million,
Frank

--- End Message ---
--- Begin Message --- Well, it took me all evening to figure it out, but I did. The SQL statement needed to be changed to
WHERE categories LIKE '%$cat%'
and now it works. I had found an old book on my shelf called "MySQL and Perl for the Web" and found an example in there that pointed me in the right direction. I also found a website that gives a concise description of the SQL commands and syntax:
http://www.1keydata.com/sql/sql-commands.html

        So all is well again!

Regards,
Frank

I've run up against something else here that I can't find an answer for. This line of the script:

$cats = array('01100-01200-01300-06403' => 'Starter Units', '01100-02201-01300-06403' => 'Add-On Units', '01100-99222-11341-18451' => 'Extra Shelves');

is supposed to pull all items from each category and gives each table a heading. Unfortunately, if a product in the db has more than one category assigned to it, it will not show up in the generated table. So, if an Extra Shelf has a second category, the categories are stored as 01100-99222-11341-18451``07108-05253-12341-01451 and if it has 3 categories assigned to it, they're stored like 01100 -99222 -11341-18451``07108-05253-12341-01451``07108-01254-39341-01451, and so on.

Is there a way that I can tell the array to find all products whose categories either equal exactly the category I'm giving it or if it _contains_ that particular category? I've tried using the * wildcard but that didn't work. I've also tried WHERE categories CONTAINS '$cat' but that didn't work either.

--- End Message ---
--- Begin Message ---
    Just as a heads-up, in case you guys weren't yet aware (cross-posting):

    Elance.com was the victim of an SQL injection attack earlier this
summer (they apparently missed our billions of threads on sanity).
According to their folks, only names, company names, phone numbers,
and email addresses were taken.  Whether or not that's true, I don't
know, but that's beyond the scope of this warning.

    The most recent attempt to get more of your personal information
comes from a (*possibly* legitimate) website named
OutsourcingRoom.com.  If you have been a member of Elance, you may
have already received the message from OSR that claims that you signed
up with them, and gives you a username and password.  Now, I'm not
here to tell you guys and gals what to do, but taking the facts into
account - the stealing of private information by breeching the
security of a competitor - it's entirely up to you as to whether or
not you'll consider OSR a trustworthy business.  Chances are, they'll
not only charge you for using the service, but will also be so kind as
to reuse (or redistribute) your private and financial information,
should you be willing to give it to them.

    We've already received numerous hits on our network for
OutsourcingRoom.com and one or two other shoddy attempts to gain more
information.  Today the emails seem to have picked up significantly,
and appear to be not only valid, but professionally-crafted.
Thankfully, we were anticipating such, after being alerted to the
attack by Elance themselves.  Perhaps a bit embarrassing for them, but
it was a good move to mitigate the damage post-fact, in my opinion.

    That's it.  Just trying to keep everyone from getting scammed and
screwed.  For more information, check Google, as always.  ;-P

-- 
</Daniel P. Brown>
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig

--- End Message ---
--- Begin Message ---
Daniel Brown wrote:
    Just as a heads-up, in case you guys weren't yet aware (cross-posting):

    Elance.com was the victim of an SQL injection attack earlier this
summer (they apparently missed our billions of threads on sanity).
According to their folks, only names, company names, phone numbers,
and email addresses were taken.  Whether or not that's true, I don't
know, but that's beyond the scope of this warning.

    The most recent attempt to get more of your personal information
comes from a (*possibly* legitimate) website named
OutsourcingRoom.com.  If you have been a member of Elance, you may
have already received the message from OSR that claims that you signed
up with them, and gives you a username and password.  Now, I'm not
here to tell you guys and gals what to do, but taking the facts into
account - the stealing of private information by breeching the
security of a competitor - it's entirely up to you as to whether or
not you'll consider OSR a trustworthy business.  Chances are, they'll
not only charge you for using the service, but will also be so kind as
to reuse (or redistribute) your private and financial information,
should you be willing to give it to them.

    We've already received numerous hits on our network for
OutsourcingRoom.com and one or two other shoddy attempts to gain more
information.  Today the emails seem to have picked up significantly,
and appear to be not only valid, but professionally-crafted.
Thankfully, we were anticipating such, after being alerted to the
attack by Elance themselves.  Perhaps a bit embarrassing for them, but
it was a good move to mitigate the damage post-fact, in my opinion.

    That's it.  Just trying to keep everyone from getting scammed and
screwed.  For more information, check Google, as always.  ;-P


I got that email. I was wondering what that was about. Thanks for the info!

--- End Message ---
--- Begin Message ---
On Tue, 2009-08-04 at 20:49 -0700, Steve wrote:
> Daniel Brown wrote:
> >     Just as a heads-up, in case you guys weren't yet aware (cross-posting):
> >
> >     Elance.com was the victim of an SQL injection attack earlier this
> > summer (they apparently missed our billions of threads on sanity).
> > According to their folks, only names, company names, phone numbers,
> > and email addresses were taken.  Whether or not that's true, I don't
> > know, but that's beyond the scope of this warning.
> >
> >     The most recent attempt to get more of your personal information
> > comes from a (*possibly* legitimate) website named
> > OutsourcingRoom.com.  If you have been a member of Elance, you may
> > have already received the message from OSR that claims that you signed
> > up with them, and gives you a username and password.  Now, I'm not
> > here to tell you guys and gals what to do, but taking the facts into
> > account - the stealing of private information by breeching the
> > security of a competitor - it's entirely up to you as to whether or
> > not you'll consider OSR a trustworthy business.  Chances are, they'll
> > not only charge you for using the service, but will also be so kind as
> > to reuse (or redistribute) your private and financial information,
> > should you be willing to give it to them.
> >
> >     We've already received numerous hits on our network for
> > OutsourcingRoom.com and one or two other shoddy attempts to gain more
> > information.  Today the emails seem to have picked up significantly,
> > and appear to be not only valid, but professionally-crafted.
> > Thankfully, we were anticipating such, after being alerted to the
> > attack by Elance themselves.  Perhaps a bit embarrassing for them, but
> > it was a good move to mitigate the damage post-fact, in my opinion.
> >
> >     That's it.  Just trying to keep everyone from getting scammed and
> > screwed.  For more information, check Google, as always.  ;-P
> >
> >   
> 
> I got that email. I was wondering what that was about. Thanks for the info!
> 
Well, I try not to give out my details to too many people each month,
and this month they were beat to it by a nice fellow in Nigeria who I'm
helping out by letting him put some money into my account. Next month I
had originally planned to invest in those berrys everyone is talking
about and some watches, and then after that, I need to update my account
details on Ebay (I forgot I even had an account with them!) as they keep
asking me to go and do it because of a security update they've made.

Ho hum...

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


--- End Message ---
--- Begin Message ---
Bob, Ben, David, Robert,

Thank you all for responding.

Just to recap, I'm trying to find out why I can write text into a PNG
image on one server, but not on another.

After much playing around, I have a list of the different configuration
modules installed on the two servers. The lists below are lists of the
modules *not* in common between them.

>From what I can see, none of the modules that the behaving server have
that the misbehaving server doesn't has anything to do with fonts or
images. So my suspicion is starting to be that maybe the problem is not
in the PHP set up, but elsewhere.

Before I move on to other possible solutions, I'd like to double check
with more experienced eyes. Do any of the modules here affect text in
PNG files?

Misbehaving Server:
'--enable-ftp'
'--enable-magic-quotes'
'--enable-mbstring'
'--enable-pdo'
'--enable-soap'
'--enable-zip'
'--with-apxs2'
'--with-curl'
'--with-curl=/usr/local/lib'
'--with-freetype-dir=/usr/local/lib'
'--with-mcrypt'
'--with-mhash'
'--with-openssl'
'--with-pear'
'--with-pdo-mysql'
'--with-pdo-sqlite'
'--with-sqlite'
'--with-xmlrpc'
'--with-unixODBC=/usr'

Behaving Server:
'--disable-pdo'
'--enable-libxml'
'--prefix=/usr/local'
'--with-apxs2=/usr/local/apache/bin/apxs'
'--with-freetype-dir=/usr'
'--with-imap=/opt/php_with_imap_client/'
'--with-imap-ssl=/usr'
'--with-libxml-dir=/opt/xml2/'
'--with-mime-magic'
'--with-mysql-sock=/var/lib/mysql/mysql.sock'
'--with-xpm-dir=/usr/X11R6'

And, just to note, *both* servers have the following:

* '--with-gd'
* '--with-ttf'
* '--enable-gd-native-ttf'


-- 
Dave M G
http://tlug.jp/mediawiki/index.php?title=User:Dave_M_G

--- End Message ---
--- Begin Message ---


Dave M G wrote:
Bob, Ben, David, Robert,

Thank you all for responding.

Just to recap, I'm trying to find out why I can write text into a PNG
image on one server, but not on another.

After much playing around, I have a list of the different configuration
modules installed on the two servers. The lists below are lists of the
modules *not* in common between them.

From what I can see, none of the modules that the behaving server have
that the misbehaving server doesn't has anything to do with fonts or
images. So my suspicion is starting to be that maybe the problem is not
in the PHP set up, but elsewhere.

Before I move on to other possible solutions, I'd like to double check
with more experienced eyes. Do any of the modules here affect text in
PNG files?

Misbehaving Server:
'--enable-ftp'
'--enable-magic-quotes'
'--enable-mbstring'
'--enable-pdo'
'--enable-soap'
'--enable-zip'
'--with-apxs2'
'--with-curl'
'--with-curl=/usr/local/lib'
'--with-freetype-dir=/usr/local/lib'
'--with-mcrypt'
'--with-mhash'
'--with-openssl'
'--with-pear'
'--with-pdo-mysql'
'--with-pdo-sqlite'
'--with-sqlite'
'--with-xmlrpc'
'--with-unixODBC=/usr'

Behaving Server:
'--disable-pdo'
'--enable-libxml'
'--prefix=/usr/local'
'--with-apxs2=/usr/local/apache/bin/apxs'
'--with-freetype-dir=/usr'
'--with-imap=/opt/php_with_imap_client/'
'--with-imap-ssl=/usr'
'--with-libxml-dir=/opt/xml2/'
'--with-mime-magic'
'--with-mysql-sock=/var/lib/mysql/mysql.sock'
'--with-xpm-dir=/usr/X11R6'

And, just to note, *both* servers have the following:

* '--with-gd'
* '--with-ttf'
* '--enable-gd-native-ttf'

These are the command line arguments used to enable/disable extensions. They don't guarantee that the extension is actually enabled though. Check the extensions in phpinfo() output. Each properly enabled extensions should have a little header. You are also trying to manipulate a PNG file... I believe that relies on libpng-dev and may require --with-png-dir=/usr/lib. I usually compile PHP myself so I'm not sure what the defaults are for various distros.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--- End Message ---

Reply via email to