Re: [PHP] PHP to Java integration using : shell_exec function

2011-05-26 Thread Robert Williams
On 2011-05-26 12:00, Eli Orr (Office) eli@logodial.com wrote: $EncXML = shell_exec(/usr/bin/java/java -jar MyApp.jar -XML $XML_toEnc); == ??? How can I pass parameters like a large string of let say XML? You're missing the shell escaping. Try something like this: $xml =

Re: [PHP] Constants in strings

2011-07-06 Thread Robert Williams
On 2011-07-6 08:09, ad...@buskirkgraphics.com ad...@buskirkgraphics.com wrote: I use constants in my OOP and I never use the heredoc syntax. Now I am fearing that I have not taken advantage of something. My understanding of heredoc syntax as of 5.3 is just a string quoting right? Is there an

[PHP] Mysqli error handling

2011-08-31 Thread Robert Williams
Okay, so I've finally got an opportunity to start converting our code to use Mysqli instead of the old mysql_* functions. Mysqli is new to me, but I thought things were going well until the first time I tried to run a query with a syntax error in it, and it threw up a PHP warning. Being that

Re: [PHP] lost return value during a static call

2011-09-15 Thread Robert Williams
On Sep 15, 2011, at 6:03, chamila gayan cgcham...@gmail.com wrote: when it goes through 2 static methods, at some point it stops returning value to the calling method. (please see comments in-line). The getArray() method and the 'else' portion of the getChild() method both lack a return

Re: [PHP] Help on number matching function

2011-09-16 Thread Robert Williams
On Sep 16, 2011, at 6:02, Dare Williams darrenwi...@yahoo.com wrote: I have a 5 Digits set of number and need to match it with another set of five digits and return how many number are match and the figures that are match. Check out array_intersect().

Re: [PHP] How can I check for characters in a $_POST[] variable?

2011-09-22 Thread Robert Williams
As an alternative to the regular expression approaches already provided by others, you could also use ctype_alnum(): if (ctyp_alnum($_POST['username'])) { //username contains only letters and numbers } else { //username contains characters other than letters and numbers } //if-else Docs:

Re: [PHP] How can I check for characters in a $_POST[] variable?

2011-09-22 Thread Robert Williams
[Redirecting thread back to the list for the benefit of others.] On 9/22/11 13:38, Eric eric_justin_al...@cfl.rr.com wrote: So is $_POST[username][0] appropriate or does that only work with normal variables? As far as this sort of manipulation goes, $_POST is just like any other variable.

Re: [PHP] Variable variable using constant

2011-10-12 Thread Robert Williams
On 10/12/11 11:51, Marc Guay marc.g...@gmail.com wrote: Let's say that I have 2 constants DEFINE('DESKTOP_URL_en', http://www.website.com/index.php?page=home;); DEFINE('DESKTOP_URL_fr', http://www.website.com/index.php?page=accueil;); and I would like to populate the value of an href with them

Re: [PHP] FW: parse error

2011-10-13 Thread Robert Williams
On 10/13/11 10:06, David Savage dsav...@cytelcom.com wrote: php -l voip_cdrs.php PHP Parse error: parse error, unexpected T_STRING in /usr/local/cytrex/voip_cdrs.php on line 1050 Errors parsing voip_cdrs.php $alias_sql_stmt=SELECT ani FROM ldrates WHERE ani='$termnum10';

Re: [PHP] What is wrong with this preg_match?

2011-10-27 Thread Robert Williams
On 10/27/11 11:43, Paul Halliday paul.halli...@gmail.com wrote: if ($argc == 1 || $argc 2 || !preg_match((\d{4}-\d{2}-\d{2}), Usage: ./process_patches.php -mm-dd patches@innm2 ~/Code/Oculi $ ./process_patches.php 2011-01-011 The problem is that your expression basically defines a

Re: [PHP] Is there a decent design app ?

2011-11-26 Thread Robert Williams
On Nov 25, 2011, at 16:18, Andreas maps...@gmx.net wrote: Like you have /foo.css and for some reason or another you move it to /lib/css and rename it to bar.css. Now it'd be nice if an IDE was aware of all the references within a site and update the affected urls. Check out PhpStorm from

Re: [PHP] New to mac and trying to define a php.ini file.

2012-01-04 Thread Robert Williams
On 1/4/12 13:33, Tim Streater t...@clothears.org.uk wrote: What I do seem to have is /etc/php.ini.default which I suppose you could rename to php.ini if you really wanted to modify it. Yes, this is correct. I'm not sure if Apple started doing this with Lion or before, but they give you the

Re: [PHP] New to mac and trying to define a php.ini file.

2012-01-04 Thread Robert Williams
On 1/4/12 14:34, Tim Streater t...@clothears.org.uk wrote: As I hinted in my previous mail, client and server side of my app are always on the user's machine. When the user starts the app, I create an apache config file on the fly and run an instance of apache just for the user. So I'm not

Re: [PHP] PDF Printing instead?

2012-01-06 Thread Robert Williams
On 1/5/12 14:40, Paul M Foster pa...@quillandmouse.com wrote: The fpdf and/or tcpdf libraries are the standard answers to this. Depending on requirements, another good option may be Pdftk. Where TCPDF is focused on document creation, Pdftk is focused on document manipulation, and because it's a

Re: [PHP] Numeric help needed

2012-01-15 Thread Robert Williams
On Jan 15, 2012, at 19:00, Simon J Welsh si...@welsh.co.nzmailto:si...@welsh.co.nz wrote: On 16/01/2012, at 2:48 PM, Chris Payne wrote: If the loan amount is $68500.00, the insurace will be based on $69000.00 as the amount is always rounded up to the next $1000. The round() function only

Re: [PHP] Arrays: Comma at end?

2012-02-07 Thread Robert Williams
On 2/7/12 13:15, Paul M Foster pa...@quillandmouse.com wrote: I've always avoided trailing array commas, but only because I was under the impression that leaving one there would append a blank array member to the array, where it might be problematic. Yes? No? Nope. In fact, it's officially

Re: [PHP] iphone php

2012-03-05 Thread Robert Williams
On 3/5/12 11:58, Jim Giner jim.gi...@albanyhandball.com wrote: Marc Guay marc.g...@gmail.com wrote in message news:CAL0DAJq0y-iOMvt4Ko+D4Z_t+oo3PT9SYmR+9foa=9q9gsr...@mail.gmail.com... And if you change your input type to date, because it's a date, does that bring up the numeric keys as well?

Re: [PHP] help with preg_match

2012-06-03 Thread Robert Williams
On Jun 3, 2012, at 17:28, Chris Purves ch...@northfolk.ca wrote: I know that the text ends 'end', but I don't know what the Something, something is. I am using preg_match as follows: preg_match('/[^]*end/',$curl_response,$matches); I want to match 'end' and everything before it that is not

Re: [PHP] Re: php batch/queue framwork

2012-07-01 Thread Robert Williams
Zend Server includes a job queue. http://www.zend.com/en/products/server/zend-server-job-queue It supports queuing up jobs directly in the UI or via a PHP API, and it includes a variety of scheduling and load management options. -- Bob Williams Notice: This communication, including

[PHP] How does this code work?

2012-07-02 Thread Robert Williams
I found this code in a user comment in the PHP docs for htmlentities(): ?php function xml_character_encode($string, $trans='') { $trans = (is_array($trans)) ? $trans : get_html_translation_table(HTML_ENTITIES, ENT_QUOTES); foreach ($trans as $k=$v) $trans[$k]= #.ord($k).;; return

Re: [PHP] How does this code work?

2012-07-03 Thread Robert Williams
On Jul 2, 2012, at 22:15, Jim Lucas li...@cmsws.com wrote: I think you missed something here... The above function uses strtr() not strstr() Wow. I knew there had to be a simple, logical explanation (there was), that it would likely be one of those stupid things that I'd spot in two seconds

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Robert Williams
On 7/12/12 13:21, Simon Dániel simondan...@gmail.com wrote: And I can't do it with the constructor of the inherited class, becouse this way I would overwrite the parent constructor. Just call to the parent constructor from the child: public function __construct() { parent::__construct();

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Robert Williams
On 7/12/12 14:44, Daevid Vincent dae...@daevid.com wrote: Personally I *hate* frameworks with a passion, but if you're going to use one, then why not just build with one that is already out there and well supported. http://www.phpframeworks.com/ to start with. I wouldn't suggest most people try

Re: [PHP] What do you call the end-user?

2012-07-20 Thread Robert Williams
On Jul 20, 2012, at 0:59, Adam Nicholls adam.nicho...@hl.co.uk wrote: Personally if I'm feeling a bit cheeky I'll go with Muggle - (thanks to J K Rowling!) - people just don't appreciate the magic involved behind the scenes in usability, infrastructure, application logic etc. Wow. I really,

Re: [PHP] Awkward time processing

2012-08-02 Thread Robert Williams
On 8/2/12 05:51, Paul Halliday paul.halli...@gmail.com wrote: What I have is an array of values and timestamps: 17 15:31 16 15:32 27 15:33 14 15:34 11 15:35 now for a day I should have 1440 entries but there could be spotty results, no data from say 11:59 - 13:00. What I need is to sum the

Re: [PHP] Reading class variable value always returns NULL

2012-08-14 Thread Robert Williams
I'm not real clear on what's happening. Are you saying that if you assign values to the protected class members, and then immediately read them, that they're null? So, there's code something like this: class Foo { public function Something() { $this-foo = 1; //shows null instead

Re: [PHP] Re: PHP as Application Server

2012-09-26 Thread Robert Williams
On 9/26/12 10:18, Matijn Woudt tijn...@gmail.com wrote: Writing scripts for an application server requires a much deeper understanding of threads and computer internals,so as a result it probably increases error rate. Well... yes and no. PHP's architecture pretty much keeps you from having to

Re: [PHP] error_handler : unique caller ID ?

2012-11-13 Thread Robert Williams
On 11/13/12 11:20, B. Aerts ba_ae...@yahoo.com wrote: Having read access to a variable's address (like a C-pointer) would be perfect - but Google tells me you can't in PHP. If you can restrict yourself to objects for the passed variables, you can use spl_object_hash(). It does exactly what you