php-windows Digest 31 Oct 2001 20:08:41 -0000 Issue 831
Topics (messages 10132 through 10135): Re: date problem 10132 by: Daniel Parsons Re: PHP 4.0.6, Apache 1.3x and SL Mail 10133 by: DL Neil 10134 by: FPU.WHITES1.FRIENDSPROVIDENT.CO.UK php.ini Windows executable 10135 by: jtjohnston Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
The 10th day of the 31st month of 2001 is the same as the 10th day of the 7th month of 2003 so I would guess that you have $pdate[3] and $pdate[2] the wrong way round when you call mktime(). http://www.php.net/manual/en/function.mktime.php says that it should be like this: int mktime (int hour, int minute, int second, int month, int day, int year [, int is_dst]) Try swapping them :) HTH D. > -----Original Message----- > From: Brian Feliciano [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 31 October 2001 4:41 p.m. > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] date problem > > > this is my code: > > ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) > ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})",$rowsko[2], $pdate); > echo date("l, F j, Y [h:i:s A]", > mktime($pdate[4],$pdate[5],$pdate[6],$pdate[3],$pdate[2],2001)); > > > $rowsko[2] is equal to "2001-10-31 10:55:02" > but the result was: Thursday, July 10, 2003 [10:55:02 AM] > i printed out $pdate[1] and it shows: 2001 > > how come it is always 2003 ? please help. > > thanks. > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] >
> I'm running apache w/ php 4.0.6 on our win nt 4 server. I can't seem to get > the mail function to work. It doesn't complain -- nothing complains. The > email are not going through.... > ... > I've checked my php.ini file and have tried localhost and the direct IP of > the server in the SMTP setting, and it still doesn't work. > > We're running SL Mail, and I created an account for PHP. Does PHP use the > mail server (SL Mail in this case), or does it send it via SMTP on its own? > ... > I'm not sure where the problem is, and I'm not highly experienced with php, > apache, or windows nt. Jason, It sure is a pain when there is absolutely no information to work from, isn't it! I have managed to get PHP to email out from under Apache/NT, but note that others find it a trying/testing process. There are a number of players in this scenario, so let's try to find out what information you do have, and hit the 'most-wanted' list first: 1 please cut and paste the [mail function] section of php.ini, so we can discuss those entries 2 have you managed to get email out of the PHP, Apache, WinNT, SL Mail combination at all? 3 are we talking NT4.0? at what SP level? does it also run IIS or PWS? is the mail server on the same box as Apache? 4 in php.ini try replacing the IPaddr with the SMTP server's DNS name 5 do you have any other application-application connection into SL Mail (that is working), or are you able to drop an appropriately formatted (email msg) file into its set directory and watch it being whisked away across the Internet email system? I'm not sure how to answer your question about PHP, SMTP, and SL Mail. All SMTP servers 'talk' to each other - that's how mail is passed from computer to computer across the Internet. So in that respect PHP needs to talk to an SMTP server. However it does not need to have an SMTP server of its own/on the same box as it/Apache resides. Please advise, =dn
--- Received from FPU.WHITES1 799 3703 31-10-01 10:35 -> [EMAIL PROTECTED] PHP talks to a SMTP server on whichever box you have your php.ini pointing to. If you have set it to localhost, then you must have an SMTP server on your local box. Try typing: telnet localhost 25 If it comes up saying something like: 220 MyComputer SMTP Server Ready ...then you're okay. If telnet fails to make a connection to that port then you've no SMTP server and php's mail function won't work. If this is the case either point php.ini smtp host to a machine that does have an SMTP server, or set one up on your local box. -Steve ---------------------------------------------------------------------------- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Tue, 30 Oct 2001 18:51:34 -0700 Subject: [PHP-WIN] PHP 4.0.6, Apache 1.3x and SL Mail Hey there, I'm running apache w/ php 4.0.6 on our win nt 4 server. I can't seem to get the mail function to work. It doesn't complain -- nothing complains. The email are not going through.... It's supposed to be a contact form that emails the info to me. I don't get the emails. It's also supposed to record the data to a text file before it mails it (the file remains empty). I've checked my php.ini file and have tried localhost and the direct IP of the server in the SMTP setting, and it still doesn't work. We're running SL Mail, and I created an account for PHP. Does PHP use the mail server (SL Mail in this case), or does it send it via SMTP on its own? I'd also like my script to take the visitor's email address they specify and put that in the email's 'from' address so I (and the other employees) can simply hit the email client's reply button. I'm not sure where the problem is, and I'm not highly experienced with php, apache, or windows nt. We are hoping to upgrade nt to 2000, but that may be a long time. This php issue is what is holding up my new site layout. Any help would be greatly appreciated. I'm not sure what to do, and don't have many options left. Thanks Please send responses to [EMAIL PROTECTED] (or Cc?). Thanks! -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] This e-mail may contain confidential information and/or copyright material. This e-mail is intended for the use of the addressee only. Any unauthorised use may be unlawful. If you receive this e-mail by mistake please advise the sender immediately by using the reply facility in your e-mail software. Friends Provident Marketing Group consists of the following companies: Friends Provident Life and Pensions Limited. Registered number 4096141. Friends' Provident Unit Trust Managers Limited. Registered number 970641 FP Life Assurance Limited. Registered number 782698 Friends Provident Pensions Limited. Registered number 475201 Friends Ivory & Sime Managed Pensions Funds Limited. Registered number 1020044 Registered and Head Office of each of the above companies is at Pixham End, Dorking, Surrey RH4 1QA. Registered in England. Incorporated companies limited by shares. Ivory & Sime Trustlink Limited. Registered number 151198 Registered and Head Office: One Charlotte Square, Edinburgh EH2 4DZ. Registered in Scotland. Incorporated company limited by shares. Companies within this Group transact life assurance, pension, permanent health, unit trust and investment trust business All are regulated by the Personal Investment Authority. Friends' Provident Unit Trust Managers Limited is also regulated by IMRO.
Has anyone made a Windows executable to configure the php.ini? ... just asking, before I find myself doing it myself. Post & Reply would be appreciated, John