Showing posts from August, 2015

Error 404 - Can't access Admin after moving to new server

The reason for this error is that store_id and website_id for admin should be set to 0 (zero). But, when you import database to new server, somehow these values are not set to 0.
Open PhpMyAdmin and run the following query in your database:-
SET FOREIGN_KEY_CHECKS=0; UPDATE `core_store` SET store_id = 0 WHERE code='admin'; UPDATE `core_store_group` SET group_id = 0 WHERE name='Default'; UPDATE `core_website` SET website_id = 0 WHERE code='admin'; UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN'; SET FOREIGN_KEY_CHECKS=1; Back up database before making any changes also see log file to find exact issue. Also you can refer link 404 magento admin error Hope this is helpful to you

Get file extension from a path in Laravel

Use the File::extension() method.
$extension =File::extension($filename); If there is no extension, an empty string is returned. Otherwise, a string containing everything after the last period in the filename is returned.

Get all users session data in Codeigniter

to get all session data you can use $this->session->all_userdata(); to print all your session variable use this line anywhere in your code : echo '<pre>'; print_r($this->session->all_userdata());exit;