Re: [PHP] 304 Not Modified header not working within a class

2010-01-19 Thread richard gray
Camilo Sperberg wrote: Hi list, my first message here :) To the point: I'm programming a class that takes several CSS files, parses, compresses and saves into a cache file. However, I would like to go a step further and also use the browser cache, handling the 304 and 200 header types myself.

Re: [PHP] copy() method on objects

2010-04-25 Thread richard gray
Paul M Foster wrote: [snip] There are cases where I strictly want a *copy* of $a stored in $b. In cases like this, I supply $a's class with a copy() method, and call it like this: $b = $a-copy(); Is this reasonable, or do people have a better/more correct way to do this? Paul

Re: [PHP] var_dump( (0 == 'heading') ) == TRUE ?!

2010-05-14 Thread richard gray
On 15/05/2010 03:19, Daevid Vincent wrote: Can someone explain why an integer 0 compared to a string evaluates to boolean true?? var_dump( (0 == 'heading') ); Yet, var_dump( (1 == 'heading') ); Is FALSE. WTF? I would expect the 0 one to be FALSE too.

Re: [PHP] Security Issue

2010-06-07 Thread richard gray
On 07/06/2010 20:00, Igor Escobar wrote: PHP Injection is the technical name given to a security hole in PHP applications. When this gap there is a hacker can do with an external code that is interpreted as an inner code as if the code included was more a part of the script. // my code... // my

Re: [PHP] Problem with DATE 2010-10-31

2010-10-12 Thread richard gray
On 12/10/2010 11:52, Rado Oršula wrote: I do not know good English. In the attached source code. Here is erroneous statement: date: 2010-10-31 00:00:00 date+*0*h: 2010-10-31 *00*:00:00 date+*1*h: 2010-10-31 *01*:00:00 *date+2h: 2010-10-31 02:00:00 date+3h: 2010-10-31 02:00:00 * date+*4*h:

Re: [PHP] Re: strtotime

2010-10-17 Thread richard gray
On 17/10/2010 21:34, John Taylor-Johnston wrote: Yaay, I'm 45 now :). Here is another nifty piece of code I found. How does this work? What is 31556926? number of seconds in a year...? Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread richard gray
On 20/10/2010 05:47, Jonathan Sachs wrote: I've got a script which originally contained the following piece of code: foreach ( $objs as $obj ) { do_some_stuff($obj); } When I tested it, I found that on every iteration of the loop the last element of $objs was assigned the value of the

Re: [PHP] $_POST variable

2011-03-11 Thread richard gray
On 11/03/2011 20:28, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio name=?php print (radio_.$result_from_mysql) ; ? value=0

Re: [PHP] Re: $_POST variable

2011-03-11 Thread richard gray
You could use foreach to iterate through the post variables until you encounter a match: foreach ($_POST as $key = $value){ if (substr($key, 0, 6) == radio_) { $buttonName = $key; $buttonValue = 4value; break 2; } } I haven't tried the above code, but I hope

[PHP] PHP/ Soap issue

2011-09-01 Thread richard gray
I am hoping there's a SOAP expert on the list as this is driving me mad and Google doesn't come up with much help ... I am trying to build a fairly simple web service in SOAP -- the client sends a string SKU to query a product catalogue database and receives product pricing data - I am using

Re: [PHP] PHP/ Soap issue

2011-09-01 Thread richard gray
On 01/09/2011 14:07, Louis Huppenbauer wrote: I think it would be best if you could provide us with the .wsdl (and possibly with the server-code). Thanks for the quick response Louis.. WSDL ?xml version=1.0 encoding=UTF-8? definitions name=CatalogueService

Re: [PHP] PHP/ Soap issue

2011-09-01 Thread richard gray
On 01/09/2011 14:16, Richard Quadling wrote: Can you give me the URL for the WSDL file? Either online or by direct email. Thanks for the quick response Richard -- I have just posted the WSDL in my earlier resply to Louis... -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] PHP script won't run in the background

2011-11-19 Thread richard gray
Hi all Hope someone can help me with a weird issue I have... I am trying to run a php CLI script in the background and it just won't run - it has a status of Stopped SIGTOU (Trying to write output) - Here are the details OS Mac OS X Lion 10.7.2 PHP PHP 5.3.6 with Suhosin-Patch (cli)

Re: [PHP] PHP script won't run in the background

2011-11-19 Thread richard gray
On 19/11/2011 16:09, Laruence wrote: $ stty -tostop makes no difference # stty -tostop # php -f test.php test.log 21 # jobs # [1]+ Stopped(SIGTTOU)php -f test.php test.log 21 Any other ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] PHP script won't run in the background

2011-11-19 Thread richard gray
Laruence, while that may be a helpful answer to a few people in the know, just replying back with a single line like that isn't really going to help the people who are having this problem. At least explain why you suggested that, or what it does for those on the list that don't know,

Re: [PHP] PHP script won't run in the background

2011-11-22 Thread richard gray
On 22/11/2011 05:51, Laruence wrote: did you run php with readline? try run the script without php-readline. thanks No - the script was just a basic string echo - no readline was involved. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP script won't run in the background

2011-11-23 Thread richard gray
On 23/11/2011 11:05, Laruence wrote: Hi: I mean, do you built your php with readline support, or do you load readline.so into PHP? if so, remove it, then try again. and you also can use: gdb --pid={the pid of the stopped php} then you will find where the php hangs. thanks I

Re: [PHP] PHP script won't run in the background

2011-11-30 Thread richard gray
On 29/11/2011 17:16, Daniel Brown wrote: On Sat, Nov 19, 2011 at 09:33, richard grayr...@richgray.com wrote: This happens because PHP is writing to STDOUT, of course, and then the command line redirection grabs that information and puts it into the file. Unfortunately, by itself, this won't

Re: [PHP] PHP script won't run in the background

2011-11-30 Thread richard gray
On 23/11/2011 18:49, Alain Williams wrote: On Wed, Nov 23, 2011 at 06:14:07PM +0100, richard gray wrote: Reading symbols for shared libraries + done 0x000101d057ee in __ioctl () Any clues? To me it looks like PHP cli is trying to do some I/O but I'm just a dumb developer... :) ioctl

Re: [PHP] How to find where class is used?

2012-01-06 Thread richard gray
On 06/01/2012 12:11, Dotan Cohen wrote: In a large application that I am tasked with maintaining (vBulletin) there is a particular class that is used: vB_ProfileBlock_VisitorMessaging. I know the file that it is defined in, but I cannot find the file that actually creates a

Re: [PHP] XML to Array

2013-03-10 Thread richard gray
On 10/03/2013 11:47, Karl DeSaulniers wrote: Hi Guys, I am hoping someone can guide me or help me fix this issue. I have been lost in the code for some time now. I am trying to get the attributes of an xml node. I have this code: [snip] this may help -

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread richard gray
On 15/03/2013 22:00, Ashley Sheridan wrote: On Fri, 2013-03-15 at 04:57 -0500, tamouse mailing lists wrote: For my money, `is_numeric()` does just what I want. The thing is, is_numeric() will not check if a string is a valid int, but any valid number, including a float. For something like

Re: AW: [PHP] PHP is Zero

2013-06-13 Thread richard gray
On 13/06/2013 11:44, BUSCHKE Daniel wrote: Hi, thanks for your answer. Especially the answer 42 made me laughing :) My Why questions should be understand as Why must it be like that questions. On 13/06/13 08:59, BUSCHKE Daniel wrote: 5. Thats a bug I have opend:

Re: [PHP] How to extract php source code from joomla

2013-07-23 Thread richard gray
On 23/07/2013 16:54, Yoinier Hernandez Nieves wrote: El 22/07/13 15:49, elk dolk escribió: Thank you for the quick response ! What I am trying to do : I have to complete two university projects for my professor ! project One : Make an online shop and must use the following components in

Re: [PHP] Ambiguous?

2013-08-09 Thread richard gray
On 09/08/2013 14:00, Karl-Arne Gjersøyen wrote: 1) query foreach($varenr_inn_pa_lager as $vnr){ include('../../tilkobling.php'); $sql = SELECT * FROM exan,dynamit WHERE varenr = '$vnr' LIMIT 1; $resultat = mysql_query($sql, $tilkobling) or