After installing APC extension for cache on php, i got error message when opening phpmyadmin on my localhost (xampp). After figure out on net, i found there are 3 ways to fix it
- add this line on php.ini
apc.filters = “-/usr/share/phpmyadmin/.*”
- add this line on php.ini
apc.cache_by_default = 0
- or add this line on xampp virtual host file config
<Directory “/usr/share/phpmyadmin”>
php_admin_flag apc.enabled Off
</Directory>
This would remove APC error message from phpmyadmin
I got strange error message when trying to upload to remote server. My client buy hosting and probably a shared hosting. The error message is this
Error: SQLSTATE[42000]: Syntax error or access violation: 1104 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
So i start to figure out, i believe this is related with server setting because the application run correctly locally without any error. So after google, i found fast solution to fix this problem
Edit /lib/Cake/Model/AclNode.php and add this line text after line 112. I am using cakephp 2.1.3
$db->query(‘SET SQL_BIG_SELECTS=1’); //Add this line
$result = $db->read($this, $queryData, -1);
$path = array_values($path);
It seem problem only on shared hosting. I hope this articles help you
After upgrading PHP version into 5.3.5, i got several Strict standards warning error on my cakephp installation. The error are look like this
Strict standards: Redefining already defined constructor for class Object in C:\wamp\www\cake\libs\object.php on line 69
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\cake\libs\object.php on line 94
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\cake\libs\security.php on line 48
This message is really bother me, i have try to set debug option on cake core.php file, but it doesn’t solved the problem. The error still show up. So i search on google for the solution. And one solution is by setting php value for error_reporting into 6143. You can either set this value on php.ini or root .htaccess file.
set on php.ini
error_reporting=6143
(more…)
I have been code a day to fix problem on manual login cakephp 2. I try to redesign my cms using the latest cakephp 2 version, which in my opinion are great improve especially for the performance of framework. However there are many thing are make me confusing and a bit frustating.
I have use the magic of login Auth function, which is fast to build a login form. However on certain condition we still need manual login using user parameter on the function. For example when coding for auto login using remember me function. The user data are save on cookie when remember me selected.
This function are nice when we want the user to have option to save their login data for certain period. In this scenario, as long the cookie data available on their browser cache, they will automatically login when opening the site. It is convenient for user because they don’t need to login everytime they open the site.
(more…)
Default setting for meta title on prestashop are display at the end. Even if you set meta title on each CMS page or categories product page using SEO options, the shop name still display at the end of meta title. This make the title are too long and not sufficient for SEO.
To remove shop name from meta title is by editing file classes/Tools.php. And then search to function getMetaTags and getHomeMetaTags.If you want to change only homepage, then change only getHomeMetaTags function. But if you want to change other pages also, please change on getMetaTags.
You will need to remove all the dashes and PS_SHOP_NAME parts of the functions of classes/Tools.php. Save the file and upload to ftp server. Now you have a good meta title for your prestashop website.
Sometime we need to change the order id running number for new installed prestashop. The reason probably to make transaction on our website shop is more trusted for new customer. For new online shop, it is hard to get trust at the beginning except we do branding a lot at launch. There is probably another reason to change order id running number, one that come to my mind is hiding our statistic data from competitor.
In my opinion we need to change order id running number and customer id running number. This way the customer are trust us as a popular web shop. So how do i change running number for order id on prestashop?
It is easy, but you need to have access to database, specifically phpmyadmin interface. And then run this query on prestashop database
ALTER TABLE `ps_orders` AUTO_INCREMENT =255344;
255344 is the next order id.
And then for customer running number also same. Change through phpmyadmin by running this query
ALTER TABLE `ps_customer` AUTO_INCREMENT =104;
104 is the next customer id
Please make sure to backup database first before running query and after query run please test once again the website order flow.
I recommend to use new logical running number, nowdays people are able to check if your website new or not.
Cakephp is a good framework, it include many aspect of building a website fast. Handling error in cakephp 2 is easy, by default you can change template for all type of error inside folder app/Views/Errors (in prior version app/views/errors). You can create each template for each error, such as
Http Error
error400.ctp
error404.ctp
error500.ctp, etc
Missing File
missing_action.ctp
missing_component_class.ctp
missing_component_file.ctp
missing_connection.ctp
missing_controller.ctp
missing_helper_class.ctp
missing_helper_file.ctp
missing_layout.ctp
missing_model.ctp
missing_scaffolddb.ctp
missing_table.ctp
missing_view.ctp
(more…)
Debugging mode and deploy mode must have different handling. When developing we need to enable debug mode to see warning or problem on our website before ready to launch. When all function are tested without error, we are ready to launch it and put it to deploy mode. This article is about how to optimize prestashop on deploy mode.
There are several setting that you can use to maximize page load on prestashop, such as
- Enable Smarty Cache File
Set force compile to off will make page load are faster. Always Force compile will slow down the page load, only enable when you do template changes
- Enabled CCC Setting
Enable this to CSS, Javascript, and HTML without touching your template will improve your website performance. It decrease server load by combine all CSS files into one file. Also this setting compress the file so the filesize is smaller make it faster to load.
- Enable Cache System
This is important, if you dont have memcached feature on your hosting, just use File system cache. This caching system significantly improve page load speed.
Where you can find this setting to optimize prestashop? Just go to admin area, open menu Preferences > Performance
SEO is important when we want to optimize our website to gain more visitor from search engine result page. It is important to have unique title, keyword and description metatag for all your web pages. This way the search engine crawler will index better using this information. It is also important for prestashop to have seo for homepage, however probably it is a bit confusing to set it on admin area.
I will tell you how to edit seo parameter for title, keyword and description metatag for your homepage or your other pages except products and categories. Please follow this step
- Go to admin area
- Open Menu Preferences > SEO & URLs
- And then edit index.php from the page list (url lists)
- On next interface you will see input field for title, keyword and description metatag
Using this way, you could change seo parameter for another pages, just find on the list and then edit it.
I got strange error when Configure any module on prestashop Module menu. If i click Configure to any module that are installed, i will get this error message “Module uninstalled successfully“. I try to reset the module, and it work for a while when i click configure, but then when i save the configuration, it showing that error again.
So i explore about this problem and found there is a bug that when we enable cache system, the system will showing that error message. So i do this step
- Go to Preferences > Performance, and turn off Caching. I also turn off smarty cache and force to compile.
- And then i configure the modules, and never get that strange message anymore
I think the caching system need to fixed, because this caching system on prestashop often making strange behavior on the interface. If you find case like this just turn of caching system first. If everything has been setup then we can enable the caching system again for better performance on frontend