This is my memo for quick reference to install SAP Java Connector 3(SAP Jco3) on tomcat in linux system.

I use RHEL5,tomcat6,sapjco3. Here are simple step.

1. Check your java version, SAP Jco3 require JRE 1.5 or 1.6

2. Download latest SAP Java Connector from http://service.sap.com/connectors select package that match your hardware. In my case,package for linux on intel x86 is sapjco3-linuxx86_64-x.x.x.tgz

3. extract file to sapjco-installation-path like /opt/sapjco3

4. add your sapjco-installation-path to environment variable LD_LIBRARY_PATH.

5. add your sapjco-installation-path/sapjco3.jar to environment variable CLASSPATH.

restart tomcat. That's it.

If you migrate from sapjco2 to sapjco3 you have to adapt your code by read this migration guide:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6080c13b-e2d1-2c10-5f88-bd5a9e35d726?QuickLink=index&overridelayout=true

After add new SAN disk to linux system, if you want linux system detect new disk without rebooting system you can execute this command.

for scsi disk
#echo 1 > /sys/class/fc_host/host$host/issue_lip

for fc disk
#echo "- - -" > /sys/class/scsi_host/host$host/scan

you can list your hba wwn in linux by display node_name

#cat /sys/class/fc_host/host$host/node_name

while $host is your hba no.

you can display scsi device in linux system by display scsi that will map to device like /dev/sda, /dev/sdb in sequence.

#cat /proc/scsi/scsi

for example: it will map scsi0 to /dev/sda and scsi1 to /dev/sdb

Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST3320620NS Rev: 3.AE
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST31000333AS Rev: CC1H
Type: Direct-Access ANSI SCSI revision: 05


to remove single scsi device:

echo "scsi remove-single-device a b c d" > /proc/scsi/scsi

to add single scsi device:

echo "scsi add-single-device a b c d" > /proc/scsi/scsi

while
a == hostadapter id (first one being 0)
b == SCSI channel on hostadapter (first one being 0)
c == ID
d == LUN (first one being 0)

Because xen virtualization will be replace by kvm on rhel6 so I have to migrate my server that running on xen virtual machine to kvm. after search on internet that have many documents and method to convert xen guest to kvm, I test migrate by manual method which is working well and easy to migrate.

My environment, I am running rhel5 xen kernel 2.6.18-92 guest and migrate to host running on the rhel5 kernel 2.6.18-168

Here are steps to migrate to kvm virtualization

1. comment HWADDR line on /etc/sysconfig/network-scripts/ifcfg-

2. change xvc0 to ttyS0 (if exist) in /etc/inittab, /etc/securetty, /boot/grub/grub.conf

3. change /dev/xvda (xvdb etc..) to /dev/hda (in case no virtio drivers or /dev/vda with virtio) in /boot/grub/device.map, /etc/fstab

if you map device with partition label (LABEL=SWAP-sda2 /swap in fstab for example) you can change partition lable with command "e2label

For change upload limit for php, you have to change upload_max_filesize, memory_limit and post_max_size parameters in php.ini (/etc/php.ini - linux) then restart apache server (service httpd restart).

someone said that post_max_size and memory_limit need to be larger than upload_max_filesize.

Today i testing moodle on my server and try to upload video file about 200MB.

For change upload file size i have to change upload_max_filesize and post_max_size on php.ini.

After that I try to upload avi file and get error and cant login to moodle anymore so i think it has something wrong about session.

after searching ppl say that have to change dbsession in mdl_config table so i try to change it in mysql database but i get error "You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit."

The reason of error is i wrong config in php.ini that i should change 3 parameters upload_max_filesize, post_max_size and memory_limit , so when i change all of parameters my moodle system working fine.

Today I will test buddypress on WP 3.0 so I install new WP and buddypress on my localhost testing system, after finish install i get HTTP ERROR 404 NOT FOUND so I searching for the solution.

In my case, fix it by:

change http.conf to use mod rewrite by uncomment line

#LoadModule rewrite_module modules/mod_rewrite.so

then change "AllowOverride None" to "AllowOverride All"

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All


after change apache config you have to restart apache.. done


another reason that may happen is wordpress can't write .htaccess in wordpress directory when you change permalink in wordpress setting

solution is change .htaccess file permission from 644 to 666 then change permalink setting from wordpress dashboard, after that change file permission back to 644.

wordpress will write new access rule to .htaccess according to your setting correctly



................................

For connect SAP from php program you have to install saprfc which you can download here http://saprfc.sourceforge.net

Install saprfc on linux you have 2 option, rebuild php with saprfc extension or use dynamic module - this blog using dynamic module for configure saprfc

Install RFCSDK

1. First you have to download SAP RFCSDK from http://service.sap.com/swdc (Support Packages and Patches - Entry by Application Group - Additional Components - SAP RFC SDK)

2. unpack RFC_xxxxxxxxxx.SAR with SAPCAR

3. mv rfcsdk to /opt/rfcsdk

3. set environment variable LD_LIBRARY_PATH=/opt/rfcsdk/lib


Install SAPRFC

1. unpack saprfc-1.4.1.tar.gz

2. cd

3. # phpize
# ./configure
# make
# make install

4. insert line "extension=saprfc.so" in php.ini

install java SDK:
download jdk-6u18-linux-x64-rpm.bin from http://java.sun.com/javase/downloads/widget/jdk6.jsp
#./jdk-6u18-linux-x64-rpm.bin


install TOMCAT:
download apache-tomcat-6.0.26.tar.gz from http://tomcat.apache.org/download-60.cgi

unpack tar -xvzf http://tomcat.apache.org/download-60.cgi

move /apache-tomcat-6.0.26 to decide directory such as /opt/tomcat/

set environment variable:
PATH=/usr/java/jdk1.6.0_18/bin:$PATH
CATALINA_HOME=/opt/tomcat
JAVA_HOME=/usr/java/jdk1.6.0_18 <- path to java sdk

set TOMCAT to run as unix daemon:

cd $CATALINA_HOME/bin
tar xvfz jsvc.tar.gz
cd jsvc-src
autoconf
./configure
make
cp jsvc ..
cd ..

command to run tomcat as daemon:

$CATALINA_HOME/bin/jsvc -cp ./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

add user in file $CATALINA_HOME/conf/tomcat-users.xml


download mysql odbc from http://www.mysql.com/downloads/connector/odbc/

install rpm package rpm -Uvh xxx.rpm

insert line to /etc/odbcinst.ini

# Driver from the MyODBC package
# Setup from the unixODBC package
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib64/libmyodbc5-5.1.5.so <- path to mysql odbc lib
Setup = /usr/lib64/libodbcmyS.so
FileUsage = 1

insert line to /etc/odbc.ini

connector name = MyODBC 5.5 Driver DSN

[connector name]
Description = ODBC for MySQL
Driver = MySQL
SERVER = ip mysql database server
USER = user
PASSWORD =
PORT = 3306
DATABASE = database name
OPTION = 3

after using locate_template() to load template with child theme i get error

Warning: Cannot modify header information - headers already sent by (output started at /xxxx/wp-content/themes/bp-default/header.php:3) in /xxxx/wp-includes/pluggable.php on line 868

here a solution:

------------- edit code --------------------
edit the file wp-includes/pluggable.php
in line 863 replace:

if ( $is_IIS ) {
header("Refresh: 0;url=$location");
} else {
if ( php_sapi_name() != 'cgi-fcgi' )
status_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location", true, $status);
}

with this:
if( !headers_sent() ).
{
if ( $is_IIS ) {
header("Refresh: 0;url=$location");
} else {
if ( php_sapi_name() != 'cgi-fcgi' )
tatus_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location", true, $status);
}
--------------------------------------------

not a best solution but it get rid of that error

Hi all :)

I am coding new buddypress badge now, after seeing it on wordpress idea forum.

Feature:

user can create badge for add in other website or blog to link back to their buddypress profile.

user can select to add own image (from bp) and xprofile data into badge

admin can upload own badge logo for user badge.

Remark:

have to enable GD Lubrary

Progress:

create badge tab and fetch xprofile from buddypress.

test to create badge image using GD libray.

this is badge look like after create (you can upload your logo to replace facebook logo)



7/04/2010

create badge by fetch xprofile done but have problem with asian language (thai).
no problem in english language.



8/4/2010

create badge horizontal (still have asian language problem)




updated - user screen done





12/04/10

buddypress badge done!!!

you can download for testing here download

installation :
upload and activate
change logo in /image/logo.png

== found some bug, if anyone found any please let me know ==

19/04/10

== first version done ==

http://wordpress.org/extend/plugins/buddypress-badge/ (not upload yet)

or temporary host
megaupload.com/?d=IZWY016L

My first buddypress plugin

This plugin make user can send gifts image to other members in BuddyPress. It use activity stream to keep the gifts sent information.

Feature:
Sender (buddypress member) can choose a gift from gift box in others member gifts tab and type a message to receiver member.

Receiver member can delete or reply message using activity stream function in own profile.

Administrator can upload delete and edit gifts item in backend admin dashboard


Screen Shot: