Re: command line are -c doesn't work on win2k?
| From: | DL Neil | Date: | Fri, 18 Jan 2002 17:53:38 +0000 |
| Subject: | Re: command line are -c doesn't work on win2k? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-81119@lists.php.net to get a copy of this message | ||
Jeff,
If mail is working, then agree with your point about config.
Appendix B. Using PHP from the command line
Usage: php [-q] [-h] [-s [-v] [-i] [-f <file>] | {<file> [args...]}
-q Quiet-mode. Suppress HTTP Header output.
-C Do not chdir to the script's directory
-c <path> Look for php.ini file in this directory
PHP is case sensitive (whereas Windows is not).
Where is the .ini file? (not the PHP.exe file)
Does this help?
=dn
----- Original Message -----
From: "Jeff D. Hamann" <jeff_hamann@hamanndonald.com>
To: "DL Neil" <PHPml@DandE.HomeChoice.co.uk>; "mike cullerton"
<php-l@bakednotfried.com>;
<php-general@lists.php.net>
Sent: 18 January 2002 17:25
Subject: Re: [PHP] command line are -c doesn't work on win2k?
> This will work from the dir that contains php.exe......
>
> <?
> mail( "jeff_hamann@hamanndonald.com", "subject", "test" );
> ?>
>
> here are the php.ini smtp lines...
>
> [mail function]
> ; For Win32 only.
> ;SMTP = stimpy - this works fine as does
> SMTP = 192.168.0.2
>
> ; For Win32 only.
> sendmail_from = jeff_hamann@hamanndonald.com
>
> I don't see how this could be a config problem. The emails I have been
> sending state that the script works *fine* from the same dir as php.exe. The
> problem arises when I attempt to run the script from another directory...
>
> Jeff.
>
>
> ----- Original Message -----
> From: "DL Neil" <PHPml@DandE.HomeChoice.co.uk>
> To: "mike cullerton" <php-l@bakednotfried.com>; "Jeff D. Hamann"
> <jeff_hamann@hamanndonald.com>; <php-general@lists.php.net>
> Sent: Friday, January 18, 2002 9:09 AM
> Subject: Re: [PHP] command line are -c doesn't work on win2k?
>
>
> > Mike and Jeff,
> >
> > > what about the "who@where.what"? is it failing on a 'bad' email
> > > address?
> or
> > > maybe putting everything in variables and trying
> > >
> > > mail($to,$subject,$message);
> >
> > =there's a difference between the way PHP talks to an SMTP server (using
> mail()) on Win32 compared to *nix -
> > which can make advice on the forum 'tricky'. On Windows the email msg is
> shunted out of PHP and thrown at the
> > SMTP server with no ceremony - and no 'backwards' communication eg a
> confirmatory msg "got it thanks". Whereas
> > *nix systems allow for some discussion between PHP and sendmail (for
> example).
> >
> > =thus under Windows the quality of the email address is almost irrelevant
> (to PHP at least). However the email
> > lines from PHP.INI will be of interest. Can you post them please Jeff?
> >
> > =Regards,
> > =dn
> >
> >
> >
> > >
> > > on 1/18/02 9:14 AM, Jeff D. Hamann at jeff_hamann@hamanndonald.com
> wrote:
> > >
> > > > nope. no difference.
> > > >
> > > > jeff.
> > > >
> > > > "Mike Cullerton" <php-l@bakednotfried.com> wrote in message
> > > > news:B86D88A7.1DF76%php-l@bakednotfried.com...
> > > >> on 1/18/02 12:00 AM, Jeff D. Hamann at jeff_hamann@hamanndonald.com
> wrote:
> > > >>
> > > >>> I've been trying to figure out what was wrong with my script...
> > > >>>
> > > >>> <?
> > > >>> mail("who@where.what", "Subject", "command line
> > > >>> mail() test");
> > > >>> ?>
> > > >>>
> > > >>> from the command line,
> > > >>>
> > > >>> php mail_test.php
> > > >>>
> > > >>> and getting,
> > > >>>
> > > >>> X-Powered-By: PHP/4.0.6
> > > >>> Content-type: text/html
> > > >>>
> > > >>> attempting to deliver the mail<br>
> > > >>> <b>Warning</b>: Unknown error in
> > > >>> <b>mail_test.php</b> on line
> > > > <b>3</b><br>
> > > >>
> > > >> didn't notice any other responses, and this is just a guess here, but
> how
> > > >> about taking the '()' out of the body of the message. ie,
> > > >> "command
> line
> > > > mail
> > > >> test"
> > > >>
> > > >> -- mike cullerton michaelc at cullerton dot com
> > > >>
> > > >>
> > > >
> > > >
> > >
> > >
> > > -- mike cullerton michaelc at cullerton dot com
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php-general-help@lists.php.net
> > > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> > >
> > >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>