php-general Digest 23 Jan 2001 18:35:37 -0000 Issue 472 Topics (messages 36144 through 36241): Profanity Filter? 36144 by: Colin Kane 36146 by: Richard Lynch Re: What "PHP" Stands For.... 36145 by: Richard Lynch check null value 36147 by: Jacky.lilst 36155 by: CC Zona 36176 by: Cal Evans Re: Does PHP works with Netscape Web Server or IPlanet? ?? 36148 by: "Aguilar Peña, Javier" Re: url hide 36149 by: Kristofer Widholm 36154 by: Tim Ward 36156 by: Jørg V. Bryne 36160 by: Harsono Ismail 36178 by: Sander Pilon Re: Search Engines and PHP 36150 by: Kristofer Widholm 36151 by: Ernest E Vogelsinger 36172 by: Christian Reiniger 36174 by: Sander Pilon very basic help on query and db issue 36152 by: Jacky.lilst 36158 by: Pascal Clerin Re: DBase functions 36153 by: Tim Ward Funny php://stdout behaviour 36157 by: ARTEK Re: HTTP_USER_AGENT and preg_match 36159 by: Teodor Cimpoesu RC4 Encryption / Decryption Class 36161 by: Mukul Sabharwal Non-existant folders?? 36162 by: Adrian Murphy 36177 by: Cal Evans 36190 by: Sebastian Stadtlich 36191 by: Robin Vickery multple select forms... going to hit my head against a wall .. 36163 by: hsmith.twilyt.com 36168 by: Adrian Murphy 36173 by: hsmith.twilyt.com 36180 by: Jon Haworth 36181 by: Adrian Murphy 36182 by: hsmith.twilyt.com 36184 by: Jon Haworth 36185 by: Jørg V. Bryne help!!! (PHP) 36164 by: Bruno Freire 36166 by: Kees Hoekzema 36195 by: Joe Stump apache doubt!!!! 36165 by: Bruno Freire 36167 by: Jon Haworth 36223 by: Thierry Coopman Does anybody know how to setup PHP on a iPlanet Web Server (or Netscape Web Server)???? HEELPPP 36169 by: "Aguilar Peña, Javier" Getting warning using split 36170 by: Matt Williams 36175 by: Brian Clark 36192 by: Steve Edberg Sorry! Help needed! 36171 by: Anna 36194 by: Joe Stump 36205 by: Tim McGuire passing arrays via forms .. 36179 by: hsmith.twilyt.com 36183 by: Neil Kimber Turning off scrollbar 36186 by: Website4S.aol.com 36187 by: Jon Haworth 36189 by: Brian Clark sleep and usleep not working ?? 36188 by: Benny Nissen 36217 by: Benny Nissen IMAP - attachment-information 36193 by: Jochen Kächelin 36209 by: Chris Adams Possible Sybase Bug 36196 by: Shaun Thomas Deleting all cookies so matter where they were set 36197 by: Noah Spitzer-Williams 36214 by: php3.developersdesk.com ID value 36198 by: Robert Morrissey 36199 by: Sam Masiello Newbie frustration! 36200 by: Gerry 36206 by: mick 36216 by: Gawain Reifsnyder 36237 by: Gerry Maximum execution time 36201 by: Liam Gibbs 36210 by: Chris Adams 36211 by: Delbono Re: SSH file transfers 36202 by: Jirka Kosek installing and using PEAR 36203 by: Dean Hall Re: DocBook Editors? 36204 by: Jirka Kosek Re: XML Processing Instruction ( was " <? PHP vs. <?" ) 36207 by: Jirka Kosek Failed to write session data (files) 36208 by: bill png files loosing color depth 36212 by: Liam Hoekenga 36233 by: Matt McClanahan WAP and PHP 36213 by: Alastair Binns HELP!!! $PHP_AUTH_USER!!!!!! 36215 by: Bruno Freire 36221 by: Robert Collins Sybase Mysql 3.23 issues. 36218 by: Shaun Thomas non-php related question. 36219 by: Jason Jacobs 36220 by: Kurth Bemis Shared Memory with Yast-installed mod_php4 from SuSE. 36222 by: Thomas Weber PHP_SELF - silly question 36224 by: Larry Hotchkiss "Authenticating" across sites/servers 36225 by: Boget, Chris 36227 by: Michael Kimsal 36230 by: Boget, Chris 36231 by: Andrew Hill 36239 by: Boget, Chris 36240 by: Alexander Wagner 36241 by: Kyle Jerviss Parse error 36226 by: Liam Gibbs 36228 by: Liam Gibbs 36229 by: Matt Williams Re: timeout of management session 36232 by: Simon Chambers Filereference and require() 36234 by: Rasmus Resen Amossen Waring message for FTP 36235 by: Simon Chambers 36238 by: Matthew Mundy Session problems 36236 by: Jimmy Bäckström 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] ----------------------------------------------------------------------
does anyone know where i can find a script that removes profanity and replaces them with a character (****)? my boos just came down on me because i told him we already had one, but apparently it doesnt work. thanks, colin
> does anyone know where i can find a script that removes profanity and > replaces them with a character (****)? > my boos just came down on me because i told him we already had one, but > apparently it doesnt work. There was a thread just a few days ago on this forum about this... So, search the archives for really good answers first. Probably the first question you have to ask yourself is where/when to filter? On input, before output, some other weird time? The filter itself is fairly simple. You get your $words from somewhere, like a database or file or maybe you could put a hidden microphone in the PHB's office. That way, you'd have the words he's most likely to try when he tests your filter. :-) Then, you iterate through that list of words and do something not unlike this: while (list(,$word) = each($nasties)){ $text = pregi_replace($word, '&%#@$^', $text); } Odds are really good I got the pregi_replace arguments wrong -- I usually do, and then I have to go read http://php.net/pregi_replace
> > Anyway, I only know what I read - I got to the scene to late to actually > > know this stuff first hand... hope this helps... and if someone who really > > was on the scene back then cares to comment/correct me, please do ;) > > I sort of do. ;) LOL :-) > tools for personal home pages, that meaning was also dropped. A name vote > ensued and all the proposed names sucked, so this PHP: Hypertext > Preprocessor name was deemed to suck the least. So that's where we are. Last time I checked, about six months ago?, if you dug around on http://php.net you could still find the old survey and the various suggestions that sucked worse than PHP: Hypertext Preprocessor. Students of history may wish to dig for that and archive it somewhere. Students of profanity, ditto :-) Be patient with me -- DSL died a few hours before store time, natch. Don't miss the Zend Web Store's Grand Opening on January 23, 2001! http://www.zend.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
If I have one input text box that when it is submitted to next page, I want to check first if it is nothing, then write "na" on next page, else just echo whatever it is, is it correct to do this? if ($fieldname == ""){ $fieldname ="na"; } ... (then come to the html bit below) <td><?php echo $fieldname ?></td> I wonder specificly about the check if it is null part if it is corerct. Any thoughts? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself"
In article <019301c08581$e9504080$6400a8c0@alsmpdc>, [EMAIL PROTECTED] ("Jacky@lilst") wrote: > If I have one input text box that when it is submitted to next page, I want > to check first if it is nothing, then write "na" on next page, else just > echo whatever it is, is it correct to do this? > > if (empty($fieldname)){ > $fieldname ="na"; > } You might also want to throw in a check for !isset($fieldname), either before the check for empty() or concurrent with it. -- CC
I would try: if (isset($fieldname) && empty($fieldname)){ // do something here with the variable } else { $fieldname="na"; } // if (isset($fieldname) && empty($fieldname)) Cal http://www.calevans.com -----Original Message----- From: Jacky@lilst [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 23, 2001 3:18 PM To: [EMAIL PROTECTED] Subject: [PHP] check null value If I have one input text box that when it is submitted to next page, I want to check first if it is nothing, then write "na" on next page, else just echo whatever it is, is it correct to do this? if ($fieldname == ""){ $fieldname ="na"; } ... (then come to the html bit below) <td><?php echo $fieldname ?></td> I wonder specificly about the check if it is null part if it is corerct. Any thoughts? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself"
I setup IPlanet Web Server Enterprise Edition 4.1 on a PC. I've got an example of PHP which is the one I'm using to test it. When it should execute the php file called from the main page it seems to download it instead of executing it. It all worked right with IIS and PWS. The PHP extension es linked to PHP.EXE, but.....sorry...could you tell me how to setup Shell CGI directories...?? I'm quite new in all this. When I fill the CGI field on iPlanet I get a Doctor Watson error, so what am I doing wrong? Why does it work on PWS and fails with iPlanet?? Thank you all for your help. > -----Mensaje original----- > De: Steve Edberg [SMTP:[EMAIL PROTECTED]] > Enviado el: lunes 22 de enero de 2001 18:19 > Para: Aguilar Peña, Javier; '[EMAIL PROTECTED]' > Asunto: Re: RV: [PHP] Does PHP works with Netscape Web Server or > IPlanet??? > > At 1:36 PM +0100 1/22/01, Aguilar Peña, Javier wrote: > >It's me again..... I've tried with IIS and PWS and everithing ok...but > not > >with Netscaspe which is the one I need. > > > I assume you're talking about Netscape on Windows? If so, yes it runs > fine, but only as a CGI - I used to have that setup until I moved to > an Apache/PHP module configuration. Off the top of my head, I had > > (1) set up Windows file associations to associate .php > extension with PHP.exe > (2) created Shell CGI directories for all my php scripts > > There was a better way that someone had come up with that avoided > step (1) by editing the mimetypes.conf (?) file and associating the > php extension with the php executable within Netscape, but I can't > remember that method offhand - it's been a while. > > Also, if you're looking for Netscape on Unix information, there used > to be a website that explained how to compile PHP to run as a NSAPI > module; unfortunately, that URL disappeared. I could dig up that info > for you anyway, if you're interested. > > Lastly, I believe that PHP4 comes with experimental NSAPI support; > check www.php.net or www.php4win.de > > - steve > > > >Thanks again. > > > >> -----Mensaje original----- > >> De: Aguilar Peña, Javier > >> Enviado el: lunes 22 de enero de 2001 13:31 > >> Para: '[EMAIL PROTECTED]' > >> Asunto: [PHP] Does PHP works with Netscape Web Server or IPlanet??? > >> > >> Does PHP works with Netscape Web Server or IPlanet??? > >> If it does.....HOW???? > >> > >> [EMAIL PROTECTED] > >> Thanks > > -- > +--- "They've got a cherry pie there, that'll kill ya" ------------------+ > | Steve Edberg University of California, Davis | > | [EMAIL PROTECTED] Computer Consultant | > | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | > +-------------------------------------- FBI Special Agent Dale Cooper ---+
To follow up: This is definitely the most low-tech (read reliable) way to do it. Just to clarify what Jørg is saying, create a frameset with two horizontal frames. The upper frame should be set to a height of "0", or "*", whatever your preference. The bottom frame should be given a height of "100%". Turn off borders etc. on your frames, and the casual user will not see any indication that there is a frameset. You can also use this technique to maintain JavaScript state between pages -- letting the upper frame store the objects values as you move around from page to page. But this should definitely cloak the true nature of the URL that is being seen. However, be aware that people will have problems with bookmarks to these pages. You can, if you want, create a "self-framing" javascript around bottom frame, such that if the bottom frame is loaded outside the cloaking frameset, it creates a frameset from scratch around itself. That's most elegant. Kristofer At 11.40 +0100 01-01-22, Jørg V. Bryne poked the keyboard as follows: >I saw this done with a frameset recently. The domain blah.com had a frameset >which opened the real page (at www.hotel.com/blahblah ) in a frame. > >-J >----- Original Message ----- >From: "AJDIN BRANDIC" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Monday, January 22, 2001 11:30 AM >Subject: [PHP] url hide > > >> Perhaps not related to php but I was wandering, is it possible to hide >> site's real url and replace it with something else (some other URL). ie. >> someone clicks on a link on www.blah.co.uk which takes the user to an >> designated area (ie. /house-search/) on www.foo.co.uk. I want >> the user still to see www.blah.co.uk. This is just for aesthetic reasons >> since ones the user finishes the search for houses (on > > www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. -- ______________________________________ Kristofer Widholm Web Pharmacy [EMAIL PROTECTED] 191 Grand Street, Brooklyn NY 11211 718.599.4893 ______________________________________
Surely you can't hide the url the browser requests. the best you can do is hide where that browser gets it's content from ... why not include()? Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -----Original Message----- > From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]] > Sent: 22 January 2001 10:31 > To: [EMAIL PROTECTED] > Subject: url hide > > > Perhaps not related to php but I was wandering, is it > possible to hide > site's real url and replace it with something else (some > other URL). ie. > someone clicks on a link on www.blah.co.uk which takes the user to an > designated area (ie. /house-search/) on www.foo.co.uk. I want > the user still to see www.blah.co.uk. This is just for > aesthetic reasons > since ones the user finishes the search for houses (on > www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. > > I have tried www.javascripts.com but no success?? > > Thanks > > Ajdin >
If you include a forreign url using the fopen etc. functions you must parse and alter all urls. A nightmare... -Jørg ----- Original Message ----- From: "Tim Ward" <[EMAIL PROTECTED]> To: "'AJDIN BRANDIC'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, January 23, 2001 10:09 AM Subject: [PHP] RE: url hide > Surely you can't hide the url the browser requests. the best you can do is > hide where that browser gets it's content from ... why not include()? > > Tim Ward > Senior Systems Engineer > > Please refer to the following disclaimer in respect of this message: > http://www.stivesdirect.com/e-mail-disclaimer.html > > > > -----Original Message----- > > From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]] > > Sent: 22 January 2001 10:31 > > To: [EMAIL PROTECTED] > > Subject: url hide > > > > > > Perhaps not related to php but I was wandering, is it > > possible to hide > > site's real url and replace it with something else (some > > other URL). ie. > > someone clicks on a link on www.blah.co.uk which takes the user to an > > designated area (ie. /house-search/) on www.foo.co.uk. I want > > the user still to see www.blah.co.uk. This is just for > > aesthetic reasons > > since ones the user finishes the search for houses (on > > www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. > > > > I have tried www.javascripts.com but no success?? > > > > Thanks > > > > Ajdin > > > > -- > PHP General 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] >
> > > > > > Perhaps not related to php but I was wandering, is it > > > possible to hide > > > site's real url and replace it with something else (some > > > other URL). ie. > > > someone clicks on a link on www.blah.co.uk which takes the user to an > > > designated area (ie. /house-search/) on www.foo.co.uk. I want > > > the user still to see www.blah.co.uk. This is just for > > > aesthetic reasons > > > since ones the user finishes the search for houses (on > > > www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. > > > > > > I have tried www.javascripts.com but no success?? you can use frame for doing this. for advanced people still can see the url but not newbie
> > > > Perhaps not related to php but I was wandering, is it > > > > possible to hide > > > > site's real url and replace it with something else (some > > > > other URL). ie. > > > > someone clicks on a link on www.blah.co.uk which takes the > user to an > > > > designated area (ie. /house-search/) on www.foo.co.uk. I want > > > > the user still to see www.blah.co.uk. This is just for > > > > aesthetic reasons > > > > since ones the user finishes the search for houses (on > > > > www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. > > > > > > > > I have tried www.javascripts.com but no success?? > > you can use frame for doing this. for advanced people still can > see the url but not newbie It just makes me wonder how 'advanced' you need to be to right click and select 'view properties'. (Or a similar simple action when using netrape) A frame also has some drawbacks, most important one being that a user, wherever he is on your site, always bookmarks the frame. It's something that would piss me off :) (Making me work, right click to find the real url I want to bookmakr, etc.) DHTML can do something like you want, but its complicated and not standard. (You can load the contents of URL A in a hidden frame, then replace the contents of the current document with the contents of the hidden frame.) Just forget about the whole idea already, each individual page should have an unique url, and that's the way it's supposed to be. -Sander
>If you want to be totally searchengine-safe, do not use variables on the >url, do not rely on cookies and do not rely on POST variables for the pages >you want to have the searchengine spider. How the heck do you build a dynamic site without URL variables, cookies, or POST variables? Kristofer -- ______________________________________ Kristofer Widholm Web Pharmacy [EMAIL PROTECTED] 191 Grand Street, Brooklyn NY 11211 718.599.4893 ______________________________________
At 09:23 23.01.2001, Kristofer Widholm said: --------------------[snip]-------------------- >>If you want to be totally searchengine-safe, do not use variables on the >>url, do not rely on cookies and do not rely on POST variables for the pages >>you want to have the searchengine spider. > >How the heck do you build a dynamic site without URL variables, >cookies, or POST variables? --------------------[snip]-------------------- You could, for example, use a 404 handler. Assume your site, www.yoursite.com, has an existing virtual directory /myapp. However this directory is empty, and directory browsing id forbidden. For this folder you setup a 404 handler that will be called by the web server whenever a folder or page cannot be found. Then you format your urls like this: http://www.yoursite.com/myapp/<PHPSESSID>/<theapp>.php/param1/param2/param3/ This URL does not exist and will be passed to the 404 handler. Within the 404 handler, parse the url, extract the session id and parameters, and execute the <theapp>.php file. Just as an example, ...ebird >O Ernest E. Vogelsinger (\) http://www.1-at-web.at/ ^ ICQ# 13394035
On Tuesday 23 January 2001 09:23, Kristofer Widholm wrote: > >If you want to be totally searchengine-safe, do not use variables on > > the url, do not rely on cookies and do not rely on POST variables for > > the pages you want to have the searchengine spider. > > How the heck do you build a dynamic site without URL variables, > cookies, or POST variables? Search phpbuilder.com for an article called "Writing dynamic pages with search engines in mind" or so. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match. - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him.
> > >If you want to be totally searchengine-safe, do not use variables on the > >url, do not rely on cookies and do not rely on POST variables > for the pages > >you want to have the searchengine spider. > > How the heck do you build a dynamic site without URL variables, > cookies, or POST variables? > > Kristofer One way would be to use the url path. Http://script.php/these/are/variables/passed/to/php You fool the searchengine, it thinks 'script.php' is a directory and its getting a file called 'php', but actually you're calling 'script.php' with '/these/are/variables/passed/to/php' as parameters.
Hi people, I apologize that this question might not be quite relevant to the list purpose and it is more to do with mysql though. But I thought it is quite basic problem that no so complex db issue so I just give it a go. Anyway, get into my problem. ****************************************************************** I have a table as shown below and when I tried to run the query ( direct at Mysql db, not from a php page) : INSERT INTO Hoteldetail VALUES ('test', 'thai', 'thai', '12', '11', '124', '', 'firstname', 'LastName', 'RoomProvided', '[EMAIL PROTECTED]'); I got an error said:"ERROR 1136: Column count doesn't match value count at row 1" +-----------------------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------------+---------------------+------+-----+---------+----------------+ | HotelID | bigint(20) unsigned | | PRI | 0 | auto_increment | | HotelName | varchar(30) | YES | | NULL | | | HotelLocation | varchar(30) | YES | | NULL | | | HotelCountry | varchar(20) | YES | | NULL | | | HotelPostcode | varchar(10) | YES | | NULL | | | HotelTelephone | varchar(20) | YES | | NULL | | | Hotelfax | varchar(20) | YES | | NULL | | | HotelURL | varchar(30) | YES | | NULL | | | HotelContactFirstName | varchar(20) | YES | | NULL | | | HotelContactLastName | varchar(30) | YES | | NULL | | | HotelRoomProvided | int(10) | YES | | NULL | | | HotelEmail | varchar(70) | YES | | NULL | | +-----------------------+---------------------+------+-----+---------+----------------+ ************************************************** what have I done wrong at the table? cheers Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself"
Jack, Your table have 12 columns, and you are trying to insert without specify in which columns, in sort that you should insert 12 values. Try: INSERT INTO Hoteldetail (HotelName,HotelLocation, HotelCountry, HotelPostcode, HotelTelephone,Hotelfax,HotelURL, HotelContactFirstName, HotelContactLastName, HotelRoomProvided, HotelEmail) VALUES ('test', 'thai', 'thai', '12', '11', '124', '', 'firstname', 'LastName', 'RoomProvided', '[EMAIL PROTECTED]'); > > ****************************************************************** > I have a table as shown below and when I tried to run the query ( direct at Mysql >db, not from a php page) : > INSERT INTO Hoteldetail VALUES ('test', 'thai', 'thai', '12', '11', '124', '', >'firstname', 'LastName', 'RoomProvided', '[EMAIL PROTECTED]'); > I got an error said:"ERROR 1136: Column count doesn't match value count at row 1" > > > >+-----------------------+---------------------+------+-----+---------+----------------+ > | Field | Type | Null | Key | Default | Extra > | > >+-----------------------+---------------------+------+-----+---------+----------------+ > | HotelID | bigint(20) unsigned | | PRI | 0 | >auto_increment | > | HotelName | varchar(30) | YES | | NULL | > | > | HotelLocation | varchar(30) | YES | | NULL | > | > | HotelCountry | varchar(20) | YES | | NULL | > | > | HotelPostcode | varchar(10) | YES | | NULL | > | > | HotelTelephone | varchar(20) | YES | | NULL | > | > | Hotelfax | varchar(20) | YES | | NULL | > | > | HotelURL | varchar(30) | YES | | NULL | > | > | HotelContactFirstName | varchar(20) | YES | | NULL | > | > | HotelContactLastName | varchar(30) | YES | | NULL | > | > | HotelRoomProvided | int(10) | YES | | NULL | > | > | HotelEmail | varchar(70) | YES | | NULL | > | > >+-----------------------+---------------------+------+-----+---------+----------------+ > > ************************************************** > > what have I done wrong at the table? > cheers > Jack > [EMAIL PROTECTED] > "There is nothing more rewarding than reaching the goal you set for yourself" > -- _______________________________________________ Get your free email from http://www.graffiti.net
I was trying to get dBase functions to work a couple of months ago. I activated the relevant line in php.ini (i can't remember which and I can't access the php.ini at the moment) which should have worked. I had to take it back out again as every php page hit was generating an error on the dll (php_dbase.dll?) saying it wasn't a recognised resource or somesuch. I asked the list but got no response. If the dBase facility simply doesn't work it would be nice to know. I'm now using MySQL but our back office systems are still in dBase so an answer would still be helpful. Sorry not to answer your question very well. If you can get it to work please let me know how. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -----Original Message----- > From: Piotr Duszynski [mailto:[EMAIL PROTECTED]] > Sent: 22 January 2001 12:38 > To: [EMAIL PROTECTED] > Subject: DBase functions > > > I have a problem connecting to dbase database. I use: > dbase_open("filename.dbf",0) and get from PHP: > Fatal error: Call to unsupported or undefined function > dbase_open() in ... > > What's the problem? > > -- > > Piotr Duszynski > > http://www.softomat.com.pl > http://filmomat.3miasto.pl > http://www.3miasto.pl >
Hi! When calling the php4 code below, sometimes the browser receives -the "HTML estandar text" -sometimes the "Text generated from PHP" (but NEVER both!) -and ocassionaly the error: "Warning: fopen("php://stdout","w") - Bad file descriptor in /home/sites/site74/web/_proc/pruebas/stdout-test.php on line 7 unable to open device" <html> <body> <p>HTML estandar text</p> <?php $fd = fopen ("php://stdout", "w") or die("unable to open device"); fwrite ($fd, "\nText generated from PHP"); fclose ($fd); ?> <p>HTML estandar text...</p> </body> </html> You can test in http://www.lanzarotedigital.com/_proc/pruebas/stdout-test.php (reload several times to see results). Can you help? Thanks a lot. Ruben.
Hi John! On Tue, 23 Jan 2001, John Hinsley wrote: > Got it in the end. It should be: > > <snip> > > > if ((preg_match("/Mozilla/i", "$agent")) && (preg_match("/Gecko/i", > "$agent"))) { > $result = "You are using Netscape 6 or a later version of Mozilla."; > > <snip> > > But the thought occurs that there must be a site out there somewhere > which lists the HTTP_USER_AGENT tags for *all* browsers? I've got a nice browsecap.ini file from php4win.de. You can then simply use get_browser() [ listed under Miscellaneous functions] -- teodor
Hi, I've attempted to add RC4 encryption / decryption facility in PHP. It's been tested on PHP4. It handles all the XORing and conversions while encrypting and decrypting also all urlencoding and decoding. It's been pretty fast also. I've written a tutorial on it, whatever it is : http://www.devhome.net/php/tutorials/230101.html It can be downloaed in TAR's and ZIP's from PHPClasses, or from devhome.net http://www.devhome.net/php/downloads/rc4crypt.zip http://phpclasses.upperdesign.com/browse.html/package/146 Check Out http://devhome.net for more goodies! ===== To find out more about me : http://www.geocities.com/mimodit My bookmarks are available @ http://mukul.free.fr __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/
Hi, I'm creating a little app whereby people will be able to create a simple site for themselves (maybe 10 html pages). here's the problem: say their company is called "companyname" and my site is called "www.mysite.com" i'd like their site to be located at "http://www.mysite.com/companyname" Is there a way i can do this without creating indivual folders for each company.I'd like the whole creation process to be automated. I'm sure the ftp functions in php would allow for the generation of new folders for each,but since all content/style etc. will be pulled from a DB it's seems to me a little pointless having all these folders with the same php page in each.essentially i'd like a php script to run automatically each time taking what looks like a folder name and making a call to the db using this name as a variable. easy,difficult or impossible? thanx, adrian
Yes, it can be done. No it's not easy. No, it's not advisable. Mixing content like that is a recipe for disaster. If you feel you absolutely must do it without creating dirs, consider putting the content of the pages in a database. Cal http://www.calevans.com -----Original Message----- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 23, 2001 5:32 AM To: [EMAIL PROTECTED] Subject: [PHP] Non-existant folders?? Hi, I'm creating a little app whereby people will be able to create a simple site for themselves (maybe 10 html pages). here's the problem: say their company is called "companyname" and my site is called "www.mysite.com" i'd like their site to be located at "http://www.mysite.com/companyname" Is there a way i can do this without creating indivual folders for each company.I'd like the whole creation process to be automated. I'm sure the ftp functions in php would allow for the generation of new folders for each,but since all content/style etc. will be pulled from a DB it's seems to me a little pointless having all these folders with the same php page in each.essentially i'd like a php script to run automatically each time taking what looks like a folder name and making a call to the db using this name as a variable. easy,difficult or impossible? thanx, adrian -- PHP General 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 you can do that by assigning custom error pages if you use apache. if you have access to the hhtp.conf place this in it : ErrorDocument 404 /redirect.php is you can't access httpd.conf you can hope that you are allowed to overide it by a .htaccess.... in redirect.php you need to parse the $REDIRECT_SCRIPT_URI to know what the user wanted to see..... also you have to send a header("HTTP/1.1 200 OK");. otherwise apache will ad 404 by itself an IE will display it's stupid own errormessages.... sebastian > Hi, > I'm creating a little app whereby people will be able to > create a simple > site for themselves (maybe 10 html pages). > here's the problem: > say their company is called "companyname" and my site is called > "www.mysite.com" i'd like their site to be located at > > "http://www.mysite.com/companyname" > > Is there a way i can do this without creating indivual > folders for each > company.I'd like the whole creation process to be automated. > I'm sure the ftp functions in php would allow for the > generation of new > folders for each,but since all content/style etc. will be > pulled from a DB > it's seems to me a little pointless having all these folders > with the same > php page in each.essentially i'd like a php script to run > automatically each > time taking what looks like a folder name and making a call > to the db using > this name as a variable. > easy,difficult or impossible? > thanx, > adrian > > > -- > PHP General 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] >
>>>>> "AM" == "Adrian Murphy" <[EMAIL PROTECTED]> writes: > Hi, I'm creating a little app whereby people will be able to create > a simple site for themselves (maybe 10 html pages). here's the > problem: say their company is called "companyname" and my site is > called "www.mysite.com" i'd like their site to be located at > "http://www.mysite.com/companyname" > Is there a way i can do this without creating indivual folders for > each company.I'd like the whole creation process to be automated. > I'm sure the ftp functions in php would allow for the generation of > new folders for each,but since all content/style etc. will be > pulled from a DB it's seems to me a little pointless having all > these folders with the same php page in each.essentially i'd like a > php script to run automatically each time taking what looks like a > folder name and making a call to the db using this name as a > variable. easy, difficult or impossible? thanx, adrian Hiyah, It Depends on your web server. If you're using Apache then you can do it with a few lines in your config file using mod_rewrite. Something similar to: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^/([^/]+)/(.*) /scripts/$2 [E=companyname:$1] </IfModule> Which given a url such as http://yoursite.com/mycompany/index.php should (I've not tested it) call /scripts/index.php with the environment variable 'companyname' set to 'mycompany'. You then use this in all your SQL queries. -robin -- Robin Vickery............................................... Planet-Three, 3A West Point, Warple Way, London, W3 0RG, UK Email: [EMAIL PROTECTED] Phone: +44 (0)870 729 5444
Hi all I'm having a slight little problem .. I can't seem to solve.. I have a multiple select form .. that i select mutiple options from and then it creates a variable called $select now if I display $select .. I only get the last selected value .. here foloows test code.. <? if ($select==""){ print" <form method=\"post\" name=\"select\" action=\"test.php3\"> <SELECT MULTIPLE NAME=\"select\"> <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla <Option Selected VALUE=\"Cookie\">Cookie Batter <Option VALUE=\"Blueberry\">Vanilla/Blueberry <Option VALUE=\"Caramel\">Caramel Swirl <Option VALUE=\"Other\">Other... </select><br> <input type=\"submit\" name=\"send\" value=\"test\"> </form> "; }else{ print $select; } ?> I'm de missing something ... can sombody please lend a hand .. thanks Henti Smith
hey, since u are slecting multiple options you'll have to use an array here's how.i u need explanation,feel free to mail me: <? if ($select==""){ print" <form method=\"post\" name=\"select\" action=\"test.php3\"> <SELECT MULTIPLE NAME=\"select[]\"> <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla <Option Selected VALUE=\"Cookie\">Cookie Batter <Option VALUE=\"Blueberry\">Vanilla/Blueberry <Option VALUE=\"Caramel\">Caramel Swirl <Option VALUE=\"Other\">Other... </select><br> <input type=\"submit\" name=\"send\" value=\"test\"> </form> "; }else{ ///count array $num = count($select); file://loop through array for($i = 0;$i <$num;$i++){ print $select[$i] . "<br>"; } } ?> ----- Original Message ----- From: <[EMAIL PROTECTED]> To: PHP list <[EMAIL PROTECTED]> Sent: Tuesday, January 23, 2001 11:42 AM Subject: [PHP] multple select forms... going to hit my head against a wall .. > Hi all > > I'm having a slight little problem .. I can't seem to solve.. > > I have a multiple select form .. that i select mutiple options from and then it creates a variable called $select > now if I display $select .. I only get the last selected value .. here foloows test code.. > > <? > if ($select==""){ > print" > <form method=\"post\" name=\"select\" action=\"test.php3\"> > <SELECT MULTIPLE NAME=\"select\"> > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > <Option Selected VALUE=\"Cookie\">Cookie Batter > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > <Option VALUE=\"Caramel\">Caramel Swirl > <Option VALUE=\"Other\">Other... > </select><br> > <input type=\"submit\" name=\"send\" value=\"test\"> > </form> > "; > > }else{ > > print $select; > > } > ?> > > I'm de missing something ... can sombody please lend a hand .. thanks > > Henti Smith > > > -- > PHP General 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] >
Having soved this .. thanks .. now for the next question .. *grin* I have the $select ... but I only use it on the next page .. heheh so I'm trying the following .. <input type=\"hidden\" name=\"select\" value=\"$select\"> which of course doens't work .. nor does <input type=\"hidden\" name=\"select[]" value=\"$select\"> any idea on how to pass an array on in an input field in a form ? Henti On Tue, Jan 23, 2001 at 12:01:40PM -0000, Adrian Murphy wrote: > hey, > since u are slecting multiple options you'll have to use an array > here's how.i u need explanation,feel free to mail me: > > <? > if ($select==""){ > print" > <form method=\"post\" name=\"select\" action=\"test.php3\"> > <SELECT MULTIPLE NAME=\"select[]\"> > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > <Option Selected VALUE=\"Cookie\">Cookie Batter > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > <Option VALUE=\"Caramel\">Caramel Swirl > <Option VALUE=\"Other\">Other... > </select><br> > <input type=\"submit\" name=\"send\" value=\"test\"> > </form> > "; > > }else{ > > ///count array > $num = count($select); > > file://loop through array > for($i = 0;$i <$num;$i++){ > print $select[$i] . "<br>"; > } > } > ?> > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: PHP list <[EMAIL PROTECTED]> > Sent: Tuesday, January 23, 2001 11:42 AM > Subject: [PHP] multple select forms... going to hit my head against a wall > .. > > > > Hi all > > > > I'm having a slight little problem .. I can't seem to solve.. > > > > I have a multiple select form .. that i select mutiple options from and > then it creates a variable called $select > > now if I display $select .. I only get the last selected value .. here > foloows test code.. > > > > <? > > if ($select==""){ > > print" > > <form method=\"post\" name=\"select\" action=\"test.php3\"> > > <SELECT MULTIPLE NAME=\"select\"> > > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > > <Option Selected VALUE=\"Cookie\">Cookie Batter > > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > > <Option VALUE=\"Caramel\">Caramel Swirl > > <Option VALUE=\"Other\">Other... > > </select><br> > > <input type=\"submit\" name=\"send\" value=\"test\"> > > </form> > > "; > > > > }else{ > > > > print $select; > > > > } > > ?> > > > > I'm de missing something ... can sombody please lend a hand .. thanks > > > > Henti Smith > > > > > > -- > > PHP General 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 General 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] >
Try either: ?> <input type="hidden" name="select" value="<?php echo $select; ?>" <?php OR printf ("input type=\"hidden\" name=\"select\" value=\"%s\">", $select); HTH Jon -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 23 January 2001 12:27 To: Adrian Murphy Cc: PHP list Subject: Re: [PHP] multple select forms... going to hit my head against a wall .. Having soved this .. thanks .. now for the next question .. *grin* I have the $select ... but I only use it on the next page .. heheh so I'm trying the following .. <input type=\"hidden\" name=\"select\" value=\"$select\"> which of course doens't work .. nor does <input type=\"hidden\" name=\"select[]" value=\"$select\"> any idea on how to pass an array on in an input field in a form ? Henti On Tue, Jan 23, 2001 at 12:01:40PM -0000, Adrian Murphy wrote: > hey, > since u are slecting multiple options you'll have to use an array > here's how.i u need explanation,feel free to mail me: > > <? > if ($select==""){ > print" > <form method=\"post\" name=\"select\" action=\"test.php3\"> > <SELECT MULTIPLE NAME=\"select[]\"> > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > <Option Selected VALUE=\"Cookie\">Cookie Batter > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > <Option VALUE=\"Caramel\">Caramel Swirl > <Option VALUE=\"Other\">Other... > </select><br> > <input type=\"submit\" name=\"send\" value=\"test\"> > </form> > "; > > }else{ > > ///count array > $num = count($select); > > file://loop through array > for($i = 0;$i <$num;$i++){ > print $select[$i] . "<br>"; > } > } > ?> > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: PHP list <[EMAIL PROTECTED]> > Sent: Tuesday, January 23, 2001 11:42 AM > Subject: [PHP] multple select forms... going to hit my head against a wall > .. > > > > Hi all > > > > I'm having a slight little problem .. I can't seem to solve.. > > > > I have a multiple select form .. that i select mutiple options from and > then it creates a variable called $select > > now if I display $select .. I only get the last selected value .. here > foloows test code.. > > > > <? > > if ($select==""){ > > print" > > <form method=\"post\" name=\"select\" action=\"test.php3\"> > > <SELECT MULTIPLE NAME=\"select\"> > > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > > <Option Selected VALUE=\"Cookie\">Cookie Batter > > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > > <Option VALUE=\"Caramel\">Caramel Swirl > > <Option VALUE=\"Other\">Other... > > </select><br> > > <input type=\"submit\" name=\"send\" value=\"test\"> > > </form> > > "; > > > > }else{ > > > > print $select; > > > > } > > ?> > > > > I'm de missing something ... can sombody please lend a hand .. thanks > > > > Henti Smith > > > > > > -- > > PHP General 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 General 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 General 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]
hey, in your form do this: <?php $num = count($select); for($i = 0;$i <$num;$i++){ <input type=\"hidden\" name=\"select[]\" value=\"$select[$i]\"> } ?> then on the nex page use the same code i.e: $num = count($select); for($i = 0;$i <$num;$i++){ print $select[$i] . "<br>"; } g'luck. ----- Original Message ----- From: <[EMAIL PROTECTED]> To: Adrian Murphy <[EMAIL PROTECTED]> Cc: PHP list <[EMAIL PROTECTED]> Sent: Tuesday, January 23, 2001 12:26 PM Subject: Re: [PHP] multple select forms... going to hit my head against a wall .. > Having soved this .. thanks .. now for the next question .. *grin* > > I have the $select ... but I only use it on the next page .. heheh > so I'm trying the following .. > > <input type=\"hidden\" name=\"select\" value=\"$select\"> > > which of course doens't work .. nor does > > <input type=\"hidden\" name=\"select[]" value=\"$select\"> > > any idea on how to pass an array on in an input field in a form ? > > Henti > > > > On Tue, Jan 23, 2001 at 12:01:40PM -0000, Adrian Murphy wrote: > > hey, > > since u are slecting multiple options you'll have to use an array > > here's how.i u need explanation,feel free to mail me: > > > > <? > > if ($select==""){ > > print" > > <form method=\"post\" name=\"select\" action=\"test.php3\"> > > <SELECT MULTIPLE NAME=\"select[]\"> > > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > > <Option Selected VALUE=\"Cookie\">Cookie Batter > > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > > <Option VALUE=\"Caramel\">Caramel Swirl > > <Option VALUE=\"Other\">Other... > > </select><br> > > <input type=\"submit\" name=\"send\" value=\"test\"> > > </form> > > "; > > > > }else{ > > > > ///count array > > $num = count($select); > > > > file://loop through array > > for($i = 0;$i <$num;$i++){ > > print $select[$i] . "<br>"; > > } > > } > > ?> > > ----- Original Message ----- > > From: <[EMAIL PROTECTED]> > > To: PHP list <[EMAIL PROTECTED]> > > Sent: Tuesday, January 23, 2001 11:42 AM > > Subject: [PHP] multple select forms... going to hit my head against a wall > > .. > > > > > > > Hi all > > > > > > I'm having a slight little problem .. I can't seem to solve.. > > > > > > I have a multiple select form .. that i select mutiple options from and > > then it creates a variable called $select > > > now if I display $select .. I only get the last selected value .. here > > foloows test code.. > > > > > > <? > > > if ($select==""){ > > > print" > > > <form method=\"post\" name=\"select\" action=\"test.php3\"> > > > <SELECT MULTIPLE NAME=\"select\"> > > > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > > > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > > > <Option Selected VALUE=\"Cookie\">Cookie Batter > > > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > > > <Option VALUE=\"Caramel\">Caramel Swirl > > > <Option VALUE=\"Other\">Other... > > > </select><br> > > > <input type=\"submit\" name=\"send\" value=\"test\"> > > > </form> > > > "; > > > > > > }else{ > > > > > > print $select; > > > > > > } > > > ?> > > > > > > I'm de missing something ... can sombody please lend a hand .. thanks > > > > > > Henti Smith > > > > > > > > > -- > > > PHP General 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 General 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] > > >
ummmm ... $select is an array .. so echo $select will just produce "array" .. On Tue, Jan 23, 2001 at 12:44:20PM -0000, Jon Haworth wrote: > Try either: > > ?> > <input type="hidden" name="select" value="<?php echo $select; ?>" > <?php > > OR > > printf ("input type=\"hidden\" name=\"select\" value=\"%s\">", > $select); > > > HTH > Jon > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 23 January 2001 12:27 > To: Adrian Murphy > Cc: PHP list > Subject: Re: [PHP] multple select forms... going to hit my head against > a wall .. > > > Having soved this .. thanks .. now for the next question .. *grin* > > I have the $select ... but I only use it on the next page .. heheh > so I'm trying the following .. > > <input type=\"hidden\" name=\"select\" value=\"$select\"> > > which of course doens't work .. nor does > > <input type=\"hidden\" name=\"select[]" value=\"$select\"> > > any idea on how to pass an array on in an input field in a form ? > > Henti > > > > On Tue, Jan 23, 2001 at 12:01:40PM -0000, Adrian Murphy wrote: > > hey, > > since u are slecting multiple options you'll have to use an array > > here's how.i u need explanation,feel free to mail me: > > > > <? > > if ($select==""){ > > print" > > <form method=\"post\" name=\"select\" action=\"test.php3\"> > > <SELECT MULTIPLE NAME=\"select[]\"> > > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > > <Option Selected VALUE=\"Cookie\">Cookie Batter > > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > > <Option VALUE=\"Caramel\">Caramel Swirl > > <Option VALUE=\"Other\">Other... > > </select><br> > > <input type=\"submit\" name=\"send\" value=\"test\"> > > </form> > > "; > > > > }else{ > > > > ///count array > > $num = count($select); > > > > file://loop through array > > for($i = 0;$i <$num;$i++){ > > print $select[$i] . "<br>"; > > } > > } > > ?> > > ----- Original Message ----- > > From: <[EMAIL PROTECTED]> > > To: PHP list <[EMAIL PROTECTED]> > > Sent: Tuesday, January 23, 2001 11:42 AM > > Subject: [PHP] multple select forms... going to hit my head against a wall > > .. > > > > > > > Hi all > > > > > > I'm having a slight little problem .. I can't seem to solve.. > > > > > > I have a multiple select form .. that i select mutiple options from and > > then it creates a variable called $select > > > now if I display $select .. I only get the last selected value .. here > > foloows test code.. > > > > > > <? > > > if ($select==""){ > > > print" > > > <form method=\"post\" name=\"select\" action=\"test.php3\"> > > > <SELECT MULTIPLE NAME=\"select\"> > > > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > > > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > > > <Option Selected VALUE=\"Cookie\">Cookie Batter > > > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > > > <Option VALUE=\"Caramel\">Caramel Swirl > > > <Option VALUE=\"Other\">Other... > > > </select><br> > > > <input type=\"submit\" name=\"send\" value=\"test\"> > > > </form> > > > "; > > > > > > }else{ > > > > > > print $select; > > > > > > } > > > ?> > > > > > > I'm de missing something ... can sombody please lend a hand .. thanks > > > > > > Henti Smith > > > > > > > > > -- > > > PHP General 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 General 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 General 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 General 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] >
Sorry, my bad. I should have spotted the cunning way he used the word "array", really :-) Eyes closing. More coffee. <glug> aaaaaahaaaaaahhhhhhhrrrggggghhhhhhh Cheers Jon -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 23 January 2001 12:45 To: Jon Haworth Cc: '[EMAIL PROTECTED]' Subject: Re: [PHP] multple select forms... going to hit my head against a wall .. ummmm ... $select is an array .. so echo $select will just produce "array" .. On Tue, Jan 23, 2001 at 12:44:20PM -0000, Jon Haworth wrote: > Try either: > > ?> > <input type="hidden" name="select" value="<?php echo $select; ?>" > <?php > > OR > > printf ("input type=\"hidden\" name=\"select\" value=\"%s\">", > $select); > > > HTH > Jon > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 23 January 2001 12:27 > To: Adrian Murphy > Cc: PHP list > Subject: Re: [PHP] multple select forms... going to hit my head against > a wall .. > > > Having soved this .. thanks .. now for the next question .. *grin* > > I have the $select ... but I only use it on the next page .. heheh > so I'm trying the following .. > > <input type=\"hidden\" name=\"select\" value=\"$select\"> > > which of course doens't work .. nor does > > <input type=\"hidden\" name=\"select[]" value=\"$select\"> > > any idea on how to pass an array on in an input field in a form ? > > Henti > > > > On Tue, Jan 23, 2001 at 12:01:40PM -0000, Adrian Murphy wrote: > > hey, > > since u are slecting multiple options you'll have to use an array > > here's how.i u need explanation,feel free to mail me: > > > > <? > > if ($select==""){ > > print" > > <form method=\"post\" name=\"select\" action=\"test.php3\"> > > <SELECT MULTIPLE NAME=\"select[]\"> > > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > > <Option Selected VALUE=\"Cookie\">Cookie Batter > > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > > <Option VALUE=\"Caramel\">Caramel Swirl > > <Option VALUE=\"Other\">Other... > > </select><br> > > <input type=\"submit\" name=\"send\" value=\"test\"> > > </form> > > "; > > > > }else{ > > > > ///count array > > $num = count($select); > > > > file://loop through array > > for($i = 0;$i <$num;$i++){ > > print $select[$i] . "<br>"; > > } > > } > > ?> > > ----- Original Message ----- > > From: <[EMAIL PROTECTED]> > > To: PHP list <[EMAIL PROTECTED]> > > Sent: Tuesday, January 23, 2001 11:42 AM > > Subject: [PHP] multple select forms... going to hit my head against a wall > > .. > > > > > > > Hi all > > > > > > I'm having a slight little problem .. I can't seem to solve.. > > > > > > I have a multiple select form .. that i select mutiple options from and > > then it creates a variable called $select > > > now if I display $select .. I only get the last selected value .. here > > foloows test code.. > > > > > > <? > > > if ($select==""){ > > > print" > > > <form method=\"post\" name=\"select\" action=\"test.php3\"> > > > <SELECT MULTIPLE NAME=\"select\"> > > > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > > > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > > > <Option Selected VALUE=\"Cookie\">Cookie Batter > > > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > > > <Option VALUE=\"Caramel\">Caramel Swirl > > > <Option VALUE=\"Other\">Other... > > > </select><br> > > > <input type=\"submit\" name=\"send\" value=\"test\"> > > > </form> > > > "; > > > > > > }else{ > > > > > > print $select; > > > > > > } > > > ?> > > > > > > I'm de missing something ... can sombody please lend a hand .. thanks > > > > > > Henti Smith > > > > > > > > > -- > > > PHP General 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 General 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 General 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 General 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 General 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]
If you don't put it in a session var, and need to transport it you can use f. x. : <input type=hidden name='user_selections' value='<?=implode( "||", $select )?>'> This puts double pipe-chars between the array variables. You can later (when u need to use the vars again) use: $select = explode( "||", $user_selections ); to put it into an array again. -J ----- Original Message ----- From: <[EMAIL PROTECTED]> To: "Adrian Murphy" <[EMAIL PROTECTED]> Cc: "PHP list" <[EMAIL PROTECTED]> Sent: Tuesday, January 23, 2001 1:26 PM Subject: Re: [PHP] multple select forms... going to hit my head against a wall .. > Having soved this .. thanks .. now for the next question .. *grin* > > I have the $select ... but I only use it on the next page .. heheh > so I'm trying the following .. > > <input type=\"hidden\" name=\"select\" value=\"$select\"> > > which of course doens't work .. nor does > > <input type=\"hidden\" name=\"select[]" value=\"$select\"> > > any idea on how to pass an array on in an input field in a form ? > > Henti > > > > On Tue, Jan 23, 2001 at 12:01:40PM -0000, Adrian Murphy wrote: > > hey, > > since u are slecting multiple options you'll have to use an array > > here's how.i u need explanation,feel free to mail me: > > > > <? > > if ($select==""){ > > print" > > <form method=\"post\" name=\"select\" action=\"test.php3\"> > > <SELECT MULTIPLE NAME=\"select[]\"> > > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > > <Option Selected VALUE=\"Cookie\">Cookie Batter > > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > > <Option VALUE=\"Caramel\">Caramel Swirl > > <Option VALUE=\"Other\">Other... > > </select><br> > > <input type=\"submit\" name=\"send\" value=\"test\"> > > </form> > > "; > > > > }else{ > > > > ///count array > > $num = count($select); > > > > file://loop through array > > for($i = 0;$i <$num;$i++){ > > print $select[$i] . "<br>"; > > } > > } > > ?> > > ----- Original Message ----- > > From: <[EMAIL PROTECTED]> > > To: PHP list <[EMAIL PROTECTED]> > > Sent: Tuesday, January 23, 2001 11:42 AM > > Subject: [PHP] multple select forms... going to hit my head against a wall > > .. > > > > > > > Hi all > > > > > > I'm having a slight little problem .. I can't seem to solve.. > > > > > > I have a multiple select form .. that i select mutiple options from and > > then it creates a variable called $select > > > now if I display $select .. I only get the last selected value .. here > > foloows test code.. > > > > > > <? > > > if ($select==""){ > > > print" > > > <form method=\"post\" name=\"select\" action=\"test.php3\"> > > > <SELECT MULTIPLE NAME=\"select\"> > > > <Option VALUE=\"Chocolate\">Chocolate/Chocolate Chip > > > <Option VALUE=\"Peanut\">Peanut Brittle/Vanilla > > > <Option Selected VALUE=\"Cookie\">Cookie Batter > > > <Option VALUE=\"Blueberry\">Vanilla/Blueberry > > > <Option VALUE=\"Caramel\">Caramel Swirl > > > <Option VALUE=\"Other\">Other... > > > </select><br> > > > <input type=\"submit\" name=\"send\" value=\"test\"> > > > </form> > > > "; > > > > > > }else{ > > > > > > print $select; > > > > > > } > > > ?> > > > > > > I'm de missing something ... can sombody please lend a hand .. thanks > > > > > > Henti Smith > > > > > > > > > -- > > > PHP General 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 General 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 General 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'm having some problem's here.... I'm need to know if my apache server is able to run scripts in a specific date and hour. For example: Every month, in the 15th day, I need to run a script PHP that check my Mysql database for some cause. Is that possible??? I'm realy thanks!!! Bruno de F. F City: Belo Horizonte Estate: Minas Gerais Country: Brazil
Hey Bruno, Information to generally setup a cron tab : How do I set up a cron job on Linux? ------------------------------------------------------------------- http://www.faqts.com/knowledge_base/view.phtml/aid/1005/fid/436 In regards to php : How can I make a PHP script be called from the cron daemon? ------------------------------------------------------------------- http://www.faqts.com/knowledge_base/view.phtml/aid/80/fid/32 Also, search mailing list for word 'cron' and many results will come about. Here's a link to such a search : http://marc.theaimsgroup.com/?l=php-general&w=2&r=1&s=cron&q=b Good luck! (this is a quote for Philip Olson) -----Oorspronkelijk bericht----- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Namens Bruno Freire Verzonden: Tuesday, January 23, 2001 1:53 PM Aan: '[EMAIL PROTECTED]' CC: '[EMAIL PROTECTED]' Onderwerp: [PHP] help!!! (PHP) Hi ... I'm having some problem's here.... I'm need to know if my apache server is able to run scripts in a specific date and hour. For example: Every month, in the 15th day, I need to run a script PHP that check my Mysql database for some cause. Is that possible??? I'm realy thanks!!! Bruno de F. F City: Belo Horizonte Estate: Minas Gerais Country: Brazil
Use cron for this - put the following in your crontab ("crontab -e") to run a script everyday at midnite: 0 0 * * * lynx -source http://www.server.com/script_to_run_every_night.php man crontab will tell you how to run on different days, etc. --Joe On Tue, Jan 23, 2001 at 09:53:13AM -0300, Bruno Freire wrote: > Hi ... > I'm having some problem's here.... > I'm need to know if my apache server is able to run scripts in a specific > date and hour. > > For example: > > Every month, in the 15th day, I need to run a script PHP that check my Mysql > database for some cause. > Is that possible??? > > I'm realy thanks!!! > > > Bruno de F. F > > City: Belo Horizonte > Estate: Minas Gerais > Country: Brazil -- Joe Stump, PHP Hacker [EMAIL PROTECTED] http://www.miester.org/
Hi ... I'm having some problem's here.... I'm need to know if my apache server is able to run scripts in a specific date and hour. For example: Every month, in the 15th day, I need to run a script PHP that check my Mysql database for some cause. Is that possible??? I'm realy thanks!!! Bruno de F. F City: Belo Horizonte Estate: Minas Gerais Country: Brazil
If you're running on a unix-type system you can set up a cron job for this. If you're running on Windows you may be able to do something via the task scheduler, but I'm not sure about this. HTH Jon -----Original Message----- From: Bruno Freire [mailto:[EMAIL PROTECTED]] Sent: 23 January 2001 12:55 To: '[EMAIL PROTECTED]' Subject: [PHP] apache doubt!!!! Hi ... I'm having some problem's here.... I'm need to know if my apache server is able to run scripts in a specific date and hour. For example: Every month, in the 15th day, I need to run a script PHP that check my Mysql database for some cause. Is that possible??? I'm realy thanks!!! Bruno de F. F City: Belo Horizonte Estate: Minas Gerais Country: Brazil
try the CGI version of PHP and call that executable without using your Apache At 9:55 AM -0300 1/23/01, Bruno Freire wrote: >Hi ... >I'm having some problem's here.... >I'm need to know if my apache server is able to run scripts in a specific >date and hour. > >For example: > >Every month, in the 15th day, I need to run a script PHP that check my Mysql >database for some cause. >Is that possible??? > >I'm realy thanks!!! > > >Bruno de F. F > >City: Belo Horizonte >Estate: Minas Gerais >Country: Brazil -- Thierry Coopman - [EMAIL PROTECTED] My opinions are personal, and have really nothing or nothing to do with Keytrade! You know that you are drinking too much coffee if: ... You go to sleep just so you can wake up and smell the coffee.
Hi everybody, it's me again..... Does anybody know how to setup PHP on a iPlanet Web Server (or Netscape Web Server)???? HEELPPP I post a few messages from yesterday. Could you help me???
Hi I'm trying to split a string into an array but keep getting the following message: Warning: unexpected regex error (13) in z:/www_root/staff.php on line 34 The code is just $query_string = split("+",$search); where $search is from a form. Any clues?? TIA M@
Hello Matt, (MW == "Matt Williams") [EMAIL PROTECTED] writes: MW> $query_string = split("+",$search); $query_string = explode('+', $search); -Brian
At 7:33 AM -0500 1/23/01, Brian Clark wrote: >Hello Matt, > >(MW == "Matt Williams") [EMAIL PROTECTED] writes: > >MW> $query_string = split("+",$search); > >$query_string = explode('+', $search); > >-Brian > Just to explain the error - split() takes a regular expression for its first argument; '+' is a special character for regular expressions, and is not valid by itself. That's why you're getting an error. For more info on regular expressions, there have been links to good tutorials that pop up from time to time on this list; also, I think there are a few references mentioned in the online docs for the ereg_ and preg_ functions. You can also get the O'Reilly book 'Mastering regular expressions.' That being said, though, explode() is probably a better function to use here. If you don't need the functionality of regexps, explode() is faster. -steve -- +--- "They've got a cherry pie there, that'll kill ya" ------------------+ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +-------------------------------------- FBI Special Agent Dale Cooper ---+
Sorry for it isnt PHP related, but maybe someone can answer or point where to look I have some disagreement with one person about method="post"... Is this possible and good use as action html files: for example - > process form data to other page via html... Cant find answer nowhere... always are only server side form handler... AnnA
Here is the difference between method="post" and method="get" - "get" passes the variables on the url (ie script.php?var1=foo&var2=foobar) and "post" passes them behind the scenes. They both have the same effect. The difference is that if a user reloads the page with a "get" request it reloads without any noticable effect to the user, on the other hand, a reload on a "post" request will pop up the "You must repost the previous form. [ OK ] [ Cancel ]" message. --Joe On Tue, Jan 23, 2001 at 02:13:26PM +0200, Anna wrote: > Sorry for it isnt PHP related, but maybe someone can answer or point where > to look > > I have some disagreement with one person about method="post"... Is this > possible and good use as action html files: for example - > process form > data to other page via html... > > Cant find answer nowhere... always are only server side form handler... > > AnnA > > > -- > PHP General 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] -- Joe Stump, PHP Hacker [EMAIL PROTECTED] http://www.miester.org/
I think you are asking if you can use client side JavaScript to handle a form. www.irt.org has some good examples of this in their JavaScript FAQ section. Try http://developer.irt.org/script/form.htm#10.3 for "Interactions between forms in different frames or windows" >>> Anna <[EMAIL PROTECTED]> 01/23/01 06:13AM >>> Sorry for it isnt PHP related, but maybe someone can answer or point where to look I have some disagreement with one person about method="post"... Is this possible and good use as action html files: for example - > process form data to other page via html... Cant find answer nowhere... always are only server side form handler... AnnA -- PHP General 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]
howdy again :) does anybody knwo how to pass an array via forms using something like <input type=\"hidden\" name=\"client_services\" value=\"$client_services\"> where $client_services is an array ? Hetni
serialise it using serialize() - see under chapter 12 of the PHP manual 'Miscellaneous functions' -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 23 January 2001 12:42 To: PHP list Subject: [PHP] passing arrays via forms .. howdy again :) does anybody knwo how to pass an array via forms using something like <input type=\"hidden\" name=\"client_services\" value=\"$client_services\"> where $client_services is an array ? Hetni -- PHP General 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, Can anyone tell me how to turn off the bottom scrollbar in both IE and Netscape?? TIA Ade
Dare I say..... don't design your page so it's wider than the browser? <img src="foo.gif" width="3000" height="1"> is asking for trouble.... :-) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 23 January 2001 13:18 To: [EMAIL PROTECTED] Subject: [PHP] Turning off scrollbar Hi, Can anyone tell me how to turn off the bottom scrollbar in both IE and Netscape?? TIA Ade -- PHP General 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]
Hello Website4S, (Wac == "[EMAIL PROTECTED]") [EMAIL PROTECTED] writes: Wac> Can anyone tell me how to turn off the bottom scrollbar in both Wac> IE and Netscape?? Check all of your table widths (use percentages or a width of around 550) and validate your HTML. http://validator.w3.org/ Your content is causing the page to scroll horizontally. It has nothing to do with PHP or any browser settings. Wac> TIA Wac> Ade -Brian
Hi All I have tried to get this to work but it does not produce any output in the browser - why $i = 1; while ($i) { if(connection_aborted()) break; echo $i; echo "<BR>"; $i++; sleep(1); //usleep(1000); } It turns out that the sleep and usleep does not return as far as I can tell. If I use usleep the wait time parameter have no affect on program execution ?? Tried this on both Windows and Linux. Benny
I have to add that I am using the latest PHP version. It was Windows and Linux servers I was talking about. usleep work in the way that it return right away without any sleep time. Benny ""Benny Nissen"" <[EMAIL PROTECTED]> skrev i en meddelelse 94k0ql$em$[EMAIL PROTECTED]">news:94k0ql$em$[EMAIL PROTECTED]... > Hi All > > I have tried to get this to work but it does not produce any output in the > browser - why > > $i = 1; > while ($i) > { > if(connection_aborted()) > break; > > echo $i; > echo "<BR>"; > $i++; > > sleep(1); > //usleep(1000); > } > > It turns out that the sleep and usleep does not return as far as I can tell. > If I use usleep the wait time parameter have no affect on program execution > ?? > Tried this on both Windows and Linux. > > Benny > > > > -- > PHP General 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 can I extract the information about email attachments using the IMAP-functions? -- ********************************************** * Jochen Kächelin * * Ihr WEBberater - Werbeagentur Pulvermüller * * Stuttgarter Str. 3 - D-73033 Göppingen * * www.wa-p.de - mailto:[EMAIL PROTECTED] * **********************************************
On 23 Jan 2001 06:36:02 -0800, Jochen Kächelin <[EMAIL PROTECTED]> wrote: >How can I extract the information >about email attachments using the IMAP-functions? Use imap_fetchstructure(). It returns a pretty large array, so you'll probably want to spend some quality time with the documentation and print_r() getting all of the details. One nice thing if you're making a webmail interface is that you won't need to worry too much about mime-types - those can be passed through to the browser, which can figure out anything from text/plain to video/quicktime.
I'd like to stop using sybase entirely, but that's a discussion for another day, here's the actual issue I'm having. An old site we've had for a while stopped working today after we upgraded to PHP 4.0.4PL1. We have a .shtml page doing a virtual include on two php pages (banner rotations, etc). The php pages work fine if they are called by themselves, but when included in an SSI manner, they cause a segfault. In order to track this down, I looked at the php files we were incluing through SSI. Turns out that the error went away when I changed sybase_connect to sybase_pconnect. So here's the complete list. Apache segfaults (page contains no data) when sybase_connect is called in a php page included through SSI, but sybase_pconnect works just fine. I know this because I used die() before and after the sybase_connect, and the segfault *only* occured when I tried to die after making the sybase connection. This brings me to believe there is a bug somewhere in the sybase_connect code. Fixed in the recent cvb? Ideas? -- +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ | Shaun M. Thomas INN Database Programmer | | Phone: (309) 743-0812 Fax : (309) 743-0830 | | Email: [EMAIL PROTECTED] AIM : trifthen | | Web : hamster.lee.net | | | | "Most of our lives are about proving something, either to | | "ourselves or to someone else." | | -- Anonymous | +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
Is there a way to remove all cookies so matter what path they were set as long as it was from me (ex. in my parent directory). i need this because i was screwing around with setting cookies in different paths but now i cant get rid of one. Thanks! - Noah
Addressed to: "Noah Spitzer-Williams" <[EMAIL PROTECTED]> [EMAIL PROTECTED] ** Reply to note from "Noah Spitzer-Williams" <[EMAIL PROTECTED]> Tue, 23 Jan 2001 10:09:22 -0500 > > Is there a way to remove all cookies so matter what path they were > set as long as it was from me (ex. in my parent directory). i need > this because i was screwing around with setting cookies in different > paths but now i cant get rid of one. If you are using Netscape, go into Edit - Preferences - Advanced, and disable cookies. Save that change. Then go back in and re-enable them. There is a side effect, _all_ cookies will be deleted. or Exit Netscape. Find your cookies.txt file, and edit it with your favorite text editor. Be careful if you change the length of stuff, but I've had good luck removing individual cookies by delete line. I am sure there are equivalent operations for IE, but I can't tell you how to do them. Rick Widmer Internet Marketing Specialists http://www.developersdesk.com
Hi, I wonder whether anyone can shed some light onto this for me... Say I have this example insert: $sql = "INSERT INTO songs (id,name,url) VALUES ('','Foobar','test.php?id=<id>)"; The id is autoincrement so obviously left blank, yet I'd like to put it into the url where <id> is. How do I go about dragging back the id even though it is being created (I suppose) while the statement is being made -- is it possible or do I have to do something hackish? Sorry if that's a simple problem... Regards, Robert Morrissey
If you are using mysql as your database, you can use mysql_insert_id. See http://www.php.net/manual/en/function.mysql-insert-id.php for more info :) HTH Sam Masiello Systems Analyst Chek.Com (716) 853-1362 x289 [EMAIL PROTECTED] -----Original Message----- From: Robert Morrissey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 23, 2001 10:17 AM To: [EMAIL PROTECTED] Subject: [PHP] ID value Hi, I wonder whether anyone can shed some light onto this for me... Say I have this example insert: $sql = "INSERT INTO songs (id,name,url) VALUES ('','Foobar','test.php?id=<id>)"; The id is autoincrement so obviously left blank, yet I'd like to put it into the url where <id> is. How do I go about dragging back the id even though it is being created (I suppose) while the statement is being made -- is it possible or do I have to do something hackish? Sorry if that's a simple problem... Regards, Robert Morrissey -- PHP General 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]
Hello everyone: I started playing around with some php scripts a while ago and became hooked on it. I have a few books but I'm afraid I'm a learn by example kind of person and get stuck at times. While working on my wife's site I made headers, footers, navigation and a little MySQL database for her yarns with a small database administration module and so on. The thing is that I would like to have the site divided into directories by subject and have the same template load every time , but my logic tells me that I have to have an index.php3 per directory and have to do this process every time I add a subject. I would like to spend my time working on one document and add ifs, whiles and elses than doing that. I have read most of the class.Fast.Template, fast.Template stuff, but if there is an example on how to do this I'm missing it. As far as I can tell I can only create one document and I can't find how to manage URLS to other documents with the same template I wish I could get help on this! Rergards: Gerry Figueroa
I'm not sure if I fully understand what you want to do, but I don't see why you need a seperate index.php for each of your directories. Can't the index.php script pull content from any number of different directories?, eg: index.php?page=dir1/stuff index.php?page=dir2/stuff index.php/page=dir3/stuff Sorry if I've missed the point Michael On Tue, 23 Jan 2001, Gerry wrote: > Hello everyone: > > I started playing around with some php scripts a while ago and became > hooked on it. I have a few books but I'm afraid I'm a learn by example > kind of person and get stuck at times. > > While working on my wife's site I made headers, footers, navigation and > a little MySQL database for her yarns with a small database > administration module and so on. The thing is that I would like to have > the site divided into directories by subject and have the same template > load every time , but my logic tells me that I have to have an > index.php3 per directory and have to do this process every time I add a > subject. I would like to spend my time working on one document and add > ifs, whiles and elses than doing that. > > I have read most of the class.Fast.Template, fast.Template stuff, but > if there is an example on how to do this I'm missing it. As far as I can > tell I can only create one document and I can't find how to manage URLS > to other documents with the same template > > I wish I could get help on this! > > Rergards: > > Gerry Figueroa > > -- > PHP General 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] > >
At 11:58 AM -0700 on 1/23/01, Gerry wrote: >I have read most of the class.Fast.Template, fast.Template stuff, but >if there is an example on how to do this I'm missing it. As far as I can >tell I can only create one document and I can't find how to manage URLS >to other documents with the same template > >I wish I could get help on this! If you want to see something in print, there's a good example of FastTemplate's usage found in the "Professional PHP Programming" book by Wrox. Between that and the online tutorials, (see below) I was able to get up to speed. <http://www.phpbuilder.com/columns/sascha19990316.php3> <http://phpbuilder.net/columns/kendall20001122.php3> Gawain
Hi Mick: You wrote: > Can't the > index.php script pull content from any number of different directories?, > eg: > > index.php?page=Yarns/stuff > index.php?page=Rovings/stuff > index.php/page=dir3/stuff Well the thing is that there is probably a few ways to do this and I thought of the way you just presented to me. I can see a redirect to page=Yarns/stuff. What is stuff by the way? Where do I find this script? My way of doing this (novice way), is I made my index.php and added variables to call the header, navigation, content and footer. The content is loaded with a variable like include "content.html"; not much to it but at this point is useless if I have to do this inside every directory (eg. Yarns/index.php3) add all the variables and also place a content.html in every directory. I can see I'm doing it all wrong now. All I need is to be able to learn how to load everything from a script and how to call the script with a URL to the directory. eg. <? if (Yarns/) { include "header,nav, fetch content,footer"; else "?"; } ?> <a href="http://mysite.com/Yarns/"> Yarns</a> Right! I can see this would not work, because I'm missing some things. Don't worry if you got it wrong, I don't know if you did! I wish it where this simple anyway. Thanks! Gerry Figueroa
Can anyone tell me how to up the max. execution time in PHP? I know it's been said before, but I can't remember how it's done. Liam
On 23 Jan 2001 07:47:03 -0800, Liam Gibbs <[EMAIL PROTECTED]> wrote: >Can anyone tell me how to up the max. execution time in PHP? I know it's = >been said before, but I can't remember how it's done. You can change the value max_execution_time in php.ini, or your apache configuration files. If you only want to increase or disable the limit in a single script, try set_time_limit().
put this line set_time_limit(500) ; at the beginning of your script if you want to enlarge execution time for 500 seconds. ----- Original Message ----- From: "Liam Gibbs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 23, 2001 4:48 PM Subject: [PHP] Maximum execution time Can anyone tell me how to up the max. execution time in PHP? I know it's been said before, but I can't remember how it's done. Liam
Kyle Jerviss wrote: > Yeek! Not quite what I meant. I don't think that web servers have any > business being on windows boxes. I was wondering if there were a way to > upload using something like scp from a windows (or other) browser to a > unix server. There is a nice program WinSCP at http://winscp.vse.cz It provides interface similar to Norton Commander, one panel is your local disk, second remote directory accesed via scp. ----------------------------------------------------------------- Jirka Kosek e-mail: [EMAIL PROTECTED] http://www.kosek.cz
Can anyone direct me to some up-to-date documentation on how to install (and then use) the Pear included in the distribution? There seems to be minimal (and perhaps outdated or inappropriate?) install instructions included with the source distribution, but I've found nothing on how to use it. Dean.
Alex Black wrote: > No SGML editors out there with a tag catalog, etc? You can use Emacs with PSGML package. It is very productive environment, if you do not need WYSIWYG. If you want more comfortable and more WYSIWYG you can try XMetaL from SoftQuad or Epic from ArborText. ----------------------------------------------------------------- Jirka Kosek e-mail: [EMAIL PROTECTED] http://www.kosek.cz
Teodor Cimpoesu wrote: > my follow-up was from an suggest of using <% though :) > it exists in C, ASP and JSP. We have it in PHP, why not use it? Because it is not compatible with XML syntax. Following is incorrect in XML, because '<' has very restricted usage: <tag> <% echo Date("d.m.Y") %> </tag> If you use <?php instead, it is perfect XML and you can use any XML editor or other tool to work with document: <tag> <?php echo Date("d.m.Y") ?> </tag> ----------------------------------------------------------------- Jirka Kosek e-mail: [EMAIL PROTECTED] http://www.kosek.cz
When using PHP 4 as a CGI module I get the following error trying to use sessions: Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 What does this error mean? This only occurs if cookies are disabled. I pass the session id via a hidden tag within a POST form. <?php $thisses=session_id(); echo "<input type=\"HIDDEN\" NAME=\"PHPSESSID\" VALUE=\"$thisses\"> ?> thanks for any help, bill
Hey - I'm using PHP 4.0.4pl1 w/ Apache 1.3.14 on Solaris 2.6. PHP was compiled with GD (1.8.3), jpeg (6b), png (1.0.8), and freetype (1.3.1) I'm trying to overlay text on a existing png graphic, which works, but the color depth seems to be getting reduced. Page info in Netscape shows that the button is a 16bit "TrueColor" image, but the resulting image is much lower in visual colordepth (if not actual color depth). Check out.. http://www.umich.edu/~liamr/button.png vs http://www.umich.edu/~liamr/blue.png (the png it uses to generate that file) Any ideas on why it does this or how to fix it? Liam
On Tue, 23 Jan 2001, Liam Hoekenga wrote: > Hey - > > I'm using PHP 4.0.4pl1 w/ Apache 1.3.14 on Solaris 2.6. > PHP was compiled with GD (1.8.3), jpeg (6b), png (1.0.8), and freetype > (1.3.1) > > I'm trying to overlay text on a existing png graphic, which works, but the > color depth seems to be getting reduced. Page info in Netscape shows that > the button is a 16bit "TrueColor" image, but the resulting image is much > lower in visual colordepth (if not actual color depth). GD's png support only uses indexed color palettes, so you're limited to 8bit color. One possible option is to use php_imlib, which uses Imlib2 instead of GD for manipulating images. Since Imlib2 does everything in 32bit ARGB space, it'll do what you want. What I'm not sure about is if Imlib2 will build on Solaris.. http://mmcc.cx/php_imlib/ Matt
Hi, I am trying to dynamically create WML pages using PHP and mysql. I can get the PHP to output WML however I am having problems with postfields. They do not seem to be populating the $HTTP_POST_VARS array. Has anyone come across this before and no why this is the case. I could create the query string myself and create links in the code but as far as I can tell the postfield should send variables through to the script. TIA Al -- ----- Alastair Binns Programmer Lawton eMarketing 4 Grosvenor Square Southampton SO15 2BE Email: [EMAIL PROTECTED] Tel: 023 8082 8560 Fax: 023 8082 8566 A division of Lawton Communications Group Ltd www.lawton.co.uk ----- EMAIL DISCLAIMER: The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee and access to the e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients, any opinions or advice contained in this e-mail are subject to the terms and conditions expressed in the governing client engagement letter or contract.
Look.... I justs wanna make that password box show up in the screen.... But without a protected directory... Thanks Bruno
Try this: <? function authUser($username,$password,$realm,$message) { if (isset($GLOBALS["PHP_AUTH_USER"]) && (($GLOBALS["PHP_AUTH_USER"] != $username) || ($GLOBALS["PHP_AUTH_PW"] != $password))) { header("WWW-Authenticate: Basic realm=\"$realm\""); header("HTTP/1.0 401 Unauthorized"); echo $message; exit; } elseif (!isset($GLOBALS["PHP_AUTH_USER"])) { header("WWW-Authenticate: Basic realm=\"$realm\""); header("HTTP/1.0 401 Unauthorized"); echo $message; exit; } return true; } authUser("test","test","mine","You are not permited to access this area!<BR><BR>try:<BR>password : test<BR>username : test"); $title = "Password"; echo "OK, you can look at this page!"; ?> -----Original Message----- From: Bruno Freire [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 23, 2001 10:45 AM To: '[EMAIL PROTECTED]' Subject: [PHP] HELP!!! $PHP_AUTH_USER!!!!!! Look.... I justs wanna make that password box show up in the screen.... But without a protected directory... Thanks Bruno
I wrote a message earlier about sybase_connect having issues, but it appears it's more than that. We had also recently upgraded to mysql 3.23. After downgrading mysql, sybase went back to normal in all cases. Can't say I can explain it, but that's what happened. Does this mean mysql 3.23 is simply not supported in php 4.04PL1? -- +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ | Shaun M. Thomas INN Database Programmer | | Phone: (309) 743-0812 Fax : (309) 743-0830 | | Email: [EMAIL PROTECTED] AIM : trifthen | | Web : hamster.lee.net | | | | "Most of our lives are about proving something, either to | | "ourselves or to someone else." | | -- Anonymous | +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
Hey guys and gals! I have my personal site on go.com, and I wanna move it. The problem is I don't have it all backed up on my machine (I think I only have some of the images), but I want to move it to my server at work. Does anyone know of a script of some sort that will go to my site, copy all the files to a specified folder, and follow my internal links? Thanks for the info. Jason
At 12:05 PM 1/23/2001, Jason Jacobs wrote: on linux use wget on windows use websnake. both are available somewhere on the net. wget is at freshmeat and websnake is available at download.com ~kurth >Hey guys and gals! I have my personal site on go.com, and I wanna move it. >The problem is I don't have it all backed up on my machine (I think I only >have some of the images), but I want to move it to my server at work. Does >anyone know of a script of some sort that will go to my site, copy all the >files to a specified folder, and follow my internal links? Thanks for the >info. > >Jason > > >-- >PHP General 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 try to use the shared memory functions on a SuSE Linux 7.0 server with Apache and mod_php4 out of the box installed with yast. For shmop i need to configure PHP with --enable-shmop with isn't enabled in this installation. I know how to enable this when compiling and installing the source of mod_php4, what is to difficult for me, i think. But how to enable it in the SuSE-RPM-Distribution? I found a mod_php4.spec in /usr/src/packages/SPECS in wich the configuration options are, butr i don't know how to use it to install this RPM with my own configuration. Can anyone help me? Sincerly, --- Thomas Weber CYNOBIA Community Online Service AG Kühbachstraße 11 81543 München fon 089-78 06 0(280) fax 089-78 06 01 99 email [EMAIL PROTECTED] net http://www.CYNOBIA.de
Im a little brain fried today and I have a silly question. I have a script (imagine that huh?) that I want to pull some code out of and put in a function that is contained in a seperate file. The function however inlcudes some lines with $PHP_SELF in a link (a href). When I remove the code from the running script and include it in a function file seperate from the script the function works fine as far as generating links etc, but when the link that includes $PHP_SELF is selected, the file of the running script is not passed. So in other words, when I have my function code in my running script, it generates some links that limit a query on a mysql database and pass data to PHP_SELF, the passed URL looks like this (for example): http://69.02.217.123/php4/php.exe/searchitem.php?sql=SELECT+%2A+FROM+items+WHERE+LCASE%28partnumber%29+LIKE+%27x%25%27+ORDER+BY+partnumber+&offset=100&numpage=3 But, when I move the code to create the links externally into a function, the link I end up with is like this: http://69.02.217.123/?sql=SELECT+%2A+FROM+items+WHERE+LCASE%28partnumber%29+LIKE+%27x%25%27+ORDER+BY+partnumber+&offset=100&numpage=3 Can someone shed some light on the best way to handle this? -- Larry H.
I've been charged with trying to find out how something like this can be done if it is at all in fact possible. The info I'm hoping to get is what would be involved and where I can find information on it. I'm not asking for code or examples unless you really want to provide them. :P Anyways, what we need to be able to do is the following: * Have a user be able to authenticate on a *trusted* partner website that resides on a server external to our network. * Have that external website securely transmit information (preferrably not on the URL :p) with regards to the authentication information on that user; the auth info will be the same on both servers. This would allow the user streamlined access to the areas on our website that would otherwise require the user to log in without forcing them to do so. * The other aspect to the above that we also need to address is when a user signs up for the first time on the trusted partner's site, that signup information should be securely transmitted to us when/if the user attempts to access our site so we could set them up in the database and authenticate them by nature of the above. Is something like this possible? What would be involved? Is there something that is already built into Apache/PHP that would make it easier? Someone suggested XML database transfer, but I've never heard of XML being anything other than a markup language much less capable of storing data? It was also suggested that we use something like public key/private key but am not sure how that would work... We are using: Apache 1.3.12 PHP 4.0.3pl1 PHP4 Session based (not HTTP basic) authentication using mySql to store the ID/PW I realize the security implications of something like this and have brought them up myself. However, it's something that is being pushed and so I've got to look into it (and I don't even really know where to start) so please don't say it's stupid because I already know. :) Is something like this possible? What's involved? Where can I go to learn more? Thanks! Chris
Have the user log in to/authenticate against the first server. That server generates a key, based on combining the username and a private key known to the authenticating server and your servers. Pass that back to your servers in a URL - cookie wouldn't work, but the key in the URL should be sufficiently garbled so as to not be decipherable easily. Have your server decipher the key based on the private key shared between the servers. You should then have the user name, which you can then use internally to your system however you need to. (double check that username IS valid, for starters). You might also want to search google for info on how microsoft's passport service works - but I think this is cookie based, and is limited in its functionality. "Boget, Chris" wrote: > I've been charged with trying to find out how something > like this can be done if it is at all in fact possible. The info > I'm hoping to get is what would be involved and where I > can find information on it. I'm not asking for code or > examples unless you really want to provide them. :P > > Anyways, what we need to be able to do is the following: > > * Have a user be able to authenticate on a *trusted* partner > website that resides on a server external to our network. > > * Have that external website securely transmit information > (preferrably not on the URL :p) with regards to the > authentication information on that user; the auth info > will be the same on both servers. This would allow the > user streamlined access to the areas on our website that > would otherwise require the user to log in without forcing > them to do so. > > * The other aspect to the above that we also need to address is > when a user signs up for the first time on the trusted partner's > site, that signup information should be securely transmitted to > us when/if the user attempts to access our site so we could set > them up in the database and authenticate them by nature of the > above. > > Is something like this possible? What would be involved? Is > there something that is already built into Apache/PHP that > would make it easier? Someone suggested XML database transfer, > but I've never heard of XML being anything other than a markup > language much less capable of storing data? It was also suggested > that we use something like public key/private key but am not sure > how that would work... > > We are using: > > Apache 1.3.12 > PHP 4.0.3pl1 > PHP4 Session based (not HTTP basic) authentication using mySql > to store the ID/PW > > I realize the security implications of something like this and have > brought them up myself. However, it's something that is being > pushed and so I've got to look into it (and I don't even really know > where to start) so please don't say it's stupid because I already know. > :) Is something like this possible? What's involved? Where can I go > to learn more? > > Thanks! > > Chris
> Have the user log in to/authenticate against the first server. > That server generates a key, based on combining the username > and a private key known to the authenticating server and your > servers. > Pass that back to your servers in a URL - cookie wouldn't > work, but the key in the URL should be sufficiently garbled so > as to not be decipherable easily. > Have your server decipher the key based on the private key > shared between the servers. You should then have the user > name, which you can then use internally to your system however > you need to. (double check that username IS valid, for starters). One other thing that I forgot to include in my previous message as a concern of mine and it relates to the above. If we did it that way, someone who was listening to a port on the client's server, or who came by later to use the same machine the client was using previously to do this could get this somehow encrypted information and log in as the previous user since we wouldn't require authentication because said authentication would have already been done on the trusted website. So essentially a 3rd party could concievably obtain this information that was posted with the URL (which is why I didn't want to pass this information via GET) to access our site and wreak havoc. I definitely want to minimize this possibility. > You might also want to search google for info on how > microsoft's passport service works - but I think this is > cookie based, and is limited in its functionality. Ok, I'll check it out. Thanks! Chris
Also, you can check the value of $HTTP_REFERER for the ip of the trusted host, to further eliminate the potential. Best regards, Andrew ---------------------------------------------------- Andrew Hill Director Technology Evangelism OpenLink Software http://www.openlinksw.com XML & E-Business Infrastructure Technology Provider > -----Original Message----- > From: Michael Kimsal [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 23, 2001 12:32 PM > To: Boget, Chris > Cc: Php (E-mail) > Subject: Re: [PHP] "Authenticating" across sites/servers > > > Have the user log in to/authenticate against the first server. > That server generates a key, based on combining the username and a private > key known to the authenticating server and your servers. > Pass that back to your servers in a URL - cookie wouldn't work, > but the key > in the URL should be sufficiently garbled so as to not be decipherable > easily. > Have your server decipher the key based on the private key shared between > the servers. You should then have the user name, which you can then use > internally to your system however you need to. (double check that username > IS valid, for starters). > > You might also want to search google for info on how microsoft's passport > service works - but I think this is cookie based, and is limited in its > functionality. > > > > "Boget, Chris" wrote: > > > I've been charged with trying to find out how something > > like this can be done if it is at all in fact possible. The info > > I'm hoping to get is what would be involved and where I > > can find information on it. I'm not asking for code or > > examples unless you really want to provide them. :P > > > > Anyways, what we need to be able to do is the following: > > > > * Have a user be able to authenticate on a *trusted* partner > > website that resides on a server external to our network. > > > > * Have that external website securely transmit information > > (preferrably not on the URL :p) with regards to the > > authentication information on that user; the auth info > > will be the same on both servers. This would allow the > > user streamlined access to the areas on our website that > > would otherwise require the user to log in without forcing > > them to do so. > > > > * The other aspect to the above that we also need to address is > > when a user signs up for the first time on the trusted partner's > > site, that signup information should be securely transmitted to > > us when/if the user attempts to access our site so we could set > > them up in the database and authenticate them by nature of the > > above. > > > > Is something like this possible? What would be involved? Is > > there something that is already built into Apache/PHP that > > would make it easier? Someone suggested XML database transfer, > > but I've never heard of XML being anything other than a markup > > language much less capable of storing data? It was also suggested > > that we use something like public key/private key but am not sure > > how that would work... > > > > We are using: > > > > Apache 1.3.12 > > PHP 4.0.3pl1 > > PHP4 Session based (not HTTP basic) authentication using mySql > > to store the ID/PW > > > > I realize the security implications of something like this and have > > brought them up myself. However, it's something that is being > > pushed and so I've got to look into it (and I don't even really know > > where to start) so please don't say it's stupid because I already know. > > :) Is something like this possible? What's involved? Where can I go > > to learn more? > > > > Thanks! > > > > Chris > > > -- > PHP General 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] > >
> Also, you can check the value of $HTTP_REFERER for the ip of > the trusted host, to further eliminate the potential. How do you get the IP out of $HTTP_REFERER? As far as I know, that only tells you the referring url, not the ip address. And couldn't that value be messed with? Chris
Boget, Chris wrote: > > > Also, you can check the value of $HTTP_REFERER for the ip of > > the trusted host, to further eliminate the potential. > > How do you get the IP out of $HTTP_REFERER? As far as I know, > that only tells you the referring url, not the ip address. This is correct. But you could extract the hostname and do a dns-lookup, if you wish. But the hostname should suffice, shouldn't it? > And couldn't > that value be messed with? Sure it can. It is sended by the browser, so the client (or proxy-servers) can maniulate or delete it. Anyway, it's from the wrong side of the trust boundary. Wagner -- One maniac alone can do what 20 together cannot
Here is an idea I had, but will require that all the sites in question maintain very accurate clock synchronization, but doesn't require any database writes. It assumes that the passwords are stored using MySQL's PASSWORD("") function. $user_table="website.authorized_users"; $now=gmmktime(); $interval=300; $rnow=$now-($now%$interval); $persist=6; function auth_hash($user,$pass){ global $user_table,$rnow; $q='SELECT PASSWORD("'.$pass.'") as p1, password as p2 FROM '. $user_table.' WHERE username="'.$user.'"'; $r=mysql_query($q); $row=mysql_fetch_array($r); if($row[p1]==$row[p2]){ $retval=mhash(MHASH_MD5,$user.$row[p2].$rnow); }else{ $retval=FALSE; } return $retval; } function auth_logon($key,$user){ global $user_table,$rnow,$persist,$interval; $q='SELECT password FROM '.$user_table.' WHERE username="'.$user.'"'; $r=mysql_query($q); $row=mysql_fetch_array($r); for($i=0;$i<=$persist;$i++){ $str=$user.$row[password].($rnow-($interval*$i)); $hash=mhash(MHASH_MD5,$str); if($key==$hash){ return TRUE; } } return FALSE; } "Boget, Chris" wrote: > > I've been charged with trying to find out how something > like this can be done if it is at all in fact possible. The info > I'm hoping to get is what would be involved and where I > can find information on it. I'm not asking for code or > examples unless you really want to provide them. :P > > Anyways, what we need to be able to do is the following: > > * Have a user be able to authenticate on a *trusted* partner > website that resides on a server external to our network. > > * Have that external website securely transmit information > (preferrably not on the URL :p) with regards to the > authentication information on that user; the auth info > will be the same on both servers. This would allow the > user streamlined access to the areas on our website that > would otherwise require the user to log in without forcing > them to do so. > > * The other aspect to the above that we also need to address is > when a user signs up for the first time on the trusted partner's > site, that signup information should be securely transmitted to > us when/if the user attempts to access our site so we could set > them up in the database and authenticate them by nature of the > above. > > Is something like this possible? What would be involved? Is > there something that is already built into Apache/PHP that > would make it easier? Someone suggested XML database transfer, > but I've never heard of XML being anything other than a markup > language much less capable of storing data? It was also suggested > that we use something like public key/private key but am not sure > how that would work... > > We are using: > > Apache 1.3.12 > PHP 4.0.3pl1 > PHP4 Session based (not HTTP basic) authentication using mySql > to store the ID/PW > > I realize the security implications of something like this and have > brought them up myself. However, it's something that is being > pushed and so I've got to look into it (and I don't even really know > where to start) so please don't say it's stupid because I already know. > :) Is something like this possible? What's involved? Where can I go > to learn more? > > Thanks! > > Chris
Should probably put the whole thing. Why does this produce a parse error (I know that include statements do weird things to if structures): if($username != "") { <code> <code> <code> } else { include("file.php3"); }
Which line is producing the error?? M@ > -----Original Message----- > From: Liam Gibbs [mailto:[EMAIL PROTECTED]] > Sent: 23 January 2001 17:32 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Parse error > > > Should probably put the whole thing. > > Why does this produce a parse error (I know that include > statements do weird > things to if structures): > > if($username != "") { > <code> > <code> > <code> > } else { > include("file.php3"); > } > > > -- > PHP General 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, Can anyone point me in the right direction ? : I have inherited some PHP code and the problem is that it times out of the management session after 10 minutes. Do I need to change code or php system variables? Thanks v much Simon _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
I have a file, lets call it genericfile.php, containing a require("a_specific_file"); Now, I want to use (thats include) genericfile.php in many of my other .php-files in the WHOLE directorytree. The problem is that "a_specific_file" can't be found trough genericfile.php if this is included someplace other in the directory tree. How can I tell php not to make defaultpath to the toplevel require() funcion call? -- Rasmus Resen Amossen | stud.mat.dat at the University of Copenhagen Jagtvej 120, -244 | http://www.math.ku.dk/muh 2200 Kbh. N | http://w1.1444.telia.com/~u144400001
Hi, I have developed a small php program which creates a directory on a remote ftp site, which works fine. The problem is that when the directory is creted it displays the message: Warning: ftp_mkdir: MKD command successful. How can i get rid of this warning message? Thanks Simon p.s. i dont know if it helps but the related code is $login_result = ftp_login($conn_id, "User", "Password"); // check connection if ((!$conn_id) || (!$login_result)) { echo "Ftp connection has failed!"; echo "Attempted to connect "; die; } else { # echo "Connected for user "; } $temp = ftp_mkdir($conn_id, $uploadtag); _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
try @ftp_mkdir($conn_id, $uploadtag); On Tue, 23 Jan 2001, Simon Chambers wrote: > Hi, > > I have developed a small php program which creates a directory on a remote > ftp site, which works fine. The problem is that when the directory is creted > it displays the message: > > Warning: ftp_mkdir: MKD command successful. > > How can i get rid of this warning message? > > Thanks > > Simon > > p.s. i dont know if it helps but the related code is > > $login_result = ftp_login($conn_id, "User", "Password"); > > // check connection > if ((!$conn_id) || (!$login_result)) { > echo "Ftp connection has failed!"; > echo "Attempted to connect "; > die; > } else { > # echo "Connected for user "; > } > > $temp = ftp_mkdir($conn_id, $uploadtag); > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > > -- > PHP General 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] >
Yo! I'm playing a little bit with sessions for the moment and I get a really scary errormessage: Warning: open(/tmp\sess_1b7577b36d874741ed1e74b4bead0dfd, O_RDWR) failed: m (2) in h:\program\apache\htdocs/boa/sessionTest.php on line 5 Warning: open(/tmp\sess_1b7577b36d874741ed1e74b4bead0dfd, O_RDWR) failed: m (2) in Unknown on line 0 Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 I understand that there is a folder missing somewhere (tmp) and I tried to create one in the apache directory, but it still does not work. I'm using Win2k proffesional with an apache webserver and I don't have a clue what changes I should do to php.ini. Please help! /Broder B