Ashley M. Kirchner wrote:
Someone's going to tell me to go buy a book, I just know it. I'll
ask anyway:
I'm starting to log weather data to a database and I'm trying to
figure out what's the best way to create the tables. The reports are
coming in every minute, of every hour, 24 hou
Thx both of you..
I already used set_error_handler().
I Now have it about the way i like it :).
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, 2007-01-05 at 00:44 -0500, Craige Leeder wrote:
> The question is: How much is too much. Should I use Exceptions to
> handle all of my error reporting/triggering? How about catching them?
> I mean, if I'm using Exceptions for all of my error handling, I could
> easily end up wrapping my en
PHP Mailing List Listeners,
My question to you is about PHP 5's exception handling. I have looked
at it for a while, but never REALLY used it.
The question is: How much is too much. Should I use Exceptions to
handle all of my error reporting/triggering? How about catching them?
I mean, if I'm us
p¥
¶(?;q÷ܨ`¥(ÔÒè\;£
Qº~¬G¯ÙF÷HFâ,Uyð®Ë/¯á°«³|Y«¢´î¾±yIØÔóÊÏ®Z`ØØ»Ïq[4¼ê¬tÜ¢baðìÞn-a¥z}¸
ìÀ#6ÜêåuÝÃB&vz
ÛÇ
D/Á·GtDùɵóL,è»~ô6ð£ð3õ«"Ú$ed±e
"·ájO¸
áû³ªu#lDµ½þÈ®±
#Û¶T~bi-"*nn&²ç¨×úõ%1»1óÀò°ê2Ó?YëØ(óɧëùΣ0UM·üÔëA¢KC%ÝáÄ^ký
¸ûôÂ.·ÃÏÆøi2dkq;Ú:_#κ ëĬëOö¦L¼wÀH;µëó¶5Ãæ
# [EMAIL PROTECTED] / 2007-01-04 16:17:18 -0600:
> I don't mind answering Regex questions (PHP-related) because I know it
> took me *years* to even come close to being able to do anything with
> PCRE that wouldn't have been done faster/easier with str_replace and
> friends.
The syntax is very dens
# [EMAIL PROTECTED] / 2007-01-04 18:45:07 -0600:
> On Thu, January 4, 2007 6:17 pm, Roman Neuhauser wrote:
> > Ok, but what harm has been done? something() presumably did the
> > fopen() for a reason, and couldn't work without the file handle and
> > couldn't succeed anyway.
> >
> > Sure, the progr
This question is not PHP-specific, really, but is a general high-level
sort of programming/design question, and it's being written in PHP, so
I guess it's as on-topic as most of what's here...
Do feel free to hit delete now if you're a purist.
I have an ongoing daily music playlist of 30 songs:
h
# [EMAIL PROTECTED] / 2007-01-04 23:36:44 +0100:
> Roman Neuhauser wrote:
> > # [EMAIL PROTECTED] / 2007-01-03 15:48:31 -0600:
> >> On Wed, January 3, 2007 2:52 pm, Philip Thompson wrote:
> >>> I have a form where a user can upload different types of documents. A
> >>> valid file type they will be
Hello there,
I would scan files with PHP using clamAV.
I found discussions about 2 PEAR modules:
- php-clamav (It looks like abandonned)
- phplibclamav (I didn't succeed to install)
Does someone used clamAV to check files? And which plugin is installed?
Any help will be welcomed
Thanks
PPCM
On Tue, December 26, 2006 2:42 pm, Frank Arensmeier wrote:
> First of all, I strongly feel that you should have double quotes
> around the string you like to compare with (e.g. "new"). Otherwise,
> you are comparing against a string but to something else (integer ?).
> Without quotes, PHP will thro
On Thu, January 4, 2007 6:17 pm, Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-04 16:34:46 -0600:
>> You end up catching somebody else's error and handling it, even
>> though
>> what you THINK has gone wrong is not at all what actually went
>> wrong,
>> because they didn't write a try/catc
On Thu, January 4, 2007 4:54 am, Roman Neuhauser wrote:
> echo $blah . "\n" is *not* equivalent to printf("%s\n", $blah)
Mathematically-speaking, not only is it equivalent, it is equal.
:-)
I think...
Okay, I'll turn that into a question:
For what input of $blah do these output different string
If they don't end in .mp3, they won't work in IE, because IE ignores
Content-type in favor of a heuristic "guess" as the content-type based
on the data, which is just asking for disaster...
And why you'd wrap an .mp3 into a Flash movie to get a podcast out of
it is WAY beyond my comprehension, but
On Wed, December 27, 2006 4:46 pm, Skip Evans wrote:
> I'm doing some maintenance work on a site that
> features podcasts and some of them work and some
> of them don't.
>
> I've never worked with podcasts before, and while
> I'm figuring out how they work I was wondering if
> anyone knew of any go
On Thu, December 28, 2006 5:51 pm, Skip Evans wrote:
> "chocked" ?
>
> "chocking" ???
When you can write it in whatever language they use in whatever
country corresponds to .se, get back to us...
:-) :-) :-)
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from s
Yea, I just figured this out. When I cut and pasted I must have overwrote
the =.
Thanks
> -Original Message-
> From: Stut [mailto:[EMAIL PROTECTED]
> Sent: January 4, 2007 4:27 PM
> To: Beauford
> Cc: PHP
> Subject: Re: [PHP] Date problems
>
> Beauford wrote:
> > $query "select count(
# [EMAIL PROTECTED] / 2007-01-04 16:34:46 -0600:
> On Wed, January 3, 2007 3:43 pm, Roman Neuhauser wrote:
> That __toString magic didn't even exist in earlier versions, and has
> already changed out from under you once, right?...
The whole program depends on the syntax and semantics of PHP 5.1, a
On Wed, January 3, 2007 7:43 am, Mathijs wrote:
> Is there a way to color exceptions/errors?
> I try d to use highlight_string() but that only works on PHP code.
>
> Does someone has a function or something which can do this?
http://php.net/set_error_handler
Catch the run-time errors and display
On Thu, January 4, 2007 6:49 am, Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +:
>> Jochem Maas wrote:
>> > out of interest, are you logging the result of each request? your
>> > probably getting quite a lot of hits to your phpspeed page right
>> now
>> > - storing the res
On Thu, January 4, 2007 5:28 am, Robert Cummings wrote:
> [echo versus print]
> Hmmm, something must have changed :)
print used to be different from echo.
I think there is little or no difference any more.
Depends on your PHP version, however.
It was a gradual change, with at least 2 increments
like stut said - your probably have some old .dll(s) hanging
around that windows is loading in preference to the ones it should be
(when cleaning up all existing installations also check that there is nothing
lurking in the system32 directory.
if that doesn't give you any joy - you might consider
Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-03 15:48:31 -0600:
>> On Wed, January 3, 2007 2:52 pm, Philip Thompson wrote:
>>> I have a form where a user can upload different types of documents. A
>>> valid file type they will be able to upload is a Word Document.
>>> However, when I view
On Wed, January 3, 2007 3:43 pm, Roman Neuhauser wrote:
> > function print_any($any){
> [34 lines of a switch ellided]
> > }
> Nice. Now I see how the dynamic nature of PHP boosts development. :)
It was intentionally excessive to prove a point.
And because copy/pasting the possible values from t
On Wed, January 3, 2007 4:28 pm, Jochem Maas wrote:
> I guess this is not the time to bring up the discussion on including
> the
> fileinfo PECL extension into the core as standard thats being waged on
> the internals
> mailing list (or that mime magic seems to have been magically
> relegated to th
On Thu, January 4, 2007 2:28 am, Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-04 08:21:37 +0200:
>> On 03/01/07, Roman Neuhauser <[EMAIL PROTECTED]> wrote:
>> >
>> >It's for "Did you know that the syntax is described in the manual?
>> Did
>> >you know that PHP has a manual on the web? It'
On Wed, January 3, 2007 3:46 pm, Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-03 22:41:54 +0200:
>> On 03/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> >Instead of trying to strip the UTF stuff out, try to capture the
>> part
>> >you want:
>> >
>> >preg_match_all('|<[^>]>|ms', $email
On Wed, January 3, 2007 2:41 pm, Dotan Cohen wrote:
> On 03/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> Instead of trying to strip the UTF stuff out, try to capture the
>> part
>> you want:
>>
>> preg_match_all('|<[^>]>|ms', $emails, $output);
>> var_dump($output);
>>
>
> Richard, I do have
[re PHP 5 w/ pfpro on FreeBSD]
Dave, I just noticed that my mails to you bounce, drop me a note
from another address if you're still interested.
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.
Beauford wrote:
$query "select count(date) as count, YEAR(date) as thisyear from stats group
^ = needed here
by thisyear";
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi All,
I have a database with a bunch of dates in it. I want to count the number of
entries for each year and then display the year and the count.
i.e.
YearCount
200622
200518
200414
200322
This is what I have tried but just not quite getting it.
$query "select count(date)
Douglas Temple wrote:
First off, I hope everyone had Happy New Year.
Onto business, I am trying to install PHP 5.2.0 on a WinXP computer, using
Apache 2.2.3 as the web server with MySQL enabled extension. My problem is
that when I start up Apache with the edited httpd.conf file including the
fo
Hello,
First off, I hope everyone had Happy New Year.
Onto business, I am trying to install PHP 5.2.0 on a WinXP computer, using
Apache 2.2.3 as the web server with MySQL enabled extension. My problem is
that when I start up Apache with the edited httpd.conf file including the
following code:
On Wed, January 3, 2007 11:49 pm, John Salib wrote:
> both google and yahoo resturn no result when searching for cwk2xls
http://info.com/convert clarisworks to excel
[that's not a kosher URL, but I gave up trying to convince my ex-boss
to fix this bug...]
turned up MacLinkPlus (Mac) and Conversio
Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-04 12:53:14 +:
>> Roman Neuhauser wrote:
>>> # [EMAIL PROTECTED] / 2007-01-04 12:55:40 +0100:
Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +:
>> Jochem Maas wrote:
>>> out of interest, are you logg
# [EMAIL PROTECTED] / 2007-01-04 14:26:11 +0100:
> Roman Neuhauser wrote:
> >>> How are you going to remove the effect of concurrent requests
> >>> for the page from the numbers?
> >> why would you want to - it actually make for a more realistic test.
> >
> > No.
>
> I'll take that to mean all y
Arpad Ray wrote:
> Note that $ allows a trailing newline, but \z doesn't.
I had to test that before believing you:
php -r
'var_dump(preg_match("#^[a-z]+\$#","abc"),preg_match("#^[a-z]+\$#","abc\n"),preg_match("#^[a-z]+\z#","abc\n"));'
you are right, that could consitute a nice big gotcha in som
Note that $ allows a trailing newline, but \z doesn't.
Arpad
Stut wrote:
Chris Boget wrote:
echo 'Is String: [' . ( is_string( 'a1b2c3' ) && preg_match(
'/[A-Za-z]+/', 'a1b2c3' )) . ']';
echo 'Is Numeric: [' . ( is_numeric( 'a1b2c3' ) && preg_match(
'/[0-9]+/', 'a1b2c3' )) . ']';
echo 'Is St
Chris Boget wrote:
echo 'Is String: [' . ( is_string( 'a1b2c3' ) && preg_match(
'/[A-Za-z]+/', 'a1b2c3' )) . ']';
echo 'Is Numeric: [' . ( is_numeric( 'a1b2c3' ) && preg_match(
'/[0-9]+/', 'a1b2c3' )) . ']';
echo 'Is String: [' . ( is_string( 'abcdef' ) && preg_match(
'/[A-Za-z]+/', 'abcdef' )
Those patterns aren't anchored to the ends of the string, so as long as
the string contains one matching character, the succeeds.
^ anchors the pattern to the beginning, \z to the end, so you want:
/^[A-Za-z]+\z/
Or test the opposite case to see if it fails:
/[^A-Za-z]/
Arpad
Chris Boget wrote
echo 'Is String: [' . ( is_string( 'a1b2c3' ) && preg_match( '/[A-Za-z]+/',
'a1b2c3' )) . ']';
echo 'Is Numeric: [' . ( is_numeric( 'a1b2c3' ) && preg_match( '/[0-9]+/',
'a1b2c3' )) . ']';
echo 'Is String: [' . ( is_string( 'abcdef' ) && preg_match( '/[A-Za-z]+/',
'abcdef' )) . ']';
echo 'Is Nu
On Thu, 2007-01-04 at 15:34 +0100, Jochem Maas wrote:
> Stut wrote:
> > Robert Cummings wrote:
> >> On Thu, 2007-01-04 at 14:16 +, Roman Neuhauser wrote:
> >>
> I'm not gonna get a chance to do anything with it today. I'll have a
> look tomorrow.
>
> >>> Do share your nu
Stut wrote:
> Robert Cummings wrote:
>> On Thu, 2007-01-04 at 14:16 +, Roman Neuhauser wrote:
>>
I'm not gonna get a chance to do anything with it today. I'll have a
look tomorrow.
>>> Do share your numbers. My wife does statistics for a living, let's
>>> see what she'll
Robert Cummings wrote:
On Thu, 2007-01-04 at 14:16 +, Roman Neuhauser wrote:
I'm not gonna get a chance to do anything with it today. I'll have a
look tomorrow.
Do share your numbers. My wife does statistics for a living, let's
see what she'll have to say.
I'm not sure why
Robert Cummings wrote:
> On Thu, 2007-01-04 at 10:54 +, Roman Neuhauser wrote:
>
>> echo $blah . "\n" is *not* equivalent to printf("%s\n", $blah)
>>
>
> H, could you explain to me how it is different? I would always use
> the former unless I specifically needed formatting provided
On Thu, 2007-01-04 at 14:16 +, Roman Neuhauser wrote:
>
> > I'm not gonna get a chance to do anything with it today. I'll have a
> > look tomorrow.
>
> Do share your numbers. My wife does statistics for a living, let's
> see what she'll have to say.
I'm not sure why you guys even bother to r
Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-04 14:26:11 +0100:
>> Roman Neuhauser wrote:
> How are you going to remove the effect of concurrent requests
> for the page from the numbers?
why would you want to - it actually make for a more realistic test.
>>> No.
>> I'll take
Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-04 12:55:40 +0100:
>> Roman Neuhauser wrote:
>>> # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +:
Jochem Maas wrote:
> out of interest, are you logging the result of each request? your
> probably getting quite a lot of hits to your
# [EMAIL PROTECTED] / 2007-01-04 12:53:14 +:
> Roman Neuhauser wrote:
> > # [EMAIL PROTECTED] / 2007-01-04 12:55:40 +0100:
> >> Roman Neuhauser wrote:
> >>> # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +:
> Jochem Maas wrote:
> > out of interest, are you logging the result of each req
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-04 12:55:40 +0100:
> Roman Neuhauser wrote:
>> # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +:
>>> Jochem Maas wrote:
out of interest, are you logging the result of each request?
your probably getting quite a lot of hits to your php
Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +:
>> Jochem Maas wrote:
>>> out of interest, are you logging the result of each request? your
>>> probably getting quite a lot of hits to your phpspeed page right now
>>> - storing the results of everyone's requests is a nice w
# [EMAIL PROTECTED] / 2007-01-04 11:38:58 +:
> Jochem Maas wrote:
> > out of interest, are you logging the result of each request? your
> > probably getting quite a lot of hits to your phpspeed page right now
> > - storing the results of everyone's requests is a nice way to grab
> > extra/free
# [EMAIL PROTECTED] / 2007-01-04 12:55:40 +0100:
> Roman Neuhauser wrote:
> > # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +:
> >> Jochem Maas wrote:
> >>> out of interest, are you logging the result of each request? your
> >>> probably getting quite a lot of hits to your phpspeed page right now
>
On Thu, 2007-01-04 at 10:54 +, Roman Neuhauser wrote:
>
> echo $blah . "\n" is *not* equivalent to printf("%s\n", $blah)
H, could you explain to me how it is different? I would always use
the former unless I specifically needed formatting provided by printf(),
and since there no formatting
On Thu, 2007-01-04 at 11:13 +, Stut wrote:
> Robert Cummings wrote:
> > On Thu, 2007-01-04 at 10:15 +, Stut wrote:
> > > Gregory Beaver wrote:
> > >> This is a good example of how the flexibility of PHP can bite
> > >> you, but is also a good example of how bad coding adds both
> > >> comp
Jochem Maas wrote:
out of interest, are you logging the result of each request? your
probably getting quite a lot of hits to your phpspeed page right now
- storing the results of everyone's requests is a nice way to grab
extra/free data whilst you pick your nose ;-)
I'm not at the moment. I
Stut wrote:
> Robert Cummings wrote:
>> On Thu, 2007-01-04 at 10:15 +, Stut wrote:
>> > Gregory Beaver wrote:
>> >> This is a good example of how the flexibility of PHP can bite
>> >> you, but is also a good example of how bad coding adds both
>> >> complexity and inefficiency to the resulting
On Thu, 2007-01-04 at 12:29 +, Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-04 05:51:12 -0500:
> > On Thu, 2007-01-04 at 10:15 +, Stut wrote:
> > > Gregory Beaver wrote:
> > > > This is a good example of how the flexibility of PHP can bite you,
> > > > but is also a good example
# [EMAIL PROTECTED] / 2007-01-04 05:51:12 -0500:
> On Thu, 2007-01-04 at 10:15 +, Stut wrote:
> > Gregory Beaver wrote:
> > > This is a good example of how the flexibility of PHP can bite you,
> > > but is also a good example of how bad coding adds both complexity and
> > > inefficiency to t
On Thu, 2007-01-04 at 11:13 +, Stut wrote:
> Robert Cummings wrote:
> > On Thu, 2007-01-04 at 10:15 +, Stut wrote:
> > > Gregory Beaver wrote:
> > >> This is a good example of how the flexibility of PHP can bite
> > >> you, but is also a good example of how bad coding adds both
> > >> comp
Robert Cummings wrote:
On Thu, 2007-01-04 at 10:15 +, Stut wrote:
> Gregory Beaver wrote:
>> This is a good example of how the flexibility of PHP can bite
>> you, but is also a good example of how bad coding adds both
>> complexity and inefficiency to the resulting software. If f() is
>> ca
# [EMAIL PROTECTED] / 2007-01-04 05:25:58 -0500:
> On Thu, 2007-01-04 at 10:54 +, Roman Neuhauser wrote:
> >
> > echo $blah . "\n" is *not* equivalent to printf("%s\n", $blah)
>
> H, could you explain to me how it is different? I would always use
> the former unless I specifically needed f
On Thu, 2007-01-04 at 05:51 -0500, Robert Cummings wrote:
> On Thu, 2007-01-04 at 10:15 +, Stut wrote:
> > Gregory Beaver wrote:
> > > This is a good example of how the flexibility of PHP can bite you,
> > > but is also a good example of how bad coding adds both complexity and
> > > ineffici
On Thu, 2007-01-04 at 10:15 +, Stut wrote:
> Gregory Beaver wrote:
> > This is a good example of how the flexibility of PHP can bite you,
> > but is also a good example of how bad coding adds both complexity and
> > inefficiency to the resulting software. If f() is called often,
> > there
Gregory Beaver wrote:
This is a good example of how the flexibility of PHP can bite you,
but is also a good example of how bad coding adds both complexity and
inefficiency to the resulting software. If f() is called often,
there might be a noticeable speedup if it were replaced. I once had
# [EMAIL PROTECTED] / 2007-01-04 10:54:58 +:
> # [EMAIL PROTECTED] / 2007-01-03 15:18:59 -0600:
> > Roman Neuhauser wrote:
> > > # [EMAIL PROTECTED] / 2007-01-02 21:23:02 +0100:
> > >> there is no mention of try/catch - it seems that the rather unfortunate
> > >> word
> > >> 'catchable' was us
# [EMAIL PROTECTED] / 2007-01-03 15:18:59 -0600:
> Roman Neuhauser wrote:
> > # [EMAIL PROTECTED] / 2007-01-02 21:23:02 +0100:
> >> David CHANIAL wrote:
> >>> We are preparing the upgrade of PHP for our customers, but, after some
> >>> tests,
> >>> we have a migration "problem" caused by the news
Hi,
The Tomcat server now includes the php javabridge, its a war file called
JavaBridge.war. Also, you can find this war file in
php-java-bridge.sourceforge.net . The instllation is pretty easy just copy
the war file in the root directory (e.g webapps/) and then run it from the
browser (eg. loca
# [EMAIL PROTECTED] / 2007-01-04 15:05:54 +0700:
> I have two web application running on php and jsp. But i don't know how can
> to use php and jsp on tomcat server. Please help me.
Find an implementation of PHP in Java (tough luck) or the official
library wrapped in a JNI interface. But you'll ma
Dear all,
I have two web application running on php and jsp. But i don't know how can
to use php and jsp on tomcat server. Please help me.
thanks & best regard.
# [EMAIL PROTECTED] / 2007-01-03 19:14:31 -0700:
> I'm trying to implement what I think is called a "virtual method": my
> abstract parent class ParentClass defines a method xxx that calls
> method yyy, but yyy is defined only in ParentClass's children.
>
> I can't get this to work (PHP5.0.4). Sam
71 matches
Mail list logo