Re: [PHP] COM - Assigning to method.

2013-07-15 Thread Andrew Ballard
On Mon, Jul 15, 2013 at 4:21 AM, Adam Nicholls wrote: > Hi Andrew > > Thanks for this. > > But I'm still getting errors. I think I need to explain a bit more. > > Unfortunately there isn't a PHP API for this application I'm trying to > interact with, my goal really is to be able to expose the COM

Re: [PHP] COM - Assigning to method.

2013-07-14 Thread Andrew Ballard
2013 17:11, Richard Quadling wrote: > > > > > > > > On 13 July 2013 01:24, Andrew Ballard wrote: > >> > >> On Jul 12, 2013 4:53 AM, "Adam Nicholls" wrote: > >> > > >> > Hi Guys/Gals, > >> > > >> > I'

Re: [PHP] COM - Assigning to method.

2013-07-12 Thread Andrew Ballard
On Jul 12, 2013 4:53 AM, "Adam Nicholls" wrote: > > Hi Guys/Gals, > > I'm doing some integration work with a COM API and according to their > documentation to save data in the API, you have to assign to the > method. > > This is their example in Visual Basic: > > --

Re: [PHP] Webpage Persistence Load balancing

2013-05-29 Thread Andrew Ballard
On May 29, 2013 8:04 AM, "Al" wrote: > > I'm having a webpage Persistence problem, it is intermittent. I suspect it is caused by load-balancing. > > Specifically: > > Users are connected to a webpage form to complete. Generally, everything is OK if they take a minute or even more to complete the

Re: [PHP] Saving session to database

2013-05-17 Thread Andrew Ballard
I've found database session storage requires extra diligence in error handling. When I see that error at 0 it is usually because something blew up either before the session handler was ready or after it was torn down. Andrew On May 17, 2013 2:42 PM, "Matijn Woudt" wrote: > On Fri, May 17, 2013 a

Re: [PHP] array_map() with multiple callback functions

2013-05-08 Thread Andrew Ballard
On Tue, May 7, 2013 at 5:43 PM, Alex Nikitin wrote: > On Tue, May 7, 2013 at 4:29 PM, George Langley wrote: >> Hi all. I want to apply strtolower() AND trim() to all items in an array. >> But I don't see a way to call multiple callbacks with the array_map() >> function. >> Are my two choices th

Re: [PHP] Load testing an app

2013-04-24 Thread Andrew Ballard
On Apr 24, 2013 9:46 PM, "tamouse mailing lists" wrote: > > On Tue, Apr 23, 2013 at 8:04 AM, Andrew Ballard wrote: > > On Tue, Apr 23, 2013 at 2:29 AM, Adam Richardson wrote: > >> On Mon, Apr 22, 2013 at 10:41 PM, Andrew Ballard wrote: > >>> The ot

Re: [PHP] Load testing an app

2013-04-23 Thread Andrew Ballard
On Tue, Apr 23, 2013 at 2:29 AM, Adam Richardson wrote: > > On Mon, Apr 22, 2013 at 10:41 PM, Andrew Ballard wrote: >> >> The other developer in our office spent some time profiling the site with >> xdebug and found that an exec() call to netsh used on a couple pages seem

[PHP] Load testing an app

2013-04-22 Thread Andrew Ballard
I'm looking for ideas to help load test a PHP site my office wrote and maintains. Peak usage for this site is during the fall when new students arrive, and for the first time this past fall the traffic rendered the web server completely unresponsive, almost as quickly as we could restart it. The on

Re: [PHP] Looking for complete entered URL

2013-04-21 Thread Andrew Ballard
Correct. Just to expand on that, a browser will not send the hash fragment part of a URL with the request. If you ever receive that part at the web server, that's a pretty good sign the request came from a robot. Andrew On Apr 21, 2013 3:29 AM, "Ashley Sheridan" wrote: > > > tamouse mailing list

Re: [PHP] variable type - conversion/checking

2013-03-16 Thread Andrew Ballard
On Sat, Mar 16, 2013 at 12:21 PM, Ashley Sheridan wrote: > > On Sat, 2013-03-16 at 11:46 -0400, Andrew Ballard wrote: > > On Mar 16, 2013 6:14 AM, "Ashley Sheridan" wrote: > > > > On Fri, 2013-03-15 at 22:32 -0400, Andrew Ballard wrote: > >> > >

Re: [PHP] variable type - conversion/checking

2013-03-16 Thread Andrew Ballard
On Mar 16, 2013 6:14 AM, "Ashley Sheridan" wrote: > > On Fri, 2013-03-15 at 22:32 -0400, Andrew Ballard wrote: >> >> > Guess regex are the only useful solution here. When you consider to use >> > built-in functions, just remember, that for example '0x

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Andrew Ballard
> Guess regex are the only useful solution here. When you consider to use > built-in functions, just remember, that for example '0xAF' is an integer > too, but '42.00' isn't. Shoot...I hadn't considered how PHP might handle hex or octal strings when casting to int. (Again, not in front of a comput

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Andrew Ballard
On Mar 15, 2013 9:54 PM, "Sebastian Krebs" wrote: > > 2013/3/16 Andrew Ballard >> >> I suppose one could try something like this: >> >> if (is_string($val) && $val === (string)(int)$val) >> >> If $val is an integer masquerading a

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Andrew Ballard
I suppose one could try something like this: if (is_string($val) && $val === (string)(int)$val) If $val is an integer masquerading as a string, it should be identical to the original string when cast back to a string, shouldn't it? (I can't try it right now.) Andrew

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-19 Thread Andrew Ballard
On Sat, Nov 17, 2012 at 4:13 PM, Sebastian Krebs wrote: > 2012/11/17 Andrew Ballard > >> On Nov 16, 2012 10:24 PM, "tamouse mailing lists" >> wrote: >> > >> > On Fri, Nov 16, 2012 at 12:41 PM, Sebastian Krebs >> wrote: >> > &g

Re: [PHP] Re: Switch - Case Statement Questions

2012-11-17 Thread Andrew Ballard
On Nov 16, 2012 10:24 PM, "tamouse mailing lists" wrote: > > On Fri, Nov 16, 2012 at 12:41 PM, Sebastian Krebs wrote: > > Beside this it can be rewritten as > > > > switch ((int) (($count-1) / 7) { > > case 0: // 1-7 > > case 1: // 8 - 14 > > default: // above 15 > > } > > Nice code refacto

Re: [PHP] Session data lost in Firefox

2012-10-26 Thread Andrew Ballard
On Fri, Oct 26, 2012 at 12:12 PM, John Boy wrote: > Looks like it was a corrupted Paypal cookie lurking about on my test > machine. Clearing all Paypal cookies cured the problem. > Hours can be spent looking for needles like this in a very complex haystack > and it turns out to be the simplest sol

Re: [PHP] Session data lost in Firefox

2012-10-26 Thread Andrew Ballard
On Fri, Oct 26, 2012 at 8:49 AM, John Boy wrote: > Hi > > I have a wesite where PHP session data is passed page to page then shells > out to Paypal for payment then back to my website for completion of > transaction and update of mysql file. When using Firefox our session data > and POST data from

RE: [PHP] MS SQL server connection problem.

2012-09-05 Thread Andrew Ballard
On Sep 5, 2012 7:14 AM, "Jeff Burcher" wrote: > > Hi, > > I am relatively new as well. I tried both of those methods with no luck. I > finally had success using odbc_connect(). See below: > > $conn = odbc_connect("Driver={SQL > Server};Server=$server;Database=$database;", $user, $password); > > Th

Re: [PHP] Help with MSSQL and Stored Procs

2012-08-29 Thread Andrew Ballard
On Wed, Aug 29, 2012 at 3:14 PM, Phillip Baker wrote: > I am trying to access a MSSQL DB on another system. > I am having trouble executed a stored proc and debugging the problem./ > > I have included the code below. > I can connect to the DB just fine. > I also can run regular queries on the DB a

Re: [PHP] MSSQL Stored Proc

2012-08-28 Thread Andrew Ballard
On Tue, Aug 28, 2012 at 1:03 PM, Phillip Baker wrote: > Greetings all, > > I am having some trouble with running a stored proc on an MSSQL DB. > I am new to using MSSQL. > > > > $link = mssql_connect($server, $db, $password); > > > > if(!$link){ > > die('Error connecting to MSSQL d

Re: [PHP] Cost of redirect and site domain switch? Good Practice/ Bad Practice / Terrible Practice

2012-08-19 Thread Andrew Ballard
On Mon, Aug 20, 2012 at 12:19 AM, Jim Lucas wrote: > On 8/17/2012 6:35 PM, Jim Giner wrote: >> >> On 8/17/2012 7:16 PM, Jim Lucas wrote: >>> >>> >>> You could simply remove all full domain+path URL links and replace >>> them with absolute path urls only. >>> >>> turn http://www.somedomain.com/path

Re: [PHP] PHP session variables

2012-08-15 Thread Andrew Ballard
On Wed, Aug 15, 2012 at 3:24 PM, Tedd Sperling wrote: > Your points are well taken -- thanks. I've seen a lot of people code that way, so it's easy to miss. In your original code, that first statement was calling session_start() 1,000 times. This is because the first time through, SID is undefine

Re: [PHP] PHP session variables

2012-08-15 Thread Andrew Ballard
On Fri, Aug 10, 2012 at 11:56 AM, Tedd Sperling wrote: > On Aug 10, 2012, at 11:45 AM, Tedd Sperling wrote: > >> On Aug 9, 2012, at 5:16 PM, Jim Lucas wrote: >>> You are relying on PHP's loose typing. This is a poor check. >>> >>> session_id() returns a string, not boolean. >>> >>> You should d

Re: [PHP] Two ways to obtain an object property

2012-08-15 Thread Andrew Ballard
On Wed, Aug 15, 2012 at 11:33 AM, Paul M Foster wrote: > On Wed, Aug 15, 2012 at 09:28:28AM +0100, phplist wrote: > >> This relates to a minor dilemma I come across from time and time, >> and I'm looking for advice on pros and cons and best practice. Last >> night I encountered it again. >> >> Wit

Re: [PHP] Creating drop-down menus

2012-07-17 Thread Andrew Ballard
On Tue, Jul 17, 2012 at 4:58 PM, Paul M Foster wrote: > On Wed, Jul 18, 2012 at 08:45:34AM +1200, James Newman wrote: > >> Just to put my 2cents in, you might want to try jQuery if you're going to >> go down the AJAX road. > > JQuery is a LOT of code to include if you're just going to do an AJAX >

Re: [PHP] Unexpected Notice message

2012-07-05 Thread Andrew Ballard
On Thu, Jul 5, 2012 at 3:10 AM, Arno Kuhl wrote: > -Original Message- > From: Tim Streater [mailto:t...@clothears.org.uk] > Sent: 04 July 2012 06:56 PM > To: Marc Guay; php-general@lists.php.net > Subject: Re: [PHP] Unexpected Notice message > > On 04 Jul 2012 at 16:51, Marc Guay wrote: >

Re: [PHP] Simple XML, (x)html, and xpath

2012-05-25 Thread Andrew Ballard
On Fri, May 25, 2012 at 3:57 AM, Gary wrote: > If I use simplexml_load_string to create an XML object with the > following XHTML > , > | > | | "http://www.w3.org/TR/ > | xhtml1/DTD/xhtml1-strict.dtd"> > | http://www.w3.org/1999/xhtml";> > | | /> > | test title > | > | > | > | > | > `--

Re: [PHP] Sunset/Sunrise

2012-03-20 Thread Andrew Ballard
On Tue, Mar 20, 2012 at 6:00 PM, Tedd Sperling wrote: > That's what I get for not checking it myself. I was assured by one of my > students that was our correct lat/long. Boy, will he hear from me -- he's > going to find his next assignment in China. :-) > > Thanks, > > tedd That's the spirit!

Re: [PHP] Sunset/Sunrise

2012-03-20 Thread Andrew Ballard
On Tue, Mar 20, 2012 at 9:23 AM, Tedd Sperling wrote: > Hi gang: > > What's wrong with this? > > echo date("D M d Y"). ', sunrise time : ' .date_sunrise(time(), > SUNFUNCS_RET_STRING, 42.57, 84.3320, 90, -5); > echo(''); > echo date("D M d Y"). ', sunset time : ' .date_sunset(time(), > SUNFUNCS_

Re: [PHP] fgetcsv doesn't return an array?

2012-03-15 Thread Andrew Ballard
On Thu, Mar 15, 2012 at 1:29 PM, Jay Blanchard wrote: > On 3/15/2012 12:23 PM, Matijn Woudt wrote: >> >> On Thu, Mar 15, 2012 at 6:09 PM, Jay Blanchard >>  wrote: >>> >>> I thought that fgetcsv returned an array. I can work with it like an >>> array >>> but I get the following warning when using

Fwd: [PHP] Function mktime() documentation question

2012-03-09 Thread Andrew Ballard
And again to the list, since for some reason "Reply-to-all" did not do as intended this time. -- Forwarded message ------ From: Andrew Ballard Date: Fri, Mar 9, 2012 at 12:53 PM Subject: Re: [PHP] Function mktime() documentation question To: Tedd Sperling On Fri, Mar

Re: [PHP] innerHTML triple quotes issue

2011-09-15 Thread Andrew Ballard
On Thu, Sep 15, 2011 at 5:01 AM, Grega Leskovšek wrote: > > My Heavenly profession is being onmouseover=' src=\"http://imagecache2.allposters.com/images/PF_New/102008/3070943.jpg\"; > alt =\"close to my heavenly face\" />'";?>' > onmouseout="this.innerHTML='an angel'">an angel, > > > I first trie

Re: [PHP] Secure vs httpOnly cookie flag: is one better?

2011-08-16 Thread Andrew Ballard
On Tue, Aug 16, 2011 at 1:01 PM, Jen Rasmussen wrote: > Thank you in advance for your input on my question here . > > > > I am currently running PHP 5.1.6 and would prefer to set both the secure and > httpOnly flags for a session cookie, > > however, httpOnly is not added until PHP 5.2. I have fou

Re: Fwd: [PHP] Keeping session info in $_SESSION or in database?

2011-08-15 Thread Andrew Ballard
On Mon, Aug 15, 2011 at 4:33 PM, Ashley Sheridan wrote: > > >> On Mon, 2011-08-15 at 14:12 -0500, Philip Thompson wrote: >> Crap! I wish this list would have a reply-to list automatically > > It does, just hit the reply to all or reply to list button on your email > client. I know Gmail has bo

Re: [PHP] Problem with inserting numbers...

2011-08-11 Thread Andrew Ballard
On Wed, Aug 10, 2011 at 9:22 PM, Jason Pruim wrote: > So here I am attempting to generate some numbers to be inserted into a > database... eventually they will make up a phone number (Which I've emailed > about before and know about the bad ideas with it.. But it's the customer :)) > > Here is t

Re: [PHP] Struggling with MySQL query

2011-08-09 Thread Andrew Ballard
On Tue, Aug 9, 2011 at 10:14 AM, David Green wrote: [snip] > $data = mysql_query("SELECT * FROM news_items WHERE upper('headline') LIKE > '%$find%'"); A couple things to consider. First, as a few others have pointed out, you probably want to remove the single quotes around the word headline in y

Re: [PHP] PHP Security: Best Practices

2011-08-08 Thread Andrew Ballard
On Mon, Aug 8, 2011 at 10:08 AM, Jen Rasmussen wrote: [snip] > > On a side note, PHP versions prior to 5.3+ do not allow to set the httponly > flag as a cookie parameter, is there any acceptable alternative for this? I believe that has been supported since 5.2.0. As for a workaround for versions

Re: [PHP] Complex (or not so) array data form submission?

2011-08-04 Thread Andrew Ballard
On Thu, Aug 4, 2011 at 2:04 PM, Jamie Krasnoo wrote: > Thanks. I think what I got hung up on was that I was trying this: > > name="addresses[][id]" > name="addresses[][address1]" > name="addresses[][address2]" > name="addresses[][city]" > name="addresses[][state]" > name="addresses[][zip]" > > Whi

Re: [PHP] Complex (or not so) array data form submission?

2011-08-04 Thread Andrew Ballard
On Thu, Aug 4, 2011 at 1:18 PM, Jamie Krasnoo wrote: > > Hey all, > > I get the basics of submitting a form and organizing the $_POST data within > arrays (name[], name[key], etc). But if I wanted to submit something like > multiple addresses and have it end up organized in array form like this fr

Re: [PHP] How to install pecl_http into a web hosting service

2011-07-25 Thread Andrew Ballard
On Mon, Jul 25, 2011 at 12:26 PM, Jamie Krasnoo wrote: [reordered and snipped] > > On Thu, Jul 21, 2011 at 8:52 PM, gato chalar wrote: >> Hi list, >> >> I need to perform http requests (GET,POST) , I have readed about pecl_http >> package, so it seem to be what I need. Reading further I sow some

Re: [PHP] Re: Date validation

2011-05-23 Thread Andrew Ballard
On Mon, May 23, 2011 at 9:55 AM, Tamara Temple wrote: > Isn't this typically why date selectors are used on the front end? > Not really. Date selectors are intended to make data entry easier on the front end while allowing only valid date selections, but you can't really rely on them. * Most dat

Re: [PHP] PHP intreprets trailing slashes incorrectly?

2011-05-20 Thread Andrew Ballard
On Fri, May 20, 2011 at 6:35 AM, Richard Quadling wrote: [snip] > > At a #, the fragment_id doesn't seem to reach PHP. > Correct. Since the hash symbol ("fragment identifier") signals the beginning of the name of an internal bookmark within the document returned by the server, browsers don't ev

Re: [PHP] Implementing optional methods in a concrete class, but calling them from an abstract class.

2010-11-01 Thread Andrew Ballard
On Mon, Nov 1, 2010 at 11:13 AM, Richard Quadling wrote: > Hi. > > I have an abstract base class (call it genericServiceHandler). > > I have concrete classes (FaxService, EmailService). > > The genericServiceHandler is watching for commands from an external > source. The commands will always be on

Re: [PHP] Sessions only work in SSL

2010-10-19 Thread Andrew Ballard
On Mon, Oct 18, 2010 at 8:46 PM, Daniel Houle wrote: > I have a strange issue here.  I am running a CentOS machine, with > > apache 2.2.3 > php 5.1.6 > kernel 2.6.18-194.8.1.el5xen > > My sessions will work using https, but not using simple http.  I've compared > my configs with another identical

Re: [PHP] Formatting an ECHO statement.

2010-10-18 Thread Andrew Ballard
On Mon, Oct 18, 2010 at 1:28 PM, tedd wrote: > At 6:03 PM +0100 10/18/10, a...@ashleysheridan.co.uk wrote: >> >> There's nothing wrong with using as it indicates emphasised text, >> which is semantic. Use span tags with classes only when the content you're >> styling has no semantic alternative.

Re: [PHP] RegExp question: how to add a number?

2010-10-15 Thread Andrew Ballard
On Fri, Oct 15, 2010 at 11:07 AM, Richard Quadling wrote: > On 15 October 2010 15:45, Andrew Ballard wrote: >> On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling >> wrote: >>> On 15 October 2010 10:16, Ford, Mike wrote: >>>>> -Original Message-

Re: [PHP] RegExp question: how to add a number?

2010-10-15 Thread Andrew Ballard
On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling wrote: > On 15 October 2010 10:16, Ford, Mike wrote: >>> -Original Message- >>> From: Andre Polykanine [mailto:an...@oire.org] >>> Sent: 14 October 2010 21:42 >>> >>> Hi everyone, >>> I hope you're doing well (haven't written here for a lo

Re: [PHP] Casting from parent class to child

2010-10-08 Thread Andrew Ballard
On Fri, Oct 8, 2010 at 12:50 PM, Nathan Rixham wrote: > David Harkness wrote: >> >> Casting does not change an object. You must copy the relevant value(s) >> from >> the object returned into a new DateTimePlus. Since DateTime's constructor >> takes only a string, and I assume it won't accept your

Re: [PHP] Database Administration

2010-09-24 Thread Andrew Ballard
On Fri, Sep 24, 2010 at 6:19 AM, Tom Barrett wrote: [snip] > I'm not actually that familiar with DB admin to that extent. I have either > app users with lock+crud on specific databases, or root. As a an aside, > would you know if there is a level of permissions for a user between app and > root th

Re: [PHP] Session Vars loaded from MSSQL Query drop, those loaded from MYSQL Query stick

2010-09-17 Thread Andrew Ballard
On Fri, Sep 17, 2010 at 10:50 AM, Cheryl Sullivan wrote: > Hi there - just to clear things up, I didn't mean your answer was irrelevant. >  It was an excellent point - I just took the function call encompassing the > query string out of the code I posted to avoid people having to read too > muc

Re: [PHP] Session Vars loaded from MSSQL Query drop, those loaded from MYSQL Query stick

2010-09-17 Thread Andrew Ballard
On Fri, Sep 17, 2010 at 8:13 AM, Cheryl Sullivan wrote: > Hi Andrew - I didn't mean to ignore your reply... > > Here is your earlier post - > > " The fact that you can echo the $_SESSION information on the same page and > they contain the correct values suggest to me that the issue of MySQL/MSSQL

Re: [PHP] Session Vars loaded from MSSQL Query drop, those loaded from MYSQL Query stick

2010-09-16 Thread Andrew Ballard
On Thu, Sep 16, 2010 at 10:26 AM, Cheryl Sullivan wrote: [snip] > When I echo all five $_SESSION vars from here, they are all populated. > Then I can either redirect or form post to the next page. In either > case, the $_SESSION vars populated from SQL Server ( the SSN and Cost > Center vars) are

Re: [PHP] Session Vars loaded from MSSQL Query drop, those loaded from MYSQL Query stick

2010-09-16 Thread Andrew Ballard
On Thu, Sep 16, 2010 at 10:26 AM, Cheryl Sullivan wrote: > Absolutely - > > This is from the first page > > > $_SESSION['UserLastName'] = strtolower(trim($_POST['txtLastName'])); > > $_SESSION['BadgeID'] = trim($_POST['txtBadgeID']); > > //access MS SQL Server database > > $q1 = "select * from em

Re: [PHP] Adjusting Session Times

2010-09-14 Thread Andrew Ballard
On Tue, Sep 14, 2010 at 10:26 AM, Floyd Resler wrote: > We just got a client whose requirement is that user sessions expire after 30 > minutes of inactivity.  Our other clients are happy with not having their > sessions expire during the work day (i.e. life is 8 hours).  I am using a > MySQL da

Re: [PHP] Show text without converting to html

2010-09-09 Thread Andrew Ballard
On Thu, Sep 9, 2010 at 11:39 AM, Jack wrote: > -Original Message- > From: Andrew Ballard [mailto:aball...@gmail.com] > > > The only people for whom the value will be obscure will be the humans who > actually try to read the HTML source code itself. Neither web browsers

Re: [PHP] Show text without converting to html

2010-09-09 Thread Andrew Ballard
On Thu, Sep 9, 2010 at 9:52 AM, Jack wrote: > > Hello All, > > > I have some code which converts to some html to ascii characters.  This > basically obfuscates the html code, but shows it correctly on an page. > > > I am trying to show the results of the obfuscation ( works correctly because > it

Re: [PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Andrew Ballard
On Fri, Aug 20, 2010 at 10:19 AM, Colin Guthrie wrote: > The customer is always right -> in his own mind (even if not in his RIGHT > mind) <- after all! Corrected that for you. ;-) Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Andrew Ballard
On Fri, Aug 20, 2010 at 9:31 AM, Colin Guthrie wrote: > 'Twas brillig, and Andrew Ballard at 20/08/10 14:24 did gyre and gimble: >> Would it work to return a list of some limited number of randomly >> ordered "featured" listings/items on the page, while leavi

Re: [PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Andrew Ballard
On Fri, Aug 20, 2010 at 9:05 AM, Colin Guthrie wrote: > Thanks everyone for responses. > > 'Twas brillig, and Nathan Rixham at 20/08/10 13:17 did gyre and gimble: >> if you use mysql you can seed rand() with a number to get the same >> random results out each time (for that seed number) >> >>   SE

Re: [PHP] Variable variables into an array.

2010-08-10 Thread Andrew Ballard
On Tue, Aug 10, 2010 at 12:23 PM, Richard Quadling wrote: > On 10 August 2010 16:49, Jim Lucas wrote: >> Richard Quadling wrote: >>> >>> Hi. >>> >>> Quick set of eyes needed to see what I've done wrong... >>> >>> The following is a reduced example ... >>> >>> >> $Set = array(); >>> $Entry = 'Set[

Re: [PHP] Quotes vs. Single Quote

2010-08-06 Thread Andrew Ballard
On Fri, Aug 6, 2010 at 8:31 AM, tedd wrote: > While it may not be obvious, the statement: > > > > is flawed (IMO). > > The "best" way to handle this is to define a class (or id) for the table in > a css file and then set the border (i.e., styling) to whatever you want. For > example, your HTML wo

Re: [PHP] Question about SQL and Graph nodel trees

2010-07-21 Thread Andrew Ballard
On Wed, Jul 21, 2010 at 11:04 AM, Tim Gallagher wrote: > I cannot be the only one that is having this problem, what are you using for > DAG (Direct Acrylic Graph)?  I need to have a mesh node edge graph and am > having trouble with this?  I see that Neo4j has a rest server and I can do > this i

Re: [PHP] Determining the similarity between a user supplied short piece of text (between 5 and 15 characters) and a list of similar length text items.

2010-07-19 Thread Andrew Ballard
On Mon, Jul 19, 2010 at 2:46 PM, tedd wrote: > At 12:39 PM +0100 7/19/10, Richard Quadling wrote: >> >> I'm using MS SQL, not mySQL. >> >> Found a extended stored procedure with a UDF. >> >> Testing it looks excellent. >> >> Searching for a match on 30,000 vehicles next to no additional time - >>

Re: [PHP] access violation

2010-07-19 Thread Andrew Ballard
On Mon, Jul 19, 2010 at 9:54 AM, SteveW wrote: > I have various database / php apps running on a hosted windows machine. > > All apps run ok. > > We have installed a windows 2003 server machine and the apps run fine. > However if 2 users hit the Search button at the same time we get a PHP > access

Re: [PHP] ldap_search filter filter?

2010-07-16 Thread Andrew Ballard
On Fri, Jul 16, 2010 at 11:42 AM, Richard Lynch wrote: > Any Best Practice suggestions for potentially hostile user input being > sent to ldap_search($ldap, "(username=$_POST[username])"); > > Something like an ldap_escape? > > Please cc me on replies. Thanks. > Long time no see, Richard. There a

Re: [PHP] XML parser

2010-07-13 Thread Andrew Ballard
On Tue, Jul 13, 2010 at 10:14 AM, ppps...@gmail.com wrote: > Hello. I have html: > Header > Paragraph 1 > > Paragraph n > > > Header > Paragraph 1 >     > Paragraph n > > > need to parse it like this array: > array( > [0] => array( > 'h3' => 'header' , > 'p' => array( > [0] => 'Paragrap

Re: [PHP] MSSQL failing.

2010-07-09 Thread Andrew Ballard
On Fri, Jul 9, 2010 at 7:10 AM, Paul Halliday wrote: > On Fri, Jul 9, 2010 at 7:12 AM, Paul Halliday wrote: >> It was a typo :) The installation is running on FreeBSD. I am looking >> at TDS right now as a possible cause. >> > > Got it: > > In /usr/local/etc/freetds.conf: > > [global] >       hos

Re: [PHP] MSSQL failing.

2010-07-08 Thread Andrew Ballard
On Thu, Jul 8, 2010 at 1:01 PM, Paul Halliday wrote: > Is there something that needs to be tweaked or added to get this to > work? I am trying to connect to server 2008 w/ MS SQL 2008. I can see > the connections fail in the servers event logs if I take away \domain > from \domain\username (mixed

Re: [PHP] mail() + localhost

2010-07-01 Thread Andrew Ballard
On Thu, Jul 1, 2010 at 9:09 AM, Shreyas Agasthya wrote: > Also, when the comment says that you need to 'configure' your php.ini, which > .ini should I modify? The reason being, I see that file in two locations, > apparently. > (i) C:\Program Files\EasyPHP 3.0\apache > (ii) C:\Program Files\EasyPHP

Re: [PHP] file_get_contents limit

2010-06-29 Thread Andrew Ballard
On Tue, Jun 29, 2010 at 4:39 PM, Ashley Sheridan wrote: > > On Tue, 2010-06-29 at 16:37 -0400, Andrew Ballard wrote: > > > On Tue, Jun 29, 2010 at 4:21 PM, Ashley Sheridan > > wrote: > > > > > > Have you looked at the memory settings in php.ini? > >

Re: [PHP] file_get_contents limit

2010-06-29 Thread Andrew Ballard
On Tue, Jun 29, 2010 at 4:21 PM, Ashley Sheridan wrote: > On Tue, 2010-06-29 at 17:02 -0300, Jo?o C?ndido de Souza Neto wrote: > >> The characters are stripped off of the end of the file after that point. >> >> -- >> Joo Cndido de Souza Neto >> >> "Ashley Sheridan" escreveu na mensagem >> news:12

Re: [PHP] PHP & QPay

2010-06-29 Thread Andrew Ballard
On Tue, Jun 29, 2010 at 10:50 AM, Daniel P. Brown wrote: > On Tue, Jun 29, 2010 at 10:41, Jay Blanchard wrote: >> [snip] >> As QPay seems to be an Aussie company, you may need to think a little >> bigger than just the small market in the USA. >> [/snip] >> >> QPay is a Miami, FL based company who

Re: [PHP] mysql case statement

2010-06-28 Thread Andrew Ballard
On Mon, Jun 28, 2010 at 10:27 AM, David McGlone wrote: > Tanel, we both learned something. I didn't fully understand join myself yet, > but I think I do now. > > but let me ask this if the join wasn't there would an if statement like I > mentioned have worked? > > Blessings, > David M. I think yo

Re: [PHP] Attachment to email from form.

2010-06-28 Thread Andrew Ballard
On Mon, Jun 28, 2010 at 10:04 AM, Ashley Sheridan wrote: > > On Mon, 2010-06-28 at 09:58 -0400, Andrew Ballard wrote: > > On Mon, Jun 28, 2010 at 8:53 AM, Richard Quadling wrote: > > On 28 June 2010 13:44, Brandon Rampersad wrote: > >> f**k no > > > > E

Re: [PHP] Attachment to email from form.

2010-06-28 Thread Andrew Ballard
On Mon, Jun 28, 2010 at 8:53 AM, Richard Quadling wrote: > On 28 June 2010 13:44, Brandon Rampersad wrote: >> f**k no > > Enlightened criticism aside, why not? Or rather (as I'm willing to adapt) how? Probably because you ignored his latest request to chat. Just guessing, really. Andrew -- PH

Re: [PHP] mysql case statement

2010-06-28 Thread Andrew Ballard
On Sun, Jun 27, 2010 at 4:08 AM, Tanel Tammik wrote: > Hello, > > how to select only if value is present? > >    $query = $db->query("select menus.id, menus.name, >      case >        when panels.id is not null then '1' >        end as hiddenpanel > >    from " . \DB_MENUS . " as menus >      left

Re: [PHP] Returning a Recordset from a Funtion

2010-06-25 Thread Andrew Ballard
On Fri, Jun 25, 2010 at 9:55 AM, David Stoltz wrote: > Hi Folks, > > > > Upon occasion, I have the need to hit our MS MSL database from our > PHP/mySQL server. So I've created a function, but I'm not sure if you > can return a recordset from a function. My code is below... > > > > In the calling p

Re: [PHP] Making a Password Confirmation in PHP

2010-06-25 Thread Andrew Ballard
On Fri, Jun 25, 2010 at 5:35 AM, Richard Quadling wrote: > And the fact that a browser will transmit as > plain text isn't a security issue? That's what SSL is for. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2010-06-23 Thread Andrew Ballard
On Wed, Jun 23, 2010 at 11:09 AM, Ashley Sheridan wrote: > Out of interest, how does PHP calculate the IP number, as it was my > understanding of IP numbers that they can't be negative. > > For example, my IP address is 89.243.156.135 > The four parts as binary: > 01011001 > 0011 > 10011100 >

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

2010-06-23 Thread Andrew Ballard
On Wed, Jun 23, 2010 at 10:39 AM, Ashley Sheridan wrote: > > On Wed, 2010-06-23 at 10:35 -0400, Andrew Ballard wrote: > > On Wed, Jun 23, 2010 at 6:01 AM, Ashley Sheridan > wrote: > > That's what I'd use. You may also have to wrap it inside an abs() call > >

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

2010-06-23 Thread Andrew Ballard
On Wed, Jun 23, 2010 at 6:01 AM, Ashley Sheridan wrote: > That's what I'd use. You may also have to wrap it inside an abs() call > to ensure it's a positive number, as some IP addresses equate to > negative with ip2long(). NO NO NO NO NO Andrew -- PHP General Mailing List (http://www.php

Re: [PHP] curl help or other suggestion

2010-06-17 Thread Andrew Ballard
On Thu, Jun 17, 2010 at 9:05 AM, Michael Alaimo wrote: > I am trying to use register_shutdown_function.  Previous to the script > shutting down I use curl to grab a website. > > Basically I want to know if the user has hit the stop button or left the > page prematurely. > > The only problem is tha

Re: [PHP] SQL Syntax

2010-06-16 Thread Andrew Ballard
On Tue, Jun 15, 2010 at 8:58 PM, Jan Reiter wrote: > Hi folks! > > I'm kind of ashamed to ask a question, as I haven't followed this list very > much lately. > > This isn't exactly a PHP question, but since mysql is the most popular > database engine used with php, I figured someone here might hav

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

2010-06-08 Thread Andrew Ballard
On Tue, Jun 8, 2010 at 2:50 AM, Raymond Irving wrote: > Well it actually failed when loadHTML() is used. > The strange thing is that it will fail regardless of the "--" characters: > > "Unexpected end tag : strong in Entity" > > __ > Raymond Irving What failed? I copied your example and pasted it

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

2010-06-07 Thread Andrew Ballard
On Mon, Jun 7, 2010 at 3:30 PM, Raymond Irving wrote: > Hi Adam, > > Thanks for the update but I'm thinking that it would be much easier if the > DOM parser could just ignore the contents of the

Re: [PHP] opening a link in a new window

2010-05-14 Thread Andrew Ballard
>> On Fri, May 14, 2010 at 8:59 AM, Andrew Ballard wrote: >> >> > This also has the side effect that the decision of whether to open a >> > link in the current window or a new window/tab belongs to the viewer >> > instead of the author, whic

Re: [PHP] Append Dom Document

2010-05-14 Thread Andrew Ballard
On Fri, May 14, 2010 at 1:14 PM, Alice Wei wrote: > > Hi, > >   You are right about the fact I am not having multiple documents, and yet > what I am trying to do here is to have one xmldoc, which I have declared in > my original email, and have my other rss feeds that I am trying to call from >

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-14 Thread Andrew Ballard
On Fri, May 14, 2010 at 3:18 AM, Jagdeep Singh wrote: > Hi All! > > I am looking for a solution, I want a user to do a single Login only on a PC > . > > E.g. If a User has logged on my website website.com in Internet explorer, > then he cant login on same website in another browser like Firefox et

Re: [PHP] Append Dom Document

2010-05-14 Thread Andrew Ballard
On Fri, May 14, 2010 at 12:04 AM, Nathan Nobbe wrote: [snip] > having said that if you wanted to append > a new DOMNode to an existing one, you would use the appendChild() method. Usually, yes. In this case, since she would be importing nodes from one document into another document, she would nee

Re: [PHP] Append Dom Document

2010-05-14 Thread Andrew Ballard
On Thu, May 13, 2010 at 7:46 PM, Alice Wei wrote: > > Hi, > >  I am trying to create a news feed page that loads a number of different > feeds depending on what options the user selects. For some reason, I could > not figure out how to get the dom document to "append" the different xml > docume

Re: [PHP] opening a link in a new window

2010-05-14 Thread Andrew Ballard
On Thu, May 13, 2010 at 5:18 PM, Ashley Sheridan wrote: > On Thu, 2010-05-13 at 17:13 -0400, David Mehler wrote: > >> Hello, >> I want to open an external link in a new window, i know i can do this >> with xhtml, but only with the transitional dtd, which i'm not using. I >> was wondering if php co

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Andrew Ballard
On Tue, Apr 27, 2010 at 12:23 PM, tedd wrote: > At 4:23 PM +0100 4/27/10, Nathan Rixham wrote: >> >> I'm still shocked you guys are still writing code that has errors in it, >> what's worse is you know about the errors, and instead of fixing them >> you're just telling the user about it! >> >> :p

Re: [PHP] copy() method on objects

2010-04-25 Thread Andrew Ballard
On Mon, Apr 26, 2010 at 12:24 AM, Paul M Foster wrote: > Here is some code: > > $a = new my_object; > $b = $a; > > My understanding of this operation under PHP 5+ is that $b will now be > essentially a "reference" to $a, *not* a *copy* of the $a object. Is > this correct? > > There are cases where

Re: [PHP] Replace a space with a newline every 2 spaces

2010-04-22 Thread Andrew Ballard
On Thu, Apr 22, 2010 at 1:29 PM, Paul Halliday wrote: > Ex: > > "This is the string and it is this long" > > This is > the string > and it > is this > long > > I found some long functions to achieve this but I couldn't help but > think that it could be done in a couple lines. > > Possible? > > Tha

Re: [PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread Andrew Ballard
On Mon, Apr 19, 2010 at 12:50 PM, tedd wrote: > At 12:21 PM -0400 4/19/10, Ernie Kemp wrote: >> >> Need help with reCAPTCHA. Never installed it before. >> >> When Submit is clicked the "quoterequest-redirect.php" is run but I think >> it >> would be better to test the reCAPTCHA before the >> "quot

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Andrew Ballard
On Mon, Apr 19, 2010 at 11:14 AM, Peter Lind wrote: > On 19 April 2010 17:00, Andrew Ballard wrote: >> On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis >>> 1. $save=split("[|;]",$listOfItems); >>> >>> and what i want i s after making some chang

Re: [PHP] Array to csv or excel in php

2010-04-19 Thread Andrew Ballard
On Mon, Apr 19, 2010 at 9:45 AM, Manolis Vlachakis wrote: > hallo there everyone.. > i got an array from my database > Help with Code > Tags > *PHP Syntax* (Toggle Plain > Text

Re: [PHP] Solution

2010-04-13 Thread Andrew Ballard
On Tue, Apr 13, 2010 at 2:50 PM, tedd wrote: > For example, a user has name, address, height, weight, color, language, etc. > Those things can be listed in a single table. And now for the universal DBA answer - it depends. There are cases where that information needs to be normalized to another t

  1   2   3   4   5   6   7   >