OSCommerce ULTIMATE Seo Urls 5 overwrite url in Chinese

There are only 2 files need to adjust.

  1. change .htaccess from

RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ index.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-m-([0-9]+).html$ index.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA]
# Articles contribution
RewriteRule ^([a-z0-9/-]+)-t-([0-9_]+).html$ articles.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-au-([0-9]+).html$ articles.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-a-([0-9]+).html$ article_info.php [NC,L,QSA]
# Information pages
RewriteRule ^([a-z0-9/-]+)-i-([0-9]+).html$ information.php [NC,L,QSA]
# Links contribution
RewriteRule ^([a-z0-9/-]+)-links-([0-9_]+).html$ links.php [NC,L,QSA]
# Newsdesk contribution
RewriteRule ^([a-z0-9/-]+)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA]

 

to

 

RewriteRule ^(.*)-p-([0-9]+).html$ product_info.php [NC,L,QSA]
RewriteRule ^(.*)-c-([0-9_]+).html$ index.php [NC,L,QSA]
RewriteRule ^(.*)-m-([0-9]+).html$ index.php [NC,L,QSA]
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA]
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA]
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA]
# Articles contribution
RewriteRule ^(.*)-t-([0-9_]+).html$ articles.php [NC,L,QSA]
RewriteRule ^(.*)-au-([0-9]+).html$ articles.php [NC,L,QSA]
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php [NC,L,QSA]
# Information pages
RewriteRule ^(.*)-i-([0-9]+).html$ information.php [NC,L,QSA]
# Links contribution
RewriteRule ^(.*)-links-([0-9_]+).html$ links.php [NC,L,QSA]
# Newsdesk contribution
RewriteRule ^(.*)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA]
RewriteRule ^(.*)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA]
RewriteRule ^(.*)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA]
RewriteRule ^(.*)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA]

 

Second, under the

/catalog/includes/modules/ultimate_seo_urls5/main/validator.php

Find:

Usu_Main::i()->setVar( 'request_compare_in', remove_session_id( htmlspecialchars_decode( Usu_Main::i()->getVar( 'original_request_uri' ) ) ) );

replace

Usu_Main::i()->setVar( 'request_compare_in', remove_session_id( htmlspecialchars_decode( urldecode( Usu_Main::i()->getVar( 'original_request_uri' ) ) ) ) );

addon

http://addons.oscommerce.com/info/6768

 

Plesk 12.5 setup mail setup on outlook and iPhone

Plesk 12.5 setup outlook so far only be able to setup with pop mail

under server info

incoming mail server: yourdomain.com

outgoing mail server: yourdomain.com

check require logon using spa,

inside more setting/ advanced

incoming 110

outgoing smtp 587 NOTE: the encrypted connection need to change to tls

OUTGOING SERVER

check my outgoing server require authentication.

log on using

your user and pass.

done

iPhone setup

need to go thought all pop setup. the setup will give some error while configuration the email.

after that change the smtp server to 587 under advanced setting.

 

done

how to upgrade openssl

Upgrading OPENSSL on RedHat 7.3 (Simple Guide)
==============================================

* Download latest openssl AND openssl-engine from :

     http://www.openssl/org -OR-
     http://openssl.planetmirror.com

* Copy all *.tar.gz to /tmp

* Building openssl-0.9.6g

     cd /tmp
     tar -zxvf openssl-0.9.6g.tar.gz
     cd openssl-0.9.6g.tar.gz
     ./config shared
     make
     make test
     make install

* Building openssl-engine.0.9.6g

     cd /tmp
     tar -zxvf openssl-engine-0.9.6g.tar.gz
     cd openssl-engine-0.9.6g.tar.gz
     ./config shared
     make
     make test
     make install

* Remove old openssl rpm 

     rpm --erase --nodeps openssl

* Link new files

     cd /usr/lib
     rm libcrypto.so
     rm libcrypto.so.1
     rm libcrypto.so.2
     rm libssl.so
     rm libssl.so.1
     rm libssl.so.2
     ln -s /usr/local/ssl/lib/libcrypto.so libcrypto.so
     ln -s /usr/local/ssl/lib/libcrypto.so libcrypto.so.1
     ln -s /usr/local/ssl/lib/libcrypto.so libcrypto.so.2
     ln -s /usr/local/ssl/lib/libssl.so libssl.so
     ln -s /usr/local/ssl/lib/libssl.so libssl.so.1
     ln -s /usr/local/ssl/lib/libssl.so libssl.so.2

     ln -s /usr/local/ssl/include/ /usr/include/ssl

     cd /usr/include
     rm -rf openssl
     lb -s /usr/local/ssl/include/openssl openssl     

* Rerun ldconfig

     cd /etc
     rm ld.so.cache

     vi ld.so.conf

        - add /usr/local/ssl/lib
        - add /usr/local/lib       <-- optional

     ldconfig

PCI Compliance for FTP Supports Clear Text Authentication Fix

login to ssh and locate the file
/etc/proftpd.conf
and add the following line to the file

<IfModule mod_tls.c>
        TLSEngine on
        TLSLog /var/log/proftpd/proftpd.tls.log
        TLSProtocol TLSv1
        TLSVerifyClient off
        TLSRequired off

        #Certificates
        TLSRSACertificateFile /etc/exim.cert
        TLSRSACertificateKeyFile /etc/exim.key
        #TLSCACertificateFile /etc/ftpd/root.cert.pem

        TLSCipherSuite HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3
</IfModule>

restart your ftp server. or reboot your server

How to backup and restore large mysql database

Since my shopping cart getting bigger and bigger, backup become one of the big issues with my current shopping cart. So, I decided using ssh to directly backup the database.

First, you need to has ssh access and using putty log into the server.

second, local the folder that allow you to using you ftp program to download the file.

third, run the following command

$ mysqldump --add-drop-table -u db_username -p db_name > mybackup.sql

db_username = database username

db_name = database name

mybackup.sql = the backup file name.

if you want to gzip your file, follow the following simple
mysqldump –opt -u [user_name] -p [database_name] | gzip > [backup_file].dump.gz

restore database command as follow

$ mysql -u username -p databasename < database.sql

 

I think it is easier if you have ssh to backup and using wget command download from one server to the other to run the backup.

How to upgrade your openssl with centos under vps

Login to your server root
and type in the following command
* cd /usr/local/src
* wget -N http://www.openssl.org/source/openssl-1.0.0c.tar.gz
* tar -xzvf openssl-1.0.0c.tar.gz 
* cd openssl-1.0.0c
* ./config
* make
* make install
* alias cp=cp
* cp /usr/local/ssl/bin/openssl /usr/bin/openssl
* cd /usr/local/ssl/include
* ln -s /usr/local/ssl/include/openssl openssl


This installation is work under 1and1 vps centos environment. 

Magento basic server requirment mcrypt and libmcrypt library installation.

 

Install libmcrypt and php-mcrypt on CentOS 5.3 without losing too much hair

I had to install mcrypt on a new virtual private server running CentOS 5.3 and Plesk 9.2. We didn’t want to do compile it, so we used yum to install it. The libmcrypt library is used to provide cryptographic functions and we are planning to use them in our php scripts. Let’s try to install it…

[root@nechi etc]# cat /etc/redhat-release
CentOS release 5.3 (Final)
[root@nechi etc]# uname -a
Linux nechi.local 2.6.18-028stab064.7 #1 SMP Wed Aug 26 13:11:07 MSD 2009 x86_64 x86_64 x86_64 GNU/Linux
[root@nechi etc]# php -v
PHP 5.2.11 (cli) (built: Oct 7 2009 08:45:24)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
[root@nechi etc]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* atomic: www5.atomicorp.com
* base: mirror.nic.uoregon.edu
* updates: mirror.chpc.utah.edu
* addons: centos.mirror.nac.net
* extras: mirror.stanford.edu
plesk | 951 B 00:00
atomic | 951 B 00:00
base | 2.1 kB 00:00
updates | 1.9 kB 00:00
addons | 951 B 00:00
extras | 1.1 kB 00:00
repo id repo name status
addons CentOS-5 – Addons enabled : 0
atomic CentOS / Red Hat Enterprise Linux 5 – at enabled : 709
base CentOS-5 – Base enabled : 3,348
extras CentOS-5 – Extras enabled : 290
plesk Plesk Server Administrator enabled : 193
updates CentOS-5 – Updates enabled : 363
repolist: 4,903
[root@nechi etc]#

The easiest way to do this is to use the php-mcrypt rpm package. That package has some dependencies. Earlier, I had installed libmcrypt so I figured I could just install the php-related rpm and I’d be done:

[root@nechi etc]# yum install php-mcrypt
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* atomic: www5.atomicorp.com
* base: mirror.nic.uoregon.edu
* updates: mirror.chpc.utah.edu
* addons: centos.mirror.nac.net
* extras: mirror.stanford.edu
Excluding Packages from Plesk Server Administrator
Finished
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package php-mcrypt.x86_64 0:5.2.11-2.el5.art set to be updated
–> Processing Dependency: libltdl.so.3()(64bit) for package: php-mcrypt
—> Package php-mcrypt.i386 0:5.2.11-2.el5.art set to be updated
–> Processing Dependency: libltdl.so.3 for package: php-mcrypt
–> Processing Dependency: libc.so.6(GLIBC_2.4) for package: php-mcrypt
–> Processing Dependency: libc.so.6 for package: php-mcrypt
–> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt
–> Processing Dependency: libc.so.6(GLIBC_2.1.3) for package: php-mcrypt
–> Processing Dependency: libc.so.6(GLIBC_2.0) for package: php-mcrypt
–> Running transaction check
—> Package libtool-ltdl.i386 0:1.5.22-6.1 set to be updated
—> Package php-mcrypt.i386 0:5.2.11-2.el5.art set to be updated
–> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt
—> Package glibc.i686 0:2.5-42 set to be updated
—> Package libtool-ltdl.x86_64 0:1.5.22-6.1 set to be updated
–> Finished Dependency Resolution
php-mcrypt-5.2.11-2.el5.art.i386 from atomic has depsolving problems
–> Missing Dependency: libmcrypt.so.4 is needed by package php-mcrypt-5.2.11-2.el5.art.i386 (atomic)
Error: Missing Dependency: libmcrypt.so.4 is needed by package php-mcrypt-5.2.11-2.el5.art.i386 (atomic)
[root@nechi etc]#

Oh great, it’s 1am on a Saturday night and my new OS hates me (digression: this speaks volumes).

[root@nechi etc]# yum list installed | grep mcrypt
libmcrypt.x86_64 2.5.8-4.el5.centos installed
[root@nechi etc]# ldconfig -p | grep libmcrypt.so.4
libmcrypt.so.4 (libc6,x86-64) => /usr/lib64/libmcrypt.so.4
[root@nechi etc]# find / -name libmcrypt.so.4
/usr/lib64/libmcrypt.so.4
[root@nechi etc]# ls -la /usr/lib64/libmcrypt.so.4
lrwxrwxrwx 1 root root 18 Dec 6 00:25 /usr/lib64/libmcrypt.so.4 -> libmcrypt.so.4.4.8
[root@nechi etc]# yum install libmcrypt-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* atomic: www5.atomicorp.com
* base: mirror.nic.uoregon.edu
* updates: mirror.chpc.utah.edu
* addons: centos.mirror.nac.net
* extras: mirror.stanford.edu
Excluding Packages from Plesk Server Administrator
Finished
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package libmcrypt-devel.x86_64 0:2.5.8-4.el5.centos set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================================
Installing:
libmcrypt-devel x86_64 2.5.8-4.el5.centos extras 10 k

Transaction Summary
=========================================================================================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 10 k
Is this ok [y/N]: y
Downloading Packages:
libmcrypt-devel-2.5.8-4.el5.centos.x86_64.rpm | 10 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libmcrypt-devel [1/1]

Installed: libmcrypt-devel.x86_64 0:2.5.8-4.el5.centos
Complete!
[root@nechi etc]# yum install php-mcrypt

So can you guess what happened next? The library was found the next time I tried to install it, right? Of course not. It still couldn’t find the stupid library. So Google and I had a talk and it turns out that you need to be really specific about your package (a good general rule in most situations) if you have a 64-bit machine.

[root@nechi etc]# yum install php-mcrypt.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* atomic: www5.atomicorp.com
* base: mirror.nic.uoregon.edu
* updates: mirror.chpc.utah.edu
* addons: centos.mirror.nac.net
* extras: mirror.stanford.edu
Excluding Packages from Plesk Server Administrator
Finished
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package php-mcrypt.x86_64 0:5.2.11-2.el5.art set to be updated
–> Processing Dependency: libltdl.so.3()(64bit) for package: php-mcrypt
–> Running transaction check
—> Package libtool-ltdl.x86_64 0:1.5.22-6.1 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================================
Installing:
php-mcrypt x86_64 5.2.11-2.el5.art atomic 27 k
Installing for dependencies:
libtool-ltdl x86_64 1.5.22-6.1 base 37 k

Transaction Summary
=========================================================================================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 64 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): php-mcrypt-5.2.11-2.el5.art.x86_64.rpm | 27 kB 00:00
(2/2): libtool-ltdl-1.5.22-6.1.x86_64.rpm | 37 kB 00:00
—————————————————————————————————————————————–
Total 76 kB/s | 64 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libtool-ltdl [1/2]
Installing : php-mcrypt [2/2]

Installed: php-mcrypt.x86_64 0:5.2.11-2.el5.art
Dependency Installed: libtool-ltdl.x86_64 0:1.5.22-6.1
Complete!
[root@nechi etc]#

OMFG. Hey, did I mention that it is a Saturday night?

[root@nechi etc]# php -r “echo phpinfo();” | grep “^mcrypt”
mcrypt
mcrypt support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value
[root@nechi etc]#