php-windows Digest 11 May 2007 14:06:35 -0000 Issue 3224
Topics (messages 27867 through 27870):
Re: Problem With Pear::DB
27867 by: bedul
Re: barcode webapp printing
27868 by: bedul
27869 by: Moore, Joshua
Move SQL 2005-database?
27870 by: Gustav Wiberg
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 ---
how about IP from the PHP server not the SQL server. hmm it happen to me
using mysql, i just wanna share hope help you
my mysql server 10.30.11.6 and my comp ip was 10.30.11.136
in mysql server i create account/user which the server not localhost but
10.30.11.136 and it worked..
i send to phpDB.. if there any result (reply).. i send to you
----- Original Message -----
From: "Jody Williams" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2007 10:36 PM
Subject: Re: [PHP-WIN] Problem With Pear::DB
> THat is what I thought. Just to confirm, I created an ODBC connection
> for the Windows 2k3 server to the Database using the Server name. I
> tried the IP in the PHP file and have the same results.
>
> Is there some kind of restriction that might be in place in Windows 2003?
>
> Jody
>
> On 5/9/07, Stut <[EMAIL PROTECTED]> wrote:
> > Jody Williams wrote:
> > > I have a situation where I am unable to connect to a Microsoft SQL
> > > 2005 Database from Windows Server 2003 (IIS + PHP 5.0.4).
> > >
> > > here is the code:
> > > <?php
> > > require_once 'DB.php';
> > > $dsn = "mssql://aspj_transfer:[EMAIL PROTECTED]/transfer_station";
> > > $db = DB::connect($dsn);
> > > if (DB::isError($db))
> > > {
> > > die ($db->getMessage().'<br>'.$db->getUserInfo());
> > > }
> > > // no useful info. just trying to return something.
> > > $query = "select [name] as n from sysobjects order by [name]";
> > > $data =& $db->query($query);
> > > while ($row = $data->fetchRow())
> > > {
> > > echo $row[0]."<br>";
> > > }
> > > $db->disconnect();
> > > ?>
> > >
> > > Here is the error:
> > >
> > > [DB Error: connect failed] **
> > > mssql://aspj_transfer:[EMAIL PROTECTED]/transfer_station
> > >
> > > From my workstation, this can connect just fine (Windows XP, IIS, PHP
> > > 5.0.4).
> > >
> > > There aren't any firewalls between the machines.
> > >
> > > Any suggestions?
> >
> > Can the server you're running this on resolve eggrs006 to an IP address?
> > If not, that's your problem. If it can then you need to check the SQL
> > server user to make sure it can access that database from that machine.
> >
> > Note that it is very very very unlikely that this problem is anything to
> > do with PHP or Pear::DB.
> >
> > -Stut
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
do you tried on normal printer? i mean your script?
sry don't help much.
----- Original Message -----
From: "Moore, Joshua" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2007 11:15 PM
Subject: [PHP-WIN] barcode webapp printing
Hello,
I am currently trying to print to my Z4MPlus barcode printer via a php web
application. I first just want to test and see if I can get the printer to
print anything using this code:
<?
function getPrinter($SharedPrinterName) {
global $REMOTE_ADDR;
$host = getHostByAddr($REMOTE_ADDR);
return "\\\\".$host."\\".$SharedPrinterName;
}
$handle = printer_open(getPrinter("ZebraZ4M"));
printer_set_option($handle, PRINTER_MODE, "RAW");
printer_write($handle, "Text to print");
printer_close($handle);
?>
When this is run it just returns with a blank screen without printing
anything on my barcode printer. I am running XP pro, Uniform Server with the
shared printer named "ZebraZ4M" The printer is attached LPT1 on my machine.
I don't see anything on my error logs. Am I going at this the right way? I'm
trying to be able to allow anyone to print barcodes on my intranet via this
web application.
-Josh
--- End Message ---
--- Begin Message ---
It works perfectly fine on a normal printer. I can see when I print to the
barcode printer a new printing document comes up then disappears.
-----Original Message-----
From: bedul [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 10, 2007 6:54 PM
To: Moore, Joshua
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] barcode webapp printing
do you tried on normal printer? i mean your script?
sry don't help much.
----- Original Message -----
From: "Moore, Joshua" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2007 11:15 PM
Subject: [PHP-WIN] barcode webapp printing
Hello,
I am currently trying to print to my Z4MPlus barcode printer via a php web
application. I first just want to test and see if I can get the printer to
print anything using this code:
<?
function getPrinter($SharedPrinterName) {
global $REMOTE_ADDR;
$host = getHostByAddr($REMOTE_ADDR);
return "\\\\".$host."\\".$SharedPrinterName;
}
$handle = printer_open(getPrinter("ZebraZ4M"));
printer_set_option($handle, PRINTER_MODE, "RAW");
printer_write($handle, "Text to print");
printer_close($handle);
?>
When this is run it just returns with a blank screen without printing
anything on my barcode printer. I am running XP pro, Uniform Server with the
shared printer named "ZebraZ4M" The printer is attached LPT1 on my machine.
I don't see anything on my error logs. Am I going at this the right way? I'm
trying to be able to allow anyone to print barcodes on my intranet via this
web application.
-Josh
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi there!
This is not a strict PHP-question but is related because I use PHP together
with MSSQL... (hm...!?)
Anybody have moved a SQL 2000-database to SQL 2005-database? Any important
things to think of? I have tried but it doesn't seem to work to export from SQL
2000. I haven't found any "Import?-functionality" in SQL 2005!??
Best regards
/Gustav Wiberg
--- End Message ---