mcrypt works on CGI but nor with apache module (DSO)
| From: | TSI Mail | Date: | Tue, 03 Oct 2000 17:58:45 +0000 |
| Subject: | mcrypt works on CGI but nor with apache module (DSO) | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-111@lists.php.net to get a copy of this message | ||
Hello List Members,
i installed PHP 4.0.2 as DSO and compiled GD, mcyrpt and other stuff
needed.
here is how i build it:
./configure
--with-apxs=/usr/local/www/bin/apxs
--with-config-file-path=/usr/local/www/
--with-mysql=/usr/local/mysql
--with-jpeg-dir=/usr/lib
--with-xpm-dir=/usr/X11R6
--enable-track-vars
--enable-url-includes
--enable-ftp
--with-gd
--with-ttf
--enable-xml
--disable-debug
--enable-magic-quotes
--with-mhash
--enable-wddx
--enable-sysvsem
--enable-sysvshm
--with-zlib
--with-mcrypt
i also installed PHP as CGI (in addition) because of some cron jobs
i have to sheudule.
I used the same ./configure statements just exchanged
--with-apxs=/usr/local/www/bin/apxs
with
--enable-discard-path
Okay.
The Problem is now, that using the biary(cgi) will work with mcrypt
but, when i open a mcrypt test-file via a web-browser, the page will
not shown and the browser tells me that there could be no connection
established or that the document contains no data.
here is the mcrypt test code:
<?php
$iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);
$key = "This is a very secret key";
$text = "Meet me at 11 o'clock behind the monument.";
echo strlen ($text)."\n";
$crypttext = mcrypt_encrypt (MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
echo strlen ($crypttext)."\n";
?>
the above example prints out: 42
64
but ONLY when i call the script via
command Line !
When i point a browser on it, i get "no connection" or "document
contains no data".
What could this be ?
Best wishes,
Holger
PS: Here is my phpinfo()
http://193.141.227.13/test.php