Re: [PHP] COM - Assigning to method.

2013-07-15 Thread Andrew Ballard
On Mon, Jul 15, 2013 at 4:21 AM, Adam Nicholls inkysp...@gmail.com 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

Re: [PHP] COM - Assigning to method.

2013-07-14 Thread Andrew Ballard
rquadl...@gmail.com wrote: On 13 July 2013 01:24, Andrew Ballard aball...@gmail.com wrote: On Jul 12, 2013 4:53 AM, Adam Nicholls inkysp...@gmail.com 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

Re: [PHP] COM - Assigning to method.

2013-07-12 Thread Andrew Ballard
On Jul 12, 2013 4:53 AM, Adam Nicholls inkysp...@gmail.com 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 n...@ridersite.org 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

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 tijn...@gmail.com wrote: On Fri,

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 niks...@gmail.com wrote: On Tue, May 7, 2013 at 4:29 PM, George Langley george.lang...@shaw.ca 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()

Re: [PHP] Load testing an app

2013-04-24 Thread Andrew Ballard
On Apr 24, 2013 9:46 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Tue, Apr 23, 2013 at 8:04 AM, Andrew Ballard aball...@gmail.com wrote: On Tue, Apr 23, 2013 at 2:29 AM, Adam Richardson simples...@gmail.com wrote: On Mon, Apr 22, 2013 at 10:41 PM, Andrew Ballard aball

Re: [PHP] Load testing an app

2013-04-23 Thread Andrew Ballard
On Tue, Apr 23, 2013 at 2:29 AM, Adam Richardson simples...@gmail.com wrote: On Mon, Apr 22, 2013 at 10:41 PM, Andrew Ballard aball...@gmail.com 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

[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

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 a...@ashleysheridan.co.uk wrote:

Re: [PHP] variable type - conversion/checking

2013-03-16 Thread Andrew Ballard
On Mar 16, 2013 6:14 AM, Ashley Sheridan a...@ashleysheridan.co.uk 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 '0xAF' is an integer too

Re: [PHP] variable type - conversion/checking

2013-03-16 Thread Andrew Ballard
On Sat, Mar 16, 2013 at 12:21 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Sat, 2013-03-16 at 11:46 -0400, Andrew Ballard wrote: On Mar 16, 2013 6:14 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Fri, 2013-03-15 at 22:32 -0400, Andrew Ballard wrote: Guess regex

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] variable type - conversion/checking

2013-03-15 Thread Andrew Ballard
On Mar 15, 2013 9:54 PM, Sebastian Krebs krebs@gmail.com wrote: 2013/3/16 Andrew Ballard aball...@gmail.com 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

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 computer

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

2012-11-19 Thread Andrew Ballard
On Sat, Nov 17, 2012 at 4:13 PM, Sebastian Krebs krebs@gmail.com wrote: 2012/11/17 Andrew Ballard aball...@gmail.com On Nov 16, 2012 10:24 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Fri, Nov 16, 2012 at 12:41 PM, Sebastian Krebs krebs@gmail.com wrote: Beside

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

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

Re: [PHP] Session data lost in Firefox

2012-10-26 Thread Andrew Ballard
On Fri, Oct 26, 2012 at 8:49 AM, John Boy serv...@greenholdings.co.ukwrote: 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

Re: [PHP] Session data lost in Firefox

2012-10-26 Thread Andrew Ballard
On Fri, Oct 26, 2012 at 12:12 PM, John Boy serv...@greenholdings.co.ukwrote: 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

RE: [PHP] MS SQL server connection problem.

2012-09-05 Thread Andrew Ballard
On Sep 5, 2012 7:14 AM, Jeff Burcher j...@allredmetal.com 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,

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 phil...@freewolf.net 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

Re: [PHP] MSSQL Stored Proc

2012-08-28 Thread Andrew Ballard
On Tue, Aug 28, 2012 at 1:03 PM, Phillip Baker phil...@freewolf.net 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

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 li...@cmsws.com 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

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 pa...@quillandmouse.com 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

Re: [PHP] PHP session variables

2012-08-15 Thread Andrew Ballard
On Fri, Aug 10, 2012 at 11:56 AM, Tedd Sperling t...@sperling.com wrote: On Aug 10, 2012, at 11:45 AM, Tedd Sperling t...@sperling.com wrote: On Aug 9, 2012, at 5:16 PM, Jim Lucas li...@cmsws.com wrote: You are relying on PHP's loose typing. This is a poor check. session_id() returns a

Re: [PHP] PHP session variables

2012-08-15 Thread Andrew Ballard
On Wed, Aug 15, 2012 at 3:24 PM, Tedd Sperling t...@sperling.com 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

Re: [PHP] Creating drop-down menus

2012-07-17 Thread Andrew Ballard
On Tue, Jul 17, 2012 at 4:58 PM, Paul M Foster pa...@quillandmouse.com 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

Re: [PHP] Unexpected Notice message

2012-07-05 Thread Andrew Ballard
On Thu, Jul 5, 2012 at 3:10 AM, Arno Kuhl a...@dotcontent.net 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

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

2012-05-25 Thread Andrew Ballard
On Fri, May 25, 2012 at 3:57 AM, Gary listgj-phpgene...@yahoo.co.uk wrote: If I use simplexml_load_string to create an XML object with the following XHTML , | ?xml version=1.0? | !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN | http://www.w3.org/TR/ | xhtml1/DTD/xhtml1-strict.dtd

Re: [PHP] Sunset/Sunrise

2012-03-20 Thread Andrew Ballard
On Tue, Mar 20, 2012 at 9:23 AM, Tedd Sperling tedd.sperl...@gmail.com 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('br'); echo date(D M d Y). ', sunset time : '

Re: [PHP] Sunset/Sunrise

2012-03-20 Thread Andrew Ballard
On Tue, Mar 20, 2012 at 6:00 PM, Tedd Sperling tedd.sperl...@gmail.com 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

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 jay.blanch...@sigmaphinothing.org wrote: On 3/15/2012 12:23 PM, Matijn Woudt wrote: On Thu, Mar 15, 2012 at 6:09 PM, Jay Blanchard jay.blanch...@sigmaphinothing.org  wrote: I thought that fgetcsv returned an array. I can work with it like an

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 aball...@gmail.com Date: Fri, Mar 9, 2012 at 12:53 PM Subject: Re: [PHP] Function mktime() documentation question To: Tedd Sperling tedd.sperl

Re: [PHP] innerHTML triple quotes issue

2011-09-15 Thread Andrew Ballard
On Thu, Sep 15, 2011 at 5:01 AM, Grega Leskovšek legr...@gmail.com wrote: h3My Heavenly profession is being span class=see onmouseover='?php echo this.innerHTML=' img src=\http://imagecache2.allposters.com/images/PF_New/102008/3070943.jpg\; alt =\close to my heavenly face\ /';?'

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 j...@cetaceasound.com 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

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 a...@ashleysheridan.co.uk 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

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

2011-08-11 Thread Andrew Ballard
On Wed, Aug 10, 2011 at 9:22 PM, Jason Pruim pru...@gmail.com 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 :))

Re: [PHP] Struggling with MySQL query

2011-08-09 Thread Andrew Ballard
On Tue, Aug 9, 2011 at 10:14 AM, David Green simp...@gmail.com 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

Re: [PHP] PHP Security: Best Practices

2011-08-08 Thread Andrew Ballard
On Mon, Aug 8, 2011 at 10:08 AM, Jen Rasmussen j...@cetaceasound.com 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

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 jkras...@gmail.com 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

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 jkras...@gmail.com 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] Which

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 jkras...@gmail.com wrote: [reordered and snipped] On Thu, Jul 21, 2011 at 8:52 PM, gato chalar dany...@gmail.com 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.

Re: [PHP] Re: Date validation

2011-05-23 Thread Andrew Ballard
On Mon, May 23, 2011 at 9:55 AM, Tamara Temple tamouse.li...@gmail.com 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

Re: [PHP] PHP intreprets trailing slashes incorrectly?

2011-05-20 Thread Andrew Ballard
On Fri, May 20, 2011 at 6:35 AM, Richard Quadling rquadl...@gmail.com 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,

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 rquadl...@gmail.com 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

Re: [PHP] Sessions only work in SSL

2010-10-19 Thread Andrew Ballard
On Mon, Oct 18, 2010 at 8:46 PM, Daniel Houle drho...@hotmail.com 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

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 rquadl...@gmail.com wrote: On 15 October 2010 10:16, Ford, Mike m.f...@leedsmet.ac.uk 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

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 rquadl...@gmail.com wrote: On 15 October 2010 15:45, Andrew Ballard aball...@gmail.com wrote: On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling rquadl...@gmail.com wrote: On 15 October 2010 10:16, Ford, Mike m.f...@leedsmet.ac.uk wrote

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 nrix...@gmail.com 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

Re: [PHP] Database Administration

2010-09-24 Thread Andrew Ballard
On Fri, Sep 24, 2010 at 6:19 AM, Tom Barrett t...@miramedia.co.uk 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

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 csull...@shh.org 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

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 csull...@shh.org wrote: Absolutely - This is from the first page ?php $_SESSION['UserLastName'] = strtolower(trim($_POST['txtLastName'])); $_SESSION['BadgeID'] = trim($_POST['txtBadgeID']); //access MS SQL Server database $q1 = select

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 csull...@shh.org 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

Re: [PHP] Adjusting Session Times

2010-09-14 Thread Andrew Ballard
On Tue, Sep 14, 2010 at 10:26 AM, Floyd Resler fres...@adex-intl.com 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

Re: [PHP] Show text without converting to html

2010-09-09 Thread Andrew Ballard
On Thu, Sep 9, 2010 at 9:52 AM, Jack jacklistm...@gmail.com 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

Re: [PHP] Show text without converting to html

2010-09-09 Thread Andrew Ballard
On Thu, Sep 9, 2010 at 11:39 AM, Jack jacklistm...@gmail.com 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] 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 gm...@colin.guthr.ie 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

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 gm...@colin.guthr.ie 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 leaving the full list ordered

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 gm...@colin.guthr.ie 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:

Re: [PHP] Variable variables into an array.

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

Re: [PHP] Quotes vs. Single Quote

2010-08-06 Thread Andrew Ballard
On Fri, Aug 6, 2010 at 8:31 AM, tedd tedd.sperl...@gmail.com wrote: While it may not be obvious, the statement: table border=1 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.

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 tgallag...@danati.com 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

Re: [PHP] access violation

2010-07-19 Thread Andrew Ballard
On Mon, Jul 19, 2010 at 9:54 AM, SteveW stevewa...@btinternet.com 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

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 tedd.sperl...@gmail.com 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

Re: [PHP] ldap_search filter filter?

2010-07-16 Thread Andrew Ballard
On Fri, Jul 16, 2010 at 11:42 AM, Richard Lynch c...@l-i-e.com 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.

Re: [PHP] XML parser

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

Re: [PHP] MSSQL failing.

2010-07-09 Thread Andrew Ballard
On Fri, Jul 9, 2010 at 7:10 AM, Paul Halliday paul.halli...@gmail.com wrote: On Fri, Jul 9, 2010 at 7:12 AM, Paul Halliday paul.halli...@gmail.com 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

Re: [PHP] MSSQL failing.

2010-07-08 Thread Andrew Ballard
On Thu, Jul 8, 2010 at 1:01 PM, Paul Halliday paul.halli...@gmail.com 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

Re: [PHP] mail() + localhost

2010-07-01 Thread Andrew Ballard
On Thu, Jul 1, 2010 at 9:09 AM, Shreyas Agasthya shreya...@gmail.com 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)

Re: [PHP] PHP QPay

2010-06-29 Thread Andrew Ballard
On Tue, Jun 29, 2010 at 10:50 AM, Daniel P. Brown daniel.br...@parasane.net wrote: On Tue, Jun 29, 2010 at 10:41, Jay Blanchard jblanch...@pocket.com 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]

Re: [PHP] file_get_contents limit

2010-06-29 Thread Andrew Ballard
On Tue, Jun 29, 2010 at 4:21 PM, Ashley Sheridan a...@ashleysheridan.co.uk 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

Re: [PHP] file_get_contents limit

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

Re: [PHP] mysql case statement

2010-06-28 Thread Andrew Ballard
On Sun, Jun 27, 2010 at 4:08 AM, Tanel Tammik keevit...@gmail.com 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      

Re: [PHP] Attachment to email from form.

2010-06-28 Thread Andrew Ballard
On Mon, Jun 28, 2010 at 8:53 AM, Richard Quadling rquadl...@gmail.com wrote: On 28 June 2010 13:44, Brandon Rampersad brandon.add...@gmail.com 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.

Re: [PHP] Attachment to email from form.

2010-06-28 Thread Andrew Ballard
On Mon, Jun 28, 2010 at 10:04 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Mon, 2010-06-28 at 09:58 -0400, Andrew Ballard wrote: On Mon, Jun 28, 2010 at 8:53 AM, Richard Quadling rquadl...@gmail.com wrote: On 28 June 2010 13:44, Brandon Rampersad brandon.add...@gmail.com wrote

Re: [PHP] mysql case statement

2010-06-28 Thread Andrew Ballard
On Mon, Jun 28, 2010 at 10:27 AM, David McGlone da...@dmcentral.net 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.

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 rquadl...@gmail.com wrote: And the fact that a browser will transmit input type=password 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:

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 dsto...@shh.org 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

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 a...@ashleysheridan.co.uk 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 ?php $x =

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 a...@ashleysheridan.co.uk wrote: On Wed, 2010-06-23 at 10:35 -0400, Andrew Ballard wrote: On Wed, Jun 23, 2010 at 6:01 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: That's what I'd use. You may also have to wrap it inside an abs

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 a...@ashleysheridan.co.uk 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

Re: [PHP] curl help or other suggestion

2010-06-17 Thread Andrew Ballard
On Thu, Jun 17, 2010 at 9:05 AM, Michael Alaimo mala...@sesda2.com 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

Re: [PHP] SQL Syntax

2010-06-16 Thread Andrew Ballard
On Tue, Jun 15, 2010 at 8:58 PM, Jan Reiter the-fal...@gmx.net 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

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 xwis...@gmail.com 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

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 xwis...@gmail.com 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 script tags when parsing HTML content. This way we would not have to out JavaScript or

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

2010-05-15 Thread Andrew Ballard
On Fri, May 14, 2010 at 8:59 AM, Andrew Ballard aball...@gmail.com 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, which some argue is exactly as it should be. Andrew

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 a...@ashleysheridan.co.uk 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

Re: [PHP] Append Dom Document

2010-05-14 Thread Andrew Ballard
On Thu, May 13, 2010 at 7:46 PM, Alice Wei aj...@alumni.iu.edu 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

Re: [PHP] Append Dom Document

2010-05-14 Thread Andrew Ballard
On Fri, May 14, 2010 at 12:04 AM, Nathan Nobbe quickshif...@gmail.com 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

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 jagsaini1...@gmail.com 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

Re: [PHP] Append Dom Document

2010-05-14 Thread Andrew Ballard
On Fri, May 14, 2010 at 1:14 PM, Alice Wei aj...@alumni.iu.edu 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

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

2010-04-27 Thread Andrew Ballard
On Tue, Apr 27, 2010 at 12:23 PM, tedd tedd.sperl...@gmail.com 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

Re: [PHP] copy() method on objects

2010-04-25 Thread Andrew Ballard
On Mon, Apr 26, 2010 at 12:24 AM, Paul M Foster pa...@quillandmouse.com 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

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 paul.halli...@gmail.com 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?

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 vlachakis.mano...@gmail.com wrote: hallo there everyone.. i got an array from my database Help with Code Tagshttp://www.daniweb.com/forums/misc-explaincode.html?TB_iframe=trueheight=400width=680 *PHP Syntax* (Toggle Plain

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 peter.e.l...@gmail.com wrote: On 19 April 2010 17:00, Andrew Ballard aball...@gmail.com 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 changes to the attributes

Re: [PHP] Adding reCAPTCHA to form using PHP

2010-04-19 Thread Andrew Ballard
On Mon, Apr 19, 2010 at 12:50 PM, tedd tedd.sperl...@gmail.com 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

Re: [PHP] Solution

2010-04-13 Thread Andrew Ballard
On Tue, Apr 13, 2010 at 2:50 PM, tedd tedd.sperl...@gmail.com 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

Re: [PHP] 404 redirects stolen by provider

2010-04-09 Thread Andrew Ballard
On Fri, Apr 9, 2010 at 3:29 PM, Merlin Morgenstern merli...@fastmail.fm wrote: Hello, I am running a website under apache and php where I do redirects on 404 errors: apache conf: ErrorDocument 404 /subapp_members/search_user.php This is done to allow ULRs with usernames like this:

Re: [PHP] Zend DB Table - WHERE as OR?

2010-04-09 Thread Andrew Ballard
On Fri, Apr 9, 2010 at 3:15 PM, Dan Joseph dmjos...@gmail.com wrote: Hi Everyone, I'm trying to figure out if something is even an option with the Zend Framework.  We use the DB Table stuff.  I don't see it in the manual, so I figured I'd ask you all... I have: $select =

  1   2   3   4   5   6   7   >