tommytx Posted November 12, 2006 Share Posted November 12, 2006 Can anyone tell me how to locate and edit the php.ini file on a linux server...using SSH or is there an easier way... I am using putty to log into the root but do not see the php.ini... Quote Link to comment Share on other sites More sharing options...
trq Posted November 12, 2006 Share Posted November 12, 2006 Firstly, make a simple page containing this....[code]<?php phpinfo();?>[/code]and view that through your browser. This will tell you the location of your php.ini. Mine is located in /etc/php5/php.ini. All you need do then is open the file in en editor. See if you have nano installed first (its pretty simple to use).[code]you@yourserver $ nano /etc/php/php.ini[/code]Otherwise, you will have vim installed for sure but its a little more complicated to use.[code]you@yourserver $ vim /etc/php/php.ini[/code]Once the file is opened you'll need to hit [i]a[/i] to put vim into edit mode. Edit the file as you wish then hit [i]:w[/i] to save, and [i]:q[/i] to exit. Quote Link to comment Share on other sites More sharing options...
tommytx Posted November 12, 2006 Author Share Posted November 12, 2006 Thanks for the quick response... But when I did the phpinfo(); it indicated that what I thought was wrong was not.. as I laid the correctly working server php.ini file right next to the nonworking php.ini file using 2 browser windows runnning the command phpinfo(); and realized all the things I thought may be wrong were not... both php.ini files showed "send_mail path = /usr/sbin/sendmail -t -i" and "SMTP = localhost"of course without the -t and -i ... So now I have no more ideas...Here is the problem in a nutshell... maybe someone can offer a suggestion as something else I might check.....On hostgator,one other host, and a VPS on slhost (3 different hosts)... the php mailer (open source) works just fine for sending html emails... but on 2 other hosts... one of which is a VPS at Godaddy.. flat will not send mail using php mailer.....and gives no errors.... but errors may be turned off....not sure about that....I can run the html form that feeds the php mailer on any of the servers but to make it work the php mailer must be located on one of the first three servers above....I initially suspected that either the SMTP or the sendmail path was wrong... but now that I learned how to look at them via phpifo() I can see that they are identical in the path to sendmail and SMTP is local host.....and now I am fresh out of ideas and no longer need to edit the php.ini file thanks to the info provided by "thorpe" above... thanks again.Can anyone think of anything else I can check to find out why the godaddy VPS will not send mail using php mailer.... the basic mail() command works fine but I need to send the email via "html email" and not plain email..... any suggestions would be grateful....Thanks in advance.... Quote Link to comment Share on other sites More sharing options...
tommytx Posted July 23, 2009 Author Share Posted July 23, 2009 Ok. I figured it out on my own. But thanks a lot anyway. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.