php-install Digest 14 Mar 2003 23:53:32 -0000 Issue 1289
Topics (messages 10341 through 10342):
PHP Java works with http:// but not https://
10341 by: Derek
problem connecting PHP w/ODBC
10342 by: Beverly Steiner
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Can browse to php page ok using http://
The version of Java running is1.4.1_01
but when accessing same page using https:// it fails
Fatal error: Cannot instantiate non-existent class: java in
/home/online/www/tmp/derek.php on line 5
Any ideas why please?
Thanks
Derek
Browsers Opera 7 and IE 6
php.ini
[Java]
java.class.path = "/usr/local/lib/php/php_java.jar:/home/online/www/java"
java.home = /usr/local/jdk
java.library = /usr/local/jdk/jre/lib/i386/libjava.so
java.library.path = /usr/local/lib/php/extensions/no-debug-non-zts-20020429
Code
<head>
<title>Test Page for PHP/Java</title>
</head>
<?php
$system_inst = new Java('java.lang.System');
// Test PHP's ability to get a property from a Java class
echo "The version of Java running is";
echo $system_inst->getProperty("java.version");
?>
</body>
</html>
PHP Version 4.3.1
System Linux home.******.com 2.4.18-5.49 #1 Fri Jun 14 15:16:33 EDT
2002 i686
Build Date Mar 11 2003 16:02:29
Configure Command './configure' '--prefix=/usr/local/'
'--with-mysql=/usr/local/mysql' '--with-imap' '--with-apxs=/usr/sbin/apxs'
'--enable-track-vars' '--with-mcrypt' '--with-mhash' '--enable-bcmath'
'--with-config-file-path=/etc/httpd' '--with-gd' '--with-sablot'
'--with-expat' '--enable-ftp' '--with-pdflib=/usr/local'
'--with-zlib-dir=/usr' '--with-png-dir=/usr' '--with-kerberos'
'--with-imap-ssl' '--with-jpeg-dir=/usr' '--with-tiff-dir=/usr'
'--with-freetype-dir=/usr' '--with-java=/usr/local/jdk'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/httpd/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, compress.zlib
--- End Message ---
--- Begin Message ---
Hello,
I am having problems accessing a database through ODBC. I first sent an
email describing my problems accessing an MS Access database through PHP.
Today I installed MySQL. I have no problems accessing my test database with
the mysql commands. I downloaded MySQL's ODBC driver. I get the same error
message trying to access this database w/ODBC as I did with the MS Access
database.
I am running Windows XP Professional, PHP 4.3.1, and Apache 1.3.27.
Here's my PHP code:
$connection = odbc_connect("testmysql", "", "") or die ("Couldn't connect
to the server.");
$sql = "SELECT * FROM member";
$result = odbc_exec($sql,$connection) or die ("Couldn't execute query");
I get the following error message in my browser:
Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource in
c:\program files\apache group\apache\htdocs\test4.php on line 17
Couldn't execute query
Anyone have any ideas of what I should do so I can access a database through
ODBC?
Beverly Steiner
[EMAIL PROTECTED]
--- End Message ---