Re: [PHP] Php.ini file missing
Hi everybody, I've finally been able to read the e-mails sent by the little script I was using. The problem was the address where the script was trying to send the e-mail. Instead of a *normal* e-mail (i.e. [EMAIL PROTECTED]) like was written in the book I wrote my *local* address (mitch@localhost) and it worked :-) I got the e-mail both in the terminal and using the application "Mail" where I configured an UNIX account. I am still not able to let the script send e-mails to normal e-mail addresses, but I think I will now install "postfix" which, as I read, should be easier to use and configure than "sendmail". Thanks to you all for the tips and resources you gave me. Bye, Michael -- PHP General 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]
Re: [PHP] Php.ini file missing
on 1/17/02 8:54 AM, Michael Sciascia at [EMAIL PROTECTED] wrote: > Looking in the sendmail configuration with Webmin I see that the message > sent by the php script is queued and that it isn't possible to send it > because the host "www@localhost" isn't correct. > In some web sites I found that I should change, in the hostconfig file, the > value "Hostname = AUTOMATIC" to "Hostname = my domain" (which should be my > IP or DNS) isn't getting your bearings always the hardest part of getting started. it's how all the pieces fit together that causes the magic. if you read between the lines, i believe the website you mention has already answered some of your remaining questions here. yet more of getting your bearings straight. anyway, not sure how much of the following you already now, but here's a bunch of stuff. the hostconfig file doesn't have anything to do with php or sendmail. it is only info about your host (or computer) so macosx can boot up properly. processes on the box may use or need info generated from /etc/hostconfig. my guess is that it's gonna be tough (but not impossible) to use sendmail on your machine since you have a dynamic ip address. the reason for this is that sendmail needs to know who 'it' is. ie, what machine to send the message from. you may want to check out the apache documentation http://httpd.apache.org/docs/ > What isn't really clear to me is which domain I have to write here. i believe i am quoting from the website you mentioned this hostname is supposed to be the valid DNS entry of your Mac. > I have an ISDN connection, so I don't have a static IP address and I don't > know about the DNS. first, to find the dns, nslookup your_ip_address should return the name associated with the ip address. you really want the name in the hostconfig file. if it's changing all the time, you will need to change the entry in hostconfig or automate it. > How do you usually check if a php script has really sent the e-mail to the > address in the script? you can't really. the mail function returns true if the mail was sent (as far as php is concerned) but you don't necessarily now if the mail was delivered. i'm not even sure if mail returns true in your case (the mail was queued) you can check the mail queue from the terminal with mailq and (if sendmail is working) force messages to be sent with sendmail -q > In the book I am using to approach to php this isn't explained, so I believe > it should be something really easy to do. The book is for really and > *absolute* beginners and everything is explained in a clear and exhaustive > way. It also has a CD-ROM with mysql, php & apache and it clearly explains > how to install them, but there isn't written anything about setting > something special to let the e-mail scripts work (well actually something > just for Windows and not for Linux or other *nix based systems like Mac OS > X) can't remember if i sent these to you already, but some good sites for macosx are http://macosxhints.com/ http://www.stepwise.com/ http://www.kung-foo.tv/xtips.shtml http://www.entropy.ch/software/macosx/php/ > Which values do you think I should write in the hostconfig file? My usual > provider domain (i.e. www.tiscali.it)? ideally, you would type the fully qualified domain name of your computer. so, to test all this - login to your isp - find out your hostname (nslookup ip_address) - edit /etc/hostconfig to add hostname - see if it works - woohooo! now, the hard part is automating that :) good luck, mike -- mike cullerton michaelc at cullerton dot com -- PHP General 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]
Re: [PHP] Php.ini file missing
mike cullerton14-01-2002 21:49 > on 1/14/02 12:06 PM, Michael Sciascia at [EMAIL PROTECTED] wrote: > >> The last and *most important* thing left to do is to start sendmail, but I >> always get errors like: >> >> >> A) "Failed to start sendmail : 451 4.0.0 /etc/mail/sendmail.cf: line 81: >> fileclass: cannot open /etc/mail/local-host-names: Group writable directory" >> >> B) "Failed to start sendmail : /etc/mail/sendmail.cf: WARNING: dangerous >> write permissions 451 4.0.0 /etc/mail/sendmail.cf: line 81: fileclass: >> cannot open /etc/mail/local-host-names: Group writable directory" Hi everybody, Yesterday I created a new partition on my HD just to work with php, mysql and apache. I installed again everything and also Webmin to manage more easily the various servers settings. I also changed, in the Apache httpd.conf file, the "ServerAdmin" (to my e-mail address) and "ServerName" (to Localhost or 127.0.0.1) values. I activated sendmail following your tips and the one found in the web and this time it started regularly without giving me the messages written above. So I believe that before I might have had made something wrong trying to change the configurations settings :-) Unfortunately I still got an annoying problem. When I use a php script to send e-mails via a form on a web page I get the right message "e-mail has been sent", as it always did, but I still can't get this e-mail anywhere :-( I also created an UNIX mail account in the "Mail" application according to some other tips I found to better work with sendmail, but I didn't get anything there too. Looking in the sendmail configuration with Webmin I see that the message sent by the php script is queued and that it isn't possible to send it because the host "www@localhost" isn't correct. In some web sites I found that I should change, in the hostconfig file, the value "Hostname = AUTOMATIC" to "Hostname = my domain" (which should be my IP or DNS) What isn't really clear to me is which domain I have to write here. I have an ISDN connection, so I don't have a static IP address and I don't know about the DNS. How do you usually check if a php script has really sent the e-mail to the address in the script? In the book I am using to approach to php this isn't explained, so I believe it should be something really easy to do. The book is for really and *absolute* beginners and everything is explained in a clear and exhaustive way. It also has a CD-ROM with mysql, php & apache and it clearly explains how to install them, but there isn't written anything about setting something special to let the e-mail scripts work (well actually something just for Windows and not for Linux or other *nix based systems like Mac OS X) Which values do you think I should write in the hostconfig file? My usual provider domain (i.e. www.tiscali.it)? Sorry to bother you again with so many question I would really appreciate any help you would give me, as I don't seem so good at looking for information on the web :-( Thanks again a lot for the previous and useful replies. Have a great time. Ciao, Michael -- PHP General 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]
Re: [PHP] Php.ini file missing
On Tuesday 15 January 2002 03:06, Michael Sciascia wrote: > I would like to thank you all for all the info you gave me and the php.ini > file! > Your suggestions have been really useful and I made some progresses, but > I've still got problems :-( > > I changed the MAILSERVER line to YES as you said, and now sendmail should > start every time I reboot, but I haven't yet resolved some configurations > problems. > > As you all suggested I looked again in several websites and followed many > instructions I've finally found. However it still doesn't work :-( > > The last and *most important* thing left to do is to start sendmail, but I > always get errors like: AFAIK you don't actually need to start the sendmail (smtpd?) daemon. You just need the /usr/bin/sendmail (or wherever it's located) program. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Life is like an onion: you peel off layer after layer and then you find there is nothing in it. -- James Huneker */ -- PHP General 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]
Re: [PHP] Php.ini file missing
> > ahhh, if this is indeed the problem, then you (michael from the original > message) need to enable sendmail in /etc/hostconfig by changing the line > > MAILSERVER=-NO- > > to > > MAILSERVER=-YES- > > (isn't everything different in macosx) > > again, you need to do this from an administrator account. this will start > sendmail each time you reboot. i'm not exactly sure how to start sendmail > correctly from the command line, but one of the sites i mentioned earlier > might have something. > > mike > > -- mike cullerton > > I would like to thank you all for all the info you gave me and the php.ini file! Your suggestions have been really useful and I made some progresses, but I've still got problems :-( I changed the MAILSERVER line to YES as you said, and now sendmail should start every time I reboot, but I haven't yet resolved some configurations problems. As you all suggested I looked again in several websites and followed many instructions I've finally found. However it still doesn't work :-( The last and *most important* thing left to do is to start sendmail, but I always get errors like: A) "Failed to start sendmail : 451 4.0.0 /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory" B) "Failed to start sendmail : /etc/mail/sendmail.cf: WARNING: dangerous write permissions 451 4.0.0 /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory" I've got this errors either trying to start sendmail using the terminal or an interesting applications called "Webmin" I've found looking around for more information. Webmin allows to manage from your browser various items like Apache, sendmail and similar stuff, more easily than doing it through the terminal (at least for a beginner like me). I always get the same errors and I believe it is because of the file "local-host-names" privileges. I tried changing them in any combination, but it still doesn't work... I will continue trying and hope to get it fixed , if not I will download another mail server I found looking for info. It is called "post fix" and, as I read, should be easier to configure and use than sendmail. Do you think this could be a valid solution? Thanks again for the patience and the kindness. Bye, Michael -- PHP General 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]
Re: [PHP] Php.ini file missing
Check the README or INSTALL docs. The file is there under another name, but right now I can't remember. Something like distribution.ini. Regards - Miles Thompson At 02:03 AM 1/14/2002 +0100, Michael Sciascia wrote: >Hi, >I am new to this list and also to php and I am sorry to already bother you >with a question you might find really stupid, but I looked around for this >information several days now and I couldn't find some good resources. > >I installed php 4.1.0 on Mac OS X 10.1.2 and everything seems to work well, >also with mySQL and Apache. > >I am learning php from a book for beginners full of explanations and >scripts, so in the last days I wrote some scripts which make possible to >send e-mails filling a form on the browser. The scripts worked out well, but >I haven't been able to read the e-mails and understand where I should be >able to. > >I believed I had to change the SMTP settings of php or some sort of mail >server in the system and reading some articles found in several web sites I >think the solution would be to change some settings in the "php.ini" file. > >The build I downloaded doesn't have any "php.ini" file and in the faq >section of the website from where I downloaded it >(http://www.entropy.ch/software/macosx/php/) there is simply written to >create the "php.ini" file in the "/usr/local/lib/php.ini", including the >intermediate /lib/ directory that doesn't exist already on my system. > >I would like to know how I can create the "php.ini" file or if there is a >easier way to get and read the e-mails sent by the php scripts without >working on the php configuration. > >I am sorry to disturb you all, but I don't have any experience and I haven't >been able to find anything clear about this question. > >I would really appreciate if you could give me some tips or some web site's >addresses where I can find easy information, or where I can download a copy >of the "php.ini" file. > >I thank you in advance for the kindness and the attention. > > >Greetings, >Michael > > >-- >PHP General 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] -- PHP General 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]
Re: [PHP] Php.ini file missing
on 1/13/02 6:35 PM, Rafael Perazzo at [EMAIL PROTECTED] wrote: > I think that you have this problem because your > sendmail is not running. > Try to run your sendmail (probably this command > /etc/rc.d/init.d/./sendmail > start- Note that before the name sendmail you have > two chars ./) > and I think your problem will be fixed. Then test your > script again to see > if it's working. ahhh, if this is indeed the problem, then you (michael from the original message) need to enable sendmail in /etc/hostconfig by changing the line MAILSERVER=-NO- to MAILSERVER=-YES- (isn't everything different in macosx) again, you need to do this from an administrator account. this will start sendmail each time you reboot. i'm not exactly sure how to start sendmail correctly from the command line, but one of the sites i mentioned earlier might have something. mike -- mike cullerton -- PHP General 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]
RE: [PHP] Php.ini file missing
I think that you have this problem because your sendmail is not running. Try to run your sendmail (probably this command /etc/rc.d/init.d/./sendmail start- Note that before the name sendmail you have two chars ./) and I think your problem will be fixed. Then test your script again to see if it's working. If this do not work, write again, I'll be very happy to help the php community. Rafael Perazzo __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- PHP General 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]
Re: [PHP] Php.ini file missing
hi michael, to create the directory and file, you'll need to run the terminal application. from there, type sudo mkdir /usr/local/lib to create the necessary directory. you should get prompted for a password. type your own password. you need to do this from an administrator account. the first account created during the install process is an administrator account. are you sure you don't have a copy of php.ini on your system? try locate php.ini from the terminal window. if there is one, you can copy it to the /usr/local/lib directory. sudo cp php.ini /usr/local/lib/ if you don't have one, you can download the distribution from php.net and copy php.ini-dist from there to /usr/local/lib and rename it sudo mv php.ini-dist /usr/local/lib/php.ini anyone know a better way to just get php.ini? a couple great sites for macosx http://www.stepwise.com http://macosxhints.com hope this helps, mike on 1/13/02 6:03 PM, Michael Sciascia at [EMAIL PROTECTED] wrote: > Hi, > I am new to this list and also to php and I am sorry to already bother you > with a question you might find really stupid, but I looked around for this > information several days now and I couldn't find some good resources. > > I installed php 4.1.0 on Mac OS X 10.1.2 and everything seems to work well, > also with mySQL and Apache. > > I am learning php from a book for beginners full of explanations and > scripts, so in the last days I wrote some scripts which make possible to > send e-mails filling a form on the browser. The scripts worked out well, but > I haven't been able to read the e-mails and understand where I should be > able to. > > I believed I had to change the SMTP settings of php or some sort of mail > server in the system and reading some articles found in several web sites I > think the solution would be to change some settings in the "php.ini" file. > > The build I downloaded doesn't have any "php.ini" file and in the faq > section of the website from where I downloaded it > (http://www.entropy.ch/software/macosx/php/) there is simply written to > create the "php.ini" file in the "/usr/local/lib/php.ini", including the > intermediate /lib/ directory that doesn't exist already on my system. > > I would like to know how I can create the "php.ini" file or if there is a > easier way to get and read the e-mails sent by the php scripts without > working on the php configuration. > > I am sorry to disturb you all, but I don't have any experience and I haven't > been able to find anything clear about this question. > > I would really appreciate if you could give me some tips or some web site's > addresses where I can find easy information, or where I can download a copy > of the "php.ini" file. > > I thank you in advance for the kindness and the attention. > > > Greetings, > Michael > -- mike cullerton michaelc at cullerton dot com -- PHP General 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]