Rss friendly datetime, php and mysql

Converting mysql datetime data to proper rss valid data like : Wednesday, July 14, 2010 7:27 AM
$mysql_date = $record['date'];
$rss_date = date(“r”, strtotime($mysql_date));
Code in rss area:

$rss_date

var addthis_language = ‘en’;

Read full blogComments { 0 }

How to fix mysql database is ready only

If you ever encounter a problem when mysql database is migrated from one server to another with uploading manually .myd files. Remember to make the database you need to make sure you have granted full access to the files by doing chmod 777
CHOWN 777

var addthis_language = ‘en’;

Read full blogComments { 0 }

Opening firewall ports on a linux machine?

To open any port on a linux machines with iptables install you can follow these easy steps.

var addthis_language = ‘en’;

Read full blogComments { 0 }

How to setup ftp server on Linux – pureftp

I will be using pureftp on in this tutorial as its more secure and fast.

var addthis_language = ‘en’;

Read full blogComments { 0 }

Reset database password if you have lost the root password of mysql

1) Stop Mysql
service mysql stop
2) Run mysql in safe mode.
mysqld_safe –skip-grant-tables &
3) Now you can login to mysql with no password
mysql -uroot mysql
4) To reset mysql root password use the following command.
UPDATE user SET password=PASSWORD(“abcd”) WHERE user=”root”;
FLUSH PRIVILEGES;
At this time your root password is reset to “abcd” and MySQL will now
know the privileges and [...]

Read full blogComments { 1 }

How to delete all files in directory using php.

Just use the following php code to delete all the files in a directory.
$dirpath= ‘[dirname]‘;
if ($handle = @opendir($dirpath)) { while (false !== ($file = @readdir($handle))) { if ($file != ‘.’ and $file != ‘..’) { echo $file . ‘ deleted.’; @unlink($dirpath . ‘/’ . $file); } } @closedir($handle); }

var addthis_language = ‘en’;

Read full blogComments { 0 }

How to redirect from one page to another page or domain via htaccess

To redirect from one page to another domain or page via htaccess use the following code
Redirect 301 /old.php http://www.example.com/new.php

var addthis_language = ‘en’;

Read full blogComments { 1 }

Simple way to stop or decrease volume of sound in flash or make volume control

The simplest way to control sound is to use attach sound command.
First you have to import sound using control + r.
Then goto library and right click and select properties of the sound file select and check “Export for ActionScript” then put a name in the Identifier.
The following script sets up a sound object:
s = [...]

Read full blogComments { 1 }

How to install ffmpeg, mencoder, mplayer and php-ffmpeg on windows server

First you have to download all the required files which can be found here

var addthis_language = ‘en’;

Read full blogComments { 4 }

Unable to start website in IIS giving error on port 80.

If you are unable to start a website in IIS on your windows server and in the event viewer it is giving error on port 80 it means that another application is using port 80. In normal case scenario the other applications can be:

var addthis_language = ‘en’;

Read full blogComments { 1 }