PS - I think the best ever name for a Exception class is 'Tantrum':
throw new Tantrum('Ra Ra Ra Aaaargh');
Lol.
--
Richard Heyes
HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 17th)
--
PHP General Mailing List (http://www.php.net/)
To
...
Really, for URLs that don't exist you should be showing a 404, This
way the user doesn't falsely believe that the URL is a valid one and
keep using it. By using the ErrorDocument directive like Per
suggested, you can customise it to be distinct helpful, like this:
2009/1/21 Thodoris t...@kinetix.gr:
?php
ob_start();
badFunctionThatSpitsInsteadOfReturning();
$sReturned = ob_get_contents();
ob_end_clean();
?
That's a good though thanks. Although I was aware of output buffering I used
to ignore that ob_end_clean actually exists...
You can
Richard Heyes wrote:
...
Really, for URLs that don't exist you should be showing a 404, This
way the user doesn't falsely believe that the URL is a valid one and
keep using it. By using the ErrorDocument directive like Per
suggested, you can customise it to be distinct helpful
Apache also
Another tidbit...
I am fairly new to SVN or any Version Control System. Whether its
CVS, SVN, or GIT a VCS is essential even for solo projects.
My setup is as follows, [and it seems to work pretty well]:
1. svn repo lives on dev server.
2. everything is in the trunk. I haven't touched
Like many others, you also described exactly how I work.
with one exception... php is my only choice for server side scripting
/ programming. Sure there are others, perhaps better for some things,
languages, but I am sticking with PHP through snow, mud, earthquakes,
tsunamis, and solar
derby wrote:
Our dev team is using eclipse-pdt and subclipse plugin which
integrates eclipse and subversion.
Subversion or any VCS is essential. After 15 years of using
FTP/SFTP/SCP, SVN has replaced it for all my web projects.
you can get the RSE plugin for eclipse-pdt as well; I'd really
Hi there,
Someone know if can (if possible, how) i create a $var on my script like this:
function createvar($var) {
$var = 'foo';
global $var;
//or global $$var, i don't know it yet.
}
so i'd call,
createvar('myvar');
function createvar($var) {
${$var} = 'foo';
global ${$var};
//or global $$var, i don't know it yet.
}
This should work.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
No, that's not the point yet.
-Mensagem original-
De: Robert Stankiewicz [mailto:robe...@belfabriek.nl]
Enviada em: quinta-feira, 22 de janeiro de 2009 10:49
Para: Jônatas Zechim; php-general@lists.php.net
Assunto: Re: [PHP] Create $var with some function
function
Hi everybody,
I am creating an import script which is getting data out of an xml file.
Now I do have a problem with a file where 2 images are included. I need
to access the second image name, but can not find out how.
I do:
$xml = simplexml_load_file($files[$i]);
$data[pic1_base64] =
Hi,
function createvar($name, $value)
{
$GLOBALS[$name] = $value;
}
Or do it without a function:
$GLOBALS['name'] = $value;
--
Richard Heyes
HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 17th)
--
PHP General Mailing List
2009/1/22 Jan G.B. ro0ot.w...@googlemail.com
2009/1/21 Thodoris t...@kinetix.gr:
?php
ob_start();
badFunctionThatSpitsInsteadOfReturning();
$sReturned = ob_get_contents();
ob_end_clean();
?
That's a good though thanks. Although I was aware of output buffering I
used
Maybe you can itterate over the childnodes from the parent element ?
-Original Message-
From: Merlin Morgenstern [mailto:merli...@fastmail.fm]
Sent: Thursday, January 22, 2009 1:53 PM
To: php-general@lists.php.net
Subject: [SPAM] - [PHP] importing from XML-files - Der Bayes'sche Filter
2009/1/22 Török Alpár torokal...@gmail.com:
2009/1/22 Jan G.B. ro0ot.w...@googlemail.com
2009/1/21 Thodoris t...@kinetix.gr:
$sReturned = ob_get_contents();
ob_end_clean();
That's a good though thanks. Although I was aware of output buffering I
used
to ignore that ob_end_clean
At 12:35 AM +0100 1/22/09, Jochem Maas wrote:
tedd schreef:
Hey, you called me schreef and that means an end of a stroke
(Arrggg, that has all sorts of meanings). :-)
which translation service came up with that?? it is funny though :-)
http://nl.wikipedia.org/wiki/Schreef
--
Merlin Morgenstern schrieb:
Hi everybody,
I am creating an import script which is getting data out of an xml file.
Now I do have a problem with a file where 2 images are included. I need
to access the second image name, but can not find out how.
I do:
$xml = simplexml_load_file($files[$i]);
Chris wrote:
That won't tell you where a query comes from ;) Add a debug_backtrace
into the class to also pinpoint where the query was called from.
Complicated queries built on variables (or even just long queries
built over multiple lines) will be hard to find just by looking at the
mysql
Carlos Medina wrote:
Merlin Morgenstern schrieb:
Hi everybody,
I am creating an import script which is getting data out of an xml file.
Now I do have a problem with a file where 2 images are included. I
need to access the second image name, but can not find out how.
I do:
$xml =
What if the file exists, but it's kinda file to update database, like
// get request $_REQUEST
// execute sql statement to update database
// redirect to the other page, showing results?
in this case 404 approach does not mean to do correctly, so what else is
suggested?
2009/1/22 Per Jessen
I'm trying to build a prepared statment and dynamically bind the variables
to it since I use this on severaly different pages I didn't want to build a
huge bind statement hard coded on each page and then have to maintain it
every time there was a change.
I despise having to use eval() and was
Richard Heyes rich...@php.net wrote in message
news:af8726440901220050i71d99bf7m5425620f67350...@mail.gmail.com...
PS - I think the best ever name for a Exception class is 'Tantrum':
throw new Tantrum('Ra Ra Ra Aaaargh');
Lol.
--
Richard Heyes
HTML5 Graphing for Firefox,
Hi..
I fork a child process, using pcntl_exec. I see the process from the cmdline
(using pgrep 123), but I can't seem to kill the pid from the cmdline, using
kill -9 123..
Is there something that I need to implement within the php test in order for
the kill signal to be effective?
If I wait,
Merlin Morgenstern schrieb:
Carlos Medina wrote:
Merlin Morgenstern schrieb:
Hi everybody,
I am creating an import script which is getting data out of an xml file.
Now I do have a problem with a file where 2 images are included. I
need to access the second image name, but can not find out
bruce schrieb:
Hi..
I fork a child process, using pcntl_exec. I see the process from the cmdline
(using pgrep 123), but I can't seem to kill the pid from the cmdline, using
kill -9 123..
Is there something that I need to implement within the php test in order for
the kill signal to be
What if the file exists, but it's kinda file to update database, like
GET requests shouldn't really modify data.
--
Richard Heyes
HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 17th)
--
PHP General Mailing List (http://www.php.net/)
To
hi carlos..
yeah.. the pid is correct.
it appears that spawning/creating a child process using pcntl_exec(foo)
results in a child process that you can see running from the cmdline, but
that you can't kill using kill -9. php might allow some other function
within the parent app to allow the kill
Hi,
I'm attempting to install PHP 5.2.8 on CentOS 5.2 x86_64. The glibc iconv
doesn't seem to function very well, leading to a bunch of failed tests when
running 'make test' (see below). After a bit of Googling I stumbled upon
http://nl2.php.net/manual/en/intro.iconv.php which suggests to
On Thu, Jan 22, 2009 at 06:46, derby derby...@gmail.com wrote:
http://www.talkderby2me.com
Heh. I like the domain name, Derby. Welcome to the list.
--
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised
Morris wrote:
What if the file exists, but it's kinda file to update database, like
// get request $_REQUEST
// execute sql statement to update database
// redirect to the other page, showing results?
in this case 404 approach does not mean to do correctly, so what else
is suggested?
I
There are functions/settings in pcntl docs about how to listen for specific
signals.
If you don't listen for -9, maybe you don't get it.
http://php.net/manual/en/function.pcntl-signal.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hey,
I'm writing an IRC bot from scratch in PHP. I'd like to be able to
announce events, such as SVN commit notifications, through the bot.
The only way to do this that I can think of is to have the bot listen
on a socket and have the program (in this example, the SVN post-commit
hook script)
i'm pretty sure that's not the issue...
i should be able to spawn/fork any kind of external app/process... kill -9
pid, especially if done as root, should terminate the process...
i suspect that the issue has to do with zombie processes, and how
php/pnctl_exec/etc.. operates.
-Original
On Thu, Jan 22, 2009 at 8:35 AM, Frank Stanovcak
blindspot...@comcast.netwrote:
I'm trying to build a prepared statment and dynamically bind the variables
to it since I use this on severaly different pages I didn't want to build a
huge bind statement hard coded on each page and then have to
Nathan Nobbe quickshif...@gmail.com wrote in message
news:7dd2dc0b0901221048g2f089cf9s36ecb9a5b35ab...@mail.gmail.com...
On Thu, Jan 22, 2009 at 8:35 AM, Frank Stanovcak
blindspot...@comcast.netwrote:
I'm trying to build a prepared statment and dynamically bind the
variables
to it since I
bruce wrote:
Hi..
I fork a child process
If I wait, the child eventually dies.. but I'd like to be able to kill it
thoughts/pointers/comments...
thanks
yeah - stop killing children
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi...
Playing around with a test app to spawn external child processes.
I'd like to be able to spawn/fork/run am external child process, that:
-allows the child processes to run as separate independent processes (pid)
-allows the child process(es) to be terminated via cmdline (kill -9 pid)
Nathan Nobbe quickshif...@gmail.com wrote in message
news:7dd2dc0b0901221048g2f089cf9s36ecb9a5b35ab...@mail.gmail.com...
yeah, id try call_user_func_array(),
omit the line to create a string out of the $params, then merge the later
arguments into an array w/ the first 2 args
#$params =
Daniel Brown wrote:
On Wed, Jan 21, 2009 at 20:27, Jack Bates ms...@freezone.co.uk wrote:
How can I tell the difference between a variable whose value is null and
a variable which is not set?
Unfortunately, in PHP - like other languages - you can't.
A variable is considered to be
Shawn McKenzie wrote:
Daniel Brown wrote:
On Wed, Jan 21, 2009 at 20:27, Jack Bates ms...@freezone.co.uk wrote:
How can I tell the difference between a variable whose value is null and
a variable which is not set?
Unfortunately, in PHP - like other languages - you can't.
A variable
On Thu, Jan 22, 2009 at 15:11, Shawn McKenzie nos...@mckenzies.net wrote:
Or something like this (dunno, just brainstorming):
function setornull($var)
{
if (!isset($var)) {
return false;
}
elseif (is_null($var)) {
return null;
}
On Thu, Jan 22, 2009 at 15:12, Daniel Brown danbr...@php.net wrote:
Unfortunately, neither solution would work. isset() will return
FALSE even for an instantiated and explicitly-defined NULL variable.
Forgot to mention that, in addition, is_null() will return TRUE
for both
Daniel Brown wrote:
On Thu, Jan 22, 2009 at 15:11, Shawn McKenzie nos...@mckenzies.net wrote:
Or something like this (dunno, just brainstorming):
function setornull($var)
{
if (!isset($var)) {
return false;
}
elseif (is_null($var)) {
Daniel Brown wrote:
On Thu, Jan 22, 2009 at 15:12, Daniel Brown danbr...@php.net wrote:
Unfortunately, neither solution would work. isset() will return
FALSE even for an instantiated and explicitly-defined NULL variable.
Forgot to mention that, in addition, is_null() will return TRUE
On Thu, Jan 22, 2009 at 12:06 PM, Frank Stanovcak
blindspot...@comcast.netwrote:
Nathan Nobbe quickshif...@gmail.com wrote in message
news:7dd2dc0b0901221048g2f089cf9s36ecb9a5b35ab...@mail.gmail.com...
On Thu, Jan 22, 2009 at 8:35 AM, Frank Stanovcak
blindspot...@comcast.netwrote:
I'm
Shawn McKenzie schrieb:
Daniel Brown wrote:
On Thu, Jan 22, 2009 at 15:12, Daniel Brown danbr...@php.net wrote:
Unfortunately, neither solution would work. isset() will return
FALSE even for an instantiated and explicitly-defined NULL variable.
Forgot to mention that, in addition,
bruce wrote:
Hi...
Playing around with a test app to spawn external child processes.
I'd like to be able to spawn/fork/run am external child process, that:
-allows the child processes to run as separate independent processes (pid)
-allows the child process(es) to be terminated via cmdline
Richard Heyes schreef:
...
Really, for URLs that don't exist you should be showing a 404, This
way the user doesn't falsely believe that the URL is a valid one and
keep using it.
if the invalid URL (which outputs a 404 header) then automatically redirects
to another URL then I think it's
2009/1/16 Shawn McKenzie nos...@mckenzies.net:
Lars Torben Wilson wrote:
2009/1/15 tedd tedd.sperl...@gmail.com:
At 9:46 AM -0800 1/15/09, Chris Carter wrote:
Chris:
That's not the way I would do it. After establishing a connection with the
database, I would use the query:
$query SELECT
49 matches
Mail list logo