php-windows Digest 20 Nov 2002 16:55:02 -0000 Issue 1449
Topics (messages 17036 through 17050):
ODBC Connection
17036 by: Nichols, Mark A.
17037 by: Brian McGarvie
17038 by: Nichols, Mark A.
17039 by: Nichols, Mark A.
17040 by: Matt Kynaston
17041 by: Nichols, Mark A.
how to unsubscribe?
17042 by: Alvin Tan
17049 by: Cam Dunstan
Re: dynamic font
17043 by: Tim Blackwell
gettext problem
17044 by: deco
Re: PHP variable
17045 by: Dash McElroy
Class error with php
17046 by: ecd
17047 by: Rich Gray
class error
17048 by: ecd
how to access file stats on network dirves..
17050 by: İHenk-Jan de JongT
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 ---
I'm not having much luck here.
I've created a MS Access database that has a linked table to an Exchange 2000 public
folder. When I access this database (MS Access) with PHP, it works fine with the
table imported, but when linked to Exchange, PHP returns:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Not a valid account name
or password., SQL state 08004 in SQLExecDirect in C:\FoxServ\www\linkdata\testme.php
on line 11
Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result resource in
C:\FoxServ\www\linkdata\testme.php on line 13
Here's the code, any ideas.
<?
$user = "";
$password = "";
$dsn="exchlink";
if (!($conn = @odbc_connect($dsn,$user,$password)))
{
echo "Could not connect to the database at this time.";
exit();
}
$sql = "SELECT Company,Last,First from sgcontacts ORDER BY Company,Last,First";
$result = odbc_exec($conn,$sql);
while (odbc_fetch_row($result))
{
$company = odbc_result($result,"Company");
$last = odbc_result($result,"Last");
$first = odbc_result($result,"First");
echo $company . " " . $last . " " . $first . "<br>";
}
?>
--- End Message ---
--- Begin Message ---
I assume on the server you have added a System DNS to the ODBC Manager?
"Mark A. Nichols" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I'm not having much luck here.
I've created a MS Access database that has a linked table to an Exchange
2000 public folder. When I access this database (MS Access) with PHP, it
works fine with the table imported, but when linked to Exchange, PHP
returns:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Not a valid
account name or password., SQL state 08004 in SQLExecDirect in
C:\FoxServ\www\linkdata\testme.php on line 11
Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result
resource in C:\FoxServ\www\linkdata\testme.php on line 13
Here's the code, any ideas.
<?
$user = "";
$password = "";
$dsn="exchlink";
if (!($conn = @odbc_connect($dsn,$user,$password)))
{
echo "Could not connect to the database at this time.";
exit();
}
$sql = "SELECT Company,Last,First from sgcontacts ORDER BY
Company,Last,First";
$result = odbc_exec($conn,$sql);
while (odbc_fetch_row($result))
{
$company = odbc_result($result,"Company");
$last = odbc_result($result,"Last");
$first = odbc_result($result,"First");
echo $company . " " . $last . " " . $first . "<br>";
}
?>
--- End Message ---
--- Begin Message ---
Yes....and as long as the table is not linked, it works fine.
-----Original Message-----
From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 10:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: ODBC Connection
I assume on the server you have added a System DNS to the ODBC Manager?
"Mark A. Nichols" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I'm not having much luck here.
I've created a MS Access database that has a linked table to an Exchange
2000 public folder. When I access this database (MS Access) with PHP, it
works fine with the table imported, but when linked to Exchange, PHP
returns:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Not a valid
account name or password., SQL state 08004 in SQLExecDirect in
C:\FoxServ\www\linkdata\testme.php on line 11
Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result
resource in C:\FoxServ\www\linkdata\testme.php on line 13
Here's the code, any ideas.
<?
$user = "";
$password = "";
$dsn="exchlink";
if (!($conn = @odbc_connect($dsn,$user,$password)))
{
echo "Could not connect to the database at this time.";
exit();
}
$sql = "SELECT Company,Last,First from sgcontacts ORDER BY
Company,Last,First";
$result = odbc_exec($conn,$sql);
while (odbc_fetch_row($result))
{
$company = odbc_result($result,"Company");
$last = odbc_result($result,"Last");
$first = odbc_result($result,"First");
echo $company . " " . $last . " " . $first . "<br>";
}
?>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Nope, there's no .ldb file. The file will always be closed, with the exception of the
PHP code.
-----Original Message-----
From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 11:10 AM
To: Nichols, Mark A.
Subject: Re: [PHP-WIN] Re: ODBC Connection
ahh... it might be an access locking issue...
ensure there is no .ldb file and try that... if it works that way then
you'll need to keep a concurrent copy for use by the web-application.
----- Original Message -----
From: "Mark A. Nichols" <[EMAIL PROTECTED]>
Newsgroups: php.windows
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 3:56 PM
Subject: RE: [PHP-WIN] Re: ODBC Connection
Yes....and as long as the table is not linked, it works fine.
-----Original Message-----
From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 10:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: ODBC Connection
I assume on the server you have added a System DNS to the ODBC Manager?
"Mark A. Nichols" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I'm not having much luck here.
I've created a MS Access database that has a linked table to an Exchange
2000 public folder. When I access this database (MS Access) with PHP, it
works fine with the table imported, but when linked to Exchange, PHP
returns:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Not a valid
account name or password., SQL state 08004 in SQLExecDirect in
C:\FoxServ\www\linkdata\testme.php on line 11
Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result
resource in C:\FoxServ\www\linkdata\testme.php on line 13
Here's the code, any ideas.
<?
$user = "";
$password = "";
$dsn="exchlink";
if (!($conn = @odbc_connect($dsn,$user,$password)))
{
echo "Could not connect to the database at this time.";
exit();
}
$sql = "SELECT Company,Last,First from sgcontacts ORDER BY
Company,Last,First";
$result = odbc_exec($conn,$sql);
while (odbc_fetch_row($result))
{
$company = odbc_result($result,"Company");
$last = odbc_result($result,"Last");
$first = odbc_result($result,"First");
echo $company . " " . $last . " " . $first . "<br>";
}
?>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I might be wrong, but I seem to remember there are some issues with linked tables in
Access. Can you access the data in the linked tables from other applications, such as
Excel?
Matt
> -----Original Message-----
> From: Nichols, Mark A. [mailto:[EMAIL PROTECTED]]
> Sent: 19 November 2002 16:19
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: ODBC Connection
>
>
> Nope, there's no .ldb file. The file will always be closed,
> with the exception of the PHP code.
>
> -----Original Message-----
> From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 11:10 AM
> To: Nichols, Mark A.
> Subject: Re: [PHP-WIN] Re: ODBC Connection
>
>
> ahh... it might be an access locking issue...
>
> ensure there is no .ldb file and try that... if it works that way then
> you'll need to keep a concurrent copy for use by the web-application.
>
> ----- Original Message -----
> From: "Mark A. Nichols" <[EMAIL PROTECTED]>
> Newsgroups: php.windows
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 19, 2002 3:56 PM
> Subject: RE: [PHP-WIN] Re: ODBC Connection
>
>
> Yes....and as long as the table is not linked, it works fine.
>
>
> -----Original Message-----
> From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 10:58 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: ODBC Connection
>
>
> I assume on the server you have added a System DNS to the
> ODBC Manager?
>
> "Mark A. Nichols" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
roup.com...
I'm not having much luck here.
I've created a MS Access database that has a linked table to an Exchange
2000 public folder. When I access this database (MS Access) with PHP, it
works fine with the table imported, but when linked to Exchange, PHP
returns:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Not a valid
account name or password., SQL state 08004 in SQLExecDirect in
C:\FoxServ\www\linkdata\testme.php on line 11
Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result
resource in C:\FoxServ\www\linkdata\testme.php on line 13
Here's the code, any ideas.
<?
$user = "";
$password = "";
$dsn="exchlink";
if (!($conn = @odbc_connect($dsn,$user,$password)))
{
echo "Could not connect to the database at this time.";
exit();
}
$sql = "SELECT Company,Last,First from sgcontacts ORDER BY
Company,Last,First";
$result = odbc_exec($conn,$sql);
while (odbc_fetch_row($result))
{
$company = odbc_result($result,"Company");
$last = odbc_result($result,"Last");
$first = odbc_result($result,"First");
echo $company . " " . $last . " " . $first . "<br>";
}
?>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Yeh, it works from a linked text file, so file permissions sounds like a good bet.
-----Original Message-----
From: Matt Kynaston [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 11:34 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: ODBC Connection
I might be wrong, but I seem to remember there are some issues with linked tables in
Access. Can you access the data in the linked tables from other applications, such as
Excel?
Matt
> -----Original Message-----
> From: Nichols, Mark A. [mailto:[EMAIL PROTECTED]]
> Sent: 19 November 2002 16:19
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: ODBC Connection
>
>
> Nope, there's no .ldb file. The file will always be closed,
> with the exception of the PHP code.
>
> -----Original Message-----
> From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 11:10 AM
> To: Nichols, Mark A.
> Subject: Re: [PHP-WIN] Re: ODBC Connection
>
>
> ahh... it might be an access locking issue...
>
> ensure there is no .ldb file and try that... if it works that way then
> you'll need to keep a concurrent copy for use by the web-application.
>
> ----- Original Message -----
> From: "Mark A. Nichols" <[EMAIL PROTECTED]>
> Newsgroups: php.windows
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 19, 2002 3:56 PM
> Subject: RE: [PHP-WIN] Re: ODBC Connection
>
>
> Yes....and as long as the table is not linked, it works fine.
>
>
> -----Original Message-----
> From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 10:58 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: ODBC Connection
>
>
> I assume on the server you have added a System DNS to the
> ODBC Manager?
>
> "Mark A. Nichols" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
roup.com...
I'm not having much luck here.
I've created a MS Access database that has a linked table to an Exchange
2000 public folder. When I access this database (MS Access) with PHP, it
works fine with the table imported, but when linked to Exchange, PHP
returns:
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Not a valid
account name or password., SQL state 08004 in SQLExecDirect in
C:\FoxServ\www\linkdata\testme.php on line 11
Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result
resource in C:\FoxServ\www\linkdata\testme.php on line 13
Here's the code, any ideas.
<?
$user = "";
$password = "";
$dsn="exchlink";
if (!($conn = @odbc_connect($dsn,$user,$password)))
{
echo "Could not connect to the database at this time.";
exit();
}
$sql = "SELECT Company,Last,First from sgcontacts ORDER BY
Company,Last,First";
$result = odbc_exec($conn,$sql);
while (odbc_fetch_row($result))
{
$company = odbc_result($result,"Company");
$last = odbc_result($result,"Last");
$first = odbc_result($result,"First");
echo $company . " " . $last . " " . $first . "<br>";
}
?>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
hi, i read and followed the instructions for
unsubscribing at php.net. no success in doing so. how
do i unsubrscibe?
vin:
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
--- End Message ---
--- Begin Message ---
You can`t Alvin - once you`ve joined the list, you`re not allowed to program
in any other language except PHP for the rest of your life.
Go here - http://www.php.net/unsub.php
> ----- Original Message -----
> From: "Alvin Tan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, November 20, 2002 4:03 AM
> Subject: [PHP-WIN] how to unsubscribe?
>
>
> > hi, i read and followed the instructions for
> > unsubscribing at php.net. no success in doing so. how
> > do i unsubrscibe?
>
>
--- End Message ---
--- Begin Message ---
here's what i use..
function Popup(w,h,page,name, scroll) {
win = window.open(page, name, 'height=450;width=350')
}
function getPicture() {
scr = window.screen;
wid = scr.width
if (wid <= 800) {
document.write("<img src=600-800image.jpg?OpenImageResource>");
}
if (wid > 800) {
document.write("<img src=1024image.jpg?OpenImageResource>");
}
}
tim
"Franco Pozzer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Thanks for all and sorry for my english. I hope to write
well...............
>
> I want to calibrate/balance dinamically the font size of my application in
the
> html tag depending of the resolution screen.
>
> Example if I have 800x600 I must be to use a font size or if I have
1024x766
> another font size.
>
> Have you same idea to resolve this my problems?? Sameone have a sample
code for
> me???
>
> Thanks again for all.
>
> www.infocamere.it
> [EMAIL PROTECTED]
>
>
>
>
--- End Message ---
--- Begin Message ---
I've seen the post in this list about gettext() under windows just a few
days ago, but no one seemed to answer it!!
So here it goes again:
I've installed Apache/PHP on WinXP, have several extensions loaded and
working but if i try to load php_gettext.dll i get a "cannot load module"
error when starting Apache.
Now i found i also need the gnu_gettext.dll and downloaded it, but putting
it under c:\php (the php directory), c:\windows\system32, and several other
strange tries gives me no luck!!
Has anyone managed to get this working??
Thank you in advance,
Ricardo Rocha
--- End Message ---
--- Begin Message ---
Do this:
<?php
if (@!isset($test)) echo "test does not exist";
?>
The @ turns off error reporting for that function.
-Dash
-----Original Message-----
From: F.Anneveld [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 7:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP variable
Hello,
When I use the following code my browser comes with the following error :
--------------------------------------------------------------------
PHP code:
<?php
if (!$test) echo "test does not exist";
?>
--------------------------------------------------------------------
Browser error:
Notice: Undefined variable: test in d:\www\trash.php on line 3
test does not exist
--------------------------------------------------------------------
But in PHP you don't have to declare a variable
or do I have to ajust some setting in the PHP.ini ????
Thank you,
Frank
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,
I have to class for two different authentication page. ex. authentication
for studend and other for teacher... and the authentication script for
student work perfectly but the script for teacher give the following error..
Fatal error: Cannot redeclare class pauth in /proyectoweb/pLoguea.php on
line 2
what this means, these are different classes with name differents too. How
can I solve this
problem...
--- End Message ---
--- Begin Message ---
if the classes are in include files then you are probably including the file
twice. look into using include_once() require_once() instead...
-----Original Message-----
From: ecd [mailto:[EMAIL PROTECTED]]
Sent: 14 November 2002 07:08
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Class error with php
Hi,
I have to class for two different authentication page. ex. authentication
for studend and other for teacher... and the authentication script for
student work perfectly but the script for teacher give the following error..
Fatal error: Cannot redeclare class pauth in /proyectoweb/pLoguea.php on
line 2
what this means, these are different classes with name differents too. How
can I solve this
problem...
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi,
I have to class for two different authentication page. ex. authentication
for studend and other for teacher... and the authentication script for
student work perfectly but the script for teacher give the following error..
Fatal error: Cannot redeclare class pauth in /proyectoweb/pLoguea.php on
line 2
what this means, these are different classes with name differents too. How
can I solve this
problem...
--- End Message ---
--- Begin Message ---
I'm working on a file sharing solution in php.
i got a network share that contains these files.
the idea is to read the file data en parse descriptions thru php to the
client in html.
only problem is that opendir works fine on the local drives, but reports
only errors when used on network drives..
what's the way to go around this one?
--- End Message ---