Friday, February 15, 2008

Apache http://localhost not working


After apache start, http://localhost not working for me..

My httpd.conf file is fine.

Actually i have commented following line on the file /etc/network/interfaces

auto lo
iface lo inet loopback

I have uncommented those lines and restarted network...

It Works now

(We can also give this command to up the loopback of the network...

#ifconfig lo up

)


Mantis - Admin password reset Problem


How can u reset admin password , if you get the following problem while resetting the password via mail?

I can't get the solution from google. But some tricks solves my problem.


APPLICATION ERROR #1901

The confirmation URL is invalid or has already been used. Please signup again.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were

identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.



1.) If you know ,normal user login and password ... get login


2.) Then open ... mantis_user_table table from the mantis database.

3.) Then copy the password and cookie_string values from normal user to admin user.

Before that u should change the cookie_string value for normal user. Otherwise it will show unique id problem.

4.) Then save everything and refresh browser ( where we logged in as normal user), Now u can get admin login. ;-)

Shell 1- A script to clean up the log files in /var/log

# Cleanup
# Run as root, of course.
cd /var/log
cat /dev/null > messages
cat /dev/null > wtmp
echo "Logs cleaned up."

Thursday, February 14, 2008

To kill the postgresql database

	ERROR:  database is being accessed by other users


If you get this error, you can kill the particular database using following command.


kill `ps auxww | grep 'postgres: username databasename' |grep -v 'grep' |awk '{ print $2 }'`

Saturday, December 29, 2007

Mouse Over Preview in Ubuntu


To get Mouse over preview of MP3 files working, Install the following pacakages,

sudo apt-get install mpg321
sudo apt-get install ubuntu-restricted-extras
sudo apt-get install pulseaudio
sudo apt-get install pulseaudio-esound-compat
sudo apt-get install libasound2-plugins

Friday, December 28, 2007

Apaceh Error - Open as .phtml file ?

I have installed the Apache server using apt-get in ubuntu. I also installed php5 library files.

But while trying to open .php files , it gives the pop-up like

"open as .phtml file ?"

On google, we can see more posts on this error. Most of them mentioned to add the following lines

in httpd.conf,


<ifmodule>
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
</ifmodule>


But in my system , it already added by php5 library installation.

Some of them mentioned to clear the browser cache.

Yes ! Its work for me....;-)

How to get Duplicate rows from table

Example:

SELECT number, count(*) FROM doc_master GROUP BY number HAVING count(*) > 1

Usage of SAJAX

Installing Fonts on Ubuntu

Just copy your font into your users

font folder ~/.fonts (”~” represents the path to your home dir e.g.

/home/bala/.fonts). If it doesn’t exist then create it. Then

exectue the font cache command from the terminal.

sudo fc-cache -vf

  • -v option is for verbose or it tells you exactly what the command is doing.
  • -f option forces updating of all cached font files
This updates the font cache on your system and you should be able to use the fonts right away.