Stut wrote:
Per Jessen wrote:
Segfaults are a fact of life
Only if you are forced to accept poor programming. I can assure you
that segfaults are not tolerated in a regular production environment.
Segfaults happen in test and development.
I agree with you for the most part
T.Lensselink wrote:
Would love to see the code that caused this.
http://jessen.ch/files/php-problem-sep2007.tar.gz
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
It's the call to virtual() that causes
T.Lensselink wrote:
Would love to see the code that caused this.
http://jessen.ch/files/php-problem-sep2007.tar.gz
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Don't really see what i has to do
://bugs.php.net/bug.php?id=42666
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the problem.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, no segfault. I do not have a windows box handy for testing.
I'm on Linux too, so never mind Windows for the moment.
So what's the difference between our two environments? Try putting
something in the problem-include file to verify that virtual is doing
what it's supposed to.
/Per Jessen, Zürich
rid of the symptoms is easy, solving the problem is not.
include/require are not replacements for virtual(). virtual() creates
an apache sub-request which I need for content-negotiation.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
that there are many differences in our
environments. We are running Suse Linux, PHP 5.2.1, Apache 2.2.4.
That's close though - my workstation is openSUSE 10.2, PHP 5.2.4, Apache
2.2.4.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
-insertRecord($insarr);
//$arr[] = $data;
}
fclose($handle);
For that sort of thing, I'd forget about PHP and just use multi-threaded
C. Especially if you've got an SMP machine.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
wondering if there was some kind of voodoo that would speed things up
a bit.
Given that you've got significant IO on both sides (file in, database
out), multi-threading it could work wonders. Not sure how you'd go
about that in PHP though.
/Per Jessen, Zürich
--
PHP General Mailing List (http
Paul Scott wrote:
Thanks to all for the suggestions - I now have to figure out the best
way to manipulate every single record in that table (now over 6.5
million rows) to add in a field (RDBMS function in C - so much
easier)...
Isn't that just an ALTER ?
/Per Jessen, Zürich
--
PHP
to be fast too, but we don't really process anything large in
PHP.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Andrew Prostko wrote:
I would like to change the email address this list is sending to,
I sent mail to '[EMAIL PROTECTED]' but I haven't received
anything back.
Can anyone tell me how to do this real quick?
1. unsubscribe old address.
2. subscribe new address.
Really quick.
/Per
that pretty well.
http://dev.mysql.com/doc/refman/5.0/en/query-cache.html
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
for it will not reduce the overall number of
connections.
The number of connections is presumably only important if we speak about
the number of concurrent connections. If each query can be dealt with
faster due to caching, the number of concurrent connections should
drop.
/Per Jessen, Zürich
--
PHP
.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
at the same time; simultaneous.
100 people come to your website - that's still going to be 100
connections to the database, regardless of where the results come
from.
But if that is one every hour for a hundred hours, your max concurrency
is 1.
/Per Jessen, Zürich
--
PHP General Mailing List
server load, number of connections, caching and concurrency without
talking about over how long.
When you think length(now)==0, you can have an infinite number of
connections.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
one of you
can help me anyways?
Hej Søren
to get it to work, you need to be in the Danish locale, otherwise æøå
won't be recognised as being word-characters. In javascript, I'm not
sure, but maybe you have to use UTF-8?
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net
, but not in the address part. If
you have them in the domain, you need to convert them to punycode
before you validate.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is there no freopen function in php?
I need to redirect stdin to a filename - outside of a shell so I can't
use a plain redirect).
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
believe. setlocale() caused me
all kinds of grief 2-3 years ago.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
), but I've never
had to do any of the above. The mb_convert_encoding() from UTF-8 to
UTF-8 doesn't seem to make much sense?
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Colin Guthrie wrote:
Per Jessen wrote:
I work almost exclusively in UTF-8 (language irrelevant), but I've
never had to do any of the above. The mb_convert_encoding()
fromUTF-8 to UTF-8 doesn't seem to make much sense?
I agree. Provided you HTML is dished out with UTF-8 in the doctype
.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
my server just because I get KOI8-R when I expected UTF-8 :-)
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
not
authenticated, you're not getting anywhere to start with. If you
somehow manage to bypass that, and attempt to submit data I don't
expect, my priority is the survival of my application, nothing else.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
Edward Vermillion wrote:
On Sep 28, 2007, at 1:05 PM, Per Jessen wrote:
Ed, your question was a good one, but so was my answer. In my case,
I don't cater to an open community, but to a closed one. If you're
not authenticated, you're not getting anywhere to start with. If you
somehow
Francisco Frost wrote:
I'm getting an error with my PHP, I'm running Apache 2.2.6 and every
time I try to access a PHP page on the Apache server, it says HTTP 500
Internal Server Error, can anyone help?
Check your apache error logs. My guess is that PHP is making apache
segfault.
/Per
Colin Guthrie wrote:
UTF-8 works by using special bits at the MSB end of the byte to say,
I can't represent this character in one byte, I need to use 2 bytes
(or 3 bytes) (and maybe also 4? can't remember of the top of my
head).
Yep, a UTF8 character is 1 to 4 bytes.
/Per Jessen, Zürich
Zoltán Németh wrote:
and anyway, the microseconds you could win with this really don't
count that much to be worth the effort... find real bottlenecks and
optimize against those.
And finally, if you're worried about microseconds, why are you using an
interpreted language?
/Per Jessen
.
Any ideas on how to fix this problem or a more elegant solution to my
huge data needs?
IF there is a problem in using session storage, you could just use your
own file cache instead.
Or you could the database query cache, depending on how much data you're
talking about.
/Per Jessen, Zürich
on the
web-server.
If you do the query once, then store the result in a file, and then keep
reading that file for the next cachetime seconds, the file will most
probably remain in memory, so accessing it will be fast and without IO.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net
to be
authorized to install on a low-cost hosting server.
There is more than one way to skin a cat. I generate PDFs in batch
using an OpenOffice document template (which is XML anyway), merge that
with my XML data using xalanc, and then openoffice to create the PDF.
/Per Jessen, Zürich
--
PHP
email
email
email
email
.
.
.
.
.
etc.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
:
http://en.wikipedia.org/wiki/Knapsack_problem
I've never heard of it either, but it sounds a lot like the travelling
salesman problem?
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
for about three years -
ajax doesn't improve on the basic functionality.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
tedd wrote:
At 3:27 PM +0200 10/10/07, Per Jessen wrote:
Colin Guthrie wrote:
What do you think of this?
http://webbytedd.com/b/timed-php/
It's a combination of using both ajax and php together.
I'd say overkill for the end result (could be done in plain
Javascript without any Ajax
either. That was my main
point.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
on it. OTOH, when
your data is hierarchical/recursive in nature, XSLT is brilliant!
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
implementation (with saxon) to PHP5, and I seem to recall having
problems with getting entities defined.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, whether dynamically from php or via an apache config.
And undoubtedly there equally many poor reason for using redirect and/or
rewrite. (they're very different things, by the way).
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Aschwin Wesselius wrote:
Per Jessen wrote:
Yes, that's a very typical setup. When the form is processed, you
send a 303 redirect to the Thank you page. That way, if the user
hits the back arrow, he's taken back to the form URL, not the post
URL. (which would then warn him about re
looks like this:
if ( $_POST )
{
// do POST processing
header(303 thankyou.html).
exit
}
// regular page starts here
// process GET (if any)
// database stuff
// display page.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
Aschwin Wesselius wrote:
Per Jessen wrote:
I'm having difficulties following you - a plain 303 redirect to a Thank
you page shouldn't cause all of that. It's an HTTP reply with the 303
and the new URL, followed by a single URL request from the browser.
OK. I think I know how other
Per Jessen wrote:
My typical setup for a form-page probably looks like this:
if ( $_POST )
{
// do POST processing
header(303 thankyou.html).
exit
}
If I wanted the user back on the same form page, but still with a thank
you message, I'd still do a 303, but use
under a different URI and
SHOULD be retrieved using a GET method on that resource. This method
exists primarily to allow the output of a POST-activated script to
redirect the user agent to a selected resource.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
requests. I see lots of conditional
GETs instead.
BTW, why does the browser do this for objects it has already cached?
(assuming they're fresh/not expired)
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Stut wrote:
On 19 Mar 2008, at 09:54, Per Jessen wrote:
BTW, why does the browser do this for objects it has already cached?
(assuming they're fresh/not expired)
Because by default most web servers don't add expiry headers, so it's
up to the browser.
My server does add expire headers
to bounce etc.
I'll just deal with this separately.
Is there a better way than simply sending a test email to see if it
bounces?
Do an MX lookup on the domain, maybe attempt a brief connection to it.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
number world does not have the same rule set.
Actually, it has no rules.
Has anybody built, heard of, or used a tool like this?
Hi Jim - it sounds like a plain database to me, but surely you've got
one of those already.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net
, everything else attributes of the number.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Joey wrote:
OK now, getting greedy I want to take it to another level. Instead of
having to read the folder for images every time, why not read the
image names into a file so that we can maintain therbey caching the
list.
Your filesystem cache will do that for you anyway.
/Per Jessen
manual and I appear to be using preg_replace correctly.
From the manual:
replacement may contain references of the form \\n or (since PHP
4.0.4) $n, with the latter form being the preferred one
If you use $amount ='\$524.00' instead of '$524.00', it'll work.
/Per Jessen, Zürich
--
PHP General
have if i want to limit this
function...
can i disable the function only for some users?
may be i can set a rate limit for it?
Check your mail-server config - rate limits and such are probably best
done there.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net
binary.
Pardon me, but that's one kludgy idea - postfix has rate-limitation
facilities you can use for this.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
vester_s wrote:
Hi,
Can anybody tell me how can php connect to NNTP to get the list of all
users in the newsgroups?
I'm not sure about getting all the users, but you could create a
connection using plain socket programming. NNTP is a pretty simple
protocol.
/Per Jessen, Zürich
.
Actually, I have no idea what the potential dangers are.
Using up all available memory is the only real risk. It might lead to
swapping which in turn will most likely increase response times.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Georgios Kasapoglou wrote:
Hi all,
I'm new to the list.
I'm running on Apache 2 and I want to use the mod_auth_basic module,
which authenticates the user.
But I need the username to use it in my php script. How can I?
$_SERVER[] might have it.
/Per Jessen, Zürich
--
PHP General Mailing
Daniel Brown wrote:
On Wed, Apr 16, 2008 at 6:07 AM, Per Jessen [EMAIL PROTECTED] wrote:
Actually, I have no idea what the potential dangers are.
Using up all available memory is the only real risk. It might
lead to swapping which in turn will most likely increase response
times
Daniel Brown wrote:
On Wed, Apr 16, 2008 at 9:57 AM, Per Jessen [EMAIL PROTECTED] wrote:
Daniel Brown wrote:
And on a shared host, the likelihood of increased billing for
overuse of memory.
Except a shared hoster would probably not permit anyone to change
php.ini :-)
I
Daniel Brown wrote:
On Wed, Apr 16, 2008 at 10:36 AM, Per Jessen [EMAIL PROTECTED] wrote:
I'm curious - why? To me php.ini seems to be exactly the kind of
thing you wouldn't the user to fiddle with - in a shared
environment.
To allow flexibility for the user, and give them
newsreader, you'll no doubt find a place to
tick authentication required and to enter userid and password.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Daniel Brown wrote:
On Wed, Apr 16, 2008 at 2:42 PM, Per Jessen [EMAIL PROTECTED] wrote:
If required, authentication is done via NNTP. The nntp servers can
be set up to require authentication for some or more groups, for
instance for closed user communities.
If you check your
.
So is it possible for getting those list?
You can always check the news-server logfiles. I think that's probably
the best place to get some user/usage information.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
by the browser
if an http header with a Content-Type has already been sent. If you
bring up the page in Firefox, and hit Ctrl-I, I'll bet it says the page
is being displayed in ISO-8859-1 (well, not UTF8 at least).
I would check the default_charset setting in php.ini.
/Per Jessen, Zürich
--
PHP
work.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
with the default_charset setting in php.ini.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
prefer it in
the virtual host config personally :)
Ah yes, that's what I meant of course. (I actually do everything in
UTF8 anyway).
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lots of timeouts.
My new daemon takes up less than 10% CPU under the same load and I've
not seen a timeout yet.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
or twice a year, it probably wouldn't
matter if it ran or month or two.
Personally, I rewrite in C when my PHP (or other script language) script
exceeds a thousand lines.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
algorithm w/o external dependencies, such as db calls, or
calls to remote systems will run faster in java / c / c++ and others
than it will in php.
An algorithm doesn't have external dependencies - but implementations
might.
/Per Jessen, Zürich
--
PHP General Mailing List (http
, but bubblesort might be one
such example.
Also true. Quick sort is such an example - in general it does really
well, but for certain data sets, it doesn't.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the data from the table, put it into a mail() command and mail.
Why not just send the notification at the time of the event? (I assume
you update the database at the time of the event).
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
disagreeing about the meaning of algorithm - an
algorithm does not have an absolute performance until it's been
implemented - in some of other language and machine.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jeffrey wrote:
Per Jessen wrote:
Jeffrey wrote:
I'm working on an application that includes e-mail notifications of
certain events. Because the application will have hundreds or
thousands of users, I've designed it so that e-mail notifications
are saved to a MySQL table. Then a regular
Børge Holen wrote:
Is the MTA operational on the server? if so, forget
mailing with php and rather use php to access the mta.
Yeah, that is what mail() does - it calls sendmail.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
for handling a large amount of XML data?
xalan.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
character?
Your #65533; didn't display properly at all - I tried ISO-8859-1 and
UTF8.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Angelo Zanetti wrote:
Your #65533; didn't display properly at all - I tried ISO-8859-1 and
UTF8.
/Per Jessen, Zürich
Hi Per thats the problem I am having, this is how data from a project
I inherited is saved in the DB and I cant get it to show.
Hi Angelo
what's the charset of your
script under apache, but with an appropriate userid in
cli mode. If you need the results presented by apache, maybe think of
using suexec().
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
is of zero
concern to me.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Al wrote:
Anyone enlighten me about sending SMS text messages via sendmail or or
just php mail()?
I've been Googling, etc. and everything I've found so far, comes up
with for-fee services.
See smsclient. We've been using that for three or four years.
/Per Jessen, Zürich
--
PHP General
smsclient.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
jeroen vannevel wrote:
have a look at www.speedzor.com/woopsie.php, and please tell me where
my problem is. i'm stuck at this for hours by now :p
thanks in advance,
jeroen
And the problem is? Your page looks fine to me.
/Per Jessen, Zürich
--
PHP General Mailing List (http
daemon?
Restarting sendmail has no effect on these scripts. Restarting the
scripts makes them run like hell for some hours, until the problem
rises again.
So, if there is no loop in your script, what _does_ it contain?
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net
for the last part, any XML parser will do. Sablotron, xalan,
libxsl etc.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
comment from
Richie in the PHP manual) the transliteration somewhat wrong.
With the kind of rough conversion/transformation you're doing, is the
locale really very important anyway?
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
a quick database update to set
a status for such bounces.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
header I can
use.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Robin Vickery wrote:
2008/5/14 Per Jessen [EMAIL PROTECTED]:
The issue is - I'd like this page to appear to be as real time as
possible, and the occasional delay caused by the conditional get is
a nuisance. My images are clearly cached, so how do I prevent
Firefox from doing
in
this way?
It's easily tested. Just generate a script with 1 calls to the
mail() function (send to [EMAIL PROTECTED] with N = random
number). If that goes through without slowing down, mail() and your
sendmail daemon are not to blame.
/Per Jessen, Zürich
--
PHP General Mailing List
almost certainly update that.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Al wrote:
Make certain your steam is compressed
http://www.whatsmyip.org/mod_gzip_test/
The files I was having the problem with are GIFs, so already LZW
compressed.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
René Leboeuf wrote:
Per Jessen a écrit :
René Leboeuf wrote:
The user sending emails is trusted by sendmail, and the sending
program is located on the sendmail machine.
No need to use SMTP then. You should just be calling sendmail to
drop
the emails into the queue. And that should
Al wrote:
Per Jessen wrote:
Al wrote:
Make certain your steam is compressed
http://www.whatsmyip.org/mod_gzip_test/
The files I was having the problem with are GIFs, so already LZW
compressed.
Try by not LZW compressing and the use ob_start() and flush() so your
files are gzip
301 - 400 of 1018 matches
Mail list logo