php-windows Digest 17 Apr 2007 10:55:56 -0000 Issue 3197
Topics (messages 27701 through 27704):
Re: Problems when trying to use ibm_db2 extension
27701 by: Leo Jokinen
27702 by: Leo Jokinen
Re: [PHP-DB] Re: Problems when trying to use ibm_db2 extension
27703 by: David Mitchell
Firefox versus IE
27704 by: Alf Stockton
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 ---
Problem solved:
I restarted my computer and after that apache loaded ibm_db2 extension.
My conclusion:
1. When you add some extensions to php.ini, you need to restart windows
in order to get those extensions available through apache
2. However, those extensions are instantly available if you use php
command line interface
Anyone disagree?
-Leo-
Leo Jokinen wrote:
Hi all,
I've been banging my head into the wall cause I can't get ibm_db2
extension working with Apache 2.0.59 and PHP 5.2.1 (as apache module).
(Operating system is winxp pro SP2)
For some reason, this code is working on command line but not when
placed to htdocs folder:
<?php
if(function_exists('db2_connect')) {
echo 'Function db2_connect() exists';
} else {
echo 'Unknown function db2_connect()';
exit;
}
echo "\nTrying to connect DB2 database..\n";
$database = 'services';
$user = 'db2admin';
$password = 'xxx';
$hostname = '127.0.0.1';
$port = 50000;
$conn_string = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;" .
"HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;";
$conn = db2_connect($conn_string, '', '');
if ($conn) {
echo "OK: Connection established\n";
db2_close($conn);
} else {
echo "ERROR: Connection failed\n";
}
?>
Command line output:
C:\>php c:\db2_test.php
Function db2_connect() exists
Trying to connect DB2 database..
OK: Connection established
Web output:
Unknown function db2_connect()
Some extra output:
Fatal error: Call to undefined function db2_connect() in
F:\www\services.itella.net\app\webroot\index.php on line 57
Also, phpinfo() won't say nothing that module ibm_db2 is in use
More info:
php_ibm_db2.dll file is in folder C:/php-5.2.1/ext
php.ini:
extension_dir = "C:/php-5.2.1/ext"
extension=php_ibm_db2.dll
httpd.conf:
AddType application/x-httpd-php .php
LoadModule php5_module "C:/php-5.2.1/php5apache2.dll"
PHPIniDir "C:/php-5.2.1/"
Can someone point out the right direction for me?
Regards
Leo Jokinen
--- End Message ---
--- Begin Message ---
Problem solved:
I restarted my computer and after that apache loaded ibm_db2 extension.
My conclusion:
1. When you add some extensions to php.ini, you need to restart windows
in order to get those extensions available through apache
2. However, those extensions are instantly available if you use php
command line interface
Anyone disagree?
-Leo-
Leo Jokinen wrote:
Hi all,
I've been banging my head into the wall cause I can't get ibm_db2
extension working with Apache 2.0.59 and PHP 5.2.1 (as apache module).
(Operating system is winxp pro SP2)
For some reason, this code is working on command line but not when
placed to htdocs folder:
<?php
if(function_exists('db2_connect')) {
echo 'Function db2_connect() exists';
} else {
echo 'Unknown function db2_connect()';
exit;
}
echo "\nTrying to connect DB2 database..\n";
$database = 'services';
$user = 'db2admin';
$password = 'xxx';
$hostname = '127.0.0.1';
$port = 50000;
$conn_string = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;" .
"HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;";
$conn = db2_connect($conn_string, '', '');
if ($conn) {
echo "OK: Connection established\n";
db2_close($conn);
} else {
echo "ERROR: Connection failed\n";
}
?>
Command line output:
C:\>php c:\db2_test.php
Function db2_connect() exists
Trying to connect DB2 database..
OK: Connection established
Web output:
Unknown function db2_connect()
Some extra output:
Fatal error: Call to undefined function db2_connect() in
F:\www\services.itella.net\app\webroot\index.php on line 57
Also, phpinfo() won't say nothing that module ibm_db2 is in use
More info:
php_ibm_db2.dll file is in folder C:/php-5.2.1/ext
php.ini:
extension_dir = "C:/php-5.2.1/ext"
extension=php_ibm_db2.dll
httpd.conf:
AddType application/x-httpd-php .php
LoadModule php5_module "C:/php-5.2.1/php5apache2.dll"
PHPIniDir "C:/php-5.2.1/"
Can someone point out the right direction for me?
Regards
Leo Jokinen
--- End Message ---
--- Begin Message ---
I'd say that on Windows, when you, or software you install, modifies the
PATH environment variable, and a service, like apache, relies on a directory
being in the path, you have to restart Windows in order for that service to
"see" the new path.
In other words, services get the new path only after you reboot.
Dave
On 4/16/07, Leo Jokinen <[EMAIL PROTECTED]> wrote:
Problem solved:
I restarted my computer and after that apache loaded ibm_db2 extension.
My conclusion:
1. When you add some extensions to php.ini, you need to restart windows
in order to get those extensions available through apache
2. However, those extensions are instantly available if you use php
command line interface
Anyone disagree?
-Leo-
Leo Jokinen wrote:
> Hi all,
>
> I've been banging my head into the wall cause I can't get ibm_db2
> extension working with Apache 2.0.59 and PHP 5.2.1 (as apache module).
> (Operating system is winxp pro SP2)
>
> For some reason, this code is working on command line but not when
> placed to htdocs folder:
>
>> <?php
>> if(function_exists('db2_connect')) {
>> echo 'Function db2_connect() exists';
>> } else {
>> echo 'Unknown function db2_connect()';
>> exit;
>> }
>>
>> echo "\nTrying to connect DB2 database..\n";
>>
>> $database = 'services';
>> $user = 'db2admin';
>> $password = 'xxx';
>> $hostname = '127.0.0.1';
>> $port = 50000;
>> $conn_string = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;" .
>>
>>
"HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;";
>> $conn = db2_connect($conn_string, '', '');
>>
>> if ($conn) {
>> echo "OK: Connection established\n";
>> db2_close($conn);
>> } else {
>> echo "ERROR: Connection failed\n";
>> }
>> ?>
>
> Command line output:
>> C:\>php c:\db2_test.php
>> Function db2_connect() exists
>> Trying to connect DB2 database..
>> OK: Connection established
>
> Web output:
>> Unknown function db2_connect()
>
> Some extra output:
>> Fatal error: Call to undefined function db2_connect() in
>> F:\www\services.itella.net\app\webroot\index.php on line 57
>
> Also, phpinfo() won't say nothing that module ibm_db2 is in use
>
> More info:
>
> php_ibm_db2.dll file is in folder C:/php-5.2.1/ext
>
> php.ini:
> extension_dir = "C:/php-5.2.1/ext"
> extension=php_ibm_db2.dll
>
> httpd.conf:
> AddType application/x-httpd-php .php
> LoadModule php5_module "C:/php-5.2.1/php5apache2.dll"
> PHPIniDir "C:/php-5.2.1/"
>
>
> Can someone point out the right direction for me?
>
> Regards
>
> Leo Jokinen
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I have a web page that works perfectly with Firefox but fails with IE.
Please tell me what needs fixing.
I have extracted the bits I think are relavent as follows:-
<form name = 'SelectEvent' ID='SelectEvent' method='get'
action='AdjustmentReport.php'>
and
<BUTTON TYPE='submit'>Submit</BUTTON>
if (isset($HTTP_REFERER))
{
echo "<a href='$HTTP_REFERER'><BUTTON TYPE='submit'>Back</BUTTON></a>";
} else {
echo "<a href='javascript:history.back()'><BUTTON
TYPE='submit'>Back</BUTTON></a>";
}
neither the submit nor the back buttons work in IE but both work fine in
Firefox.
Javascript is enabled in both browsers.
--
Regards,
Alf Stockton www.stockton.co.za
Clothes make the man. Naked people have little or no influence on society.
-- Mark Twain
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--- End Message ---