php-windows Digest 18 Jun 2001 21:43:28 -0000 Issue 616 Topics (messages 7906 through 7929): Com not work in PHP 4.0.5 7906 by: Igor 7913 by: Alain Samoun %s %s addition... what's it do and is it my problem? 7907 by: Asendorf, John 7908 by: OoCobra97.aol.com 7909 by: Egil Helland 7912 by: Phil Driscoll PhpDEV 7910 by: Brett Shaw Making Maintainable Software 7911 by: Dickerson, Monty Remote UserName 7914 by: Erik Ableson 7915 by: OoCobra97.aol.com 7921 by: Erik Ableson NT Domain UserNames 7916 by: Vishal Shah 7918 by: OoCobra97.aol.com 7919 by: Phil Driscoll 7920 by: Romeo, Domenic A Need Help 7917 by: Steve Dowell 7924 by: Steve Dowell Uploading Files 7922 by: Randall Barber 7927 by: Asendorf, John 7928 by: OoCobra97.aol.com Re: Does OCILogon need ISAPI to stay persistent? 7923 by: Paco Ortiz Re: [PHP-DB] Uploading Files 7925 by: Terry Romine COM type mismatch 7926 by: G Hughes opendir(); 7929 by: Diverge 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] ----------------------------------------------------------------------
When I try to call COM funcs in php 4.0.5, I recieve system error (memory read/write error) [COM is built-in in PHP for Win and I don`t know where is the problem.] Curiously and remarkably that COM works well in PHP 4.0.4 Had somebody experienced the same problems?
Yes, COM is completely broken in PHP4.05 :( Try 4.06 version at: http://www.zend.com/snapshots/ Alain On Thu, May 24, 2001 at 03:56:42PM +0400, Igor wrote: > When I try to call COM funcs in php 4.0.5, I recieve system error (memory > read/write error) > [COM is built-in in PHP for Win and I don`t know where is the problem.] > Curiously and remarkably that COM works well in PHP 4.0.4 > Had somebody experienced the same problems? > > > -- > 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]
For those of us running IIS, the instructions say to follow the php.exe setup in the CGI mappings as %s %s... does anyone know what this does? I'm wondering if it is causing incorrect URLs to not allow an instance of php.exe to shut down. i.e., when someone type in an incorrect URL that ends in .php, they get a CGI error instead of a 404, at this point, it doesn't seem to allow php.exe to shut down... so every now and then I have to restart the server so that I can get rid of the bad instances in the task manager (which won't allow me to shut them down (Access Denied) even with the w3 service shut down...) --------------------- John Asendorf - [EMAIL PROTECTED] Web Applications Developer http://www.lcounty.com - NEW FEATURES ADDED DAILY! Licking County, Ohio, USA 740-349-3631 Aliquando et insanire iucundum est
I'm not sure what the %s means, but with your 404 error problem and iis 5 at least...you can stop those cgi errors you get, when you create the script mapping in IIS (right where your seeing the %s %s) you should see 2 checkboxes on the bottom of that page, one is "script engine" the other is "check that file exists" if you check the box next to "check that file exists" and apply it, your users will get your standard 404 error instead of the blank cgi error (php also wont load, because IIs will stop before it loads up php). Hope this helps a few people, as Ive been seeing this floating around the mailing list a few times. But I believe you said you run IIS4 on your machines, So im not sure if the same will apply to you...but its worth a shot. Good Luck! ~Jeff In a message dated 5/24/2001 8:31:43 AM Eastern Daylight Time, [EMAIL PROTECTED] writes: > For those of us running IIS, the instructions say to follow the php.exe > setup in the CGI mappings as %s %s... does anyone know what this does? I'm > wondering if it is causing incorrect URLs to not allow an instance of > php.exe to shut down. i.e., when someone type in an incorrect URL that ends > in .php, they get a CGI error instead of a 404, at this point, it doesn't > seem to allow php.exe to shut down... so every now and then I have to > restart the server so that I can get rid of the bad instances in the task > manager (which won't allow me to shut them down (Access Denied) even with > the w3 service shut down...)
AFAIK, this means that your CGI application (php.exe) receives both a script (the first %s) and parameters (the second %s). On Thu, 24 May 2001 08:52:58 EDT, [EMAIL PROTECTED] wrote: >I'm not sure what the %s means, but with your 404 error problem and >iis 5 at >least...you can stop those cgi errors you get, when you create the >script >mapping in IIS (right where your seeing the %s %s) you should see 2 >checkboxes on the bottom of that page, one is "script engine" the >other is >"check that file exists" if you check the box next to "check that >file >exists" and apply it, your users will get your standard 404 error >instead of >the blank cgi error (php also wont load, because IIs will stop >before it >loads up php). Hope this helps a few people, as Ive been seeing >this >floating around the mailing list a few times. But I believe you >said you run >IIS4 on your machines, So im not sure if the same will apply to >you...but its >worth a shot. > >Good Luck! >~Jeff > >In a message dated 5/24/2001 8:31:43 AM Eastern Daylight Time, >[EMAIL PROTECTED] writes: > > >>For those of us running IIS, the instructions say to follow the >>php.exe >>setup in the CGI mappings as %s %s... does anyone know what this >>does? I'm >>wondering if it is causing incorrect URLs to not allow an instance >>of >>php.exe to shut down. i.e., when someone type in an incorrect URL >>that ends >>in .php, they get a CGI error instead of a 404, at this point, it >>doesn't >>seem to allow php.exe to shut down... so every now and then I >>have to >>restart the server so that I can get rid of the bad instances in >>the task >>manager (which won't allow me to shut them down (Access Denied) >>even with >>the w3 service shut down...) > > > -=// Egil Helland / IKON AS - MCSE, Internet, Intranet mailto:[EMAIL PROTECTED] http://egil.net //=-
On Thursday 24 May 2001 13:30, Asendorf, John wrote: > For those of us running IIS, the instructions say to follow the php.exe > setup in the CGI mappings as %s %s... Obsolete instructions which will magically have disappeared with the 4.0.6 release. I guess that IIS knows how to fire up php and pass it the script filename without any help from the %s's. You can safely get rid of them. > I'm wondering if it is causing incorrect URLs to not allow an instance of > php.exe to shut down. i.e., when someone type in an incorrect URL that > ends in .php, they get a CGI error instead of a 404, at this point, it > doesn't seem to allow php.exe to shut down... so every now and then I have > to restart the server so that I can get rid of the bad instances in the > task manager (which won't allow me to shut them down (Access Denied) even > with the w3 service shut down...) Someone else mentioned ticking the 'check file exists' box which will cause IIS to send a 404 before it asks php to open a file which does not exist (and as a useful by product, will handle authentication based on NTLanMan file permissions on your behalf). This facility *is* available on IIS4. The cgi error you get otherwise is just IIS complaining that it received no output from PHP. Maybe the zombie PHPs are just hanging around waiting for a sript to appear? In any event, the reason you can't kill the zombies with task manager is that it doesn't have permission to kill them as it normally runs as the logged in user, but it actually needs to run on a system account. You can make it do that by using the at command: at <timerealsoonnow> taskmgr When it gets to timerealsoonnow, task manager will pop up and will be able to kill off your zombies. Cheers -- Phil Driscoll
for those of you who are interested im developing a web site for php developers to share resources and information. you wont need to be a member or commit yourself to anything its totally free. you can view the site at the following URL: - http://www.oosha.com/phpdev/index.php3 Its empty at the moment but feel free to input any information you like...........
Thank God those old days of catering to the PC are GONE.. ?.. and now we can cater to the developer, or more accurately the poor sucker 12-18 months later who has to maintain our code !!! I left perl cgi hacking because perl is a "write once" language; I could hardly even maintain my own code 12 months later so how could anyone else? And I try. Let's write maintainable code, people. Have mercy. USD$ 21.50 @ http://www.bookpool.com/.x/ihqnb47450/sm/1556154844 Code Complete, by Steve McConnell Take it to Starbucks with you next time!; a good read. > -----Original Message----- > From: Stanislav Malyshev [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 24, 2001 4:20 AM > Subject: Re: [PHP-WIN] anti-advocacy: Larry Seltzer, pcmag May'01 pub. > > J>> sTrPoS > J>> StRpOs > J>> STrpOS > J>> stRPos > J>> sTRpOS > J>> ... > J>> sTRPOS > J>> STRPOs > Once I had to deal with an assembler for some embedded processor that > allowed symbol names up to 6 characters. That was exactly the > way to make > different readable identifiers, so that you could have lstart, lstarT, > lstaRt, lstaRT etc. Thanks God that assembler was case-sensitive. > Those old days... :) > -- > Stanislav Malyshev, Zend Products Engineer > [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115
Hmm - an odd one here. I am working in an environment where all browsers are forced to authenticate to a Netscape proxy server and all traffic internal and external is routed through the proxy. Since all users are authenticated as soon as their browser opens, I'd like to be able to access the userid that they used to authenticate in order to handle site personalization, but I can't seem to find any way to get at this information.Any every tried this with php?Cheers,
Erik Ableson
Hello Erik, You can access the username and password by possibly a getenv or http_env_vars...and using PHP_AUTH_USER and PHP_AUTH_PW if you go to a page that has the phpinfo() command in it after youve authenticated, it will show you these variables...there located under php variables. Hope this helps in some crazy way....sorry about not knowing what command to use to get them...but ive been up for 2 days straight now...and mountain dew just inst working any more Good Luck ~Jeff Hmm - an odd one here. I am working in an environment where all browsers are forced to authenticate to a Netscape proxy server and all traffic internal and external is routed through the proxy. Since all users are authenticated as soon as their browser opens, I'd like to be able to access the userid that they used to authenticate in order to handle site personalization, but I can't seem to find any way to get at this information. Any every tried this with php? Cheers, Erik Ableson
Title: RE: [PHP-WIN] Remote UserNameHmm - the problem that I'm having is that I want this interaction to be invisible to the end user. I don't want them to be presented with a login dialog since I _should_ (somehow) be able to identify them by the id they presented to the proxy with which I can verify whether they should have rights or not.
All of the "ENV" vars seem to refer to the local instance of the app on my machine - referring to any of these from a remote connection, just reports my userid on these forms, not the userid of the remote user... when I get someone else to hit the page - all the "ENV" and "SERVER" variables are reporting my userid information (where I'm logged in) not the info of the client browser...
Hints and tips always appreciated,
Erik
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, May 24, 2001 10:17 AM
>To: Erik Ableson; [EMAIL PROTECTED]
>Subject: Re: [PHP-WIN] Remote UserName
>
>
>Hello Erik,
>You can access the username and password by possibly a getenv or
>http_env_vars...and using PHP_AUTH_USER and PHP_AUTH_PW if
>you go to a
>page that has the phpinfo() command in it after youve
>authenticated, it will
>show you these variables...there located under php variables.
>Hope this
>helps in some crazy way....sorry about not knowing what
>command to use to get
>them...but ive been up for 2 days straight now...and mountain
>dew just inst
>working any more
>
>Good Luck
>~Jeff
>
>
>
>
>
>Hmm - an odd one here. I am working in an environment where
>all browsers are
>forced to authenticate to a Netscape proxy server and all
>traffic internal
>and external is routed through the proxy. Since all users are
>authenticated
>as soon as their browser opens, I'd like to be able to access
>the userid that
>they used to authenticate in order to handle site
>personalization, but I
>can't seem to find any way to get at this information.
>
>Any every tried this with php?
>Cheers,
>Erik Ableson
>
>
I have a critical problem: I have an intranet built using PHP and SQL server residing behind an NT domain, and only the people who have access to that NT doamin can view this site. Using IIS Authentication types, I have been able to make the site password protected and the any user with the username/password for that NT domain can log onto the site using the same username/password that they entered for the Domain Authentication. However, the issue is that They have to enter the username/password twice: Once when they enter the NT domain and second when they enter the website. My question is: Is there a way to integrate the Network username/password into the website without telling them to re-enter it everytime they try to access the site for the first time ? Any help would be greatly appeciated. Thanks, Vishal
Hello Vishal, Just to get this straight a bit, when you say entering the nt domain, your really saying for when they log on to the system right? Let us know (or me, if everyone else gets this, hehe) ~Jeff In a message dated 5/24/2001 11:19:33 AM Eastern Daylight Time, [EMAIL PROTECTED] writes: > > > > > > I have a critical problem: > > I have an intranet built using PHP and SQL server residing behind an NT > domain, and only the people who have access to that NT doamin can view this > site. Using IIS Authentication types, I have been able to make the site > password protected and the any user with the username/password for that NT > domain can log onto the site using the same username/password that they > entered for the Domain Authentication. However, the issue is that They have > to enter the username/password twice: Once when they enter the NT domain and > second when they enter the website. > > My question is: Is there a way to integrate the Network username/password > into the website without telling them to re-enter it everytime they try to > access the site for the first time ? > > Any help would be greatly appeciated. > > Thanks, > >
On Thursday 24 May 2001 16:20, Vishal Shah wrote: > My question is: Is there a way to integrate the Network username/password > into the website without telling them to re-enter it everytime they try to > access the site for the first time ? The revolting way to do this, which may be ok on your network, is to use NT authentication rather than plain text. If the authentication on your web pages is based on file permissions, then everything should just work transparently. Cheers -- Phil Driscoll
Only if you use Internet Explorer and enable NT-Challenge Response for Authentication in IIS. They will not get a prompt at all when accessing secure pages, unless the account that they are logged in with does not have the correct privileges. This will not work with Netscape. Dom -----Original Message----- From: Vishal Shah [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 11:20 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] NT Domain UserNames I have a critical problem: I have an intranet built using PHP and SQL server residing behind an NT domain, and only the people who have access to that NT doamin can view this site. Using IIS Authentication types, I have been able to make the site password protected and the any user with the username/password for that NT domain can log onto the site using the same username/password that they entered for the Domain Authentication. However, the issue is that They have to enter the username/password twice: Once when they enter the NT domain and second when they enter the website. My question is: Is there a way to integrate the Network username/password into the website without telling them to re-enter it everytime they try to access the site for the first time ? Any help would be greatly appeciated. Thanks, Vishal -- 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]
I have a project where I need to use information gathered from a form and pass it to another web server and wait for a response from the other server in the form of an XML document then write the response to a file. Can anyone point me to information on how to accomplish this. Thanks in advance for any assistance, Steve Dowell
I have a project that needs to take data from a form and pass that data to another webserver then receive a response from that other webserver in the form of an XML document and then write that document to a file. Can anyone point me to information on how to accomplish this? Thanks in advance for any help, Steve Dowell
I have a NAGGING file upload problem. Details: Win2k, IIS5, PHP v4.0.4 As I understand this system, PHP uploads all files to a temporary place on disk. From there you can move them anywhere you want to. Well here's the scenario: Users are allowed to upload PRN files. Once uploaded I have a directory "C:\printFiles" that I want everything moved to. Here's the code: <?php if(is_uploaded_file($printFile)) { move_uploaded_file($printFile, "c:\\printFiles"); } else { echo "Possible file attack<br>"; } ?> Here is the error: Warning: Unable to create '\printFiles': Permission denied in c:\inetpub\wwwroot\submit.php on line 5 Warning: Unable to move 'C:\PHP\uploadtemp\php3EE.tmp' to '\printFiles' in c:\inetpub\wwwroot\submit.php on line 5 I have permissions set on that directory for EVERYONE and IUSR_WORKSTATIONNAME set to FULL CONTROL. I have NEVER been able to move/copy a file. Anyone know how I can fix this? Thanks RDB
I had that same problem. It fixed itself when I changed directories and recreated the directories. I'm not certain if it had to do with the permissions on those folders or what, but that made all the difference. Have you double checked your php.ini file for the upload directory? John --------------------- John Asendorf - [EMAIL PROTECTED] Web Applications Developer http://www.lcounty.com - NEW FEATURES ADDED DAILY! Licking County, Ohio, USA 740-349-3631 Aliquando et insanire iucundum est > -----Original Message----- > From: Randall Barber [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 24, 2001 1:14 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: [PHP-WIN] Uploading Files > > > I have a NAGGING file upload problem. > > Details: Win2k, IIS5, PHP v4.0.4 > > As I understand this system, PHP uploads all files to a > temporary place on disk. From there you can move them > anywhere you want to. > > Well here's the scenario: > > Users are allowed to upload PRN files. Once uploaded I have > a directory "C:\printFiles" that I want everything moved to. > > Here's the code: > > <?php > > if(is_uploaded_file($printFile)) { > move_uploaded_file($printFile, "c:\\printFiles"); > } > else { > echo "Possible file attack<br>"; > } > > ?> > > Here is the error: > > Warning: Unable to create '\printFiles': Permission denied in > c:\inetpub\wwwroot\submit.php on line 5 > > Warning: Unable to move 'C:\PHP\uploadtemp\php3EE.tmp' to > '\printFiles' in c:\inetpub\wwwroot\submit.php on line 5 > > I have permissions set on that directory for EVERYONE and > IUSR_WORKSTATIONNAME set to FULL CONTROL. > > I have NEVER been able to move/copy a file. Anyone know how > I can fix this? > > Thanks > RDB > >
Hello John, This problem should be fixed im still waiting on a reply, but when you use the move_uploaded_file command, you have to give the filename you want it saved to as well, he had: move_uploaded_file($printFile, "c:\\printFiles"); when he changed it to: move_uploaded_file($printFile, "c:\\printFiles\\filename.ext"); it worked fine...the way the script is setup now is the tmp file name is exploded (so we dont have recuring filename.ext problems) then its saved as the tmp name...heres how the script is set now: <?php if(is_uploaded_file($printFile)) { $filename = explode("\\", $printFile); move_uploaded_file($printFile, "c:\\printfiles\\" . $filename[1]); Echo "copied"; } else { echo "Possible file attack"; } ?> Works fine on my system, waiting for his reply to see if it works for him as well ~Jeff In a message dated 5/24/2001 12:40:15 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: > I had that same problem. It fixed itself when I changed directories and > recreated the directories. I'm not certain if it had to do with the > permissions on those folders or what, but that made all the difference. > Have you double checked your php.ini file for the upload directory? > > John >
Hi, >Which version of PHP are you using Paco? I've got 4.0.4 on my webserver... it worked fine for me from 4.0.3pl1, but I read many people had problems with 4.0.4... I'm afraid my experience will not be very useful for others here... Greetings, Paco 5/23/01 7:47:46 PM, "Asendorf, John" <[EMAIL PROTECTED]> wrote: >Which version of PHP are you using Paco? I've got 4.0.4 on my webserver... > >Maybe I can share in your mystery > >--------------------- >John Asendorf - [EMAIL PROTECTED] >Web Applications Developer >http://www.lcounty.com - NEW FEATURES ADDED DAILY! >Licking County, Ohio, USA >740-349-3631 >Aliquando et insanire iucundum est > > >> -----Original Message----- >> From: Paco Ortiz [mailto:[EMAIL PROTECTED]] >> Sent: Wednesday, May 23, 2001 1:50 PM >> To: PHPWIN >> Subject: Re: [PHP-WIN] Does OCILogon need ISAPI to stay persistent? >> >> >> Hi, >> >> >Does OCILogon need ISAPI to stay persistent? >> >> unfortunately, yes. So CGI+Oracle8 is painfully slow. >> Unlike other cases, however ISAPI+Oracle8 works misteriously >> stable for us here... >> so it is a good deal so far (I must say the server is not >> under a heavy traffic yet) >> >> Greetings, >> Paco >> >> 5/23/01 7:32:01 PM, "Asendorf, John" <[EMAIL PROTECTED]> wrote: >> >> >Can I run OCIPLogon in CGI mode? I can't seem to keep a >> persistent logon to >> >Oracle to save my life. I'm at the point where I am about >> to have to put >> >everything in Access and be done with it. >> > >> >--------------------- >> >John Asendorf - [EMAIL PROTECTED] >> >Web Applications Developer >> >http://www.lcounty.com - NEW FEATURES ADDED DAILY! >> >Licking County, Ohio, USA >> >740-349-3631 >> >Aliquando et insanire iucundum est >> > >> > >> >-- >> >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] >> > >> > >> >> ___________________________________ >> Francisco Javier Ortiz Torre >> ComuNET,S.A. >> mailto:[EMAIL PROTECTED] >> >> ComuNET, S.A >> Gral. Concha 39,6º >> 48012 Bilbao España >> Tel: +34 944 700 101 >> Fax: +34 944 700 185 >> http://www.comunet.es >> ___________________________________ >> >> >> >> -- >> 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] >> > > ___________________________________ Francisco Javier Ortiz Torre ComuNET,S.A. mailto:[EMAIL PROTECTED] ComuNET, S.A Gral. Concha 39,6º 48012 Bilbao España Tel: +34 944 700 101 Fax: +34 944 700 185 http://www.comunet.es ___________________________________
I've had problems enough with uploading files that I find the following checkpoints VERY important: 1) directory privileges (you indicate you have those set 777 2) the <form> tag needs: a) enctype = "multipart/form-data" b) method = "post" HTH Terry On Thursday, May 24, 2001, at 12:14 PM, Randall Barber wrote: > Here is the error: > > Warning: Unable to create '\printFiles': Permission denied in > c:\inetpub\wwwroot\submit.php on line 5 > > Warning: Unable to move 'C:\PHP\uploadtemp\php3EE.tmp' to '\printFiles' > in c:\inetpub\wwwroot\submit.php on line 5 > > I have permissions set on that directory for EVERYONE and > IUSR_WORKSTATIONNAME set to FULL CONTROL. > > I have NEVER been able to move/copy a file. Anyone know how I can fix > this? > > Thanks > RDB
Does anyone know the reason for the type mismatch error which often seems to happen when using COM objects? The only piece of info I've seen suggested that a COM object can't be passed as a variable to a second COM object. Is this true, and if it is how might this be worked around. Thanks for any suggestions. Skipsey.
Hi alles. I'm having some problems with the opendir() command. Basically what i want to do is create an index from the files on my CD-rom. But opendir("e:\\"); wont do the trick. Any suggestions?