On 7 January 2011 16:55, la...@garfieldtech.com la...@garfieldtech.com wrote:
Hi folks. I have a project coming up that will involve writing a
non-trivial command line PHP application. Most of it will be nice and
abstracted and standalone and all of that jazz, but it will need to do
command
On 11-01-11 11:27 AM, Richard Quadling wrote:
As PHP on windows requires an [ENTER] key to be pressed to pass the
typed string to the code (even for fgetc(STDIN) ), then this may not
be what you want.
Have you tried setting the stream to non-blocking to prevent the need
for the return key?
On 11 January 2011 16:43, Robert Cummings rob...@interjinn.com wrote:
On 11-01-11 11:27 AM, Richard Quadling wrote:
As PHP on windows requires an [ENTER] key to be pressed to pass the
typed string to the code (even for fgetc(STDIN) ), then this may not
be what you want.
Have you tried
On 11 January 2011 16:43, Robert Cummings rob...@interjinn.com wrote:
On 11-01-11 11:27 AM, Richard Quadling wrote:
As PHP on windows requires an [ENTER] key to be pressed to pass the
typed string to the code (even for fgetc(STDIN) ), then this may not
be what you want.
Have you tried
On 11-01-11 11:55 AM, Richard Quadling wrote:
On 11 January 2011 16:43, Robert Cummingsrob...@interjinn.com wrote:
On 11-01-11 11:27 AM, Richard Quadling wrote:
As PHP on windows requires an [ENTER] key to be pressed to pass the
typed string to the code (even for fgetc(STDIN) ), then this
tedd wrote:
At 1:54 PM -0500 1/7/11, Joshua Kehn wrote:
Why should someone stop learning ever?
Because my head fills up.
I have to wait until I forget something before I can learn something new.
The up-side is that I'm learning something new almost every day now.
Cheers,
tedd
lol.. I
On 11-01-11 12:14 PM, Donovan Brooke wrote:
tedd wrote:
At 1:54 PM -0500 1/7/11, Joshua Kehn wrote:
Why should someone stop learning ever?
Because my head fills up.
I have to wait until I forget something before I can learn something new.
The up-side is that I'm learning something new
At 11:14 AM -0600 1/11/11, Donovan Brooke wrote:
tedd wrote:
At 1:54 PM -0500 1/7/11, Joshua Kehn wrote:
Why should someone stop learning ever?
Because my head fills up.
I have to wait until I forget something before I can learn something new.
The up-side is that I'm learning something new
On 11 January 2011 17:53, Robert Cummings rob...@interjinn.com wrote:
On 11-01-11 12:14 PM, Donovan Brooke wrote:
tedd wrote:
At 1:54 PM -0500 1/7/11, Joshua Kehn wrote:
Why should someone stop learning ever?
Because my head fills up.
I have to wait until I forget something before I can
On Tue, Jan 11, 2011 at 10:12 AM, tedd tedd.sperl...@gmail.com wrote:
My down time is playing XBOX Black Ops. It allows my mind to focus on
things that don't matter, much like a vacation, that's frees space
For me that's Left 4 Dead 2 as Captain Cujo. I think it's beneficial to
cultivate
On Jan 7, 2011, at 8:50 PM, David Hutto wrote:
On Fri, Jan 7, 2011 at 8:44 PM, TR Shaw ts...@oitc.com wrote:
On Jan 7, 2011, at 8:36 PM, David Hutto wrote:
I'm with some of the others above on using Python. Writing a command
line app is about as simple as:
import subprocess
word =
Like i said, my introduction to php is browser,and desktop app is
python, but I will try php in the command line out.
1) set a variable
2) call an external program with the variable as an argument
this is something I recognize very well:)
--
PHP General Mailing List (http://www.php.net/)
To
David Hutto wrote:
I'm with some of the others above on using Python. Writing a command
line app is about as simple as:
snip
I think of PHP as more browser, than desktop app/webapp.
The point I was trying to make was one where there are two paths to doing the
same job ...
Example
On Sat, Jan 8, 2011 at 07:25, TR Shaw ts...@oitc.com wrote:
Sorry, David I should not reply quickly when I have a cold but again its all
pretty similar. Here it is on unix/linux.
PHP:
$word = hello;
exec(say \$word\);
Bash:
word=hello
say $word
?php txt2wav('Hello','hello.wav'); ?
On Sat, Jan 8, 2011 at 00:23, Larry Garfield la...@garfieldtech.com wrote:
On Friday, January 07, 2011 9:34:42 pm David Hutto wrote:
Which yielded this as the first result:
http://php.net/manual/en/features.commandline.php
As noted in my original email, I find the native SAPI clunky and
On Jan 7, 2011, at 11:55 AM, la...@garfieldtech.com wrote:
Hi folks. I have a project coming up that will involve writing a non-trivial
command line PHP application. Most of it will be nice and abstracted and
standalone and all of that jazz, but it will need to do command line
On Fri, Jan 7, 2011 at 11:55, la...@garfieldtech.com
la...@garfieldtech.com wrote:
Hi folks. I have a project coming up that will involve writing a
non-trivial command line PHP application. Most of it will be nice and
abstracted and standalone and all of that jazz, but it will need to do
(sorry for top post, still not worked out how not to on phone)
Can you not just code it like you normally would any app that doesn't use a
framework? I've been writing some cli data importers at work. Basic really,
with only classes used that I need, no framework needed (its very simple) and
On Jan 7, 2011, at 12:12 PM, Daniel Brown wrote:
On Fri, Jan 7, 2011 at 12:01, Joshua Kehn josh.k...@gmail.com wrote:
Why are you writing a command line application in PHP? I would think that is
starting off on a very wrong foot.
I would not be exaggerating to say that I've written
On Fri, Jan 7, 2011 at 12:18, Joshua Kehn josh.k...@gmail.com wrote:
Using another language more suited towards CLI / standalone (non-web)
development would be easier. PHP at it's core is a templating language. I
don't think it is as suited as say Python for developing standalone
On Fri, Jan 7, 2011 at 11:55 AM, la...@garfieldtech.com
la...@garfieldtech.com wrote:
Hi folks. I have a project coming up that will involve writing a
non-trivial command line PHP application. Most of it will be nice and
abstracted and standalone and all of that jazz, but it will need to do
On Jan 7, 2011, at 12:34 PM, Daniel Brown wrote:
On Fri, Jan 7, 2011 at 12:18, Joshua Kehn josh.k...@gmail.com wrote:
Using another language more suited towards CLI / standalone (non-web)
development would be easier. PHP at it's core is a templating language. I
don't think it is as suited
On Fri, Jan 7, 2011 at 11:31 AM, Joshua Kehn josh.k...@gmail.com wrote:
On Jan 7, 2011, at 12:34 PM, Daniel Brown wrote:
On Fri, Jan 7, 2011 at 12:18, Joshua Kehn josh.k...@gmail.com wrote:
Using another language more suited towards CLI / standalone (non-web)
development would be easier.
On Fri, 2011-01-07 at 13:31 -0500, Joshua Kehn wrote:
On Jan 7, 2011, at 12:34 PM, Daniel Brown wrote:
On Fri, Jan 7, 2011 at 12:18, Joshua Kehn josh.k...@gmail.com wrote:
Using another language more suited towards CLI / standalone (non-web)
development would be easier. PHP at it's
On Jan 7, 2011, at 1:48 PM, Nathan Nobbe wrote:
shrug, you must not be too familiar with php then. 9 times out of 10 it's
the natural, perfect choice for a cli program. there are situations where
you get past what php is ideal for on the cli, typically when you get into
heavy forking or
On Jan 7, 2011, at 1:53 PM, Ashley Sheridan wrote:
There's no real reason why you shouldn't use PHP for cli apps, it has a lot
of features specifically intended for it even. I've found it to be fast
enough for my needs, it's familiar, and I don't need to compile an app every
time I make a
On Fri, Jan 7, 2011 at 13:31, Joshua Kehn josh.k...@gmail.com wrote:
My apologies. I just view PHP as a perfected web language, due to it's
templating nature, while using it for other things (scripts, utilities,
cron) is a misuse in my opinion.
No one ever needs to apologize for their
On 1/7/11 11:08 AM, Nicholas Kell wrote:
On Jan 7, 2011, at 11:01 AM, Joshua Kehn wrote:
On Jan 7, 2011, at 11:55 AM, la...@garfieldtech.com wrote:
Hi folks. I have a project coming up that will involve writing a non-trivial
command line PHP application. Most of it will be nice and
On Fri, Jan 7, 2011 at 10:31 AM, Joshua Kehn josh.k...@gmail.com wrote:
My apologies. I just view PHP as a perfected web language, due to it's
templating nature, while using it for other things (scripts, utilities,
cron) is a misuse in my opinion.
Even if you are proficient in more
On 11-01-07 01:31 PM, Joshua Kehn wrote:
On Jan 7, 2011, at 12:34 PM, Daniel Brown wrote:
On Fri, Jan 7, 2011 at 12:18, Joshua Kehnjosh.k...@gmail.com wrote:
Using another language more suited towards CLI / standalone (non-web)
development would be easier. PHP at it's core is a templating
On Fri, Jan 7, 2011 at 11:54 AM, Joshua Kehn josh.k...@gmail.com wrote:
On Jan 7, 2011, at 1:48 PM, Nathan Nobbe wrote:
shrug, you must not be too familiar with php then. 9 times out of 10 it's
the natural, perfect choice for a cli program. there are situations where
you get past what php
On Jan 7, 2011, at 1:41 PM, la...@garfieldtech.com wrote:
Application is perhaps a misnomer. I'm not looking at rewriting Emacs or
anything. Just some batch processing that would get run as:
php myscript.php --config=foo.xml --setting-1=stuff
And then it will run off and move a few
On Fri, Jan 7, 2011 at 10:41 AM, la...@garfieldtech.com
la...@garfieldtech.com wrote:
Application is perhaps a misnomer. I'm not looking at rewriting Emacs or
anything. Just some batch processing that would get run as:
php myscript.php --config=foo.xml --setting-1=stuff
For this I used
On 11-01-07 11:55 AM, la...@garfieldtech.com wrote:
Hi folks. I have a project coming up that will involve writing a
non-trivial command line PHP application. Most of it will be nice and
abstracted and standalone and all of that jazz, but it will need to do
command line interation. I'm not
On Jan 7, 2011, at 12:08 PM, Nicholas Kell wrote:
On Jan 7, 2011, at 11:01 AM, Joshua Kehn wrote:
On Jan 7, 2011, at 11:55 AM, la...@garfieldtech.com wrote:
Hi folks. I have a project coming up that will involve writing a
non-trivial command line PHP application. Most of it will be
On Fri, 2011-01-07 at 11:31 -0800, David Harkness wrote:
On Fri, Jan 7, 2011 at 10:41 AM, la...@garfieldtech.com
la...@garfieldtech.com wrote:
Application is perhaps a misnomer. I'm not looking at rewriting Emacs or
anything. Just some batch processing that would get run as:
php
At 11:48 AM -0700 1/7/11, Nathan Nobbe wrote:
why bother learning 2 languages when 1 will suit most needs perfectly? for
most folks who work with the web and a typical deployment environment like a
linux server, the second language of choice most likely would be a client
side one like
On 11-01-07 02:33 PM, Robert Cummings wrote:
On 11-01-07 11:55 AM, la...@garfieldtech.com wrote:
Hi folks. I have a project coming up that will involve writing a
non-trivial command line PHP application. Most of it will be nice and
abstracted and standalone and all of that jazz, but it will
At 1:54 PM -0500 1/7/11, Joshua Kehn wrote:
Why should someone stop learning ever?
Because my head fills up.
I have to wait until I forget something before I can learn something new.
The up-side is that I'm learning something new almost every day now.
Cheers,
tedd
--
---
At 12:16 PM -0700 1/7/11, Nathan Nobbe wrote:
On Fri, Jan 7, 2011 at 11:54 AM, Joshua Kehn josh.k...@gmail.com wrote:
Why bother learning other languages? Is this a joke? Why should someone
stop learning *ever?** *Having a mastery of multiple languages can only
enhance you.
No, it's not
On 11-01-07 02:53 PM, tedd wrote:
At 12:16 PM -0700 1/7/11, Nathan Nobbe wrote:
On Fri, Jan 7, 2011 at 11:54 AM, Joshua Kehnjosh.k...@gmail.com wrote:
Why bother learning other languages? Is this a joke? Why should someone
stop learning *ever?** *Having a mastery of multiple languages
On Fri, Jan 7, 2011 at 12:53 PM, tedd tedd.sperl...@gmail.com wrote:
At 12:16 PM -0700 1/7/11, Nathan Nobbe wrote:
On Fri, Jan 7, 2011 at 11:54 AM, Joshua Kehn josh.k...@gmail.com wrote:
Why bother learning other languages? Is this a joke? Why should someone
stop learning *ever?**
On 11-01-07 03:24 PM, Nathan Nobbe wrote:
much of the gripe comparing php to python over the years is slowly fading
with the advent of new features of php, most notably closures. once traits
are available im sure the multiple inheritance that python offers will be
less of an advantage over
On Jan 7, 2011, at 1:34 PM, TR Shaw wrote:
On Jan 7, 2011, at 12:08 PM, Nicholas Kell wrote:
On Jan 7, 2011, at 11:01 AM, Joshua Kehn wrote:
On Jan 7, 2011, at 11:55 AM, la...@garfieldtech.com wrote:
Hi folks. I have a project coming up that will involve writing a
non-trivial
At 1:24 PM -0700 1/7/11, Nathan Nobbe wrote:
On Fri, Jan 7, 2011 at 12:53 PM, tedd
mailto:tedd.sperl...@gmail.comtedd.sperl...@gmail.com wrote:
much of the gripe comparing php to python
-nathan
I try to stay away from snakes.
Cheers,
tedd
--
---
http://sperling.com/
--
PHP General
At 3:05 PM -0500 1/7/11, Robert Cummings wrote:
Is the winner JavaScript?
*ducks and runs*
Rob.
Careful or I'll have to fog you as well. :-)
Cheers,
tedd
--
---
http://sperling.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Fri, Jan 7, 2011 at 2:52 PM, tedd tedd.sperl...@gmail.com wrote:
At 1:24 PM -0700 1/7/11, Nathan Nobbe wrote:
On Fri, Jan 7, 2011 at 12:53 PM, tedd mailto:tedd.sperl...@gmail.com
tedd.sperl...@gmail.com wrote:
much of the gripe comparing php to python
-nathan
I try to stay away from
Joshua Kehn wrote:
why bother learning 2 languages when 1 will suit most needs perfectly? for
most folks who work with the web and a typical deployment environment like a
linux server, the second language of choice most likely would be a client side
one like javascript.
You can't say that
I'm with some of the others above on using Python. Writing a command
line app is about as simple as:
import subprocess
word = 'hello'
self.espeak = subprocess.Popen(['espeak', word], stdout =
subprocess.PIPE).communicate()[0]
I think of PHP as more browser, than desktop app/webapp.
--
PHP
There have been a lot of responses, but this might be the best place to start:
http://www.google.com/search?client=ubuntuchannel=fsq=command+line+PHP+application.ie=utf-8oe=utf-8
Which yielded this as the first result:
http://php.net/manual/en/features.commandline.php
--
PHP General Mailing
On Friday, January 07, 2011 9:34:42 pm David Hutto wrote:
Which yielded this as the first result:
http://php.net/manual/en/features.commandline.php
As noted in my original email, I find the native SAPI clunky and difficult to
work with. Hence I was looking for something more usable and
I could go yoda, but suffice it to say, From The Language Speaks The
Soul Of The Man's Design.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Per Jessen wrote:
Rene Fournier wrote:
Is it possible to set a unique memory limit for PHP scripts that are
run from the command line? (That is, different from what's specified
in php.ini.)
This might specific to openSUSE, but the typical installation comes with
separate php.inis for apache
-Original Message-
From: Shawn McKenzie [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2008 11:06 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Command-line PHP memory limit
Per Jessen wrote:
Rene Fournier wrote:
Is it possible to set a unique memory limit for PHP
On Wed, 2008-06-11 at 23:48 +0200, Rene Fournier wrote:
Is it possible to set a unique memory limit for PHP scripts that are
run from the command line? (That is, different from what's specified
in php.ini.)
In your script:
ini_set( 'memory_limit', -1 );
Cheers,
Rob.
--
Rene Fournier wrote:
Is it possible to set a unique memory limit for PHP scripts that are
run from the command line? (That is, different from what's specified
in php.ini.)
This might specific to openSUSE, but the typical installation comes with
separate php.inis for apache and cli.
M5 wrote:
On 20-Dec-07, at 1:17 AM, Per Jessen wrote:
René Fournier wrote:
I'm really not sure what to try next. ps -aux shows MySQL as hogging
the CPU, not PHP or Terminal:
When this happens, do a 'SHOW PROCESSLIST' in mysql to see what it's
doing.
I have, and I can't see anything
René Fournier wrote:
I'm really not sure what to try next. ps -aux shows MySQL as hogging
the CPU, not PHP or Terminal:
When this happens, do a 'SHOW PROCESSLIST' in mysql to see what it's
doing.
/Per Jessen, Zürich
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On 20-Dec-07, at 1:17 AM, Per Jessen wrote:
René Fournier wrote:
I'm really not sure what to try next. ps -aux shows MySQL as hogging
the CPU, not PHP or Terminal:
When this happens, do a 'SHOW PROCESSLIST' in mysql to see what it's
doing.
I have, and I can't see anything unusual. There
On 11-Dec-07, at 2:13 PM, Per Jessen wrote:
René Fournier wrote:
However, the number of socket clients connecting in the past 3-4
months has steadily increased, and this seems to have exposed (if not
created) a strange performance issue with PHP 5.2.4, MySQL 5.0.45
and/or Mac OS X Server
Jochem Maas wrote:
Have you tried stracing it to see what's really happening when the
load goes that high?
am I correct that that would be done like so?:
strace -p process id of php deamon
Yep, that's it. You'll probably want to record the output for analysis,
but sometimes it's very
M5 wrote:
Thanks Jim.
No problem.
The processing is pretty quick. I don't think that's a bottleneck. It
basically just inserts the data into MySQL, not much processing actually.
What is the likely hood that two connections would come in at the same
time, or at least within close
stream_socket_server simply listens, stream_socket_accept handles the
connection, stream_set_write_buffer and stream_set_blocking help you
keep up, especially when combined with stream_get_line, no need to shile
forever when you can just:
while (is_resource($conn =
hi Nathan,
any chance of a 'full blown' example for all the muppets who want to try and
grok this stuff? (bork bork, say I :-))
Nathan Rixham wrote:
stream_socket_server simply listens, stream_socket_accept handles the
connection, stream_set_write_buffer and stream_set_blocking help you
keep
Jochem Maas wrote:
Nathan Rixham wrote:
Key I find though is multithreading, listener thread with
stream_socket_server, 2 or 3 stream_socket_accept threads and a pair
of new thread spawned to handle each connection (one to read, one to
write) (not needed for stateless http style request
Per Jessen wrote:
Jochem Maas wrote:
Nathan Rixham wrote:
Key I find though is multithreading, listener thread with
stream_socket_server, 2 or 3 stream_socket_accept threads and a pair
of new thread spawned to handle each connection (one to read, one to
write) (not needed for stateless
Jochem Maas wrote:
I'd be interested to see how he does the multi-threading in php.
Personally I'd always opt for C to write this type of thing, except
for perhaps the most simple cases.
any chance of an example from you too?
Sure -
http://jessen.ch/files/distripg_main.c
It can't be
That makes sense, but I'm not sure I really want to do this, since
it's fairly important that Listener continue listening without
interruption.
I also don't think it's probably necessary, since from what I read,
I'm not really pushing the envelope in terms of real load. Right now,
I
René Fournier wrote:
However, the number of socket clients connecting in the past 3-4
months has steadily increased, and this seems to have exposed (if not
created) a strange performance issue with PHP 5.2.4, MySQL 5.0.45
and/or Mac OS X Server 10.4.11. (I say and/or because I am unsure
Per Jessen wrote:
René Fournier wrote:
However, the number of socket clients connecting in the past 3-4
months has steadily increased, and this seems to have exposed (if not
created) a strange performance issue with PHP 5.2.4, MySQL 5.0.45
and/or Mac OS X Server 10.4.11. (I say and/or
René Fournier wrote:
Hello,
I have a command-line PHP script--called Listener--that is designed to
run indefinitely with a predictable CPU usage and memory footprint. In a
nutshell, it's a multi-client socket server that waits for incoming
connections, processes incoming data, stores
Hi Jim,
I have a server that listens like yours does. I get 80k - 85k
connections a day to it.
When I first started it, I was only getting about 3k of connections
aday. Then I upped the
listening pattern and it tanked. I noticed that all my mail/web/db
connections just sat there.
Hi,
Tuesday, December 11, 2007, 6:42:18 AM, you wrote:
RF Hello,
RF I have a command-line PHP script--called Listener--that is designed
RF to run indefinitely with a predictable CPU usage and memory
RF footprint. In a nutshell, it's a multi-client socket server that
RF waits for incoming
On 10-Dec-07, at 4:42 PM, Tom Rogers wrote:
Put a usleep(1000) in the listen while() loop and give the cpu a
break.
Good advice, but I've already been doing that. The thing is, when the
script first starts up, the CPU rarely exceeds 30%, even when many
clients (200+) are simultaneously
Tom Rogers wrote:
Hi,
Tuesday, December 11, 2007, 6:42:18 AM, you wrote:
RF Hello,
Put a usleep(1000) in the listen while() loop and give the cpu a
break.
This makes me think about asking if you have to short of a timeout on your
receiving connection?
What are you using to setup your
Jim Lucas wrote:
Tom Rogers wrote:
Hi,
...
Also, make sure you are not using an array that you are not re-initializing
through each iteration
of the loop. If the array keeps getting bigger, PHP might $*% on itself.
Always re-initialize
arrays to clean them up.
even then he may still
On 10-Dec-07, at 5:20 PM, Jim Lucas wrote:
Tom Rogers wrote:
Hi,
Tuesday, December 11, 2007, 6:42:18 AM, you wrote:
RF Hello,
Put a usleep(1000) in the listen while() loop and give the cpu a
break.
This makes me think about asking if you have to short of a timeout
on your receiving
Jochem Maas wrote:
Jim Lucas wrote:
Tom Rogers wrote:
Hi,
...
Also, make sure you are not using an array that you are not re-initializing
through each iteration
of the loop. If the array keeps getting bigger, PHP might $*% on itself.
Always re-initialize
arrays to clean them up.
René Fournier wrote:
FWIW, here's the stripped-down skeleton of the server:
As always, constructive criticism is very welcome.
?php
$socket = stream_socket_server(tcp://127.0.0.1:9876, $errno, $errstr);
if ($socket) {
$master[] = $socket;
$read = $master;
$write = $master;
Thanks Jim. Several good points here that I will look into. I've
already moved the include() bits into function calls. (That's simple
thing I should have corrected long ago.) The socket areas though I'm
less sure about how to adjust, since networking programming isn't
something I grok
Hi,
you can do this by using unix command 'for'. Please apply the
command written below reply me your experiment result.
for filename in `ls *.txt`;do ./edit.php $filename var1 var2;done
--Nirmalya
Angelo Christou [EMAIL PROTECTED] wrote: Hello List
I would like some advice from PHP
Angelo,
I am very happy after knowing that it is working. :)
--Nirmalya
Angelo Christou [EMAIL PROTECTED] wrote:
Hello Nirmalya,
Thank you for your response. With the help of your reply, I've now got it
working! :)
Ang.
Nirmalya Lahiri [EMAIL PROTECTED] wrote: Hi,
you can do this
Angelo Christou wrote:
I read that it's better to split scripts up into small reusable parts so my
plan is to keep the logic out of the edit.php script and simply pass the
variables to it using another script. Am I on the right path doing this?
That is a good ideology, but whether it's
Robert S wrote:
I am running a Woody server. I'd like to run php scripts from the command
line, but I note that the php/php4 executable is not in my PATH.
Should you ask this at a debian list?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Should you ask this at a debian list?
I tried . . .no luck. I thought that you php folks might know a bit more
about specific versions.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi
You might want to download the php source and compile the cli binary yourself
(Command Line Interface)
It takes only little time compared to compiling it as an apache module
Once you got thing setup, you can drop the php extension and just put a
shebang like this
#! /usr/bin/php
At the
Robert S a écrit :
I am running a Woody server. I'd like to run php scripts from the command
line, but I note that the php/php4 executable is not in my PATH.
just install php4-cgi package (apt-get install php4-cgi)
and the PHP 4 CLI will be install : /usr/bin/php4
Next time, try to use 'apt-cache
just download the php4-cli deb package and install it, i think this
should work, and correct me if it's a stupid idea.
and Sarge is ok for me, i'm running a production e-mail server for
last 6 months with a heavy load on it, i'm using php4-cli on it for
my 'home made' exim4 administration
If you need more recent LAMP stuff on Woody (ex php5) add these lines
in your /etc/apt/sources.list:
deb http://packages.dotdeb.org ./
deb-src http://sources.dotdeb.org ./
This will use recent Debian packages (backported for Woody)
from http://dotdeb.org/
That looks like what I'm after
They got
4.3.2
Ray Hunter wrote:
Technically, yes it should however, I think this is a bug...are you running
php 5b?
--
BigDog
- Original Message -
From: John Nichel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 9:07 PM
Subject: [PHP] Command line php
Can someone
Technically, yes it should however, I think this is a bug...are you running
php 5b?
--
BigDog
- Original Message -
From: John Nichel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 9:07 PM
Subject: [PHP] Command line php
Can someone tell me why php waits
That did it. Thanks.
Jason Wong wrote:
On Wednesday 06 August 2003 11:11, John Nichel wrote:
4.3.2
Try disabling output buffer in php.ini.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wednesday 06 August 2003 11:11, John Nichel wrote:
4.3.2
Try disabling output buffer in php.ini.
--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design Hosting * Internet Intranet Applications Development *
try using fopen();
http://www.php.net/manual/en/function.fopen.php
- Original Message -
From: Joshua Moore-Oliva [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 3:37 PM
Subject: [PHP] Command line php output redirection.
This is really scaring me as file
Hello,
This is a reply to an e-mail that you wrote on Wed, 25 Jun 2003 at 23:48,
lines prefixed by '' were originally written by you.
php parser.php temp
temp only contains
Content-type: text/html
X-Powered-By: PHP/4.3.2
Maybe try using the -q parameter? what do you get then?
-q
That worked, thanks.
On June 25, 2003 07:16 pm, David Nicholson wrote:
Hello,
This is a reply to an e-mail that you wrote on Wed, 25 Jun 2003 at 23:48,
lines prefixed by '' were originally written by you.
php parser.php temp
temp only contains
Content-type: text/html
e
echo ( Hello . $name . \n );
John Nichel wrote:
How do I capture standard input?
?php
$name = STDIN;
echo ( Hello . STDIN . \n );
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
STDIN is a file reference. Use the standard file functions (fread, for
example) on it.
John Nichel wrote:
How do I capture standard input?
?php
$name = STDIN;
echo ( Hello . STDIN . \n );
?
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt
to
if I do a...
$name = fread ( STDIN, sizeof ( STDIN ) );
I only get back the first character entered. How do I accept exactly
what is entered?
Leif K-Brooks wrote:
STDIN is a file reference. Use the standard file functions (fread,
for example) on it.
John Nichel wrote:
How do I capture
I did that orginally, but it waits for me to enter 255 characters before
closing the freadno matter how many times I hit enter.
Benny Pedersen wrote:
On Wednesday 02 April 2003 03:17, John Nichel wrote:
if I do a...
$name = fread ( STDIN, sizeof ( STDIN ) );
$name = fread ( STDIN, 255 );
1 - 100 of 102 matches
Mail list logo