php-windows Digest 17 Sep 2001 19:07:09 -0000 Issue 759 Topics (messages 9375 through 9389): Re: extending php (windows) 9375 by: Massimo Foti Re: Getting started - PHP on Win98 9376 by: Michel Laine How can I retreive a users Windows logon name? 9377 by: Christian Sandfeld 9380 by: Christian Sandfeld 9386 by: Frank M. Kromann 9388 by: Christian Sandfeld Re: How to make a script run itself ? 9378 by: Ross Fleming 9382 by: samsom, debra Re: ? tag 9379 by: _lallous Socket +Flash 9381 by: kruk LDAP on Windows Producing Memory Error 9383 by: Graham Morris Re: How can I retrieve a users Windows logon name? 9384 by: Christian Sandfeld 9385 by: Andrian Pervazov Please Help with incorrect Date Code 9387 by: max File uploading 9389 by: Frankie 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] ----------------------------------------------------------------------
"Vimmer" <[EMAIL PROTECTED]> wrote in message > Where can i find some information how to extend php under windows ? > ( ww.zend.com\apidoc - says how to write your own modules under linux ) I am not into C++ but from what I can see you can get some info from: Web Application Development with PHP 4 by Till Gerken, Tobias Ratschiller Textbook Binding - 380 pages (June 2000) New Riders Publishing ISBN: 0735709971 PHP Developer's Cookbook by Sterling Hughes, Andrei Zmievski Paperback - 505 pages (December 2000) Sams ISBN: 0672319241 Massimo
"The X-Powered by:" i believe can be disabled in PHP.INI by setting the parameter that decide wether PHP should reveal itself or not. Just as of now i don't remember exactly which parameter this is, but you should have no trouble finding it in the .INI file. As for your trouble with the Webserver not being accessible when 'online' - i think this is a question of telling your browser to look locally instead of trying via the default route (which is the dialup). Try accessing your webserver by the localhost IP (http://127.0.0.1) Tomas Valusek wrote: > Hello, > > I just downloaded and manually installed PHP 4.0.6 on my Win98 machine. As > long as I use a dial-up connection, no web server is installed. > > I'd like to use PHP as an off-line preprocessor, generating html files to > disk. When I generated my first page, the generated code looked like this: > > X-Powered-By: PHP/4.0.6 > Content-type: text/html > > <html> > <head> > <title>Pokus s PHP</title> > </head> > > <body> > Hi, I'm a PHP script! > </body> > </html> > > As you can see, there are two header lines in the beginning of file, > although I used a -f command-line switch. How can I get rid of these two > lines? > > I also manually added a php file extension association with single action - > Run. I inserted this command line > > c:\php\php.exe -f "%1" >"%1.html" > > and expected to have resulting html in the same folder as a source php > file - but it doesn't work - why? > > I have searched a manual for an explanation, but I've found nothing. Thanks > for any help. > > Tomas Valusek -- Michel Laine Engineer / Network Administrator SYSTEM TECHNOLOGY SWEDEN AB Phone:(+46)-8-982255 Fax:(+46)-8-982060 Snail mail: Vretenvagen 2, 171 54 SOLNA, SWEDEN E-mail: [EMAIL PROTECTED] WWW: http://www.systemtech.se
Hi group, Is there any way I can retreive a users Windows logon name? I'm running a system with IIS 4/PHP 4.0.6/MySQL 3.23.xx. Basicaly what I'm after is some simple way to verify what user is accessing our intranet, without having to prompt the user for his initials. I am aware that this does not provide for much security, but that's ok (I'm not after security, only after a simple user verification). I thank you in advance for your time ;-) /Christian ---------------------------------------------- Christian Sandfeld Zensys A/S ----------------------------------------------
Ertan, Thank you for your speedy reply. I had hoped for some sort of 'pure' PHP solution, but hey, this might work. I will definately give it a try :) Meanwhile, if there are others who have an idea how this could be accomplished through PHP, I would be happy to hear from you. Regards, Christian -----Original Message----- From: Ertan Tike [mailto:[EMAIL PROTECTED]] Sent: 17. september 2001 12:43 To: 'Christian Sandfeld' Cc: '[EMAIL PROTECTED]' Subject: RE: [PHP-WIN] How can I retreive a users Windows logon name? Importance: Low hi, i have a attached security verification c++ project (i'm found this in ms site). you can compile then exec in php (i'm not sure at this point) exe giving a exit code.. 0 (invalid) or 1 (valid).. this is may work.. (cause i'm use same way.. but not under the web..) -----Original Message----- From: Christian Sandfeld [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Sent: Monday, September 17, 2001 12:23 PM To: '[EMAIL PROTECTED]' Subject: [PHP-WIN] How can I retreive a users Windows logon name? Hi group, Is there any way I can retreive a users Windows logon name? I'm running a system with IIS 4/PHP 4.0.6/MySQL 3.23.xx. Basicaly what I'm after is some simple way to verify what user is accessing our intranet, without having to prompt the user for his initials. I am aware that this does not provide for much security, but that's ok (I'm not after security, only after a simple user verification). I thank you in advance for your time ;-) /Christian ---------------------------------------------- Christian Sandfeld Zensys A/S ---------------------------------------------- -- PHP Windows Mailing List ( http://www.php.net/ <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 Christian, If you change the access control from Basic to NT LM for the Intranet web site you will gain the following things: 1) Users loged on to the same NT domain as the web server will be veryfied and have access to your Intranet. This will work for IE browsers. If you use netscape or the user is unautoraized by the NT Domain the user will be prompted for a user id and password. 2) The users login name and auth method will be available in $AUTH_USER and $AUTH_TYPE. - Frank > Hi group, > > Is there any way I can retreive a users Windows logon name? > > I'm running a system with IIS 4/PHP 4.0.6/MySQL 3.23.xx. > > Basicaly what I'm after is some simple way to verify what user is accessing > our intranet, without having to prompt the user for his initials. > > I am aware that this does not provide for much security, but that's ok (I'm > not after security, only after a simple user verification). > > I thank you in advance for your time ;-) > > /Christian > > ---------------------------------------------- > Christian Sandfeld > Zensys A/S > ---------------------------------------------- > > > -- > 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] > > >
Adrian, Frank, That was exactly what I was looking for. I wasn't aware that changes had to be made to the security stuff, but in hindsight it makes perfect sence. Thanks a lot ;-) /Christian -----Original Message----- From: Frank M. Kromann [mailto:[EMAIL PROTECTED]] Sent: 17. september 2001 18:41 To: Christian Sandfeld Cc: '[EMAIL PROTECTED]' Subject: Re: [PHP-WIN] How can I retreive a users Windows logon name? Hi Christian, If you change the access control from Basic to NT LM for the Intranet web site you will gain the following things: 1) Users loged on to the same NT domain as the web server will be veryfied and have access to your Intranet. This will work for IE browsers. If you use netscape or the user is unautoraized by the NT Domain the user will be prompted for a user id and password. 2) The users login name and auth method will be available in $AUTH_USER and $AUTH_TYPE. - Frank > Hi group, > > Is there any way I can retreive a users Windows logon name? > > I'm running a system with IIS 4/PHP 4.0.6/MySQL 3.23.xx. > > Basicaly what I'm after is some simple way to verify what user is accessing > our intranet, without having to prompt the user for his initials. > > I am aware that this does not provide for much security, but that's ok (I'm > not after security, only after a simple user verification). > > I thank you in advance for your time ;-) > > /Christian > > ---------------------------------------------- > Christian Sandfeld > Zensys A/S > ---------------------------------------------- > > > -- > 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] > > > -- 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]
Another way of forcing a script to run for longer is change the max_execution_time in php.ini to a larger value. (My default is 30 seconds) Ross -----Original Message----- From: CJD [mailto:[EMAIL PROTECTED]] Sent: 16 September 2001 22:02 To: [EMAIL PROTECTED] Subject: [PHP-WIN] Re: How to make a script run itself ? I do a similar thing. Sending a message to almost 2,000 people each month (subscriptions - not spam!) on behalf of a client. I run it on the command line, and it never times out. "John Lim" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Check out the at command. It's available in Linux and Windows NT/2000. You > can run a php script from the command line using php.exe -q [filename] > > > "Steen rabĝl" <[EMAIL PROTECTED]> wrote in message > 004501c13de1$22f0d8f0$0300000a@srjhp">news:004501c13de1$22f0d8f0$0300000a@srjhp... > Hi > > I need to process some information and mail it to the users of my site every > night, and therefore I have made a script to handle the information and mail > it, no problem... > > But, now I have so many users that the script times-out, the result is that > not all users get what they want/need > > How can I make a script that keeps running until all information is > processed ? > > Thanks in advance > > Steen > > > > -- 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]
Or you can add 'set_time_limit(1500)' to the top of your php script. -----Original Message----- From: Ross Fleming [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 6:11 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Re: How to make a script run itself ? Another way of forcing a script to run for longer is change the max_execution_time in php.ini to a larger value. (My default is 30 seconds) Ross -----Original Message----- From: CJD [mailto:[EMAIL PROTECTED]] Sent: 16 September 2001 22:02 To: [EMAIL PROTECTED] Subject: [PHP-WIN] Re: How to make a script run itself ? I do a similar thing. Sending a message to almost 2,000 people each month (subscriptions - not spam!) on behalf of a client. I run it on the command line, and it never times out. "John Lim" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Check out the at command. It's available in Linux and Windows NT/2000. You > can run a php script from the command line using php.exe -q [filename] > > > "Steen rabĝl" <[EMAIL PROTECTED]> wrote in message > 004501c13de1$22f0d8f0$0300000a@srjhp">news:004501c13de1$22f0d8f0$0300000a@srjhp... > Hi > > I need to process some information and mail it to the users of my site every > night, and therefore I have made a script to handle the information and mail > it, no problem... > > But, now I have so many users that the script times-out, the result is that > not all users get what they want/need > > How can I make a script that keeps running until all information is > processed ? > > Thanks in advance > > Steen > > > > -- 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] -- 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]
echo "hello world"; is same as: <?="hello world"?> "Patrick Silva" <[EMAIL PROTECTED]> wrote in message 04fd01c13cfd$9b3a5b90$[EMAIL PROTECTED]">news:04fd01c13cfd$9b3a5b90$[EMAIL PROTECTED]... Hello How to replace echo by ? I can't find how to configure PHP4 for this on NT thanks /---------------------------------------------/ Patrick Silva Gestion serveurs et domaines Cyse Informatique 105 avenue du Général Leclerc 77400 Lagny sur marne (France) tel : (33)1 64303232 - Fax : (33)1 64303222 tel : (33)5 55805498 - Fax : (33)5 55805499 E-mail : [EMAIL PROTECTED] http://www.cyse.com /---------------------------------------------/
Hi! Did anyone try to use Php Socket functions related with XMLSocket from Flash?? Maybe U have some examples? regards kRuK
Whenever I uncomment the entension=php_ldap.dll line in php.ini I receive the error 'Invalid Access to Memory Location'. I can't find any reference to this anywhere on the web. I'm running PHP 4.06 and Apache 1.3.20. Any help on this matter would be greatly appreciated. Thanks, Graham Morris [EMAIL PROTECTED]
Debra, Unfortunately $REMOTE_USER is not set by IIS (atleast not on mine) and to my knowledge IIS does not support .htaccess files. But thanks anyway ;-) Any other ideas out there ? /Christian -----Original Message----- From: samsom, debra [mailto:[EMAIL PROTECTED]] Sent: 17. september 2001 16:19 To: 'Christian Sandfeld' Subject: RE: [PHP-WIN] How can I retrieve a users Windows logon name? Have you looked at .htaccess and using $REMOTE_USER in your PHP code to get the userid. Under Apache it works great, I'm not sure about IIS. -----Original Message----- From: Christian Sandfeld [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Sent: Monday, September 17, 2001 7:01 AM To: 'Ertan Tike' Cc: '[EMAIL PROTECTED]' Subject: RE: [PHP-WIN] How can I retreive a users Windows logon name? Ertan, Thank you for your speedy reply. I had hoped for some sort of 'pure' PHP solution, but hey, this might work. I will definately give it a try :) Meanwhile, if there are others who have an idea how this could be accomplished through PHP, I would be happy to hear from you. Regards, Christian -----Original Message----- From: Ertan Tike [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Sent: 17. september 2001 12:43 To: 'Christian Sandfeld' Cc: '[EMAIL PROTECTED]' Subject: RE: [PHP-WIN] How can I retreive a users Windows logon name? Importance: Low hi, i have a attached security verification c++ project (i'm found this in ms site). you can compile then exec in php (i'm not sure at this point) exe giving a exit code.. 0 (invalid) or 1 (valid).. this is may work.. (cause i'm use same way.. but not under the web..) -----Original Message----- From: Christian Sandfeld [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> < mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > ] Sent: Monday, September 17, 2001 12:23 PM To: '[EMAIL PROTECTED]' Subject: [PHP-WIN] How can I retreive a users Windows logon name? Hi group, Is there any way I can retreive a users Windows logon name? I'm running a system with IIS 4/PHP 4.0.6/MySQL 3.23.xx. Basicaly what I'm after is some simple way to verify what user is accessing our intranet, without having to prompt the user for his initials. I am aware that this does not provide for much security, but that's ok (I'm not after security, only after a simple user verification). I thank you in advance for your time ;-) /Christian ---------------------------------------------- Christian Sandfeld Zensys A/S ---------------------------------------------- -- PHP Windows Mailing List ( http://www.php.net/ <http://www.php.net/> < http://www.php.net/ <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]
If I run phpinfo() on a server where the files are password protected (basic authentication from IIS), I get 4 different entries, all of which contain the logon domain and name: AUTH_USER LOGON_USER REMOTE_USER UNMAPPED_REMOTE_USER Isn't this the thing you are looking for? Server: Win 2000, PHP 3.0.16 as CGI module Andrian Christian Sandfeld wrote: > > Debra, > > Unfortunately $REMOTE_USER is not set by IIS (atleast not on mine) and > to my > knowledge IIS does not support .htaccess files. > > But thanks anyway ;-) > > Any other ideas out there ? > > /Christian > > -----Original Message----- > From: samsom, debra [mailto:[EMAIL PROTECTED]] > Sent: 17. september 2001 16:19 > To: 'Christian Sandfeld' > Subject: RE: [PHP-WIN] How can I retrieve a users Windows logon name? > > Have you looked at .htaccess and using $REMOTE_USER in your PHP code to > get > the userid. Under Apache it works great, I'm not sure about IIS. > > -----Original Message----- > From: Christian Sandfeld [ mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> ] > > Sent: Monday, September 17, 2001 7:01 AM > To: 'Ertan Tike' > Cc: '[EMAIL PROTECTED]' > Subject: RE: [PHP-WIN] How can I retreive a users Windows logon name? > > Ertan, > > Thank you for your speedy reply. I had hoped for some sort of 'pure' PHP > > solution, but hey, this might work. I will definately give it a try :) > > Meanwhile, if there are others who have an idea how this could be > accomplished through PHP, I would be happy to hear from you. > > Regards, > > Christian > > -----Original Message----- > From: Ertan Tike [ mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> ] > Sent: 17. september 2001 12:43 > To: 'Christian Sandfeld' > Cc: '[EMAIL PROTECTED]' > Subject: RE: [PHP-WIN] How can I retreive a users Windows logon name? > Importance: Low > > hi, > i have a attached security verification c++ project (i'm found this in > ms > site). > you can compile then exec in php (i'm not sure at this point) > exe giving a exit code.. 0 (invalid) or 1 (valid).. > this is may work.. (cause i'm use same way.. but not under the web..) > > -----Original Message----- > From: Christian Sandfeld [ mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > < mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > ] > > Sent: Monday, September 17, 2001 12:23 PM > To: '[EMAIL PROTECTED]' > Subject: [PHP-WIN] How can I retreive a users Windows logon name? > > Hi group, > > Is there any way I can retreive a users Windows logon name? > > I'm running a system with IIS 4/PHP 4.0.6/MySQL 3.23.xx. > > Basicaly what I'm after is some simple way to verify what user is > accessing > our intranet, without having to prompt the user for his initials. > > I am aware that this does not provide for much security, but that's ok > (I'm > not after security, only after a simple user verification). > > I thank you in advance for your time ;-) > > /Christian > > ---------------------------------------------- > Christian Sandfeld > Zensys A/S > ---------------------------------------------- > > -- > PHP Windows Mailing List ( http://www.php.net/ <http://www.php.net/> < > http://www.php.net/ <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'm posting a snippet of code which prints each date within a week. For example on the day of 10/21/01 it will print the dates 10/21/01, 22, 23, 24, 25, 26, and 27. The problem I am having is on the week of 10/28/01 it will print 10/28 twice. for example 28,28,29,30,31,1,2,3. As far as I can tell every other date seems to work fine except for the week of the 28th, where I get the 28th twice. I'm hoping someone will take a quick look at the code below and maybe have an idea as to why this is occuring or see something I dont see. I greatly appreciate any help or advince. Thanks. <? $yr = "2001"; $mnth = "10"; $dy = "28"; $sunday_stamp = mktime(0,0,0,$mnth,$dy-date("w",mktime(0,0,0,$mnth,$dy,$yr)),$yr); $last_sunday = date("Y-m-d", $sunday_stamp); $next_saturday = date("Y-m-d",mktime(0,0,0,$mnth,$dy+6-date("w",mktime(0,0,0,$mnth,$dy,$yr)), $yr)); $next_day = $last_sunday; $next_stamp = $sunday_stamp; while($next_day <= $next_saturday) { $newsplit = explode("-", $next_day); $date = date("m/d/y", mktime(0,0,0,$newsplit[1],$newsplit[2],$newsplit[0])); $dayoweek = date("l", mktime(0,0,0,$newsplit[1],$newsplit[2],$newsplit[0])); echo "$dayoweek $date<BR>"; $next_stamp = $next_stamp + 86400; // stamp plus # of seconds in a day $next_day = date("Y-m-d",$next_stamp);; } ?>
I have a problem with the file uploading. I copied a script from a book on PHP and I followed instructions about the upload temp dir (upload_tmp_dir = c:/Windows/temp). The script was developed for an Unix machine and the line is: @copy("$img1","/usr/local/apache_1.3.12/htdocs/$img1_name") or die... The book suggests, for Windows machines, to change the root in: /Apache/htdocs. I tried the program, but an error message appears: "It is impossible to upload file" (message wrote in die command). What is the exact command for uploading file?