php-general Digest 4 Apr 2011 09:59:27 -0000 Issue 7257

2011-04-04 Thread php-general-digest-help
php-general Digest 4 Apr 2011 09:59:27 - Issue 7257 Topics (messages 312226 through 312235): Re: XML... Useful or another layer of complexity? 312226 by: Ashley Sheridan 312227 by: Per Jessen 312228 by: Peter Lind 312231 by: Camilo Sperberg 312232 by:

Re: [PHP] Re: Config files: what is best? (was: Re: [PHP] XML... Useful or another layer of complexity?)

2011-04-04 Thread Richard Quadling
On 3 April 2011 21:38, Peter Lind peter.e.l...@gmail.com wrote: On 3 April 2011 22:35, Andre Polykanine an...@oire.org wrote: Hello Peter, Thanks a lot! And is there a way to set (write) custom values in files other than php.ini? Sorry, didn't find such a function. I haven't come across

RE: [PHP] newbie - function is undefined

2011-04-04 Thread Jay Blanchard
[snip] JavaScript is a browser-side language, browsers have cache, cache sticks around, meaning that you can tell the browser to cache the JS file and not download it from the server (every time) if its being included on the browser end (which js is). All means faster page load times post initial

Re: [PHP] newbie - function is undefined

2011-04-04 Thread Richard Quadling
On 4 April 2011 12:12, Jay Blanchard jblanch...@pocket.com wrote: So all of the pages I generate with PHP that call JavaScript functions and libraries are doing it wrong? Short answer : yes. Medium answer : probably, but really yes. Long answer : unless you are providing some sort of mechanism

[PHP] SoapClient and apache strong authentication with openssl certificate

2011-04-04 Thread Denis Fingonnet
Hello all, I have a question for you. I succeeded on generating certificates, securing apache and connecting to a web service using soap with a certificate authentication mecanism. Now, i'm wondering what the openssl module can do. My wish is to generate a client certificate through the openssl

RE: [PHP] newbie - function is undefined

2011-04-04 Thread Jay Blanchard
[snip] Short answer : yes. Medium answer : probably, but really yes. Long answer : unless you are providing some sort of mechanism to hold the current state of PHP, eject the required JS code to get a value from the client and return it to the server which then recreates the working environment

[PHP] Re: XML... Useful or another layer of complexity?

2011-04-04 Thread Pete Ford
On 03/04/11 19:41, Jason Pruim wrote: So the subject says it all... And yes I know this isn't related to PHP but it's the weekend and I trust the opinions on this list more then any other list I have seen. I've been doing alot of reading on XML and honestly it looks pretty cool... BUT the

RE: [PHP] newbie - function is undefined

2011-04-04 Thread Ashley Sheridan
On Mon, 2011-04-04 at 08:03 -0500, Jay Blanchard wrote: [snip] Short answer : yes. Medium answer : probably, but really yes. Long answer : unless you are providing some sort of mechanism to hold the current state of PHP, eject the required JS code to get a value from the client and return

Re: [PHP] newbie - function is undefined

2011-04-04 Thread Richard Quadling
On 4 April 2011 14:03, Jay Blanchard jblanch...@pocket.com wrote: [snip] Short answer : yes. Medium answer : probably, but really yes. Long answer : unless you are providing some sort of mechanism to hold the current state of PHP, eject the required JS code to get a value from the client and

Re: [PHP] newbie - function is undefined

2011-04-04 Thread Paul M Foster
On Mon, Apr 04, 2011 at 08:03:46AM -0500, Jay Blanchard wrote: [snip] Short answer : yes. Medium answer : probably, but really yes. Long answer : unless you are providing some sort of mechanism to hold the current state of PHP, eject the required JS code to get a value from the client and

RE: [PHP] newbie - function is undefined

2011-04-04 Thread Jay Blanchard
[snip] Oh no no no. You can use PHP to GENERATE JS, CSS, HTML, XML, etc. You just can't CALL JS from PHP and get a response.[/snip] Fair enough, I just wanted to make sure that we were all on the same page because some of the answers given to the OP may have been somewhat confusing. Many of you

[PHP] File locking with PHP functions

2011-04-04 Thread Paul M Foster
I'd like to know (from someone who knows the internals more than I do) whether the following functions lock files and to what extent: fopen($filename, 'w'); Does this function lock the file from writes until fclose()? Does it lock from reads as well? fopen($filename, 'r+'); Does this function

Re: [PHP] File locking with PHP functions

2011-04-04 Thread Stuart Dallas
On Monday, 4 April 2011 at 15:28, Paul M Foster wrote: I'd like to know (from someone who knows the internals more than I do) whether the following functions lock files and to what extent: fopen($filename, 'w'); Does this function lock the file from writes until fclose()? Does it lock from

Re: [PHP] File locking with PHP functions

2011-04-04 Thread Louis Huppenbauer
It may not be a direct answer to your question, but... You could just use flock() to lock the file while accessing it. louis 2011/4/4 Paul M Foster pa...@quillandmouse.com: I'd like to know (from someone who knows the internals more than I do) whether the following functions lock files and to

[PHP] DateTime using DateTimeZone Timestamp problem

2011-04-04 Thread Ian
Hi, I have a problem using the php built in classes DateTime and DateTimeZone. The idea behind the following code is to return the timestamp for the current time in Singapore (or other places). What it actually returns is the timestamp for the local system. Other formatted dates appear to

[PHP] Last Name extraction in query

2011-04-04 Thread Jim Giner
having a problem posting this message - forgive any duplication please. Hi, I'm trying to use sql to extract the last name from a person's name field in my table. Here's my Select: $q = SELECT race_winner,count(race_date) as wins, substr(race_winner,FIELD(' ',race_winner)) as last_name etc.,,,

Re: [PHP] DateTime using DateTimeZone Timestamp problem

2011-04-04 Thread Ashley Sheridan
On Mon, 2011-04-04 at 16:35 +0100, Ian wrote: Hi, I have a problem using the php built in classes DateTime and DateTimeZone. The idea behind the following code is to return the timestamp for the current time in Singapore (or other places). What it actually returns is the timestamp for

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Ashley Sheridan
On Mon, 2011-04-04 at 11:50 -0400, Jim Giner wrote: having a problem posting this message - forgive any duplication please. Hi, I'm trying to use sql to extract the last name from a person's name field in my table. Here's my Select: $q = SELECT race_winner,count(race_date) as wins,

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Jim Giner
good point. So wrapped up in making my php script work that I didn't think about that. Ashley Sheridan a...@ashleysheridan.co.uk wrote in message news:1301936583.2288.3.camel@localhost... On Mon, 2011-04-04 at 11:50 -0400, Jim Giner wrote: having a problem posting this message - forgive any

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Jim Giner
Actually - I can't seem to find a mysql newsgroup anywhere. The ones that come up in google search are all dead and buried. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Robert Stone
Hi Jim, I think that you'll find that ' ' is treated as a NULL and as such will always return zero. You are no catering for multiple spaces in the column race_winner. If you were using Oracle, their INSTR function has an optional argument that allows you to search backwards from the end of a

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Geoff Lane
On Monday, April 4, 2011, Jim Giner wrote: Actually - I can't seem to find a mysql newsgroup anywhere. The ones that come up in google search are all dead and buried. You could try http://forums.mysql.com/ or have a look around Yahoo groups (e.g. php_my...@yahoogroups.com). HTH, -- Geoff

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Hans Åhlin
Read about Friday posting ;) http://news.php.net/php.general/306939 2011/4/4 Geoff Lane ge...@gjctech.co.uk:  On Monday, April 4, 2011, Jim Giner wrote: Actually - I can't seem to find a mysql newsgroup anywhere.  The ones that  come up in google search are all dead and buried. You could

Re: [PHP] Last Name extraction in query

2011-04-04 Thread sono-io
Jim, Actually - I can't seem to find a mysql newsgroup anywhere. The ones that come up in google search are all dead and buried. I found a mailing list that might work for you: To subscribe to the list, send an empty message to mysql-subscr...@lists.mysql.com Marc -- PHP

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Jim Giner
Thanks - will do! I found a mailing list that might work for you: To subscribe to the list, send an empty message to mysql-subscr...@lists.mysql.com Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Jim Giner
no - that address came back undeliverable. To subscribe to the list, send an empty message to mysql-subscr...@lists.mysql.com Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Steve Staples
On Mon, 2011-04-04 at 14:06 -0400, Jim Giner wrote: no - that address came back undeliverable. To subscribe to the list, send an empty message to mysql-subscr...@lists.mysql.com Marc http://lists.mysql.com/mysql there is the subscribe box on the right side... use that. they

Re: [PHP] Last Name extraction in query

2011-04-04 Thread Andre Polykanine
Hello Geoff, As I dislike forums and like mailing lists (yes, an old habbit :-)), so here it is: mysql-subscr...@lists.mysql.com (that's for subscribing, indeed). And sorry for the offtopic. -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly

[PHP] Please help with glob

2011-04-04 Thread Al Mangkok
Hi everyone, I am very new to PHP and trying to learn the glob() function. I copied the example on php.net : ?php foreach (glob(*.txt) as $filename) { echo $filename size . filesize($filename) . \n; } ? When I ran the script, I got this error message: Fatal error: Call to undefined function