php-windows Digest 1 Feb 2002 17:10:11 -0000 Issue 980

Topics (messages 11762 through 11775):

Re: PHP INSTALL FILES
        11762 by: Oliver Cronk
        11763 by: Oliver Cronk
        11764 by: Oliver Cronk
        11765 by: Oliver Cronk

gethostbyname renvoie... un nom!
        11766 by: Sébastien Thüler
        11769 by: Piotr Pluciennik

Plot Graphs by PHP...
        11767 by: GreatKent
        11772 by: Kjartan Mannes

Loading TTF
        11768 by: Sichta Daniel

Sorry. It seems I need to sleep more ;)
        11770 by: Sébastien Thüler
        11771 by: Kjartan Mannes

Thanks for the help. It works now!
        11773 by: Sébastien Thüler

Re:[PHP-WIN] UNC path as a link
        11774 by: Michel Laine
        11775 by: Nicole Amashta

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 ---
Not 100% sure what you mean!  It could be that IIS is configured to use
Integrated Security (i.e. server / domain usernames and passwords are
required to gain access) if this is the case then go into IIS MMC and change
the options for the web site (eg allow anonymous access)

Hope that helps - if not then elaborate on what the problem is.

Cheers

Ollie


"Josh Seward" <[EMAIL PROTECTED]> wrote in message
news:<003401c1aaa3$e5c700a0$9400a8c0@wisestructures>...
I have setup php on IIS. The site host machine is different from the machine
running php, mysql. I have setup provisions on all folders and files I think
are needed. php.exe (Folder) php.ini php4ts.dll

Is there something I am leaving out or forgetting? I cannot access php files
without entering a username password.

Thanks for any help!



----------


--- End Message ---
--- Begin Message ---
Could be then that the scripts need their permission's changing (as you
created the scripts you own the scripts) right click on them in explorer and
choose properties, then have a look at the permissions tab, you are going to
want to give everyone access to execute them I believe.

Alternatively it could be that you own the PHP.exe service (the main PHP
engine) so check the PHP files, and folders for a similar permissions
problem.

You will know if you need to change permissions if you appear to be the only
user who can access the files (i.e. try logging in as someone else and see
if you can get to the files).

Hope that helps - this is appears to be an NTFS issue really.

Cheers

Ollie Cronk

-----Original Message-----
From: Josh Seward [mailto:[EMAIL PROTECTED]]
Sent: 01 February 2002 08:15
To: [EMAIL PROTECTED]
Subject: Re: PHP INSTALL FILES


the problem is. When I run php scripts I have to login.


----- Original Message -----
From: "Oliver Cronk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 8:49 PM
Subject: Re: PHP INSTALL FILES


> Not 100% sure what you mean!  It could be that IIS is configured to use
> Integrated Security (i.e. server / domain usernames and passwords are
> required to gain access) if this is the case then go into IIS MMC and
change
> the options for the web site (eg allow anonymous access)
>
> Hope that helps - if not then elaborate on what the problem is.
>
> Cheers
>
> Ollie
>
>
> "Josh Seward" <[EMAIL PROTECTED]> wrote in message
> news:<003401c1aaa3$e5c700a0$9400a8c0@wisestructures>...
> I have setup php on IIS. The site host machine is different from the
machine
> running php, mysql. I have setup provisions on all folders and files I
think
> are needed. php.exe (Folder) php.ini php4ts.dll
>
> Is there something I am leaving out or forgetting? I cannot access php
files
> without entering a username password.
>
> Thanks for any help!
>
>
>
> ----------
>
>
>


--- End Message ---
--- Begin Message ---
Hmmm ok, I'll have a think about this one and get back to you I could still
do with some clarification however:

Explain exactly what the problem is again so I understand a bit better - at
the moment I think either:
A. you can't see the results of scripts unless you are running them locally
(via the web browser on your win2000 server) and the system is logged in as
you
OR B. that you can't run scripts unless you login to the server via a HTTP
authentication browser prompt.  Which of these is it (or is it neither!)

Do you make use of any db stuff?  What are any error messages you receive?

When you say virtual host you mean an IIS virtual directory?  I am also
presuming you are using IIS and NOT apache?

I still think this could be an IIS issue (the directory security tab not
being setup correctly) if its problem B if its problem A then its got to be
file / service permissions.

Ollie

-----Original Message-----
From: Josh Seward [mailto:[EMAIL PROTECTED]]
Sent: 01 February 2002 10:27
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] RE: PHP INSTALL FILES


I have set promissions for every dir and file I am aware of. I have setup
php successfully on my win2000 machine. Although this setup is on win2000
and will be acccessed through a virtual host. Again I have set promitions
for the php dir and its files. php.exe, php.ini, phpt4s.dll Are there others
I am not aware of. I set promitions to allow web users by the way.


Thanks,

Josh Seward
[EMAIL PROTECTED]

----- Original Message -----
From: "Oliver Cronk" <[EMAIL PROTECTED]>
To: "Josh Seward" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 9:39 PM
Subject: [PHP-WIN] RE: PHP INSTALL FILES


> Could be then that the scripts need their permission's changing (as you
> created the scripts you own the scripts) right click on them in explorer
and
> choose properties, then have a look at the permissions tab, you are going
to
> want to give everyone access to execute them I believe.
>
> Alternatively it could be that you own the PHP.exe service (the main PHP
> engine) so check the PHP files, and folders for a similar permissions
> problem.
>
> You will know if you need to change permissions if you appear to be the
only
> user who can access the files (i.e. try logging in as someone else and see
> if you can get to the files).
>
> Hope that helps - this is appears to be an NTFS issue really.
>
> Cheers
>
> Ollie Cronk
>
> -----Original Message-----
> From: Josh Seward [mailto:[EMAIL PROTECTED]]
> Sent: 01 February 2002 08:15
> To: [EMAIL PROTECTED]
> Subject: Re: PHP INSTALL FILES
>
>
> the problem is. When I run php scripts I have to login.
>
>
> ----- Original Message -----
> From: "Oliver Cronk" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, January 31, 2002 8:49 PM
> Subject: Re: PHP INSTALL FILES
>
>
> > Not 100% sure what you mean!  It could be that IIS is configured to use
> > Integrated Security (i.e. server / domain usernames and passwords are
> > required to gain access) if this is the case then go into IIS MMC and
> change
> > the options for the web site (eg allow anonymous access)
> >
> > Hope that helps - if not then elaborate on what the problem is.
> >
> > Cheers
> >
> > Ollie
> >
> >
> > "Josh Seward" <[EMAIL PROTECTED]> wrote in message
> > news:<003401c1aaa3$e5c700a0$9400a8c0@wisestructures>...
> > I have setup php on IIS. The site host machine is different from the
> machine
> > running php, mysql. I have setup provisions on all folders and files I
> think
> > are needed. php.exe (Folder) php.ini php4ts.dll
> >
> > Is there something I am leaving out or forgetting? I cannot access php
> files
> > without entering a username password.
> >
> > Thanks for any help!
> >
> >
> >
> > ----------
> >
> >
> >
>
>
>
> --
> 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]
>



--- End Message ---
--- Begin Message ---
It HAS to be an IIS thing (as I actually set this functionality up for an
intranet server - i.e. security abstracted from the application via the NT
domain - very neat for an intranet but VERY annoying for you right now....

go to the IIS management console (my quick way is to right click on the my
computer icon and select manage and then work my way down the tree
(services->IIS (right at the bottom)....

... right you should now have the IIS Ms Management console on your screen
with the tree on the left with something like web service, ftp service mail
service etc...

... ok go to the virtual host you setup (not quite sure why you used a
virtual host in this situation (is it another server?) ... then right click
select properties, then select directory security then select the anonymous
access / auth control edit box....

... on the next screen make sure anonymous access is selected AND basic
authentication and integrated windows auth are unchecked ... then apply the
changes and apply them to the child directories if prompted

And hopefully that will fix it (if not i haven't a fecking clue!) as it
works for me (although I don't use virtual directories) and I've used Win
NT4 Svr, Win2k Pro, Win2K Server and WinXP Pro with IIS 4/5/5.1, with this
security on and off!

Sorry if you have already tried the above!

Ollie

-----Original Message-----
From: Josh Seward [mailto:[EMAIL PROTECTED]]
Sent: 01 February 2002 10:51
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] RE: PHP INSTALL FILES


exactly this:
 B. that you can't run scripts unless you login to the server via a HTTP
authentication browser prompt

Once I login the scripts run fine!

without php http://132.235.75.117

with php http://132.235.75.117/php

This http://132.235.75.117 (server A) is a different server than this
http://132.235.75.117/php (server B) if that helps in explaining it at all.

Hope this info helps. I really appreciate your help.
Thanks again,


----- Original Message -----
From: "Oliver Cronk" <[EMAIL PROTECTED]>
To: "Josh Seward" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 11:51 PM
Subject: RE: [PHP-WIN] RE: PHP INSTALL FILES


> Hmmm ok, I'll have a think about this one and get back to you I could
still
> do with some clarification however:
>
> Explain exactly what the problem is again so I understand a bit better -
at
> the moment I think either:
> A. you can't see the results of scripts unless you are running them
locally
> (via the web browser on your win2000 server) and the system is logged in
as
> you
> OR B. that you can't run scripts unless you login to the server via a HTTP
> authentication browser prompt.  Which of these is it (or is it neither!)
>
> Do you make use of any db stuff?  What are any error messages you receive?
>
> When you say virtual host you mean an IIS virtual directory?  I am also
> presuming you are using IIS and NOT apache?
>
> I still think this could be an IIS issue (the directory security tab not
> being setup correctly) if its problem B if its problem A then its got to
be
> file / service permissions.
>
> Ollie
>
> -----Original Message-----
> From: Josh Seward [mailto:[EMAIL PROTECTED]]
> Sent: 01 February 2002 10:27
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] RE: PHP INSTALL FILES
>
>
> I have set promissions for every dir and file I am aware of. I have setup
> php successfully on my win2000 machine. Although this setup is on win2000
> and will be acccessed through a virtual host. Again I have set promitions
> for the php dir and its files. php.exe, php.ini, phpt4s.dll Are there
others
> I am not aware of. I set promitions to allow web users by the way.
>
>
> Thanks,
>
> Josh Seward
> [EMAIL PROTECTED]
>
> ----- Original Message -----
> From: "Oliver Cronk" <[EMAIL PROTECTED]>
> To: "Josh Seward" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, January 31, 2002 9:39 PM
> Subject: [PHP-WIN] RE: PHP INSTALL FILES
>
>
> > Could be then that the scripts need their permission's changing (as you
> > created the scripts you own the scripts) right click on them in explorer
> and
> > choose properties, then have a look at the permissions tab, you are
going
> to
> > want to give everyone access to execute them I believe.
> >
> > Alternatively it could be that you own the PHP.exe service (the main PHP
> > engine) so check the PHP files, and folders for a similar permissions
> > problem.
> >
> > You will know if you need to change permissions if you appear to be the
> only
> > user who can access the files (i.e. try logging in as someone else and
see
> > if you can get to the files).
> >
> > Hope that helps - this is appears to be an NTFS issue really.
> >
> > Cheers
> >
> > Ollie Cronk
> >
> > -----Original Message-----
> > From: Josh Seward [mailto:[EMAIL PROTECTED]]
> > Sent: 01 February 2002 08:15
> > To: [EMAIL PROTECTED]
> > Subject: Re: PHP INSTALL FILES
> >
> >
> > the problem is. When I run php scripts I have to login.
> >
> >
> > ----- Original Message -----
> > From: "Oliver Cronk" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Thursday, January 31, 2002 8:49 PM
> > Subject: Re: PHP INSTALL FILES
> >
> >
> > > Not 100% sure what you mean!  It could be that IIS is configured to
use
> > > Integrated Security (i.e. server / domain usernames and passwords are
> > > required to gain access) if this is the case then go into IIS MMC and
> > change
> > > the options for the web site (eg allow anonymous access)
> > >
> > > Hope that helps - if not then elaborate on what the problem is.
> > >
> > > Cheers
> > >
> > > Ollie
> > >
> > >
> > > "Josh Seward" <[EMAIL PROTECTED]> wrote in message
> > > news:<003401c1aaa3$e5c700a0$9400a8c0@wisestructures>...
> > > I have setup php on IIS. The site host machine is different from the
> > machine
> > > running php, mysql. I have setup provisions on all folders and files I
> > think
> > > are needed. php.exe (Folder) php.ini php4ts.dll
> > >
> > > Is there something I am leaving out or forgetting? I cannot access php
> > files
> > > without entering a username password.
> > >
> > > Thanks for any help!
> > >
> > >
> > >
> > > ----------
> > >
> > >
> > >
> >
> >
> >
> > --
> > 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]
> >
>
>
>
>


--- End Message ---
--- Begin Message ---
Salut à tous!

Le manuel indique sous gethostbyname() : "Retourne l'adresse IP
correspondant à un hôte"
Mon but est d'obtenir l'adresse IP depuis le nom d'hôte, donc j'ai naïvement
décidé de tenter ceci :
$adresse = gethostbyname("http://www.blizzard.com";);

Et $adresse contient, bien évidemment (?) la valeur http://www.blizzard.com
!

Quelqu'un a une idée sur la manière de procéder (et pourrait m'en faire
profiter :) ?

-Sébastien


--- End Message ---
--- Begin Message ---
English please... :-)

 --- Sébastien Thüler <[EMAIL PROTECTED]> wrote: >
Salut à tous!
> 
> Le manuel indique sous gethostbyname() : "Retourne
> l'adresse IP
> correspondant à un hôte"
> Mon but est d'obtenir l'adresse IP depuis le nom
> d'hôte, donc j'ai naïvement
> décidé de tenter ceci :
> $adresse = gethostbyname("http://www.blizzard.com";);
> 
> Et $adresse contient, bien évidemment (?) la valeur
> http://www.blizzard.com
> !
> 
> Quelqu'un a une idée sur la manière de procéder (et
> pourrait m'en faire
> profiter :) ?
> 
> -Sébastien
> 
> 
> 
> -- 
> 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]
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
Hi all, I wonder if PHP4 can plot graphs based on input formulas?


--- End Message ---
--- Begin Message ---
Wednesday, January 31, 2001, 7:16:23 AM, GreatKent wrote:
> Hi all, I wonder if PHP4 can plot graphs based on input formulas?

Should be possible using the gd lib functions:

http://www.php.net/manual/en/ref.image.php

-- 
Kjartan <[EMAIL PROTECTED]> (http://natrak.net/)
:: "Scandisk is now checking your hard disk. You can start
    praying."

--- End Message ---
--- Begin Message ---
Hi,
cfg: w2k, apache 1.3.20. php 4.0.6, gd version 2.0 or higher (that's what
phpinfo() say's !!)
Here is my problem:
 
test.php
1<?
2  $bounds = ImageTTFBBox(18, 0, "c:/winnt/fonts/arialbd.ttf", "W");
 
Warning: Could not find/open font in c:\test.php on line 2
 
1. I check that font path and font is there
2. I have permission to read that file.
 
What could be a problem ??
 
 
Thank's in advance !!
 
Dan

 

 

--- End Message ---
--- Begin Message ---
Woops, sorry! I didn't even notice that ;)

My problem is concerning gethostbyname() function. The PHP manual (French
version ;) states that function "returns IP address of host".
So I tried the following :

 $adresse = gethostbyname("http://www.blizzard.com";);

to get the IP address of http://www.blizzard.com in $adresse.

The funny thing is that $adresse contains 'http://www.blizzard.com' !

Anyone could help ?

-Sébastien


--- End Message ---
--- Begin Message ---
Friday, February 1, 2002, 3:46:20 PM, Sébastien Thüler wrote:
> Woops, sorry! I didn't even notice that ;)

> My problem is concerning gethostbyname() function. The PHP manual (French
> version ;) states that function "returns IP address of host".
> So I tried the following :

>  $adresse = gethostbyname("http://www.blizzard.com";);

> to get the IP address of http://www.blizzard.com in $adresse.

> The funny thing is that $adresse contains 'http://www.blizzard.com' !

> Anyone could help ?

If gethostbyname() fails to resolve the host it returns the hostname.

<?php
$hostname = "www.blizzard.com"
if (gethostbyname($hostname) == $hostname) {
  print "Unable to resolve";
}
?>

Also you have to remove the http:// part as it only takes the host, not
urls as parameters.

-- 
Kjartan <[EMAIL PROTECTED]> (http://natrak.net/)
:: "Press any key... no, no, no, NOT THAT ONE!"

--- End Message ---
--- Begin Message ---
Woohoo! It's working now!
Thanks for your help!

-Séb


--- End Message ---
--- Begin Message ---
I don't have any solution to your proble, but as i look at this code my first
reaction is:
Isn't it possible to use the ' ' character to encapsulate strings in some
places - so you don't have to escape all slashes?
If you don't have any variables or code inside the " " that needs to be parsed
it should work with ' '.

This would give a more clean code.

Just my 2 cents worth.
--

Michel Laine



Nicole Amashta wrote:

> Hello. Anyone familiar with making a unc path linkable on a webpage? I want
> to be able to create links to directories over the network using UNC paths.
> I am generating the paths dynamically.
>
> Win2k / Apache / PHP 4
>
> Here is an example of what I've got so far:
>
> <snip>
> require("incs/FileSystem.inc");
> require("incs/template.inc");
>
> $fs = new FileSystem();      // a file class i wrote to wrap php file
> functions, and more...
> $t = new Template();          // phplib template object
>
> $t->set_file( "page", "abolftpdirs.htm" );
> $t->set_file( "row", "row_abolftp.ihtml" );
>
> $custMan = array( "description" => "Customer data for ",
>                   "path"        => "R:\\Data\\Customer",
>                   "unc"         => "\\\\abolftp\\FTP\\Data\\Customer" );
>
> $customers = $fs->getList( $custMan["path"], FS_DIR );
> $total = count($customers);
> for($i=0; $i<$total; $i++)
> {
>  $unc = $custMan["unc"] . "\\" . basename( $customers[$i] ) . "file://\\in;
>
>  $path = str_replace("\\","/", $custMan["path"] . "\\" .
> asename( $customers[$i] ) . "\\in" );
>
> // this i will create a link, but i want it to be a network link and not an
> http link.
>  $descr = "<a href=\"$unc\" target=\"_blank\"
> onMouseOver=\"defaultStatus='$unc';return true;\"
> onMouseOut=\"defaultStatus='';return true;\">" . $custMan["description"] .
> basename( $customers[$i] ) . "</a>";
>
>  $fcount = $fs->fileCount( $path, FS_FILE );
>
>  $oldest_moddate = getOldestDate( &$fs, $path );
>
>  $t->set_var( "description", $descr );
>  $t->set_var( "oldest_moddate", $oldest_moddate );
>  $t->set_var( "fcount", $fcount );
>  $t->parse( "rows", "row", true );
> }
>
> $t->parse("out","page");
> $t->p("out");
>
> function getOldestDate( $fs, $path )
> {
>  // code left out; but this returns a unix timestamp of the file with the
> oldest mod. date
> }
> </snip>
>
> The part I am concerned with is creating a UNC link that actually works.  I
> escapped the \ with \, thus: \\ for each \.
>
> HELP !! :)
> TIA!
> --
> Nicole Amashta
> www.aeontrek.com

--- End Message ---
--- Begin Message ---
Thanks for the tip. I hadn't thought of it like that. Thanks and I'll try
that in case it works.

Nicole A.
www.aeontrek.com


"Michel Laine" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I don't have any solution to your proble, but as i look at this code my
first
> reaction is:
> Isn't it possible to use the ' ' character to encapsulate strings in some
> places - so you don't have to escape all slashes?
> If you don't have any variables or code inside the " " that needs to be
parsed
> it should work with ' '.
>
> This would give a more clean code.
>
> Just my 2 cents worth.
> --
>
> Michel Laine
>
>
>
> Nicole Amashta wrote:
>
> > Hello. Anyone familiar with making a unc path linkable on a webpage? I
want
> > to be able to create links to directories over the network using UNC
paths.
> > I am generating the paths dynamically.
> >
> > Win2k / Apache / PHP 4
> >
> > Here is an example of what I've got so far:
> >
> > <snip>
> > require("incs/FileSystem.inc");
> > require("incs/template.inc");
> >
> > $fs = new FileSystem();      // a file class i wrote to wrap php file
> > functions, and more...
> > $t = new Template();          // phplib template object
> >
> > $t->set_file( "page", "abolftpdirs.htm" );
> > $t->set_file( "row", "row_abolftp.ihtml" );
> >
> > $custMan = array( "description" => "Customer data for ",
> >                   "path"        => "R:\\Data\\Customer",
> >                   "unc"         => "\\\\abolftp\\FTP\\Data\\Customer" );
> >
> > $customers = $fs->getList( $custMan["path"], FS_DIR );
> > $total = count($customers);
> > for($i=0; $i<$total; $i++)
> > {
> >  $unc = $custMan["unc"] . "\\" . basename( $customers[$i] ) .
"file://\\in;
> >
> >  $path = str_replace("\\","/", $custMan["path"] . "\\" .
> > asename( $customers[$i] ) . "\\in" );
> >
> > // this i will create a link, but i want it to be a network link and not
an
> > http link.
> >  $descr = "<a href=\"$unc\" target=\"_blank\"
> > onMouseOver=\"defaultStatus='$unc';return true;\"
> > onMouseOut=\"defaultStatus='';return true;\">" . $custMan["description"]
.
> > basename( $customers[$i] ) . "</a>";
> >
> >  $fcount = $fs->fileCount( $path, FS_FILE );
> >
> >  $oldest_moddate = getOldestDate( &$fs, $path );
> >
> >  $t->set_var( "description", $descr );
> >  $t->set_var( "oldest_moddate", $oldest_moddate );
> >  $t->set_var( "fcount", $fcount );
> >  $t->parse( "rows", "row", true );
> > }
> >
> > $t->parse("out","page");
> > $t->p("out");
> >
> > function getOldestDate( $fs, $path )
> > {
> >  // code left out; but this returns a unix timestamp of the file with
the
> > oldest mod. date
> > }
> > </snip>
> >
> > The part I am concerned with is creating a UNC link that actually works.
I
> > escapped the \ with \, thus: \\ for each \.
> >
> > HELP !! :)
> > TIA!
> > --
> > Nicole Amashta
> > www.aeontrek.com
>


--- End Message ---

Reply via email to