php-windows Digest 3 May 2001 07:57:36 -0000 Issue 577 Topics (messages 7220 through 7243): Form & MySQL 7220 by: fipo2001 How to log session cookie? 7221 by: Kevin L GD and Fonts 7222 by: Michael Haggerty trouble with cookies 7223 by: r.gelstharp 7224 by: Flint Doungchak 7225 by: r.gelstharp 7226 by: Hubert Olivier 7227 by: r.gelstharp 7232 by: Ignatius Teo 7233 by: Robin Bolton 7234 by: Hubert Olivier Session 7228 by: Shadow Tree 7229 by: Shadow Tree 7230 by: Shadow Tree 7235 by: Robin Bolton Required to Trim Variables with MSSQL Module 7231 by: Flint Doungchak session trouble 7236 by: r.gelstharp Tesis!!!!!! 7237 by: carlos Javascript 7238 by: John 7239 by: Ignatius Teo php newbie seeks help! 7240 by: Seth Cox Re: mysql dump 7241 by: Johan Lundqvist Installing PHP4 for PWS 7242 by: Sven Östring PHP4 and MS Access 7243 by: Net Citizen 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] ----------------------------------------------------------------------
Please, help me. I need to register the data that I collect with a simple form (FirstName, SecondName, Email) on a MySQL database. How I can do it ? .. and how I can to encrypt the access-password to the MySQL db in the php page ? I hope you can help me. Thx Paul
Hi, I'm running PHP4 on Win2k/IIS5. And my app uses sessions/cookies. Does anyone know how to put the php session id in the IIS logfile? thanks -Kevin __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Hi there, has anyone had any luck getting anti-aliased fonts in GD? I believe there is a way, and that I have seen some examples of really cool looking text, but the binary version distributed for windows has no built in type 1 font support. I would just like to know if this is possible, or if I should be looking for another solution. Thanks, Mike
I'm having trouble getting cookies to work. I'm using PHP4, and yes I have already read the manual and I've done like it says to place the setcookies() function BEFORE any other calls such as <HTML> and so forth. Have I missed a configuration I should have done in setting up PHP/Apache/whatever? I don't believe I have but you never know...
In your defense, cookies are pretty stubborn, so don't feel bad. What exactly is your problem so we can find out how to help you. -Flint -----Original Message----- From: r.gelstharp [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 3:05 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] trouble with cookies I'm having trouble getting cookies to work. I'm using PHP4, and yes I have already read the manual and I've done like it says to place the setcookies() function BEFORE any other calls such as <HTML> and so forth. Have I missed a configuration I should have done in setting up PHP/Apache/whatever? I don't believe I have but you never know... -- 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]
The trouble I'm having is simply that I'm using the setcookie() function, and it doesn't seem to be setting the cookies. I know this because I use the isset() function to check on all the pages that use the cookies plus I've used $HTTP_COOKIE_VARS to check also. It just ain't doin' it. Flint Doungchak <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > In your defense, cookies are pretty stubborn, so don't feel bad. What > exactly is your problem so we can find out how to help you. > > -Flint > > -----Original Message----- > From: r.gelstharp [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 02, 2001 3:05 PM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] trouble with cookies > > > I'm having trouble getting cookies to work. I'm using PHP4, and yes I have > already read the manual and I've done like it says to place the setcookies() > function BEFORE any other calls such as <HTML> and so forth. > > Have I missed a configuration I should have done in setting up > PHP/Apache/whatever? I don't believe I have but you never know... > > > > -- > 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] >
This might be caused by several factors. Here are the ones I remember: 1) The browser you are using simply does not accept cookies 2) The PHP file trying to read info from the cookie with the isset () function is not located within the domain specified in the setcookie() function 3) There is indeed a configuration problem with PHP/Apache. But as Flint mentionned, cookies are a tough lot, so it's rather unlikely. Hope this helps! Olivier At 23:18 2001-05-02 +0100, r.gelstharp wrote: >The trouble I'm having is simply that I'm using the setcookie() function, >and it doesn't seem to be setting the cookies. I know this because I use the >isset() function to check on all the pages that use the cookies plus I've >used $HTTP_COOKIE_VARS to check also. It just ain't doin' it.
1)hmmm, I'm using Internet Explorer, and when I created cookies with ASP they seemed to work, so it can't be that. 2)This might be the answer, but when you specify the domain in setcookie as ".." doesn't that mean that you set it to the default which is the host name of the server, and therefore since the PHP file/s I'm using are all in the root directory shouldn't it work? 3)Them being stubborn would seem to be the answer here it seems. I've had enough trouble with trying to get my PHP stuff up and running in time as is without this to add to it. Looks like I'll just have to try passing them as regular variables or something instead. Thanks all. But please don't stop with any recommendations you have. Hubert Olivier <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > This might be caused by several factors. Here are the ones I remember: > > 1) The browser you are using simply does not accept cookies > 2) The PHP file trying to read info from the cookie with the isset () > function is not located within the domain specified in the setcookie() function > 3) There is indeed a configuration problem with PHP/Apache. But as Flint > mentionned, cookies are a tough lot, so it's rather unlikely. > > Hope this helps! > > Olivier > > At 23:18 2001-05-02 +0100, r.gelstharp wrote: > >The trouble I'm having is simply that I'm using the setcookie() function, > >and it doesn't seem to be setting the cookies. I know this because I use the > >isset() function to check on all the pages that use the cookies plus I've > >used $HTTP_COOKIE_VARS to check also. It just ain't doin' it. > > -- > 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] >
How are you setting the cookie? And what are you doing after you set the cookie? Note that the cookie "…will not become visible until the next loading of a page that the cookie should be visible for…" (c.f. http://www.php.net/manual/en/ function.setcookie.php). HTH, Ignatius Teo -----Original Message----- From: r.gelstharp [mailto:[EMAIL PROTECTED]] Sent: Thursday, 3 May 2001 08:46 To: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] trouble with cookies 1)hmmm, I'm using Internet Explorer, and when I created cookies with ASP they seemed to work, so it can't be that. 2)This might be the answer, but when you specify the domain in setcookie as ".." doesn't that mean that you set it to the default which is the host name of the server, and therefore since the PHP file/s I'm using are all in the root directory shouldn't it work? 3)Them being stubborn would seem to be the answer here it seems. I've had enough trouble with trying to get my PHP stuff up and running in time as is without this to add to it. Looks like I'll just have to try passing them as regular variables or something instead. Thanks all. But please don't stop with any recommendations you have. Hubert Olivier <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > This might be caused by several factors. Here are the ones I remember: > > 1) The browser you are using simply does not accept cookies > 2) The PHP file trying to read info from the cookie with the isset () > function is not located within the domain specified in the setcookie() function > 3) There is indeed a configuration problem with PHP/Apache. But as Flint > mentionned, cookies are a tough lot, so it's rather unlikely. > > Hope this helps! > > Olivier > > At 23:18 2001-05-02 +0100, r.gelstharp wrote: > >The trouble I'm having is simply that I'm using the setcookie() function, > >and it doesn't seem to be setting the cookies. I know this because I use the > >isset() function to check on all the pages that use the cookies plus I've > >used $HTTP_COOKIE_VARS to check also. It just ain't doin' it. > > -- > 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]
One thing that I've come across when dealing with cookies, which is documented at: http://www.php.net/manual/en/function.setcookie.php, is the fact that the cookie won't show up until the document is refreshed. Are you trying to pull the cookie vals. right after your setcookie() command? > -----Original Message----- > From: r.gelstharp [mailto:[EMAIL PROTECTED]] > Sent: May 2, 2001 4:46 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] trouble with cookies > > > 1)hmmm, I'm using Internet Explorer, and when I created cookies with ASP > they seemed to work, so it can't be that. > > 2)This might be the answer, but when you specify the domain in > setcookie as > ".." doesn't that mean that you set it to the default which is > the host name > of the server, and therefore since the PHP file/s I'm using are all in the > root directory shouldn't it work? > 3)Them being stubborn would seem to be the answer here it seems. I've had > enough trouble with trying to get my PHP stuff up and running in > time as is > without this to add to it. > > Looks like I'll just have to try passing them as regular variables or > something instead. > > Thanks all. But please don't stop with any recommendations you have. > > Hubert Olivier <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > This might be caused by several factors. Here are the ones I remember: > > > > 1) The browser you are using simply does not accept cookies > > 2) The PHP file trying to read info from the cookie with the isset () > > function is not located within the domain specified in the setcookie() > function > > 3) There is indeed a configuration problem with PHP/Apache. But as Flint > > mentionned, cookies are a tough lot, so it's rather unlikely. > > > > Hope this helps! > > > > Olivier > > > > At 23:18 2001-05-02 +0100, r.gelstharp wrote: > > >The trouble I'm having is simply that I'm using the > setcookie() function, > > >and it doesn't seem to be setting the cookies. I know this > because I use > the > > >isset() function to check on all the pages that use the > cookies plus I've > > >used $HTTP_COOKIE_VARS to check also. It just ain't doin' it. > > > > -- > > 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] > >
Good point. That could be it. Although for the domain you specified, if you do want to specify the root as the domain, simply use "/" (and maybe you can leave this empty, I'd have to double-check). I don't know what ".." will produce as a result, but I know that setting "/" as a domain does work. Hope this helps Olivier At 09:11 2001-05-03 +1000, Ignatius Teo wrote: >How are you setting the cookie? And what are you doing after you set the >cookie? > >Note that the cookie "…will not become visible until the next loading of a >page that the cookie should be visible for…" (c.f. >http://www.php.net/manual/en/ function.setcookie.php). > >HTH, > >Ignatius Teo > > >-----Original Message----- >From: r.gelstharp [mailto:[EMAIL PROTECTED]] >Sent: Thursday, 3 May 2001 08:46 >To: [EMAIL PROTECTED] >Subject: Re: [PHP-WIN] trouble with cookies > >1)hmmm, I'm using Internet Explorer, and when I created cookies with ASP >they seemed to work, so it can't be that. > >2)This might be the answer, but when you specify the domain in setcookie as >".." doesn't that mean that you set it to the default which is the host name >of the server, and therefore since the PHP file/s I'm using are all in the >root directory shouldn't it work? >3)Them being stubborn would seem to be the answer here it seems. I've had >enough trouble with trying to get my PHP stuff up and running in time as is >without this to add to it. > >Looks like I'll just have to try passing them as regular variables or >something instead. > >Thanks all. But please don't stop with any recommendations you have. > >Hubert Olivier <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> This might be caused by several factors. Here are the ones I remember: >> >> 1) The browser you are using simply does not accept cookies >> 2) The PHP file trying to read info from the cookie with the isset () >> function is not located within the domain specified in the setcookie() >function >> 3) There is indeed a configuration problem with PHP/Apache. But as Flint >> mentionned, cookies are a tough lot, so it's rather unlikely. >> >> Hope this helps! >> >> Olivier >> >> At 23:18 2001-05-02 +0100, r.gelstharp wrote: >> >The trouble I'm having is simply that I'm using the setcookie() function, >> >and it doesn't seem to be setting the cookies. I know this because I use >the >> >isset() function to check on all the pages that use the cookies plus I've >> >used $HTTP_COOKIE_VARS to check also. It just ain't doin' it. >> >> -- >> 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] > > >-- >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]
How do I do to make a session by eatch browser window? Obrigado. R3. Rodrigo Rois da Rocha. Acesse agora! www.circulonegro.com _______________________________________________________________________________________ Obtenha seu Serviço de Correio eletrônico Baseado na Web Service em http://www.zzn.com
How do I do to make unique sessions by eatch browser window? Obrigado. R3. Rodrigo Rois da Rocha. Acesse agora! www.circulonegro.com _______________________________________________________________________________________ Obtenha seu Serviço de Correio eletrônico Baseado na Web Service em http://www.zzn.com
How do I do to make unique sessions by eatch browser window? Obrigado. R3. Rodrigo Rois da Rocha. Acesse agora! www.circulonegro.com _______________________________________________________________________________________ Obtenha seu Serviço de Correio eletrônico Baseado na Web Service em http://www.zzn.com
As far as I'm aware you can't. The nature of sessions dictates that this isn't possible. Sessions are global to all active instances of a browser. However, if you're running Netscape and IE at the same time, they won't share the same session. > -----Original Message----- > From: Shadow Tree [mailto:[EMAIL PROTECTED]] > Sent: May 2, 2001 4:51 PM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Session > > > How do I do to make unique sessions by eatch browser window? > > > > > Obrigado. > R3. > > Rodrigo Rois da Rocha. > Acesse agora! www.circulonegro.com > __________________________________________________________________ > _____________________ > Obtenha seu Serviço de Correio eletrônico Baseado na Web Service > em http://www.zzn.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] > >
Hi all, I've got a rather iritating problem. I recently moved a site from PHP 3.0.11 to 4.0.5 RC1. It seems, and I have noticed this for a while in other scripts, that variables returned from MSSQL sometimes need to be trimmed with trim() in order to function correctly. Sometimes they won't evaluate as integers (i.e. they don't add right), other times they don't evaluate right as strings (i.e. with if (!$row[crap]), and other times if I have a header redirect (i.e. Header("Location: ./index.php?crap=$row[crap]") ) I get the infamous CGI header problem. I generally retrieve with $row = mssql_fetch_array($result); In all cases adding trim will fix the problem. Anyone had similar problems. Am I missing something. This seems to be odd behavior. I really don't want to go through all my scripts and trip stuff. Thanks, -Flint
On the recommendation of another, I have abandoned cookies, sort of, and gone for sessions instead. I've tried to write it so that when a user logs onto my site for the first time they input all their details a session is registered, which I (unoriginally) called $session from someone else's example, and place they username and password into $session. This works fine when I first set it up, and on all the pages that I check that it has been created it goes through fine, however, I offer those who already have accounts the ability to log on in the traditional means of username and password, but when I call upon the values stored in $session this time, they come out blank. WHy would a session suddenly lose the data inside it?
Manu!1, Tengo noticias tema tesis hoy hable con magdalena Vilaro pra pedirle la tutoria y bueno por un lado un embole porque no esta guiando tesis y por otro alucinante por que esta en el comite de Estudio de temas de Tesis, ybueno me dijo que era sumamente viable este tema de que las dos juntas estariamos bajo un mismo proyecto de la manera que se lo explique que bueno Manos tiene un proyecto destina do para disñadores jovenes, etc, etc y me dijo que seria viable, que tenia que explicar bien lo que queria manos hacer!!, Asi que ya quede que el mierc. que viene tengo una reunion a las 8 de la mañana con Dominguez, Rosa Espina y Magdalena. Bueno espero poder enviarte la carta por email, sino mañana te la mando via fax por welco, donde quiero reforzar la idea de manos pero no tengo mucha idea como!!!! Un beso gde, Chopingo
Is there a way to use a JavaScript to call php: ie: <script language=javascript src="phpscript.php"></script> I have tried this and it will not run the PHP... this works in ASP... I'm a PHP newbie.. Any help is appreciated... Thanks!!!
This may seem like silly questions, but… 1. Have you configured your web server to handle php scripts? 2. Are you able to run php scripts normally? 3. Does your script return valid javascript code? Ignatius -----Original Message----- From: John [mailto:[EMAIL PROTECTED]] Sent: Thursday, 3 May 2001 12:20 To: [EMAIL PROTECTED] Subject: [PHP-WIN] Javascript Is there a way to use a JavaScript to call php: ie: <script language=javascript src="phpscript.php"></script> I have tried this and it will not run the PHP... this works in ASP... I'm a PHP newbie.. Any help is appreciated... Thanks!!!
Hey! I just installed PHP on my Sambar server. It works great but I have one question. While reading a book to learn the PHP scripting language, it talks about having the encrypt() and decrypt() options with an extension that must be installed on my server to allow those commands. I have search the php.net site and cannot find any info on it. Does anyone know how to get the extension so i can install it? Thanks so much, Seth Cox Owner - SC Developments 256.704.7384 - Office 877.647.6712 - Toll Free www.scdevelopments.com
Sorry if I was a bit fuzzy... You have to escape out the "\" by typing "\\", so in your exaple it would say: LOAD DATA LOCAL INFILE 'c:\\Windows\\Temp\\phpC021.TMP' INTO TABLE my_contact FIELDS TERMINATED BY ';' ENCLOSED BY '\"' ESCAPED BY '\\' LINES TERMINATED BY '\n' Since you get the error: MySQL said: File 'c:windowstempphpc021.tmp' not found (Errcode: 2) you might see that it took away the backslashes?? If you don't know why, take a look at php manual Chapter 6. Types and the page about Strings. Happy hunting /Johan Giro De Roover wrote: > > How is that done and where ?? > > "Johan Lundqvist" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi Giro, > > > > You'll have to type c:\\Windows\\Temp\\phpC021.TMP > > > > /Johan > > > > Giro De Roover wrote: > > > > > > Hi everyone, > > > > > > I am experiencing problem with mysql trying to import a text file with > data > > > into a table, i am using phpmyadmin in order to do that, going to insert > > > textfiles into table and after choosing the file I want to upload i got > this > > > error, any help will be appreciated. > > > > > > Giro > > > > > > Error > > > SQL-query: > > > > > > LOAD DATA LOCAL INFILE 'c:\Windows\Temp\phpC021.TMP' INTO TABLE > my_contact > > > FIELDS TERMINATED BY ';' ENCLOSED BY '\"' ESCAPED BY '\\' LINES > TERMINATED > > > BY '\n' > > > MySQL said: File 'c:windowstempphpc021.tmp' not found (Errcode: 2) > > > > > > -- > > > 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] > > > > -- > 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]
Hi, I found David Fischer's step-by-step instructions at http://www.faqts.com/ for installing PWS and PHP on my local machine to be very helpful. However, I'm getting the following error when I try to access .php files: [403.1 Forbidden: Execute Access Forbidden: This error can be caused if you try to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.] I have set up my PWS manager to read/execute/script from my PHP directory and have the correct association in HKEY_LOCAL_MACHINE to the php4isapi.dll in the php/sapi/ directory. Is there any other place where I need to make the PHP directory executable? Thanks,
Hello: I'm a newbie to PHP. I'm running PHP4 on IIS5 on a Win2K machine. I'd like to query an MS Access table ("SELECT * FROM Member") from the PHP script. The ODBC DSN is already set up properly. Which PHP functions should I use to do the job? Do you know of a tutorial site for this kind of data queries, or queries from MS SQL Server? Thanks for your tips.