php-windows Digest 15 Feb 2002 04:32:27 -0000 Issue 1002

Topics (messages 12080 through 12099):

Suggestion for form submissions
        12080 by: Nicole Amashta

Re: Loading DLL Extension
        12081 by: Todd WIlliamsen
        12085 by: Zach Curtis
        12095 by: Zach Curtis

Re: Frontpage 2000 and PHP
        12082 by: Todd WIlliamsen

Re: Insert image into MySQL
        12083 by: Todd WIlliamsen

Re: .bat files for PHP
        12084 by: Todd WIlliamsen

Re: Getting PHP to behave with MS SQL Server 7
        12086 by: Nicole Amashta
        12088 by: Todd WIlliamsen
        12090 by: Frank M. Kromann
        12091 by: Todd WIlliamsen
        12092 by: Flint Doungchak

Re: Classes
        12087 by: Nicole Amashta

PHP header to close browser window?
        12089 by: Symeon Charalabides

Large Deployment Information
        12093 by: Flint Doungchak

File Upload Problems
        12094 by: Neil Harrison
        12096 by: Neil Harrison

how to run extern program in php?
        12097 by: ÆÄ¶ûÀÚÀü°Å
        12099 by: Todd WIlliamsen

Undefined Index....
        12098 by: Todd WIlliamsen

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 just have a suggestion.

If you are trying to use variables from a form, based on the method used
(POST or GET),
you can do something like this (and maybe this will avoid the warnings if
you do'nt want to change your error reporting level):

<snip1>
<html>
.....
<body>
<form>
Name: <input type="text" name="name">
E-mail: <input type="text" name="email">
</form>
....
</body>
</html>
</snip1>


<snip2>
<?

if ( isset($HTTP_*_VARS) ) {
    extract($HTTP_*_VARS);  ## '*' is either GET or POST, depeding on the
method used to submit the form
}

echo "Name: $name <br>";
echo "E-mail: $email <br>";

## remaining code here

?>
</snip2>


Then, all the keys of this arrray are ready to use as variables. This may
help; I haven't actually tried this with the E_NOTICES on ...



--
Nicole Amashta
Web Applications Developer
ABOL Software, Inc.

[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
where is the PHP directory located?

is it j:\php ?

if so leave the default to:

./

"Zach Curtis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm not sure how I'm mixing two versions of PHP...how is that possible?
>
> The extensions are located in this path extension_dir = j:\php\extensions.
I
> have tried different combinations of this as well, such as:
>
> "j:\php\extensions"
> j:/php/extensions
> "j:/php/extensions"
>
> From what I had read in the manual and the php.ini file, I thought all I
had
> to do to use an extension was to edit the php.ini such that extension_dir
=
> path to extensions, verify enable_dl = On, and remove the comment for each
> particular extension that was needed extension=php_pdf.dll.
>
> Any additional help you provide would be appreciated. Thanks.
>
>
> Zach
>
> -----Original Message-----
> From: Shane Caraveo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 4:46 PM
> To: Zach Curtis; [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Loading DLL Extension
>
>
> You're mixing two versions of PHP which happen to be incompatible in the
> extension API itself.  Be sure your ini file points to the correct
extension
> directory.
>
> ----- Original Message -----
> From: "Zach Curtis" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 13, 2002 3:15 PM
> Subject: [PHP-WIN] Loading DLL Extension
>
>
> > I can't seem to be able to load any of the DLL extensions included with
> PHP.
> > For example when I try to load the pdf extension using:
> >
> > dl("php_zlib.dll");    or
> > displaying phpinfo()
> >
> > I get this message in a warning window:
> >
> > pdf: Unable to initialize module
> > Module compiled with debug=o, thread-safety=1 module API=20000809
> > PHP compiled with debug=o, thread-safety=1 module API=20001222
> > These options need to match
> >
> > I am running:
> > WINNT 4.0 SP 6a
> > Apache 1.3.12
> > PHP 4.0.6
> >
> > php.ini settings:
> > extension_dir = j:\php\extensions
> > enable_dl = On
> > extension=php_pdf.dll
> >
> >
> > Any thoughts? Thanks.
> >
> >
> > Zach Curtis
> > POPULUS
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>


--- End Message ---
--- Begin Message ---
Yes, that is where PHP is located. When I use ./ for the extension_dir, I
get Warning window, "Warning: Unable to load dynamic library
'./php_pdf.dll' - The specified module could not be found."

Zach



You wrote:

where is the PHP directory located?

is it j:\php ?

if so leave the default to:

./

"Zach Curtis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm not sure how I'm mixing two versions of PHP...how is that possible?
>
> The extensions are located in this path extension_dir = j:\php\extensions.
I
> have tried different combinations of this as well, such as:
>
> "j:\php\extensions"
> j:/php/extensions
> "j:/php/extensions"
>
> From what I had read in the manual and the php.ini file, I thought all I
had
> to do to use an extension was to edit the php.ini such that extension_dir
=
> path to extensions, verify enable_dl = On, and remove the comment for each
> particular extension that was needed extension=php_pdf.dll.
>
> Any additional help you provide would be appreciated. Thanks.
>
>
> Zach
>
> -----Original Message-----
> From: Shane Caraveo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 4:46 PM
> To: Zach Curtis; [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Loading DLL Extension
>
>
> You're mixing two versions of PHP which happen to be incompatible in the
> extension API itself.  Be sure your ini file points to the correct
extension
> directory.
>
> ----- Original Message -----
> From: "Zach Curtis" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 13, 2002 3:15 PM
> Subject: [PHP-WIN] Loading DLL Extension
>
>
> > I can't seem to be able to load any of the DLL extensions included with
> PHP.
> > For example when I try to load the pdf extension using:
> >
> > dl("php_zlib.dll");    or
> > displaying phpinfo()
> >
> > I get this message in a warning window:
> >
> > pdf: Unable to initialize module
> > Module compiled with debug=o, thread-safety=1 module API=20000809
> > PHP compiled with debug=o, thread-safety=1 module API=20001222
> > These options need to match
> >
> > I am running:
> > WINNT 4.0 SP 6a
> > Apache 1.3.12
> > PHP 4.0.6
> >
> > php.ini settings:
> > extension_dir = j:\php\extensions
> > enable_dl = On
> > extension=php_pdf.dll
> >
> >
> > Any thoughts? Thanks.
> >
> >
> > Zach Curtis
> > POPULUS
> >
> >
> > --
> > 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 ---
The answer (from another list) to this issue was that the dll files in the
extensions directory did not match with that build of PHP. Apparently, these
were some how replaced or not updated in the past. The issue was resolved by
replacing the dll files in the extensions directory with those that came
with the build version of php.


Zach

--- End Message ---
--- Begin Message ---
What FrontPage functionality do you need from FrontPage?  Try saving the
page as .php and below it it should say "File Type"  choose "All Files"

If you are trying to use FrontPage's Bots, don't, you will just screw up PHP
and the whole page.  There will be errors all over the damn place.


"Laurence Smith" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I would like to include PHP functionality in FrontPage but when I
> rename the file to either ".php" or ".phtml" I lose the FrontPage
> features.  If I name the files ".htm" or ".html" I get the FrontPage
> functionality but lose PHP.
>
> Is these a way I can get both?
>
> This may be an obvious thing for some of you, but I am really stuck
> with this.
>
> Thanks.
>
> Laurence Smith
> Hamilton, ON
>
>


--- End Message ---
--- Begin Message ---
Can you just insert the location of the file instead of the whole image into
the database?  is there a reason why you are inserting into the database?

How many images do you have or projected to have?


"Sichta Daniel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,

cfg: w2k, Apache 1.3, php4.11, Mysql 3-23-40-max-nt

I'm using following code to insert images (gif, jpg) into table. Everything
worked fine until I switch to php4.11. Now this code is inserting only image
header or something similar.
BTW: pct_data  is   longblob !!!

Thank you for any help !!

Dan

<?
if ($submit) {
    mysql_connect( "****", "*****", "********");
    mysql_select_db( "****");
    $data = addslashes(fread(fopen($form_data,  "r"),
filesize($form_data)));
    $size = GetImageSize ($form_data);
    $result = mysql_query("INSERT INTO pictures VALUES
(0,'$data','$form_data_type','$size[0]','$size[1]')");
    $id = mysql_insert_id();
    print  "<p>this file has the following database id: <b>$id</b>";
    mysql_close();
} else {
?>
 <form method="POST" action="<?$PHP_SELF;?>" enctype="multipart/form-data">
 <input type="hidden" name="max_file_size" value="1000000">
 <br>Meno súboru :<br>
 <input type="file" name="form_data"  size="40">
 <p><input type="submit" name="submit" value="submit">
 </form>
<?
}
?>




--- End Message ---
--- Begin Message ---
Ziggi,

Can you share your new found toy?

There is probably other people out there that would like to know!


"Ziggi" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Wow !
>
> I registered a new file type (.phs, like PHP Script) as described in an
> article on PHPBuilder and it works great !!!
>
> Ziggi
> >
>
>


--- End Message ---
--- Begin Message ---
Based on my own experience with this, if you have the SQL server installed,
you should be fine. All you need is that php_mssql.dll which is appropriate
for MS SQL Server 7.

I originally used 7 with no problems. But I've been using SQL Server 2000
for over a year now.

Nicole
www.aeontrek.com

================

"Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
news:000701c1b50e$46029af0$f5b2d83f@goofy1...
> Frank,
>
> I reinstalled PHP and it doesn't like me or my configuration very well.
> PHP is installed as CGI.  I tried ISAPI filters, but that crapped out
> too.  Yes, I have rebooted, restarted the services many many times and
> still doesn't work.
>
> What do you mean client libraries?
>
> I see this mentioned, but I don't get what they are asking, and what
> files are they?  How come PHP didn't document this or did they just whip
> up the documentation for MS SQL?
>
> -----Original Message-----
> From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 5:48 PM
> To: Todd WIlliamsen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Getting PHP to behave with MS SQL Server 7
>
>
> Hi Todd,
>
> If you are using the ISAPI version you need to restart the web server in
> order to use the mssql_extension.
>
> If you are using CGI and getting undefined function for mssql_connect,
> you might have more than one php.ini file on your system ?
>
> You also need to install the client libraries for mssql server. These
> can be found on the server CD, or you can copy ntwdblib.dll from the
> server to your cplient pc (the pc running your php scripst).
>
> - Frank
>
>
> > Ok, I followed the instructions very closely, to what vague
> > instruction there are.
> >
> > I umcommented out the .dll files and I get undefined variable for
> >
> > mssql_connect()
> >
> > Now there is barely any documentation on this and the tech support has
>
> > gotten me ZERO results, I am hoping since this is a WINDOWS PHP list
> > that someone will be able to help me.
> >
> > I am running Win2k Server IIS5, MS SQL Server7
> >
> > Anyone?
> >
> > Next is Oracle...anyone with answers on that?  LOL!!
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>


--- End Message ---
--- Begin Message ---
Nicole,

It doesn't like me... lol

I tried ISAPI version and CGI version and BOTH don't work.  I tried also
ODBC functions as well, but now I get this message with cgi with odbc

CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:


FATAL:  emalloc():  Unable to allocate 1073741824 bytes


"Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Based on my own experience with this, if you have the SQL server
installed,
> you should be fine. All you need is that php_mssql.dll which is
appropriate
> for MS SQL Server 7.
>
> I originally used 7 with no problems. But I've been using SQL Server 2000
> for over a year now.
>
> Nicole
> www.aeontrek.com
>
> ================
>
> "Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
> news:000701c1b50e$46029af0$f5b2d83f@goofy1...
> > Frank,
> >
> > I reinstalled PHP and it doesn't like me or my configuration very well.
> > PHP is installed as CGI.  I tried ISAPI filters, but that crapped out
> > too.  Yes, I have rebooted, restarted the services many many times and
> > still doesn't work.
> >
> > What do you mean client libraries?
> >
> > I see this mentioned, but I don't get what they are asking, and what
> > files are they?  How come PHP didn't document this or did they just whip
> > up the documentation for MS SQL?
> >
> > -----Original Message-----
> > From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 13, 2002 5:48 PM
> > To: Todd WIlliamsen
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] Getting PHP to behave with MS SQL Server 7
> >
> >
> > Hi Todd,
> >
> > If you are using the ISAPI version you need to restart the web server in
> > order to use the mssql_extension.
> >
> > If you are using CGI and getting undefined function for mssql_connect,
> > you might have more than one php.ini file on your system ?
> >
> > You also need to install the client libraries for mssql server. These
> > can be found on the server CD, or you can copy ntwdblib.dll from the
> > server to your cplient pc (the pc running your php scripst).
> >
> > - Frank
> >
> >
> > > Ok, I followed the instructions very closely, to what vague
> > > instruction there are.
> > >
> > > I umcommented out the .dll files and I get undefined variable for
> > >
> > > mssql_connect()
> > >
> > > Now there is barely any documentation on this and the tech support has
> >
> > > gotten me ZERO results, I am hoping since this is a WINDOWS PHP list
> > > that someone will be able to help me.
> > >
> > > I am running Win2k Server IIS5, MS SQL Server7
> > >
> > > Anyone?
> > >
> > > Next is Oracle...anyone with answers on that?  LOL!!
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> >
>
>


--- End Message ---
--- Begin Message ---
Hi Todd,

This is documented on http://www.php.net/manual/en/ref.mssql.php.

The client libraries is found on the MS SQL Server CD and if you are running PHP on 
the same box as the MS SQL Server is installed you have all you need. If you are 
connecting to a remote MS SQL Server you need to install the client tools on the PHP 
box.

- Frank

> Frank,
> 
> I reinstalled PHP and it doesn't like me or my configuration very well.
> PHP is installed as CGI.  I tried ISAPI filters, but that crapped out
> too.  Yes, I have rebooted, restarted the services many many times and
> still doesn't work.
> 
> What do you mean client libraries?
> 
> I see this mentioned, but I don't get what they are asking, and what
> files are they?  How come PHP didn't document this or did they just whip
> up the documentation for MS SQL?
> 
> -----Original Message-----
> From: Frank M. Kromann [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, February 13, 2002 5:48 PM
> To: Todd WIlliamsen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Getting PHP to behave with MS SQL Server 7
> 
> 
> Hi Todd,
> 
> If you are using the ISAPI version you need to restart the web server in
> order to use the mssql_extension.
> 
> If you are using CGI and getting undefined function for mssql_connect,
> you might have more than one php.ini file on your system ?
> 
> You also need to install the client libraries for mssql server. These
> can be found on the server CD, or you can copy ntwdblib.dll from the
> server to your cplient pc (the pc running your php scripst).
> 
> - Frank
> 
> 
> > Ok, I followed the instructions very closely, to what vague 
> > instruction there are.
> > 
> > I umcommented out the .dll files and I get undefined variable for
> > 
> > mssql_connect()
> > 
> > Now there is barely any documentation on this and the tech support has
> 
> > gotten me ZERO results, I am hoping since this is a WINDOWS PHP list 
> > that someone will be able to help me.
> > 
> > I am running Win2k Server IIS5, MS SQL Server7
> > 
> > Anyone?
> > 
> > Next is Oracle...anyone with answers on that?  LOL!!
> > 
> > 
> > 
> > --
> > 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 ---
The SQL Server 7 is local so I don't need the client software.  I looked
at that so-called explanation, and doesn't explain anything

-----Original Message-----
From: Frank M. Kromann [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 14, 2002 11:41 AM
To: Todd Williamsen
Cc: [EMAIL PROTECTED]
Subject: Re: RE: [PHP-WIN] Getting PHP to behave with MS SQL Server 7


Hi Todd,

This is documented on http://www.php.net/manual/en/ref.mssql.php.

The client libraries is found on the MS SQL Server CD and if you are
running PHP on the same box as the MS SQL Server is installed you have
all you need. If you are connecting to a remote MS SQL Server you need
to install the client tools on the PHP box.

- Frank

> Frank,
> 
> I reinstalled PHP and it doesn't like me or my configuration very 
> well. PHP is installed as CGI.  I tried ISAPI filters, but that 
> crapped out too.  Yes, I have rebooted, restarted the services many 
> many times and still doesn't work.
> 
> What do you mean client libraries?
> 
> I see this mentioned, but I don't get what they are asking, and what 
> files are they?  How come PHP didn't document this or did they just 
> whip up the documentation for MS SQL?
> 
> -----Original Message-----
> From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 5:48 PM
> To: Todd WIlliamsen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Getting PHP to behave with MS SQL Server 7
> 
> 
> Hi Todd,
> 
> If you are using the ISAPI version you need to restart the web server 
> in order to use the mssql_extension.
> 
> If you are using CGI and getting undefined function for mssql_connect,

> you might have more than one php.ini file on your system ?
> 
> You also need to install the client libraries for mssql server. These 
> can be found on the server CD, or you can copy ntwdblib.dll from the 
> server to your cplient pc (the pc running your php scripst).
> 
> - Frank
> 
> 
> > Ok, I followed the instructions very closely, to what vague
> > instruction there are.
> > 
> > I umcommented out the .dll files and I get undefined variable for
> > 
> > mssql_connect()
> > 
> > Now there is barely any documentation on this and the tech support 
> > has
> 
> > gotten me ZERO results, I am hoping since this is a WINDOWS PHP list
> > that someone will be able to help me.
> > 
> > I am running Win2k Server IIS5, MS SQL Server7
> > 
> > Anyone?
> > 
> > Next is Oracle...anyone with answers on that?  LOL!!
> > 
> > 
> > 
> > --
> > 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 ---
Todd,

We're running the exact configuration you speak of and I can attest that
there are no problems with the module that Franks works on or with PHP. I'd
be happy to help, so if you could provide some details, that would help.

The first thing I would check is to make sure that the php_mssql.dll module
is installed correctly. You can do this by creating a simple script with

php_info();

and load that file in your browser. That will tell you if the module is
loading and what version is running. 

As Frank said, the client libraries need to be installed, but since you're
running locally, that probably isn't the problem.

php_info() should return that MS SQL is installed under the WDDX info or
somewhere near there. It will then give you a whole bunch of information
about the module. If that shows up, then there is something wrong with your
connection script or permission to SQL server.

Let me know and I'll be glad to help. I can assure you that the module works
very very well in CGI mode.

-Flint

-----Original Message-----
From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 10:18 AM
To: 'Frank M. Kromann'
Cc: [EMAIL PROTECTED]
Subject: RE: RE: [PHP-WIN] Getting PHP to behave with MS SQL Server 7


The SQL Server 7 is local so I don't need the client software.  I looked
at that so-called explanation, and doesn't explain anything

-----Original Message-----
From: Frank M. Kromann [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 14, 2002 11:41 AM
To: Todd Williamsen
Cc: [EMAIL PROTECTED]
Subject: Re: RE: [PHP-WIN] Getting PHP to behave with MS SQL Server 7


Hi Todd,

This is documented on http://www.php.net/manual/en/ref.mssql.php.

The client libraries is found on the MS SQL Server CD and if you are
running PHP on the same box as the MS SQL Server is installed you have
all you need. If you are connecting to a remote MS SQL Server you need
to install the client tools on the PHP box.

- Frank

> Frank,
> 
> I reinstalled PHP and it doesn't like me or my configuration very 
> well. PHP is installed as CGI.  I tried ISAPI filters, but that 
> crapped out too.  Yes, I have rebooted, restarted the services many 
> many times and still doesn't work.
> 
> What do you mean client libraries?
> 
> I see this mentioned, but I don't get what they are asking, and what 
> files are they?  How come PHP didn't document this or did they just 
> whip up the documentation for MS SQL?
> 
> -----Original Message-----
> From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 5:48 PM
> To: Todd WIlliamsen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Getting PHP to behave with MS SQL Server 7
> 
> 
> Hi Todd,
> 
> If you are using the ISAPI version you need to restart the web server 
> in order to use the mssql_extension.
> 
> If you are using CGI and getting undefined function for mssql_connect,

> you might have more than one php.ini file on your system ?
> 
> You also need to install the client libraries for mssql server. These 
> can be found on the server CD, or you can copy ntwdblib.dll from the 
> server to your cplient pc (the pc running your php scripst).
> 
> - Frank
> 
> 
> > Ok, I followed the instructions very closely, to what vague
> > instruction there are.
> > 
> > I umcommented out the .dll files and I get undefined variable for
> > 
> > mssql_connect()
> > 
> > Now there is barely any documentation on this and the tech support 
> > has
> 
> > gotten me ZERO results, I am hoping since this is a WINDOWS PHP list
> > that someone will be able to help me.
> > 
> > I am running Win2k Server IIS5, MS SQL Server7
> > 
> > Anyone?
> > 
> > Next is Oracle...anyone with answers on that?  LOL!!
> > 
> > 
> > 
> > --
> > 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 ---
I have a DB extraction class I wrote that supports both MySQL and MSSQL (and
can be easily extended to support others).

My class is also called DB.

<?
define( "MSSQL_DB", 1);
define( "MYSQL_DB",2);
class DB
{
 var $db_type;
function DB($type)
 {
  $this->db_type = $type;  ## the type of database connecting to: mssql or
mysql.
 }
 function connect($host,$un,$pw)
 { ##....
   return $link
 }
 function select_db($dbname)
 {
  ##....
  return $dblink;
 }
 ## ...
} // end class DB
?>


To instantiate a class, you have to use "new"

$db = new DB(MSSQL_DB);  #
$link = $db->connect($host,$un,$pw);
$dblink = $db->select_db($dbname);

The syntax below:

> $conn = DB::Connect($connstr);
> $conn->query($sql);

Is that it? Because maybe that is a form of using the class statically (??
reminds me of Java).



"Brian Feliciano" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i've seen a code like this...
> -----------
> $conn = DB::Connect($connstr);
> $conn->query($sql);
> -----------
> i think this is from PEAR's DB abstraction layer..
> but my problem is, i don't know how to create a class
> like the 'DB'. I tried to, but i failed.
>
> How can i create an instance of a class without using
> "new" ?
>
>
>
>
>
>
> --
> =============================
> B r i a n   F e l i c i a n o
> =============================
> Server Administrator
> The Websense Group Co.
> -----------------------------
> Unit 103 Terris Villa Sikap St.
> Mandaluyong City, Philippines
> Tel. No.: (632) 7462449
> Fax. No.: (632) 7462482
> Mobile Phone No.: +639176189153


--- End Message ---
--- Begin Message ---
Greetings,

I had an extra browser window created with the HTML <TARGET=_blank> 
attribute. I would like to be able to automatically close it by sending some kind 
of header via PHP. Is there such a way, or do I have to ask the user to close it 
manually?

Symeon Charalabides (cosmopolitan trainee)
------------------------------------------
http://www.webmate.gr

--- End Message ---
--- Begin Message ---
Hey guys and gals,

I was wondering if any of you know of resouces that would help me plan for a
large deployment. I guess I need to know how much hardward I would need to
support x users per y time. How much PHP can take and how much SQL server
can take, etc. I've never really thought about stuff like that and would
like to know.

Thanks,

-Flint


--- End Message ---
--- Begin Message ---
A big HELLO to php-windows,

Having some problems with file uploads, hope someone can help.

Using php4.0.3pl1 I have a program that collects a file name and tries to upload
it. Syntax is same as that in the manual.

This works fine locally (on localhost) and the file is 'transferred' across my
hard drive.

When i upload the propram/page everything works the same except the following
command returns false (it's really all on one line):

        move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'],
              "uploads/".$HTTP_POST_FILES['userfile']['name'])

$HTTP_POST_FILES is in the global list at the start of the function and I know
it's correct because it works locally.

The only thing I'm not sure about is the path that i'm moving to.

"uploads" is a sub-directory off the directory where my php file lives.

I've also tried /downloads/uploads, /web/downloads/uploads but with no luck.

So, anybody able to help? Please :)

-- 
Cheers,
Neil


--- End Message ---
--- Begin Message ---
Hello Neil,

Thursday, February 14, 2002, 9:25:20 PM, you wrote:

NH> Having some problems with file uploads, hope someone can help.

Check the permissions on the directory you are trying to copy to.

Doh!

Talking to myself again!!!!!!

-- 
Cheers,
Neil


--- End Message ---
--- Begin Message ---
Hello there!

Does anyone know about how to run extern program in php?
(windows,apache,php)

I tried it using exec(), system() etc.... functions
 but unfortunally it did't work well.

here is my test code
 => exec(getenv("COMSPEC")." /C run.exe");

Thanks in advance.
----------------------------------------
suk-joeng



--- End Message ---
--- Begin Message ---
try this:

exec(getenc("COMSPEC"). "c:\path\to\.exe\file");
"ÆÄ¶ûÀÚÀü°Å" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello there!
>
> Does anyone know about how to run extern program in php?
> (windows,apache,php)
>
> I tried it using exec(), system() etc.... functions
>  but unfortunally it did't work well.
>
> here is my test code
>  => exec(getenv("COMSPEC")." /C run.exe");
>
> Thanks in advance.
> ----------------------------------------
> suk-joeng
>
>
>


--- End Message ---
--- Begin Message ---
Warning: Undefined index: ReqNum in
c:\inetpub\wwwroot\recruiter\show_job.php on line 25


What does this error mean?

I get it from this code...

$sql = "SELECT ReqNum, Industry, Other, JobTitle, Description, Location,
Notes FROM $jobtable WHERE id = '$id'";
    $result = @mysql_query($sql, $connection) or die("Couldn't execute
query.");
    while ($row = mysql_fetch_array($result))

  $ReqNum = $row['ReqNum']; <=============== LINE 25
  $Industry = $row['Industry'];
  $Other = $row['Other'];
  $JobTitle = $row['JobTitle'];
  $Description = $row['Description'];
  $Location = $row['Location'];
  $Notes = $row['Notes'];
the weird thing is that everything else works, why doesn't it like this
value?


--- End Message ---

Reply via email to