Re: [PHP] PHP CLI setting cooked terminal mode

2013-09-11 Thread Stuart Dallas
On 11 Sep 2013, at 17:37, Alain Williams wrote: > Hi, > > I am running a PHP script at the command line and piping the output through > less: > >./myScript | less > > Since less is an interactive program it puts the terminal into 'raw' mode so > that it can read characters one at a time.

Re: [PHP] PHP CLI setting cooked terminal mode

2013-09-11 Thread Alain Williams
On Wed, Sep 11, 2013 at 05:45:45PM +0100, Stuart Dallas wrote: > On 11 Sep 2013, at 17:37, Alain Williams wrote: > Make sure output buffering is off by putting this at the top of your script: > > while(ob_end_clean()); Sorry, that does not fix the problem - but thanks for trying. -- Alain Wil

Re: [PHP] php-cli-shebang

2011-06-08 Thread Lists
Joe Francis wrote: why not using php.exe instead of php-cgi.exe as a parser ? Thanks for pointing that out... didn't have any reasoning, but since your post, I've learned the difference and have changed the script. Donovan -- dbrooke -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] php-cli-shebang

2011-06-08 Thread Joe Francis
why not using php.exe instead of php-cgi.exe as a parser ? On Wed, Jun 8, 2011 at 7:42 AM, Lists wrote: > Lists wrote: > >> Windows Server 2003 >> PHP fastcgi 5.2 >> > > > > O.K. '-q' is quiet mode (no header info), which works better when not using > the -f flag when calling the script (it appe

Re: [PHP] php-cli-shebang

2011-06-07 Thread Lists
Lists wrote: Windows Server 2003 PHP fastcgi 5.2 O.K. '-q' is quiet mode (no header info), which works better when not using the -f flag when calling the script (it appears). anyway, I solved my issues with a work around, so no worries. Donovan -- dbrooke -- PHP General Mailing List (h

Re: [PHP] php cli question

2010-09-15 Thread J Ravi Menon
Thanks Bostjan for the suggestion. I did raise the issue and here is the reply: http://news.php.net/php.internals/49672 Thx, Ravi On Wed, Sep 15, 2010 at 2:38 AM, Bostjan Skufca wrote: > Here are the results I got when question of migration from apache to nginx > was brought up: > http://blog.

Re: [PHP] php cli question

2010-09-15 Thread Bostjan Skufca
Here are the results I got when question of migration from apache to nginx was brought up: http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/ (BTW there is some FPM in main PHP distribution now) As for resource management, I recommend looking at php sources (Zend/zend_alloca.c

Re: [PHP] php cli question

2010-09-14 Thread J Ravi Menon
On Tue, Sep 14, 2010 at 1:15 PM, Per Jessen wrote: > J Ravi Menon wrote: > >> On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen wrote: >>> J Ravi Menon wrote: >>> Few questions: 1) Does opcode cache really matter in such cli-based daemons? As 'SomeClass' is instantiated at every lo

Re: [PHP] php cli question

2010-09-14 Thread Nathan Rixham
Per Jessen wrote: J Ravi Menon wrote: 2) What about garbage collection? In a standard apache-mod-php setup, we rely on the end of a request-cycle to free up resources - close file descriptiors, free up memory etc.. I am assuming in the aforesaid standalone daemon case, we would have to do this m

Re: [PHP] php cli question

2010-09-14 Thread Per Jessen
J Ravi Menon wrote: > On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen wrote: >> J Ravi Menon wrote: >> >>> Few questions: >>> >>> 1) Does opcode cache really matter in such cli-based daemons? As >>> 'SomeClass' is instantiated at every loop, I am assuming it is only >>> compiled once as it has alrea

Re: [PHP] php cli question

2010-09-14 Thread J Ravi Menon
On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen wrote: > J Ravi Menon wrote: > >> Few questions: >> >> 1) Does opcode cache really matter in such cli-based daemons? As >> 'SomeClass' is instantiated at every loop, I am assuming it is only >> compiled once as it has already been 'seen'. > > Yup. Just

Re: [PHP] php cli question

2010-09-14 Thread Per Jessen
J Ravi Menon wrote: > Few questions: > > 1) Does opcode cache really matter in such cli-based daemons? As > 'SomeClass' is instantiated at every loop, I am assuming it is only > compiled once as it has already been 'seen'. Yup. > 2) What about garbage collection? In a standard apache-mod-php se

Re: [PHP] php-cli

2010-03-16 Thread Richard Quadling
On 15 March 2010 00:27, Rick Pasotto wrote: > On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: >> On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: >> >> > On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: >> > > On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto w

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Mon, Mar 15, 2010 at 02:35:54PM +1300, Dmitry Ruban wrote: > Rick Pasotto wrote: > >On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: > >>Rick Pasotto wrote: > >>>I repeat: is there more than one way to run a php script from the cli? > >>> > >>On *nix, you can add "#!/usr/bin/php" as

Re: [PHP] php-cli

2010-03-14 Thread Dmitry Ruban
Rick Pasotto wrote: On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: Rick Pasotto wrote: I repeat: is there more than one way to run a php script from the cli? On *nix, you can add "#!/usr/bin/php" as first line and make file executable (chmod +x). Functionally the same. php is

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 21:24 -0400, Rick Pasotto wrote: > On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: > > Rick Pasotto wrote: > > > > > >I repeat: is there more than one way to run a php script from the cli? > > > > > > > On *nix, you can add "#!/usr/bin/php" as first line and ma

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: > Rick Pasotto wrote: > > > >I repeat: is there more than one way to run a php script from the cli? > > > > On *nix, you can add "#!/usr/bin/php" as first line and make file > executable (chmod +x). Functionally the same. php is still

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 20:27 -0400, Rick Pasotto wrote: > On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: > > On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: > > > > > On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > > > > On Sun, 2010-03-14 at 14:15 -0400

Re: [PHP] php-cli

2010-03-14 Thread Dmitry Ruban
Rick Pasotto wrote: On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: Has cli php changed recently?

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: > On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: > > > On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > > > On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > > > > > > > Has cli php changed recently?

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: > On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > > On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > > > > > Has cli php changed recently? > > > > > > I've got a php script (script1) that creates a php script (scri

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > > > Has cli php changed recently? > > > > I've got a php script (script1) that creates a php script (script2) by > > opening a file and then writing to it. When I try to run

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > Has cli php changed recently? > > I've got a php script (script1) that creates a php script (script2) by > opening a file and then writing to it. When I try to run it from the > command line script1 is simply copied to stdout. When I run it

Re: [PHP] Php-cli, scripts freeze on exit

2010-01-25 Thread Camilo Sperberg
On Sun, Jan 24, 2010 at 16:16, David W. Allor wrote: > Hi! > > I'm using php-cli 5.3.1. > > When I run php from the command line, the script does not return me to > the command prompt when exited. The script always completes, but it has > to be killed to release it's resources. > > I've created a

Re: [PHP] Php-cli, scripts freeze on exit

2010-01-24 Thread shiplu
On Mon, Jan 25, 2010 at 1:16 AM, David W. Allor wrote: > Hi! > > I'm using php-cli 5.3.1. > > When I run php from the command line, the script does not return me to > the command prompt when exited. The script always completes, but it has > to be killed to release it's resources. > > I've created

Re: [PHP] PHP CLI vs WebServed

2009-04-25 Thread Daniel Brown
Replying this back on the list, unchanged and without any additions from me yet. On Sat, Apr 25, 2009 at 14:09, Simon wrote: >>    Perhaps you may want to consider hacking PHP itself.  From memory, >> one place you may want to start looking is the >> php_filter_get_storage() function, the

Re: [PHP] PHP CLI vs WebServed

2009-04-25 Thread Daniel Brown
On Sat, Apr 25, 2009 at 10:14, Simon wrote: > > Hopefully, I'm looking for a way that would not require any hacking of > the PHP files that are currently working with other webservers... Perhaps you may want to consider hacking PHP itself. From memory, one place you may want to start looking

Re: [PHP] PHP CLI vs WebServed

2009-04-25 Thread Simon
Thanks for the reply Richard! > Never done this, but could you set environment variables, which would > then be picked up by PHP (and stuffed in $_ENV)? This seems like a good idea, if i mix this with the popen() idea, i wouldnt need /dev/shm or any files at all then... but the problem remains t

Re: [PHP] PHP CLI vs WebServed

2009-04-25 Thread Richard Heyes
Hi, >... Never done this, but could you set environment variables, which would then be picked up by PHP (and stuffed in $_ENV)? -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (w

Re: [PHP] PHP-CLI issue

2009-03-18 Thread Robert Cummings
On Wed, 2009-03-18 at 06:52 -0700, jesse.ha...@arvatousa.com wrote: > private function getSelection() { > > fwrite(STDOUT,"Mode: "); > > $input = strtoupper(fgetc(STDIN)); > > return $input; > > } Use fgets(

RE: [PHP] PHP-CLI issue

2009-03-18 Thread Jesse.Hazen
Rob, Works like a charm! Much appreciated. Thanks, Jesse Hazen -Original Message- From: Robert Cummings [mailto:rob...@interjinn.com] Sent: Wednesday, March 18, 2009 7:24 AM To: Hazen, Jesse, arvato digital services llc Cc: php-general@lists.php.net Subject: RE: [PHP] PHP-CLI

RE: [PHP] PHP-CLI issue

2009-03-18 Thread Robert Cummings
On Wed, 2009-03-18 at 07:10 -0700, jesse.ha...@arvatousa.com wrote: > Rob, > > Thanks for the quick reply. I did try that before, but now my issue is > that the if-else section does not recognize the data as being valid. So, > I changed it to fgets(), and reran, this time using valid data. The > i

RE: [PHP] PHP-CLI issue

2009-03-18 Thread Jesse.Hazen
] Sent: Wednesday, March 18, 2009 7:00 AM To: Hazen, Jesse, arvato digital services llc Cc: php-general@lists.php.net Subject: Re: [PHP] PHP-CLI issue On Wed, 2009-03-18 at 06:52 -0700, jesse.ha...@arvatousa.com wrote: > private function getSelection() { > > fwrite(STD

Re: [PHP] php cli memory leak error

2009-02-19 Thread Jochem Maas
Lewis Wright schreef: > 2009/2/19 Jochem Maas : >> Thodoris schreef: seems to work fine here. What are your php.ini (memory related) settings? run: /usr/local/bin/php --ini and get the location of the php.ini file that is getting used. Check o

Re: [PHP] php cli memory leak error

2009-02-19 Thread Lewis Wright
2009/2/19 Jochem Maas : > Thodoris schreef: >>> >>> >>> seems to work fine here. >>> >>> What are your php.ini (memory related) settings? >>> >>> run: >>> >>> /usr/local/bin/php --ini >>> >>> and get the location of the php.ini file that is getting used. Check >>> our the memory settings in that f

Re: [PHP] php cli memory leak error

2009-02-19 Thread Jochem Maas
Thodoris schreef: >> >> >> seems to work fine here. >> >> What are your php.ini (memory related) settings? >> >> run: >> >> /usr/local/bin/php --ini >> >> and get the location of the php.ini file that is getting used. Check >> our the memory settings in that file. >> >> >> >> > > Some general

Re: [PHP] php cli memory leak error

2009-02-17 Thread Thodoris
seems to work fine here. What are your php.ini (memory related) settings? run: /usr/local/bin/php --ini and get the location of the php.ini file that is getting used. Check our the memory settings in that file. Some general options: max_input_time = 60 max_execution_time = 120 memo

Re: [PHP] php cli memory leak error

2009-02-17 Thread Jim Lucas
Thodoris wrote: > >> Thodoris wrote: >> >>> Hi gang, >>>I am trying to run a simple PHP script using the cli and I get a >>> weird memory leak error. The script goes like this: >>> >>> #! /usr/local/bin/php >>> >> // Get command line options >>> $options = getopt("f:d:o:"); >>> >>> // Print

Re: [PHP] php cli memory leak error

2009-02-17 Thread Thodoris
Thodoris wrote: Hi gang, I am trying to run a simple PHP script using the cli and I get a weird memory leak error. The script goes like this: #! /usr/local/bin/php The problem is that when I run the script I get this error: Script: './bcom.php' /usr/ports/lang/php5/work/php-5.2.8/main

Re: [PHP] php cli memory leak error

2009-02-17 Thread Jim Lucas
Thodoris wrote: > Hi gang, >I am trying to run a simple PHP script using the cli and I get a > weird memory leak error. The script goes like this: > > #! /usr/local/bin/php > // Get command line options > $options = getopt("f:d:o:"); > > // Print them out > print_r($options); > > // Clear t

Re: [PHP] Php CLI Parser not working

2008-07-31 Thread JJB
Did you check what Jim suggested, as well, about short_open_tags? If your scripts use PHP tags like this: Yes, that was the problem - it was Off in: /etc/php5/cli/php.ini we had checked the one in: ./etc/php5/apache2/php.ini and it was On there so we thought something else w

Re: [PHP] Php CLI Parser not working

2008-07-30 Thread Daniel Brown
On Wed, Jul 30, 2008 at 4:53 PM, JJB <[EMAIL PROTECTED]> wrote: > > Hi Daniel, > > We are running like: > php mailscript.php > > The version: > > php-v > > PHP 5.2.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Dec 12 2007 03:51:56) Did you check what Jim suggested, as well, about short_open_tags?

Re: [PHP] Php CLI Parser not working

2008-07-30 Thread JJB
Daniel Brown wrote: On Tue, Jul 29, 2008 at 2:19 PM, JJB <[EMAIL PROTECTED]> wrote: We recently rebuilt a webserver and upgraded it to opensuse 10.3. Now, when our webdev people run command line php scripts all of the included files are being output to the terminal instead of parsed.

Re: [PHP] Php CLI Parser not working

2008-07-29 Thread Jim Lucas
JJB wrote: We recently rebuilt a webserver and upgraded it to opensuse 10.3. Now, when our webdev people run command line php scripts all of the included files are being output to the terminal instead of parsed. Can anyone make a good suggestion for what might be going on here? My Linux admin is

Re: [PHP] Php CLI Parser not working

2008-07-29 Thread Daniel Brown
On Tue, Jul 29, 2008 at 2:19 PM, JJB <[EMAIL PROTECTED]> wrote: > We recently rebuilt a webserver and upgraded it to opensuse 10.3. > Now, when our webdev people run command line php scripts all of the > included files are being output to the terminal instead of parsed. How are the scripts bei

Re: [PHP] PHP-CLI and the "less" command (kubuntu)

2008-07-02 Thread Mattias Thorslund
Stut wrote: On 2 Jul 2008, at 02:58, Mattias Thorslund wrote: Hi everyone, I have a CLI application that produces lots of output to the terminal, so I like to send the output along to the "less" command. This has always worked very nicely. Moving to the top or bottom of the output used to re

Re: [PHP] PHP-CLI and the "less" command (kubuntu)

2008-07-02 Thread Stut
On 2 Jul 2008, at 02:58, Mattias Thorslund wrote: Hi everyone, I have a CLI application that produces lots of output to the terminal, so I like to send the output along to the "less" command. This has always worked very nicely. Moving to the top or bottom of the output used to require just

Re: [PHP] PHP CLI neat errors!

2008-03-12 Thread Chris
Steve Finkelstein wrote: So, I use a Mac to develop with. I used to host Zend Core on my box, until I switched to the MAMP PRO framework. Unfortunately somewhere in between, this lovely issue started occuring with my CLI binary of PHP: foo:~ sf$ php -l dyld: NSLinkModule() error dyld: Symbol no

Re: [PHP] PHP CLI Problem

2008-02-06 Thread Daniel Brown
On Feb 6, 2008 6:56 PM, Chris <[EMAIL PROTECTED]> wrote: > > > In your cronjob, replace the php5 entry with the following > > (including the backticks): > > `which php5` > > > > If that still doesn't work, replace it simply with php, not php5: > > `which php` > > You can use

Re: [PHP] PHP CLI Problem

2008-02-06 Thread Chris
In your cronjob, replace the php5 entry with the following (including the backticks): `which php5` If that still doesn't work, replace it simply with php, not php5: `which php` You can use 'env php' instead and it'll pick up the first one in $PATH (same sort of idea a

Re: [PHP] PHP CLI Problem

2008-02-06 Thread Daniel Brown
On Feb 6, 2008 12:25 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > put the script in the webroot; then you can invoke it from cron > using curl; i imagine they have that installed. you can protect > the script with the following as the first line > if($_SERVER['REMOTE_ADDR'] !== '127.0.0.1') { die

Re: [PHP] PHP CLI Problem

2008-02-06 Thread Nathan Nobbe
On Feb 6, 2008 11:48 AM, Robbert van Andel <[EMAIL PROTECTED]> wrote: > I contacted 1&1 and was told scripting was not supported. I wrote back > saying I didn't need help writing the script just how to run it. They wrote > back telling me to put it in a cron job using crontab –e and that was all

Re: [PHP] PHP CLI Problem

2008-02-06 Thread Nathan Nobbe
On Feb 6, 2008 11:42 AM, Robbert van Andel <[EMAIL PROTECTED]> wrote: > Not an option. Which php gives me php4 and the script requires php5. > it sounds like you are using 1&1, per dans security warning earlier :) you may want to contact them and ask them how to run php5 scripts via the cli; as

RE: [PHP] PHP CLI Problem

2008-02-06 Thread Robbert van Andel
Not an option. Which php gives me php4 and the script requires php5. From: Nathan Nobbe [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 8:39 AM To: Robbert van Andel Cc: Daniel Brown; php-general@lists.php.net Subject: Re: [PHP] PHP CLI Problem On Feb 6, 2008 11:33 AM

Re: [PHP] PHP CLI Problem

2008-02-06 Thread Nathan Nobbe
On Feb 6, 2008 11:33 AM, Robbert van Andel <[EMAIL PROTECTED]> wrote: > I tried adding `which php5` and that didn't work. did you try running which php5 on the cli to ensure it even maps to a path ? you might need which php instead. -nathan

RE: [PHP] PHP CLI Problem

2008-02-06 Thread Robbert van Andel
own [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 7:52 AM To: Robbert van Andel Cc: php-general@lists.php.net Subject: Re: [PHP] PHP CLI Problem On Feb 6, 2008 1:55 AM, Robbert van Andel <[EMAIL PROTECTED]> wrote: [snip] > First off, the script runs great from the command line whe

Re: [PHP] PHP CLI Problem

2008-02-06 Thread Daniel Brown
On Feb 6, 2008 1:55 AM, Robbert van Andel <[EMAIL PROTECTED]> wrote: [snip] > First off, the script runs great from the command line when I type "php5 > backup.php" but when I type ./backup.php I get an error: "bash: > ./backup.php: No such file or directory". I thought maybe this is a problem > w

Re: [PHP] PHP CLI Problem

2008-02-06 Thread Jim Lucas
Robbert van Andel wrote: I am having trouble with a PHP CLI script I wrote to help manage my website. The site is on a shared hosting server where the PHP installation is set up as a CGI. The script creates some backups of my databases and sends them to Amazon's S3 service. First off, the sc

Re: [PHP] PHP CLI Problem

2008-02-06 Thread Nathan Nobbe
On Feb 6, 2008 9:36 AM, Robbert van Andel <[EMAIL PROTECTED]> wrote: > I guess I spoke too soon. Even though the script runs from anywhere (that > I > have access too), when I put the perl script in a cronjob, the php script > just refuses to run. There's no output, just the output from the perl

RE: [PHP] PHP CLI Problem

2008-02-06 Thread Robbert van Andel
Wednesday, February 06, 2008 6:14 AM To: php-general@lists.php.net Subject: RE: [PHP] PHP CLI Problem Thank you, that was very helpful. I created a perl script because the shell script wouldn't run either. It too gave an error stating the file or directory could not be found. The perl scri

RE: [PHP] PHP CLI Problem

2008-02-06 Thread Robbert van Andel
in a cron job and am confident that it will run. Robbert -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 11:06 PM To: Robbert van Andel Cc: php-general@lists.php.net Subject: Re: [PHP] PHP CLI Problem > First off, the script runs great

Re: [PHP] PHP CLI Problem

2008-02-06 Thread Jochem Maas
Robbert van Andel schreef: I am having trouble with a PHP CLI script I wrote to help manage my website. The site is on a shared hosting server where the PHP installation is set up as a CGI. The script creates some backups of my databases and sends them to Amazon's S3 service. First off, the

Re: [PHP] PHP CLI Problem

2008-02-05 Thread Chris
First off, the script runs great from the command line when I type "php5 backup.php" but when I type ./backup.php I get an error: "bash: ./backup.php: No such file or directory". Maybe backup.php that you think it's running is the wrong one. Add something like: echo "I am file " . __FILE__ .

Re: [PHP] php-cli vs python

2007-06-09 Thread Richard Lynch
On Thu, June 7, 2007 10:55 am, jose javier parra sanchez wrote: > Hi. One big diferrence is that python can be run interactively, while > php not. That's a really good advantage to debug the scripts. Anyway, > use the one you fell more comfortable. U. PHP has dozens of debuggers, and you can

Re: [PHP] php-cli vs python

2007-06-09 Thread Richard Lynch
I use PHP extensively for command line processing. Why not just try it and see if it works well for you? On Wed, June 6, 2007 5:13 pm, Abdullah Ramazanoglu wrote: > Hello, > > I'm already (going to) use php for web based development. Shell > scripting > and compiled languages have their own place

Re: [PHP] php-cli vs python

2007-06-07 Thread Daniel Brown
On 6/7/07, jose javier parra sanchez <[EMAIL PROTECTED]> wrote: Hi. One big diferrence is that python can be run interactively, while php not. That's a really good advantage to debug the scripts. Anyway, use the one you fell more comfortable. 2007/6/7, Abdullah Ramazanoglu <[EMAIL PROTECTED]>:

Re: [PHP] php-cli vs python

2007-06-07 Thread jose javier parra sanchez
Hi. One big diferrence is that python can be run interactively, while php not. That's a really good advantage to debug the scripts. Anyway, use the one you fell more comfortable. 2007/6/7, Abdullah Ramazanoglu <[EMAIL PROTECTED]>: Hello, I'm already (going to) use php for web based developmen

Re: [PHP] php-cli vs python

2007-06-06 Thread Chris
Abdullah Ramazanoglu wrote: Hello, I'm already (going to) use php for web based development. Shell scripting and compiled languages have their own places, but there's also a place for a high level scripting language. While people usually use python (for higher level and perl for lower level task

Re: [PHP] php cli and mysql

2006-11-15 Thread Frank Arensmeier
FYI - the problem with mysql.sock has been an support issue at apple.com before. http://docs.info.apple.com/article.html?artnum=301457 /frank 15 nov 2006 kl. 11.03 skrev Roman Neuhauser: # [EMAIL PROTECTED] / 2006-11-14 18:56:01 -0500: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-11-

Re: [PHP] php cli and mysql

2006-11-15 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-11-14 18:56:01 -0500: > Roman Neuhauser wrote: > ># [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: > > > >>On 11/14/06, James Tu <[EMAIL PROTECTED]> wrote: > >> > >>>I'm running a php script from the command line (I'm on OS X) and I'm > >>>getting ... > >>> > >>>War

Re: [PHP] php cli and mysql

2006-11-14 Thread Chris
Tom Ray [Lists] wrote: Chris wrote: Tom Ray [Lists] wrote: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: On 11/14/06, James Tu <[EMAIL PROTECTED]> wrote: I'm running a php script from the command line (I'm on OS X) and I'm getting ... Warning: mysql_connect

Re: [PHP] php cli and mysql

2006-11-14 Thread Tom Ray [Lists]
Chris wrote: Tom Ray [Lists] wrote: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: On 11/14/06, James Tu <[EMAIL PROTECTED]> wrote: I'm running a php script from the command line (I'm on OS X) and I'm getting ... Warning: mysql_connect(): Can't connect to lo

Re: [PHP] php cli and mysql

2006-11-14 Thread Chris
Tom Ray [Lists] wrote: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: On 11/14/06, James Tu <[EMAIL PROTECTED]> wrote: I'm running a php script from the command line (I'm on OS X) and I'm getting ... Warning: mysql_connect(): Can't connect to local MySQL serve

Re: [PHP] php cli and mysql

2006-11-14 Thread Tom Ray [Lists]
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: On 11/14/06, James Tu <[EMAIL PROTECTED]> wrote: I'm running a php script from the command line (I'm on OS X) and I'm getting ... Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var

Re: [PHP] php cli and mysql

2006-11-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-11-14 20:17:16 +0200: > On 11/14/06, James Tu <[EMAIL PROTECTED]> wrote: > >I'm running a php script from the command line (I'm on OS X) and I'm > >getting ... > > > >Warning: mysql_connect(): Can't connect to local MySQL server through > >socket '/var/mysql/mysql.sock' (

Re: [PHP] php cli and mysql

2006-11-14 Thread James Tu
Thanks everyone! On Nov 14, 2006, at 3:20 PM, [EMAIL PROTECTED] wrote: You could make a new php.ini for flexibility like Jochem stated. To make things easy, just copy the file over: cp /usr/local/php5/lib/php.ini /etc/php.ini And that should do it. James Tu wrote: Please see below On No

Re: [PHP] php cli and mysql

2006-11-14 Thread [EMAIL PROTECTED]
You could make a new php.ini for flexibility like Jochem stated. To make things easy, just copy the file over: cp /usr/local/php5/lib/php.ini /etc/php.ini And that should do it. James Tu wrote: > Please see below > > On Nov 14, 2006, at 2:24 PM, [EMAIL PROTECTED] wrote: > >> Run this command:

Re: [PHP] php cli and mysql

2006-11-14 Thread Jochem Maas
James Tu wrote: > Please see below > .. you fell foul of the 'there is no php.ini' trap :-) (please repeat in a homer simpson voice) > > or should I create a symbolic link to the php.ini that Apache is using? use a seperate php.ini - more flexibility > > >> That'll tell you where the php.i

Re: [PHP] php cli and mysql

2006-11-14 Thread James Tu
Please see below On Nov 14, 2006, at 2:24 PM, [EMAIL PROTECTED] wrote: Run this command: /path/to/cli/php -i|grep MYSQL_SOCKET MYSQL_SOCKET => /var/mysql/mysql.sock What does that show? It sounds like the PHP module for Apache is using a different php.ini file then the CLI version.

Re: [PHP] php cli and mysql

2006-11-14 Thread [EMAIL PROTECTED]
Run this command: /path/to/cli/php -i|grep MYSQL_SOCKET What does that show? It sounds like the PHP module for Apache is using a different php.ini file then the CLI version. It also looks like the CLI versions php.ini is not pointing to the proper path to the mysql.sock. Look under the mysql se

Re: [PHP] php cli and mysql

2006-11-14 Thread James Tu
ok. so the location of mysql.sock is a problem. I found it at /tmp/mysql.sock Why is the CLI looking for it at /var/myslq/mysql.sock? Now the question is... Do I change the mysql settings so that mysql.sock is at /tmp/ mysql.sock? (If I do, will the PHP module with Apache still be ok?) or Do

Re: [PHP] php cli and mysql

2006-11-14 Thread cajbecu
touch /var/mysql/mysql.sock chmod 777 /var/mysql/mysql.sock On 11/14/06, James Tu <[EMAIL PROTECTED]> wrote: I'm running a php script from the command line (I'm on OS X) and I'm getting ... Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)

Re: [PHP] php-cli and daemon

2006-05-15 Thread Richard Lynch
On Sat, May 13, 2006 5:40 pm, Michelle Konzack wrote: > I run a webserver which is a frontend for a huge PostgreSQL database. > Now I like to code some stand-alone Apps, which can connect to a > daemon uploading files and geting infos from the database > > (NO, the have no right to connect directly

Re: [PHP] php-cli and daemon

2006-05-15 Thread chris smith
On 5/14/06, Michelle Konzack <[EMAIL PROTECTED]> wrote: Hello, I run a webserver which is a frontend for a huge PostgreSQL database. Now I like to code some stand-alone Apps, which can connect to a daemon uploading files and geting infos from the database (NO, the have no right to connect direc

Re: [PHP] PHP CLI not present

2006-04-19 Thread Richard Lynch
On Wed, April 19, 2006 3:01 pm, Jeff wrote: > I'm running PHP Ver 4.4.1 on a redhat ES3 system. It appears that the > CLI is not running or not present. I thought it was installed by > default in versions >= 4.3.x. > > If I run /usr/local/bin/php -v at the command line I get nothing. > > How do

RE: [PHP] PHP CLI not present [SOLVED]

2006-04-19 Thread Jeff
> -Original Message- > From: Jeff [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 19, 2006 16:02 > To: php-general@lists.php.net > Subject: [PHP] PHP CLI not present > > > Hey all, > > I'm running PHP Ver 4.4.1 on a redhat ES3 system. It appears > that the CLI is not running or not

RE: [PHP] PHP CLI - possible for mass mailing?

2005-09-27 Thread Jim Moseby
> -Original Message- > From: Denis Gerasimov [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 27, 2005 1:45 AM > To: PHP General Mailing List > Subject: [PHP] PHP CLI - possible for mass mailing? > > > Hello List, > > > > We are working on a PHP project that implements mass mailin

Re: [PHP] PHP CLI - possible for mass mailing?

2005-09-27 Thread Torgny Bjers
Denis Gerasimov wrote: > We are working on a PHP project that implements mass mailing to a large > number of its subscribers (expected 100,000-200,000 users; not spam mailing > BTW). So I am wondering if it is possible to use PHP CLI binary for this > purpose and if there are any problems with PHP

Re: [PHP] php cli script with if-then's very slow

2005-08-18 Thread Richard Lynch
On Thu, August 18, 2005 2:14 am, Frans Fierens wrote: > I've noticed that php cli scripts using for-loops with some > if...then's > are very slow using the php cli (command line interface). The > following > php script takes somewhat 100 seconds (php v5.0.3 on a redhat linux, 3 > Ghz PC). The same

Re: [PHP] php-cli stopping on exit.

2003-08-26 Thread Edin Kadribasic
It works fine here. Do you have any additional extensions enabled in php.ini? Edin - Original Message - From: "Simon Fredriksson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 26, 2003 7:24 AM Subject: [PHP] php-cli stopping on exit. Can someone explain why PHP free

RE: [PHP] php-cli - Controlling external programs

2003-07-31 Thread Jay Blanchard
[snip] Bah, not the answer I was looking for...I really wanted to use PHP and I have most of what I wanted accomplished. Thanks for the tip, I will investigate. [/snip] http://us3.php.net/features.commandline If you use -a for your command line script the script will run interactively example:

Re: [PHP] php-cli - Controlling external programs

2003-07-30 Thread Tom Rogers
Hi, Thursday, July 31, 2003, 1:53:50 PM, you wrote: MM> I'm writing a script to be run from the command line. It controls my DAT MM> autoloader (tape changer) and runs tar so that I can automate my backups. MM> With the -M option, tar will prompt for a new tape when the current tape is MM> full. H

Re: [PHP] php-cli - Controlling external programs

2003-07-30 Thread Mike Maltese
Bah, not the answer I was looking for...I really wanted to use PHP and I have most of what I wanted accomplished. Thanks for the tip, I will investigate. "Chris Shiflett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > --- Mike Maltese <[EMAIL PROTECTED]> wrote: > > I'm writing a scr

Re: [PHP] php-cli - Controlling external programs

2003-07-30 Thread Chris Shiflett
--- Mike Maltese <[EMAIL PROTECTED]> wrote: > I'm writing a script to be run from the command line. ... > How can I get the signal from tar that the tape needs to be changed? It sounds like you are wanting to write an interactive shell script. If this is the case (e.g., I didn't misunderstand), yo

Re: [PHP] PHP cli on Mac OSX

2003-07-30 Thread Curt Zirzow
* Thus wrote René Fournier ([EMAIL PROTECTED]): > Hello, > > I installed Entropy package of PHP on my 10.2.6 OSX > (http://www2.entropy.ch/download/Entropy-PHP-4.3.2-5.dmg), which states > that it includes PHP command line. But when I go to Terminal and type > "PHP somescript.php4", it returns

Re: [PHP] PHP CLI question

2003-06-06 Thread Monte Ohrt
ok, so there are plenty of ways to work around it ;-) I guess my original question should be answered as such? "No, you cannot specify a different configuration file name other than php.ini, you must either hack the C code or supply a workaround at runtime." Monte On Thu, 2003-06-05 at 15:07, Mar

Re: [PHP] PHP CLI question

2003-06-06 Thread Mark
Wrap it in a shell script or batch file. Something like: REM ---Start cli.bat--- ./cli/php.exe -c <> %1 %2 %3 %4 %5 %6 %7 %8 %9 @exit REM ---End cli.bat--- --- Monte Ohrt <[EMAIL PROTECTED]> wrote: > Hi Adam, > > I know it can be altered with a command-line switch, but it is the > default tha

Re: [PHP] PHP CLI question

2003-06-06 Thread Jason Wong
On Friday 06 June 2003 01:43, Monte Ohrt wrote: > I know it can be altered with a command-line switch, but it is the > default that I want to change. I don't want to have to remember to set > the -c flag everytime, or go back and change all my existing scripts. You can run separate ./configure co

Re: [PHP] PHP CLI question

2003-06-06 Thread Monte Ohrt
Hi Adam, I know it can be altered with a command-line switch, but it is the default that I want to change. I don't want to have to remember to set the -c flag everytime, or go back and change all my existing scripts. Monte On Thu, 2003-06-05 at 09:53, Adam Voigt wrote: > >From a ./php -h: > >

Re: [PHP] PHP CLI question

2003-06-06 Thread Marek Kilimajer
Or as Jason noted at compile time. Monte Ohrt wrote: ok, so there are plenty of ways to work around it ;-) I guess my original question should be answered as such? "No, you cannot specify a different configuration file name other than php.ini, you must either hack the C code or supply a workaround

  1   2   >