Friday 27 September 2013

Weird charecters on site

If you find weird characters in your site instead of the original content as shown below, you can try the fix given below.

 K511����� �Ϸ��Ϸ�ر� ��ȥ���� 917������Ϸ��

For fixing this issue, open your " http.conf " file with your favorite editor
# vi http.conf
And find the line,
AddDefaultCharset UTF-8 
 And comment it.
#AddDefaultCharset UTF-8
Now restart apache.
# /etc/init.d/httpd restart 

Now you should be able to view the site without any weird characters.!!


  

Thursday 26 September 2013

directive requires additional arguments

If you get the following error while trying to start apache in a kloxo server 

#/etc/init.d/http start
Starting httpd: Syntax error on line 2 of /home/apache/conf/defaults/_default.conf:
<VirtualHost> directive requires additional arguments
[FAILED]
Run the following command
# sh /script/fixweb
This should fix the issue..


Tuesday 24 September 2013

Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

While trying to start / restart nginx, if get the following error

# /etc/init.d/nginx restart
Stopping nginx: [FAILED]
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
Run the following command to fix the issue. 
# fuser -k 80/tcp
 Where:  fuser - identify processes using files or sockets
               -k     Kill  processes accessing the file.

Now you can start / restart nginx successfully.
# /etc/init.d/nginx restart
Stopping nginx: [ OK ]
Starting nginx: [ OK ]

!!!!!!!!!!!!!!!!................

Error: Kernel image does not exist: /boot/solus-vmlinuz

If you come across the error " Error: Kernel image does not exist: /boot/solus-vmlinuz " while trying to start a xen vps using the below comand

# xm create -c /home/xen/vmID/vmID.cfg
Using config file "/home/xen/vmID/vmID.cfg".
Error: Kernel image does not exist: /boot/solus-vmlinuz
To fix this, just run the following php script.

# php /usr/local/solusvm/includes/xenkernel.php
Making SolusVM initrd...
Setting kernel links...
Kernel setup completed.
Now, you could start the vps without any issue.... 
# xm create -c /home/xen/vmID/vmID.cfg

Getting " 403: Forbidden " error while trying to access Transmission (BitTorrent client) Web Interface

If you get the following error while trying to access Transmission (BitTorrent client) Web Interface.


403: Forbidden
Unauthorized IP Address.
Either disable the IP address whitelist or add your address to it.
If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.
If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.



To fix this issue, login to the server and stop the transmission-daemon.
# /etc/init.d/transmission-daemon stop

Now edit settings.json file,
# vi /var/lib/transmission/.config/transmission-daemon/settings.json
And find the line rpc-whitelist-enabled and edit as following,
rpc-whitelist-enabled : false

Now start the transmission-daemon
# /etc/init.d/transmission-daemon start

The issue should be fixed now. And you would able to access the web interface now.

ERROR! MySQL manager or server PID file could not be found!

Some times you may get mysql error on the page. And on checking the status of the mysql, if you are getting following error 

# /etc/init.d/mysqld status
ERROR! MySQL manager or server PID file could not be found!
Then the Fix is below.

Check the file /etc/my.conf and see any thing mentioned as " basedir= ". If nothing mentioned in the file, by default it would be /var/lib. Then, check the permission for /var/lib/mysql and make sure all are having user and group " mysql ". If not do
#chown -R mysql.mysql /var/lib/mysql
Then, restart mysql
#/etc/init.d/mysql restart
This should fix the issue.