php-general Digest 4 Jan 2007 09:51:37 - Issue 4550
Topics (messages 246491 through 246509):
Re: Port Block
246491 by: Richard Lynch
246496 by: Stut
Re: How to read cookies set by php?
246492 by: Richard Lynch
Re: E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0
246493
# [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). Sample
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-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
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.
# [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
# [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 used to describe
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
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 might be
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
inefficiency to the
# [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 formatting
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
called
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
complexity and
# [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 the
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 of how bad
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 software. If
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.
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
complexity and
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 in
# [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
- storing
# [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 data
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 way to grab
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 phpspeed
page
# [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 request?
your
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 phpspeed page
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 that to mean all
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 run a
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 by printf(),
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
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 have to say.
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 numbers. My wife does
?php
echo 'Is String: [' . ( is_string( 'a1b2c3' ) preg_match( '/[A-Za-z]+/',
'a1b2c3' )) . ']br';
echo 'Is Numeric: [' . ( is_numeric( 'a1b2c3' ) preg_match( '/[0-9]+/',
'a1b2c3' )) . ']br';
echo 'Is String: [' . ( is_string( 'abcdef' ) preg_match( '/[A-Za-z]+/',
'abcdef' )) . ']br';
echo
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
Chris Boget wrote:
?php
echo 'Is String: [' . ( is_string( 'a1b2c3' ) preg_match(
'/[A-Za-z]+/', 'a1b2c3' )) . ']br';
echo 'Is Numeric: [' . ( is_numeric( 'a1b2c3' ) preg_match(
'/[0-9]+/', 'a1b2c3' )) . ']br';
echo 'Is String: [' . ( is_string( 'abcdef' ) preg_match(
'/[A-Za-z]+/',
Note that $ allows a trailing newline, but \z doesn't.
Arpad
Stut wrote:
Chris Boget wrote:
?php
echo 'Is String: [' . ( is_string( 'a1b2c3' ) preg_match(
'/[A-Za-z]+/', 'a1b2c3' )) . ']br';
echo 'Is Numeric: [' . ( is_numeric( 'a1b2c3' ) preg_match(
'/[0-9]+/', 'a1b2c3' )) . ']br';
echo
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 some
# [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 your work runs on
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 logging the result of each
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
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:
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
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)
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
[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.
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 a working script now,
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', $emails, $output);
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's at
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 the
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 the
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 the
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
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,
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 results of
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
# [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, and
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(date) as
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 some
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 good
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 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 strings?
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/catch handler
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 throw an
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
# [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 able to
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:
# [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 program leaves
# [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 dense
p¥
¶(?;q÷ܨ`¥(ÔÒè\;£
Qº~¬G¯ÙF÷HFâ,Uyð®Ë/¯á°«³|Y«¢´î¾±yIØÔóÊÏ®Z`ØØ»Ïq[4¼ê¬tÜ¢baðìÞn-a¥z}¸
ìÀ#6ÜêåuÝÃBvz
ÛÇ
D/Á·GtDùɵóL,è»~ô6ð£ð3õ«Ú$ed±e
·ájO¸
áû³ªu#lDµ½þÈ®±
#Û¶T~bi-*nn²ç¨×úõ%1»1óÀò°ê2Ó?YëØ(óɧëùΣ0UM·üÔëA¢KC%ÝáÄ^ký
¸ûôÂ.·ÃÏÆøi2dkq;Ú:_#κ
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
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
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
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
72 matches
Mail list logo