Tuesday, October 18, 2011

PHP Navigator: The Web based file management system

This is a brilliant tool I recently came across. PHPNav is an onlne file manager, very useful when you wish to edit your web pages on your server. It has a Windows Explorer style look and feel and lets you view/edit pages with ease.

For starters, you can download PHPNav here. Decompress the folder on your server where your website is hosted (for me, it was /htdocs/cloudplayer). The folder name would be phpnav. You can rename it to anything you want. Now, configuring it is pretty easy. Follow the steps below.

1. Ensure that the PHPNav folder is now in the directory containing the index page (landing page) of your site.

2. Inside your PHPNav directory, open the config.php file for editing. Search for the line $compress=true. After that line, add the following lines.

$mysql_server="xxxxxx"; //your SQL Server name
$mysql_user = "xxxxx"; //your SQL server username
$mysql_passwd = "xxxxx"; //your SQL Server password
$mysql_db = "xxxxxxxx"; // database name
$mysql_table = "xxxx"; // main table name in the database. for me it was called users

3. You can edit the login info for your PHPNav by changing the values of $user and $passwd.

You are good to go now. Enter the path of your PHPNav folder and login!

Wednesday, October 5, 2011

Xampp: another mysql daemon is already running

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl.

I used XAMPP a lot without any issues. However, this weekend I got my hands into Ruby (on Rails). I installed a lot of stuff and went through a lot of configurations and then MySQL on XAMPP stopped working.

The issue was when I start XAMPP using the command
sudo /opt/lampp/lampp start

I got the following output:

Starting XAMPP for Linux 1.5.3a...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Another MySQL daemon is already running.
XAMPP: Starting ProFTPD...
XAMPP for Linux started.

The Mysql port was already in use by some other application because of which it was not available for xampp. XAMPP comes packaged with it's own MySQL server and I already had another one (after my Ruby on Rails work) taking up the port. This prevents you from using anything which uses Mysql like phpMyadmin or any CMS on your server.

A workaround this wold be typing the following command in your terminal.

sudo /etc/init.d/mysql stop

This stops the Mysql daemon because of which the port is now available for xampp. Start xampp again and you are good to go.

However, you need to start/stop the mysql instance using the port depending on which application you need to use. It would be brilliant if there was a way to have XAMPP-MySQL not conflict with MySQL instance that you use for any other application say Ruby.