SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
Mac	
  OS	
  X	
  Snow	
  Leopard:	
  IBM	
  Informix	
  IDS	
  11.5	
  +	
  PHP	
  5.3	
  
	
  

1.1 Introduction	
  
        Since	
  IBM	
  has	
  extended	
  support	
  for	
  Informix	
  Dynamic	
  Server	
  (IDS)	
  also	
  
Mac	
  OS	
  X	
  by	
  defining	
  a	
  winning	
  combination	
  of	
  the	
  two,	
  IBM	
  has	
  made	
  the	
  
happiness	
  of	
  thousands	
  of	
  developers	
  and	
  DBAs	
  no	
  longer	
  have	
  to	
  work	
  on	
  a	
  
remote	
  server	
  IDS.	
  

           In	
  this	
  article	
  we	
  will	
  see	
  how	
  to	
  install	
  and	
  configure	
  IBM	
  Informix	
  IDS	
  
simple	
  steps	
  on	
  our	
  Mac	
  OS	
  X	
  11.5	
  Snow	
  Leopard.	
  The	
  special	
  shows	
  at	
  the	
  end	
  
of	
  the	
  article	
  is	
  the	
  installation	
  of	
  the	
  informix	
  module	
  on	
  PHP	
  5.3,	
  note	
  that	
  PHP	
  
5.3	
  is	
  part	
  of	
  Mac	
  OS	
  X	
  Snow	
  Leopard.	
  
	
  

1.2	
  Installing	
  Informix	
  IDS	
  11.5	
  
           From	
   the	
   IBM	
   website	
   should	
   download	
   the	
   version	
   of	
   IBM	
   Informix	
   IDS	
  
11.5	
   For	
   Mac	
   OS	
   X,	
   including	
   the	
   Developer	
   version	
   of	
   Informix	
   (To	
   download	
  
registration	
   is	
   required	
   at	
   the	
   portal	
   IBM).	
   This	
   software	
   is	
   distributed	
   as	
   a	
   DMG	
  
file	
   (iif.11.50.FC5DE.macosx64.dmg)	
   the	
   size	
   of	
   about	
   138MByte,	
   within	
   it	
   is	
  
available	
  the	
  package	
  installer.	
  The	
  installation	
  process	
  is	
  very	
  simple,	
  there	
  are	
  
no	
   special	
   instructions	
   to	
   follow	
   except	
   for	
   the	
   installation	
   directory	
   is	
   advisable	
  
to	
   choose	
   the	
   directory	
   /opt/IBM/informix	
   directory	
   instead	
   of	
   /Application	
  
proposed	
  by	
  the	
  installer.	
  
      	
  	
  Through	
   the	
   aid	
   of	
   the	
   figures	
   shown	
   below,	
   we	
   will	
   see	
   how	
   is	
   the	
  
installation	
  process.	
  
Figura	
  1	
  Installer	
  IDS	
  Informix	
  11.5	
  

                                                                    	
  




                                                                                                                 	
  
                                                                    	
  
	
  

	
  

	
  

	
  

	
  




           Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
                           	
  
 

Figura	
  2	
  Running	
  the	
  installation	
  script	
  

	
  




                                                                                             	
  
	
  
	
  

Figura	
  3	
  Request	
  the	
  administrator	
  password.	
  

	
  




                                                                                             	
  
	
  
	
  

Figura	
  4	
  Installer	
  IDS	
  Informix	
  11.50	
  

	
  




                                                                                             	
  
	
  
	
  

	
  




           Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
     	
  
 

Figura	
  5	
  Installation	
  directory	
  to	
  be	
  changed	
  in	
  /opt/IBM/informix	
  

	
  




                                                                                                  	
  
	
  
	
  

Figura	
  6	
  IDS	
  components	
  that	
  will	
  be	
  installed	
  

	
  




                                                                                                 	
  
	
  
	
  

Figura	
  7	
  Separation	
  of	
  roles.	
  Leave	
  the	
  default	
  

	
  




                                                                                                        	
  
	
  
	
  

	
  

	
  

	
  



           Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
            	
  
 

	
  

Figura	
  8	
  Creating	
  a	
  demo	
  IDS	
  instance.	
  Leave	
  the	
  default	
  

	
  




                                                                                             	
  
	
  
	
  

Figura	
  9	
  IDS	
  Installation	
  Summary	
  

	
  




                                                                                                    	
  
	
  
	
  

	
  

Figura	
  10	
  Completed	
  installation	
  notes	
  

	
  




                                                                                                           	
  
	
  
	
  

	
  


           Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
               	
  
 

Figura	
  11	
  Finish	
  Installation	
  

	
  




                                                                                                                	
  
	
  
	
  

        The	
   installation	
   process,	
   in	
   addition	
   to	
   one	
   copy	
   of	
   the	
   software	
   in	
   the	
  
directory	
   listed,	
   is	
   responsible	
   for	
   building	
   on	
   our	
   Mac	
   OS	
   X	
   user	
   informix,	
   it	
   will	
  
be	
  used	
  to	
  perform	
  operations	
  normally	
  assigned	
  to	
  the	
  role	
  of	
  DBA.	
  
     In	
   the	
   next	
   section	
   we	
   will	
   see	
   the	
   configuration	
   of	
   the	
   operating	
  
environment	
  and	
  initialization	
  of	
  Informix.	
  
         	
  	
  

1.2 Configure	
  
         The	
  configuration	
  process	
  could	
  be	
  divided	
  into	
  two	
  phases:	
  	
  
                    •   Configuration	
  execution	
  environment;	
  	
  
                    •   Configuring	
  Informix.	
  
     The	
   preparation	
   of	
   the	
   operating	
   environment	
   requires	
   setting	
   some	
  
environment	
  variables	
  listed	
  below:	
  
                    •    INFORMIXDIR	
  =>	
  Directory	
  Installation	
  Informix;	
  
                    •    INFORMIXSERVER	
  =>	
  The	
  name	
  given	
  to	
  the	
  instance	
  Informix;	
  
                    •    INFORMIXSQLHOSTS	
  =>	
  File	
  di	
  configurazione	
  SQL	
  HOSTS;	
  
                    •    ONCONFIG	
  =>	
  Configuration	
  file	
  SQL	
  HOSTS;	
  
                    •    DYLD_LIBRARY_PATH	
  =>	
  Path	
  Informix	
  Libs;	
  
                    •    TERMCAP	
  =>	
  Configuration	
  terminals	
  files;	
  
                    •    DB_LOCALE	
  =>	
  Set	
  the	
  Locale	
  for	
  DB;	
  
                    •    CLIENT_LOCALE	
  =>	
  Set	
  the	
  locale	
  for	
  the	
  client.	
  
     You	
   can	
   set	
   the	
   Informix	
   environment	
   variables	
   directly	
   within	
   the	
  
informix	
  user	
  profile	
  file	
  (see	
  Listing	
  1).	
  
        To	
   configure	
   Informix	
   we	
   should	
   make	
   changes	
   to	
   the	
   standard	
  
configuration,	
  there	
  are	
  two	
  configuration	
  files	
  on	
  which	
  to	
  act,	
  both	
  defined	
  by	
  
two	
  environment	
  variables:	
  ONCONFIG	
  and	
  INFORMIXSQLHOSTS.	
  



               Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
                            	
  
For	
  the	
  file	
  defined	
  by	
  ONCONFIG	
  is	
  advisable	
  to	
  amend	
  sections	
  that	
  cover:	
  
                 •     Root	
  Dbspace	
  Configuration	
  Parameters;	
  
                 •     System	
  Configuration	
  Parameters;	
  
                 •     Network	
  Configuration	
  Parameters	
  
         Proceeding	
  with	
  the	
  order	
  mentioned	
  above	
  is	
  going	
  to	
  change	
  and	
  /	
  or	
  add	
  
the	
  configurations	
  listed	
  below	
  (see	
  Listing	
  2).	
  

	
  
Listato	
  2	
  Changing	
  the	
  standard	
  configuration	
  of	
  Informix.	
  

	
  
###################################################################
# Root Dbspace Configuration Parameters
###################################################################
ROOTPATH $INFORMIXDIR/dbs/amusarra_ifx.rootdbs
MIRRORPATH $INFORMIXDIR/dbs/amusarra_ifx.root_mirror

###################################################################
# System Configuration Parameters
###################################################################
DBSERVERNAME amusarra_ifx
DBSERVERALIASES shirus,amusarra_shm

###################################################################
# Network Configuration Parameters
###################################################################
NETTYPE soctcp,1,30,NET
	
  
	
  

       I	
  preferred	
  to	
  place	
  the	
  files	
  in	
  the	
  root	
  dbspace	
  dbs	
  instead	
  of	
  tmp	
  and	
  give	
  
them	
  the	
  name	
  of	
  Informix	
  as	
  a	
  suffix.	
  

      In	
  the	
  standard	
  configuration	
  is	
  the	
  only	
  protocol	
  configured	
  ipcshm,	
  in	
  our	
  
configuration	
  was	
  added	
  to	
  the	
  protocol	
  soctcp.	
  I	
  suggest	
  the	
  reading	
  of	
  official	
  
documentation	
  on	
  Informix	
  NETTYPE	
  Configuration	
  Parameter.	
  
	
  
Listato	
  3	
  Changing	
  configuration	
  SQL	
  Hosts	
  

	
  
# IANA (www.iana.org) assigned port number/service names for Informix:
# sqlexec 9088/tcp
# sqlexec-ssl 9089/tcp

#demo_on               onipcshm                on_hostname             on_servername
#demo_se               seipcpip                se_hostname             sqlexec

amusarra_ifx           onsoctcp                 amusarra-mobile.local sqlexec
shirus                 onsoctcp                 amusarra-mobile.local sqlexec-admin
amusarra_shm           onipcshm                 amusarra-mobile.local amusarra-mobile
	
  
	
  	
  

         Listing	
   3	
   shows	
   the	
   configuration	
   file	
   sqlhosts	
   appropriately	
   modified	
  
according	
   to	
   our	
   needs	
   (for	
   more	
   information	
   refer	
   to	
   the	
   official	
   documentation	
  
about	
  The	
  Informix	
  IDS	
  sqlhosts	
  File).	
  The	
  IANA	
  has	
  defined	
  TCP	
  ports	
  specific	
  to	
  
the	
  services	
  Informix,	
  these	
  must	
  be	
  added	
  to	
  the	
  configuration	
  files	
  of	
  network	
  
services	
  (see	
  Listing	
  4).	
  


            Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
                      	
  
 
Listato	
  4	
  Adding	
  TCP	
  ports	
  for	
  network	
  services	
  Informix	
  (/etc/services).	
  

	
  
sqlexec-admin              9087/tcp                          # IBM Informix SQL Interface - Admin Port
sqlexec                    9088/tcp                          # IBM Informix SQL Interface
sqlexec-ssl                9089/tcp                          # IBM Informix SQL Interface - Encrypted
	
  
	
  

	
  

1.3 Preparation	
  and	
  Initializing	
  Informix	
  
          Before	
  proceeding	
  with	
  the	
  process	
  of	
  initializing	
  Informix,	
  you	
  must	
  create	
  
the	
  file	
  "empty"	
  of	
  the	
  root	
  dbspace	
  by	
  giving	
  them	
  permission	
  to	
  read	
  and	
  write	
  
only	
  for	
  the	
  user	
  informix.	
  As	
  user	
  informix,	
  we	
  proceed	
  as	
  shown	
  in	
  Listing	
  5.	
  
         	
  
Listato	
  5	
  Creating	
  directory	
  and	
  file	
  "empty"	
  root	
  dbspace	
  

amusarra-mobile:~ informix$ mkdir $INFORMIXDIR/dbs
amusarra-mobile:~ informix$ touch $INFORMIXDIR/dbs/amusarra_ifx.rootdbs
amusarra-mobile:~ informix$ touch $INFORMIXDIR/dbs/amusarra_ifx.rootdbs_mirror
amusarra-mobile:~ informix$ chmod 660 $INFORMIXDIR/dbs/amusarra_ifx.rootdbs
amusarra-mobile:~ informix$ chmod 660
/opt/IBM/informix/dbs/amusarra_ifx.rootdbs_mirror

	
  

         Remember	
   that	
   the	
   INFORMIXDIR	
   environment	
   variable	
   refers	
   to	
   the	
  
installation	
  directory	
  of	
  IBM	
  Informix	
  IDS,	
  in	
  our	
  case	
  the	
  variable	
  INFORMIXDIR	
  
is:	
  /opt/IBM/Informix.	
  The	
  conditions	
  to	
  initialize	
  our	
  instance	
  we	
  are	
  all,	
  then	
  
proceed	
  with	
  the	
  initialization	
  by	
  running	
  the	
  command:	
  
         amusarra-mobile:~ informix$ oninit -y -i –v

       OnInit	
   is	
   the	
   command	
   responsible	
   for	
   initializing	
   the	
   dbspaces	
   and	
   the	
  
shared	
  memory	
  while	
  leaving	
  online	
  informix	
  instance.	
  The	
  option	
  (-­‐v)	
  command	
  
allows	
   you	
   to	
   see	
   OnInit	
   output	
   details	
   of	
   transactions	
   executed	
   during	
   the	
  
initialization	
  process	
  (see	
  Listing	
  6).	
  	
  

	
  
	
  
	
  

	
  
	
  
	
  

	
  

	
  




                Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
           	
  
Listato	
  6	
  Part	
  of	
  the	
  command	
  output	
  OnInit	
  

	
  
Checking group membership to determine server run mode...succeeded
Reading configuration file '/opt/IBM/informix/etc/onconfig.std'...succeeded
Creating /INFORMIXTMP/.infxdirs...succeeded
Checking config parameters...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 14708 kbytes...succeeded
Allocating 200016 kbytes for buffer pool of 4K page size...succeeded
Creating infos file "/opt/IBM/informix/etc/.infos.amusarra_ifx"...succeeded
Linking conf file "/opt/IBM/informix/etc/.conf.amusarra_ifx"...succeeded
Initializing rhead structure...succeeded
Writing to infos file...succeeded
Initialization of Encryption...succeeded
Initializing ASF...succeeded
Forking 1 'soctcp' listener threads...succeeded
Forking 1 'soctcp' listener threads...succeeded
Forking 1 'ipcshm' listener threads...succeeded
Starting tracing...succeeded
Initializing 8 flushers...succeeded
Initializing log/checkpoint information...succeeded
Initializing dbspaces...succeeded
Opening primary chunks...succeeded
Opening mirror chunks...succeeded
Validating chunks...succeeded
Creating database partition...succeeded
	
  
	
  

         To	
  verify	
  that	
  went	
  the	
  right	
  way,	
  with	
  the	
  database	
  in	
  an	
  on-­‐line,	
  execute	
  
the	
  command:	
  
         amusarra-mobile:~ informix$ onstat –

The	
  output	
  should	
  be	
  similar	
  to:	
  
	
    IBM Informix Dynamic Server Version 11.50.FC5DE -- On-Line --
Up 00:00:25 -- 250928 Kbytes

	
  

1.4 Creating	
  Stores	
  Demo	
  database	
  
         Our	
  Informix	
  instance	
  is	
  online,	
  we	
  will	
  then	
  create	
  at	
  least	
  a	
  data	
  base	
  on	
  
which	
   to	
   perform	
   all	
   our	
   tests.	
   IBM	
   Informix	
   IDS	
   includes	
   a	
   set	
   of	
   demo	
   schemas	
  
complete	
   data,	
   we	
   will	
   use	
   the	
   db	
   Stores	
   Demo.	
   To	
   create	
   the	
   schema	
   and	
   load	
  
data	
  (always	
  as	
  user	
  informix)	
  execute	
  the	
  command:	
  
         amusarra-mobile:~ informix$ dbaccessdemo

         To	
  verify	
  that	
  the	
  schema	
  and	
  data	
  have	
  been	
  created	
  successfully	
  executed	
  
a	
   connection	
   to	
   the	
   database	
   stores_demo	
   and	
   a	
   select	
   query	
   on	
   the	
   Customer	
  
table,	
  we	
  proceed	
  by	
  running	
  the	
  command:	
  
amusarra-mobile:~ informix$ echo "SELECT * FROM CUSTOMER;" | dbaccess stores_demo -

Output	
   the	
   command	
   will	
   return	
   the	
   records	
   in	
   the	
   customer	
   table	
   in	
   the	
  
database	
  stores_demo	
  (see	
  Listing	
  7).	
  

	
  

	
  
	
  


           Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
                            	
  
Listato	
  7	
  Output	
  of	
  the	
  query	
  on	
  the	
  Customer	
  table	
  

	
  
Database selected.
….
customer_num 128
fname         Frank
lname         Lessor
company       Phoenix University
address1      Athletic Department
address2      1817 N. Thomas Road
city          Phoenix
state         AZ
zipcode       85008
phone         602-533-1817

28 row(s) retrieved.


Database closed.
	
  
	
  

        	
   Now	
   that	
   we	
   have	
   the	
   Informix	
   instance	
   on-­‐line	
   and	
   the	
   data	
   base	
  
stores_demo,	
  the	
  next	
  step	
  is	
  to	
  install	
  the	
  Informix	
  module	
  for	
  PHP	
  5.3,	
  that	
  way	
  
we	
   can	
   have	
   access	
   to	
   Informix	
   using	
   the	
   scripting	
   language	
   world's	
   most	
  
popular	
  .	
  
	
  

1.5 PHP	
  &	
  Informix	
  
     PHP	
   and	
   MySQL	
   or	
   PHP	
   and	
   PostgreSQL	
   are	
   common	
   to	
   many	
   pairs	
   of	
  
opposite	
   pairs	
   PHP	
   and	
   Informix	
   almost	
   unknown,	
   it	
   might	
   be	
   the	
   nature	
   and	
  
scope	
  of	
  commercial	
  use	
  of	
  Informix	
  to	
  make	
  the	
  couple	
  less	
  known.	
  

         Since	
  version	
  5.2	
  of	
  the	
  PHP	
  Informix	
  module	
  is	
  no	
  longer	
  available	
  because	
  
abandoned	
   in	
   favor	
   of	
   the	
   Informix	
   PDO	
   Module.	
   In	
   the	
   rest	
   of	
   the	
   article	
   we	
   will	
  
see	
   how	
   to	
   compile	
   the	
   "old"	
   module	
   for	
   Informix	
   makes	
   working	
   on	
   version	
   5.3	
  
of	
  PHP.	
  
          	
  

1.5.1 Building	
  and	
  installing	
  the	
  module	
  Informix	
  
          	
  Informix	
   module	
   is	
   not	
   available	
   on	
   version	
   5.3	
   of	
   PHP	
   installed	
   on	
   our	
  
Mac	
  OS	
  X,	
  you	
  must	
  then	
  download	
  the	
  source	
  code	
  of	
  the	
  module	
  directly	
  from	
  
the	
  site	
  http://pecl.php.net/package/informix.	
  The	
  tar.gz	
  archive	
  of	
  the	
  module	
  
is	
   not	
   available,	
   no	
   matter,	
   checks	
   out	
   the	
   source	
   of	
   the	
   module	
   directly	
   from	
   the	
  
SVN	
  repository	
  using	
  the	
  command:	
  
amusarra-mobile:~ informix$ svn co http://svn.php.net/repository/pecl/informix/trunk
php_ext_informix

In	
   this	
   way	
   we	
   get	
   the	
   source	
   Informix	
   module	
   into	
   the	
   directory	
  
~/php_ext_informix.	
   In	
   Listing	
   8	
   shows	
   the	
   result	
   obtained	
   by	
   the	
   operation	
  
performed	
  on	
  the	
  checkout	
  SVN	
  repository.	
  
	
  
	
  



                 Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
                           	
  
Listato	
  8	
  Operating	
  checkout	
  form	
  Informix.	
  

	
  
amusarra-mobile:~ informix$ svn co http://svn.php.net/repository/pecl/informix/trunk
php_ext_informix
A    php_ext_informix/config.w32
A    php_ext_informix/config.m4
A    php_ext_informix/php_informix.h
A    php_ext_informix/Makefile.frag
A    php_ext_informix/ifx.dsp
A    php_ext_informix/ifx.ec
A    php_ext_informix/CREDITS
A    php_ext_informix/php_informix_includes.h
  U  php_ext_informix
Checked out revision 290780.
	
  
	
  

         We	
  move	
  into	
  the	
  directory	
  ~/php_ext_informix	
  and	
  proceed	
  with	
  the	
  build	
  
of	
  the	
  module.	
  
         amusarra-mobile:php_ext_informix informix$ phpize
         amusarra-mobile:php_ext_informix informix$ ./configure

     Before	
   continuing	
   with	
   the	
   make	
   of	
   the	
   Informix	
   Module,	
   you	
   must	
   edit	
   the	
  
Makefile	
   to	
   ensure	
   that	
   the	
   module	
   is	
   linked	
   with	
   Informix	
   library	
   checkapi.o,	
  
otherwise	
  the	
  use	
  of	
  the	
  module	
  will	
  produce	
  the	
  error:	
  	
  
         undefined symbol: ifx_checkAPI.

         Inside	
  the	
  Makefile	
  must	
  add	
  the	
  directive	
  INFORMIX_SHARED_LIBADD	
  use	
  
the	
  library	
  Informix	
  checkapi.o:	
  
         /opt/IBM/informix/lib/esql/checkapi.o

     Then	
  proceed	
  with	
  compiling	
  and	
  installing	
  the	
  module	
  Informix.	
  The	
  user	
  
informix	
  must	
  be	
  defined	
  as	
  sudores	
  or	
  you	
  must	
  run	
  the	
  installation	
  as	
  root.	
  
         amusarra-mobile:php_ext_informix informix$ make
         amusarra-mobile:php_ext_informix informix$ sudo make install

         The	
   module	
   will	
   be	
   installed	
   in	
   /	
   usr/lib/php/extensions/no-­‐debug-­‐non-­‐
zts-­‐20090626	
  /.	
  To	
  verify	
  the	
  correct	
  link	
  to	
  the	
  library	
  Informix	
  checkapi.o	
  just	
  
use	
  the	
  command	
  nm	
  coupled	
  with	
  the	
  command	
  grep.	
  The	
  output	
  should	
  return	
  
the	
  entry	
  point	
  ifx_chekAPI.	
  
      amusarra-mobile:php_ext_informix informix$ nm /usr/lib/php/extensions/no-debug-
non-zts-20090626/informix.so | grep checkAPI

         000000000000a0a0 T _ifx_checkAPI

	
  
	
  
	
  
	
  

	
  




          Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
                     	
  
1.5.2 Activating	
  and	
  test	
  module	
  Informix	
  
      To	
   activate	
   the	
   module	
   just	
   installed,	
   you	
   must	
   edit	
   (as	
   root)	
   the	
  
configuration	
   file	
   php.ini	
   (located	
   in	
   /etc)	
   and	
   add	
   the	
   extensions	
   section	
  
directive:	
  
       extension=informix.so

You	
  can	
  verify	
  that	
  the	
  module	
  Informix	
  is	
  active	
  by	
  running	
  the	
  command:	
  
         amusarra-mobile:php_ext_informix informix$ php -i|grep Informix
         Informix support => enabled

      The	
   command	
   responded	
   by	
   confirming	
   the	
   activation	
   of	
   the	
   module	
  
Informix,	
   you	
   can	
   still	
   use	
   the	
   php-­‐m	
   command	
   to	
   verify	
   that	
   the	
   module	
   is	
  
active.	
  
          At	
  this	
  time	
  the	
  Informix	
  module	
  is	
  operational	
  only	
  when	
  used	
  from	
  PHP	
  
CLI	
   is	
   not	
   available	
   under	
   Apache	
   because	
   he	
   does	
   not	
   see	
   the	
   Informix	
  
environment	
  variables	
  needed	
  for	
  the	
  proper	
  functioning	
  of	
  the	
  module.	
  The	
  log	
  
file	
   of	
   Apache	
   (see	
   Listing	
   9)	
   is	
   evident	
   as	
   the	
   Informix	
   module	
   is	
   not	
   loaded	
  
because	
  of	
  the	
  failure	
  to	
  load	
  Informix	
  libraries	
  required	
  by	
  the	
  module.	
  Variable	
  
DYLD_LIBRARY_PATH	
   (which	
   indicates	
   the	
   location	
   of	
   libraries	
   Informix)	
   must	
  
be	
  visible	
  to	
  the	
  Apache	
  process.	
  
	
  
Listato	
  9	
  Extract	
  from	
  the	
  log	
  files	
  of	
  Apache,	
  Informix	
  obvious	
  error	
  loading	
  module	
  

	
  
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-
debug-non-zts-20090626/informix.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-
20090626/informix.so, 9): Library not loaded: isqls09b.dylibn Referenced from:
/usr/lib/php/extensions/no-debug-non-zts-20090626/informix.son Reason: image not
found in Unknown on line 0
	
  
	
  

         In	
  Mac	
  OS	
  X	
  10.4	
  (Tiger)	
  Apple	
  introduced	
  a	
  new	
  system	
  that	
  controls	
  basic	
  
services	
  this	
  system	
  is	
  called	
  launchd.	
  The	
  Apache	
  service	
  is	
  therefore	
  governed	
  
by	
   launchd	
   for	
   security	
   reasons	
   reset	
   the	
   environment	
   variables	
   to	
   the	
   bare	
  
minimum,	
   which	
   is	
   why	
   the	
   module	
   failed	
   to	
   load	
   Informix,	
   Informix	
  
environment	
   variables	
   are	
   not	
   visible	
   to	
   the	
   Apache	
   process.	
   Launchd	
  
configuration,	
  or	
  rather	
  of	
  the	
  process	
  to	
  be	
  managed	
  is	
  by	
  means	
  of	
  a	
  plist	
  file	
  
type,	
  while	
  the	
  file	
  /	
  etc	
  /	
  launchd.conf	
  contains	
  directives	
  (eg	
  commands	
  to	
  set	
  
environment	
   variables)	
   for	
   launchd.	
   Our	
   goal	
   is	
   therefore	
   to	
   make	
   visible	
   the	
  
Informix	
   environment	
   variables	
   serving	
   Apache,	
   the	
   configuration	
   file	
  
/etc/launchd.conf	
  add	
  the	
  directives	
  shown	
  in	
  Listing	
  10.	
  
	
  
	
  

	
  

	
  

	
  



           Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
                                	
  
Listato	
  10	
  Launchd	
  config	
  file	
  for	
  the	
  set	
  of	
  environment	
  variables	
  Informix	
  

setenv INFORMIXDIR /opt/IBM/informix
setenv ONCONFIG onconfig.std
setenv INFORMIXSERVER amusarra_ifx
setenv INFORMIXSQLHOSTS /opt/IBM/informix/etc/sqlhosts
setenv DYLD_LIBRARY_PATH
/opt/IBM/informix/lib:/opt/IBM/informix/lib/esql:/opt/IBM/informix/lib:/opt/IBM/inform
ix/lib/cli
setenv CLIENT_LOCALE en_US.819

	
  

     We	
   have	
   ensured	
   that	
   the	
   processes	
   controlled	
   by	
   launchd	
   can	
   access	
   the	
  
Informix	
  environment	
  variables.	
  
          At	
   this	
   point,	
   you	
   need	
   to	
   restart	
   the	
   Apache	
   service	
   with	
   the	
   usual	
  
command	
  apachectl	
  (or	
  System	
  Preferences)	
  and	
  make	
  sure	
  the	
  Informix	
  module	
  
is	
  properly	
  loaded,	
  you	
  can	
  verify	
  this	
  with	
  a	
  simple	
  PHP	
  script	
  that	
  has	
  inside	
  a	
  
call	
  to	
  phpinfo	
  (),	
  in	
  Figure	
  1,	
  the	
  extract	
  of	
  section	
  Informix.	
  	
  
	
  
Figura	
  1	
  Sample	
  phpinfo	
  with	
  evidence	
  of	
  the	
  configuration	
  module	
  Informix.	
  




                                                                                                                                  	
  
	
  	
  	
  

        In	
   one	
   of	
   the	
   previous	
   sections	
   we	
   have	
   loaded	
   the	
   database	
   on	
   our	
  
Stores_Demo	
   Informix	
   instance,	
   at	
   the	
   conclusion	
   of	
   this	
   article	
   we	
   will	
   make	
   a	
  
simple	
  PHP	
  script	
  (see	
  Listing	
  11)	
  that	
  shows	
  in	
  tabular	
  form,	
  records	
  that	
  exist	
  
on	
  the	
  Orders	
  table.	
  
	
  
	
  



               Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
                 	
  
Listato	
  11	
  PHP	
  script	
  for	
  the	
  selection	
  of	
  records	
  from	
  the	
  Orders	
  table	
  

	
  
<?php
$conn_id = ifx_connect ("stores_demo@amusarra_ifx", "informix", "password");
$res_id =    ifx_query("select * from orders", $conn_id);

if (! $res_id) {
      printf("Can't select orders : %sn<br />%s<br />n",
ifx_error(),ifx_errormsg());
      ifx_close($conn_id);
      die;
}

ifx_htmltbl_result($res_id, "border="1"");
ifx_free_result($res_id);
ifx_close($conn_id);
?>
	
  
	
  	
  
Figura	
  2	
  Result	
  script	
  PHP	
  Listing	
  11	
  

	
  




                                                                                                                          	
  
	
  
	
  




           Copyright	
  ©	
  2009	
  –	
  Antonio	
  Musarra	
  –	
  http://musarra.wordpress.com	
                	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Hints for a successful hfs to zfs migration
Hints for a successful hfs to zfs migrationHints for a successful hfs to zfs migration
Hints for a successful hfs to zfs migrationsatish090909
 
Next-Gen Data Center: Improving TCO & ROI in Data Centers Through Virtualizat...
Next-Gen Data Center: Improving TCO & ROI in Data Centers Through Virtualizat...Next-Gen Data Center: Improving TCO & ROI in Data Centers Through Virtualizat...
Next-Gen Data Center: Improving TCO & ROI in Data Centers Through Virtualizat...IMEX Research
 
Blade Servers & Virtualization: State of the Industry
Blade Servers & Virtualization: State of the IndustryBlade Servers & Virtualization: State of the Industry
Blade Servers & Virtualization: State of the IndustryIMEX Research
 
Blade Servers & Virtualization State of the Industry
Blade Servers & Virtualization State of the IndustryBlade Servers & Virtualization State of the Industry
Blade Servers & Virtualization State of the IndustryIMEX Research
 
Wipro - FM Best Practices Showcase
Wipro - FM Best Practices ShowcaseWipro - FM Best Practices Showcase
Wipro - FM Best Practices ShowcaseSudhendu Bali
 
ISD 6.3 and IBM i june 2012
ISD 6.3 and IBM i june 2012ISD 6.3 and IBM i june 2012
ISD 6.3 and IBM i june 2012COMMON Europe
 
Desktopvirtualisatie met VMware View, de laatste ontwikkelingen
Desktopvirtualisatie met VMware View, de laatste ontwikkelingenDesktopvirtualisatie met VMware View, de laatste ontwikkelingen
Desktopvirtualisatie met VMware View, de laatste ontwikkelingenUNIT4 IT Solutions
 
The Architecture Of V Mware Es Xi
The Architecture Of V Mware Es XiThe Architecture Of V Mware Es Xi
The Architecture Of V Mware Es XiRishi Sharma
 
Lotus domino consolidation to linux on system z
Lotus domino consolidation to linux on system zLotus domino consolidation to linux on system z
Lotus domino consolidation to linux on system zsystemz
 
C122 a015-en
C122 a015-enC122 a015-en
C122 a015-enTommy Lee
 
Aix admin course provider Navi Mumbai | AIX Admin Course Training Navi Mumbai...
Aix admin course provider Navi Mumbai | AIX Admin Course Training Navi Mumbai...Aix admin course provider Navi Mumbai | AIX Admin Course Training Navi Mumbai...
Aix admin course provider Navi Mumbai | AIX Admin Course Training Navi Mumbai...VibrantGroup
 
Vsicm51 m02 virtualization_intro_
Vsicm51 m02 virtualization_intro_Vsicm51 m02 virtualization_intro_
Vsicm51 m02 virtualization_intro_VCAP5_wordpress
 
Leon IT Setup Case Study
Leon IT Setup Case StudyLeon IT Setup Case Study
Leon IT Setup Case Studyrahulmeher
 
Introduction to the Linux on System z Terminal Server using z/VM IUCV
Introduction to the Linux on System z Terminal Server using z/VM IUCVIntroduction to the Linux on System z Terminal Server using z/VM IUCV
Introduction to the Linux on System z Terminal Server using z/VM IUCVIBM India Smarter Computing
 
Qt remote monitoring 3 1 web
Qt remote monitoring 3 1 webQt remote monitoring 3 1 web
Qt remote monitoring 3 1 webCitizen Logen
 
Ims200 surveillance system user manual
Ims200 surveillance system user manualIms200 surveillance system user manual
Ims200 surveillance system user manualdominik2003
 
PMISV Symposium Presentation
PMISV Symposium PresentationPMISV Symposium Presentation
PMISV Symposium PresentationIvarsLenss
 
Public Training Power System for AIX : AIX Implementation & Administration (A...
Public Training Power System for AIX : AIX Implementation & Administration (A...Public Training Power System for AIX : AIX Implementation & Administration (A...
Public Training Power System for AIX : AIX Implementation & Administration (A...Hany Paulina
 

Was ist angesagt? (20)

Hints for a successful hfs to zfs migration
Hints for a successful hfs to zfs migrationHints for a successful hfs to zfs migration
Hints for a successful hfs to zfs migration
 
Next-Gen Data Center: Improving TCO & ROI in Data Centers Through Virtualizat...
Next-Gen Data Center: Improving TCO & ROI in Data Centers Through Virtualizat...Next-Gen Data Center: Improving TCO & ROI in Data Centers Through Virtualizat...
Next-Gen Data Center: Improving TCO & ROI in Data Centers Through Virtualizat...
 
Blade Servers & Virtualization: State of the Industry
Blade Servers & Virtualization: State of the IndustryBlade Servers & Virtualization: State of the Industry
Blade Servers & Virtualization: State of the Industry
 
Blade Servers & Virtualization State of the Industry
Blade Servers & Virtualization State of the IndustryBlade Servers & Virtualization State of the Industry
Blade Servers & Virtualization State of the Industry
 
Wipro - FM Best Practices Showcase
Wipro - FM Best Practices ShowcaseWipro - FM Best Practices Showcase
Wipro - FM Best Practices Showcase
 
ISD 6.3 and IBM i june 2012
ISD 6.3 and IBM i june 2012ISD 6.3 and IBM i june 2012
ISD 6.3 and IBM i june 2012
 
Desktopvirtualisatie met VMware View, de laatste ontwikkelingen
Desktopvirtualisatie met VMware View, de laatste ontwikkelingenDesktopvirtualisatie met VMware View, de laatste ontwikkelingen
Desktopvirtualisatie met VMware View, de laatste ontwikkelingen
 
The Architecture Of V Mware Es Xi
The Architecture Of V Mware Es XiThe Architecture Of V Mware Es Xi
The Architecture Of V Mware Es Xi
 
Lotus domino consolidation to linux on system z
Lotus domino consolidation to linux on system zLotus domino consolidation to linux on system z
Lotus domino consolidation to linux on system z
 
C122 a015-en
C122 a015-enC122 a015-en
C122 a015-en
 
Aix admin course provider Navi Mumbai | AIX Admin Course Training Navi Mumbai...
Aix admin course provider Navi Mumbai | AIX Admin Course Training Navi Mumbai...Aix admin course provider Navi Mumbai | AIX Admin Course Training Navi Mumbai...
Aix admin course provider Navi Mumbai | AIX Admin Course Training Navi Mumbai...
 
Vsicm51 m02 virtualization_intro_
Vsicm51 m02 virtualization_intro_Vsicm51 m02 virtualization_intro_
Vsicm51 m02 virtualization_intro_
 
Leon IT Setup Case Study
Leon IT Setup Case StudyLeon IT Setup Case Study
Leon IT Setup Case Study
 
Introduction to the Linux on System z Terminal Server using z/VM IUCV
Introduction to the Linux on System z Terminal Server using z/VM IUCVIntroduction to the Linux on System z Terminal Server using z/VM IUCV
Introduction to the Linux on System z Terminal Server using z/VM IUCV
 
Lecture 4 client workstations
Lecture 4   client workstationsLecture 4   client workstations
Lecture 4 client workstations
 
Elastix installation
Elastix installationElastix installation
Elastix installation
 
Qt remote monitoring 3 1 web
Qt remote monitoring 3 1 webQt remote monitoring 3 1 web
Qt remote monitoring 3 1 web
 
Ims200 surveillance system user manual
Ims200 surveillance system user manualIms200 surveillance system user manual
Ims200 surveillance system user manual
 
PMISV Symposium Presentation
PMISV Symposium PresentationPMISV Symposium Presentation
PMISV Symposium Presentation
 
Public Training Power System for AIX : AIX Implementation & Administration (A...
Public Training Power System for AIX : AIX Implementation & Administration (A...Public Training Power System for AIX : AIX Implementation & Administration (A...
Public Training Power System for AIX : AIX Implementation & Administration (A...
 

Andere mochten auch

Beginning Mac Os X
Beginning Mac Os XBeginning Mac Os X
Beginning Mac Os XPerry Lund
 
SugarCRM Enterprise Development Virtual Appliance
SugarCRM Enterprise Development Virtual ApplianceSugarCRM Enterprise Development Virtual Appliance
SugarCRM Enterprise Development Virtual ApplianceAntonio Musarra
 
Liferay - Quick Start 1° Episodio
Liferay - Quick Start 1° EpisodioLiferay - Quick Start 1° Episodio
Liferay - Quick Start 1° EpisodioAntonio Musarra
 
Liferay 7: Come realizzare un client SOAP con Apache CXF in OSGi Style
Liferay 7: Come realizzare un client SOAP con Apache CXF in OSGi StyleLiferay 7: Come realizzare un client SOAP con Apache CXF in OSGi Style
Liferay 7: Come realizzare un client SOAP con Apache CXF in OSGi StyleAntonio Musarra
 
Mac OS(Operating System)
Mac OS(Operating System)Mac OS(Operating System)
Mac OS(Operating System)Faizan Shaikh
 

Andere mochten auch (7)

Beginning Mac Os X
Beginning Mac Os XBeginning Mac Os X
Beginning Mac Os X
 
SugarCRM Enterprise Development Virtual Appliance
SugarCRM Enterprise Development Virtual ApplianceSugarCRM Enterprise Development Virtual Appliance
SugarCRM Enterprise Development Virtual Appliance
 
Liferay - Quick Start 1° Episodio
Liferay - Quick Start 1° EpisodioLiferay - Quick Start 1° Episodio
Liferay - Quick Start 1° Episodio
 
JAX-WS e JAX-RS
JAX-WS e JAX-RSJAX-WS e JAX-RS
JAX-WS e JAX-RS
 
Liferay 7: Come realizzare un client SOAP con Apache CXF in OSGi Style
Liferay 7: Come realizzare un client SOAP con Apache CXF in OSGi StyleLiferay 7: Come realizzare un client SOAP con Apache CXF in OSGi Style
Liferay 7: Come realizzare un client SOAP con Apache CXF in OSGi Style
 
OSGi e Liferay 7
OSGi e Liferay 7OSGi e Liferay 7
OSGi e Liferay 7
 
Mac OS(Operating System)
Mac OS(Operating System)Mac OS(Operating System)
Mac OS(Operating System)
 

Ähnlich wie Mac OS X Snow Leopard & Informix IDS 11.5 + PHP5

Connect2016 Shipping Domino
Connect2016 Shipping DominoConnect2016 Shipping Domino
Connect2016 Shipping DominoFactor-y S.r.l.
 
Connect2016 - 1172 Shipping domino
Connect2016 - 1172 Shipping dominoConnect2016 - 1172 Shipping domino
Connect2016 - 1172 Shipping dominoMatteo Bisi
 
Ugif 04 2011 déployer informix
Ugif 04 2011   déployer informixUgif 04 2011   déployer informix
Ugif 04 2011 déployer informixUGIF
 
CCNAv5 - S3: Chapter9 IOS Images and Licensing
CCNAv5 - S3: Chapter9 IOS Images and LicensingCCNAv5 - S3: Chapter9 IOS Images and Licensing
CCNAv5 - S3: Chapter9 IOS Images and LicensingVuz Dở Hơi
 
Connect 2013 show101 making ibm traveler high available_part2_extending and s...
Connect 2013 show101 making ibm traveler high available_part2_extending and s...Connect 2013 show101 making ibm traveler high available_part2_extending and s...
Connect 2013 show101 making ibm traveler high available_part2_extending and s...a8us
 
Ibm smart cloud entry+ for system x administrator guide
Ibm smart cloud entry+ for system x administrator guideIbm smart cloud entry+ for system x administrator guide
Ibm smart cloud entry+ for system x administrator guideIBM India Smarter Computing
 
Connect 2013 - Making IBM Traveler High Available: Extending And Securing The...
Connect 2013 - Making IBM Traveler High Available: Extending And Securing The...Connect 2013 - Making IBM Traveler High Available: Extending And Securing The...
Connect 2013 - Making IBM Traveler High Available: Extending And Securing The...René Winkelmeyer
 
websphere commerce server admin configuration
websphere commerce server admin configuration websphere commerce server admin configuration
websphere commerce server admin configuration Laxmi Kanth Kshatriya
 
RP_instructorPPT_Chapter10_final.pptx
RP_instructorPPT_Chapter10_final.pptxRP_instructorPPT_Chapter10_final.pptx
RP_instructorPPT_Chapter10_final.pptxJamiUllah1
 
Lavigne bsdmag sept12
Lavigne bsdmag sept12Lavigne bsdmag sept12
Lavigne bsdmag sept12Dru Lavigne
 
IBM Informix on cloud webcast August 2017
IBM Informix on cloud webcast August 2017IBM Informix on cloud webcast August 2017
IBM Informix on cloud webcast August 2017Pradeep Natarajan
 
Smart Virtual Appliances Made Easy with IBM Image Construction and Compositio...
Smart Virtual Appliances Made Easy with IBM Image Construction and Compositio...Smart Virtual Appliances Made Easy with IBM Image Construction and Compositio...
Smart Virtual Appliances Made Easy with IBM Image Construction and Compositio...IBM India Smarter Computing
 
Basic switch and router configurations
Basic switch and router configurationsBasic switch and router configurations
Basic switch and router configurationsaibad ahmed
 
switch and router configuration
switch and router configurationswitch and router configuration
switch and router configurationaibad ahmed
 
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...zOSCommserver
 
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond final
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond finalId101 what's new in ibm lotus® domino® 8.5.3 and beyond final
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond finalSaurabh Calla
 

Ähnlich wie Mac OS X Snow Leopard & Informix IDS 11.5 + PHP5 (20)

Connect2016 Shipping Domino
Connect2016 Shipping DominoConnect2016 Shipping Domino
Connect2016 Shipping Domino
 
Connect2016 - 1172 Shipping domino
Connect2016 - 1172 Shipping dominoConnect2016 - 1172 Shipping domino
Connect2016 - 1172 Shipping domino
 
Ugif 04 2011 déployer informix
Ugif 04 2011   déployer informixUgif 04 2011   déployer informix
Ugif 04 2011 déployer informix
 
CCNAv5 - S3: Chapter9 IOS Images and Licensing
CCNAv5 - S3: Chapter9 IOS Images and LicensingCCNAv5 - S3: Chapter9 IOS Images and Licensing
CCNAv5 - S3: Chapter9 IOS Images and Licensing
 
Connect 2013 show101 making ibm traveler high available_part2_extending and s...
Connect 2013 show101 making ibm traveler high available_part2_extending and s...Connect 2013 show101 making ibm traveler high available_part2_extending and s...
Connect 2013 show101 making ibm traveler high available_part2_extending and s...
 
Ibm smart cloud entry+ for system x administrator guide
Ibm smart cloud entry+ for system x administrator guideIbm smart cloud entry+ for system x administrator guide
Ibm smart cloud entry+ for system x administrator guide
 
Connect 2013 - Making IBM Traveler High Available: Extending And Securing The...
Connect 2013 - Making IBM Traveler High Available: Extending And Securing The...Connect 2013 - Making IBM Traveler High Available: Extending And Securing The...
Connect 2013 - Making IBM Traveler High Available: Extending And Securing The...
 
Ibm smart cloud entry+ for system x user guide
Ibm smart cloud entry+ for system x user guideIbm smart cloud entry+ for system x user guide
Ibm smart cloud entry+ for system x user guide
 
websphere commerce server admin configuration
websphere commerce server admin configuration websphere commerce server admin configuration
websphere commerce server admin configuration
 
Nim
NimNim
Nim
 
RP_instructorPPT_Chapter10_final.pptx
RP_instructorPPT_Chapter10_final.pptxRP_instructorPPT_Chapter10_final.pptx
RP_instructorPPT_Chapter10_final.pptx
 
Lavigne bsdmag sept12
Lavigne bsdmag sept12Lavigne bsdmag sept12
Lavigne bsdmag sept12
 
WAS 8 Webcast
WAS 8 WebcastWAS 8 Webcast
WAS 8 Webcast
 
docker
dockerdocker
docker
 
IBM Informix on cloud webcast August 2017
IBM Informix on cloud webcast August 2017IBM Informix on cloud webcast August 2017
IBM Informix on cloud webcast August 2017
 
Smart Virtual Appliances Made Easy with IBM Image Construction and Compositio...
Smart Virtual Appliances Made Easy with IBM Image Construction and Compositio...Smart Virtual Appliances Made Easy with IBM Image Construction and Compositio...
Smart Virtual Appliances Made Easy with IBM Image Construction and Compositio...
 
Basic switch and router configurations
Basic switch and router configurationsBasic switch and router configurations
Basic switch and router configurations
 
switch and router configuration
switch and router configurationswitch and router configuration
switch and router configuration
 
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
 
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond final
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond finalId101 what's new in ibm lotus® domino® 8.5.3 and beyond final
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond final
 

Mehr von Antonio Musarra

Liferay Portal CE 7.4: Come configurare Oracle Database 19c
Liferay Portal CE 7.4: Come configurare Oracle Database 19cLiferay Portal CE 7.4: Come configurare Oracle Database 19c
Liferay Portal CE 7.4: Come configurare Oracle Database 19cAntonio Musarra
 
Come installare TIBCO Jasper Reports Server 7.5 Community Edition su RedHat J...
Come installare TIBCO Jasper Reports Server 7.5 Community Edition su RedHat J...Come installare TIBCO Jasper Reports Server 7.5 Community Edition su RedHat J...
Come installare TIBCO Jasper Reports Server 7.5 Community Edition su RedHat J...Antonio Musarra
 
Come installare Liferay 7.2 GA2 su WildFly 16 + Oracle Database 19c
Come installare Liferay 7.2 GA2 su WildFly 16 + Oracle Database 19cCome installare Liferay 7.2 GA2 su WildFly 16 + Oracle Database 19c
Come installare Liferay 7.2 GA2 su WildFly 16 + Oracle Database 19cAntonio Musarra
 
Liferay SSL/TLS Security. Come configurare il bundle Liferay per abilitare il...
Liferay SSL/TLS Security. Come configurare il bundle Liferay per abilitare il...Liferay SSL/TLS Security. Come configurare il bundle Liferay per abilitare il...
Liferay SSL/TLS Security. Come configurare il bundle Liferay per abilitare il...Antonio Musarra
 
Liferay & Salesforce.com
Liferay & Salesforce.comLiferay & Salesforce.com
Liferay & Salesforce.comAntonio Musarra
 
Come installare Liferay 7 su JBOSS EAP con il supporto​ Oracle Database
Come installare Liferay 7 su JBOSS EAP con il supporto​ Oracle DatabaseCome installare Liferay 7 su JBOSS EAP con il supporto​ Oracle Database
Come installare Liferay 7 su JBOSS EAP con il supporto​ Oracle DatabaseAntonio Musarra
 
Corso introduttivo di Design Pattern in Java per Elis - 1
Corso introduttivo di Design Pattern in Java per Elis - 1Corso introduttivo di Design Pattern in Java per Elis - 1
Corso introduttivo di Design Pattern in Java per Elis - 1Antonio Musarra
 
Liferay: Esporre Web Services Custom
Liferay: Esporre Web Services CustomLiferay: Esporre Web Services Custom
Liferay: Esporre Web Services CustomAntonio Musarra
 
SugarCRM: Come realizzare un Custom Scheduler. Un esempio completo.
SugarCRM: Come realizzare un Custom Scheduler. Un esempio completo.SugarCRM: Come realizzare un Custom Scheduler. Un esempio completo.
SugarCRM: Come realizzare un Custom Scheduler. Un esempio completo.Antonio Musarra
 
SugarCRM REST API: Un’applicazione in appena dieci minuti
SugarCRM REST API: Un’applicazione in appena dieci minutiSugarCRM REST API: Un’applicazione in appena dieci minuti
SugarCRM REST API: Un’applicazione in appena dieci minutiAntonio Musarra
 
How to Build a Java client for SugarCRM
How to Build a Java client for SugarCRMHow to Build a Java client for SugarCRM
How to Build a Java client for SugarCRMAntonio Musarra
 
Liferay Web Services - Come importare utenti da un foglio Excel
Liferay Web Services - Come importare utenti da un foglio ExcelLiferay Web Services - Come importare utenti da un foglio Excel
Liferay Web Services - Come importare utenti da un foglio ExcelAntonio Musarra
 
Introduzione agli Hooks – Primo Episodio
Introduzione agli Hooks – Primo EpisodioIntroduzione agli Hooks – Primo Episodio
Introduzione agli Hooks – Primo EpisodioAntonio Musarra
 
Introduzione a Liferay Message BUS
Introduzione a Liferay Message BUSIntroduzione a Liferay Message BUS
Introduzione a Liferay Message BUSAntonio Musarra
 
Un CRM dentro un CMS v1.0
Un CRM dentro un CMS v1.0Un CRM dentro un CMS v1.0
Un CRM dentro un CMS v1.0Antonio Musarra
 
Running Kettle Job by API v1.2
Running Kettle Job by API v1.2Running Kettle Job by API v1.2
Running Kettle Job by API v1.2Antonio Musarra
 
SugarCRM Web Services: Build a Apache CXF Client
SugarCRM Web Services: Build a Apache CXF ClientSugarCRM Web Services: Build a Apache CXF Client
SugarCRM Web Services: Build a Apache CXF ClientAntonio Musarra
 
Building a Client .NET for SugarCRM
Building a Client .NET for SugarCRMBuilding a Client .NET for SugarCRM
Building a Client .NET for SugarCRMAntonio Musarra
 
Costruire un client .NET per SugarCRM
Costruire un client .NET per SugarCRMCostruire un client .NET per SugarCRM
Costruire un client .NET per SugarCRMAntonio Musarra
 
Come configurare Liferay 6.0 per Oracle
Come configurare Liferay 6.0 per OracleCome configurare Liferay 6.0 per Oracle
Come configurare Liferay 6.0 per OracleAntonio Musarra
 

Mehr von Antonio Musarra (20)

Liferay Portal CE 7.4: Come configurare Oracle Database 19c
Liferay Portal CE 7.4: Come configurare Oracle Database 19cLiferay Portal CE 7.4: Come configurare Oracle Database 19c
Liferay Portal CE 7.4: Come configurare Oracle Database 19c
 
Come installare TIBCO Jasper Reports Server 7.5 Community Edition su RedHat J...
Come installare TIBCO Jasper Reports Server 7.5 Community Edition su RedHat J...Come installare TIBCO Jasper Reports Server 7.5 Community Edition su RedHat J...
Come installare TIBCO Jasper Reports Server 7.5 Community Edition su RedHat J...
 
Come installare Liferay 7.2 GA2 su WildFly 16 + Oracle Database 19c
Come installare Liferay 7.2 GA2 su WildFly 16 + Oracle Database 19cCome installare Liferay 7.2 GA2 su WildFly 16 + Oracle Database 19c
Come installare Liferay 7.2 GA2 su WildFly 16 + Oracle Database 19c
 
Liferay SSL/TLS Security. Come configurare il bundle Liferay per abilitare il...
Liferay SSL/TLS Security. Come configurare il bundle Liferay per abilitare il...Liferay SSL/TLS Security. Come configurare il bundle Liferay per abilitare il...
Liferay SSL/TLS Security. Come configurare il bundle Liferay per abilitare il...
 
Liferay & Salesforce.com
Liferay & Salesforce.comLiferay & Salesforce.com
Liferay & Salesforce.com
 
Come installare Liferay 7 su JBOSS EAP con il supporto​ Oracle Database
Come installare Liferay 7 su JBOSS EAP con il supporto​ Oracle DatabaseCome installare Liferay 7 su JBOSS EAP con il supporto​ Oracle Database
Come installare Liferay 7 su JBOSS EAP con il supporto​ Oracle Database
 
Corso introduttivo di Design Pattern in Java per Elis - 1
Corso introduttivo di Design Pattern in Java per Elis - 1Corso introduttivo di Design Pattern in Java per Elis - 1
Corso introduttivo di Design Pattern in Java per Elis - 1
 
Liferay: Esporre Web Services Custom
Liferay: Esporre Web Services CustomLiferay: Esporre Web Services Custom
Liferay: Esporre Web Services Custom
 
SugarCRM: Come realizzare un Custom Scheduler. Un esempio completo.
SugarCRM: Come realizzare un Custom Scheduler. Un esempio completo.SugarCRM: Come realizzare un Custom Scheduler. Un esempio completo.
SugarCRM: Come realizzare un Custom Scheduler. Un esempio completo.
 
SugarCRM REST API: Un’applicazione in appena dieci minuti
SugarCRM REST API: Un’applicazione in appena dieci minutiSugarCRM REST API: Un’applicazione in appena dieci minuti
SugarCRM REST API: Un’applicazione in appena dieci minuti
 
How to Build a Java client for SugarCRM
How to Build a Java client for SugarCRMHow to Build a Java client for SugarCRM
How to Build a Java client for SugarCRM
 
Liferay Web Services - Come importare utenti da un foglio Excel
Liferay Web Services - Come importare utenti da un foglio ExcelLiferay Web Services - Come importare utenti da un foglio Excel
Liferay Web Services - Come importare utenti da un foglio Excel
 
Introduzione agli Hooks – Primo Episodio
Introduzione agli Hooks – Primo EpisodioIntroduzione agli Hooks – Primo Episodio
Introduzione agli Hooks – Primo Episodio
 
Introduzione a Liferay Message BUS
Introduzione a Liferay Message BUSIntroduzione a Liferay Message BUS
Introduzione a Liferay Message BUS
 
Un CRM dentro un CMS v1.0
Un CRM dentro un CMS v1.0Un CRM dentro un CMS v1.0
Un CRM dentro un CMS v1.0
 
Running Kettle Job by API v1.2
Running Kettle Job by API v1.2Running Kettle Job by API v1.2
Running Kettle Job by API v1.2
 
SugarCRM Web Services: Build a Apache CXF Client
SugarCRM Web Services: Build a Apache CXF ClientSugarCRM Web Services: Build a Apache CXF Client
SugarCRM Web Services: Build a Apache CXF Client
 
Building a Client .NET for SugarCRM
Building a Client .NET for SugarCRMBuilding a Client .NET for SugarCRM
Building a Client .NET for SugarCRM
 
Costruire un client .NET per SugarCRM
Costruire un client .NET per SugarCRMCostruire un client .NET per SugarCRM
Costruire un client .NET per SugarCRM
 
Come configurare Liferay 6.0 per Oracle
Come configurare Liferay 6.0 per OracleCome configurare Liferay 6.0 per Oracle
Come configurare Liferay 6.0 per Oracle
 

Kürzlich hochgeladen

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Kürzlich hochgeladen (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

Mac OS X Snow Leopard & Informix IDS 11.5 + PHP5

  • 1. Mac  OS  X  Snow  Leopard:  IBM  Informix  IDS  11.5  +  PHP  5.3     1.1 Introduction   Since  IBM  has  extended  support  for  Informix  Dynamic  Server  (IDS)  also   Mac  OS  X  by  defining  a  winning  combination  of  the  two,  IBM  has  made  the   happiness  of  thousands  of  developers  and  DBAs  no  longer  have  to  work  on  a   remote  server  IDS.   In  this  article  we  will  see  how  to  install  and  configure  IBM  Informix  IDS   simple  steps  on  our  Mac  OS  X  11.5  Snow  Leopard.  The  special  shows  at  the  end   of  the  article  is  the  installation  of  the  informix  module  on  PHP  5.3,  note  that  PHP   5.3  is  part  of  Mac  OS  X  Snow  Leopard.     1.2  Installing  Informix  IDS  11.5   From   the   IBM   website   should   download   the   version   of   IBM   Informix   IDS   11.5   For   Mac   OS   X,   including   the   Developer   version   of   Informix   (To   download   registration   is   required   at   the   portal   IBM).   This   software   is   distributed   as   a   DMG   file   (iif.11.50.FC5DE.macosx64.dmg)   the   size   of   about   138MByte,   within   it   is   available  the  package  installer.  The  installation  process  is  very  simple,  there  are   no   special   instructions   to   follow   except   for   the   installation   directory   is   advisable   to   choose   the   directory   /opt/IBM/informix   directory   instead   of   /Application   proposed  by  the  installer.      Through   the   aid   of   the   figures   shown   below,   we   will   see   how   is   the   installation  process.   Figura  1  Installer  IDS  Informix  11.5                   Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 2.   Figura  2  Running  the  installation  script           Figura  3  Request  the  administrator  password.           Figura  4  Installer  IDS  Informix  11.50             Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 3.   Figura  5  Installation  directory  to  be  changed  in  /opt/IBM/informix           Figura  6  IDS  components  that  will  be  installed           Figura  7  Separation  of  roles.  Leave  the  default                 Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 4.     Figura  8  Creating  a  demo  IDS  instance.  Leave  the  default           Figura  9  IDS  Installation  Summary             Figura  10  Completed  installation  notes             Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 5.   Figura  11  Finish  Installation           The   installation   process,   in   addition   to   one   copy   of   the   software   in   the   directory   listed,   is   responsible   for   building   on   our   Mac   OS   X   user   informix,   it   will   be  used  to  perform  operations  normally  assigned  to  the  role  of  DBA.   In   the   next   section   we   will   see   the   configuration   of   the   operating   environment  and  initialization  of  Informix.       1.2 Configure   The  configuration  process  could  be  divided  into  two  phases:     • Configuration  execution  environment;     • Configuring  Informix.   The   preparation   of   the   operating   environment   requires   setting   some   environment  variables  listed  below:   • INFORMIXDIR  =>  Directory  Installation  Informix;   • INFORMIXSERVER  =>  The  name  given  to  the  instance  Informix;   • INFORMIXSQLHOSTS  =>  File  di  configurazione  SQL  HOSTS;   • ONCONFIG  =>  Configuration  file  SQL  HOSTS;   • DYLD_LIBRARY_PATH  =>  Path  Informix  Libs;   • TERMCAP  =>  Configuration  terminals  files;   • DB_LOCALE  =>  Set  the  Locale  for  DB;   • CLIENT_LOCALE  =>  Set  the  locale  for  the  client.   You   can   set   the   Informix   environment   variables   directly   within   the   informix  user  profile  file  (see  Listing  1).   To   configure   Informix   we   should   make   changes   to   the   standard   configuration,  there  are  two  configuration  files  on  which  to  act,  both  defined  by   two  environment  variables:  ONCONFIG  and  INFORMIXSQLHOSTS.   Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 6. For  the  file  defined  by  ONCONFIG  is  advisable  to  amend  sections  that  cover:   • Root  Dbspace  Configuration  Parameters;   • System  Configuration  Parameters;   • Network  Configuration  Parameters   Proceeding  with  the  order  mentioned  above  is  going  to  change  and  /  or  add   the  configurations  listed  below  (see  Listing  2).     Listato  2  Changing  the  standard  configuration  of  Informix.     ################################################################### # Root Dbspace Configuration Parameters ################################################################### ROOTPATH $INFORMIXDIR/dbs/amusarra_ifx.rootdbs MIRRORPATH $INFORMIXDIR/dbs/amusarra_ifx.root_mirror ################################################################### # System Configuration Parameters ################################################################### DBSERVERNAME amusarra_ifx DBSERVERALIASES shirus,amusarra_shm ################################################################### # Network Configuration Parameters ################################################################### NETTYPE soctcp,1,30,NET     I  preferred  to  place  the  files  in  the  root  dbspace  dbs  instead  of  tmp  and  give   them  the  name  of  Informix  as  a  suffix.   In  the  standard  configuration  is  the  only  protocol  configured  ipcshm,  in  our   configuration  was  added  to  the  protocol  soctcp.  I  suggest  the  reading  of  official   documentation  on  Informix  NETTYPE  Configuration  Parameter.     Listato  3  Changing  configuration  SQL  Hosts     # IANA (www.iana.org) assigned port number/service names for Informix: # sqlexec 9088/tcp # sqlexec-ssl 9089/tcp #demo_on onipcshm on_hostname on_servername #demo_se seipcpip se_hostname sqlexec amusarra_ifx onsoctcp amusarra-mobile.local sqlexec shirus onsoctcp amusarra-mobile.local sqlexec-admin amusarra_shm onipcshm amusarra-mobile.local amusarra-mobile       Listing   3   shows   the   configuration   file   sqlhosts   appropriately   modified   according   to   our   needs   (for   more   information   refer   to   the   official   documentation   about  The  Informix  IDS  sqlhosts  File).  The  IANA  has  defined  TCP  ports  specific  to   the  services  Informix,  these  must  be  added  to  the  configuration  files  of  network   services  (see  Listing  4).   Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 7.   Listato  4  Adding  TCP  ports  for  network  services  Informix  (/etc/services).     sqlexec-admin 9087/tcp # IBM Informix SQL Interface - Admin Port sqlexec 9088/tcp # IBM Informix SQL Interface sqlexec-ssl 9089/tcp # IBM Informix SQL Interface - Encrypted       1.3 Preparation  and  Initializing  Informix   Before  proceeding  with  the  process  of  initializing  Informix,  you  must  create   the  file  "empty"  of  the  root  dbspace  by  giving  them  permission  to  read  and  write   only  for  the  user  informix.  As  user  informix,  we  proceed  as  shown  in  Listing  5.     Listato  5  Creating  directory  and  file  "empty"  root  dbspace   amusarra-mobile:~ informix$ mkdir $INFORMIXDIR/dbs amusarra-mobile:~ informix$ touch $INFORMIXDIR/dbs/amusarra_ifx.rootdbs amusarra-mobile:~ informix$ touch $INFORMIXDIR/dbs/amusarra_ifx.rootdbs_mirror amusarra-mobile:~ informix$ chmod 660 $INFORMIXDIR/dbs/amusarra_ifx.rootdbs amusarra-mobile:~ informix$ chmod 660 /opt/IBM/informix/dbs/amusarra_ifx.rootdbs_mirror   Remember   that   the   INFORMIXDIR   environment   variable   refers   to   the   installation  directory  of  IBM  Informix  IDS,  in  our  case  the  variable  INFORMIXDIR   is:  /opt/IBM/Informix.  The  conditions  to  initialize  our  instance  we  are  all,  then   proceed  with  the  initialization  by  running  the  command:   amusarra-mobile:~ informix$ oninit -y -i –v OnInit   is   the   command   responsible   for   initializing   the   dbspaces   and   the   shared  memory  while  leaving  online  informix  instance.  The  option  (-­‐v)  command   allows   you   to   see   OnInit   output   details   of   transactions   executed   during   the   initialization  process  (see  Listing  6).                     Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 8. Listato  6  Part  of  the  command  output  OnInit     Checking group membership to determine server run mode...succeeded Reading configuration file '/opt/IBM/informix/etc/onconfig.std'...succeeded Creating /INFORMIXTMP/.infxdirs...succeeded Checking config parameters...succeeded Allocating and attaching to shared memory...succeeded Creating resident pool 14708 kbytes...succeeded Allocating 200016 kbytes for buffer pool of 4K page size...succeeded Creating infos file "/opt/IBM/informix/etc/.infos.amusarra_ifx"...succeeded Linking conf file "/opt/IBM/informix/etc/.conf.amusarra_ifx"...succeeded Initializing rhead structure...succeeded Writing to infos file...succeeded Initialization of Encryption...succeeded Initializing ASF...succeeded Forking 1 'soctcp' listener threads...succeeded Forking 1 'soctcp' listener threads...succeeded Forking 1 'ipcshm' listener threads...succeeded Starting tracing...succeeded Initializing 8 flushers...succeeded Initializing log/checkpoint information...succeeded Initializing dbspaces...succeeded Opening primary chunks...succeeded Opening mirror chunks...succeeded Validating chunks...succeeded Creating database partition...succeeded     To  verify  that  went  the  right  way,  with  the  database  in  an  on-­‐line,  execute   the  command:   amusarra-mobile:~ informix$ onstat – The  output  should  be  similar  to:     IBM Informix Dynamic Server Version 11.50.FC5DE -- On-Line -- Up 00:00:25 -- 250928 Kbytes   1.4 Creating  Stores  Demo  database   Our  Informix  instance  is  online,  we  will  then  create  at  least  a  data  base  on   which   to   perform   all   our   tests.   IBM   Informix   IDS   includes   a   set   of   demo   schemas   complete   data,   we   will   use   the   db   Stores   Demo.   To   create   the   schema   and   load   data  (always  as  user  informix)  execute  the  command:   amusarra-mobile:~ informix$ dbaccessdemo To  verify  that  the  schema  and  data  have  been  created  successfully  executed   a   connection   to   the   database   stores_demo   and   a   select   query   on   the   Customer   table,  we  proceed  by  running  the  command:   amusarra-mobile:~ informix$ echo "SELECT * FROM CUSTOMER;" | dbaccess stores_demo - Output   the   command   will   return   the   records   in   the   customer   table   in   the   database  stores_demo  (see  Listing  7).         Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 9. Listato  7  Output  of  the  query  on  the  Customer  table     Database selected. …. customer_num 128 fname Frank lname Lessor company Phoenix University address1 Athletic Department address2 1817 N. Thomas Road city Phoenix state AZ zipcode 85008 phone 602-533-1817 28 row(s) retrieved. Database closed.       Now   that   we   have   the   Informix   instance   on-­‐line   and   the   data   base   stores_demo,  the  next  step  is  to  install  the  Informix  module  for  PHP  5.3,  that  way   we   can   have   access   to   Informix   using   the   scripting   language   world's   most   popular  .     1.5 PHP  &  Informix   PHP   and   MySQL   or   PHP   and   PostgreSQL   are   common   to   many   pairs   of   opposite   pairs   PHP   and   Informix   almost   unknown,   it   might   be   the   nature   and   scope  of  commercial  use  of  Informix  to  make  the  couple  less  known.   Since  version  5.2  of  the  PHP  Informix  module  is  no  longer  available  because   abandoned   in   favor   of   the   Informix   PDO   Module.   In   the   rest   of   the   article   we   will   see   how   to   compile   the   "old"   module   for   Informix   makes   working   on   version   5.3   of  PHP.     1.5.1 Building  and  installing  the  module  Informix    Informix   module   is   not   available   on   version   5.3   of   PHP   installed   on   our   Mac  OS  X,  you  must  then  download  the  source  code  of  the  module  directly  from   the  site  http://pecl.php.net/package/informix.  The  tar.gz  archive  of  the  module   is   not   available,   no   matter,   checks   out   the   source   of   the   module   directly   from   the   SVN  repository  using  the  command:   amusarra-mobile:~ informix$ svn co http://svn.php.net/repository/pecl/informix/trunk php_ext_informix In   this   way   we   get   the   source   Informix   module   into   the   directory   ~/php_ext_informix.   In   Listing   8   shows   the   result   obtained   by   the   operation   performed  on  the  checkout  SVN  repository.       Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 10. Listato  8  Operating  checkout  form  Informix.     amusarra-mobile:~ informix$ svn co http://svn.php.net/repository/pecl/informix/trunk php_ext_informix A php_ext_informix/config.w32 A php_ext_informix/config.m4 A php_ext_informix/php_informix.h A php_ext_informix/Makefile.frag A php_ext_informix/ifx.dsp A php_ext_informix/ifx.ec A php_ext_informix/CREDITS A php_ext_informix/php_informix_includes.h U php_ext_informix Checked out revision 290780.     We  move  into  the  directory  ~/php_ext_informix  and  proceed  with  the  build   of  the  module.   amusarra-mobile:php_ext_informix informix$ phpize amusarra-mobile:php_ext_informix informix$ ./configure Before   continuing   with   the   make   of   the   Informix   Module,   you   must   edit   the   Makefile   to   ensure   that   the   module   is   linked   with   Informix   library   checkapi.o,   otherwise  the  use  of  the  module  will  produce  the  error:     undefined symbol: ifx_checkAPI. Inside  the  Makefile  must  add  the  directive  INFORMIX_SHARED_LIBADD  use   the  library  Informix  checkapi.o:   /opt/IBM/informix/lib/esql/checkapi.o Then  proceed  with  compiling  and  installing  the  module  Informix.  The  user   informix  must  be  defined  as  sudores  or  you  must  run  the  installation  as  root.   amusarra-mobile:php_ext_informix informix$ make amusarra-mobile:php_ext_informix informix$ sudo make install The   module   will   be   installed   in   /   usr/lib/php/extensions/no-­‐debug-­‐non-­‐ zts-­‐20090626  /.  To  verify  the  correct  link  to  the  library  Informix  checkapi.o  just   use  the  command  nm  coupled  with  the  command  grep.  The  output  should  return   the  entry  point  ifx_chekAPI.   amusarra-mobile:php_ext_informix informix$ nm /usr/lib/php/extensions/no-debug- non-zts-20090626/informix.so | grep checkAPI 000000000000a0a0 T _ifx_checkAPI           Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 11. 1.5.2 Activating  and  test  module  Informix   To   activate   the   module   just   installed,   you   must   edit   (as   root)   the   configuration   file   php.ini   (located   in   /etc)   and   add   the   extensions   section   directive:   extension=informix.so You  can  verify  that  the  module  Informix  is  active  by  running  the  command:   amusarra-mobile:php_ext_informix informix$ php -i|grep Informix Informix support => enabled The   command   responded   by   confirming   the   activation   of   the   module   Informix,   you   can   still   use   the   php-­‐m   command   to   verify   that   the   module   is   active.   At  this  time  the  Informix  module  is  operational  only  when  used  from  PHP   CLI   is   not   available   under   Apache   because   he   does   not   see   the   Informix   environment  variables  needed  for  the  proper  functioning  of  the  module.  The  log   file   of   Apache   (see   Listing   9)   is   evident   as   the   Informix   module   is   not   loaded   because  of  the  failure  to  load  Informix  libraries  required  by  the  module.  Variable   DYLD_LIBRARY_PATH   (which   indicates   the   location   of   libraries   Informix)   must   be  visible  to  the  Apache  process.     Listato  9  Extract  from  the  log  files  of  Apache,  Informix  obvious  error  loading  module     PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no- debug-non-zts-20090626/informix.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts- 20090626/informix.so, 9): Library not loaded: isqls09b.dylibn Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20090626/informix.son Reason: image not found in Unknown on line 0     In  Mac  OS  X  10.4  (Tiger)  Apple  introduced  a  new  system  that  controls  basic   services  this  system  is  called  launchd.  The  Apache  service  is  therefore  governed   by   launchd   for   security   reasons   reset   the   environment   variables   to   the   bare   minimum,   which   is   why   the   module   failed   to   load   Informix,   Informix   environment   variables   are   not   visible   to   the   Apache   process.   Launchd   configuration,  or  rather  of  the  process  to  be  managed  is  by  means  of  a  plist  file   type,  while  the  file  /  etc  /  launchd.conf  contains  directives  (eg  commands  to  set   environment   variables)   for   launchd.   Our   goal   is   therefore   to   make   visible   the   Informix   environment   variables   serving   Apache,   the   configuration   file   /etc/launchd.conf  add  the  directives  shown  in  Listing  10.             Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 12. Listato  10  Launchd  config  file  for  the  set  of  environment  variables  Informix   setenv INFORMIXDIR /opt/IBM/informix setenv ONCONFIG onconfig.std setenv INFORMIXSERVER amusarra_ifx setenv INFORMIXSQLHOSTS /opt/IBM/informix/etc/sqlhosts setenv DYLD_LIBRARY_PATH /opt/IBM/informix/lib:/opt/IBM/informix/lib/esql:/opt/IBM/informix/lib:/opt/IBM/inform ix/lib/cli setenv CLIENT_LOCALE en_US.819   We   have   ensured   that   the   processes   controlled   by   launchd   can   access   the   Informix  environment  variables.   At   this   point,   you   need   to   restart   the   Apache   service   with   the   usual   command  apachectl  (or  System  Preferences)  and  make  sure  the  Informix  module   is  properly  loaded,  you  can  verify  this  with  a  simple  PHP  script  that  has  inside  a   call  to  phpinfo  (),  in  Figure  1,  the  extract  of  section  Informix.       Figura  1  Sample  phpinfo  with  evidence  of  the  configuration  module  Informix.           In   one   of   the   previous   sections   we   have   loaded   the   database   on   our   Stores_Demo   Informix   instance,   at   the   conclusion   of   this   article   we   will   make   a   simple  PHP  script  (see  Listing  11)  that  shows  in  tabular  form,  records  that  exist   on  the  Orders  table.       Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com    
  • 13. Listato  11  PHP  script  for  the  selection  of  records  from  the  Orders  table     <?php $conn_id = ifx_connect ("stores_demo@amusarra_ifx", "informix", "password"); $res_id = ifx_query("select * from orders", $conn_id); if (! $res_id) { printf("Can't select orders : %sn<br />%s<br />n", ifx_error(),ifx_errormsg()); ifx_close($conn_id); die; } ifx_htmltbl_result($res_id, "border="1""); ifx_free_result($res_id); ifx_close($conn_id); ?>       Figura  2  Result  script  PHP  Listing  11           Copyright  ©  2009  –  Antonio  Musarra  –  http://musarra.wordpress.com