php-windows Digest 26 Sep 2001 20:44:04 -0000 Issue 775 Topics (messages 9541 through 9559): Re: &$this? 9541 by: _lallous 9543 by: Chen Wei, Lian 9554 by: Ming-Chieh Lee redirect -- pls help! 9542 by: Stanley 9544 by: Chen Wei, Lian 9551 by: Justin Blake windows & .htaccess 9545 by: php ci 9546 by: Augusto Cesar Castoldi Well, I've got it running 9547 by: Asendorf, John 9548 by: Phil Driscoll 9553 by: Asendorf, John 9555 by: Phil Driscoll 9556 by: Asendorf, John 9558 by: Phil Driscoll Re: php4 and interbase 9549 by: Sebastián Trouble with Xitami+PHP+Win 9550 by: Lluís de Yzaguirre 9559 by: Arron Edwards Re: IIS Installation] 9552 by: Mark Security Question 9557 by: A.J. Ostman 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] ----------------------------------------------------------------------
&$varname menas to take the address of the variable, example: $a = "Hello world!"; $b = &$a; $b = "Hi! this is var B"; echo $a; // output will be: Hi! this is var B "Ming-Chieh Lee" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > does anyone know what does &$this mean? I saw this on the php.net tuturial > for references inside a constructor. > I thought that $this is already a reference? > The way it was used : > class Foo > { > function Foo($name) > { > // create a reference inside the global array $globalref > global $globalref; > $globalref[] = &$this; > // set name to passed value > $this->setName($name); > // and put it out > $this->echoName(); > } > thanks for any input! > > >
Hi _lallous, yes, but I think he knew this already. the question is that since $this itself is a reference to the object, why inside the class still need to assign the address of $this to $globalref[]? -- regards, chen wei (http://www.cw213.net) =================================== Solutions Developer of Earth9.com =================================== Wednesday, September 26, 2001, 6:45:15 PM, you wrote: _> &$varname menas to take the address of the variable, _> example: _> $a = "Hello world!"; _> $b = &$a; _> $b = "Hi! this is var B"; _> echo $a; _> // output will be: Hi! this is var B _> "Ming-Chieh Lee" <[EMAIL PROTECTED]> wrote in message _> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> does anyone know what does &$this mean? I saw this on the php.net _> tuturial >> for references inside a constructor. >> I thought that $this is already a reference? >> The way it was used : >> class Foo >> { >> function Foo($name) >> { >> // create a reference inside the global array $globalref >> global $globalref; >> $globalref[] = &$this; >> // set name to passed value >> $this->setName($name); >> // and put it out >> $this->echoName(); >> } >> thanks for any input! >> >> >>
Hello all, Thanks for the input. Chen Wei, thanks for clarifying my question. So why do we need to make a reference out of a variable that already contains a reference? I Thanks for any input! "Chen Wei" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi _lallous, > > yes, but I think he knew this already. the question is that since $this > itself is a reference to the object, why inside the class still need to > assign the address of $this to $globalref[]? > > > -- > regards, > chen wei (http://www.cw213.net) > =================================== > Solutions Developer of Earth9.com > =================================== > > > Wednesday, September 26, 2001, 6:45:15 PM, you wrote: > > _> &$varname menas to take the address of the variable, > > _> example: > > _> $a = "Hello world!"; > _> $b = &$a; > _> $b = "Hi! this is var B"; > _> echo $a; > > _> // output will be: Hi! this is var B > > _> "Ming-Chieh Lee" <[EMAIL PROTECTED]> wrote in message > _> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >> does anyone know what does &$this mean? I saw this on the php.net > _> tuturial > >> for references inside a constructor. > >> I thought that $this is already a reference? > >> The way it was used : > >> class Foo > >> { > >> function Foo($name) > >> { > >> // create a reference inside the global array $globalref > >> global $globalref; > >> $globalref[] = &$this; > >> // set name to passed value > >> $this->setName($name); > >> // and put it out > >> $this->echoName(); > >> } > >> thanks for any input! > >> > >> > >> >
Hi all, How can i redirect URL under win2k? e.g: if (user == 1) { redirect to www.yahoo.com } else { redirect to www.google.com } Pls help thx! Stanley
Hi Stanley, it should be something like this: header ("Location: http://www.cw213.net/"); make sure u run this b4 any output to the browser. -- regards, chen wei (http://www.cw213.net) =================================== Solutions Developer of Earth9.com =================================== Wednesday, September 26, 2001, 5:52:33 PM, you wrote: S> Hi all, S> How can i redirect URL under win2k? S> e.g: S> if (user == 1) { S> redirect to www.yahoo.com S> } S> else { S> redirect to www.google.com S> } S> Pls help thx! S> Stanley
> header ("Location: http://www.cw213.net/"); > > make sure u run this b4 any output to the browser. You should also add "exit;" after the statement so the script does not keep running. ... I think. Justin -- http://blaix.org
hi, my web server is apache on windows. i want to ask the configuration of .htacess files. thx __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
Put this "code" on httpd.conf: ---------------------------------------------- <directory "E:\Augusto\HomePages\htaccess_teste"> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec <limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </limit> <limitexcept GET POST OPTIONS PROPFIND> Order deny,allow Deny from all </limitexcept> </directory> -------------------------------------- Create a file named .htaccess into the diretory: ------------------------------------- AuthUserFile E:\Augusto\HomePages\htaccess_teste\.htpasswd AuthName "Access only for Developers." authType Basic <Limit GET> require user dock require user username </Limit> ------------------------------------------ Create a file named .htpasswd ----------------------------------- dock:teste username:password ---------------------------- that's it. Very simple. see you, Augusto --- php ci <[EMAIL PROTECTED]> escreveu: > hi, > > my web server is apache on windows. > i want to ask the configuration of .htacess files. > thx > > __________________________________________________ > Do You Yahoo!? > Get email alerts & NEW webcam video instant > messaging with Yahoo! Messenger. http://im.yahoo.com > > -- > 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] > _______________________________________________________________________________________________ Yahoo! GeoCities Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis! http://br.geocities.yahoo.com/
Well I finally have PHP running on both Apache AND IIS on the same web machine. But I keep getting some access violations. Was this something we saw about 4.0.7? I saw a lot of traffic on Apache and and 4.0.7 but never read it because I was using IIS. Anyone? Thanks in advance, 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
On Wednesday 26 September 2001 1:47 pm, Asendorf, John wrote: > Well I finally have PHP running on both Apache AND IIS on the same web > machine. But I keep getting some access violations. Was this something we > saw about 4.0.7? I saw a lot of traffic on Apache and and 4.0.7 but never > read it because I was using IIS. Anyone? > I assume you're running php as cgi under IIS and module under Apache? If so I have never experienced any problems with this setup. Is it possible to tell which side is generating the exceptions? Cheers -- Phil Driscoll
Yes, it is purely an Apache exception... --------------------- 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: Phil Driscoll [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 26, 2001 10:36 AM > To: Asendorf, John; Php-Windows (E-mail) > Subject: Re: [PHP-WIN] Well, I've got it running > > > On Wednesday 26 September 2001 1:47 pm, Asendorf, John wrote: > > Well I finally have PHP running on both Apache AND IIS on > the same web > > machine. But I keep getting some access violations. Was > this something we > > saw about 4.0.7? I saw a lot of traffic on Apache and and > 4.0.7 but never > > read it because I was using IIS. Anyone? > > > I assume you're running php as cgi under IIS and module under Apache? > If so I have never experienced any problems with this setup. > Is it possible > to tell which side is generating the exceptions? > > Cheers > > -- > Phil Driscoll >
On Wednesday 26 September 2001 5:52 pm, Asendorf, John wrote: > Yes, it is purely an Apache exception... I don't suppose you can isolate the problem down to a single line of script can you? -- Phil Driscoll
Well, I'm getting these two messages in the Event Log: ODBC The description for Event ID ( 0 ) in Source ( ODBC ) could not be found. It contains the following insertion string(s): Error in d:\mdac25\odbc\core\dm\perf.c(296), The system cannot find the file specified. : Failed to query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ODBC\Performance\First Counter. Perflib The Open Procedure for service "ODBC" in DLL "ODBC32.DLL" failed. Performance data for this service will not be available. Status code returned is DWORD 0. There IS NO d:\mdac25\ directory at all... I wonder if it has something to do with installing apache on D: ? The errors occur in THAT order. So I'm guessing that the second error is merely an effect of the first... --------------------- 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: Phil Driscoll [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 26, 2001 4:29 PM > To: Asendorf, John; Php-Windows (E-mail) > Subject: Re: [PHP-WIN] Well, I've got it running > > > On Wednesday 26 September 2001 5:52 pm, Asendorf, John wrote: > > Yes, it is purely an Apache exception... > > I don't suppose you can isolate the problem down to a single > line of script > can you? > -- > Phil Driscoll >
I know < 0 about ODBC, but it would be interesting to see if the same code caused an error when running with PHP as a CGI (or at least it may yeild more clues). Is there anyone on the list into ODBC who can help out here? -- Phil Driscoll
yes, interbase server is runing on my machine ... and the required dll's (dg32 or something) are present too ... "Chen Wei" <[EMAIL PROTECTED]> escribió en el mensaje [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi Sebastián, > > Do you have the Interbase drivers installed in the computer? I had that > problem before because I don't have the database drivers installed so the > DLL can't be loaded. > > > -- > regards, > chen wei (http://www.cw213.net) > =================================== > Solutions Developer of Earth9.com > =================================== > > > Wednesday, September 26, 2001, 5:02:56 AM, you wrote: > > S> When I edit php.ini file and try to use the Interbase extension, everytime I > S> try to open a php on my Browser it display the following warning > > S> "Unable to load dynamic library 'c:\php\extensions/php_interbase.dll' - in > S> Unknown on line 0" > > > S> Help me please !!!! >
I'm trying to configure PHP for working with Xitami; after installing without troubles, I tryed a dummy script and received following answer: Fatal error: Unable to open c:\aplic\xitami\webpages\php\ in Unknown on line 0 Can anyone or anyone help me? Thanks
Where did you install php? and did you use the installer? and what OS? "Lluís De Yzaguirre" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm trying to configure PHP for working with Xitami; after installing > without troubles, I tryed a dummy script and received following answer: > > Fatal error: Unable to open c:\aplic\xitami\webpages\php\ in Unknown on > line 0 > > Can anyone or anyone help me? > > Thanks >
On Wed, 26 Sep 2001 09:48:36 +0200, Jason Bourne wrote: >George, > >I do not think so, as application become platform indipendant there >is no >need to keep it running on ms. Then you can choose for an cheaper >stable >platform. > >Regards, on a related note, how many more viruses must it help spread before GWB declares running IIS an 'act of terrorism'? :) - Mark
Running PHP in Apache using the MODULE configuration. Apache/1.3.14 (Win32) PHP/4.0.6 mod_ssl/2.7.2 OpenSSL/0.9.6 running. With the following: php_admin_flag safe_mode on php_admin_value open_basedir c:/pr php_admin_value doc_root c:/pr php_admin_value user_dir c:/pr IT SUCCESSFULLY blocks reads in directories other than c:/pr, but it DOES NOT block unlinks (file deletion) outside of the c:/pr directory. So... My users cannot read other users files, however they can delete anything they want. Very strange. Is there a way (without using nt permissions) to block the deleting of files like blocking the reading of files. With the above configuration you CANNOT read from outside the c:/pr, but you can delete files outside of it. <?php echo "Peace!"; //unlink ("c:/test.txt");// UNLINK WORKS (bad) $fp = fopen ("c:/test.txt", "r"); // FAILS SECURITY CHECK (Good) echo "Dude10"; ?>