Skip to main content

Posts

hash passwords using MySQL inbuilt functions

I just realized that MySQL has inbuilt function for encrypting strings upon insertions and it can easily be accessed from phpMyAdmin. It has many other inbuilt functions as well. Previously I used to hash strings manually through PHP functions or used external sites whenever I was building some login system and needed some database records to test. I used to copy output of PHP’s md5/sha1 function and paste it into password field manually. All those instructors in screencasts from which I learned used to do it manually too. I just picked up from them.

Removing index.php from CodeIgniter installation

CodeIgniter by default routes URLs through index.php. It is a bad practise from SEO perspective and also makes URLs ugly. In order to remove index.php from CodeIgniter we need to create a .htaccess file in the root directory of CodeIgniter installation. First of all we need ensure that AllowOverride is On in order to .htaccess to work. Second we need to check mod_rewrite is installed and enabled. In the .htaccess file created above we need to write following rules. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # PHP under mod_php5 <IfModule mod_php5.c>     RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> # PHP under fast-CGI or other <IfModule !mod_php5.c>     RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> </IfModule> Note the difference between mod_php5 and fast-CGI RewriteRule. fastCGI rule has a ‘ ? ’ after index.php. ...

WordPress Not sufficient permissions to access admin page

While installing WordPress for my blog, I was trying out different subdomain/ folder options. After final installation when I tried to access the admin page I was being redirected to /wp-admin/profile.php but getting insufficient permission error like shown below. I could access the front page easily but couldn’t log in admin panel. I tried changing the permission of WordPress files  and directories to 755 but to no avail. The problem was that while installing WordPress I used different table prefixes each time. WordPress uses the table prefix for forming the option and usermeta keys name for storing roles and capabilities information. So in the process, database tables had correct table prefixes but some records in the some  of the tables still had old table prefix and this was causing the problem. To fix the issue you need to update your database using phpMyAdmin or php. Check in your database in the usermeta and options table if they have correct table pre...

Convert/Compress multiple images at once using IrfanView

Want to convert/compress multiple images at once? You can easily do this using a very useful and small image viewer called IrfanView. IrfanView is free image viewer that can be used to view, convert, optimize, process image files of numerous formats. It can also handle few video/audio formats, and has limited image creation and painting capabilities. It’s like an Swiss Army Knife for images. Some Features:— You can read more about IrfanView Here. Let’s get started. Open IrfanView and select Batch Conversion/Rename option from File Menu(Shortcut Key: B ) Navigate to folder where your images are located and Add the ones you want to compress. Choose the options you want to do from left window pane. Select the format and other options like Compression Ratio etc. from the Batch Conversion Settings Menu. Choose the options according to your need. After you are all set Click Start Batch. You images will be converted and you can find them in the specified output directory. Note—...

Check Who Is Copying Files From Your Shared Folders

If you share files on local network you sometimes might have wanted to know who is downloading files from network shares. You can do this easily with built-in tools in Windows. Do the following steps:— Open Microsoft Management Console by typing ‘mmc’ Run or Search box in Start Menu. Then select File—>Add/Remove Snap-in in the open Console Window.(You can also use CTRL + M shortcut key.) Choose Shared Folders from available snap-ins and click Add button. Choose All view and click Finish . This creates the MMC Console which displays shared folders, current sessions and open files. Expand the Shared Folders menu and select Sessions . You will be able to see users currently connected to your pc and the exact file they have opened.   This method works in Windows 7 as well as Windows 8 also.

Share Files on Local Area Network on Windows 7 without HOMEGROUP

Previously I wrote about finding shared resources and files on your local network using SoftPerfect Network Scanner . In this post I am going to write about how to properly share files on local network. Unlike Windows XP where you could easily share a file just by going to its properties and checking the Share Folder option, in Windows 7 you’ll have to make sure that Everyone has Read access on the folder. Otherwise you’ll encounter permission problems like below. First of all you’ll have to make sure that you have turned on network discovery and file sharing from advanced sharing option for whatever profile you may uning for your network. Go to the properties of the folder you want to share by right clicking on the folder and selecting properties. Then go to Sharing Tab and then click on Advanced Sharing. Check on the option of Share this folder. Now go back and select Security tab on the folder properties. Click on Edit and the select Add. In the opened window type “Everyone...

Easily find computers sharing files on your local area network

In colleges and other big organisations people share files through Windows File Sharing option within their homegroup/workgroup. One irritating problem one a has to go through is that while not all people may have a folder to share but the windows Network locations will show all the devices connected. On opening these computers one encounters Network Password error. One may have turned on sharing but the shared folder might have restricted access. So it is a a very painful experience to browse through the network pc’s. SoftPerfect Network Scanner  is a Network Scanner that does the job of finding connected devices on your LAN and displaying all the shared resources. Key Features:— Pings computers and displays those alive. Detects hardware MAC-addresses, even across routers. Detects hidden shared folders and writable ones. Detects your internal and external IP addresses. Scans for listening TCP ports, some UDP and SNMP services. Retrieves currently logged-on users, configured ...