Resolved: More on PHP 4.0 Bug #6742 Updated: mail function fails
| From: | Lee Davis | Date: | Wed, 22 Nov 2000 09:57:35 +0000 |
| Subject: | Resolved: More on PHP 4.0 Bug #6742 Updated: mail function fails | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4039@lists.php.net to get a copy of this message | ||
Hi all
At last I have realised what has been causing my mail problem .
I was running the script via the command line and having no joy.
I then realised that it worked via a web browser. Anyway, it was
simply that, via the command line, my PHP.INI file, which
was placed in the WINNT folder was being ignored. The -c option
fixed it. What has kept me fooled all this time was that it worked
ok on every other platform except W2K server without needing this option. And yes
WINNT *is* in my path.
Anyhow, live and learn, I guess and a BIG thanks to ALL those
who offered various suggestions. I fele a bit silly for not trying this
before.
At 21:37 21/11/00 +0200, you wrote:
On Tue, 21 Nov 2000, Lee Davis wrote: php.exe < mailtest.php OR open mailtest.php within PHPEd and run from there. However, so I have just discovered, if I load this script as a web page in a browser, it runs OK !! Can anyone explain why this script may work via a web browser but not via PHPEd or the command line? Hmm..are you sure your php.ini gets read when you try to run it from the command line ? Try adding -c/path/to/phpini/ to the command line. Like this: # php -q -c/www/conf/ < mailtest.php --JaniLee ======================================================================== Lee Davis, IT Services, University of Exeter Email: L.S.Davis@exeter.ac.uk Tel: +44-(0)1392-263960 Fax: +44-(0)1392-211630 WWW: http://www.exeter.ac.uk/ Post: Laver Building, North Park Road, Exeter, Devon, EX4 4QE, UK. ========================================================================