Author's posts

How to Back Up and Restore a MySQL Database

As you know your website data is stored in your database server. To prevent disaster, backup your data regularly is a must for you and every website owner. There are many ways to backup MySQL data, one of them is using mysqldump to dump your MySQL data to a file. Dump all MySQL Databases mysqldump …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/02/how-to-back-up-and-restore-a-mysql-database/

Displaying drop down menu over a swf file

By default when a drop down menu displayed over a swf file it will not be visible in the page. To make it visible and accessible to the user, just put <param name=”wmode” value=”transparent” /> inside the <object> tag and add the property wmode=”transparent” in <embed> tag.

Permanent link to this article: https://blog.openshell.in/2011/01/displaying-drop-down-menu-over-a-swf-file/

Public IP and Private IP

hi, In this post i would like to give a small intro about public and private ip addresses.  most people use to start with ip address have different classes and blah… blah.. blah…. in this post i would like to give it in a nontechnical term. Private IP Address: Private IP address is a address …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/01/public-ip-and-private-ip/

Mysql Error: #1045

After installed the XAMPP and mySQL, when you typed http://localhost/phpmyadmin in your web browse to get into the phpmyadmin, it shows a error like this: #1045 – Access denied for user ‘root’@’localhost’ (using password: NO) At this point you have to edit the config.inc.php file on line 21  $cfg[‘Servers’][$i][‘password’]             = ”; to $cfg[‘Servers’][$i][‘password’]             = ‘yourpassword’; …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/01/mysql-error-1045/

Skip or Hide PHP errors / warnings

Errors are hints from compiler for the programmer to correct. But sometimes we face some unwanted or dynamic error. For example, $content = file_get_contents(https://blog.openshell.in/2011/01/execute-php-script-from-command-line-in-ubuntu/); Here , the url is invalid, or the server of the url is down , PHP shows Warning: Failed to open stream or file access is disabled. Use @ in front …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/01/skip-or-hide-php-errors-warnings/

How to Send Email from a PHP Script Using SMTP Authentication

Now you can send emails with SMTP authentication using this script. For most email uses, the free PEAR Mail package offers all the power and flexibility needed, and it authenticates with your desired outgoing mail server, too. For enhanced security, secure SSL connections are supported. Send Email from a PHP Script Using SMTP Authentication To …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/01/how-to-send-email-from-a-php-script-using-smtp-authentication/

Replace String In Mysql With One Query

We know how to change data inside a field by using update command inside a query. Here we will try to replace part of the data without changing the entire data of the field. The SQL query we design will work like string replacement in any script we use. For this we will use replace …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/01/replace-string-in-mysql-with-one-query/

Installing PEAR Mail for PHP On Ubuntu

It helps you how to make Ubuntu PHP localhost mail function work, using PHP to send mail from localhost is easy. First, you need to install some PEAR mail packages. In terminal, run the following command one by one: sudo apt-get install php-pear sudo pear install mail sudo pear install Net_SMTP sudo pear Auth_SASL sudo …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/01/installing-pear-mail-for-php-on-ubuntu/

How to Create a CAPTCHA with PHP

CAPTCHA is a simple test to determine if a user is a computer or a human. It is used to prevent spam abuse on the websites. So if you use CAPTCHA on your web site forms, this can help in stopping some bots and making life harder for other bots in accessing or using your …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/01/how-to-create-a-captcha-with-php/

Random Image Rotation in ROR

It’s pretty easy to accomplish random image rotation in ROR. This is a simple example of how it can be done, and of course there are ways to make it better (for example, this snippet will only rotate and display .jpg, .gif, and .png files). First, create a folder – let’s name it “rotate” – …

Continue reading

Permanent link to this article: https://blog.openshell.in/2011/01/random-image-rotation-in-ror/