[PHP] PHP CLI setting cooked terminal mode

2013-09-11 Thread Alain Williams
that it really is PHP that is messing the tty modes): ./myScript /dev/null | (sleep 10;less) However: PHP should not set the terminal to cooked mode in the first place Is there any way in which I can get PHP to not do this ? TIA I am running PHP 5.3.3 on CentOS 6. -- Alain Williams Linux/GNU

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 a...@phcomp.co.uk 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

Re: [PHP] Trying to understand what I've broken to not allow mkdir() to work.

2013-05-16 Thread Alain Williams
help would be good. Have you got SELinux switched on ? Try: ls -lZ getenforce -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information

Re: [PHP] SPL Recursive Iterator Examples

2013-03-19 Thread Alain Williams
be good if there were plentiful comments that said what they were supposed to do, why, how ... Regards -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration

Re: [PHP] Customized Session Handler can not work for PHP 5.1.6 and CentOS 5.5

2012-04-16 Thread Alain Williams
caught by selinux - try setenforce off and see if that makes it work. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Alain Williams
and returns failure. That is much clearer than extra variables. If I survey my code I find that I use one GOTO in about 4,000 lines of code - that I do not find excessive. There are, however, people who consider any GOTO as communion with the devil. IMHO: not so - if used sparingly. -- Alain

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Alain Williams
On Mon, Feb 06, 2012 at 09:28:10AM -0700, Larry Martell wrote: On Mon, Feb 6, 2012 at 9:23 AM, Alain Williams a...@phcomp.co.uk wrote: If I survey my code I find that I use one GOTO in about 4,000 lines of code - that I do not find excessive. There are, however, people who consider

Re: [PHP] Way to output HTML on professional websites

2011-12-27 Thread Alain Williams
. I just finished up five weeks at a company where they were calling probably upwards of 100 files before printing anything on screen. Have a look at smarty: http://www.smarty.net/ I like it a lot ... helps with complicated web sites. -- Alain Williams Linux/GNU Consultant - Mail systems

Re: [PHP] PHP script won't run in the background

2011-11-30 Thread Alain Williams
completely stuck :( The point is that you need to completely disassociate the process from the tty. Install the daemonize program, then use it to run your PHP script. See: http://software.clapper.org/daemonize/ It claims to run under OSx (which is just BSD Unix). -- Alain Williams Linux/GNU

Re: [PHP] PHP script won't run in the background

2011-11-30 Thread Alain Williams
script starts - so nothing that you can do to stop it. #13 0x00010a3efff8 in main () Try the daemonize that I wrote about a few minutes ago. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk

Re: [PHP] PHP script won't run in the background

2011-11-23 Thread Alain Williams
it into single character at a time mode (remove stty's icanon). It could have decided that since it is a tty then that should be set. You need a bit more info, get a backtrace with 'where'. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787

Re: [PHP] Parsing the From field

2011-11-19 Thread Alain Williams
/... do it in different ways. If you really want to have fun look at the different 'norms' from different countries. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd

Re: [PHP] Up to date book on PHP security?

2011-11-11 Thread Alain Williams
-- easy to read, 1/2 day, and gives you a big picture. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php

Re: [PHP] Placing the masterpassword

2011-11-01 Thread Alain Williams
then difficult to change. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include std_disclaimer.h

[PHP] Extending an instantiated class

2011-10-15 Thread Alain Williams
: $f2 = new $s Form(); or $f2 = $s-new Form(); -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php

[PHP] Re: Extending an instantiated class

2011-10-15 Thread Alain Williams
On Sat, Oct 15, 2011 at 03:01:44PM +0100, Alain Williams wrote: Well, that is what I think that I need. Please let me explain what I am trying to do and tell me how to do it or a better way of doing it. .. I have solved it. The problem is basically one of ensuring that properties

Re: [PHP] Running PHP5 in a PHP4 environment

2011-05-13 Thread Alain Williams
identifiable error code out of PHP 4 to indicate it's hit PHP 5 code it doesn't understand? Would your time not be better spent getting the system upgraded to PHP5 ? PHP 4 was depricated some time ago. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer

[PHP] Removing/unsetting session variables.

2003-12-24 Thread Alain Williams
Christmas. -- Alain Williams #include std_disclaimer.h FATHERS-4-JUSTICE - Campaigning for equal rights for parents and the best interests of our children. See http://www.fathers-4-justice.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] include_path

2003-12-22 Thread Alain Williams
'require' gets the production/test version of a file. Please CC me on any reply since I don't subscribe to this list. Thanks -- Alain Williams #include std_disclaimer.h FATHERS-4-JUSTICE - Campaigning for equal rights for parents and the best interests of our children. See http://www.fathers-4

[PHP] Default mode -- Output buffering ??

2003-07-17 Thread Alain Williams
/configure option that I can set to get the original behaviour or a command line switch to specify 'html on' or something ? I have looked but cannot find anything. Thanks in advance. -- Alain Williams #include std_disclaimer.h -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

[PHP] Call by reference to function arguments

2003-07-07 Thread Alain Williams
'; $b = '2'; $c = '3'; foo($a, $b, $c); What I am doing is quite different than the above (and more complex), but I will be able to achieve what I want if I can get the above to work. -- Alain Williams #include std_disclaimer.h -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Call by reference to function arguments

2003-07-07 Thread Alain Williams
('$a','return($a+1);'), $args); return ($args); } list ($a, $b, $c) = foo(1, 2, 3); echo ($a, $b, $c); No, the reason that I want to do it is for the same reason that sscanf() does it -- I want to change the values of the variables that are passed to it. -- Alain Williams #include