Re: Informix, PHP, Apache
Posted in 2004
Topics: Server Administration, Security, Permissions & Auditing
Five Cats wrote:
>
> Whatever the effective user for the Apache is has to be granted some
> kind of permission to connect to the database - probably CONNECT,
> which prevents most things other than actually reading data and
> creating temporary tables as the query optimiser sees fit. If the
> Informix is on a different machine then it also has to be able to
> resolve the user logging in - they have to have a UID on the machine.
> See p2-342 & following in:
Yap, tried that -- user nobody has connect to the data base, and my id
owns it ('cause I created the thing, and it has resource granted to
public for no particular reason).
The thing that's disturbing is that I can't connect using "connect" in
dbaccess if I give a login and password (and, yes, I've tried "informix"
and "root" and "nobody" and me). That leads me to believe that I haven't
got something configured right in Informix but I'm at a complete loss as
to what that might be. If I just start dbaccess and select a data base,
no problem; if I start dbaccess with the data base name on the command
line, no problem (same with isql).
So, I dunno. Thanks for the advice.
>
> http://www.oninit.com/manual/informix/english/docs/gn7382/4367.pdf
>
> (Sorry if this is teaching Granny to suck eggs....)
>
> I don't know what the 'connect id value' is but if it's the UID then 0
> (root) looks dodgy to me.
When you get a value of zero from any PHP connect, you didn't get
connected -- you're supposed to get a numeric greater than zero.
>
>
>>
>> And here I thought this was supposed to be easy.
>
>
Thomas Ronayne wrote:
>
> Five Cats wrote:
>
> >
> > Whatever the effective user for the Apache is has to be granted some
> > kind of permission to connect to the database - probably CONNECT,
> > which prevents most things other than actually reading data and
> > creating temporary tables as the query optimiser sees fit. If the
> > Informix is on a different machine then it also has to be able to
> > resolve the user logging in - they have to have a UID on the machine.
> > See p2-342 & following in:
>
> Yap, tried that -- user nobody has connect to the data base, and my id
> owns it ('cause I created the thing, and it has resource granted to
> public for no particular reason).
>
> The thing that's disturbing is that I can't connect using "connect" in
> dbaccess if I give a login and password (and, yes, I've tried "informix"
> and "root" and "nobody" and me). That leads me to believe that I haven't
> got something configured right in Informix but I'm at a complete loss as
> to what that might be. If I just start dbaccess and select a data base,
> no problem; if I start dbaccess with the data base name on the command
> line, no problem (same with isql).
>
> So, I dunno. Thanks for the advice.
post out the sqlhosts and onconfig
>
> >
> > http://www.oninit.com/manual/informix/english/docs/gn7382/4367.pdf
> >
> > (Sorry if this is teaching Granny to suck eggs....)
> >
> > I don't know what the 'connect id value' is but if it's the UID then 0
> > (root) looks dodgy to me.
>
> When you get a value of zero from any PHP connect, you didn't get
> connected -- you're supposed to get a numeric greater than zero.
True
--
Paul Watson #
Oninit Ltd # Growing old is mandatory
Tel: +44 1436 672201 # Growing up is optional
Fax: +44 1436 678693 #
Mob: +44 7818 003457 #
www.oninit.com #
Here's the files -- I'm pretty sure I've done something wrong, and I'd
really appreciate it if someone could point out what to me. The machine
is named "fubar" (the other one is "snafu").
The operating system and software is:
Slackware 9.1
Server version: Apache/1.3.29 (Unix)
Server built: Nov 3 2003 16:42:50
PHP 4.3.4 (cgi-fcgi) (built: Mar 8 2004 11:41:55)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
DB-Access Version 7.30.UC5
Software Serial Number AAC#A404657
Informix environment variables (they are passed in httpd.conf and show
up in phpinfo) are
INFORMIXDIR=/opt/informix
INFORMIXSERVER=fubar
LD_LIBRARY_PATH=/opt/informix/lib/esql:/opt/informix/lib:/usr/local/lib
The end of /etc/services is:
# IBM Informix Software
informixa 1625/tcp # IBM Informix 7.x engine shared
informixanet 1725/tcp # IBM Informix 7.x engine network
Part of /etc/hosts looks like
# For loopbacking.
127.0.0.1 localhost
192.168.1.10 fubar.com fubar
192.168.1.20 snafu.com snafu
You are only using a shm connection on the database server and
informixnet is using a standard engine connection type and not
online. Basically you are not listening for network connections
change seipcpip to on<something> You need to look the what up in
the release notes, I can't remember what the slackware types are,
onsoctcp maybe???
as another nettype in the onconfig file, soctcp,2,100,NET
Thomas Ronayne wrote:
>
> Here's the files -- I'm pretty sure I've done something wrong, and I'd
> really appreciate it if someone could point out what to me. The machine
> is named "fubar" (the other one is "snafu").
>
> The operating system and software is:
>
> Slackware 9.1
> Server version: Apache/1.3.29 (Unix)
> Server built: Nov 3 2003 16:42:50
> PHP 4.3.4 (cgi-fcgi) (built: Mar 8 2004 11:41:55)
> Copyright (c) 1997-2003 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
> DB-Access Version 7.30.UC5
> Software Serial Number AAC#A404657
>
> Informix environment variables (they are passed in httpd.conf and show
> up in phpinfo) are
>
> INFORMIXDIR=/opt/informix
> INFORMIXSERVER=fubar
> LD_LIBRARY_PATH=/opt/informix/lib/esql:/opt/informix/lib:/usr/local/lib>
> The end of /etc/services is:
>
> # IBM Informix Software
> informixa 1625/tcp # IBM Informix 7.x engine shared
> informixanet 1725/tcp # IBM Informix 7.x engine network
>
> Part of /etc/hosts looks like
>
> # For loopbacking.
> 127.0.0.1 localhost
> 192.168.1.10 fubar.com fubar
> 192.168.1.20 snafu.com snafu
>
> ------------------------------------------------------------------------
> #**************************************************************************
> #
> # INFORMIX SOFTWARE, INC.
> #
> # Title: onconfig.std
> # Description: Informix Dynamic Server Configuration Parameters
> #
> #**************************************************************************
>
> # Root Dbspace Configuration
>
> ROOTNAME rootdbs # Root dbspace name> ROOTPATH /usr/local/dbs/rootdbs # Path for device containing root dbspace
> ROOTOFFSET 0 # Offset of root dbspace into device (Kbytes)
> ROOTSIZE 20000 # Size of root dbspace (Kbytes)>
> # Disk Mirroring Configuration Parameters
>
> MIRROR 0 # Mirroring flag (Yes = 1, No = 0)
> MIRRORPATH # Path for device containing mirrored root
> MIRROROFFSET 0 # Offset into mirrored device (Kbytes)>
> # Physical Log Configuration
>
> PHYSDBS rootdbs # Location (dbspace) of physical log
> PHYSFILE 1000 # Physical log file size (Kbytes)>
> # Logical Log Configuration
>
> LOGFILES 6 # Number of logical log files
> LOGSIZE 500 # Logical log size (Kbytes)>
> # Diagnostics
>
> MSGPATH /opt/informix/online.log # System message log file path
> CONSOLE /dev/null # System console message path
> ALARMPROGRAM /opt/informix/etc/log_full.sh # Alarm program path> SYSALARMPROGRAM /opt/informix/etc/evidence.sh # System Alarm program path
> TBLSPACE_STATS 1>
> # System Archive Tape Device
>
> TAPEDEV /dev/null # Tape device path
> TAPEBLK 16 # Tape block size (Kbytes)
> TAPESIZE 10240 # Maximum amount of data to put on tape (Kbytes)>
> # Log Archive Tape Device
>
> LTAPEDEV /dev/null # Log tape device path
> LTAPEBLK 16 # Log tape block size (Kbytes)
> LTAPESIZE 10240 # Max amount of data to put on log tape (Kbytes)>
> # Optical
>
> STAGEBLOB # Informix Dynamic Server/Optical staging area
>
> # System Configuration
>
> SERVERNUM 0 # Unique id corresponding to a Dynamic Server instance
> DBSERVERNAME fubar # Name of default database server
> NETTYPE ipcshm,3,100,CPU
> DEADLOCK_TIMEOUT 60 # Max time to wait of lock in distributed env.
> RESIDENT 0 # Forced residency flag (Yes = 1, No = 0)
>
> MULTIPROCESSOR 0 # 0 for single-processor, 1 for multi-processor
> NUMCPUVPS 1 # Number of user (cpu) vps
> SINGLE_CPU_VP 0 # If non-zero, limit number of cpu vps to one
>
> NOAGE 0 # Process aging
> AFF_SPROC 0 # Affinity start processor
> AFF_NPROCS 0 # Affinity number of processors>
> # Shared Memory Parameters
>
> LOCKS 2000 # Maximum number of locks
> BUFFERS 200 # Maximum number of shared buffers
> NUMAIOVPS # Number of IO vps
> PHYSBUFF 32 # Physical log buffer size (Kbytes)
> LOGBUFF 32 # Logical log buffer size (Kbytes)> LOGSMAX 6 # Maximum number of logical log files
> CLEANERS 1 # Number of buffer cleaner processes
> SHMBASE 0x10000000 # Shared memory base address
> SHMVIRTSIZE 8000 # initial virtual shared memory segment size
> SHMADD 8192 # Size of new shared memory segments (Kbytes)
> SHMTOTAL 0 # Total shared memory (Kbytes). 0=>unlimited
> CKPTINTVL 300 # Check point interval (in sec)
> LRUS 8 # Number of LRU queues
> LRU_MAX_DIRTY 60 # LRU percent dirty begin cleaning limit
> LRU_MIN_DIRTY 50 # LRU percent dirty end cleaning limit
> LTXHWM 50 # Long transaction high water mark percentage
> LTXEHWM 60 # Long transaction high water mark (exclusive)
> TXTIMEOUT 0x12c # Transaction timeout (in sec)
> STACKSIZE 32 # Stack size (Kbytes)>
> # System Page Size
> # BUFFSIZE - Dynamic Server no longer supports this configuration parameter.
> # To determine the page size used by Dynamic Server on your platform
> # see the last line of output from the command, 'onstat -b'.
>
> # Recovery Variables
> # OFF_RECVRY_THREADS:
> # Number of parallel worker threads during fast recovery or an offline restore.
> # ON_RECVRY_THREADS:
> # Number of parallel worker threads during an online restore.
>
> OFF_RECVRY_THREADS 10 # Default number of offline worker threads
> ON_RECVRY_THREADS 1 # Default number of online worker threads>
> # Data Replication Variables
> # DRAUTO: 0 manual, 1 retain type, 2 reverse type
> DRAUTO 0 # DR automatic switchover
> DRINTERVAL 30 # DR max time between DR buffer flushes (in sec)
> DRTIMEOUT 30 # DR network timeout (in sec)> DRLOSTFOUND /usr/informix/etc/dr.lostfound # DR lost+found file path
>
> # CDR Variables
> CDR_LOGBUFFERS 2048 # siz
Related threads
- onbar -c -F in Windows Informix instance
- Anyone... SQLCODE=-668, ISAM error=-1
- Not using the 100% logical log page size alloacted to informix