php-windows Digest 28 Feb 2001 22:48:57 -0000 Issue 467

Topics (messages 5749 through 5764):

Re: [PHP-DB] Resolution detect and redirect
        5749 by: Tom Mathews

Re: [PHP] Revised [PHP] COM and PHP
        5750 by: Daniel Tryba
        5759 by: Alain Samoun

is there a way to access an Access database on NT without adding an entry in System DNS
        5751 by: Catalin Dragu
        5760 by: Alain Samoun

TCP/IP option not available!
        5752 by: David Elliott

seeing if an insert is successful in MSSQL
        5753 by: Hugo Alexandre A. S. Dias

Connecting to remote databases
        5754 by: Daniel Furse
        5756 by: Catalin Dragu
        5761 by: Alain Samoun

Question on using an array
        5755 by: Asendorf, John
        5757 by: Gonzalo Vera
        5764 by: Ignatius Teo

Load URL & open new window
        5758 by: Mad

Re: Here... another newbie question
        5762 by: Phillip Bow

problems with xmldom functions
        5763 by: Roberto Ortelli

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]


----------------------------------------------------------------------


I seem to have missed the question on this one, but my guess from the answer
is that you are trying to open a different page based on the screen
resolution, presumably so that you can resize the graphics and text
accordingly.

This method will take a lot of extra development time - you have to write
three pages for every one that you wish to display - a far neater solution
is to use relative sizes in stylesheets to define your text and image size -
I think that there's a good example on WebMonkey - if not I'll double check
where I saw a really neat one.

Tom

Ben Cairns wrote:

> <SCRIPT>
> if (screen.width==640) { Your Redirect Here}
> if (screen.width==800) { Your Redirect Here }
> if (screen.width==1024) { Your Redirect Here }
> </SCRIPT>
>
> Hope this is what you need
>
> -- Ben Cairns - Head Of Technical Operations
> intasept.COM
> Tel: 01332 365333
> Fax: 01332 346010
> E-Mail: [EMAIL PROTECTED]
> Web: http://www.intasept.com
>
> "MAKING sense of
> the INFORMATION
> TECHNOLOGY age
> @ WORK......"
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




On Mon, Feb 05, 2001 at 03:05:24PM -0500, Conover, Ryan wrote:
> I have been trying the following example from the PHP developer's cookbook
> and it keeps giving me the following error.
> 
> Parse error: parse error in c:\Inetpub\wwwroot/temp.php on line 5
> <? //line 1
> $excel_handle = new COM("excel.application"); //line2
> $excel_handle->Visible = false; //line3
> $worksheet = $excel_handle->workbooks->add(); //line4
> $worksheet->Cells(1,1)->value = "Name"; //line5
> $worksheet->SaveAs("temp.xls"); //line6
> $excel_handle->quit(); //line7
> //line8
> ?> //line9
> 
> Anyone that has Com and PHP experience help please

I didn't test it in PHP (only in wscript.exe), but it seems the example 
is wrong. It should be (line 4 -> 4a, 4b):

excel_handle = new COM("Excel.Application"); //line2
excel_handle.Visible = true; //line3
workbook = excel_handle.Workbooks.Add(); //4a
worksheet=workbook.WorkSheets.Add(); //4b
worksheet.Cells(1,1).Value = "Name"; //line5
worksheet.SaveAs("temp.xls"); //line6
excel_handle.quit(); //line7

This seems to work.





Among other articles, look at the COM functions in PHP4 article:
http://www.phpbuilder.com/columns/

Alain

On Wed, Feb 28, 2001 at 11:35:15AM +0100, Daniel Tryba wrote:
> On Mon, Feb 05, 2001 at 03:05:24PM -0500, Conover, Ryan wrote:
> > I have been trying the following example from the PHP developer's cookbook
> > and it keeps giving me the following error.
> > 
> > Parse error: parse error in c:\Inetpub\wwwroot/temp.php on line 5
> > <? //line 1
> > $excel_handle = new COM("excel.application"); //line2
> > $excel_handle->Visible = false; //line3
> > $worksheet = $excel_handle->workbooks->add(); //line4
> > $worksheet->Cells(1,1)->value = "Name"; //line5
> > $worksheet->SaveAs("temp.xls"); //line6
> > $excel_handle->quit(); //line7
> > //line8
> > ?> //line9
> > 
> > Anyone that has Com and PHP experience help please
> 
> I didn't test it in PHP (only in wscript.exe), but it seems the example 
> is wrong. It should be (line 4 -> 4a, 4b):
> 
> excel_handle = new COM("Excel.Application"); //line2
> excel_handle.Visible = true; //line3
> workbook = excel_handle.Workbooks.Add(); //4a
> worksheet=workbook.WorkSheets.Add(); //4b
> worksheet.Cells(1,1).Value = "Name"; //line5
> worksheet.SaveAs("temp.xls"); //line6
> excel_handle.quit(); //line7
> 
> This seems to work.
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Hi,

I would like to ask if you know a way to send queries to an MS Access
database without to have to add the database in the system DNS under
ODBC configuration. I would like to know if there are functions (like in
ASP) where you can pass the path to the database instead of the name of
the data source. (something like
conect_db('c:\db\mydb.mbd','user','passwd');

Thank you very much,
Catalin





Among other articles, look at the two ODBC articles:
http://www.phpbuilder.com/columns/

Alain

On Wed, Feb 28, 2001 at 01:34:48PM +0200, Catalin Dragu wrote:
> Hi,
> 
> I would like to ask if you know a way to send queries to an MS Access
> database without to have to add the database in the system DNS under
> ODBC configuration. I would like to know if there are functions (like in
> ASP) where you can pass the path to the database instead of the name of
> the data source. (something like
> conect_db('c:\db\mydb.mbd','user','passwd');
> 
> Thank you very much,
> Catalin
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Greetings All,

I am using PHP 4.0.5-dev on NT5 Machine with IIS5 I want to pipe the errors
thought a TCP/IP port. I use the piece of code

<?php
error_log ("You messed up!", 2, "192.168.0.2:7869");
?>

I get the error code

==========8<=============================================================
Warning: TCP/IP option not available! in D:\Data\Work\wwwroot\htdocs\JumpPage.php on 
line 2
==========8<=============================================================

What am I missing ?

-- 
 Bye,                      _______________________________________________
  David                   |    David  Elliott    |   Software Engineer    |
 _________________________|  [EMAIL PROTECTED] | PGP Key ID 0x650F4534  |
| Do not allow tagline to go past this arrow -------------<               |







I'm having problems with MSSQL, cause i can't get a value from the insert,
update and delete just to check it everything went well. Does anyone knows
any solution to get some kind of error message, or anything just to see if
there were any kind of error in my query?

Thank you

---------------------------------------
Hugo Alexandre Dias
Web-Programmer
MNI - Médicos na Iternet
[EMAIL PROTECTED]
www.mni.pt
www.saudenainternet.pt
www.listamedica.com
MNI - Um mundo de médicos
------------------------------------------





Hi everyone,

I'm trying to connect an Access database that is not on the same server as
the web server. All the servers are Windows NT 4, the web server is IIS4,
and I'm using PHP4. Whenever I try to query the database, it returns:

        Warning: SQL error: [Microsoft][ODBC Microsoft Access 97 Driver] The
Microsoft Jet database  engine cannot open the file 'SIDSC.MDB'. It is
already opened exclusively by another user, or  you need permission to view
its data., SQL state S1000 inSQLExecDirect 

I've checked that the database is not opened by anyone else. I've also tried
creating a new database on the web server and creating links to the tables
in Access, but I still get the same error. The remote database has read
permissions for the 'Everyone' group, so does the entire directory path, and
the share.

Can anyone help?

Many thanks,

Dan




Hi,

Unfortunately I do not know how to solve your problem.

I have a problem about connecting to an Access database on NT with php 4 and I
wonder if you can help me. Here is my problem:

I would like to ask if you know a way to send queries to an MS Access
database without to have to add the database in the system DNS under
ODBC configuration. I would like to know if there are functions (like in
ASP) where you can pass the path to the database instead of the name of
the data source. (something like
conect_db('c:\db\mydb.mbd','user','passwd');
I know how to access the db if it is on the same computer as the server and if
it is added under the system dns in odbc.
Thank you,
Catalin

Daniel Furse wrote:

> Hi everyone,
>
> I'm trying to connect an Access database that is not on the same server as
> the web server. All the servers are Windows NT 4, the web server is IIS4,
> and I'm using PHP4. Whenever I try to query the database, it returns:
>
>         Warning: SQL error: [Microsoft][ODBC Microsoft Access 97 Driver] The
> Microsoft Jet database  engine cannot open the file 'SIDSC.MDB'. It is
> already opened exclusively by another user, or  you need permission to view
> its data., SQL state S1000 inSQLExecDirect
>
> I've checked that the database is not opened by anyone else. I've also tried
> creating a new database on the web server and creating links to the tables
> in Access, but I still get the same error. The remote database has read
> permissions for the 'Everyone' group, so does the entire directory path, and
> the share.
>
> Can anyone help?
>
> Many thanks,
>
> Dan
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





Among other articles, look at the two ODBC articles:
http://www.phpbuilder.com/columns/

Alain

On Wed, Feb 28, 2001 at 02:51:50PM -0000, Daniel Furse wrote:
> Hi everyone,
> 
> I'm trying to connect an Access database that is not on the same server as
> the web server. All the servers are Windows NT 4, the web server is IIS4,
> and I'm using PHP4. Whenever I try to query the database, it returns:
> 
>       Warning: SQL error: [Microsoft][ODBC Microsoft Access 97 Driver] The
> Microsoft Jet database        engine cannot open the file 'SIDSC.MDB'. It is
> already opened exclusively by another user, or        you need permission to view
> its data., SQL state S1000 inSQLExecDirect 
> 
> I've checked that the database is not opened by anyone else. I've also tried
> creating a new database on the web server and creating links to the tables
> in Access, but I still get the same error. The remote database has read
> permissions for the 'Everyone' group, so does the entire directory path, and
> the share.
> 
> Can anyone help?
> 
> Many thanks,
> 
> Dan
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




I have an array which looks something like this:

$arr_links = array('is/' => 'Information Systems'
                   ,'hr/' => 'Human Resources'
                   ,'planning/' => 'Planning Commission'
                   ,'boe/' => 'Board of Elections'
                   ,'vsc/' => 'Veterans\' Commission'
                   ,'links.php' => 'Park District '
                   ,'links.php' => 'CSEA'
                   ,'links.php' => 'County Sheriff');

and a directory builder that uses a while loop like this

while ( list($key, $val) = each($arr_links) ) {
        
     //do a lot of stuff

}


I just added the last three entries on the array which all have the same key
(could be my obvious problem...) My problem is that the while loop only hits
the LAST of the three 'links.php' entry...

Any suggestions on how to force it to hit all of those entries?
pleasepleasepleaseplease don't tell me I have to rewrite the whole thing
with the keys/values reversed...

thanks in advance,

John



---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Aut insanit homo, aut versus facit





You could try accesing by value number, instead of using value index
name. Anyway, I fear that what you're doing is quite illegal, and what
is really happening is that when you assign the first 'links.php', it
is overwritten by the second assignment, which is in turn overwritten
by the third. Try sizeof() and check if you're having 8, or only 6
elements in the array. If the answer is 6... I think you might be in
for some re-writing.  :(

You could probably use a bidimensional array, accesing by index number
and retrieveng the two columns of data from it... or something like
it.

 Gonzalo.

> I have an array which looks something like this:

> $arr_links = array('is/' => 'Information Systems'
>                    ,'hr/' => 'Human Resources'
>                    ,'planning/' => 'Planning Commission'
>                    ,'boe/' => 'Board of Elections'
>                    ,'vsc/' => 'Veterans\' Commission'
>                    ,'links.php' => 'Park District '
>                    ,'links.php' => 'CSEA'
>                    ,'links.php' => 'County Sheriff');

> and a directory builder that uses a while loop like this

> while ( list($key, $val) = each($arr_links) ) {
        
>      //do a lot of stuff

> }


> I just added the last three entries on the array which all have the same key
> (could be my obvious problem...) My problem is that the while loop only hits
> the LAST of the three 'links.php' entry...

> Any suggestions on how to force it to hit all of those entries?
> pleasepleasepleaseplease don't tell me I have to rewrite the whole thing
> with the keys/values reversed...

> thanks in advance,

> John



> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Aut insanit homo, aut versus facit






John,

OK, I won't tell you but I think you've already realised that you probably will have 
to anyway.
:-)

Wouldn't it be easier (not to mention extensible) to put this in a database? Or r u 
just testing?

Ignatius


> -----Original Message-----
> From: Asendorf, John [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 1 March 2001 02:55
> To: Php-Windows (E-mail)
> Subject: [PHP-WIN] Question on using an array
> 
> 
> I have an array which looks something like this:
> 
> $arr_links = array('is/' => 'Information Systems'
>                  ,'hr/' => 'Human Resources'
>                  ,'planning/' => 'Planning Commission'
>                  ,'boe/' => 'Board of Elections'
>                  ,'vsc/' => 'Veterans\' Commission'
>                  ,'links.php' => 'Park District '
>                  ,'links.php' => 'CSEA'
>                  ,'links.php' => 'County Sheriff');
> 
> and a directory builder that uses a while loop like this
> 
> while ( list($key, $val) = each($arr_links) ) {
>       
>      //do a lot of stuff
> 
> }
> 
> 
> I just added the last three entries on the array which all 
> have the same key
> (could be my obvious problem...) My problem is that the while 
> loop only hits
> the LAST of the three 'links.php' entry...
> 
> Any suggestions on how to force it to hit all of those entries?
> pleasepleasepleaseplease don't tell me I have to rewrite the 
> whole thing
> with the keys/values reversed...
> 
> thanks in advance,
> 
> John
> 
> 
> 
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Aut insanit homo, aut versus facit
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




Hi there,

Please help me with loading an URL by using PHP 4, on the same window.

Regards





You need to get Mark Bracewell's isapi(pseudo-wsapi) dll.  It can be found
from http://wgg.com/files/PHP-WSPro/php4isapiwsp.dll .  In server properties
you will need to set up mappings for
.php -> the spiffy dll
.php -> wwwserver/isapi
I believe php4win.de is going to include this in their next release, but I
don't know for sure.
--
phill

""Ernesto"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I use WebSite Pro 2.4 and I installed PHP 4.0.4pl1. Now, when I reach
> index.php, it results in a blank page.
> WebSite error log says
>
> API DLL C:\PHP\sapi\php4isapi.dll loaded on demand.
> ISAPI: ServerSupportFunction() called with unknown opcode 1016
>
> before you say so... mappings are ok and I can't upgrade to WebSite 2.5
> because of other extensions installed.
>
> Any suggestions?
>
> Thanks in advance
>
> Ernesto
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





hi
is it normal that xml dom functions in php doesn't work in the last release of php 
(excepr the xmltreefunction).

bob


Reply via email to