php-general Digest 19 Dec 2006 17:27:13 -0000 Issue 4523
Topics (messages 245996 through 246030):
Re: ECHO
245996 by: Casey Chu
245997 by: Fahad Pervaiz
245998 by: Casey Chu
245999 by: Fahad Pervaiz
246003 by: Chris
246006 by: Paul Novitski
246011 by: Jochem Maas
246015 by: Satyam
246016 by: Fahad Pervaiz
heredoc
246000 by: clr
246004 by: Chris
246005 by: Paul Novitski
246008 by: Casey Chu
246012 by: Jochem Maas
Re: Search Results Accuracy
246001 by: zoticaic
246007 by: Roman Neuhauser
246010 by: zoticaic
Re: DOMDocument Size limit
246002 by: Chris W
246009 by: Jochem Maas
246014 by: Bernhard Zwischenbrugger
Re: How php works?
246013 by: Robert Cummings
246024 by: Larry Garfield
246025 by: Rory Browne
246026 by: Kristen G. Thorson
246027 by: Robert Cummings
Which PHP-script crashes my server?
246017 by: Philipp Schwarz
246018 by: Vincent DUPONT
246019 by: Philipp Schwarz
246020 by: Jochem Maas
246021 by: Patrik Jansson
246022 by: dave
R: Re: [PHP] Which PHP-script crashes my server?
246023 by: David Restall - System Administrator
Video question
246028 by: John Messam
246029 by: Roman Neuhauser
246030 by: Jochem Maas
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:
php-general@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Why do you need to change its functionality?
On 12/18/06, Fahad Pervaiz <[EMAIL PROTECTED]> wrote:
ECHO is a language construct but still is there any work around to override
it or change its functionality???
--- End Message ---
--- Begin Message ---
I have written a framework for internationalization. Now i have incoorperate
it into and existing system that is huge and it will take alot of time to
change ECHO to a function call, so i want to override its implementation so
that i can use it for my own purposes with having to change all the echo
calls
--
Regards
Fahad Pervaiz
www.ecommerce-xperts.com
--- End Message ---
--- Begin Message ---
You could try to manipulate what the echo's output by ob_start(), etc.
Or maybe you could change the standard output?
On 12/18/06, Fahad Pervaiz <[EMAIL PROTECTED]> wrote:
I have written a framework for internationalization. Now i have incoorperate
it into and existing system that is huge and it will take alot of time to
change ECHO to a function call, so i want to override its implementation so
that i can use it for my own purposes with having to change all the echo
calls
--
Regards
Fahad Pervaiz
www.ecommerce-xperts.com
--- End Message ---
--- Begin Message ---
Manipulating out with Output Control Functions sounds a good idea but it can
become cumbersome.
Do you know any good methods to control standard output??
On 12/19/06, Casey Chu <[EMAIL PROTECTED]> wrote:
You could try to manipulate what the echo's output by ob_start(), etc.
Or maybe you could change the standard output?
On 12/18/06, Fahad Pervaiz <[EMAIL PROTECTED]> wrote:
> I have written a framework for internationalization. Now i have
incoorperate
> it into and existing system that is huge and it will take alot of time
to
> change ECHO to a function call, so i want to override its implementation
so
> that i can use it for my own purposes with having to change all the echo
> calls
>
> --
> Regards
> Fahad Pervaiz
> www.ecommerce-xperts.com
>
>
--
Regards
Fahad Pervaiz
www.ecommerce-xperts.com
--- End Message ---
--- Begin Message ---
Fahad Pervaiz wrote:
ECHO is a language construct but still is there any work around to override
it or change its functionality???
Nope. You're stuck with how it works now.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
On 12/18/06, Fahad Pervaiz <[EMAIL PROTECTED]> wrote:
I have written a framework for internationalization. Now i have incoorperate
it into and existing system that is huge and it will take alot of time to
change ECHO to a function call, so i want to override its implementation so
that i can use it for my own purposes with having to change all the echo
calls
At 12/18/2006 10:01 PM, Casey Chu wrote:
You could try to manipulate what the echo's output by ob_start(), etc.
Or maybe you could change the standard output?
Given the probably unalterable nature of echo, I'd say Casey's
suggestion of buffering output and running it through a
post-processor is an excellent one. However my first choice would
probably be to bite the bullet and globally replace echo with my own
function. Once that painful step is taken, you can modify the output
methodology to your heart's content.
This sounds like an excellent object lesson in the separation of
logic from markup. If you design your applications to first figure
out what to output and then to output it as one or more solid lumps,
you can more easily tweak the logic or the markup or the output
method without messing with the others. It can be hard medicine to
swallow the first time, but it will make you a leaner & cleaner coder.
Regards,
Paul
--- End Message ---
--- Begin Message ---
Fahad Pervaiz wrote:
> ECHO is a language construct but still is there any work around to override
> it or change its functionality???
if your willing to hack the php source then you can pretty much do whatever you
want;
that said there is no mechanism for overriding echo or any other language
construct in
the std php...
there is runkit (http://php.net/runkit) but that doesn't seem to offer language
construct
overriding based on a quick glance.
>
--- End Message ---
--- Begin Message ---
You could use the PHP Compiler: http://phpcompiler.org/ and do a
preprocessor as I did: http://www.satyam.com.ar/pht/.
PHC is capable of compiling a PHP source and return a modified PHP source.
It is easy to make a plugin for any such modifications, there is a class
which gets instantiated after parsing and makes a full tree traversal with a
method defined for each node type so you simply inherit from the method for
your particular tree node and make any modifications you want to it.
For PHC echo is not a language construct, you would have to override the
"method invocation" method, check whether the function name is "echo" (print
is translated to echo) and then do your changes. One of the tutorials
shows you how to do this: http://phpcompiler.org/doc/tutorial2.html
Satyam
----- Original Message -----
From: "Fahad Pervaiz" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Tuesday, December 19, 2006 6:46 AM
Subject: [PHP] Re: ECHO
I have written a framework for internationalization. Now i have
incoorperate
it into and existing system that is huge and it will take alot of time to
change ECHO to a function call, so i want to override its implementation
so
that i can use it for my own purposes with having to change all the echo
calls
--
Regards
Fahad Pervaiz
www.ecommerce-xperts.com
--- End Message ---
--- Begin Message ---
Thank you Satyam for you help! i think this is the rite solution
On 12/19/06, Satyam <[EMAIL PROTECTED]> wrote:
You could use the PHP Compiler: http://phpcompiler.org/ and do a
preprocessor as I did: http://www.satyam.com.ar/pht/.
PHC is capable of compiling a PHP source and return a modified PHP source.
It is easy to make a plugin for any such modifications, there is a class
which gets instantiated after parsing and makes a full tree traversal with
a
method defined for each node type so you simply inherit from the method
for
your particular tree node and make any modifications you want to it.
For PHC echo is not a language construct, you would have to override the
"method invocation" method, check whether the function name is "echo"
(print
is translated to echo) and then do your changes. One of the tutorials
shows you how to do this: http://phpcompiler.org/doc/tutorial2.html
Satyam
----- Original Message -----
From: "Fahad Pervaiz" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Tuesday, December 19, 2006 6:46 AM
Subject: [PHP] Re: ECHO
>I have written a framework for internationalization. Now i have
>incoorperate
> it into and existing system that is huge and it will take alot of time
to
> change ECHO to a function call, so i want to override its implementation
> so
> that i can use it for my own purposes with having to change all the echo
> calls
>
> --
> Regards
> Fahad Pervaiz
> www.ecommerce-xperts.com
>
--
Regards
Fahad Pervaiz
www.ecommerce-xperts.com
--- End Message ---
--- Begin Message ---
Please can someone advise me on heredoc and its shortcommings,
I am designing a complex site and elected to use DIV's as opposed to
frames.
Heredoc seems to be ideal in that I can do all processing first and
then layout with relative ease.
I was wondering if it was acceptable to use and maintain going forward
as i have read on a few mailing archives
that this is a "cheat" and lazy and to be depreciated??
Thanks
Colin
--- End Message ---
--- Begin Message ---
clr wrote:
Please can someone advise me on heredoc and its shortcommings,
I am designing a complex site and elected to use DIV's as opposed to
frames.
Heredoc seems to be ideal in that I can do all processing first and then
layout with relative ease.
I was wondering if it was acceptable to use and maintain going forward
as i have read on a few mailing archives
that this is a "cheat" and lazy and to be depreciated??
I think it comes down to personal preference. Some people use it and
like, some don't. If you want to use it, do it. It's just "another
option" to consider..
I don't think it's going to be removed any time soon (I'm sure there
would be plenty of upset people & plenty of broken applications if it
was removed).
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
At 12/18/2006 10:14 PM, clr wrote:
Please can someone advise me on heredoc and its shortcommings,
I am designing a complex site and elected to use DIV's as opposed to frames.
Heredoc seems to be ideal in that I can do all processing first and
then layout with relative ease.
I was wondering if it was acceptable to use and maintain going
forward as i have read on a few mailing archives
that this is a "cheat" and lazy and to be depreciated??
Yikes! Then a scoundrel I must be indeed. I love using heredoc,
primarily because it lets me compose blocks of pure output text
without interrupting it with control structures, nested quotes, and
concatenation syntax, even when it contains nested variables. It
helps me to separate logic from markup, something that benefits my
code (if not my character!).
I imagine you'll hear from others whose sensibilities are offended by
heredoc -- in particular those whose careful indentation it spoils --
so I wanted to make sure you knew that it had an (admittedly cheating
and lazy yet) ardent supporter as well.
I don't know whom, in programming, you can cheat other than yourself;
I've been suffering under the misapprehension that laziness is a
virtue because it teaches efficiency; but I really hadn't heard that
heredoc was going to be deprecated. If it is then it will be my loss
and the gain of those who earn royalties from the use of quotation
marks and periods and who make their living pulling the tangled and
bloody fragments of logic and markup from the wreckage of their collision.
Regards,
Paul
--- End Message ---
--- Begin Message ---
I usually use an include rather than a heredoc.
On 12/18/06, Paul Novitski <[EMAIL PROTECTED]> wrote:
At 12/18/2006 10:14 PM, clr wrote:
>Please can someone advise me on heredoc and its shortcommings,
>
>I am designing a complex site and elected to use DIV's as opposed to frames.
>Heredoc seems to be ideal in that I can do all processing first and
>then layout with relative ease.
>
>I was wondering if it was acceptable to use and maintain going
>forward as i have read on a few mailing archives
>that this is a "cheat" and lazy and to be depreciated??
Yikes! Then a scoundrel I must be indeed. I love using heredoc,
primarily because it lets me compose blocks of pure output text
without interrupting it with control structures, nested quotes, and
concatenation syntax, even when it contains nested variables. It
helps me to separate logic from markup, something that benefits my
code (if not my character!).
I imagine you'll hear from others whose sensibilities are offended by
heredoc -- in particular those whose careful indentation it spoils --
so I wanted to make sure you knew that it had an (admittedly cheating
and lazy yet) ardent supporter as well.
I don't know whom, in programming, you can cheat other than yourself;
I've been suffering under the misapprehension that laziness is a
virtue because it teaches efficiency; but I really hadn't heard that
heredoc was going to be deprecated. If it is then it will be my loss
and the gain of those who earn royalties from the use of quotation
marks and periods and who make their living pulling the tangled and
bloody fragments of logic and markup from the wreckage of their collision.
Regards,
Paul
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
clr wrote:
> Please can someone advise me on heredoc and its shortcommings,
>
> I am designing a complex site and elected to use DIV's as opposed to
> frames.
> Heredoc seems to be ideal in that I can do all processing first and then
> layout with relative ease.
I would say go right ahead and use it...
>
> I was wondering if it was acceptable to use and maintain going forward
> as i have read on a few mailing archives
> that this is a "cheat" and lazy and to be depreciated??
you have been misled - heredoc is not scheduled to be depreciated, it's
valid and useful tool (Paul N. offered you some of it's pro's) - my only gripe
about
heredoc is that most of my editors can't handle it in terms of syntax highlight
:-)
>
>
> Thanks
> Colin
>
--- End Message ---
--- Begin Message ---
Hi,
I'm not really sure which is the best path to go but let me give you an example
scenario :
1. We already have a database of varchar data :
+-------------------------------------------+
| links |
+-------------------------------------------+
| 340-golfers-dream-and-swimmers|
+-------------------------------------------+
| 89-golfers-dream |
+-------------------------------------------+
| 45-golf-equipments |
+-------------------------------------------+
| 3-best-golf-training |
+-------------------------------------------+
| 0-golf-equipment-and-training |
+-------------------------------------------+
| 39-golf-training |
+-------------------------------------------+
2. From data above if we search the database for '%golf%' it would return all
rows as results, if we search for '%golf%training%' it would return three rows .
How do I choose from the multiple results? For the '%golf%' query, the desired
result is golf-equipments or golf-training, while for '%golf%training%' the
desired result should be 39-golf-training alone . This is sort of like search
engine ranking their results, but for this how do I set the criteria using MySQL
queries or if not possible using PHP .
I hope it makes it more clear, questions are welcomed.
TIA
Jervin
--
> Outsource Now | GetAFreelancer
<http://www.getafreelancer.com/affiliates/shockx/>
_____
From: Shafiq Rehman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 19, 2006 2:07 PM
To: zoticaic
Subject: Re: [PHP] Search Results Accuracy
Hello,
Your question is not very clear, please elaborate it.
btw, Are you talking about the fulltext search?
--
Shafiq Rehman
Sr. Web Engineer
http://www.phpgurru.com <http://www.phpgurru.com>
On 12/19/06, zoticaic <[EMAIL PROTECTED]> wrote:
Hello,
I'm just wondering, from a list of search results from a database query, how do
we trim down and return the most accurate one?
Hints, links and suggestions are most welcome.
TIA
Jervin
--
> Outsource Now | GetAFreelancer
<http://www.getafreelancer.com/affiliates/shockx/>
--- End Message ---
--- Begin Message ---
# [EMAIL PROTECTED] / 2006-12-19 09:33:02 +0800:
> Hello,
>
>
>
> I'm just wondering, from a list of search results from a database query, how
> do
> we trim down and return the most accurate one?
>
>
>
> Hints, links and suggestions are most welcome.
is this what you're looking for?
http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
--
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.org/?255991
--- End Message ---
--- Begin Message ---
Thanks,
All I needed was that to get started with.
Regards
jervin
--
> Outsource Now | GetAFreelancer
<http://www.getafreelancer.com/affiliates/shockx/>
_____
From: Shafiq Rehman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 19, 2006 2:41 PM
To: zoticaic
Subject: Re: [PHP] Search Results Accuracy
Hello,
In searching, "like" queries are not recommended because these are the most
slowest queries. You must use full text searching. It will rocks your search
speed and suits your scenario. Here is an article for fulltext searching
http://www.onlamp.com/pub/a/onlamp/2003/06/26/fulltext.html
--
Shafiq Rehman
Sr. Web Engineer
http://www.phpgurru.com
On 12/19/06, zoticaic <[EMAIL PROTECTED]> wrote:
Hi,
I'm not really sure which is the best path to go but let me give you an example
scenario :
1. We already have a database of varchar data :
+-------------------------------------------+
| links |
+-------------------------------------------+
| 340-golfers-dream-and-swimmers|
+-------------------------------------------+
| 89-golfers-dream |
+-------------------------------------------+
| 45-golf-equipments |
+-------------------------------------------+
| 3-best-golf-training |
+-------------------------------------------+
| 0-golf-equipment-and-training |
+-------------------------------------------+
| 39-golf-training |
+-------------------------------------------+
2. From data above if we search the database for '%golf%' it would return all
rows as results, if we search for '%golf%training%' it would return three rows .
How do I choose from the multiple results? For the '%golf%' query, the desired
result is golf-equipments or golf-training, while for '%golf%training%' the
desired result should be 39-golf-training alone . This is sort of like search
engine ranking their results, but for this how do I set the criteria using MySQL
queries or if not possible using PHP .
I hope it makes it more clear, questions are welcomed.
TIA
Jervin
--
> Outsource Now | GetAFreelancer
<http://www.getafreelancer.com/affiliates/shockx/>
_____
From: Shafiq Rehman [mailto: [EMAIL PROTECTED]
Sent: Tuesday, December 19, 2006 2:07 PM
To: zoticaic
Subject: Re: [PHP] Search Results Accuracy
Hello,
Your question is not very clear, please elaborate it.
btw, Are you talking about the fulltext search?
--
Shafiq Rehman
Sr. Web Engineer
http://www.phpgurru.com <http://www.phpgurru.com>
On 12/19/06, zoticaic <[EMAIL PROTECTED]> wrote:
Hello,
I'm just wondering, from a list of search results from a database query, how do
we trim down and return the most accurate one?
Hints, links and suggestions are most welcome.
TIA
Jervin
--
> Outsource Now | GetAFreelancer
<http://www.getafreelancer.com/affiliates/shockx/>
--- End Message ---
--- Begin Message ---
Jochem Maas wrote:
what version of php? what version of libxml?
php: 5.2.0
libxml: 2.6.26
is the limit actually 4096 bytes per chance? (that seems more likely)
the limit is probably 4096 but I think it may be due to the length of
tags and other things not just the value.
what happens when you create the element with an empty value then use
something like this?:
$el = $foo->createElement($name, '');
$el->nodeValue = $yourBigString;
Same thing happened there
also are you able to use $foo->createElementNS() ? does that suffer from the
same limit?
I'm not familiar enough with the how this dom works to make that
modification. I didn't write this code I'm just trying to fix it.
could it be a problem with the actual contents of your $value variable?
what does it contain? (especially around the 4K bytes mark)
the variable contains htmlspecialchars encoded html. The next character
after it stops is either a space or a period.
I tried in vain to find something in the php source that might
point to your problem.. that's not to say there is nothing there, it's just my
skills/understanding aren't up to the job.
I looked for something in the php.ini file but the only thing I found
was output_buffering = 4096 and that doesn't seem like it would be a
problem.
--
Chris W
KE5GIX
"Protect your digital freedom and privacy, eliminate DRM,
learn more at http://www.defectivebydesign.org/what_is_drm"
Gift Giving Made Easy
Get the gifts you want &
give the gifts they want
One stop wish list for any gift,
from anywhere, for any occasion!
http://thewishzone.com
--- End Message ---
--- Begin Message ---
Chris W wrote:
> Jochem Maas wrote:
>> what version of php? what version of libxml?
>>
> php: 5.2.0
> libxml: 2.6.26
nothing wrong there I believe, although I haven't yet played with php5.2 myself
>> is the limit actually 4096 bytes per chance? (that seems more likely)
>
> the limit is probably 4096 but I think it may be due to the length of
> tags and other things not just the value.
>> what happens when you create the element with an empty value then use
>> something like this?:
>>
>> $el = $foo->createElement($name, '');
>> $el->nodeValue = $yourBigString;
>>
>
> Same thing happened there
>> also are you able to use $foo->createElementNS() ? does that suffer
>> from the same limit?
>>
>>
>
> I'm not familiar enough with the how this dom works to make that
> modification. I didn't write this code I'm just trying to fix it.
>
>
>> could it be a problem with the actual contents of your $value variable?
>> what does it contain? (especially around the 4K bytes mark)
>>
>
> the variable contains htmlspecialchars encoded html. The next character
this last comment leads me to believe that the data in $value (your html)
should be contained in a CDATA node, in which case you should be
using the following to create a the CDATA node and add $value to that, after
which you can add the CDATA node to the node your are currently trying to
add $value to:
http://php.net/manual/en/function.dom-domdocument-createcdatasection.php
> after it stops is either a space or a period.
>> I tried in vain to find something in the php source that might
>> point to your problem.. that's not to say there is nothing there, it's
>> just my
>> skills/understanding aren't up to the job.
>>
>>
> I looked for something in the php.ini file but the only thing I found
> was output_buffering = 4096 and that doesn't seem like it would be a
> problem.
agreed - but in the spirit of Murphy it's worth setting it to something
bigger to see if it has affect.
>
--- End Message ---
--- Begin Message ---
Hi
> When calling |->createElement($name, $value) My content is truncated to
> around 4k. If what is in $value is less than 4000 bytes then it works
> fine but if it is more, the data is truncated. Is there a setting I
> don't know about that will change that limit? I need it to be more like
> 100k or maybe even more.|
I can't see a 4k limit.
Here an example:
http://lamp2.fh-stpoelten.ac.at/%7Elbz/beispiele/ws2006/support/test.php
http://lamp2.fh-stpoelten.ac.at/%
7Elbz/beispiele/ws2006/support/test.phps
Maybe you use GET Variables, GET Variables are limited to 4k
Bernhard
--- End Message ---
--- Begin Message ---
On Mon, 2006-12-18 at 19:42 -0600, Larry Garfield wrote:
> On Monday 18 December 2006 15:20, Richard Lynch wrote:
>
> > Put it this way: In 2000, if somebody wanted to embed the ZE in a
> > commercial product, Zend was planning on charging for it. I dunno
> > what their license for the ZE reads like today, and I wasn't
> > authorized to speak on this topic for them then, much less now.
>
> Is that why the PHP License is non-GPL compatible, or is there a different
> reason for that? (That's always bugged me, personally.)
PHP and license has less restrictions... it is not viral. You can for
the most part do as you please with the code.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
On Tuesday 19 December 2006 02:12, Robert Cummings wrote:
> > Is that why the PHP License is non-GPL compatible, or is there a
> > different reason for that? (That's always bugged me, personally.)
>
> PHP and license has less restrictions... it is not viral. You can for
> the most part do as you please with the code.
That's nice. It's also not what I asked. I asked what it was that made it
GPL-incompatible.
--
Larry Garfield AIM: LOLG42
[EMAIL PROTECTED] ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
--- End Message ---
--- Begin Message ---
That's nice. It's also not what I asked. I asked what it was that made it
GPL-incompatible.
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes PHP software, freely available from
<http://www.php.net/software/>".
I don't remember why, but this is incompatable with the GPL. IIRC,
it's the difference that makes the modified BSD Licence GPL
Compatable, and the Original BSD Licence Incompatable.
It's a practical problem if there are many such acknowlegment.
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Larry Garfield [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 19, 2006 10:26 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] How php works?
>
> On Tuesday 19 December 2006 02:12, Robert Cummings wrote:
>
> > > Is that why the PHP License is non-GPL compatible, or is there a
> > > different reason for that? (That's always bugged me, personally.)
> >
> > PHP and license has less restrictions... it is not viral. You can
for
> > the most part do as you please with the code.
>
> That's nice. It's also not what I asked. I asked what it was that
made
> it
> GPL-incompatible.
He did answer the question. The PHP License doesn't enforce many
restrictions on what you can do with the code. For example, you could
modify it (or not) and sell it without the source if you follow the
restrictions in the license. The GPL specifically doesn't allow that of
course, so that's why they are incompatible.
http://www.fsf.org/licensing/licenses/index_html#GPLIncompatibleLicenses
--- End Message ---
--- Begin Message ---
On Tue, 2006-12-19 at 09:25 -0600, Larry Garfield wrote:
> On Tuesday 19 December 2006 02:12, Robert Cummings wrote:
>
> > > Is that why the PHP License is non-GPL compatible, or is there a
> > > different reason for that? (That's always bugged me, personally.)
> >
> > PHP and license has less restrictions... it is not viral. You can for
> > the most part do as you please with the code.
>
> That's nice. It's also not what I asked. I asked what it was that made it
> GPL-incompatible.
The answer lies in what I wrote. If you add GPL code to PHP then PHP
code can no longer be used in distributed closed source solutions. GPL
is viral, and it would choke that aspect of PHP's freedom.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
Hi guys,
I have a problem with my webserver. It is a server for me and some web
projekts of my friends. And there is one PHP script which kills the
whole server, but I do not know which one it is. When the server is
going down one apache process uses 99% CPU and memory. In this case I
can only reboot the server.
I would look up the file in the apache logs, but the script is started
some minutes before the server goes down and there are some hundred
requests per minute.
Can anyone help me?
Thank you!
--- End Message ---
--- Begin Message ---
hello, could you tell us more about our webserver?
Linux or windows?
vincent
-----Original Message-----
From: Philipp Schwarz [mailto:[EMAIL PROTECTED]
Sent: Tue 19/12/2006 14:05
To: php-general@lists.php.net
Subject: [PHP] Which PHP-script crashes my server?
Hi guys,
I have a problem with my webserver. It is a server for me and some web
projekts of my friends. And there is one PHP script which kills the
whole server, but I do not know which one it is. When the server is
going down one apache process uses 99% CPU and memory. In this case I
can only reboot the server.
I would look up the file in the apache logs, but the script is started
some minutes before the server goes down and there are some hundred
requests per minute.
Can anyone help me?
Thank you!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Linux, of course. :-)
It is a Gentoo server with Confixx Pro on it. The PHP safe mode is
disabled for some accounts, so it is clear that problems like this
happen. But I can not enable it because of several scripts.
Thats all I know. I dit not setup the server. If you need some special
information, tell me which one.
Vincent DUPONT schrieb:
hello, could you tell us more about our webserver?
Linux or windows?
vincent
--- End Message ---
--- Begin Message ---
Philipp Schwarz wrote:
> Linux, of course. :-)
> It is a Gentoo server with Confixx Pro on it. The PHP safe mode is
> disabled for some accounts, so it is clear that problems like this
> happen. But I can not enable it because of several scripts.
what has safe_mode (which fails miserably in being safe btw) have to
do with some stupid script that contains an infinite loop?
sounds to me like you are going to have read through lots of
logs and/or use trial and error to determine which scrip is causing the
problem (maybe use wget to hit each site in turn and see what happens?)
>
> Thats all I know. I dit not setup the server. If you need some special
> information, tell me which one.
>
> Vincent DUPONT schrieb:
>> hello, could you tell us more about our webserver?
>> Linux or windows?
>> vincent
>>
>>
>
--- End Message ---
--- Begin Message ---
Hi,
You could enable server-status in Apache configuration then you should
be able to wget server status
each minute (30 seconds?) by a cron-job. When the server is going down,
check that particular file. You
might want the cron-job to store each result in a new file so the cron
job doesn't overwrite the file when the
server is up again. Just an idea...
-Patrik
Philipp Schwarz skrev:
Hi guys,
I have a problem with my webserver. It is a server for me and some web
projekts of my friends. And there is one PHP script which kills the
whole server, but I do not know which one it is. When the server is
going down one apache process uses 99% CPU and memory. In this case I
can only reboot the server.
I would look up the file in the apache logs, but the script is started
some minutes before the server goes down and there are some hundred
requests per minute.
Can anyone help me?
Thank you!
--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hi, you should check your php script for infinite loops, this is a
common problem in this cases.
Patrik Jansson wrote:
> Hi,
> You could enable server-status in Apache configuration then you should
> be able to wget server status
> each minute (30 seconds?) by a cron-job. When the server is going down,
> check that particular file. You
> might want the cron-job to store each result in a new file so the cron
> job doesn't overwrite the file when the
> server is up again. Just an idea...
>
> -Patrik
>
> Philipp Schwarz skrev:
>> Hi guys,
>>
>> I have a problem with my webserver. It is a server for me and some web
>> projekts of my friends. And there is one PHP script which kills the
>> whole server, but I do not know which one it is. When the server is
>> going down one apache process uses 99% CPU and memory. In this case I
>> can only reboot the server.
>>
>> I would look up the file in the apache logs, but the script is started
>> some minutes before the server goes down and there are some hundred
>> requests per minute.
>>
>> Can anyone help me?
>>
>> Thank you!
>>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFh//4GPhC6XW20oARAibSAJ9bNH+g8Uwi63gR0TQRNbiGFLo+hgCaAtrF
rJtxVY9pZliO2zPY18WlJJ8=
=mHxG
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
Hi Phil,
> Linux, of course. :-)
> It is a Gentoo server with Confixx Pro on it. The PHP safe mode is
> disabled for some accounts, so it is clear that problems like this
> happen. But I can not enable it because of several scripts.
>
> Thats all I know. I dit not setup the server. If you need some special
> information, tell me which one.
It's not the answer but it may help you minimise rebooting, have you had
a look at
<http://www.php.net/manual/en/ref.info.php#ini.max-execution-time> ?
It may be set to something odd. You could use this as a starting point.
Regards,
Dave
php/general-2006-12-19.tx php-general [EMAIL PROTECTED]
+----------------------------------------------------------------------------+
| Dave Restall, Computer Nerd, Cyclist, Radio Amateur G4 FCU, Bodger |
| Mob +44 (0) 7973 831245 Skype: dave.restall Radio: G4 FCU |
| email : [EMAIL PROTECTED] Web : Not Ready Yet :-( |
+----------------------------------------------------------------------------+
| "Spare no expense to save money on this one." |
| -- Samuel Goldwyn |
+----------------------------------------------------------------------------+
--- End Message ---
--- Begin Message ---
How do I display video on my php page and prevent the video from being
downloaded.
--- End Message ---
--- Begin Message ---
# [EMAIL PROTECTED] / 2006-12-19 11:08:26 -0500:
> How do I display video on my php page and prevent the video from being
> downloaded.
You cannot.
--
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.org/?255991
--- End Message ---
--- Begin Message ---
John Messam wrote:
> How do I display video on my php page and prevent the video from being
> downloaded.
if you want to display something/anything it needs to be
downloaded to the client (browser) ... this is rather fundamental.
if your actually looking for some kind of DRM solution then your
probably on the wrong list (my guess being the majority is against DRM on
principle, can anyone say 'Rosetta Stone'?)
on the other hand you may be looking to stop people grabbing your
media files directly - i.e. only allow users to view the file by means
of your pages, in this case you need to employ some kind of token system
in combination with session management and hide your media files behind a
scripts
that only outputs the requested file stream if the a suitable session token
exists .... making something like this is doable but you'll have a hard to time
to truely make it robust/secure (if it is at all possible).
the question remains really, what do you want to do exactly? and *why*?
>
--- End Message ---