Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Adam Richardson
On Tue, Mar 15, 2011 at 11:50 AM, Andy McKenzie wrote: > > Now: I did a little more looking around this morning, and it looks > > like I may well run into problems here given that I'm moving from a > > 32-bit architecture to a 64-bit architecture. Bitwise math is still > > fairly obscure to me,

Re: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-14 Thread Adam Richardson
> > This one's got me stumped. I > have the following line in a script: > > $this->bc = ($this->network | (~$this->netmask)) & 4294967295; > > $this->network and $this->netmask should both be of type long, and I > should wind up with another long. I didn't write the original method, > and I can't

Re: [PHP] Can´t upload files bigger than 50KB

2011-03-09 Thread Adam Richardson
Hi Gotzon, I'm wondering if your javascript is timing out. On the development server, is everything local so it's happening close to instantly? If so, it's possible that the latency of your production environment is causing the issue, as it's taking longer to process the request than the ajax scri

Re: [PHP] Jquery

2011-02-21 Thread Adam Richardson
On Mon, Feb 21, 2011 at 7:56 AM, Ellis Antaya wrote: > Hi, first, like everyone else before me told already, you forgot to load > jquery in your page. > Example : > http://code.jquery.com/jquery-1.5.min.js > "> > > Also, i would change your script to remove the first function that was > wrappi

Re: [PHP] New to list and to PHP

2011-02-18 Thread Adam Richardson
On Fri, Feb 18, 2011 at 2:03 PM, Pete Woodhead wrote: > Hi I'm Pete Woodhead. I'm new to the list and to PHP. To be honest I very > new to code writing. > Thought this would be a good way to learn good habits as well as good code > writing. > Looking forward to learning and participating. > Wel

Re: [PHP] Custom function

2011-02-16 Thread Adam Richardson
On Wed, Feb 16, 2011 at 3:21 PM, Peter Lind wrote: > On 16 February 2011 21:00, Dan Schaefer wrote: > > In my code, I set the optional parameter to NULL and check for triple > equals > > "===" or "!==" to see if the variable has been passed with a value. IMO, > > this is the safest way. > > > >

Re: [PHP] Rate my (really) simple template class

2011-02-15 Thread Adam Richardson
On Tue, Feb 15, 2011 at 5:02 PM, Brian Waters wrote: > On Mon, Feb 14, 2011 at 11:49 PM, Paul M Foster > wrote: > > Advice: don't use eval() this way. It's slow and dangerous. > > Could you elaborate, or provide a link? > Hi Brian, Here's a dated but still relevant reference: http://blog.joshua

Re: [PHP] Memcache problems

2011-02-03 Thread Adam Richardson
On Thu, Feb 3, 2011 at 4:19 PM, Jostein Eriksen wrote: > Both php and memcached is running on the same server. > memcached version 1.2.2 > php5-memcache version 2.2.0 > php version 5.2.4 > > here is a snippet from my code that may be of interest > $cfg['serverList'] = array('127.0.0.1', 11211, 1,

Re: [PHP] Pulling from Multiple Databases

2011-02-01 Thread Adam Richardson
On Tue, Feb 1, 2011 at 10:59 AM, Jon Hood wrote: > I have a website that is currently pulling from more than 30 databases, > combining the data, and displaying it to the user. As more and more > databases are added, the script continues to get slower and slower, and > I've > realized that I need

Re: [PHP] 95th percentile of an array.

2011-01-30 Thread Adam Richardson
On Sun, Jan 30, 2011 at 10:39 PM, Adam Richardson wrote: > On Sun, Jan 30, 2011 at 8:44 PM, Marc Trudel wrote: > >> Just out of curiosity, wouldnt it be better to use floor($n) instead of >> round($n-0.5)? >> > > Hi Marc, > > I don't think so, although I

Re: [PHP] 95th percentile of an array.

2011-01-30 Thread Adam Richardson
On Sun, Jan 30, 2011 at 8:44 PM, Marc Trudel wrote: > Just out of curiosity, wouldnt it be better to use floor($n) instead of > round($n-0.5)? > Hi Marc, I don't think so, although I could have missed something (I just quick cranked out the example.) The definition I linked to involves roundin

Re: [PHP] 95th percentile of an array.

2011-01-29 Thread Adam Richardson
For the nearest rank computation, you could use the following: $arr = array(12,89,65,23,90,99,9,15,56,67,3,52,78,12,10,88,77,77,77,77,77,77,77); sort($arr); $score_representing_95th_percentile = $arr[round((95/100) * count($arr) - .5)]; echo $score_representing_95th_percentile; // 90 That said, t

Re: [PHP] Pear Problems

2011-01-26 Thread Adam Richardson
On Thu, Jan 27, 2011 at 1:01 AM, Ethan Rosenberg wrote: > Dear List - > > I am executing the command pear list. > > This is what I get - > > ethan@rosenberg:/usr/bin$ pear list > PHP: syntax error, unexpected '&' in /etc/php5/cli/php.ini on line 510 > Installed packages, channel pear.php.net: > =

Re: [PHP] possible namespace bug?

2011-01-20 Thread Adam Richardson
On Thu, Jan 20, 2011 at 5:33 PM, Tommy Pham wrote: > Hi folks, > > I thought I try implementing namesapce on one the ported apps I did a while > back but ran into a problem. First the code: > > //namespace org\puremvc\php\interfaces; > > interface ICommand > { >function execute(INotification

Re: [PHP] switch case madness

2011-01-19 Thread Adam Richardson
On Wed, Jan 19, 2011 at 12:44 PM, Micky Hulse wrote: > On Wed, Jan 19, 2011 at 6:45 AM, Joshua Kehn wrote: > > On Jan 19, 2011, at 9:43 AM, Jay Blanchard wrote: > >> [snip] > >> ... > >> [/snip] > >> Imagine when there'll be the day when you do not have to code at > >> all...just copy 'n paste sn

Re: [PHP] Class and interface location

2011-01-19 Thread Adam Richardson
On Wed, Jan 19, 2011 at 11:23 AM, la...@garfieldtech.com < la...@garfieldtech.com> wrote: > On 1/19/11 10:09 AM, Adam Richardson wrote: > >> On Wed, Jan 19, 2011 at 8:21 AM, Richard Quadling> >wrote: >> >> On 19 January 2011 07:46, Adam Richardson wrote: >

Re: [PHP] Class and interface location

2011-01-19 Thread Adam Richardson
On Wed, Jan 19, 2011 at 8:21 AM, Richard Quadling wrote: > On 19 January 2011 07:46, Adam Richardson wrote: > > On Wed, Jan 19, 2011 at 2:07 AM, Larry Garfield >wrote: > > > >> 3) Static analysis. Instead of reflection, either tokenize or string > parse > >&

Re: [PHP] Class and interface location

2011-01-18 Thread Adam Richardson
On Wed, Jan 19, 2011 at 2:07 AM, Larry Garfield wrote: > 3) Static analysis. Instead of reflection, either tokenize or string parse > all files to determine what classes implement what interfaces and then > cache > that information. We are actually using this method now to locate classes, > and

Re: [PHP] session_id() is not passed to the next page

2011-01-03 Thread Adam Richardson
On Mon, Jan 3, 2011 at 11:46 PM, Michelle Konzack < linux4miche...@tamay-dogan.net> wrote: > ... >session_register('sess_user'); >session_register('sess_timeout'); >$sess_user= $user; >$sess_timeout = time() + 900; >session_write_close(); >header("Location: " . $redirec

Re: [PHP] Newbie Question

2011-01-02 Thread Adam Richardson
On Sun, Jan 2, 2011 at 12:16 PM, Ashley Sheridan wrote: > On Sun, 2011-01-02 at 11:48 -0500, ad...@buskirkgraphics.com wrote: > > > Add this to your .htaccess file and HTML files will be handled like PHP > > files allowing you put PHP in HTML files. > > > > AddType application/x-httpd-php .html >

Re: [PHP] PDO Prepared Statements and stripslashes

2010-12-21 Thread Adam Richardson
On Mon, Dec 20, 2010 at 11:31 PM, Rico Secada wrote: > Hi. > > In an article about SQL Injection by Chris Shiflett he mentions the > following in a comment: "The process of escaping should preserve data, > so it should never be necessary to reverse it. When I'm auditing an > application, things l

Re: [PHP] PDO: good, popular?

2010-12-14 Thread Adam Richardson
On Tue, Dec 14, 2010 at 6:10 AM, Sam Smith wrote: > Searching for "PHP CRUD" in hopes of learning the best way to access > databases and to use PEAR or what I came across PDO. > > I want to know the communities opinion of PDO: everyone uses it or no one > uses it or it's great or what? > > Thanks

Re: [PHP] ORM doctrine

2010-12-12 Thread Adam Richardson
On Wed, Dec 8, 2010 at 10:02 PM, Tommy Pham wrote: > Hi, > > Has anyone used doctrine before? I know Nathan mentioned it in the other > thread but I was wondering how does it handle multi table joins query, > about > its performance and whether it uses any type of caching. > > Thanks, > Tommy

Re: [PHP] A general discussion of libraries and frameworks

2010-12-10 Thread Adam Richardson
On Fri, Dec 10, 2010 at 8:26 AM, Bob McConnell wrote: > From: Adam Richardson > > > As one point of curiosity, I'm wondering when a function or group of > > functions is, in your eyes, deemed a library. I tend to use the > pornography > > approach to identifying

[PHP] A general discussion of libraries and frameworks

2010-12-10 Thread Adam Richardson
I see that the ORM thread has generated a broad-ranging discussion. Some of the posts have discussed the utility of frameworks and/or libraries, and because it's Friday, I thought I'd toss out my observations on the subject and see what ideas those on the list had regarding the subject. Libraries

Re: [PHP] code quest

2010-11-26 Thread Adam Richardson
On Fri, Nov 26, 2010 at 7:03 PM, Kirk Bailey wrote: > Hello all, my name is Kirk Bailey, and I am new to php, so please be > forbearing. I code in python, and am trying to learn this language as our > new client runs a web business based in it. > > I need a routine that will return a list of every

Re: [PHP] curl and variable parameters in hyperlink

2010-11-24 Thread Adam Richardson
> > foreach ($_POST as $key=>$post) { >$post=str_replace(" ", "+", $post); >$url.=$key."=".$post."&"; >} > Hi Bob, One thing I see is that you're appending values on to the end of a url that already has 2 values, so you should place the "&" at the beginning of your line in

Re: [PHP] E-mail injection question

2010-11-21 Thread Adam Richardson
On Sun, Nov 21, 2010 at 12:02 PM, Gary wrote: > I have been testing various scripts to kill email injection attacks. I > adapted this script and it seems to work well. Does anyone see any issues > with this? > > $newlinecounter = 0; > foreach($_POST as $key => $val_newline){ > if(stristr($val_

Re: [PHP] Stripslashes

2010-11-17 Thread Adam Richardson
> > Adam > > Thanks for your reply. So if I disable magic_quotes, and I assume I can do > that a script, then the stripslashes would work as the manuel said it > would, > meaning > > G\\a//r\y\\ becomes G\a//r'y\ > > I also assume that until php 6 is out and or I upgrade to it, I will have > to >

Re: [PHP] database design in a survey/poll system

2010-11-17 Thread Adam Richardson
On Wed, Nov 17, 2010 at 8:42 AM, 肖晗 wrote: > I plan to design a small survey/poll system similar to > polldaddy > . > > And I have some confusion in designing the database for the multiple/single > choice questions. Of course, it is possible to use one table to store the >

Re: [PHP] Stripslashes

2010-11-16 Thread Adam Richardson
On Tue, Nov 16, 2010 at 10:10 PM, Gary wrote: > I was doing a test of stripslashes on a $_POST, when I recieved the email, > all of the slashes were still in the data posted. > > I used : > > $fname = stripslashes($_POST['fname']); > > I input G\\a//r\y\\, and was expecting, according to the manu

Re: [PHP] DOMDocument/DOMElement problem

2010-11-16 Thread Adam Richardson
Hmmm... Nothing really stands out to me, but as my wife would attest, I'm often less than observant. I would probably try sifting through fixes/upgrades in the change logs for possible conflicts and/or changes in behavior. Nothing jumped out at me after a quick glance. Sorry, Adam On Tue, Nov

Re: [PHP] Is session_start() using encrypted cookies with HTTPS

2010-11-09 Thread Adam Richardson
> > If the cookie needs to be encrypted, why not just encrypt it and worry less > about the transport layer? Or just down one hash value id cookie and pull > back the secure data for action just on the server? > > Bastien The issue highlighted in Yannick's question wouldn't be resolved by merely

Re: [PHP] Template engines

2010-11-09 Thread Adam Richardson
On Mon, Nov 8, 2010 at 4:41 PM, Hansen, Mike wrote: > I really like the idea of using a templating engine. Which one do you use? > Why? For those that don't use templating engines, why don't you use them? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://ww

Re: [PHP] Is session_start() using encrypted cookies with HTTPS

2010-11-08 Thread Adam Richardson
> > Couldn't Yannick also use $_SERVER['HTTPS'] and take action for the > session > and cookies accordingly? > > Regards, > Tommy Not to my understanding. When a visitor makes a request, the browser must determine which cookies are appropriate for transmitting in the request. By the time PHP p

Re: [PHP] Is session_start() using encrypted cookies with HTTPS

2010-11-07 Thread Adam Richardson
On Sun, Nov 7, 2010 at 2:39 PM, Yannick Warnier wrote: > Hi all, > > It came to my attention through the Netcraft newsletter[1] that cookies > in a web application are not always sent encrypted when a server is > contacted through HTTPS. > Not quite. Requests and responses over HTTPS are encrypt

Re: [PHP] questions about if statements regarding a checkbox

2010-10-30 Thread Adam Richardson
On Sat, Oct 30, 2010 at 10:05 PM, Ben Brentlinger wrote: > hello, > > I'd like to know the proper code to use in a php script that processes a > form with a checkbox in order to send one email if the checkbox has been > checked and another email if the checkbox hasn't.  I tried if($check == > true

Re: [PHP] Watermark with GD

2010-10-29 Thread Adam Richardson
On Fri, Oct 29, 2010 at 3:05 PM, Gary wrote: > I am trying to get the watermark to work, however I am having a problem in > that the image is being called from a database (image sits in images file). > > The script in question is this > > $image = imagecreatefromjpeg($_GET['src']); > > However it

Re: [PHP] Stripslashes redundancy question.

2010-10-25 Thread Adam Richardson
> You can only call stripslashes once, and only if magic quotes is > enabled. Even if you can turn it off on your server, if there is any > chance your code will be used on other servers where it might not be > turned off, you need to wrap it with the test for magic quotes to make > it safe. We alw

Re: [PHP] Stripslashes redundancy question.

2010-10-24 Thread Adam Richardson
On Sun, Oct 24, 2010 at 6:29 PM, Gary wrote: > In my form processing scripts, I usually have the variable set as so: > > $email = stripslashes($_POST['email']); > > I have discovered that the program that I use has a pre-written function of > this: > > // remove escape characters from POST array

Re: [PHP] Entity 'reg' not defined

2010-10-22 Thread Adam Richardson
On Fri, Oct 22, 2010 at 1:19 PM, TR Shaw wrote: > > On Oct 22, 2010, at 12:03 PM, Adam Richardson wrote: > > > On Fri, Oct 22, 2010 at 11:47 AM, TR Shaw wrote: > > > >> Anyone have an idea how to work around this? I tried: > >> > >> define (

Re: [PHP] Entity 'reg' not defined

2010-10-22 Thread Adam Richardson
On Fri, Oct 22, 2010 at 11:47 AM, TR Shaw wrote: > Anyone have an idea how to work around this? I tried: > > define ('reg', '®'); > define ('®', '®'); > > can't figure how to override the entity table. Errors follw: > > Warning: simplexml_load_string(): > o.cc/46/e53d68e007fd45c2fccb502f2e7ccad5

Re: [PHP] Convert hex string to hex value?

2010-10-21 Thread Adam Richardson
On Fri, Oct 22, 2010 at 1:05 AM, Micky Hulse wrote: > Hi, > > I must be tired because I can't figure this out... I am sure it is > something obvious. > > I need to pass a hex value to a method, but I can't figure out how to > convert a hex string to a hex value. > > For exmaple: > > $base = '96989

Re: [PHP] "My truth comes out" [1]

2010-10-21 Thread Adam Richardson
On Thu, Oct 21, 2010 at 5:39 AM, Gary wrote: > Is there any nice way to convert a string containing either "TRUE" or > "FALSE" to a bool with the appropriate value? I know I can just "if > (strcmp..." but, as the song goes on to say "...ugly, so ugly, it's > ugly"[1] > > Footnotes: > [1] "Mask",

Re: [PHP] Help with sending credentials?

2010-10-14 Thread Adam Richardson
On Thu, Oct 14, 2010 at 4:45 PM, Brian Dunning wrote: > Gents - > > I'm trying to work with a major vendor's web service, but all my efforts > are met with a 401 authentication error response. I can log in manually to > this URL using these credentials through a browser, so I know the > credential

Re: [PHP] file_get_contents() failing on CentOS.

2010-10-05 Thread Adam Richardson
On Tue, Oct 5, 2010 at 6:56 AM, Richard Quadling wrote: > The issue _WAS_ the firewall. > > All sorted. > > Thank you. > > Glad he got it working. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com

Re: [PHP] Little Parsing help...

2010-10-04 Thread Adam Richardson
On Mon, Oct 4, 2010 at 6:29 AM, Richard Quadling wrote: > > http://pastebin.com/rsV35czb > > Code with tests and output. > > Nice code, Richard. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com

Re: [PHP] Friday's Post

2010-10-01 Thread Adam Richardson
On Fri, Oct 1, 2010 at 10:23 AM, tedd wrote: > Hi gang: > > What do you people think of the .NET framework? > > Please provide your thoughts as to cost, maintenance, benefit, and whatever > else you think important. > > Thanks, > > tedd > -- > --- > http://sperling.com/ > > -- > PHP General M

Re: [PHP] Re: Which PHP 5.3 documentation generators have you found?

2010-09-30 Thread Adam Richardson
On Thu, Sep 30, 2010 at 2:30 PM, Erik L. Arneson wrote: > On Wed, 29 Sep 2010, Adam Richardson wrote: > > Hi all, > > > > Anybody know of a documentation generator which plays nicely with PHP > > 5.3? > > I've always been a fan of phpDocumentor. > >

Re: [PHP] converting a mysql date value

2010-09-29 Thread Adam Richardson
On Wed, Sep 29, 2010 at 3:11 PM, David Mehler wrote: > Hello, > I've got dates stored in a mysql database. The field is of type date > so the value is something like: "2010-09-29" I'm wanting to display > them as in U.S. dates as in month, day, year. I had a function that > did this, now it is no

Re: [PHP] Which PHP 5.3 documentation generators have you found?

2010-09-29 Thread Adam Richardson
On Wed, Sep 29, 2010 at 2:54 PM, a...@ashleysheridan.co.uk < a...@ashleysheridan.co.uk> wrote: > Does phpDocumenter not do the trick? I must admit, I've not tried anything > specific to 5.3 (i can imagine the namespace thing would be a major part if > the documentation) but its served me well with

[PHP] Which PHP 5.3 documentation generators have you found?

2010-09-29 Thread Adam Richardson
Hi all, Anybody know of a documentation generator which plays nicely with PHP 5.3? Thanks, Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com

Re: [PHP] newbie question about code

2010-09-10 Thread Adam Richardson
On Fri, Sep 10, 2010 at 3:03 PM, Joshua Kehn wrote: > Adam- > > It is unique. I'm writing code that really can't be done any other way. How > it handles events, sockets, etc is exceptional. The best part is everything > now is JavaScript. The server (Node.js) is written in JavaScript. MongoDB is

Re: [PHP] newbie question about code

2010-09-10 Thread Adam Richardson
> > > > This is what I get for taking a week to code everything in Node.js. > > It is a Friday, so I'll let my curiosity get the best of me and ask a follow-up on something non-PHP. What insights/impressions do you have regarding Node.js after a week of working with it? Thanks, Adam -- Nephta

Re: [PHP] array_walk_recursive pass by reference

2010-08-29 Thread Adam Richardson
On Sun, Aug 29, 2010 at 12:35 AM, kranthi wrote: > i have an array > $parms = array('1' => 'a', 'b' => array(3 => 'test')); > i want $mail = '1:a 3:test'; > But you're uppercasing and adding new lines and additional spaces, so I hope you want (at least, this is what I tested against): "1: A\n3:

Re: [PHP] Upload using FTP commands

2010-08-26 Thread Adam Richardson
On Thu, Aug 26, 2010 at 12:37 PM, Ashley Sheridan wrote: > On Thu, 2010-08-26 at 17:24 +0100, Matthew Croud wrote: > > > Hi, > > > > I want to give my client the ability to upload large files ( around > > 20MB ) to a webspace. > > I reckon that using the FTP commands of PHP would be the best bet,

Re: [PHP] xml/cap problems

2010-08-22 Thread Adam Richardson
On Sat, Aug 21, 2010 at 5:53 PM, Tom Shaw wrote: > I am trying to decode and encode nws compatible cap xml. An example is at > the bottom of this post. simplexml_load_file works fine if "cap:" is removed > before processing. However, if it is not simplexml_load_file does not parse > the file at a

Re: [PHP] [OUTPUT BUFFER] - problems with redirects

2010-08-19 Thread Adam Richardson
On Thu, Aug 19, 2010 at 6:01 PM, Tristan wrote: > So, I'm have this site where all this code was developed and the logic sits > in different plugins throughout a template. So, html is output and then > hits > one of these plugins. Plugins do some processing and then hit a > header(location...) re

Re: [PHP] Can't read $_POST array

2010-08-18 Thread Adam Richardson
On Wed, Aug 18, 2010 at 4:55 PM, Adam Richardson wrote: > On Wed, Aug 18, 2010 at 4:49 PM, Ashley Sheridan > wrote: > >> On Wed, 2010-08-18 at 13:45 -0700, Brian Dunning wrote: >> >> > I'm trying to write a VERY simple script that does nothing but store all &g

Re: [PHP] Can't read $_POST array

2010-08-18 Thread Adam Richardson
On Wed, Aug 18, 2010 at 4:49 PM, Ashley Sheridan wrote: > On Wed, 2010-08-18 at 13:45 -0700, Brian Dunning wrote: > > > I'm trying to write a VERY simple script that does nothing but store all > the submitted GET and POST vars in a string and echo it out. > > > > $response = print_r($_REQUEST, tru

Re: [PHP] method overloading in a class

2010-08-18 Thread Adam Richardson
On Wed, Aug 18, 2010 at 12:23 PM, Ashley Sheridan wrote: > Hi list, > > I know that some languages such as C++ can overload functions and > methods by declaring the method again with a different number of > arguments, and the compiler internally sorts things out, but I can't > seem to find a simil

Re: [PHP] Encryption/Decryption Question

2010-08-12 Thread Adam Richardson
On Wed, Aug 11, 2010 at 6:50 PM, tedd wrote: > Hi gang: > > Okay, a question to the Encryption/Decryption gurus out there. > > If you were given: > > 1. This encrypted string: > > p3IVhDBT26i+p4vd7J4fAw== > > 2. Were told it was a social security number (i.e., in the form of > 123-45-6789). > > 3

Re: [PHP] Quotes vs. Single Quote

2010-08-05 Thread Adam Richardson
On Thu, Aug 5, 2010 at 10:53 PM, Rick Dwyer wrote: > > On Aug 5, 2010, at 10:43 PM, Michael Shadle wrote: > > > > > For HTML, -always- use double quotes. > > > > is the right way. > > is the wrong way. > > > > I'd go into more explanation but there simply doesn't need to be one. > I would sugg

Re: [PHP] [site is acting strange] - blank pages, download index.php, or works fine

2010-07-30 Thread Adam Richardson
On Fri, Jul 30, 2010 at 11:35 AM, Bill Guion wrote: > At 6:45 PM -0600 7/29/10, Tristan wrote: > > Yeah like i said site works 95% of the time when navigating. PHP5.2, Mysql >> 5. The site is completely dynamic so it wouldn't work at all if that was >> the >> case of it not being installed right

Re: [PHP] the state of the PHP community

2010-07-29 Thread Adam Richardson
On Thu, Jul 29, 2010 at 1:36 AM, Nathan Rixham wrote: > Hi All, > > I find myself wondering about the state of the PHP community (and related > community with a PHP focus), so, here's a bunch of questions - feel free to > answer none to all of them, on list or off, or add more of your own - this

Re: [PHP] opening link in new window

2010-07-24 Thread Adam Richardson
On Sat, Jul 24, 2010 at 10:20 AM, Robert Cummings wrote: > On 10-07-24 04:19 AM, Adam Richardson wrote: > >> >> Code that resembled the below is how I used to open new windows before I >> started using jQuery Note, this completely avoids use of the target >

Re: [PHP] opening link in new window

2010-07-24 Thread Adam Richardson
On Sat, Jul 24, 2010 at 2:44 AM, Robert Cummings wrote: > On 10-07-24 02:06 AM, Paul M Foster wrote: > >> On Sat, Jul 24, 2010 at 01:08:49AM -0400, Robert Cummings wrote: >> >> On 10-07-24 12:58 AM, Paul M Foster wrote: >>> On Fri, Jul 23, 2010 at 01:28:23AM -0400, David Mehler wrote: >

Re: [PHP] adduser & php

2010-07-10 Thread Adam Richardson
On Sat, Jul 10, 2010 at 4:39 PM, Matt M. wrote: > The only thing is, when I execute this command from a shell, it works. > Obviously I'm replacing $username and $password with something valid when > doing this manually. > > It's like the script clears the $username variable just before it execute

Re: [PHP] Login using just cookies, bad idea?

2010-07-08 Thread Adam Richardson
On Thu, Jul 8, 2010 at 1:00 PM, Ashley Sheridan wrote: > On Thu, 2010-07-08 at 09:53 -0700, Michael Calkins wrote: > > > I right now have a complete user login and registration system however it > uses cookies when you login to store information. Is this a bad > thing?$_COOKIE vs $_SESSION for l

Re: [PHP] Setting up a XDebug debugging environment for PHP / WAMP / Eclipse PDT

2010-07-08 Thread Adam Richardson
On Thu, Jul 8, 2010 at 6:40 AM, David Négrier < d.negr...@thecodingmachine.com> wrote: > Hi list, > > After struggling a bit to set-up a debug environment in PHP, I decided to > write a complete tutorial to explain how to set-up XDebug in a WAMP / > Eclipse PDT environment. > > Everything was alre

Re: [PHP] php processing name vs. id field

2010-07-02 Thread Adam Richardson
On Fri, Jul 2, 2010 at 1:59 PM, Peter Lind wrote: > On 2 July 2010 19:52, Adam Richardson wrote: > > On Fri, Jul 2, 2010 at 12:28 PM, wrote: > > > >> "Bob McConnell" wrote on 07/02/2010 08:53:30 AM: > >> > >> > > Argument

Re: [PHP] php processing name vs. id field

2010-07-02 Thread Adam Richardson
On Fri, Jul 2, 2010 at 12:28 PM, wrote: > "Bob McConnell" wrote on 07/02/2010 08:53:30 AM: > > > > Arguments against using/dismissing the "name" attribute in tags is > > > simply nonsense. > > > > This discussion began when I pointed out that the name attribute is > > deprecated in XHTML. This w

Re: [PHP] Delegating variable-length argument lists

2010-07-02 Thread Adam Richardson
On Fri, Jul 2, 2010 at 11:49 AM, Jakob Günther wrote: > > I did not find a solution, so i tried passing a array with references. > > $arr = array(&$a, &$b); > bind_param("ii", $arr); > > function bind_param($types, $arr){ >array_unshift($arr, $types); >call_user_func_array (array

Re: [PHP] php processing name vs. id field

2010-06-30 Thread Adam Richardson
On Wed, Jun 30, 2010 at 9:16 PM, David Mehler wrote: > Hello, > I've got a php form processing question. I've got a text field like so: > > > Name*: > > > > My question is what is the purpose of the id field? I know the name > field is what php references, but am not sure what id is for? > Th

Re: [PHP] Making a Password Confirmation in PHP

2010-06-24 Thread Adam Richardson
On Thu, Jun 24, 2010 at 2:46 PM, Ashley Sheridan wrote: > On Thu, 2010-06-24 at 20:37 +0200, David Česal wrote: > > > Yes, it is. > > > > D > > > > -Original Message- > > From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] > > Sent: Thursday, June 24, 2010 8:32 PM > > To: Floyd Resler

Re: [PHP] $_SERVER['REMOTE_ADDR'] and sql injection

2010-06-23 Thread Adam Richardson
On Wed, Jun 23, 2010 at 2:53 AM, Tanel Tammik wrote: > Hi, > > is there a vulnerability with using $_SERVER['REMOTE_ADDR'] in sql queries? > > Br > Tanel > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > As long as you treat it w

Re: [PHP] Encrypt and Decript email using PHP

2010-06-20 Thread Adam Richardson
On Sun, Jun 20, 2010 at 12:46 PM, saeed ahmed wrote: > hello friends, > > Is there a way to send an encrypted email from server-side PHP, and then > decrypt it using an email client such as Outlook? > > regards > saeed > http://saeed05.wordpress.com > If you use a standard such as s/mime, then y

Re: [PHP] stripping first comma off and everything after

2010-06-19 Thread Adam Richardson
On Sat, Jun 19, 2010 at 3:08 AM, Adam Richardson wrote: > On Fri, Jun 18, 2010 at 3:56 PM, Adam Williams < > adam_willi...@bellsouth.net> wrote: > >> I'm querying data and have results such as a variable named >> $entries[$i]["dn"]: >> >> CN

Re: [PHP] stripping first comma off and everything after

2010-06-19 Thread Adam Richardson
On Fri, Jun 18, 2010 at 3:56 PM, Adam Williams wrote: > I'm querying data and have results such as a variable named > $entries[$i]["dn"]: > > CN=NTPRTPS3-LANIER-LD335c-LH107-PPRNP9A92,OU=XXf,OU=XX,OU=X,DC=,DC=xx,DC=xxx > > > Basically I need to strip off

Re: [PHP] Unit testing in PHP

2010-06-17 Thread Adam Richardson
> > From: vikash > > > What do you use for unit testing in PHP? phpUnit, SimpleTest or any > other? > SimpleTest because of the flexibility. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com

Re: [PHP] protecting email addresses on a web site

2010-06-14 Thread Adam Richardson
On Mon, Jun 14, 2010 at 5:51 PM, Ashley Sheridan wrote: > On Mon, 2010-06-14 at 17:20 -0400, Paul M Foster wrote: > > > On Mon, Jun 14, 2010 at 01:06:29PM +0100, Ashley Sheridan wrote: > > > > > On Mon, 2010-06-14 at 08:02 -0400, David Mehler wrote: > > > > > > > Hello, > > > > I've got a site tha

Re: [PHP] String Parse Help for novice

2010-06-13 Thread Adam Richardson
On Sun, Jun 13, 2010 at 9:29 PM, Robert Cummings wrote: > Rick Dwyer wrote: > >> Hello List. >> >> I need to parse the PATH portion of URL. I have assigned the path >> portion to a variable using the following: >> >> $thepath = parse_url($url); >> >> >> Now I need to break each portion of the pa

Re: [PHP] Question - foreach.

2010-06-09 Thread Adam Richardson
On Wed, Jun 9, 2010 at 9:49 PM, Shreyas wrote: > PHP'ers, > > I am reading a PHP book which explains foreach and at the end says : *'When > foreach starts walking through an array, it moves the pointer to > the beginning of the array. You don’t need to reset an array before > walking through it w

Re: [PHP] Blowfish Encryption

2010-06-08 Thread Adam Richardson
Hi Paul, > > If one has multiple samples of encrypted emails, it's likely that the > several > > of the samples will end using the same cipher text, as many people end > their > > emails with a consistent signature. This repeated cipher text improves > the > > ability of those trying to attack (

Re: [PHP] Blowfish Encryption

2010-06-07 Thread Adam Richardson
On Mon, Jun 7, 2010 at 11:20 PM, Paul M Foster wrote: > I've got a file of passwords I'd like to encrypt/decrypt using blowfish. > I'd > like to be able to do so with PHP and via the command line. I have a > Linux utility call "bcrypt" which encrypts/decrypts files using > blowfish. And I'm using

Re: [PHP] Finding a font.

2010-06-07 Thread Adam Richardson
On Mon, Jun 7, 2010 at 10:22 PM, Karl DeSaulniers wrote: > Hi Dave, > It is called "Fine Hand" I believe. Found a copy here. > > > http://www.fonts.com/FindFonts/Detail.htm?pid=203813&/cgi-bin/MsmGo.exe?grab_id=0&page_id=8346&query=HANDWRITING&SCOPE=Fonts > > HTH, > > Karl > > > > > On Jun 7, 2010

Re: [PHP] DOMDocument::loadXML() failed when parsing comments inside a script tag

2010-06-06 Thread Adam Richardson
On Sun, Jun 6, 2010 at 10:39 PM, Raymond Irving wrote: > Hello, > > I'm experiencing another issue when attempting to use > DOMDocument::loadXML() > to load the following HTML code: > > $html = ' > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > > > >