php-general Digest 5 Apr 2011 01:33:20 -0000 Issue 7258

Topics (messages 312236 through 312264):

Re: newbie - function is undefined
        312236 by: Jay Blanchard
        312237 by: Richard Quadling
        312239 by: Jay Blanchard
        312241 by: Ashley Sheridan
        312242 by: Richard Quadling
        312243 by: Paul M Foster
        312244 by: Jay Blanchard

SoapClient and apache strong authentication with openssl certificate
        312238 by: Denis Fingonnet

Re: XML... Useful or another layer of complexity?
        312240 by: Pete Ford

File locking with PHP functions
        312245 by: Paul M Foster
        312246 by: Stuart Dallas
        312247 by: Louis Huppenbauer

DateTime using DateTimeZone Timestamp problem
        312248 by: Ian
        312250 by: Ashley Sheridan

Last Name extraction in query
        312249 by: Jim Giner
        312251 by: Ashley Sheridan
        312252 by: Jim Giner
        312253 by: Jim Giner
        312254 by: Robert Stone
        312255 by: Geoff Lane
        312256 by: Hans Åhlin
        312257 by: sono-io.fannullone.us
        312258 by: Jim Giner
        312259 by: Jim Giner
        312260 by: Steve Staples
        312261 by: Bastien Koert
        312262 by: Jim Giner
        312263 by: Andre Polykanine

Please help with glob
        312264 by: Al Mangkok

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
[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
load, and less bandwidth. If you include the JS file with php, every
time
you request the page the javascript will be pulled from your hard drive
by
php and sent back as a part of the server response (your end web page).
[/snip]

So all of the pages I generate with PHP that call JavaScript functions
and libraries are doing it wrong?

--- End Message ---
--- Begin Message ---
On 4 April 2011 12:12, Jay Blanchard <[email protected]> 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 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 and carries on execution (try debugging THAT),
then almost certainly.

Under normal circumstances, the PHP code is completely finished
running before anything gets to the client. There is no mechanism for
allowing _this_ script to get a response to a JS call whilst running.

It is like the game of "pass the parcel". Your job (as in the PHP
script) is to unwrap 1 layer of paper and pass it on. That's it. PHP
runs and builds the appropriate output in response to the request that
the server directed to the PHP handler. Once the output has been
passed to the server, the PHP script is finished.

Whilst building the output, PHP cannot talk to the client. At the most
fundamental level, the client (the browser) is not listening for
anyone other than a response to the request it made to the server.





-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--- End Message ---
--- Begin Message ---
[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 and carries on execution (try debugging THAT),
then almost certainly.
[/snip]

So dynamically generated pages by PHP shouldn't spit out any JS of any
type?

--- End Message ---
--- Begin Message ---
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 it to the server which then recreates the
> working environment and carries on execution (try debugging THAT),
> then almost certainly.
> [/snip]
> 
> So dynamically generated pages by PHP shouldn't spit out any JS of any
> type?
> 


That's not what he said. PHP can more than adequately output Javascript
(or any other kind of output you can think of really, such as XML, PDF,
images, etc), it's just generally most people use it to output HTML.
Quite often it's easiest when passing data from PHP to Javascript to do
it by outputting Javascript code directly, but it does help to separate
PHP from the client-side. So rather than think of embedding PHP in an
HTML file, it's really the other way around, because as soon as you take
an HTML file and include PHP, the whole thing is parsed by php the
program on the server, which then outputs HTML to Apache, rather than
Apache just grabbing the plain HTML and sending it to the client.

Because web servers (typically) don't parse Javascript code, PHP knows
nothing about the functions you've declared in it, even if PHP was
responsible for outputting the Javascript code itself, in much the same
way that you wouldn't expect PHP to output CSS and know whether your
browser has correcly applied the styles or not. Everything that happens
on the client-side is outside of PHP and the server.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On 4 April 2011 14:03, Jay Blanchard <[email protected]> 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 it to the server which then recreates the
> working environment and carries on execution (try debugging THAT),
> then almost certainly.
> [/snip]
>
> So dynamically generated pages by PHP shouldn't spit out any JS of any
> type?
>

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.

I use PHP to create JS code a LOT. The CSS/JS Combinator uses PHP to
shrink and cache the JS and CSS code to reduce the number of hits a
page generates.



-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--- End Message ---
--- Begin Message ---
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 return it to the server which then recreates the
> working environment and carries on execution (try debugging THAT),
> then almost certainly.
> [/snip]
> 
> So dynamically generated pages by PHP shouldn't spit out any JS of any
> type?

Spit out all the Javascript you want with dynamically generated PHP
pages. Just don't try to call a Javascript function from PHP. That was
the OP's mistake.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

--- End Message ---
--- Begin Message ---
[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 know how much I have tried to make sure that
posters in the past have understood the difference between client-side
vs. server-side. AJAX blurs that line for some developers but I still
believe that line to be steadfastly in place.



--- End Message ---
--- Begin Message ---
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 module's
functions.
But the documentation isn't very useful at the moment.

I'm trying to do the exact same thing as :
https://gist.github.com/901407starting at the line 8
It looks like :
$privkey = openssl_pkey_new();
$privkey = openssl_pkey_new();
$csr = openssl_csr_new($dn, $privkey);
$sscert = openssl_csr_sign($csr, file_get_contents('/PATH_TO/ca.crt'),
file_get_contents('/PATH_TO/ca.key'), 10000);
openssl_x509_export($sscert, $cert);
openssl_pkcs12_export($cert, $pkcs12, $privkey, '', array('clcerts',
'nokeys'));

And here I'm stuck. Is there a way to do the following command in PHP ?
openssl pkcs12 -nodes -clcerts -in cacert.p12 -out client.pem

thanks

Denis Fingonnet

--- End Message ---
--- Begin Message ---
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 question is... Is it truly useful or is it just another layer 
that we have to write?

 From what I can tell it looks like it could stabilize some of my programming 
in regards to databases, and possibly if I have to move information from one 
application to another.

But is it worth the added coding or should I just interact with the pieces 
directly?

Thoughts? Questions? Flames? :)



Yes :)

--
Peter Ford, Developer                 phone: 01580 893333 fax: 01580 893399
Justcroft International Ltd.                              www.justcroft.com
Justcroft House, High Street, Staplehurst, Kent   TN12 0AH   United Kingdom
Registered in England and Wales: 2297906
Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS

--- End Message ---
--- Begin Message ---
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 lock the file from writes until fclose()?
Does it lock the file from reads as well?

file($filename);

Does this function lock the file from writes until finished?
Does it lock the file from reads as well?

All this is in the context of a Linux/Unix web server.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

--- End Message ---
--- Begin Message ---
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 reads as well?
> 
> fopen($filename, 'r+');
> 
> Does this function lock the file from writes until fclose()?
> Does it lock the file from reads as well?
> 
> file($filename);
> 
> Does this function lock the file from writes until finished?
> Does it lock the file from reads as well?
> 
> All this is in the context of a Linux/Unix web server.

No, fopen does not lock the file. Check out http://php.net/flock but be sure to 
read all of that page because there are some gotchas with using it.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/





--- End Message ---
--- Begin Message ---
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 <[email protected]>:
> 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 lock the file from writes until fclose()?
> Does it lock the file from reads as well?
>
> file($filename);
>
> Does this function lock the file from writes until finished?
> Does it lock the file from reads as well?
>
> All this is in the context of a Linux/Unix web server.
>
> Paul
>
> --
> Paul M. Foster
> http://noferblatz.com
> http://quillandmouse.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
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
return correctly, which is why I am puzzled.

I am using the latest php 5.3.6 compiled from source on a OpenVZ CentOS
container. All packages are up to date.

Am I doing something wrong or is this a bug?

I can workaround this problem my parsing the correctly formatted date
using strtotime() but I would like to know what's going on.



This is the output of the script:

        Current time in Asia/Singapore is 2011-04-04 23:32:36
        Timestamp for Asia/Singapore is 1301931156
        Date created from previous timestamp is 2011-04-04 16:32:36

The code is :

<?php

$timezone="Asia/Singapore";

# Create Timezone object
$remote_timezone        = new DateTimeZone($timezone);

# Create datetime object
$remote_time            = new DateTime("now" , $remote_timezone);

# Print the date
print "Current time in {$timezone} ";
print "is {$remote_time->format("Y-m-d H:i:s")}<br/>";

# Print the timestamp
print "Timestamp for {$timezone} ";
print "is {$remote_time->format("U")}<br />";

# Get the timestamp and create a date from it
$timestamp = (int)$remote_time->format("U");

# Show the formatted date created from timestamp
print "Date created from previous timestamp is ";
print date("Y-m-d H:i:s",$timestamp)."<br/>";

?>



--- End Message ---
--- Begin Message ---
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 the local system. Other formatted dates appear to
> return correctly, which is why I am puzzled.
> 
> I am using the latest php 5.3.6 compiled from source on a OpenVZ CentOS
> container. All packages are up to date.
> 
> Am I doing something wrong or is this a bug?
> 
> I can workaround this problem my parsing the correctly formatted date
> using strtotime() but I would like to know what's going on.
> 
> 
> 
> This is the output of the script:
> 
>       Current time in Asia/Singapore is 2011-04-04 23:32:36
>       Timestamp for Asia/Singapore is 1301931156
>       Date created from previous timestamp is 2011-04-04 16:32:36
> 
> The code is :
> 
> <?php
> 
> $timezone="Asia/Singapore";
> 
> # Create Timezone object
> $remote_timezone      = new DateTimeZone($timezone);
> 
> # Create datetime object
> $remote_time          = new DateTime("now" , $remote_timezone);
> 
> # Print the date
> print "Current time in {$timezone} ";
> print "is {$remote_time->format("Y-m-d H:i:s")}<br/>";
> 
> # Print the timestamp
> print "Timestamp for {$timezone} ";
> print "is {$remote_time->format("U")}<br />";
> 
> # Get the timestamp and create a date from it
> $timestamp = (int)$remote_time->format("U");
> 
> # Show the formatted date created from timestamp
> print "Date created from previous timestamp is ";
> print date("Y-m-d H:i:s",$timestamp)."<br/>";
> 
> ?>
> 
> 
> 


What do you mean it only returns the timestamp for the local system? Did
you want PHP to know what time the visitors are on? PHP won't know about
that, all you can do is set the timezone for the script based on some
information you're receiving from a clients machine, otherwise PHP won't
know, because it's only run on the server and doesn't know about the
client machines? Is this what you're trying to do, or did I
misunderstand?

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
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.,,,



My result keeps coming up with a 0 for the FIELD portion I assume
since my output shows a blank last_name.  From the docs I believe it should 
be giving me the right-most portion of the 'race_winner' field beginning 
where the first space char is found.

Am I not using this correctly?  Is there a better way to do this?  I'm
trying to have my results sorted by last name and since the table was not
built with separate first/last name fields, I'm stuck with figuring
somethign out.





--- End Message ---
--- Begin Message ---
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,
> substr(race_winner,FIELD(' ',race_winner)) as last_name
> 
> etc.,,,
> 
> 
> 
> My result keeps coming up with a 0 for the FIELD portion I assume
> since my output shows a blank last_name.  From the docs I believe it should 
> be giving me the right-most portion of the 'race_winner' field beginning 
> where the first space char is found.
> 
> Am I not using this correctly?  Is there a better way to do this?  I'm
> trying to have my results sorted by last name and since the table was not
> built with separate first/last name fields, I'm stuck with figuring
> somethign out.
> 
> 
> 
> 
> 


Where's the PHP question in this, as what you've asked would be better
asked on a database list, as it's an SQL query.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
good point.  So wrapped up in making my php script work that I didn't think 
about that.
"Ashley Sheridan" <[email protected]> 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 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.,,,
>>
>>
>>
>> My result keeps coming up with a 0 for the FIELD portion I assume
>> since my output shows a blank last_name.  From the docs I believe it 
>> should
>> be giving me the right-most portion of the 'race_winner' field beginning
>> where the first space char is found.
>>
>> Am I not using this correctly?  Is there a better way to do this?  I'm
>> trying to have my results sorted by last name and since the table was not
>> built with separate first/last name fields, I'm stuck with figuring
>> somethign out.
>>
>>
>>
>>
>>
>
>
> Where's the PHP question in this, as what you've asked would be better
> asked on a database list, as it's an SQL query.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
> 



--- End Message ---
--- Begin Message ---
Actually - I can't seem to find a mysql newsgroup anywhere.  The ones that 
come up in google search are all dead and buried. 



--- End Message ---
--- Begin Message ---
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 string, but you're not, so my 
guess is that you'll have to extract the results into an array, manipulate the 
race_winner column, sort the array, then do whatever is coming next.
I'm not a MySql expert, just putting in my two bob's worth.
Don't forget to LTRIM(RTRIM(race_winner)).

Cheers,




--- Em seg, 4/4/11, Jim Giner <[email protected]> escreveu:

De: Jim Giner <[email protected]>
Assunto: [PHP] Last Name extraction in query
Para: [email protected]
Data: Segunda-feira, 4 de Abril de 2011, 12:50

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.,,,



My result keeps coming up with a 0 for the FIELD portion I assume
since my output shows a blank last_name.  From the docs I believe it should 
be giving me the right-most portion of the 'race_winner' field beginning 
where the first space char is found.

Am I not using this correctly?  Is there a better way to do this?  I'm
trying to have my results sorted by last name and since the table was not
built with separate first/last name fields, I'm stuck with figuring
somethign out.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




      

--- End Message ---
--- Begin Message ---
 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. [email protected]).

HTH,

-- 
Geoff


--- End Message ---
--- Begin Message ---
Read about Friday posting ;)
http://news.php.net/php.general/306939

2011/4/4 Geoff Lane <[email protected]>:
>  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. [email protected]).
>
> HTH,
>
> --
> Geoff
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 


**********************************************
 Hans Åhlin
   Tel: +46761488019
   icq: 275232967
   http://www.kronan-net.com/
   irc://irc.freenode.net:6667 - TheCoin
**********************************************

--- End Message ---
--- Begin Message ---
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
 <[email protected]>

Marc

--- End Message ---
--- Begin Message ---
Thanks - will do!
> I found a mailing list that might work for you:
>
> To subscribe to the list, send an empty message to
> <[email protected]>
>
> Marc 



--- End Message ---
--- Begin Message ---
no - that address came back undeliverable.
>
> To subscribe to the list, send an empty message to
> <[email protected]>
>
> Marc 



--- End Message ---
--- Begin Message ---
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
> > <[email protected]>
> >
> > Marc 
> 
> 
> 
http://lists.mysql.com/mysql

there is the subscribe box on the right side... use that.   they are a
helpful bunch over there.

-- 

Steve Staples
Web Application Developer
MNSi (Managed Network Systems Inc.)
519.258.2333 x8414
http://www.mnsi.net


--- End Message ---
--- Begin Message ---
On Mon, Apr 4, 2011 at 2:40 PM, Steve Staples <[email protected]> wrote:
> 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
>> > <[email protected]>
>> >
>> > Marc
>>
>>
>>
> http://lists.mysql.com/mysql
>
> there is the subscribe box on the right side... use that.   they are a
> helpful bunch over there.
>
> --
>
> Steve Staples
> Web Application Developer
> MNSi (Managed Network Systems Inc.)
> 519.258.2333 x8414
> http://www.mnsi.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Try using LOCATE instead of the FIELD function

$q = "SELECT race_winner,count(race_date) as wins,
substr(race_winner,LOCATE(' ',race_winner)) as last_name


-- 

Bastien

Cat, the other other white meat

--- End Message ---
--- Begin Message ---
To those who have been so helpful:
I did manage to subscribe to a mysql mailing list.  thanks for the pointers.

As for my orig problem - for those who are intereseted:

The FIELD function apparently doesn't work in 5.0.2, even tho it is in the 
online ref manual.  I was given a suggestion of using INSTR and that worked 
beautifully.  Here's how it looked in my Select statement:

$q = "SELECT race_winner,count(race_date) as wins,
      SUBSTR(race_winner,INSTR(race_winner,' ')+1) as last_name
        FROM `trk_races`
        WHERE race_winner IS NOT NULL
        GROUP BY race_winner
        ORDER BY wins DESC,last_name";


It works just as I wanted it to.

Thanks to all.




--- End Message ---
--- Begin Message ---
Hello Geoff,

As  I  dislike forums and like mailing lists (yes, an old habbit :-)),
so here it is:
[email protected]
(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 in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

------------ Original message ------------
From: Geoff Lane <[email protected]>
To: [email protected]
Date created: , 7:46:26 PM
Subject: [PHP] Last Name extraction in query


       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. [email protected]).

HTH,

-- 
Geoff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
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  glob() in
/usr/local/apache2/htdocs/hrms/globtest.php on line 2

I am running PHP 5.2.17 on CentOS 4.8 . How do I compile PHP to get
the glob function in ?
Please help.


--
al

--- End Message ---

Reply via email to