php-windows Digest 3 Nov 2001 06:56:10 -0000 Issue 835

Topics (messages 10175 through 10201):

Re: Connecting to a database
        10175 by: Svensson, B.A.T.

Re: File does not exist: CGI error?
        10176 by: Thomas Juntunen
        10180 by: Ross Fleming
        10188 by: Thomas Juntunen

Apache, PHP and MySQL on WinXP
        10177 by: sven_erik.andersen.as
        10191 by: Sebastian Bergmann

Re: ADODB - FieldCount?  Where is it????
        10178 by: MrBaseball34
        10179 by: Asendorf, John
        10185 by: MrBaseball34
        10186 by: MrBaseball34
        10189 by: John Lim
        10194 by: Asendorf, John

Creating dns via code...
        10181 by: Christian

Apache 1.3.22 / PHP 4.0.6 on win nt 4.0 sp 6a
        10182 by: Karl Pietri

Re: File Upload on Win2K
        10183 by: Bryant Brabson
        10190 by: Thomas Juntunen
        10193 by: Joseph Koenig

Loading any php file runs inetinfo.exe utilization to 99%
        10184 by: MrBaseball34
        10187 by: MrBaseball34

Wrong date stamp with mail()
        10192 by: Ralph Nicovich
        10201 by: anch.org

Error 'Failed opening ...' when using include command
        10195 by: Art Bowles

forcing variable declaration
        10196 by: Tim Foster

PWS and PHP
        10197 by: Dan the Man

log-in system
        10198 by: GreatKent

Re: Can I rotate a gif with PHP
        10199 by: Robert Trembath

Re: [PHP-DB] RE: [PHP-WIN] Can I rotate a gif with PHP
        10200 by: Pierre-Alain Joye

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]


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


What about the good old RTFM apporach, to start with? ;)

-----Original Message-----
From: Ross Fleming
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 2001-11-02 01:11
Subject: RE: [PHP-WIN] Connecting to a database

What database are you using?  There are several you can use.
mssql, mysql, postgresql to name a few.  Also, what system are you using
(Windows 9x, 2K etc) and which server are you running?  Let us know and
we'll probably be able to get you up and running

Ross

-----Original Message-----
From: Raoul Snyman [mailto:[EMAIL PROTECTED]]
Sent: 01 November 2001 23:04
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Connecting to a database


Hi,

I'm a newbie and I'd like to know how to connect to a database. what
goes in
the hostname, username, etc. parameters, and how to use that connected
db.

Thanks
Raoul Snyman


-- 
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 11/02/01 05:52, "Hace" <[EMAIL PROTECTED]> wrote:

> Why does IIS sent everything that ends with ".php" to the PHP-parser,
> even if the file does not exist on my server?????
> 
That is the way IIS works. You can go back into the properties of the web
site and make sure the box for "Check if file exists" is checked. Then you
will get a standard 404 error for nonexistent files.

I also suggest reading:
http://www.php.net/manual/en/features.error-handling.php

To see what else you can do about controlling errors and their output.

HTH,
Thomas Juntunen
Network Administrator
Creative Resource Center





How do you do the same in Apache out of interest?..

Ross

Thomas Juntunen wrote:
> 
> On 11/02/01 05:52, "Hace" <[EMAIL PROTECTED]> wrote:
> 
> > Why does IIS sent everything that ends with ".php" to the PHP-parser,
> > even if the file does not exist on my server?????
> >
> That is the way IIS works. You can go back into the properties of the web
> site and make sure the box for "Check if file exists" is checked. Then you
> will get a standard 404 error for nonexistent files.
> 
> I also suggest reading:
> http://www.php.net/manual/en/features.error-handling.php
> 
> To see what else you can do about controlling errors and their output.
> 
> HTH,
> Thomas Juntunen
> Network Administrator
> Creative Resource Center
> 
> --
> 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 11/02/01 08:58, "Ross Fleming" <[EMAIL PROTECTED]> wrote:

> How do you do the same in Apache out of interest?..
> 

> Thomas Juntunen wrote:
>> 
>> On 11/02/01 05:52, "Hace" <[EMAIL PROTECTED]> wrote:
>> 
>>> Why does IIS sent everything that ends with ".php" to the PHP-parser,
>>> even if the file does not exist on my server?????
>>> 
>> That is the way IIS works. You can go back into the properties of the web
>> site and make sure the box for "Check if file exists" is checked. Then you
>> will get a standard 404 error for nonexistent files.
>> 

Unfortunately, I know very little about Apache. Maybe someone else will
explain.

Sorry,
Thomas Juntunen
Network Administrator
Creative Resource Center





I am currently running Apache, PHP and MySQL on Win98, but is thinking about 
upgrading to WinXP Pro. Anyone has any experience with running Apache, PHP and 
MySQL on WinXP, and would like to share their experiences? 

Sven-Erik Andersen


-- 
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su




Sven Erik wrote:
> Anyone has any experience with running Apache, PHP and
> MySQL on WinXP, and would like to share their experiences?

  No problems here: Windows XP, Apache 2.0.28-dev, MySQL 3.23.43 and
  PHP 4.2.0-dev. It works, too, with 4.1.0-RC1.

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/                 http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/




In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> I'm getting calls to an undefined function in ADODB called FieldCount but it
> doesn't seem to be in the adodb.inc.php
> 
> Does anyone know where I can find it?
> 

Line 1434 in adodb.inc.php:

function FieldCount() {return $this->_numOfFields;}

Then the _numFields function is defined 
differently depending upon the DB you are using.






Well now I see it, but I don't understand why the function definition
appears **after** function definitions which use it.  But since I'm
including the entire adodb.inc.php file before I use any of the functions
FROM ADODB, it shouldn't be returning an error should it?

I have a common include for these pages that I'm using the adodb.inc.php
functions in and am including the adodb.inc file in a line on this separate
include.  Do I need to be including the adodb.inc.php file  in each separate
page instead?



right now each page of the app starts out with
------

include ('common_include.inc');  //  this include file has a line - include
('adodb.inc.php');


maybe it should be (?)
------

include ('adodb.inc.php');
include ('common_include.inc');





---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -----Original Message-----
> From: MrBaseball34 [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 9:32 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: ADODB - FieldCount? Where is it????
> 
> 
> In article 
> <[EMAIL PROTECTED]>, 
> [EMAIL PROTECTED] says...
> > I'm getting calls to an undefined function in ADODB called 
> FieldCount but it
> > doesn't seem to be in the adodb.inc.php
> > 
> > Does anyone know where I can find it?
> > 
> 
> Line 1434 in adodb.inc.php:
> 
> function FieldCount() {return $this->_numOfFields;}
> 
> Then the _numFields function is defined 
> differently depending upon the DB you are using.
> 
> 
> 
> -- 
> 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]
> 




> Then the _numFields function is defined 
> differently depending upon the DB you are using.

Make that the $_numFields variable errrr "property"






> include ('common_include.inc');  //  this include file has a line - include
> ('adodb.inc.php');
> 
> 
> maybe it should be (?)
> ------
> 
> include ('adodb.inc.php');
> include ('common_include.inc');
> 

That is how I would do it, especially if any functions in common_include
use any adodb functions.




You probably have a syntax error in your SQL. To see why,
set:

$conn->debug = true;

Errors in your SQL will cause $rs = $conn->Execute($sql)
to return false to $rs, causing the problem.


John Asendorf <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm getting calls to an undefined function in ADODB called FieldCount but
it
> doesn't seem to be in the adodb.inc.php
>
> Does anyone know where I can find it?
>
> Thanks,
>
> John
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
>






I wish I had saved the exact code I was having the problem with.  I can't
even remember the exact function which was using the FieldCount subfunction
for it.  Aaargh...

Actually, I think it was in the GetUpdateSQL function.  Perhaps I had messed
up the exact thing you are mentioning... it was my first attempt at using
it.

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -----Original Message-----
> From: John Lim [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 11:59 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: ADODB - FieldCount? Where is it????
> 
> 
> You probably have a syntax error in your SQL. To see why,
> set:
> 
> $conn->debug = true;
> 
> Errors in your SQL will cause $rs = $conn->Execute($sql)
> to return false to $rs, causing the problem.
> 
> 
> John Asendorf <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I'm getting calls to an undefined function in ADODB called 
> FieldCount but
> it
> > doesn't seem to be in the adodb.inc.php
> >
> > Does anyone know where I can find it?
> >
> > Thanks,
> >
> > John
> >
> > ---------------------
> > John Asendorf - [EMAIL PROTECTED]
> > Web Applications Developer
> > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > Licking County, Ohio, USA
> > 740-349-3631
> > Nullum magnum ingenium sine mixtura dementiae fuit
> >
> 
> 
> 
> -- 
> 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]
> 




Hello ;c)

I have looked everywhere.... how can i create a dns to a
db (access in my case) if i cant access the control panel
(i can but i have to drive to work every time :c) There must
be a way to create these via the web/php... i know coldfusion
have this option and it is g8!

Thanks
Christian Charette
www.charetx2.com






Help i have looked far and wide for how to install apache and php on
windows.  i found one and followed it on my workstation (not nt but win 98)
and its all fine and dandy.  so i develop my php app and go to install
apache and php on the live server but it refuses to load the php module

this is what i do
i put the php4ts.dll in the winnt/system32 and reboot
i put the php4apache.dll in <apache>/modules
i put this in the httpd.conf:

LoadModule php4_module modules/php4apache.dll
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

and then i go to load my apache and it says that it cannot find the
module.... (i cant get to the exact error message right now) and it
displayes the whole path right to it.  c:/apache/modules/php4apache.dll
what is going on?  i really need to get this to work or i have a heck of
alot of work ahead of me using iis *shudders*

-Karl









What does your error log say? And what are the permissions on the relevant 
directories? From personal experience I can say that checking these 2 things you can 
quickly resolve the problem.

>Message-ID: <[EMAIL PROTECTED]>
>Date: Thu, 01 Nov 2001 13:25:27 -0600
>From: Joseph Koenig <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>MIME-Version: 1.0
>To: [EMAIL PROTECTED]
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>Subject: Re: [PHP-WIN] File Upload on Win2K
>
>I've been working on this all day and still am no further than I was
>this morning. I'm pulling my hair out. In php.ini, the upload_tmp_dir is
>set to "F:\PHP\uploadtemp", which is right where it should be. When I
>upload a file, if I echo it, I get the path to the file, however, when I
>go into the server to view the file, it's not there. It's nowhere to be
>found. Doing a search on the server won't even bring up the file. It's
>like it's going up to temp and then being removed immediately. If I try
>and move it, it just disappears, too. Is there some funky permissions
>thing or something I'm missing? Thanks (please CC me on all replies),
>
>Joe
>
> > Hi,
> >
> > I know this is a question asked all the time and but this one's got me
> > confused. I'm attempting to have a form upload an image. Simple enough.
> > The file gets moved up to the temp directory just fine. If I echo the
> > file, I get something like "F:\PHP\uploadtemp\php56.tmp", which is right
> > where it should be. Everything is fine till I try to move the uploaded
> > file.





On Thu, 01 Nov 2001 13:25:27 -0600, Joseph Koenig <[EMAIL PROTECTED]> wrote:

>> I've been working on this all day and still am no further than I was
>> this morning. I'm pulling my hair out. In php.ini, the upload_tmp_dir is
>> set to "F:\PHP\uploadtemp", which is right where it should be. When I
>> upload a file, if I echo it, I get the path to the file, however, when I
>> go into the server to view the file, it's not there. It's nowhere to be
>> found. Doing a search on the server won't even bring up the file. It's
>> like it's going up to temp and then being removed immediately. If I try
>> and move it, it just disappears, too. Is there some funky permissions
>> thing or something I'm missing? Thanks (please CC me on all replies),
>> 

Here is an excerpt from Core PHP Programming, by Leon Atkinson (pg 108):

"If you plan on using the file later, move the new file into a permanent
spot. If you do not, PHP will delete the file when it finishes executing the
current page request."

He also provides an example that will delete the file as soon as it is done:

<?php
    // check for file upload
    if(isset($UploadedFile))
    {
        unlink($UploadedFile);
        print("Local File: $UploadedFile <BR>\n");
        print("Name: $UploadedFile_name <BR>\n");
        print("Size: $UploadedFile_size <BR>\n");
        print("Type: $UploadedFile_type <BR>\n");
        print("<HR>\n");
    }
?>
<FORM ENCTYPE="multipart/form-data" ACTION="<? $PHP_SELF ?>" METHOD="post">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="4096">
<INPUT NAME="UploadedFile" TYPE="file">
<INPUT TYPE="submit" VALUE="Upload">


HTH,
Thomas Juntunen
Network Administrator
Creative Resource Center





I am still unable to get this to work. I'm into my 2nd full day of
messing with this and I'm still no further. Is anyone familiar with the
product FileUp by SoftArtisans? Apparently it provides file upload
capabilities for ASP. Is there any chance this is interfering with my
file uploads from PHP, even if I'm not running the executable? Thanks,

Joe

 
> > Hi,
> >
> > I know this is a question asked all the time and but this one's got me
> > confused. I'm attempting to have a form upload an image. Simple enough.
> > The file gets moved up to the temp directory just fine. If I echo the
> > file, I get something like "F:\PHP\uploadtemp\php56.tmp", which is right
> > where it should be. Everything is fine till I try to move the uploaded
> > file.




What could cause loading any php file locally using 
    http://localhost/phpfilename.php 
to run my inetinfo utilization to 99% and bring my system 
to a crawl?







In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> What could cause loading any php file locally using 
>     http://localhost/phpfilename.php 
> to run my inetinfo utilization to 99% and bring my system 
> to a crawl?

Somehow it went away today... Go figure!




Hello,

I have a recent instalation on Win2k using an Apache server.
I am able to use the mail() function but it puts the wrong time on the
mail...

I send mail to the same smtp server as I use for Netscape messenger ...
and netscape properly sets the time sent.

I am at GMT -0800 but the mail gets stamped with GMT +0800 so all the
mail is stamped with a time that is 16 hours earlisr than it was sent
....

Any Ideas ?

-- 
               _  _____________________________________  _
              / )|            Ralph Nicovich           |( \
             / / |               Cal Poly              | \ \
           _( (_ |      San Luis Obispo, CA 93407      | _) )_
          (((\ \>|_/ )_____________________________( \_|</ /)))
          (\\\\ \_/ /                               \ \_/ ////)
           \       /                                 \       /
            \    _/                                   \_    /
            /   /                                       \   \




How about trying GMT +1600?  Ugly solution but hey...

Now for my mail() question.  How to send AUTH info?


"Ralph Nicovich" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I have a recent instalation on Win2k using an Apache server.
> I am able to use the mail() function but it puts the wrong time on the
> mail...
>
> I send mail to the same smtp server as I use for Netscape messenger ...
> and netscape properly sets the time sent.
>
> I am at GMT -0800 but the mail gets stamped with GMT +0800 so all the
> mail is stamped with a time that is 16 hours earlisr than it was sent
> ....
>
> Any Ideas ?
>
> --
>                _  _____________________________________  _
>               / )|            Ralph Nicovich           |( \
>              / / |               Cal Poly              | \ \
>            _( (_ |      San Luis Obispo, CA 93407      | _) )_
>           (((\ \>|_/ )_____________________________( \_|</ /)))
>           (\\\\ \_/ /                               \ \_/ ////)
>            \       /                                 \       /
>             \    _/                                   \_    /
>             /   /                                       \   \






I have a php top score that functions correctly the only thing that does not
work is when I try to use an include command.  I want to display the tope
scores in an existing php page, but when the script runs I get and error

Here is the script

<?php
$filen =
"http://24.114.69.70/phptop/CPella/scores.php?filename=scores/score.sco&scor
esize=10&action=VIEW&viewtype=HTML";
include($filen);
?>

And here is the error

Warning: Failed opening
'http://24.114.69.70/phptop/CPella/scores.php?filename=scores/score.sco&scor
esize=10&action=VIEW&viewtype=HTML' for inclusion (include_path='') in
F:\Flash Experiments\PHP Top Score\CPella\test.php on line 10

I though it may have something to do with the include path in my PHP.INI
script so I added this to it

F:\Flash Experiments\PHP Top Score\CPella\

but still nothing.  What am I doing wrong.  If I copy the string into the
address bar, it works fine, and opens so what gives.

Thanks






I've looked at the manual and php.ini file, but can't find what I'm looking for.


Is there a way to make PHP force that variables be declared?


(In VBScript, variables do not have to be declared unless "OPTION EXPLICIT" appears at 
the
top of the script. I'm wondering if PHP has an equivalent).

I hate it when a typo creates a variable at run time and the script continues (and
produces unwanted results).

Thanks.

TIM
-My definition of a free society is a society where it is safe
to be unpopular. -Adlai E. Stevenson





Hi can anybody point me in the right direction to get PWS and PHP working.
Ive use to PHP but never set it up on a system only ever used it on my ISP.
PWS works fine and ive installed PHP but not sure how to get it to parse the
files?

Thanks in advance

Dan






Hi guys,
I have an idea of making a log-in system, that's making a directory(include
all files inside) not accessible to others unless they log-into my system. I
wonder if it is possible to acheive it by using PHP4?
Thanking you in advance.

Kent







Hello Everyone,

I am generating some analylitical reports from a database using S-Plus
that produce a gif and then calling that gif as part of the report. But
I need to rotate this gif 90 degrees CW.

Can I do that with PHP?

Platform
---------
W2K
MySQL
PHP 4.04

Let me clarify this. The app is written in PHP and I cannot find
anything that references rotating an image in the PHP docs. There is
some reference to rotating images in a pdf with PHP, but nothing else.

Anyone have any ideas?

--------------------------
Robert Trembath
Internet Technology Manager
e|[EMAIL PROTECTED] 








> that produce a gif and then calling that gif as part of the report. But
> I need to rotate this gif 90 degrees CW.
> 
> Can I do that with PHP?
> 
> Platform
> ---------
> W2K
> MySQL
> PHP 4.04
> 
> Let me clarify this. The app is written in PHP and I cannot find
> anything that references rotating an image in the PHP docs. There is
> some reference to rotating images in a pdf with PHP, but nothing else.
> 
> Anyone have any ideas?
Take a look at the tool imagemagick http://www.imagemagick.org

It provides a lot of usefull functions (convert, resize, rotate,...) and available for 
w2k.
Just call the command line within the php.

hth,

pa


Reply via email to