Saturday 26 March 2016

ubuntu 15.10 headphones not working

If you are facing issues while upgrading ubuntu to 15.10 do follow

Open terminal and type following command

$ alsactl restore

Saturday 27 June 2015

Moodle : Incorrect access detected, this server may be accessed only through x address

Often when you install moodle within site directory and when you want to access directly you will see error.


Following amendment can be done to get rid off this error

Change the following file: /home/xxxxxx/public_html/moodle/lib/setuplib.php
Change -  setuplib.php
Redirect ($CFG->wwwroot, get_string('wwwrootmismatch', 'error', $CFG->wwwroot), 3);
for
Redirect ($CFG->wwwroot, get_string('wwwrootmismatch', 'error', $CFG->wwwroot), 0);

Now when you access the link, Moodle redirects immediately to the www.<your registered domain> without the warning message.

Another solution is to make changes in .htaccess file

***************************************************************
suphp_configpath /home/myroot/public_html/php.ini
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^www.domainname.com [nc]
rewriterule ^(.*)$ http://domainname.com/$1 [r=301,nc]
 i.e. replace the myhost.com  with your domain name
***************************************************************
The main advantage of this solution, you won't have to update the moodle code every time you update to a new version.

Hope this will solve the issue.

Thursday 25 June 2015

Some Useful Oracle Tips

Here are some of useful oracle tips that is of common use. Hope you will enjoy this article.

1. You can login to SQL by also typing  scott/tiger together means username/password together need not specify in separate text boxes.
2. Someuseful commands to remind when going to start your oracle engine startup ,shutdown immediate,   shutdown, startup nomount
3. Use command  sqlplus/nolog in anywhere in your command prompt directly to get SQL>
       Like  c:\>sqlplus/nolog you will get SQL>
4. For connected as sys user use command SQL:> conn /as sysdba need not enter semicolon. No error if that is there.
5. For showing the user use show user; command.
6. For creating a new user use command create user user1 identified by password
7. Now connect as  general user use conn as username/password
8. Connect holds create session previleges. So when you log in as a new user it will show error.
9. To remove that give permission of create session to your newly created user.
10. Command is grant create session to username.
11. Now you can login as conn as username/password
12. After connected as general user you have to give resource permission 
13. grant resource to username. That will help to user to create table and other permission


14. Please note down that all the permission can be given as sysdba only so for everytime you have to login as sysdba by using command conn /as sysdba