[PHP] PHP extension for equivalen of getent?
Hello and good morning, I use php-pam for authentication but nowI have the need for something which give me the ${HOME} directory back. Does someone know, whether there is a PHP extension like getenv or something which give the passwd fields back? Note: I am using libpam-pgsql and libnss-pgsql2 which mean, I can not grep /etc/passwd or use getent. Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsyst...@tdnet France EURL itsyst...@tdnet UG (limited liability) Owner Michelle KonzackOwner Michelle Konzack Apt. 917 (homeoffice) 50, rue de Soultz Kinzigstraße 17 67100 Strasbourg/France 77694 Kehl/Germany Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil Tel: +33-9-52705884 fix http://www.itsystems.tamay-dogan.net/ http://www.flexray4linux.org/ http://www.debian.tamay-dogan.net/ http://www.can4linux.org/ Jabber linux4miche...@jabber.ccc.de Linux-User #280138 with the Linux Counter, http://counter.li.org/ signature.pgp Description: Digital signature
Re: [PHP] PHP extension for equivalen of getent?
On Fri, Jan 7, 2011 at 12:30 AM, Michelle Konzack linux4miche...@tamay-dogan.net wrote: Does someone know, whether there is a PHP extension like getenv or something which give the passwd fields back? http://php.net/posix -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP extension for equivalen of getent?
Hello Michael Shadle, Am 2011-01-07 00:35:38, hacktest Du folgendes herunter: http://php.net/posix Grmpf! Time to get a new PHP Book... 2002 is rather old! Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsyst...@tdnet France EURL itsyst...@tdnet UG (limited liability) Owner Michelle KonzackOwner Michelle Konzack Apt. 917 (homeoffice) 50, rue de Soultz Kinzigstraße 17 67100 Strasbourg/France 77694 Kehl/Germany Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil Tel: +33-9-52705884 fix http://www.itsystems.tamay-dogan.net/ http://www.flexray4linux.org/ http://www.debian.tamay-dogan.net/ http://www.can4linux.org/ Jabber linux4miche...@jabber.ccc.de ICQ#328449886 Linux-User #280138 with the Linux Counter, http://counter.li.org/ signature.pgp Description: Digital signature
RE: [PHP] Newbie Question
{snip] ...stuff about tedd... [/snip] Thank goodness there is someone on the list much older than me. [snip] PS: It's not Friday yet. [/snip] It is now. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Command line PHP
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 sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? (Open source, GPLv2-compatible required.) --Larry Garfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 interation. I'm not sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? (Open source, GPLv2-compatible required.) --Larry Garfield Larry- Why are you writing a command line application in PHP? I would think that is starting off on a very wrong foot. Can you explain the requirements / use cases a bit more? Regards, -Josh Joshua Kehn | josh.k...@gmail.com http://joshuakehn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 command line interation. I'm not sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? I've never used any external libraries, I always built my interface to suit the project at hand. Are you looking for it to run as its own pseudo shell, or just a basic batch script or daemon-style application? -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
(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 all the output is just echo statements with new lines rather than br tags. getopt() is your friend for command line arguments, but not all windows systems will support it, although Linux is fine. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: la...@garfieldtech.com la...@garfieldtech.com Date: Fri, Jan 7, 2011 16:55 Subject: [PHP] Command line PHP To: php-general@lists.php.net 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 sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? (Open source, GPLv2-compatible required.) --Larry Garfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 over a thousand command line applications in PHP since about 2003. For a variety of reasons and uses (more and more because my wife needs something done or I'm adding more home automation stuff) I write no less than ten each week. For the majority, it's because it's easier than writing it in C and more portable than Bash --- I can write a PHP script and put it on a dozen machines at home and in the offices and it'll work the same (when written properly). No need to worry about OS or architecture. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams 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 applications. Regards, -Josh Joshua Kehn | josh.k...@gmail.com http://joshuakehn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 applications. One might argue that it depends on your mastery of and comfort with the language. That in mind, the same is true of nearly any programming language. And thanks for reminding me of what PHP is at its core. ;-P -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 command line interation. I'm not sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? (Open source, GPLv2-compatible required.) --Larry Garfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If all you want is a way to handle command line arguments, I built a library to do that a few years ago. I got sick of needing to switch languages to write a quick command-line script, and I hated the PEAR CLI tools. I haven't really looked at it since, and since it was just about the first thing I wrote that was object oriented I suspect it's got some problems, but you're welcome to give it a try. http://people.chem.umass.edu/amckenzie/code/php/php_cli_io/ It handles flags both with and without short forms, and flags with either zero, one or two arguments. The demo file in the package has the docs written into it -- read through it to see how the library works. If anyone tries it, let me know what you think, and what I've done wrong. It does everything I need, but I don't think anyone else has ever used it. -Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 as say Python for developing standalone applications. One might argue that it depends on your mastery of and comfort with the language. That in mind, the same is true of nearly any programming language. And thanks for reminding me of what PHP is at its core. ;-P -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ 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. It does completely depend on your mastery of the language. If you're very good with PHP and you don't often do non-web things it might not make sense to learn another language as well. Regards, -Josh Joshua Kehn | josh.k...@gmail.com http://joshuakehn.com
Re: [PHP] Command line PHP
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. PHP at it's core is a templating language. I don't think it is as suited as say Python for developing standalone applications. One might argue that it depends on your mastery of and comfort with the language. That in mind, the same is true of nearly any programming language. And thanks for reminding me of what PHP is at its core. ;-P -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ 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. 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 require threading. It does completely depend on your mastery of the language. If you're very good with PHP and you don't often do non-web things it might not make sense to learn another language as well. 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. -nathan
Re: [PHP] Command line PHP
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 core is a templating language. I don't think it is as suited as say Python for developing standalone applications. One might argue that it depends on your mastery of and comfort with the language. That in mind, the same is true of nearly any programming language. And thanks for reminding me of what PHP is at its core. ;-P -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ 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. It does completely depend on your mastery of the language. If you're very good with PHP and you don't often do non-web things it might not make sense to learn another language as well. Regards, -Josh Joshua Kehn | josh.k...@gmail.com http://joshuakehn.com 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 small code change. Yes PHP is primarily a web-based language, but there's no reason it can't be used other places too. In fact, I've even got PHP installed on my Android phone, although I've yet to find a practical use for that! Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Command line PHP
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 require threading. It does completely depend on your mastery of the language. If you're very good with PHP and you don't often do non-web things it might not make sense to learn another language as well. 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. -nathan You can't say that PHP is a more natural CLI choice then bash or Python. Maybe I'm using PHP too much for web development. Perhaps I am unfamiliar with it. 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. Regards, -Josh Joshua Kehn | josh.k...@gmail.com http://joshuakehn.com
Re: [PHP] Command line PHP
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 small code change. Yes PHP is primarily a web-based language, but there's no reason it can't be used other places too. In fact, I've even got PHP installed on my Android phone, although I've yet to find a practical use for that! Thanks, Ash http://www.ashleysheridan.co.uk I don't see a reason other then I find other languages more nimble for small scripts. If you are using lots of shared PHP code then of course it would make sense to leverage that existing code rather then re-implement it. The OP was asking (I assume) about a standalone application built from scratch. I would kill for a PHP interpreter (+ Haskell and Python) on iOS. Unfortunately I haven't found one. Regards, -Josh Joshua Kehn | josh.k...@gmail.com http://joshuakehn.com
Re: [PHP] Command line PHP
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 opinion, Josh, no worries. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 abstracted and standalone and all of that jazz, but it will need to do command line interation. I'm not sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? (Open source, GPLv2-compatible required.) --Larry Garfield Larry- Why are you writing a command line application in PHP? I would think that is starting off on a very wrong foot. Can you explain the requirements / use cases a bit more? I agree. Not saying that it isn't doable, because it certainly is, but there may be other languages that are available and easier to implement a CLI app, such as Python, or some other QnD scripting language. 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 million records around between different data stores, a process that will probably take an hour or so. (The backend will be cycling through a queue server.) I just need something to make handling of the args and environment easier, because I find the native SAPI calls to be ugly/cumbersome. I'm sure it could be written in Perl or Python or Java. But I know extremely little Perl, no Python, and my Java is quite rusty, plus there are mature PHP libraries that talk to the 3rd party systems I'm tying together. My PHP-fu is much stronger than my Perl, Python, and Java combined. OT Yeah, PHP was intended as a template language only; that fell by the wayside a decade ago or more when people started building real web apps in it, which are a lot more than templates. That boat has long since sailed and is irrelevant to this discussion. /OT --Larry Garfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 CLI-appropriate languages, there are times where you'd still choose to use PHP in this role. For example, our data access layer is written in PHP. It was an easy choice to write our sitemap-generating tool in PHP even though I am more comfortable in Java and Python. The right tool for the job rarely depends on only one or two factors. :) David
Re: [PHP] Command line PHP
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 language. I don't think it is as suited as say Python for developing standalone applications. One might argue that it depends on your mastery of and comfort with the language. That in mind, the same is true of nearly any programming language. And thanks for reminding me of what PHP is at its core. ;-P -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ 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. It does completely depend on your mastery of the language. If you're very good with PHP and you don't often do non-web things it might not make sense to learn another language as well. I disagree... many of my cron/shell scripts leverage the very codebase that the site works on to do things for the site from the command-line. Why would I use another language that would require re-implementation of existing functionality? The right tool for the job depends on the job in question regardless of someone else's perception of the intended purpose of the tool. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 is ideal for on the cli, typically when you get into heavy forking or require threading. It does completely depend on your mastery of the language. If you're very good with PHP and you don't often do non-web things it might not make sense to learn another language as well. 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. -nathan You can't say that PHP is a more natural CLI choice then bash or Python. Maybe I'm using PHP too much for web development. Perhaps I am unfamiliar with it. Um, I just did say it :P It's pretty simple, I already know PHP, I don't know Python or BASH well enough, obviously PHP is the best choice for a CLI program in this case. Yeah.., try writing a few scripts in PHP on the CLI, you'll find it solid for many applications. 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 a joke. The idea is why bother learning an language that will score you little milage, in the context of the one you already know well. For example, if I'm a Web developer coding what CLI requirements I have in PHP, then I might venture to learn something like Javascript before ever touching Python. So yes, having mastery of multiple languages can help you, but it's best when these multiple languages don't overlap as much as PHP and Python. -nathan
Re: [PHP] Command line 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 million records around between different data stores, a process that will probably take an hour or so. (The backend will be cycling through a queue server.) I just need something to make handling of the args and environment easier, because I find the native SAPI calls to be ugly/cumbersome. I'm sure it could be written in Perl or Python or Java. But I know extremely little Perl, no Python, and my Java is quite rusty, plus there are mature PHP libraries that talk to the 3rd party systems I'm tying together. My PHP-fu is much stronger than my Perl, Python, and Java combined. OT Yeah, PHP was intended as a template language only; that fell by the wayside a decade ago or more when people started building real web apps in it, which are a lot more than templates. That boat has long since sailed and is irrelevant to this discussion. /OT --Larry Garfield In that case I can't offer any good CLI libs, but it sounds like a few others here could offer some. Regards, -Josh Joshua Kehn | josh.k...@gmail.com http://joshuakehn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 getopt() which worked well enough. Long options don't work on Windows IIRC (check the docs), but you can easily get arguments from short options. An example for the tool I wrote is src/sitemap.php -s 28372 -d mydomain.com -l debug -p -z 9 -b sitemaps -o xml The code that parses the options is very straightforward. If you already use Zend Framework, it has its own CLI library I think. David
Re: [PHP] Command line PHP
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 sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? (Open source, GPLv2-compatible required.) Hi Larry, I wrote the following some time ago: http://www.interjinn.com/jinnDoc/interJinn.class.JinnCoreServicesCliArguments.php It is tied to my framework, but could easily be lifted and embedded in a standalone class. License is GPL V2 so feel free to adapt as befits said license. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie Question
At 2:16 AM -0500 1/7/11, Daniel Brown wrote: On Thu, Jan 6, 2011 at 23:09, Bill Guion bgu...@comcast.net wrote: Fogging must be a REAL OLD Fashioned term. Please clarify. It was originally written before man invented the letter 'L', Bill. No, it was the predecessor to water-boarding. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 nice and abstracted and standalone and all of that jazz, but it will need to do command line interation. I'm not sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? (Open source, GPLv2-compatible required.) --Larry Garfield Larry- Why are you writing a command line application in PHP? I would think that is starting off on a very wrong foot. Can you explain the requirements / use cases a bit more? I agree. Not saying that it isn't doable, because it certainly is, but there may be other languages that are available and easier to implement a CLI app, such as Python, or some other QnD scripting language. Pardon me but what's the big deal? Put a shebang up top and then add: // // -- // Get CLI args from argv // -- // function getargs($argv) { // ./cli.php file1 file2 --path=/foo/bar -t -B quux // getargs($GLOBALS['argv']) $args['self'] = array_shift( $argv ) ; while( 0 sizeof( $argv ) ) { $arg = array_shift( $argv ) ; if( '--' == substr( $arg , 0 , 2 ) ) { $eq = strpos( $arg , '=' ) ; $name = substr( $arg , 2 , $eq - 2 ) ; $val = substr( $arg , $eq + 1 ) ; $args[$name][] = $val ; } else if( '-' == $arg[0] ) { $name = substr( $arg , 1 ) ; if (isset($argv[0][0]) ( '-' != $argv[0][0] )) { $val = array_shift( $argv ) ; } else { $val = '' ; } $args[$name][] = $val ; } else { $args['file'][] = substr( $arg , 0 ) ; } } return $args ; } // -- // Main // -- //Get CLI options $args = getargs($GLOBALS['argv']); //Display Basic Help if (isset($args['h']) || isset($args['help'])) { echo ./your_php_cli_app.php -h \n; echo -h - displays this help\n; echo ... is more of your command line args\n; echo \n; exit; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 myscript.php --config=foo.xml --setting-1=stuff For this I used getopt() which worked well enough. Long options don't work on Windows IIRC (check the docs), but you can easily get arguments from short options. An example for the tool I wrote is src/sitemap.php -s 28372 -d mydomain.com -l debug -p -z 9 -b sitemaps -o xml The code that parses the options is very straightforward. If you already use Zend Framework, it has its own CLI library I think. David getopt() doesn't work well on Windows on early versions of PHP 5.2 at all, as I found to my dismay at work. As an alternative, I used the $GLOBALS['argv'] array, which contains the command line arguments, although not in as nice a format as you get them from getopt() Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Command line 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 javascript. -nathan And don't forget MySQL, HTML and CSS (if you want to call them languages). We are a ways from having one unified language, but closer than we were a few years ago. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 need to do command line interation. I'm not sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? (Open source, GPLv2-compatible required.) Hi Larry, I wrote the following some time ago: http://www.interjinn.com/jinnDoc/interJinn.class.JinnCoreServicesCliArguments.php It is tied to my framework, but could easily be lifted and embedded in a standalone class. License is GPL V2 so feel free to adapt as befits said license. I just realized it's one of my lazy classes and so it's not fully documented :) It would be as simple as (if converted to a standalone class): ?php $args = new CliArgs(); $param1 = $args-getArg( 'param1' ); $param2 = $args-getArg( 'param2' ); $files = $args-getSequence(); ? For any of the following command-lines: ./myscript.php --param1=foo --param2=fee file1 file2 file3 ./myscript.php --param1 foo --param2 fee file1 file2 file3 ./myscript.php -param1=foo -param2=fee file1 file2 file3 ./myscript.php -param1 foo -param2 fee file1 file2 file3 Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 a joke. The idea is why bother learning an language that will score you little milage, in the context of the one you already know well. For example, if I'm a Web developer coding what CLI requirements I have in PHP, then I might venture to learn something like Javascript before ever touching Python. So yes, having mastery of multiple languages can help you, but it's best when these multiple languages don't overlap as much as PHP and Python. -nathan nathan: I have to disagree with you a little-bit about this. If one knows the languages involved and realize their overlap, then they should have a better understanding of which language to use for what purpose. For example, which is better for styling CSS or Javascript? Both can do it, but one is the clear winner. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 can only enhance you. No, it's not a joke. The idea is why bother learning an language that will score you little milage, in the context of the one you already know well. For example, if I'm a Web developer coding what CLI requirements I have in PHP, then I might venture to learn something like Javascript before ever touching Python. So yes, having mastery of multiple languages can help you, but it's best when these multiple languages don't overlap as much as PHP and Python. -nathan nathan: I have to disagree with you a little-bit about this. If one knows the languages involved and realize their overlap, then they should have a better understanding of which language to use for what purpose. For example, which is better for styling CSS or Javascript? Both can do it, but one is the clear winner. Is the winner JavaScript? *ducks and runs* I love Fridays! Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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?** *Having a mastery of multiple languages can only enhance you. No, it's not a joke. The idea is why bother learning an language that will score you little milage, in the context of the one you already know well. For example, if I'm a Web developer coding what CLI requirements I have in PHP, then I might venture to learn something like Javascript before ever touching Python. So yes, having mastery of multiple languages can help you, but it's best when these multiple languages don't overlap as much as PHP and Python. -nathan nathan: I have to disagree with you a little-bit about this. If one knows the languages involved and realize their overlap, then they should have a better understanding of which language to use for what purpose. For example, which is better for styling CSS or Javascript? Both can do it, but one is the clear winner. agreed, however, if im a skilled js programmer and need some rounded corners, id probly just grab a library that leverages css to accomplish the job before sitting down and really learning css. or perhaps if my sql skills aren't strong enough, i know i can get the job done w/ some extra manipulation in php. one should consider how much time will be spent solving the current problem, how much time is available before the solution must ship, and if it's beneficial to learn something entirely new just to solve it when your current knowledge may provide a sufficient solution. we're comparing php to bash/python here and frankly id like to know what the main advantages of those languages over php for cli processing would be .. marginal at best. id hazard a guess that python supports threading tho :O moreover, if i already know php, python is probly one of the last languages i want to learn unless im considering abandoning php... the thought has occurred to me ducks id rather spend time learning something that runs fast like brushing up on java or maybe C or C++, that way i'll get more mileage for my time as i'll be more versatile with less overlap. it's like i could know 2 scripting languages w/ heavy overlap or 1 scripting language, and one compiled language, that seems better from my perspective. there are always merits to knowing a shell language tho, and i've wanted to get stronger with bash, but python .. i see it more as python OR php. i worked on an asterisk app one time w/ a php front-end and many of the asterisk hook scripts were written in bash. this was a poor choice imo. #1 we weren't leveraging code from the main app #2 now i'm looking at running mysql client through awk on the cli to get args into bash .. ouch. give me mysql_query(), lol. much easier for anyone coming into the biz who knows php to keep things consistent imo. 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 php's single inheritance paradigm. -nathan
Re: [PHP] Command line PHP
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 php's single inheritance paradigm. One other thing that improves PHP on the CLI front is the addition of garbage collection for circular references. Solves the occasional hard to find leak :) Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 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 sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? (Open source, GPLv2-compatible required.) --Larry Garfield Larry- Why are you writing a command line application in PHP? I would think that is starting off on a very wrong foot. Can you explain the requirements / use cases a bit more? I agree. Not saying that it isn't doable, because it certainly is, but there may be other languages that are available and easier to implement a CLI app, such as Python, or some other QnD scripting language. Pardon me but what's the big deal? Put a shebang up top and then add: [code] [/snip] There isn't a big deal. If PHP is the only suitable tool you have, go for it. There are plenty of ways to do this. My natural first reaction is to write it in Python, Ruby or something else. But thats me - my personal toolbox is chock full of languages. PHP only being one of them. That being said, have I ever written a CLI app in PHP - sure whenever I need a quick and dirty to move a few thousand records, or whatever, why not. As the OP has said (After my comment) his PHP-fu is strong, whereas in other languages are not. This in my humble opinion is the perfect time to use PHP. Do I ever see one language to be the end all be all for every application? No, absolutely not. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache and PHP segfaults on Redhat EL5
On Thu, Jan 6, 2011 at 22:55, Jimmy Stewpot mail...@oranged.to wrote: Is there a method or way that I can enable a 'debug' mode in php which would help me track down and identify the root cause of these problems? If anyone has any suggestions on what I can do to try and get further down the track to enlightenment I would be really appreciated. Natively, no, but the de facto standard is Derick's Xdebug package (http://xdebug.org/). If you can, compile PHP from source and do away with the EL5 package. That'll most likely rid you of the segfaults, but will leave their cause as an unsolved mystery. If you're okay with giving up and not knowing, you'll probably save yourself a lot of time and headaches. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 snakes. I have one tattooed on my back ;) -nathan
Re: [PHP] Command line PHP
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 PHP is a more natural CLI choice then bash or Python. Maybe I'm using PHP too much for web development. Perhaps I am unfamiliar with it. 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. Having got a basket of several dialects of machine code, cobol, fortran, algol, C, C++, pascal, javascript, and probably a few more ... it WOULD be nice not to NOW have to learn java to fix Eclipse, python to fix Hg, ruby for some of my mapping requirements AND bash scripts to sort out keeping everything running. If a website is running background tasks to maintain the site, then using the SAME language for the command line functions makes perfect sense. The SAME library is doing the processing so any bugs should be the same which ever route is used. Trying to debug a fault which is also going cross language just adds to the complexity? I think this is one of the reasons that all this push to reinvent PHP into something it does not need to be is so annoying. How about a RealPHP which is frozen at some point where those of us who can't be bothered with Traits and all this other mumbo jumbo can simply carry on designing sites. And the people who are more interested in development for development sake can please themselves? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: PHP extension for equivalen of getent?
-Original Message- From: Michelle Konzack [mailto:linux4miche...@tamay-dogan.net] Sent: Friday, January 07, 2011 2:56 AM To: php-general@lists.php.net Subject: [PHP] Re: PHP extension for equivalen of getent? Hello Michael Shadle, Am 2011-01-07 00:35:38, hacktest Du folgendes herunter: http://php.net/posix Grmpf! Time to get a new PHP Book... 2002 is rather old! The only book I use for reference is the official online. You'll never be outdated. ;) Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie Question
On Fri, Jan 7, 2011 at 2:33 PM, tedd tedd.sperl...@gmail.com wrote: At 2:16 AM -0500 1/7/11, Daniel Brown wrote: On Thu, Jan 6, 2011 at 23:09, Bill Guion bgu...@comcast.net wrote: Fogging must be a REAL OLD Fashioned term. Please clarify. It was originally written before man invented the letter 'L', Bill. No, it was the predecessor to water-boarding. Only in cultural america. In other countries, it's still used as a public display of punishment and humiliation. And humiliation is beneficial to no one. And spankings never did me any good anyways:) Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Re: PHP extension for equivalen of getent?
Hello Tommy Pham, Am 2011-01-07 17:38:26, hacktest Du folgendes herunter: The only book I use for reference is the official online. You'll never be outdated. ;) :-) You are right and a TabetPC + GSM-Card will help... But if you are Off-Line, an Hadcope ofa command/function reference would be nice. It would be perfect if there where a PDF which describe the commands/functions in short Regards, Tommy Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsyst...@tdnet France EURL itsyst...@tdnet UG (limited liability) Owner Michelle KonzackOwner Michelle Konzack Apt. 917 (homeoffice) 50, rue de Soultz Kinzigstraße 17 67100 Strasbourg/France 77694 Kehl/Germany Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil Tel: +33-9-52705884 fix http://www.itsystems.tamay-dogan.net/ http://www.flexray4linux.org/ http://www.debian.tamay-dogan.net/ http://www.can4linux.org/ Jabber linux4miche...@jabber.ccc.de ICQ#328449886 Linux-User #280138 with the Linux Counter, http://counter.li.org/ signature.pgp Description: Digital signature
RE: [PHP] Re: Re: PHP extension for equivalen of getent?
-Original Message- From: Michelle Konzack [mailto:linux4miche...@tamay-dogan.net] Sent: Friday, January 07, 2011 7:20 PM To: php-general@lists.php.net Subject: [PHP] Re: Re: PHP extension for equivalen of getent? Hello Tommy Pham, Am 2011-01-07 17:38:26, hacktest Du folgendes herunter: The only book I use for reference is the official online. You'll never be outdated. ;) :-) You are right and a TabetPC + GSM-Card will help... But if you are Off-Line, an Hadcope ofa command/function reference would be nice. It would be perfect if there where a PDF which describe the commands/functions in short Regards, Tommy Thanks, Greetings and nice Day/Evening Michelle Konzack There's the chm download for the times when you're unplugged :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line 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 List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Re: Re: PHP extension for equivalen of getent?
Hello Tommy Pham, Am 2011-01-07 19:31:17, hacktest Du folgendes herunter: There's the chm download for the times when you're unplugged :) I was never able to open ths chm files under Debian Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsyst...@tdnet France EURL itsyst...@tdnet UG (limited liability) Owner Michelle KonzackOwner Michelle Konzack Apt. 917 (homeoffice) 50, rue de Soultz Kinzigstraße 17 67100 Strasbourg/France 77694 Kehl/Germany Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil Tel: +33-9-52705884 fix http://www.itsystems.tamay-dogan.net/ http://www.flexray4linux.org/ http://www.debian.tamay-dogan.net/ http://www.can4linux.org/ Jabber linux4miche...@jabber.ccc.de ICQ#328449886 Linux-User #280138 with the Linux Counter, http://counter.li.org/ signature.pgp Description: Digital signature
Re: [PHP] Apache and PHP segfaults on Redhat EL5
On Fri, 7 Jan 2011 16:24:13 -0500 Daniel Brown danbr...@php.net wrote: On Thu, Jan 6, 2011 at 22:55, Jimmy Stewpot mail...@oranged.to wrote: Is there a method or way that I can enable a 'debug' mode in php which would help me track down and identify the root cause of these problems? If anyone has any suggestions on what I can do to try and get further down the track to enlightenment I would be really appreciated. Natively, no, but the de facto standard is Derick's Xdebug package (http://xdebug.org/). If you can, compile PHP from source and do away with the EL5 package. That'll most likely rid you of the segfaults, but will leave their cause as an unsolved mystery. If you're okay with giving up and not knowing, you'll probably save yourself a lot of time and headaches. Also, you might try asking on a RH list or forum, this might be a known issue with a workaround. If all else fails, file a bug. -- Greg Bair PHP Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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 robust built on top of it that I could leverage rather than rolling my own one-off. Of course, I got lost somewhere in the language holy wars (dear god, people...) so I'll probably just take the roll my own approach. --Larry Garfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Command line PHP
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
[PHP] Re: Re: Re: PHP extension for equivalen of getent?
Michelle Konzack wrote: Hello Tommy Pham, Am 2011-01-07 19:31:17, hacktest Du folgendes herunter: There's the chm download for the times when you're unplugged :) I was never able to open ths chm files under Debian Thanks, Greetings and nice Day/Evening Michelle Konzack You might find http://xchm.sourceforge.net/ useful :-) Cheers -- David Robley Everyone has photographic memory...some don't have film! Today is Pungenday, the 8th day of Chaos in the YOLD 3177. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Re: Re: PHP extension for equivalen of getent?
Hello David Robley, Am 2011-01-08 16:25:38, hacktest Du folgendes herunter: You might find http://xchm.sourceforge.net/ useful :-) [ 'apt-cache policy xchm' ]- xchm: Installiert: 2:1.14-4 Kandidat: 2:1.14-4 Versions-Tabelle: *** 2:1.14-4 0 900 ftp://ftp2.de.debian.org lenny/main Packages 100 /var/lib/dpkg/status and it crash all the time... :-( Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsyst...@tdnet France EURL itsyst...@tdnet UG (limited liability) Owner Michelle KonzackOwner Michelle Konzack Apt. 917 (homeoffice) 50, rue de Soultz Kinzigstraße 17 67100 Strasbourg/France 77694 Kehl/Germany Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil Tel: +33-9-52705884 fix http://www.itsystems.tamay-dogan.net/ http://www.flexray4linux.org/ http://www.debian.tamay-dogan.net/ http://www.can4linux.org/ Jabber linux4miche...@jabber.ccc.de ICQ#328449886 Linux-User #280138 with the Linux Counter, http://counter.li.org/ signature.pgp Description: Digital signature