Post

Visualizzazione dei post da maggio, 2012

How to send e-mail using PHP and mail() with Linux Debian

Note: This is tested and proven to work on Debian Squeeze (stable) If you are a web-admin or a PHP developer hosting on your own servers you might have found out that PHP mail() function does not work out of the box in Debian unless you have installed Exim (default MTA for Debian Squeeze), sendmail or some other MTA. Most of the time this is OK, but when you really don't want to mix a mailserver with your webserver this is going to be a problem. In php.ini file there is a SMTP configuration value that you can set which is misleading. Even though you set the SMTP value, PHP mail() function will not connect directly to the SMTP server and relay emails rather it depends heavily on sendmail program which can be set via the sendmail_path configuration value. In conclusion you'll have to have a working sendmail program if you want to use PHP mail() function. So rather than using a complete MTA just to relay emails to your mailserver you can use SSMTP which is a send-only send

How to install VNC Server on Xfce 4

The following will allow vnc to start a X desktop. Install VNCServer  apt-get install vnc4server Config for xfce to start with vncserver mkdir /etc/vnc vi /etc/vnc/xstartup //add in the following: startxfce4 Start VNC Session vncserver  The first time a user goes "vncserver" from the cli, they will be asked for a password. This will be saved in ~/.vnc/passwd There will also be other log files in ~/.vnc/ Note, you can edit on a per user basis xstartup, however in the Config above, I added startxfce4 to the global file. Kill VNC   sessionvncserver -kill :1