On Fri, 2004-12-03 at 22:25, Gary Leszczynski wrote:
> Hi
> 
> O/S Sun Solaris 9 4/03
> php 4.3.9
> iplanet 4.1sp5
> mysql 4.0.21
> 
> 
> I used the sunfreeware packages for the other requirements
> 
> 
> config line used:
> ./configure --with-mysql=shared,/usr/local/mysql --with-nsapi=/home/web_srv 
> --with-oci8=/home/oracle/product/8.1.7 --with-ldap --with-openssl 
> --enable-libgcc --enable-sockets --enable-dba --enable-dbx --with-ncurses 
> --with-curl --enable-safe-mode
> 
> 
> added extension=mysql.so in php.ini file
> 
> output from phpinfo() for mysql
> 
> mysql
> 
> MySQL Support => enabled
> Active Persistent Links => 0
> Active Links => 0
> Client API version => 4.0.21
> MYSQL_MODULE_TYPE => external
> MYSQL_SOCKET => /tmp/mysql.sock
> MYSQL_INCLUDE => -I/usr/local/mysql/include/mysql
> MYSQL_LIBS => -L/usr/local/mysql/lib/mysql -lmysqlclient 
> 
> Directive => Local Value => Master Value
> mysql.allow_persistent => On => On
> mysql.connect_timeout => 60 => 60
> mysql.default_host => no value => no value
> mysql.default_password => no value => no value
> mysql.default_port => no value => no value
> mysql.default_socket => no value => no value
> mysql.default_user => no value => no value
> mysql.max_links => Unlimited => Unlimited
> mysql.max_persistent => Unlimited => Unlimited
> mysql.trace_mode => Off => Off
> 
> so it appears to be loaded properly.
> 
> 
> I can successfully connect to my database running php from the command line
> 
> simple php call
> 
> <?php
> // Connecting, selecting database
> $link = mysql_connect('myserver', 'testuser', 'testpass')
>    or die('Could not connect: ' . mysql_error());
> echo 'Connected successfully';
> ?>
> 
> However when I execute this from the netscape browser it fails.
> 
> http://myserver/conn.php
> 
> In my iplant start script for this instance I have added this to the path
> and ld_library_path.
> 
> LD_LIBRARY_PATH=${SERVER_ROOT}/bin/${PRODUCT_NAME}/lib:/usr/local/mysql/lib/mysql:${LD_LIBRARY_PATH};export
>  LD_LIBRARY_PATH
> 
> 
> and
> 
> PATH=${SERVER_ROOT}/bin/${PRODUCT_NAME}/bin:/usr/local/bin:${PATH}; export 
> PATH
> 
> and all the other basic entries.   
> 
> 
> I have stopped and started the instance from the cmd line not through the
> admin gui
> 
> btw-
> 
> which php
> /usr/local/bin/php
> PHP 4.3.9 (cli) (built: Dec  1 2004 09:14:11)
> Copyright (c) 1997-2004 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
> 
> 
> I'm stuck as to where to go next.   I been searching the web but can only
> locate apache type questions/answers.   no solaris/iplanet

Gary,

I can help with some pointers, perhaps. You have used --with-nsapi to
make a module for iPlanet. Thus you will have two PHPs, one is the
command line executable you found with "which php", the other the
iPlanet module. 

The phpinfo() output you show appears to be from the command line
version. If so, what do you get using the webserver (e.g.
http://myserver.com/phpinfo.php) is it different and does it show mysql
as being available? 

I assume you edited the webserver configuration to enable PHP and
restarted the webserver. I mention this just in case, because you did
not.

You did not tell us what error you got when trying to access mysql via
the webserver, saying "it fails" does not give us much to go on.

Hope this helps.

Chris

Reply via email to