Tuesday, December 21, 2010
How to access Windows XAMPP server online
How to enable mod_rewrite in ubuntu 9.04 (might work in other version)
First install the apache2.2 with this command :
debian user please use “su” before start this process
ubuntu user please use “sudo su” before start this process
apt-get install apache2 (it will install apache 2.2)now use locate to find if the mod_rewrite.so is availble on your server
updatedb
locate mod_rewrite.so
it will found in “/usr/lib/apache2/modules”
new apache follow some folders to enable and desuable mods.
so now do this:
cd /etc/apache2/mods-enabled
touch rewrite.load
gedit rewrite.load (you may use any editor to edit this file)now paste this following line
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.soThen edit /etc/apache2/sites-available/000-default
Find the following
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from alland change it to
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from alland finally restart Apache
Monday, November 29, 2010
Create MySQL user account and priviledge from the Terminal
- Open a terminal and login to MySQL as root:
mysql --user="root" --password="your_root_password" - Create a new user and password with the following command:
CREATE USER 'new_username'@'localhost' IDENTIFIED BY 'password_for_new_username'; - Assign privileges to the new user, enter the command:
GRANT ALL ON *.* TO 'new_username'@'localhost'; - Exit MySQL interface, enter:
exit
Tuesday, October 26, 2010
Delete test orders, invoices, shipments, and credit memos in magento
Delete test orders:
sales_order.entity_id = sales_order_entity.parent_id
- Select sales_order table
- Take note the sales_order.entity_id of the test orders.
- Delete all test order rows. You can determine the test orders based on sales_order.increment_id and sales_order.created_at.
- Select sales_order_entity table
- Delete all rows with sales_order_entity.parent_id equal to sales_order.entity_id
- sales_order_entity - delete rows with entity_type_id = 16
- sales_order_entity - delete rows with entity_type_id = 19
- sales_order_entity - delete rows with entity_type_id = 23
Monday, October 25, 2010
Where to edit "Shipping & Handling" text
/app/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php
Friday, October 1, 2010
Charice feat Iyaz - "Pyramid" Official Music Video
Pyramid lyrics
Songwriters: Alkenas, Johan; Anderson, Lyrica; Jassy, David; Molinder, Niclas; Persson, Joacim;
Shawty's love is like a pyramid
We stand together 'til the very end
There'll never be another love for sure
Iyaz and Charice let we go
Stones
Heavy like the love you've shown
Solid as the ground we've known
And I just wanna carry on
We took it from the bottom up
And even in a desert storm
Sturdy as a rock, we hold
Wishing every moment froze
Now I just wanna let you know
Earthquakes can't shake us
Cyclones can't break us
Hurricanes can't take away our love
Pyramid, we built this on a solid rock
It feels just like it's heaven's touch
Together at the top
(At the top, baby)
Like a pyramid
And even when the wind is blowing
We'll never fall, just keep on going
Forever we will stay
Like a pyramid
Like a pyramid, like a pyramid, hey
Like a pyramid, like a pyramid, hey
Like a pyramid, like a pyramid, hey
Cold, never ever when you're close
We will never let it fold
A story that was never told
Something like a mystery
And every step we took we've grown
Look how fast the time has flown
A journey to a place unknown
We're going down in history
Earthquakes can't shake us
Cyclones can't break us
Hurricanes can't take away our love
Pyramid, we built this on a solid rock
It feels just like it's heaven's touch
Together at the top
(At the top, baby)
Like a pyramid
And even when the wind is blowing
We'll never fall, just keep it going
Forever we will stay
Like a pyramid
Like a pyramid, girl, l'mma show you
That I love you so much, that we gonna get through
Even when it storms, I will never go
I'mma be the one to keep you safe, hey
Four walls and love, packin' more than enough
Holding on to one another, be the cover when it's rough
Mother nature or disaster
Won't stop our happy ever after
Pyramid, keep it going
(Like a pyramid, like a pyramid)
Whoa
(Like a pyramid, like a pyramid)
Pyramid, we built this on a solid rock
It feels just like it's heaven's touch
Together at the top
(At the top, baby)
Like a pyramid
And even when the wind is blowing
We'll never fall, just keep on going
Forever we will stay
Like a pyramid
We built this on a solid rock
It feels just like it's heaven's touch
Together at the top
(At the top, baby, at the top)
Like a pyramid
And even when the wind is blowing
We'll never fall, just keep it going
Forever we will stay
Like a pyramid
Like a pyramid, like a pyramid, hey
Like a pyramid, like a pyramid, yeah
Like a pyramid, like a pyramid, hey
Thursday, September 30, 2010
Tuesday, September 28, 2010
How to include files in php from /usr/share/php/ (ubuntu - Hardy Heron)
sudo apt-get install php-pear
Checking if PEAR works - http://pear.php.net/manual/en/installation.checking.php
save files to - /usr/share/php
access the file in your code using:
require_once 'the_file_stored_in_usr';
PHP SESSION variables
session_register('variable1');
$variable1 = 'sample value';
file2.php
echo $_SESSION['variable1']; // displays: sample value
note:
Be sure that "register_globals = On " in php.ini
Sunday, September 26, 2010
database bin files location in ubuntu 8.04
It is important to note that when exporting/importing large db file or sql it is always best to access it via bin files.
Friday, September 24, 2010
How to Install Entrust SSL certificate in cPanel/WHM
2. In the first box, paste in the "Server Certificate" provided by Entrust.
3. In the second box, paste in your private key which was generated when you created the CSR.
4. In the third box, paste in both the "Chain Certificate" and then the "Root Certificate".
5. At the top of the page click "Submit".
Sunday, September 19, 2010
Dump just the table structure to a file in MySQL
The only option that is different than creating an entire backup is the -d switch, which tells mysqldump not to output the data.
Monday, September 13, 2010
Friday, August 27, 2010
Monday, August 23, 2010
Thursday, August 19, 2010
Tuesday, August 17, 2010
Thursday, August 12, 2010
Friday, August 6, 2010
Wednesday, August 4, 2010
network commands for ubuntu
/etc/password --> list users
passwd username -> change password for user username
rcp -r foldername username@hostname:/home/username -> copy folders remotely
sudo vi /etc/network/interfaces --> file for assigning static or dynamic ip
Thursday, July 29, 2010
Monday, July 26, 2010
Wednesday, July 21, 2010
Thursday, July 15, 2010
Monday, July 5, 2010
MVC Tutorial
http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/
Fatal error: Call to undefined function: curl_init() using lamp in ubuntu
sudo apt-get install php5-curlThen restart the apache web server
sudo /etc/init.d/apache2 restart
Sunday, July 4, 2010
Enabling Use Of Apache Htaccess Files
To make .htaccess files work as expected, you need to edit /etc/apache2/sites-available/default. Look for a section that looks like this:
<Directory /var/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>You need to modify the line containing
AllowOverride None to read AllowOverride All. This tells Apache that it's okay to allow .htaccess files to over-ride previous directives. You must reload Apache before this change will have an effect: sudo /etc/init.d/apache2 reloadFor windows, refer to http://www.phpmagicbook.com/allow-htaccess-and-mod-rewrite-in-wamp/
Password Protect a Directory with .htaccess
AuthUserFile /home/riariver/.htpasswd
AuthName "RiaRiver's Login Area"
AuthType BasicFirst, you've defined the location of the .htpasswd file. This is the file that contains all the usernames and encrypted passwords for your site.
The AuthName parameter defines the title of the password entry box when the user logs in. It's not exactly the most important part of the file, but should be defined.
AuthType tells the server what sort of processing is in use, and "Basic" is the most common and perfectly adequate for almost any purpose.
If we want to grant access to everyone in the .htpasswd file, we can add this line ("valid-user" is like a keyword, telling apache any user will do):
require valid-userIf we want to just grant access to a single user, we can use "user" and their username instead of "valid-user":
require user riariverA normal and complete .htaccess file might look like this:
AuthUserFile /home/riariver/.htpasswd
AuthName "RiaRiver's Login Area"
AuthType Basic
require user riariverAn .htpasswd file is made up of a series of lines, one for each valid user. Each line looks like this, with a username, then colon, then encrypted password:
username:encryptedpasswordThe password encryption is the same as you'll find in PHP's crypt() function. It is not reversible, so you can't find out a password from the encrypted version.
A user of "riariver" and password of "riariver" might be added with the following line:
riariver:$1$fuQTAqaj$X9geTeMjTiZaq5axEH/0vEach time you run an encryption function like "crypt", you will almost certainly get a different result. This is down to something called "salt", which in the above case was "XO" (first two letters of encrypted password). Different salt will give different encrypted values, and if not explicitly specified will be randomly generated. Don't worry though, the server is quite capable of understanding all this - if you come up with a different value for the encrypted password and replace it, everything would still work fine, as long as the password was the same.
Once you've created your .htpasswd file, you need to upload it to a safe location on your server, and check you've set the .htaccess file to point to it correctly. Then, upload the .htaccess file to the directory you want to protect and you'll be all set. Simply visit the directory to check it is all working.
Reference: http://www.addedbytes.com/
Tuesday, June 29, 2010
Howto use SSH local and remote port forwarding
ssh [username]@[hostname] -p [portnumber] Reference: http://www.debianadmin.com/howto-use-ssh-local-and-remote-port-forwarding.html
Monday, June 28, 2010
Create new user and password using linux terminal
Adding new user:
/usr/sbin/useradd riariverSetting up password for new user
/bin/passwd riariver
Adding user in sudoer file[jdoe@Eng-Lab-004 ~]$ su -
Password: {user root’s password}
[root@Eng-Lab-010 ~]# gpasswd -a jdoe wheel
Adding user jdoe to group wheel
[root@Eng-Lab-010 ~]#
Wednesday, June 23, 2010
Tuesday, June 22, 2010
Git: You have some suspicious patch lines…
Monday, December 29th, 2008 at 7:46 pm
So, I’ve run into this a few times now and it seems like bizarre behaviour to me. While committing, git complains about files which have trailing white space, or spaces followed by a tab. While this may not be the nicest formatting, enforcing this to be fixed before committing a file seems odd.It turns out this is being caused by a pre-commit hook. There are two options you can go with to circumvent the issue.
| git commit --no-verify . |
I’ve found that if you
| cd .git/hooks/ chmod -x pre-commit |
Apparently they are disabled by default in newer releases.
Hope this helps someone else out as well.
How to create GIT repository
- $ ssh myserver.com
- $ mkdir /opt/git/myapp.git
- $ mkdir /opt/git/myapp.git
Note: be sure that you own the folder that you have created
- $ git --bare init
Initialized empty Git repository in /var/git/myapp.git
- $ exit
Add the remote repository to your existing local git repo and push:
- $ cd /var/www/myapp
- $ git init
- $ git add .
- $ git commit
- $ git rm --cached
- $ git remote add origin ssh://myserver.com/opt/git/myapp.git
- $ git remote
- origin
- $ cat .git/config
- [core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = ssh://myserver.com/opt/git/myapp.git
fetch = +refs/heads/*:refs/remotes/origin/* - $ git push origin master
How to pull files from remote server to empty local repo
- $ cd /var/www/new_myapp
- $ git init
- $ git remote add origin ssh://myserver.com/opt/git/myapp.git
- $ git remote
- origin
- $ cat .git/config
- [core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = ssh://myserver.com/opt/git/myapp.git
fetch = +refs/heads/*:refs/remotes/origin/* - $ git pull origin master
How to push updates
- $ cd /var/www/myapp
- make some changes on the file(s)
- $ git commit -a -m "
" - $ git status
- $ git log
- $ git push origin master
- or
- $ git push
How to pull updates
- $ cd /var/www/myapp
- $ git fetch
- $ git merge origin/master
- or
- $ git pull origin master
note: if failed, try to commit first right after you fetch
$ git diff # to see the difference between files
How to add files to remote repo
- $ git add
- $ git commit -a -m
- $ git push origin master
How to clone files from repo:
- $ git clone ssh://myserver.com/opt/git/myapp.git
How to undo git add
git reset FILEname
References:
- http://toolmantim.com/articles/setting_up_a_new_remote_git_repository
- http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt
- http://git.or.cz/gitwiki/QuickStart
- http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#getting-updates-With-git-pull
- http://code.google.com/p/msysgit/
- http://danklassen.com/wordpress/2008/12/git-you-have-some-suspicious-patch-lines/
Monday, June 21, 2010
Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2000): mysqlnd cannot connect to MySQL 4.1+ using old authentication
This happened because you upgraded your mysql server to 5.x and passwords
are in 4.x format.
This will also happen if your database is accessed by
some outdated clients not supporting the new format.
Sunday, June 20, 2010
MYSQL: How to fetch the last inserted row
$last_date = mysql_query("SELECT date FROM data ORDER BY date DESC LIMIT 1");MYSQL: How to fetch a single row
Example:
<?php
$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_row($result);
echo $row[0]; // 42
echo $row[1]; // the email value
?>
Wednesday, June 16, 2010
FreePBX - Cannot receive incoming calls but can make outgoing calls
- Inform bandwidth.com for the new IP
- Login to FreePBX admin panel
- Go to "Trunks"
- Select a trunk to edit
- Change the externip of both outgoing and incoming settings to its new IP
How to connect to a remote mySQL database using PHP
- You need to access the remote server or get in touch with the remote server's tech support.
- Then
use the_database_name;
GRANT ALL PRIVILEGES ON
the_database_name.*
TO
'the_user_in_php_code'@'%'
IDENTIFIED BY
'password_of_the_user_in_php_code';
FLUSH PRIVILEGES; - If you are using phpmyadmin in your remote server, simply login and add a privileged for your host.
- Select the database from the list
- Click Privileges
- Click "Open new phpMyAdmin window" which can be found in the bottom right corner
- Click "Add a new User" which is located below the list.
- Fill in the form.
-- User name: desired_user_name
-- Host: your_IP_given_by_your_internet_service_provider
-- Password: desired_password
-- Re-type: desired_password
- Click "Go"
- In the "Database-specific privileges" section select the database for the "Add privileges on the following database:" field.
- Select "Check All" and Click "Go"
- Done.
bind-address = local ip (example: 192.168.2.80)
restart mysql or restart computer
Sunday, June 13, 2010
How to setup multiple sites in magento
- Create a new folder and copy index.php and .httaccess file.
- Edit index.php to allow it to access the mage.php file.
- Create symbolic links for js, media, and skin.
- Create a root category for this website.
- Setup a website, store, and store view.
- Setup Web configuration for the new website
- Point the unsecure and secure base url for the new website url
Monday, June 7, 2010
How to create symbolic link in linux
how to create symbolic links to all contents of a certain folder
cd /destination_folder
ln -s /source_folder/* -t .
Tuesday, June 1, 2010
Tuesday, May 18, 2010
Monday, May 17, 2010
creating custom fields in simple machines forum
http://www.simplemachines.org/community/index.php?topic=294269.0
Wednesday, May 12, 2010
how to remove duplicate rows in mysql db
CREATE TABLE new_table as
SELECT * FROM old_table WHERE 1 GROUP BY [column to remove duplicates by];
Step 2: delete delete the old tableWe no longer need the table with all the duplicate entries, so drop it!
DROP TABLE old_table;
Step 3: rename the new_table to the name of the old_table
RENAME TABLE new_table TO old_table;
And of course, don't forget to fix your buggy code to stop inserting duplicates!
Tuesday, May 11, 2010
upload multiple files to specific Magento products
Tuesday, May 4, 2010
Magento: Display category list on the left column
Sunday, May 2, 2010
installing AsteriskNOW
- http://www.youtube.com/watch?v=tn9TzJ6eZW0&feature=related - linux text installation
- http://www.youtube.com/watch?v=ONOxNJquatk
- http://www.elastix.org/index.php?option=com_openwiki&Itemid=27&id=installation - elastix
Thursday, April 22, 2010
XML - C++
- http://www.youtube.com/watch?v=L2f0z0zfIEI
- http://www.functionx.com/vcnet/xml/readwrite.htm
- http://www.codeguru.com/csharp/csharp/cs_data/xml/article.php/c4227
Wednesday, April 14, 2010
Graphs
- http://www.daniweb.com/forums/thread262956.html
- http://www.phpbuilder.com/columns/nasser20030219.php3?page=2
- http://www.aditus.nu/jpgraph/jpdownload.php
- http://code.google.com/apis/visualization/documentation/gallery.html
- http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html
- http://danvk.org/dygraphs/
- http://www.gigasoft.com/graphtool.html3
- http://danvk.org/dygraphs/
How to change phpmyadmin password
- Open C:/[path to phpmyadmin]/config.inc.php
- Look for $cfg['Servers'][$i]['password'] = 'password'; and replace its value.
Monday, April 12, 2010
Gravimeter
- http://www.waitingforfriday.com/index.php/Open_Source_Visual_C%2B%2B_Class_for_USB_Generic_HID_Communication#Files_for_download
- http://www.functionx.com/vcnet/libraries/staticnet.htm
- http://functionx.com/visualc/controls/dialogbox.htm
Monday, April 5, 2010
Sunday, April 4, 2010
Thursday, April 1, 2010
Magento : Free Shipping
Tuesday, March 30, 2010
Linux File Permissions
- Read - Denoted as r, files with read access can be displayed to the user.
- Write - Denoted as w, files with write access can be modified by the user.
- Execute - Denoted as x, files with execute access can be executed as programs by the user.
Three types of user group:
- User - The owner of the file.
- Group - Other files which are in the same folder or group.
- World - Everyone else.
Monday, March 29, 2010
How to join network workgroup in ubuntu
sudo gedit /etc/samba/smb.conf
# Change this to the workgroup/NT-domain name your Samba server will part of workgroup = workgroup
Thursday, March 25, 2010
Monday, March 22, 2010
Manually Add Product Manufacturer in magento
2. Update the catalogsearch_fulltext (using script)
FORMAT
[SKU] [MANUFACTURER] Enabled None [BRAND] [NAME] [PRICE]
3. Update catalog_product_flat_1 (admin panel)
- manufacturer
- manufacturer_value
4. Update Product Attributes (admin panel)
Tuesday, March 16, 2010
Monday, March 15, 2010
Tuesday, March 9, 2010
unclean shutdown in ubuntu
- run
root ~ # fsck /dev/sda2
fsck 1.38 (30-Jun-2005)
e2fsck 1.38 (30-Jun-2005)
/dev/sda2 have system errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found. Create
.
.
.
.
.
/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: ***** REBOOT LINUX *****
root ~ # init 6
-----------blue graphic error screen appears\
devian login: username
password:
ria@devian:~$ init 0
-----------turn on your computer
Hurray! its working!
Wednesday, March 3, 2010
Partitioning and Formatting Second Hard Drive - (ext3)
Tuesday, March 2, 2010
MAGENTO: How to display additional information in catalog product list
Std Package: getStdPkgQty() ?>
Minimum Order: getMinimumOrder() ?>
Sunday, February 28, 2010
Sunday, February 21, 2010
Friday, February 19, 2010
How to fix image cache in magento and display it in frontend
- images in product catalogs - Resize the image to 170x170 and save it in /media/catalog/product/cache/1/small_image/170x170/9df....e95/images/
- thumbnail in shopping cart - Resize the image to 75x75 and save it in /media/catalog/product/cache/1/thumbnail/75x/9df....e95/images/
- thumbnail in product view - Resize the image to 70x70 and save it in /media/catalog/product/cache/1/thumbnail/70x70/9df....e95/images/
- thumbnail in my cart - Resize the image to 50x50 and save it in /media/catalog/product/cache/1/thumbnail/50x50/9df....e95/images/
Wednesday, February 17, 2010
Move Magento To Another Directory
If you’ve installed Magento in a subdirectory or even the root web directory and would like to move it somewhere else, here is how you do it.
Let’s say you have Magento installed in the following location:
http://www.yourdomain.com/store/
And you want Magento to be the first thing that comes up when visitors go to your site:
http://www.yourdomain.com We’ll assume you have a directory structure like this:
/home/username/public_html/ Meaning Magento would be installed here:
/home/username/public_html/store/
First, login to the backend of Magento and go to:
System -> Configuration -> Web Update the Unsecure and Secure URL for your store.
Next, connect to your site via SSH and go to the directory where you will be moving Magento:
- cd public_html/
Now, move all the files from the store directory to the directory you’re in:
- mv store/* store/.htaccess .
Delete the cache data:
rm -rf var/cache/ var/session/ And you’re done. Magento has now been moved up one directory.
Article from: http://www.magentocommerce.com/wiki/groups/227/move_magento_to_another_directory
Tuesday, February 16, 2010
Files affected after Magento upgrade
- Your magento's default theme is replaced by the new default theme after upgrading your Magento store.
So, it is not a good idea to edit the default theme. If you want a new theme based on its default theme,
you need to duplicate the default theme and give a new name. Please refer to "Adding new magento theme".
Adding New Magento Theme
1. You can download free magento themes from http://www.templates.com/blog/free-magento-themes-for-your-web-store/,
create your own theme or create a theme based on the default theme.
2. Place the design files of your theme in magento_root_directory/skin/frontend/default/[template_name] and
the code files of your theme in magento_root_directory/app/design/frontend/default/[template_name].
3. Login to magento admin panel and go to System -> Design
4. Click "Add Design Change"
5. From the "Custom Design" drop down list, select your newly created theme.
6. You can also specify the date range for up to when a theme will display by filling-out "Date From" and "Date To" fields.
7. Click "Save"
You can add more themes for as long as all theme will have different date range.
Moving magento to another server
1. From the admin, go to Configuration -> Web -> and change the (Unsecure and Secure) fields to Template:Base url.
2. From the admin, go to System -> Tools -> Backups and click on the backup button. This will create a backup of your database.
3. Make a copy your Magento root.
4. Move all data over to the new server.
5. Restore the database on the new host.
6. If you have a different username, password or database name. You’ll need to update that as well. You can find the file in (’magento_root/app/etc/local.xml’) and make the required changes.
7. Navigate to your Magento root, and delete all of the files and folders in, (i.e. /var/www/magento/var) except for the .htaccess file.
Monday, February 15, 2010
Magento table rates
- Go to System -> Configuration -> Shipping Methods
- Select a website in Current Configuration Scope at the top left column
- Click "Export CSV " button in the right column
- Edit the CSV and load it with data then upload it again.
Sunday, February 14, 2010
Upgrading Magento with a full package or via SVN
- Backup your database
- - In Magento go to Admin, System → Tools → Backups
- - You can use PHPMyAdmin (but this may fail due to time-limits on php scripts)
- - You can export in SSH by typing...
- - mysqldump -u USER -p DBNAME > dump.sql
- - Reimport using mysql -u USER -p DBNAME <>
- Backup all the code you modified yourself, and don’t forget to keep the original installation archive
- Take care of saving the media directory that contains all the uploaded product/category images
- Create a backup copy of app/etc/local.xml file
- Download a new installation archive or run SVN update if you checked it out from the Magento repository
- Extract and upload all the files it contains to your server
- Delete var/cache and var/session directories
- Point your browser to any Magento page
- Database upgrades should happen automatically
- You are done!
Upgrading Magento using the MagentoConnect Manager |
- Go to http://
/downloader - Log in using a user who has full permissions
- Make sure to select “Clear all sessions after successful install or upgrade”
How to upgrade from tarball installation |
It is possible that you will see no extensions in MagentoConnect Manager. This means that you have just uploaded the files without using PEAR downloader. In that case enter magento-core/Mage_All_Latest in the extension key field and click Install button. This will install all latest MagentoConnect core packages on top of existing files and will allow future upgrades through MagentoConnect.
If, after the install has completed and you hit Refresh, you get a 500 error, and you get the same on your regular admin page and your storefront, you may need to change permissions on your .php files. SSH into your server, navigate to your Magento directory, and check the permissions on index.php. If may have been changed from 644 (rw-r-r) to 666 (rw-rw-rw) during the install. If so, you can issue this command to change the permissions on all your .php files to 644 (the -v switch will make it verbose, so you will see all the changes as they are made):
find -type f -name ‘*.php’ -exec chmod -v 644 {} ;
(Please note there should be a backward slash before the final semi-colon but the wiki editor sometimes takes it out.)
Reload downloader/index.php to continue.
How to upgrade all available extensions |
There should be at least one extension marked in yellow, which means a higher version is available on the MagentoConnect server
- Click ‘Select all upgradable extensions’
- Click ‘Commit changes’
- Watch the console progress for error messages
- After successfully upgrading click the ‘Refresh’ button that will appear under the console frame.
How to upgrade specific extensions |
- For each desired extension upgrade choose ‘Upgrade’ in the dropdown
- To upgrade Magento Core modules choose the following packages, and all required dependencies will be upgraded automatically:
- magento-core/Interface_Adminhtml_Default
- magento-core/Interface_Frontend_Default
- magento-core/Interface_Install_Default
- magento-core/Mage_Core_Adminhtml
- magento-core/Mage_Core_Modules
How to upgrade MagentoConnect Manager |
- MagentoConnect Manager is not installed as a PEAR package by default. If you wish to upgrade it, you will first need to install it as a PEAR package.
- Enter
magento-core/Mage_Downloaderin the Extension key input field and click Install. - After it is installed the first time, you can upgrade it the same way as other extensions.
You can not uninstall MagentoConnect Manager
Using SSH shell access |
You need to discuss the folder/file permissions here!!!
- To initialize the Magento PEAR command line registry, run the following command from the shell. Make sure you are in the Magento root folder:
./pear mage-setup .- (make sure to include the second ‘.’)
- select php version (unix):
MAGE_PEAR_PHP_BIN=/usr/local/bin/php; export MAGE_PEAR_PHP_BIN- for 1and1.com hosting, to use PHP5:
MAGE_PEAR_PHP_BIN=/usr/local/bin/php5; export MAGE_PEAR_PHP_BIN
How to upgrade from tarball installation |
If you have not used MagentoConnect or PEAR command line to install Magento, you will need to enter this command for initial PEAR installation of all Magento core modules:
./pear install magento-core/Mage_All_Latest
(You may have to upgrade pear extensions using the next step for this step to work).
How to upgrade all available extensions |
./pear upgrade-all
How to upgrade specific extensions |
./pear upgrade magento-core/Mage_Core_Modules magento-core/Mage_Core_Adminhtml./pear upgrade magento-core/Interface_Adminhtml_Default magento-core/Interface_Frontend_Default magento-core/Interface_Install_Default
How to upgrade MagentoConnect Manager |
- If MagentoConnect Manager is not installed as a PEAR package yet:
./pear install magento-core/Mage_Downloader- After it is installed it will be upgraded just as any other extension.
Tuesday, January 26, 2010
Nice Magento Theme
Sunday, January 17, 2010
How to remove additional footer links in magento
- catalog.xml for Site Map
- catalogsearch.xml for Search Terms and Advanced Search
- contacts.xml for Contact Us
Friday, January 15, 2010
Wednesday, January 13, 2010
Subdomain to Separate IP
Example: domainame.com is hosted on server A but the shopping cart store is on server B. You need to make it look like domainname.com is also on server B. Setup a subdomain to point to a differernt ip address and voila!
1. Edit the Domains DNS Zone
Login to your WHM control panel or manually through SSH and edit a DNS zone, select the domain you wish to modify.
2. Adding the A Record
Create a new record for the subdomain Eg: Type in store for the name, select A record type and then type in the IP address you need it to mask to.
3. Ensure it Works
Make sure there isn't an actual subdomain created in the users account that you're trying to point to a different IP address or the pointer/mask will not work!
How to setup a server to handle mails from site which is hosted in another server?
serverA -- the server that holds the website
serverB -- the server that holds the mail
In order to be able to receive emails on serverB the domain does not need to be registered there.
You can register a subdomain mail.domain-name.com in serverA to point to serverB and then create an MX record in serverB to point to mail.domain-name.com.
The MX record, short for mail exchange record, is an entry in a domain name database that identifies the mail server that is responsible for handling e-mail for that domain name.
After setting up, all mails sent to @domain-name.com will be handled by the mail.domain-name.com domain which will point to serverB.
Configuration for serverA:
1) Login to the server WHM as the root user.
2) Go to DNS Functions and Edit DNS Zone
3) Select the domain you want to edit, or type it in, and click on Edit.
4) You should see the following, or something very close to it:
5) Now the MX has a priority of 0 meaning its the only MX entry used for the domain. Replace the domainame.com. with mail.domainame.com.
6) Now change mail from CNAME to A record and take out the domain, and replace it with the IP address.
7) Save the changes. Bind will reload, if it shows any errors then you did something wrong, make sure the MX entry has a . after it!
8) Login to your server by shell as the root user. Edit the /etc/localdomains file
pico /etc/localdomains then ctrl+w to and type in the domain you modified.
Delete the entry for the domain.
Save the changes to the file, ctrl+x then Y
9) Edit the /etc/remotedomains file - this tells Exim to not handle mail for this domain.
pico /etc/remotedomains
Add the domain name to this file.
Save the changes.
10) Your now done! Make sure you dns is updated, in shell run:
host -t mx domainname.com
You should see mail.domainname.com
Configuration for serverB:
- Login to the server WHM as the root user.
- Create the domain.com (this will not replace your existing domain.com because this domain name is not pointed or registered to this server)
- Go to DNS Functions and Edit MX Entry
- Select the domain you want to edit, and click Edit
- Replace the domainame.com. with mail.domainame.com and make sure it is priority 0.
- Click Save.
- Done! You may now try some test mails.
http://www.webhostgear.com/272.html
Sunday, January 10, 2010
ORS Nasco images
- http://www.pferdusa.com/products/204/20424/2042402P.html
- http://www.shop3m.com/60600102622.html
Thursday, January 7, 2010
How to enable Flat Catalog / Product in magento
After that you will have the selection option at System->Configuration->Catalog->Frontend->Use Flat Catalog Category and Use Flat Catalog Product.
Installing Magento
* Please refer to Magento's system requirements to ensure you have the appropriate platform and environment set up. If you attempted to install Magento and the installation wizard suggested to use the PHP-CGI workaround, please click here.
* Download the .zip or .tar.gz file from the Magento website and decompress it.
* Upload the Magento web files to your web server via FTP (if you have SSH access and are comfortable with the command line, check out this wiki post.
* Create a MySQL database and user/password for Magento This step varies by hosting provider and is out of the scope of this document. Consult your provider's support/documentation for instructions on how to do this.
* Ensure that the file magento/var/.htaccess, the directories magento/app/etc, magento/var, and all the directories under magento/media are writable by the web server. To do so, navigate to the directory with your FTP client. Then locate the function "Change Permissions" or "Change Mode" in your FTP client and select it. Once you find the function, you must set the permissions so the web server can write to this file. There are two typical ways of representing file permissions in Linux:
* As a number (eg, 755)
* As a series of permissions categorized into user, group, and other
If your FTP client uses the first representation, set the permissions on each directory to be 777, or 0777. If your FTP client uses the second representation, set the permissions as shown in the image below. http://www.magentocommerce.com/wiki/magento_filesystem_permissions
[edit] Creating multiple sites
Adding a new website to your magento installation
* Create a new folder for the second websites
* Copy index.php and .htaccess into this new folder.
* Change index.hp to find mage.php and to load the new website
* Create new root category for second website
* Create new webiste, store, store view in Magento admin - point to new root system
* Configure URL structure for new website
* Add categories and products
* Make sure that products are associated with the new website.
* Finally, let's customize the look of the new site a bit. The logo is changed, and an actual homepage is assigned.
Note:
* Themes etc will be pulled from the main website, which is why the Base URL will be pointed to the main website. The new folder si referenced in the lnk URL.
* That there are no products - this means it's working, we didn't build the catalog for the second website yet.
* Also note that the second website is using all themes etc from the main site. This is what we configured in web tab of the Magento configuration.
[edit] Troubleshooting
[edit] Admin login problem in local installation
File: app/code/core/Mage/Core/Model/Session/Abstract/Varien.php Find(this should be line 70):
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()//,
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);
And comment three last parameters(and trailing comma too to avoid syntax error), this should look like:
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime()//,
$this->getCookie()->getPath()//,
// $this->getCookie()->getDomain(),
// $this->getCookie()->isSecure(),
// $this->getCookie()->getHttponly()
);
Note: This patch solves ONLY login troubles on local installations(FireFox, IE doesn’t login, Opera does).
Source: http://www.magentocommerce.com/boards/viewthread/30715/P45/#t100450
[edit] Admin page menu doesn’t work
* step1: replace the code of app/code/core/Mage/Page/Block/Html/Head.php with the one here
* step2: chmod 755 the js/ folder, and folders within.
* step3: chmod 644 the javascript files inside js/lib/
* step4: chmod 644 js/index.php
Source: http://www.magentocommerce.com/boards/viewthread/4679/P120/
[edit] Moving Magento to another server
1. From the admin, go to Configuration -> Web -> and change the (Unsecure and Secure) fields to Template:Base url.
2. From the admin, go to System -> Tools -> Backups and click on the backup button. This will create a backup of your database.
3. Make a copy your Magento root.
4. Move all data over to the new server.
5. Restore the database on the new host.
6. If you have a different username, password or database name. You’ll need to update that as well. You can find the file in (’magento_root/app/etc/local.xml’) and make the required changes.
7. Navigate to your Magento root, and delete all of the files and folders in, (i.e. /var/www/magento/var) except for the .htaccess file.
[edit] Files affected after Magento upgrade
- Your magento's default theme is replaced by the new default theme after upgrading your Magento store.
So, it is not a good idea to edit the default theme. If you want a new theme based on its default theme,
you need to duplicate the default theme and give a new name. Please refer to "Adding new magento theme".
[edit] Adding New Magento Theme
1. You can download free magento themes from http://www.templates.com/blog/free-magento-themes-for-your-web-store/,
create your own theme or create a theme based on the default theme.
2. Place the design files of your theme in magento_root_directory/skin/frontend/default/[template_name] and
the code files of your theme in magento_root_directory/app/design/frontend/default/[template_name].
3. Login to magento admin panel and go to System -> Design
4. Click "Add Design Change"
5. From the "Custom Design" drop down list, select your newly created theme.
6. You can also specify the date range for up to when a theme will display by filling-out "Date From" and "Date To" fields.
7. Click "Save"
You can add more themes for as long as all theme will have different date range.
Maximum number of products Magento can handle
- http://www.magentocommerce.com/boards/main.php/viewthread/17189/P15/