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

2011-11-30 Thread richard gray
On 29/11/2011 17:16, Daniel Brown wrote: On Sat, Nov 19, 2011 at 09:33, richard grayr...@richgray.com wrote: This happens because PHP is writing to STDOUT, of course, and then the command line redirection grabs that information and puts it into the file. Unfortunately, by itself, this won't

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

2011-11-30 Thread richard gray
On 23/11/2011 18:49, Alain Williams wrote: On Wed, Nov 23, 2011 at 06:14:07PM +0100, richard gray wrote: Reading symbols for shared libraries + done 0x000101d057ee in __ioctl () Any clues? To me it looks like PHP cli is trying to do some I/O but I'm just a dumb developer... :) ioctl on a

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

2011-11-30 Thread Alain Williams
On Wed, Nov 30, 2011 at 12:58:26PM +0100, richard gray wrote: On 29/11/2011 17:16, Daniel Brown wrote: On Sat, Nov 19, 2011 at 09:33, richard grayr...@richgray.com wrote: This happens because PHP is writing to STDOUT, of course, and then the command line redirection grabs that information

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

2011-11-30 Thread Alain Williams
On Wed, Nov 30, 2011 at 01:01:48PM +0100, richard gray wrote: You need a bit more info, get a backtrace with 'where'. Thanks for the response Alain - below is the output:- Ah, much more useful . [rich@LeMans] (/Web/scripts) gdb --pid=3294 GNU gdb 6.3.50-20050815 (Apple version gdb-1708)

[PHP] Re: Yaf_Route

2011-11-30 Thread Eduárd Moldovan
Hey Laruence, I have tried the below example, but did not really get it work. My code looks like this: public function _initRoute(Yaf_Dispatcher $dispatcher) { $route = new Yaf_Route_Regex ( #(.*)#, array( controller = index,

[PHP] Re: Yaf_Route

2011-11-30 Thread Laruence
Hi: Yaf_Router::addRoute is not a static method. you should do like: $dispatcher-getRouter()-addRoute(regex, $route); // http://www.php.net/manual/en/yaf-dispatcher.getrouter.php btw: when you in development environ, it is useful to keep error_reporting on and look at error_log

[PHP] Re: Yaf_Route

2011-11-30 Thread Eduárd Moldovan
Hello, That worked like a charm! Thx! I thought that the error reporting was on, sorry for that. edi 2011/11/30 Laruence larue...@php.net Hi: Yaf_Router::addRoute is not a static method. you should do like: $dispatcher-getRouter()-addRoute(regex, $route); //

[PHP] yaf modules and plugins

2011-11-30 Thread Moldován Eduárd
Hey Laruence, I have another more questions. Modules and plugins. How do they work, how are they loaded? In my current php framework database is a module, cache also. There are no plugins there. Thx in advance,

[PHP] mcrypt_encrypt help needed

2011-11-30 Thread Rick Dwyer
Hello all. I am using the following function to encrypt a string: define('SALT', 'myvalueforsalthere'); function encrypt($text) { return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SALT, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256,

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Matijn Woudt
On Wed, Nov 30, 2011 at 9:57 PM, Rick Dwyer rpdw...@earthlink.net wrote: Hello all. I am using the following function to encrypt a string: define('SALT', 'myvalueforsalthere'); function encrypt($text) {    return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SALT, $text,

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Adam Richardson
On Wed, Nov 30, 2011 at 3:57 PM, Rick Dwyer rpdw...@earthlink.net wrote: Hello all. I am using the following function to encrypt a string: define('SALT', 'myvalueforsalthere'); function encrypt($text) { return trim(base64_encode(mcrypt_**encrypt(MCRYPT_RIJNDAEL_256, SALT, $text,

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Adam Richardson
On Wed, Nov 30, 2011 at 4:14 PM, Matijn Woudt tijn...@gmail.com wrote: On Wed, Nov 30, 2011 at 9:57 PM, Rick Dwyer rpdw...@earthlink.net wrote: Hello all. I am using the following function to encrypt a string: define('SALT', 'myvalueforsalthere'); function encrypt($text) {

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Matijn Woudt
On Wed, Nov 30, 2011 at 10:18 PM, Adam Richardson simples...@gmail.com wrote: On Wed, Nov 30, 2011 at 4:14 PM, Matijn Woudt tijn...@gmail.com wrote: On Wed, Nov 30, 2011 at 9:57 PM, Rick Dwyer rpdw...@earthlink.net wrote: Hello all. I am using the following function to encrypt a string:

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Adam Richardson
On Wed, Nov 30, 2011 at 4:25 PM, Matijn Woudt tijn...@gmail.com wrote: On Wed, Nov 30, 2011 at 10:18 PM, Adam Richardson simples...@gmail.com wrote: On Wed, Nov 30, 2011 at 4:14 PM, Matijn Woudt tijn...@gmail.com wrote: On Wed, Nov 30, 2011 at 9:57 PM, Rick Dwyer rpdw...@earthlink.net

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Matijn Woudt
On Wed, Nov 30, 2011 at 10:34 PM, Adam Richardson simples...@gmail.com wrote: On Wed, Nov 30, 2011 at 4:25 PM, Matijn Woudt tijn...@gmail.com wrote: On Wed, Nov 30, 2011 at 10:18 PM, Adam Richardson simples...@gmail.com wrote: On Wed, Nov 30, 2011 at 4:14 PM, Matijn Woudt tijn...@gmail.com

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Rick Dwyer
My decrypt is below: $myval=$_GET[myval]; // let the encryption begin define('SALT', 'myvalueforsalthere'); function decrypt($text) { return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, SALT, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256,

[PHP] compare dates

2011-11-30 Thread Marc Fromm
I'm puzzled why the if statement executes as true when the first date (job_closedate) is not less than the second date (now). The if statement claims that 12/02/2011 is less than 11/30/2011. if (date(m/d/Y,strtotime($jobs_closedate)) = date(m/d/Y,strtotime(now))){

Re: [PHP] compare dates

2011-11-30 Thread Matijn Woudt
On Wed, Nov 30, 2011 at 11:00 PM, Marc Fromm marc.fr...@wwu.edu wrote: I'm puzzled why the if statement executes as true when the first date (job_closedate) is not less than the second date (now). The if statement claims that 12/02/2011 is less than 11/30/2011.                if

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Matijn Woudt
On Wed, Nov 30, 2011 at 10:57 PM, Rick Dwyer rpdw...@earthlink.net wrote: My decrypt is below: $myval=$_GET[myval]; // let the encryption begin define('SALT', 'myvalueforsalthere'); function decrypt($text) {    return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, SALT,

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Rick Dwyer
On Nov 30, 2011, at 5:13 PM, Matijn Woudt wrote: Your decrypt function seems fine, and the encrypt/decrypt functions work fine both in the same file for me. Now you say you use $_GET[myval], which means you get them from URL. Base64 is not URL safe, have you used urlencode()? Matijn OK,

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Matijn Woudt
On Thu, Dec 1, 2011 at 1:14 AM, Rick Dwyer rpdw...@earthlink.net wrote: On Nov 30, 2011, at 5:13 PM, Matijn Woudt wrote: Your decrypt function seems fine, and the encrypt/decrypt functions work fine both in the same file for me. Now you say you use $_GET[myval], which means you get them from

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Rick Dwyer
On Nov 30, 2011, at 7:38 PM, Matijn Woudt wrote: On Thu, Dec 1, 2011 at 1:14 AM, Rick Dwyer rpdw...@earthlink.net wrote: On Nov 30, 2011, at 5:13 PM, Matijn Woudt wrote: Your decrypt function seems fine, and the encrypt/decrypt functions work fine both in the same file for me. Now you say

Re: [PHP] compare dates

2011-11-30 Thread Floyd Resler
On Nov 30, 2011, at 5:04 PM, Matijn Woudt wrote: On Wed, Nov 30, 2011 at 11:00 PM, Marc Fromm marc.fr...@wwu.edu wrote: I'm puzzled why the if statement executes as true when the first date (job_closedate) is not less than the second date (now). The if statement claims that 12/02/2011 is