Sunday, August 28, 2011

install xdebug with Zend Server CE and Netbeans 7.0.x

Go to Fedora "Application -> System Tools -> Add/Remove Software" and make sure PHP PEAR and PHP PECL and XDebug are installed already. Then, run the following commands to add xdebug into Zend Server.

#  edit debugger.ini file to disable zend debugger.
#  ; register the extension to be loaded by Zend Extension Manager
# ;zend_extension_manager.dir.debugger=/usr/local/zend/lib/debugger
[root@jiaFedora14 yyjia]# sudo gedit /usr/local/zend/etc/conf.d/debugger.ini

#find where is xdebug.so
[root@jiaFedora14 /]# find /usr/ -name 'xdebug.so'
/usr/lib64/php/modules/xdebug.so

#  Make zend server to load xdegug.so before extension manager is loaded.
#  zend_extension=/usr/lib64/php/modules/xdebug.so
#  zend_extension=/usr/local/zend/lib/ZendExtensionManager.so
[root@jiaFedora14 yyjia]# sudo gedit /usr/local/zend/etc/conf.d/extension_manager.ini

# edit php.ini or other configuration files to have xdebug settings
# [xdebug]
# xdebug.remote_enable=on
# xdebug.remote_handler=dbgp
# xdebug.remote_mode=req
# ;xdebug.remote_connect_back=1
# xdebug.remote_host=192.168.1.190
# xdebug.remote_port=9001
# xdebug.idekey="netbeans-xdebug"
[root@jiaFedora14 yyjia]# sudo gedit /usr/local/zend/etc/php.ini

# Fedora has SELinux enabled by default. I open the port 9001.
[root@jiaFedora14 yyjia]# semanage port -a -t http_port_t -p tcp 9001

# restart Zend Server
[root@jiaFedora14 yyjia]# service zend-server restart

# check xdebug configuration.
[root@jiaFedora14 yyjia]# php -i | grep xdebug

After running all above command and see every thing is correct as expected, we do a simple configuration in Netbeans as shown in figure below,




Some notes:
1) The above steps only install xdebug for one developer. For a team developing environment, we need to install DBGp proxy.

2) I tried "xdebug.remote_connect_back=1" and hope I do not need to specify a fix hostname/ipaddress in php.ini. But, I failure on it. I have not dig deep into it.

Thursday, August 18, 2011

i5/OS job status help file

Below is job status help file exactly copied from i5/OS R5V4 help menu. I copy it here to study them in detail later. Especially for status of prestart job on i5/OS.




The status of the initial thread of the job. Only one status is
displayed per job. A blank status field represents an initial thread
that is in transition. Possible values are:

BSCA
The initial thread of the job is waiting for the completion of an
I/O operation to a binary synchronous device in the activity level.

BSCW
The initial thread of the job is waiting for the completion of an
I/O operation to a binary synchronous device.

CMNA
The initial thread of the job is waiting for the completion of an
I/O operation to a communications device in the activity level.

CMNW
The initial thread of the job is waiting for the completion of an
I/O operation to a communications device.

CMTW
The initial thread of the job is waiting for the completion of
save-while-active checkpoint processing in another job. This wait
is necessary to prevent a partial commitment control transaction
from being saved to the media.

CNDW
The initial thread of the job is waiting for the handle-based
condition.

CPCW
The initial thread of the job is waiting for the completion of a
CPI Communications call.

DEQA
The initial thread of the job is waiting for completion of a
dequeue operation in the pool activity level.

DEQW
The initial thread of the job is waiting for completion of a
dequeue operation. For example, QSYSARB and subsystem monitors
generally wait for work by waiting for a dequeue operation.

DKTA
The initial thread of the job is waiting for the completion of an
I/O operation to a diskette device in the activity level.

DKTW
The initial thread of the job is waiting for the completion of an
I/O operation to a diskette device.

DLYW
Due to the Delay Job (DLYJOB) command, the initial thread of the
job is delayed while it waits for a time interval to end, or for a
specific delay end time. The function field shows either the
number of seconds the job is to delay (999999), or the specific
time when the job is to resume running.

DSC
The job has been disconnected from a work station display.

DSPA
The initial thread of the job is waiting for input from a work
station display in the activity level.

DSPW
The initial thread of the job is waiting for input from a work
station display.

END
The job has been ended with the *IMMED option, or delay time has
ended with the *CNTRLD option.

EOFA
The initial thread of the job is waiting in the activity level to
try a read operation again on a database file after the end-of-file
has been reached.

EOFW
The initial thread of the job is waiting to try a read operation
again on a database file after the end-of-file has been reached.

EOJ
The job is ending for a reason other than End Job (ENDJOB) or End
Subsystem (ENDSBS). For example, SIGNOFF, End Group Job
(ENDGRPJOB), or an exception that is not being handled.

EVTW
The initial thread of the job is waiting for an event. For
example, QLUS and SCPF generally wait for work by waiting for an
event.

GRP
The job is suspended due to a Transfer to Group Job (TFRGRPJOB)
command.

HLD
The job is being held.

HLDT
The initial thread of the job is held.

ICFA
The initial thread of the job is waiting, in an activity level, for
the completion of an I/O operation to an intersystem communications
function file.

ICFW
The initial thread of the job is waiting for the completion of an
I/O operation to an intersystem communications function file.

INEL
The initial thread of the job is ineligible and not currently in
the pool activity level.

JVAA
The initial thread of the job is waiting for completion of a Java
program operation in the pool activity level.

JVAW
The initial thread of the job is waiting for completion of a Java
program operation.

LCKW
The initial thread of the job is waiting for a lock.

LSPA
The initial thread of the job is waiting for a lock space to be
attached in the pool activity level.

LSPW
The initial thread of the job is waiting for a lock space to be
attached.

MLTA
The initial thread of the job is waiting, in an activity level, for
the completion of an I/O operation to multiple files.

MLTW
The initial thread of the job is waiting for the completion of an
I/O operation to multiple files.

MSGW
The initial thread of the job is waiting for a message from a
message queue.

MTXW
The initial thread of the job is in a mutex wait. A mutex is a
synchronization function that is used to allow multiple jobs or
processes to serialize their access to shared data.

MXDW
The initial thread of the job is waiting for the completion of an
I/O operation to a mixed device file. Details are in the Remote
Work_Station_Support book.

OPTA
The initial thread of the job is waiting, in an activity level, for
the completion of an I/O operation to an optical device.

OPTW
The initial thread of the job is waiting for the completion of an
I/O operation to an optical device.

OSIW
The initial thread of the job is waiting for the completion of an
OSI Communications Subsystem OSLISN, OSRACS, OSRACA, OSRCV, or
OSRCVA operation.

PRTA
The initial thread of the job is waiting for output to a printer to
complete in the activity level.

PRTW
The initial thread of the job is waiting for output to a printer to
be completed.

PSRW
The initial thread of the job is a prestart job waiting for a
program start request.

RUN
The initial thread of the job is currently running in the activity
level.

SELW
The initial thread of the job is in a select wait. More
information on the select() function is in the Sockets APIs chapter
in the System API Reference information in the iSeries Information
Center at http://www.ibm.com/eserver/iseries/infocenter.

SEMW
The initial thread of the job is waiting for a semaphore. A
semaphore is a synchronization function that is used to allow
multiple jobs or threads to serialize their access to shared data.

SIGS
The initial thread of the job is stopped by a signal.

SIGW
The initial thread of the job is waiting for a signal.

SRQ
The initial thread of the job is the suspended half of a system
request job pair.

SVFA
The initial thread of the job is waiting for completion of a Save
File operation in the activity level.

SVFW
The initial thread of the job is waiting for completion of a Save
File operation.

TAPA
The initial thread of the job is waiting for completion of an I/O
operation to a tape device in the activity level.

TAPW
The initial thread of the job is waiting for completion of an I/O
operation to a tape device.

THDW
The initial thread is waiting for another thread to complete an
operation.

TIMA
The initial thread of the job is waiting, in the activity level,
for a time interval to end.

TIMW
The initial thread of the job is waiting for a time interval to
end.

Monday, August 8, 2011

upgrade Fedora 14 to Fedora 15

Since Fedora 15 was released for some time already, I upgraded my development server from Fedora 14 to Fedora 15 recently. Below is the command set I used to upgrade to Fedora 15. Before run those commands, I backup my virtual machine files in case.

# change account to Root account
[yyjia@jiaFedora14 ~]$ su
Password: 

# upgrade to latest rpm version
[root@jiaFedora14 yyjia]# yum upgrade rpm
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Zend                                       |  951 B     00:00     
Zend_noarch                                |  951 B     00:00     
fedora/metalink                            |  21 kB     00:00     
jenkins                                    |  951 B     00:00     
jenkins/primary                            | 1.3 kB     00:00     
jenkins                                                                     1/1
updates/metalink                           |  13 kB     00:00     
updates                                    | 4.7 kB     00:00     
updates/primary_db                         | 6.5 MB     00:07     
Setting up Upgrade Process
No Packages marked for Update
[root@jiaFedora14 yyjia]# 

#make sure I have latest packages installed.
[root@jiaFedora14 yyjia]# yum -y update

#clean up yum cache.
[root@jiaFedora14 yyjia]# yum clean all

#insall preupgrade package.
[root@jiaFedora14 yyjia]# yum install preupgrade

#running preupgrade
[root@jiaFedora14 yyjia]# preupgrade

After running preupgrade, we have below screen. I don't want to try Fedora 16 beta version. So, I selected Fedora 15.

I followed instructions shown on the screen. Then, I have a below screen to ask for reboot.

After reboot, the upgrade process starts.


Here is upgrade manual from Fedora web site: http://fedoraproject.org/wiki/YumUpgradeFaq