How to create a Test Mail Script?



Login to SSH with root user

cd /home//public_html

Create test phpmail fine

pico phpmail.php

Insert following code in that file

$to = “recipient@example.com”;
$subject = “Hi!”;
$body = “Hi,\n\nHow are you?”;
if (mail($to, $subject, $body)) {
echo(“

Message successfully sent!

“);
} else {
echo(“

Message delivery failed…

“);
}
?>

Then cange the ownership of that file :

chown user.user phpmail.php

Then test the script in browser or in SSH, you will get follwing result, which means php mail function working fine

————————————-
-bash-2.05b# php phpmail.php

X-Powered-By: PHP/4.4.2
Content-type: text/html

Message successfully sent!
[Read More...]


How to install Ioncube Loader ?



Refer the following steps

1) Login into shell through root

2) cd /usr/local/ Download the tar.gz file which is compatible with your server from http://downloads.ioncube.com/wget http://downloads.ioncube.com/loader_…lin_x86.tar.gz

3) Untar the file.tar -zxf ioncube_loaders_lin_x86.tar.gz

4) chown -R root:root /usr/local/ioncube/

5) vi /usr/local/Zend/etc/php.ini (or whatever your path is)

Add the following line before zend_extension

zend_extension=/usr/local/ioncube/ioncube_loader_lin_4.4.so

It would go between these two entries

zend_optimizer.version=2.5.10a

zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so

Save changes, then:

6) /etc/init.d/httpd restart
[Read More...]


make_sock: httpd error



If we get following error of while try to restart httpd:httpd not running, trying to start

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs

Simply log in as root and fire the command which is given below:

netstat -lpn | grep ’0.0.0.0:80′

It will show the result something like:

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 14829/httpd

Then kill the PID and kill all the processes of the service and try to restart it.

root@server [~]# kill -9 14829
root@server [~]# killall -9 httpd

root@server [~]# /etc/init.d/httpd restart
[Read More...]


Cannot send emails- RoundCube just shows "Sending Message"



I found a problem with Roundcube, it shows sending message and hangs up there and actually it doesn’t send message anymore. I found the following solution here.

Problem with Roundcube, installed when updated to newest CURRENT release. – Page 3 – cPanel Forums:

vi /usr/local/cpanel/base/3rdparty/roundcube/config/main.inc.php

and changed

$rcmail_config['smtp_user'] = ‘%u’;
to
$rcmail_config['smtp_user'] = ”;
[Read More...]


 

Recent Comments

Popular Posts

Return to top of page Copyright © 2010 | Platinum Theme Converted into Blogger Template by HackTutors