Jump to content

[SOLVED] How to find and edit php.ini via ssh.


tommytx

Recommended Posts

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.
Link to comment
Share on other sites

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....
Link to comment
Share on other sites

  • 2 years later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.