RE: [PHP] Login verification
i would think you could just use crypt() to check the pass against what you read in from the file -Original Message- From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 2:27 AM To: PHP-General List Subject: [PHP] Login verification I want to make a login page in PHP, which will check the user/password against the system's user/password file (in my case, /etc/passwd and /etc/shadow.) With the machine running PAM, how can I have PHP do this? Keep in mind I don't need to modify anything, just verify the login. Once verified, the script either continues on to doing other things, or it bombs with a bad login page. -- H | Life is the art of drawing without an eraser. - John Gardner + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 Director of Internet Operations / SysAdmin. 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- 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] Re: mail() w/ mailing lists
[EMAIL PROTECTED] (_lallous) wrote: Hello, Is is advisable that I mail lots of users from a database via one call to mail() ? why not make a loop and send to one email at a time. if you have over 1000 I would use something else than mail(), ex direct to smtp with sockets. Is there is a way to tell if the mail was returned because the email address was invalid? you can do a syntax check on the email before sending, but AFAIK you cant check if the email address exists on the domain you are sending to (bacause not all mailsevers give that info / not all sysadmins want to give that info). -- Henrik Hansen -- 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]
RE: [PHP] Everything between something becomes an array element
U question was : Everything __between something___ becomes an array element What is wrong with answer : tag[1]= tdtabletrtdfoo/tdtdbar/td/tr/table tag[2]= tdfoo/tdtdbar/td :-))) AK-Original Message- AKFrom: Andrey Hristov [mailto:[EMAIL PROTECTED]] AKSent: Tuesday, November 06, 2001 5:18 PM AKTo: [EMAIL PROTECTED] AKCc: [EMAIL PROTECTED] AKSubject: Re: [PHP] Everything between something becomes an array element AK AK AKBut watch this... AKbody AKtabletrtdtabletrtdfoo/tdtdbar/td/tr/table/ AKtr/table AKtabletrtdfoo bar/td/tr/table AK/body AK AKI think that the return result will be AKtrtdtabletrtdfoo/tdtdbar/td/tr/table/tr/table AKtabletrtdfoo bar/td/tr AK AKWhy? Beacuse you set PCRE to be greedy. I think that there is no AKeasy way to AKsolve the problem with nested tr tags. AK AKRegards, AK AKAndrey Hristov AKWeb Developer AKIcygen Corporation AKBUILDING SOLUTIONS AKhttp://www.icygen.com AK AK AKOn Tuesday 06 November 2001 02:57 am, you wrote: AK Here is right implememtation of all i see AK AK ? AK $co=0; AK $str=trtdtabletrtdfoo/tdtdbar/td/tr/table/tr; AK echo pre; AK GetTagElements($str); AK echo /pre; AK AK function GetTagElements($str) AK { AK global $co; AK if ($co++){echo tag[.($co-1).]= .htmlentities($str).br;} AK AK AK AK$how=preg_match_all('~\tr\(.*)\/tr\~',$str,$var_match,PREG_SE AKT_ORDER); AK if ($how) AK for ($i=1;$icount($vr=$var_match[0]);$i++) AK { AK GetTagElements($vr[$i]); AK } AK else return 0; AK } AK AK ? AK AK -Original Message- AK From: Andrey Hristov [mailto:[EMAIL PROTECTED]] AK Sent: Monday, November 05, 2001 11:13 PM AK To: [EMAIL PROTECTED] AK Subject: Re: [PHP] Everything between something becomes an AKarray element AK AK AK Sorry AK AK $how=preg_match_all('|\tr(.*?)/tr\|',$the_big_string,$matches, AK PREG_SET_O AK RDER); AK AK is the correct I think AK AK Excuses AK AK On Monday 05 November 2001 08:57 am, you wrote: AK It gives me an error: AK AK Warning: Compilation failed: nothing to repeat at offset 7 in AK c:\www\innocenti\teste.php on line 17 AK AKI think that 'offset' is like a letter from the regex, but I AK AK could not fix AK AK it... AK AK-- AK AK-- AKPHP General Mailing List (http://www.php.net/) AKTo unsubscribe, e-mail: [EMAIL PROTECTED] AKFor additional commands, e-mail: [EMAIL PROTECTED] AKTo contact the list administrators, e-mail: [EMAIL PROTECTED] AK -- 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] imap_mail_compose correct?
Hello, does anybody have experience with function imap_mail_compose() ?? There is an example in the documentation but in my script the description doesn't work. So the filename of the attachement is not avaliable. And why starts the $body-Array with $body[1] and not with body[0] ? Martin The System: PHP Version 4.0.4pl1; IMAP Support enabled IMAP c-Client Version 4.1 The Script: ... // Anlagen $n=count($HTTP_POST_FILES[email_anlage][tmp_name]); if ($n1 || ($n==1 file_exists($HTTP_POST_FILES[email_anlage][tmp_name][0]))) { // multipart!!! $body[1][type]=TYPEMULTIPART; $body[1][subtype]=mixed; // Eingabetext $body[2][type]=TYPETEXT; $body[2][subtype]=plain; $body[2][description]=$email_betreff; $body[2][contents.data]=$email_text; for ($i=0;$i$n;$i++) { $j=$i+3; $regs=array(); if (!ereg((.*)/(.*),$HTTP_POST_FILES[email_anlage][type][$i],$regs)) { $regs[1]=TYPEAPPLICATION; $regs[2]=octet-stream;} else { $mime_type=array(TEXT=0, MULTIPART=1, MESSAGE=2, APPLICATION=3, AUDIO=4, IMAGE=5, VIDEO=6, OTHER=7); $regs[1]=strtoupper($regs[1]); $regs[1]=$mime_type[$regs[1]];} $body[$j][description]=$HTTP_POST_FILES[email_anlage][name][$i]; $body[$j][type]=$regs[1]; $body[$j][subtype]=$regs[2]; $body[$j][encoding]=ENCBINARY; $fp=fopen($HTTP_POST_FILES[email_anlage][tmp_name][$i],r); $body[$j][contents.data]=fread($fp,filesize($HTTP_POST_FILES[email_anlage ][tmp_name][$i])); fclose($fp);} $email_text=imap_mail_compose($envelope,$body);} ... -- 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]
Re: [PHP] Save to Desktop
On Mon, Nov 12, 2001 at 11:14:04AM +0530, Sharat Hegde wrote: Hello, I need to capture the contents of a Form into a text file format and automatically allow the user to Save the file to his desktop. Here is what I am intending to do: * Capture the form contents and save to a temporary file. This works fine. * Provide some method of the user automatically downloading this. How do I get this download to happen? I want the screen which says Open File or Save to come up and then the user can basically save to his desktop. It's not even necessary to save the form data to a file on the server if you're just going to remove it after the user downloads the text file. The key to this is knowing the proper HTTP headers to send, to inform the browser that it should download a file. Then simply print the desired form data to stdout, and it'll be fed into the file that the user saves. For example: ? if ($action == 'Get Text File') { // Tell the browser to display a 'save file' dialog Header('Content-Type: application/octet-stream'); Header('Content-Disposition: attachment; filename=formdata.txt'); // Print the text to be sent as formdata.txt echo First text field: $firstfield\n; echo Second text field: $secondfield\n; exit; } ? form method=post action=?= $PHP_SELF ? First: input type=text name=firstfieldbr Seond: input type=text name=secondfieldbr input type=submit name=action value=Get Text File /form Here, the form takes in two text strings, and offers them to the browser as a file. Matt -- 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] Re: Unix timestamp ?
timestamp is an integer. you can convert it to hex string via sprintf(%x, timestamp) and store it. so if timestamp is a 32bit integer than it's hexadecimal representation will take 8 characters. De Necker Henri [EMAIL PROTECTED] wrote in message 3A8ED7A62794D311AA7700508B6164EC08DCA384@SCPTS01">news:3A8ED7A62794D311AA7700508B6164EC08DCA384@SCPTS01... What is the max. size of a timestamp in vanchar value ? I have seen it varies between 9 10.Will it be bigger than 10 or not ? -- 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] Login Verification - snag!
I just realized I jumped the gun on myself with my question earlier. /etc/shadow isn't accessible by anyone but root. With that said, how can I build a login page in PHP, running as the web server daemon process, that can validate the user against the system's shadow file? I hate to have to duplicate the file with different permissions just so that the process can read it when it needs to. -- H | Life is the art of drawing without an eraser. - John Gardner + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 Director of Internet Operations / SysAdmin. 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- 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]
Re: [PHP] Login Verification - snag!
I hate to have to duplicate the file with different permissions AMK just so that the process can read it when it needs to. How about persorm a exec(su username password) grabbing the output? Or something like that... -- Kind regards, Morten Winkler -- 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] PHP/MySQL
New to this, trying to insert record into DB $Query = INSERT INTO table_name (Obj,Descrip) VALUES (keyboard,Device to pound on when frustrated.); $Results = mysql_query($Query) or die (Query FAILED); I keep getting Failed Query messages here, any idea why? PHP/MySQL manuals do not have examples of how to do this. Thanks. -- 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]
Re: [PHP] PHP/MySQL
p $Query = INSERT INTO table_name (Obj,Descrip) VALUES (keyboard,Device p to pound on when frustrated.); p $Results = mysql_query($Query) p or die (Query FAILED); need to embed your strings in like $Query = INSERT INTO table_name (Obj,Descrip) VALUES (\keyboard\,\Device to pound on when frustrated.\); -- Kind regards, Morten Winkler -- 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]
RE: [PHP] PHP/MySQL
Try putting single quotes around the strings: $Query = INSERT INTO table_name (Obj,Descrip) VALUES ('keyboard','Device to pound on when frustrated.'); Another thing that would be useful is to use the mysql_error() function in your die, which will give a better indication of the problem -Original Message- From: phantom [SMTP:[EMAIL PROTECTED]] Sent: 12 November 2001 09:50 To: [EMAIL PROTECTED] Subject:[PHP] PHP/MySQL New to this, trying to insert record into DB $Query = INSERT INTO table_name (Obj,Descrip) VALUES (keyboard,Device to pound on when frustrated.); $Results = mysql_query($Query) or die (Query FAILED); I keep getting Failed Query messages here, any idea why? PHP/MySQL manuals do not have examples of how to do this. Thanks. -- 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]
RE: [PHP] Save to Desktop
Hi Matt, Thanks. That was very useful and it worked like a gem! Three cheers to HTTP headers. Where do you get a simplified version of the HTTP Header documentation - The W3C specs do not look like interesting reading. Regards, Sharat Hegde Phone: 6560360 Ext 4680 -Original Message- From: Matt McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 2:25 PM To: Sharat Hegde Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Save to Desktop On Mon, Nov 12, 2001 at 11:14:04AM +0530, Sharat Hegde wrote: Hello, I need to capture the contents of a Form into a text file format and automatically allow the user to Save the file to his desktop. Here is what I am intending to do: * Capture the form contents and save to a temporary file. This works fine. * Provide some method of the user automatically downloading this. How do I get this download to happen? I want the screen which says Open File or Save to come up and then the user can basically save to his desktop. It's not even necessary to save the form data to a file on the server if you're just going to remove it after the user downloads the text file. The key to this is knowing the proper HTTP headers to send, to inform the browser that it should download a file. Then simply print the desired form data to stdout, and it'll be fed into the file that the user saves. For example: ? if ($action == 'Get Text File') { // Tell the browser to display a 'save file' dialog Header('Content-Type: application/octet-stream'); Header('Content-Disposition: attachment; filename=formdata.txt'); // Print the text to be sent as formdata.txt echo First text field: $firstfield\n; echo Second text field: $secondfield\n; exit; } ? form method=post action=?= $PHP_SELF ? First: input type=text name=firstfieldbr Seond: input type=text name=secondfieldbr input type=submit name=action value=Get Text File /form Here, the form takes in two text strings, and offers them to the browser as a file. Matt * Disclaimer: The information in this e-mail and any attachments is confidential / privileged. It is intended solely for the addressee or addressees. If you are not the addressee indicated in this message, you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. * -- 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] apache + ftp!
hey group! i have apache installed on an win2000 machine and now i need an good and stable ftp server! which one does i take! thank you, ben -- 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]
Re: [PHP] Classes Question
Thanks for the help Pierre Paul Pierre-Yves [EMAIL PROTECTED] wrote in message 00c001c16940$47db1c90$0100a8c0@py">news:00c001c16940$47db1c90$0100a8c0@py... Hello, what I would do is build the instance of your mysql class in the constructor of the user class class User{ var $db; // constructor function User(){ $this-db = new Mysql(True); } // function that show how to use the Mysql class in the User class function foo(){ $this-db-sql_query(SELECT user FROM banned_users); } } // end class hope it help, py - Original Message - From: Paul - Zenith Tech Inc [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 09, 2001 11:26 AM Subject: [PHP] Classes Question I'm hoping somebody has the answer to this! I have 3 pages, one a normal PHP page, and 2 which are classes. One class, is a MySQL class I have written to connect/update users, etc And the other is the manage users on the system. Is there a way I can get the users class to talk to the mysql class? I have this code to make a new instance of the MySQL class (the True means use persistent connections) and a new instance of the users class $db = new MySQL(True); $users = new Users(); I am then using this code to check the list of banned users $users-CheckBannedUser(spacetowns,$db); In the CheckBannedUser function, I have this $db-sql_query(SELECT user FROM banned_users); But that does not work, (it works fine when used from the standard PHP page) Is it not possible to do what I am trying to do? Or am I doing it all wrong? Many thanks, Paul -- 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]
Re: [PHP] Classes Question
I did have a look in the manual, but I got lost half way through! I always think it's a good idea to describe the problem well :) Thanks, Paul Andreas Landmark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Sun, Nov 11, 2001 at 06:09:40PM -, PaulC wrote: I'm hoping somebody has the answer to this! I have 3 pages, one a normal PHP page, and 2 which are classes. One class, is a MySQL class I have written to connect/update users, etc And the other is the manage users on the system. Is there a way I can get the users class to talk to the mysql class? Inheritance, let the users class inherit the functions of the mysql class, that's the nicest and probably the best way to do it. Read up on OO in the manual to find out how to do inheritance in PHP. removed a pretty good description of the problem -- Andreas D Landmark / noXtension Every solution breeds new problems. -- 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] Lotus Domino PHP
Hi, Can anyone tell me the latest on whether or not PHP can talk tirectly to Lotus Domino/Notes??? I've had a look through the archive, and as far as I can see there was a project to do this which was going to be made available at the start of the year, but I've not seen any mention of this more recently, other than questions. Any info greatly appreciated, as we have a number of companies we are talking to who are standardised on Lotus across their organisation... Thanks, Richy -- 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]
Re: [PHP] Re: mail() w/ mailing lists
Is is advisable that I mail lots of users from a database via one call to mail() ? why not make a loop and send to one email at a time. if you have over 1000 I would use something else than mail(), ex direct to smtp with sockets. Henrik, It is my opinion (too?) that mail() is difficult to use in a non-trivial application. I have not used/investigated sockets. I have had good success with a 'wrapper class/function set' for mail(). I'm wondering if I should also look at what you have proposed. What does the extra effort of using sockets give you that using a decent wrapper for mail() wouldn't? For example do you get a 'msg sent' confirmation advice? Does the socket-based connection require more than standard access (Id/pswd) to the SMTP server? -is it both Linux and Windows compatible? -is it both in-house server and ISP compatible? Please advise, =dn (will appreciate good web references if it would save you time) -- 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] Re: apache + ftp!
on win32 i like g6ftp server Benjamin [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hey group! i have apache installed on an win2000 machine and now i need an good and stable ftp server! which one does i take! thank you, ben -- 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]
Re: [PHP] Re: mail() w/ mailing lists
I just finished making a bulk emailer script with the mail() function. I would probably recommend doing a loop, sending one email at a time. Seems that way you're not putting too much pressure on it at one time (if that makes any sense). If you can find a decently-written smtp-class that uses the socket directly, that would be much better. Then, you're not limit to sending to one mail server, and there's greater flexibility in the code; room to edit/add code when needed, and you have the opportunity to log specific error messages if ya need to. The only problem is finding an SMTP class that'll work without too much editing, unless you have the socket knowledge to write your own. Whether or not the socket commands in PHP work well in Windows or not, I've not a clue. I know there are some Windows issues with the mail() command as well, and a few other PHP functions that just don't work under Windows. =) -- From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts and Software on your Site. http://www.phpgalaxy.com/aff/ Also, get a fast free POP3 email account, you @php.la at http://www.phpgalaxy.com/search/ -- 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]
Re: [PHP] Re: apache + ftp!
I personally would recommend Serv-U. Latest version seems greatly stable, beautiful GUI, multiple domain support, I've been using Serv-U for quite a few years now, and it's just *never* let me down! It could seriously benefit from comand-line account creation, which I may invent on my own. =) -- From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts and Software on your Site. http://www.phpgalaxy.com/aff/ Also, get a fast free POP3 email account, you @php.la at http://www.phpgalaxy.com/search/ -- 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 Digest 12 Nov 2001 11:19:44 -0000 Issue 990
php-general Digest 12 Nov 2001 11:19:44 - Issue 990 Topics (messages 74193 through 74256): Re: Help with array in class needed 74193 by: ArsenKirillov 74194 by: ArsenKirillov Re: putting the result of PHP code into a string 74195 by: Rasmus Lerdorf Stripping IMG tags 74196 by: Richard S. Crawford 74197 by: Martin Towell 74198 by: Richard S. Crawford 74233 by: _lallous Re: How to use class methods in callback ? 74199 by: Papp Gyozo pass javascript variable to php without submit or reload 74200 by: Phieu Huynh 74201 by: Richard S. Crawford 74202 by: Phieu Huynh please tell me 74203 by: boonlert phokaow 74204 by: Rasmus Lerdorf 74205 by: Richard S. Crawford 74207 by: Jeff Gannaway Get Unbelieveable Artwork At No Cost To You + A Free Shopping Spree [ydgpv] 74206 by: unique_art_offer.publicist.com emailing attachments 74208 by: Don 74212 by: Don 74215 by: Martin Towell 74216 by: Don executing another php.script 74209 by: David Tod Sigafoos 74211 by: Richard S. Crawford 74217 by: Martin Towell User authentication problem. 74210 by: CaMeL php newbie - need advice 74213 by: Scott Dudley 74222 by: David Robley possible safe mode bug with opendir() ? 74214 by: operator.superprivate.com 74219 by: Yasuo Ohgaki 74221 by: operator.superprivate.com 74226 by: Yasuo Ohgaki how do the thing? 74218 by: Galkov Vladimir 74224 by: Martin Towell PHP/MySQL Question 74220 by: Peter Brown Save to Desktop 74223 by: Sharat Hegde 74240 by: Matt McClanahan 74247 by: Sharat Hegde Question about using system call/gzip 74225 by: Joelmon2001.aol.com 74227 by: David Robley 74228 by: Joelmon2001.aol.com 74230 by: David Robley Resetting ID in mySQL DB 74229 by: Thomas Edison Jr. 74231 by: Jack Dempsey Login verification 74232 by: Ashley M. Kirchner 74235 by: Jack Dempsey mail() w/ mailing lists 74234 by: _lallous 74236 by: Henrik Hansen 74253 by: DL Neil 74255 by: PHPGalaxy.com Re: Everything between something becomes an array element 74237 by: ArsenKirillov imap_mail_compose correct? 74238 by: Martin Gutbrod Unix timestamp ? 74239 by: De Necker Henri 74241 by: _lallous Login Verification - snag! 74242 by: Ashley M. Kirchner 74243 by: Morten Winkler Jørgensen PHP/MySQL 74244 by: phantom 74245 by: Morten Winkler Jørgensen 74246 by: Richard Black apache + ftp! 74248 by: Benjamin 74254 by: Daniel Masur 74256 by: PHPGalaxy.com Re: Classes Question 74249 by: Paul - Zenith Tech Inc 74250 by: Paul - Zenith Tech Inc 74251 by: Paul - Zenith Tech Inc Lotus Domino PHP 74252 by: Richard Black 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] -- ---BeginMessage--- AKbut when I try to copy the array outside the class using a function that AKonly does a return $this-$data, I only get one sub-array of the AKwhole one. AK AKAny ideas? AK AKThanks AK AKAlexander AK AKCode: AK AKclass Adressen { AK var $connect; // database-handle AK var $daten = array(); // array for data AK AK // Constructor AK function Adressen($datenbank) { AK $this-$connect = $datenbank-getConnect(); Be carefull :-) $this-connect = $datenbank-getConnect(); AK } AK AK // read data from database AK function readData() { AK $this-$daten = array(); AK $result = mysql_query(select * from adressen); AK while($data = mysql_fetch_array($result)) { AK extract($data); AK $this-$daten[$AdressenID] = array(strasse = $Strasse, AKplz = $PLZ, AKort = $Ort, land = $Land, telefon = $Telefon, telefax = AK$Telefax, email = $Email); AK } AK } AK AK function getData() { AK return $this-$daten; Be carefull :-)) AK return $this-daten; AK } AK} AK AK AK Here is working sanple is u are losen again ? /*I've written a class that reads a database into an array. This works fine, but when I try to copy the array outside the class using a function that only does a return $this-$data, I only get one sub-array of the whole one. Any ideas? Thanks Alexander Code: */ class Adressen { var $conn_ect; // database-handle var $daten; // array for data // Constructor function Adressen($datenbank) { $it=$datenbank-getConnect(); echo $this-connect = $it; //$result = mysql_query(select * from mysql.db); //if (!$result){echo false result !;exit();}
RE: [PHP] Re: apache + ftp!
on win32 i like g6ftp server I go along with this recommendation. Had some problems on 2k with serv-u M: -- 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]
Re: [PHP] Re: mail() w/ mailing lists
[EMAIL PROTECTED] (Dl Neil) wrote: It is my opinion (too?) that mail() is difficult to use in a non-trivial application. I have not used/investigated sockets. I have had good success with a 'wrapper class/function set' for mail(). I'm wondering if I should also look at what you have proposed. What does the extra effort of using sockets give you that using a decent wrapper for mail() wouldn't? For example do you get a 'msg sent' confirmation advice? speed, sockect are AFAIK faster than normal mail(). Does the socket-based connection require more than standard access (Id/pswd) to the SMTP server? -is it both Linux and Windows compatible? -is it both in-house server and ISP compatible? nope does not require extra things and it should work on both platforms. I do not know if all isp's carry it or if it's normal to include it. Please advise, =dn (will appreciate good web references if it would save you time) you can test your self: http://www.greatbridge.org/project/phpsmtp/ - a mailer that uses sockets. http://phpmailer.sourceforge.net - a wrapper with more features also, with this one you can use both mail() or SMTP so you can do a little speed testing. -- Henrik Hansen -- 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] Attachments again
Hi, When i send a dynamic HTML newletter, which contains newsitems in the database I now send the e-mail with a link to the image on the webserver. What i would like to do is instead of linking the image, send the image as a sort of attachment. So an internetconnection is not required when viewing the e-mail. Is this possible and how should I do this? Thanks in advance, Sjoerd Sjoerd van Oosten Digitaal vormgever [EMAIL PROTECTED] Datamex E-sites B.V. http://www.esites.nl Minervum 7368 Telefoon: (076) 5 730 730 4817 ZH BREDA Telefax: (076) 5 877 757 ___ -- 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]
Re: [PHP] Attachments again
I've found a great SMTP class file that supports file attachments. Its just a few lines of code that base64_encode's the attachment, and sticks it at the end of the email. I guess just rip whatever code ya need out of this, for doing attachments, and insert it into your own. Maybe do a little RFC reading to figure out multiple atachments. =) (sendmsg() Copyright © 2001 Wanja Hemmerich) ? function sendmsg($to, $subject, $text, $from, $file, $type) { $content = fread(fopen($file,r),filesize($file)); $content = chunk_split(base64_encode($content)); $uid = strtoupper(md5(uniqid(time(; $name = basename($file); $header = From: $from\nReply-To: $from\n; $header .= MIME-Version: 1.0\n; $header .= Content-Type: multipart/mixed; boundary=$uid\n; $header .= --$uid\n; $header .= Content-Type: text/plain\n; $header .= Content-Transfer-Encoding: 8bit\n\n; $header .= $text\n; $header .= --$uid\n; $header .= Content-Type: $type; name=\$name\\n; $header .= Content-Transfer-Encoding: base64\n; $header .= Content-Disposition: attachment; filename=\$name\\n\n; $header .= $content\n; $header .= --$uid--; mail($to, $subject, , $header); return true; } ? -- From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts and Software on your Site. http://www.phpgalaxy.com/aff/ Also, get a fast free POP3 email account, you @php.la at http://www.phpgalaxy.com/search/ -- 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]
Re: [PHP] Re: apache + ftp!
do you know about cerberus-ftp? how is it? -- 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] Help with DBM (dbmfetch)
Hi!! I'm trying to visualize a .dbm file. It's hosted in the same directory as my .php file. With this test example: -//--- htmlheadtitlePHP Test/title/head body ?php $fn=myfile.mdb; $db=dbmopen($fn,r); $key = dbmfirstkey ($db); while ($key) { echo $key = . dbmfetch ($db, $key) . \n; $key = dbmnextkey ($db, $key); } dbmclose($db); ? /body/html -//-- I do not get anything. Could anybody provide me an example of using DBM? Thank you very much. ___ Recibe el boletín semanal con lo mejor del mundo del motor de Movendus.com http://www.movendus.com/pr.jsp?ID1=2403ID2=2605 -- 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]
RE: [PHP] Attachments again
On the attachment subject, does anyone know how to specify multiple mime types? I have my attachment script, however people may be using it to send gifs, swfs, or text files I am specifyinmg the mime types like this $type = image/gif; $header .= Content-Type: $type; wuld I do something like turn $type into an array or do something like $type = image/gif | mimetype/2 | mimetype/3 | mimetype/4; THis doesnt seem to work (obviously mimetype/ * = a specified mime type) Thanks in advance for any suggestions Caspar -- 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] Re: #!/usr/local ignore option?
why not just keep the module and drop the #!/usr/local/bin/php at the beginning of each script .. ? I've not heard of an ISP that asked for this b4 ... Steve Michael Rice [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi All, I have a kind of unique problem that I've had trouble finding information on around the net. I have a site that I pay a hosting company for that expects my php scripts to have #!/usr/local/bin/php at the beginning of each script which works fine. Now, I'd like to keep a development server at home that uses Apache 22 and the latest php. I followed the installation instructions carefully can got php running great at home. The only problem is that it serves up the #!/usr... at the beginning of file, which wouldn't bother me except that it causes major problems with redirects. Any ideas on how to tell my development server to ignore that line or to reconfigure my apache/php in some such that it won't serve up that line?? I promise that I did due diligence in looking around but came up empty handed... keyword searching has its limitations... Thanks very much in advance. -- Sent through GMX FreeMail - http://www.gmx.net -- 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] Url Length Limitations?
Hi everyone! Is there any limitation for length of url like this accept.php?set=qwerty... What is the maximum $set length i can pass to script as a parameter? Zliy Pes: http://zliypes.com.ua [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]
RE: [PHP] Url Length Limitations?
Hi! Is there any limitation for length of url like this accept.php?set=qwerty... Depends on the OS/Server, but you'll have to consider one to exist... What is the maximum $set length i can pass to script as a parameter? Why don't you use POST? With POST, there is not limitation... Cheers, Kiko - It's not a bug, it's a feature. christoph starkmann mailto:[EMAIL PROTECTED] http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- 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] Re: emailing attachments
you need: input type=file/input {can't remember the exact syntax but it's the file type you're looking for, opens the file open dialogue so they can choose local file} Steve Don [EMAIL PROTECTED] wrote in message 004a01c16b33$b43a2c60$4fad2b18@cr993021a">news:004a01c16b33$b43a2c60$4fad2b18@cr993021a... Hi, I have a class that allows me to send e-mail with an attachment. I have a form that gathers information and I would like to allow the user to attach a file from his local drive. Is there a PHP routine that allows the user to browse his drive and choose a file? Thanks, Don -- 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] Re: executing another php.script
you don't need a sepaerate script. define two functions and then loop through calling the second function. much neater (and easier) Steve David Tod Sigafoos [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am sure that I am just .. missing this .. From one script I wish to 'execute' another script. How is this done? Setting a link and clicking is not the answer .. one script loops through all the 'selected' rows and I want to 'execute' another script for each row .. can this be done? thanks DSig David -- 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]
Re: [PHP] Attachments again
Hi Sjoerd, When i send a dynamic HTML newletter, which contains newsitems in the database I now send the e-mail with a link to the image on the webserver. What i would like to do is instead of linking the image, send the image as a sort of attachment. So an internetconnection is not required when viewing the e-mail. I use www.phpguru.org's, HTML MIME class. Regards, =dn -- 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] session
I am using PHP 4.06, IE 6 and Win 2000. When i register a session like so: session_start(); session_register(SESSION_UserID); and on the next page refer to the session: session_start(); if(!session_is_registered(SESSION_UserID)) { header(Location: error.php?ec=1); exit; } ? It registers a new session: I then have a session as so in the sessons directory: SESSION_UserID|s:1:1;SESSION_UPERMS|s:1:1; and a blank new one. any ideas? -- 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]
Re: [PHP] Re: mail() w/ mailing lists
sending one by one will take ages no? Phpgalaxy.Com [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I just finished making a bulk emailer script with the mail() function. I would probably recommend doing a loop, sending one email at a time. Seems that way you're not putting too much pressure on it at one time (if that makes any sense). If you can find a decently-written smtp-class that uses the socket directly, that would be much better. Then, you're not limit to sending to one mail server, and there's greater flexibility in the code; room to edit/add code when needed, and you have the opportunity to log specific error messages if ya need to. The only problem is finding an SMTP class that'll work without too much editing, unless you have the socket knowledge to write your own. Whether or not the socket commands in PHP work well in Windows or not, I've not a clue. I know there are some Windows issues with the mail() command as well, and a few other PHP functions that just don't work under Windows. =) -- From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts and Software on your Site. http://www.phpgalaxy.com/aff/ Also, get a fast free POP3 email account, you @php.la at http://www.phpgalaxy.com/search/ -- 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]
Re2: [PHP] Url Length Limitations?
You see, I call for php script from Delphi program... I can do it with InternetOpen() so the only method available for me is GET - i can use page url only Or I'm mistaken and it's possible to use POST here? who knows? - Original Message - From: Christoph Starkmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 12, 2001 2:19 PM Subject: RE: [PHP] Url Length Limitations? Hi! Is there any limitation for length of url like this accept.php?set=qwerty... Depends on the OS/Server, but you'll have to consider one to exist... What is the maximum $set length i can pass to script as a parameter? Why don't you use POST? With POST, there is not limitation... Cheers, Kiko - It's not a bug, it's a feature. christoph starkmann mailto:[EMAIL PROTECTED] http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- 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] mail() with mailing lists problem
Hi All, While everybody is on this topic, here's a problem I have been having. I use mail() in a function in a loop to send e-mail with an attachment. The e-mails get sent out to the different recipients but only the last one gets sent correctly. The rest loses the 'From:' somewhere so that the message ends up with the server name as from who and with the encoded attachment inside of the message body. Here's the function: function mail_attachment ($to, $subject, $message, $addr_from, $attachment, $filename) { /* This function sends an e-mail with a file attachment using the standard PHP mail function with parameters $to, $subject and $message. The $attachment parameter is a string with the attachment file content with filename $filename. */ $boundary = b.md5(uniqid(time())); $mime = From: $addr_from\n; $mime .= Reply-To: $addr_from\n; $mime .= X-Mailer: Digital Healthcare Solutions\n; $mime .= X-Sender: $addr_from\n; $mime .= Content-type: multipart/mixed; ; $mime .= boundary = $boundary\n\n; $mime .= This is a MIME encoded message.\n\n; // First the regular message $mime .= --$boundary\n; $mime .= Content-type: text/plain\n; $mime .= Content-Transfer-Encoding: base64; $mime .= \n\n.chunk_split(base64_encode($message)).\n; // Now the attachment $mime .= --$boundary\n; $mime .= Content-type: text/plain\n; $mime .= Content-Transfer-Encoding: base64\n; $mime .= Content-Disposition: attachment; ; $mime .= filename = .chr(34).$filename.chr(34); $mime .= \n\n.chunk_split(base64_encode($attachment)).\n; $mime .= --$boundary--; mail ($to, $subject, , $mime); } and here's the loop in which it gets called: $i = 0; while (isset($EmailAddress[$i])) { mail_attachment ($EmailAddress[$i], URGENT Communication, $message, $addr_from, $attachment, $filename); $i++; } Does anybody have any ideas? Rudolf Visagie Principal Software Developer Digital Healthcare Solutions Tel. +27(0)11 266 6946 Fax. +27(0)11 266 5080 Cell: +27(0)82 895 1598 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] Using PHP for directory indexing
Hi All, I am wondering if anyone can help me with this. I want people accessing my site to see a list of HTML reports but I don't want to turn on Directory indexing on my Apache webserver, seeing as the directory path is present. What I'm looking to do, is to write a basic php script which will read the files in a certain directory create links to be presented to the user. Has anyone ever done this before? Can someone give me an example or a headstart on this. Thanks in advance Kev _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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]
RE: [PHP] Using PHP for directory indexing
? // print the current directory in unordered list print(UL\n); // open directory $myDirectory = dir(.); // get each entry while($entryName = $myDirectory-read()) { print(LI$entryName \n); } // close directory $myDirectory-close(); print(/UL\n); ? Sjoerd van Oosten Digitaal vormgever [EMAIL PROTECTED] Datamex E-sites B.V. http://www.esites.nl Minervum 7368 Telefoon: (076) 5 730 730 4817 ZH BREDA Telefax: (076) 5 877 757 ___ -Oorspronkelijk bericht- Van: Kevin Garrett [mailto:[EMAIL PROTECTED]] Verzonden: maandag 12 november 2001 14:08 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] Using PHP for directory indexing Hi All, I am wondering if anyone can help me with this. I want people accessing my site to see a list of HTML reports but I don't want to turn on Directory indexing on my Apache webserver, seeing as the directory path is present. What I'm looking to do, is to write a basic php script which will read the files in a certain directory create links to be presented to the user. Has anyone ever done this before? Can someone give me an example or a headstart on this. Thanks in advance Kev _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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]
RE: [PHP] Using PHP for directory indexing
function GetFiles ($DataPath, $files, $nfiles) { // Reads a directory and puts filenames into a sorted array $handle=opendir($DataPath); if ($handle) { $nfiles = -1; while (false!==($file = readdir($handle))) { if ($file != . $file != ..) { $nfiles++; $files[$nfiles] = $file; } } sort($files); closedir($handle); } return 0; } Rudolf Visagie Principal Software Developer Digital Healthcare Solutions Tel. +27(0)11 266 6946 Fax. +27(0)11 266 5080 Cell: +27(0)82 895 1598 E-mail: [EMAIL PROTECTED] -Original Message- From: Kevin Garrett [mailto:[EMAIL PROTECTED]] Sent: 12 November 2001 03:08 To: [EMAIL PROTECTED] Subject: [PHP] Using PHP for directory indexing Hi All, I am wondering if anyone can help me with this. I want people accessing my site to see a list of HTML reports but I don't want to turn on Directory indexing on my Apache webserver, seeing as the directory path is present. What I'm looking to do, is to write a basic php script which will read the files in a certain directory create links to be presented to the user. Has anyone ever done this before? Can someone give me an example or a headstart on this. Thanks in advance Kev _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] Help me to win the battle with browser's cache
Hello php-general, I have index.php, which has a href=index.php?logoutLog out/a. When I click it, I am logged out the site. But I type index.php in browser's address bar, press Enter and ... it shows non-logouted page. What should I write in php code to tell browser something like forget about old page, don't display it, get the newest version? Some time ago I tried to do that in several ways and nothing gived 100% result. And other thing I saw was that Netscape and Explorer behave in different ways in such cases. Could someone help me? Maybe this topic was discussed before, but still... I appreciate greatly any suggestion. -- Olexandr Vynnychenko mailto:[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]
Re: [PHP] apache + ftp!
Hello Benjamin, Monday, November 12, 2001, 12:00:22 PM, you wrote: B hey group! B i have apache installed on an win2000 machine and now i need an good and B stable ftp server! which one does i take! B thank you, ben And what about W2k's built-in FTP server? Has someone used it? Is it so bad? -- Best regards, Olexandrmailto:[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]
RE: [PHP] Using PHP for directory indexing
Wow that was a quick response...Thanks alot! That those the listing part of my problem but is there a way of only showing a certain type of file such as only HTML? is there a way of somehow automatically making a link to access those pages? From: Oosten, Sjoerd van [EMAIL PROTECTED] To: 'Kevin Garrett' [EMAIL PROTECTED], '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: RE: [PHP] Using PHP for directory indexing Date: Mon, 12 Nov 2001 14:15:14 +0100 ? // print the current directory in unordered list print(UL\n); // open directory $myDirectory = dir(.); // get each entry while($entryName = $myDirectory-read()) { print(LI$entryName \n); } // close directory $myDirectory-close(); print(/UL\n); ? Sjoerd van Oosten Digitaal vormgever [EMAIL PROTECTED] Datamex E-sites B.V. http://www.esites.nl Minervum 7368 Telefoon: (076) 5 730 730 4817 ZH BREDA Telefax: (076) 5 877 757 ___ -Oorspronkelijk bericht- Van: Kevin Garrett [mailto:[EMAIL PROTECTED]] Verzonden: maandag 12 november 2001 14:08 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] Using PHP for directory indexing Hi All, I am wondering if anyone can help me with this. I want people accessing my site to see a list of HTML reports but I don't want to turn on Directory indexing on my Apache webserver, seeing as the directory path is present. What I'm looking to do, is to write a basic php script which will read the files in a certain directory create links to be presented to the user. Has anyone ever done this before? Can someone give me an example or a headstart on this. Thanks in advance Kev _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] Re: Help me to win the battle with browser's cache
Good time of a day! Hello Alex! META content=no-cache http-equiv=Pragma may be? but if you use $PHP_AUTH_USER, $PHP_AUTH_PW i don't see simple way if you check password every time page reqwesting... may be try to check password from temp file/table (just a miror of original). On login place reg data from original to temp and work with them... On logout delete or breake reg data in temp fille to resive the situation $PHP_AUTH_USER, $PHP_AUTH_PW entered before are denied now... Vladimir. Olexandr Vynnychenko [EMAIL PROTECTED] ???/ ? ?: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello php-general, I have index.php, which has a href=index.php?logoutLog out/a. When I click it, I am logged out the site. But I type index.php in browser's address bar, press Enter and ... it shows non-logouted page. What should I write in php code to tell browser something like forget about old page, don't display it, get the newest version? Some time ago I tried to do that in several ways and nothing gived 100% result. And other thing I saw was that Netscape and Explorer behave in different ways in such cases. Could someone help me? Maybe this topic was discussed before, but still... I appreciate greatly any suggestion. -- Olexandr Vynnychenko mailto:[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]
RE: [PHP] Re: Faking MS Access on MySQL linux box
John, OpenLink's Multi-Tier drivers can get you from Linux to MSAcess on Windows. Mweb, I'd just use ODBC against MySQL for testing. There isn't any way to actually run an Access DB on Linux. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: John Lim [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 10, 2001 12:06 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Faking MS Access on MySQL linux box Hi Mweb, yes it is overkill, but I don't know any other way to do it unless you want to buy a 3rd party odbc driver for Access on Linux (is there one?) Bye, John Mweb [EMAIL PROTECTED] wrote in message 2000104958.B3706@polaris">news:2000104958.B3706@polaris... John, thanks for the link, but isn't it a bit of overkill in my case? What I need is to write PHP pages which manipulate a MS Access DB via ODBC, because this is what the hosting company makes available (and it's not going to change because of several reasons) So, I am looking for explanation on how to do ONLY the testing of suche pages on a STAND-ALONE Linux box. I want to run some DB engine on it which is accessible through ODBC, so that I can say if my ODBC call was OK here, it will work also when I upload on the NT/IIS server, because the interface is the same. Keep in mind that performance is not an issue here. On the linux PC I would only do testing, and the site on the real server currently has ~4000 visits/month querying a DB with some hundreds of entries. What do you think? mweb On Sat, Nov 10, 2001 13:02:14 at 01:02:14PM +0800, John Lim wrote: See http://php.weblogs.com/adodb_csv ADODB also supports SQL communications through HTTP as a database proxy. In plain English, if you have a FoxPro or Access database that you need to connect to from Unix, you can do so via HTTP (eg. Apache talking to IIS, which talks to a small PHP program [the proxy] that queries the database, packs it into serialized text and sends it back to Apache). PHP client -- Apache IIS -- PHP server -- Database Or if you have to go through a firewall to access your database, this solution allows you to stream SQL queries as HTTP through the firewall. [EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message GMJD1G$[EMAIL PROTECTED]">news:GMJD1G$[EMAIL PROTECTED]... Hello, For reasons not worth discussing here, I have to develop and test on Linux/Apache some PHP pages that will have to access via ODBC a MS Access database on an NT/IIS/PHP server. I would like to do it by writing PHP pages that access via ODBC some mysql or other database on my linux box, in such a way that, if it works there, I just change some general setting, upload the pages and they work for sure on the MS Access thing (something like: ifdef LINUX then ODBC_ACCESSES_MYSQL ifdef NTthen ODBC_ACCESSES_MS_Access) I am sure that this must be possible, but would really appreciate some examples/pointers to specific tutorial/similar stories/etc. TIA, mweb -- 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] -- Never let your sense of morals prevent you from doing what is right Salvor Hardin , Foundation -- 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]
Re: [PHP] Help me to win the battle with browser's cache
Hi, me also faced many probs last 3 months back and i overcome that. solution - use session variables.. register login info as session vars and during logout unregister... This is the solution to u'r problem.. - All the best -Balaji - Original Message - From: Olexandr Vynnychenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 12, 2001 7:02 PM Subject: [PHP] Help me to win the battle with browser's cache Hello php-general, I have index.php, which has a href=index.php?logoutLog out/a. When I click it, I am logged out the site. But I type index.php in browser's address bar, press Enter and ... it shows non-logouted page. What should I write in php code to tell browser something like forget about old page, don't display it, get the newest version? Some time ago I tried to do that in several ways and nothing gived 100% result. And other thing I saw was that Netscape and Explorer behave in different ways in such cases. Could someone help me? Maybe this topic was discussed before, but still... I appreciate greatly any suggestion. -- Olexandr Vynnychenko mailto:[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] --- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- 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] Re: Using PHP for directory indexing
Hi! Kevin! Try this... :-) have a nica day! ? // this is qw.php // is incoming parametr $catalog; // there can be better way to protect filesystem // directory where operations aloved define(START_PATH, named); $catalog = eregi_replace('([/]{2,})|([./]{2,})|([/.]{2,})', '/', $catalog); $handle=opendir(START_PATH.'/'.$catalog); rewinddir($handle); while ($file = readdir($handle)) { $filenames[]=$file; } closedir($handle); $str = 'Current directory: blaquo;'.START_PATH.$catalog.'raquo;/b'; print $str; echo 'brbrtable class=tabler'; echo 'tr class=menu_tr'; echo 'tdh4Record type tdh4Path/tr'; for ($i = 0; $i count($filenames); $i++) { if ($filenames[$i]!='.' $filenames[$i]!='..') { if (is_dir(START_PATH.$catalog.'/'.$filenames[$i])) { print 'tr class=ordinary_trtdDirectory/tdtd'; print 'a href=qw.php?catalog='.$catalog./.$filenames[$i].''.$filenames[$i].'/a/ td'; } else { print 'tr class=ordinary_trtdFile/tdtd'; print 'a href=qw.php?pather='.START_PATH.$catalog./.$filenames[$i].''.$filenames[$ i].'/a/td'; } print '/tr'; } } ? /table -- 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]
Re: [PHP] Re: Faking MS Access on MySQL linux box
What I need is to write PHP pages which manipulate a MS Access DB via ODBC, because this is what the hosting company makes available (and it's not going to change because of several reasons) SNIP My suggestion would be to change hosting companies due to their stupidity of using Access as a web database and not willing to offer anything more robust. -- 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] Re: Using PHP for directory indexing
line print 'a href=qw.php?pather='.START_PATH.$catalog./.$filenames[$i].''.$filenames[$ i].'/a/td'; change on print 'a href='.START_PATH.$catalog./.$filenames[$i].''.$filenames[$i].'/a/td' ; -- 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]
Re: [PHP] Help me to win the battle with browser's cache
Hi I've found some code which i put it into this function. I've never got the meta tag technique to work but this seems to do the trick. Call noCache() before outputting anything to the page. function noCache() { header (Expires: Mon, 26 Jul 1997 05:00:00 GMT);// Date in the past header (Last-Modified: . gmdate(D, d M Y H:i:s) . GMT); // always modified header (Cache-Control: no-cache, must-revalidate); file://HTTP/1.1 header (Pragma: no-cache); // HTTP/1.0 } Regards Girish - Original Message - From: Olexandr Vynnychenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 12, 2001 1:32 PM Subject: [PHP] Help me to win the battle with browser's cache Hello php-general, I have index.php, which has a href=index.php?logoutLog out/a. When I click it, I am logged out the site. But I type index.php in browser's address bar, press Enter and ... it shows non-logouted page. What should I write in php code to tell browser something like forget about old page, don't display it, get the newest version? Some time ago I tried to do that in several ways and nothing gived 100% result. And other thing I saw was that Netscape and Explorer behave in different ways in such cases. Could someone help me? Maybe this topic was discussed before, but still... I appreciate greatly any suggestion. -- Olexandr Vynnychenko mailto:[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] Re: post variables to MySQL fields
This isn't the code you were talking about but it's something I wrote and use all the time. update_table() requires a where variable which is an array which needs to be declared before the function is called. The $where array is only 2 parts with the column name as [0] and the condition as [1]. It would be declared something like: $where=array(name,George); They both require $db as the database pointer and $db_name as the database name. insert_table() has the option of using a second database ($db_name2, $db2) if desired. I haven't needed this feature in update_table() yet so I didn't add it in. It wouldn't be hard to take the code from one to the other if needed. function update_table($table,$where){ GLOBAL $db,$db_name,$HTTP_POST_VARS; $fields = mysql_list_fields($db_name, $table, $db); $columns = mysql_num_fields($fields); for ($i = 0; $i $columns; $i++) { $colnames[$i]= mysql_field_name($fields, $i); } foreach($HTTP_POST_VARS as $key=$value){ if(in_array($key,$colnames) AND $value!=~NULL~){ $value=addslashes($value); $save.=$c $key='$value'; $c=,; } } $update=UPDATE $table SET $save WHERE $where[0]='$where[1]'; mysql_query($update,$db); } ~~~ function insert_table($table,$db_name2=,$db2=){ GLOBAL $db,$db_name,$HTTP_POST_VARS; $db1=$db; if($db2!=)$db1=$db2; $db_name1=$db_name; if($db_name2!=)$db_name1=$db_name2; $fields = mysql_list_fields($db_name1, $table, $db1); $columns = mysql_num_fields($fields); for ($i = 0; $i $columns; $i++) { $colnames[$i]= mysql_field_name($fields, $i); } $cols=(; $save=(; foreach($HTTP_POST_VARS as $key=$value){ if(in_array($key,$colnames) AND $value!=~NULL~){ if($value== )$value=; $value=addslashes($value); $cols.=$comma$key; $save.=$comma'$value'; $comma=,; } } $cols.=); $save.=); mysql_query(INSERT INTO $table $cols VALUES $save,$db1); } ~ Rory O'Connor [EMAIL PROTECTED] wrote in message 20011109191732.B783@jacktasty">news:20011109191732.B783@jacktasty... A while back somebody answered a question about some PHP code that would take the $HTTP_POST_VARS and create the SQL that would write them to a MySQL table (provided the posted var names matches the MySQL fieldnames). Does anyone have info on that project? The PHP searchable archive is down, otherwise I wouldn't be asking on the list. Thanks, Rory -- 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] Re: Form Name Attribute
I would use a hidden field and look for that variable. -- Mike ~~~ MICHAEL R. HARVEY Sculptor Web Creation - http://vestudiohost.com Internet Business Tools - http://ibiz-tools.com Sculpture, Craft, Jewelry - http://sculpture-by-mrh.com http://jewelry-by-mrh.com http://craft-by-mrh.com New Product Innovations and Development. Ph: 845-279-8295 Kal Amry [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi guys, If I have a code in file1.php such as: form name=formName1 action=file2.php method=post code.. code.. /form And form name=formName2 action=file2.php method=post code.. code.. /form Now in file2.php, I need to check which form I am receiving!! How do I check!! In other words, let's assume we only have the form names formName1 and formName1 - What code I can use in file2.php to get the name of the calling form. I just want to know how can I get the name of the form (in the above case, formName1 or formName2) Thanx -- 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] Re: pass javascript variable to php without submit or reload
If you are trying to collect things like monitor size or other user data you could try putting the JS in the head and then put a meta refresh tag with time period of 0. I haven't actually tried this but it might work. -- Mike ~~~ MICHAEL R. HARVEY Sculptor Web Creation - http://vestudiohost.com Internet Business Tools - http://ibiz-tools.com Sculpture, Craft, Jewelry - http://sculpture-by-mrh.com http://jewelry-by-mrh.com http://craft-by-mrh.com New Product Innovations and Development. Ph: 845-279-8295 Phieu Huynh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... script language=javascript function changebuilding (which) { sel_var = which.selectedIndex ? $sql_query = select distinct room from general.room_info where building='$variable' group by level asc; $sql_result = mysql_query($sql_query) or die ( Can't execute the query); $i=0; while ($row = mysql_fetch_array($result_sec_level)) print (ar[.$i++.] = \.$row[0].\;\n); ? for (i=0; i ar.length; i++) { option = new Option(ar[i]) document.myform.room.options[i]=option } } /script body form name=myform Building : select name=building onchange=changebuilding(this) option1/option option2/option option3/option /select Room : select name=room /select /form /body I can pass the variable in building to $variable by submit button but I want to pass the sel_var variable to $variable and dynamic update the content in room. -- phil -- 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]
Re: [PHP] Url Length Limitations?
Valentin, actually if you use ICS (Francois Piettes components), you can POST as well. im doing that in a project im working on just this moment. you should be able to find his component set at Torry's ( www.torry.ru ) Valentin V. Petruchek [EMAIL PROTECTED] wrote in message 009501c16b75$0e9f2160$[EMAIL PROTECTED]">news:009501c16b75$0e9f2160$[EMAIL PROTECTED]... You see, I call for php script from Delphi program... I can do it with InternetOpen() so the only method available for me is GET - i can use page url only -- 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] Re: executing another php.script
Just include(script2.inc) in your loop. -- Mike ~~~ MICHAEL R. HARVEY Sculptor Web Creation - http://vestudiohost.com Internet Business Tools - http://ibiz-tools.com Sculpture, Craft, Jewelry - http://sculpture-by-mrh.com http://jewelry-by-mrh.com http://craft-by-mrh.com New Product Innovations and Development. Ph: 845-279-8295 David Tod Sigafoos [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am sure that I am just .. missing this .. From one script I wish to 'execute' another script. How is this done? Setting a link and clicking is not the answer .. one script loops through all the 'selected' rows and I want to 'execute' another script for each row .. can this be done? thanks DSig David -- 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]
Re: [PHP] Using PHP for directory indexing
Here's one from my function collection: ~~~ function list_dir($basedir,$type=,$filter=){ //echo $basedir; $handle=opendir($basedir); $filelisting=array(); while ($file = readdir($handle)) { if ($file!=. AND $file!=..){ switch($type){ case file: if(strstr($file,.))$filelisting[]=$file; break; case dir: if(!strstr($file,.))$filelisting[]=$file; break; default: $filelisting[]=$file; } } } closedir($handle); $out=$filelisting; if($filter!=){ unset($out); $fcount=count($filelisting); $count=0; while($count=$fcount){ if(strstr($filelisting[$count],$filter))$out[]=$filelisting[$count]; $count++; } } sort($out); return $out; } ~ $basedir - the directory you want to list $type - optional - will give you evything, file will give you all files, dir will give you all directories $filter - optional - allows you to specify a file type ie: gif -- Mike ~~~ MICHAEL R. HARVEY Sculptor Web Creation - http://vestudiohost.com Internet Business Tools - http://ibiz-tools.com Sculpture, Craft, Jewelry - http://sculpture-by-mrh.com http://jewelry-by-mrh.com http://craft-by-mrh.com New Product Innovations and Development. Ph: 845-279-8295 Rudolf Visagie [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... function GetFiles ($DataPath, $files, $nfiles) { // Reads a directory and puts filenames into a sorted array $handle=opendir($DataPath); if ($handle) { $nfiles = -1; while (false!==($file = readdir($handle))) { if ($file != . $file != ..) { $nfiles++; $files[$nfiles] = $file; } } sort($files); closedir($handle); } return 0; } Rudolf Visagie Principal Software Developer Digital Healthcare Solutions Tel. +27(0)11 266 6946 Fax. +27(0)11 266 5080 Cell: +27(0)82 895 1598 E-mail: [EMAIL PROTECTED] -Original Message- From: Kevin Garrett [mailto:[EMAIL PROTECTED]] Sent: 12 November 2001 03:08 To: [EMAIL PROTECTED] Subject: [PHP] Using PHP for directory indexing Hi All, I am wondering if anyone can help me with this. I want people accessing my site to see a list of HTML reports but I don't want to turn on Directory indexing on my Apache webserver, seeing as the directory path is present. What I'm looking to do, is to write a basic php script which will read the files in a certain directory create links to be presented to the user. Has anyone ever done this before? Can someone give me an example or a headstart on this. Thanks in advance Kev _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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]
Re: [PHP] apache + ftp!
never had it runnin, but i didnt heard bout hacking g6ftp. Olexandr Vynnychenko [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello Benjamin, Monday, November 12, 2001, 12:00:22 PM, you wrote: B hey group! B i have apache installed on an win2000 machine and now i need an good and B stable ftp server! which one does i take! B thank you, ben And what about W2k's built-in FTP server? Has someone used it? Is it so bad? -- Best regards, Olexandrmailto:[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] parsing XML data with ampersands ()
When parsing XML data, the CDATA sometimes contains an ampersand (). The XML parser sends this as two events, one before the ampersand and one after. That yields two data sections (when there is only one). Ideas on how to keep them together? Is this a bug? kind regards, bill hollett -- 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]
RE: [PHP] parsing XML data with ampersands ()
Change your CDATA so it contains amp; instead of HTH Jon -Original Message- From: bill [mailto:[EMAIL PROTECTED]] Sent: 12 November 2001 15:51 To: [EMAIL PROTECTED] Subject: [PHP] parsing XML data with ampersands () When parsing XML data, the CDATA sometimes contains an ampersand (). The XML parser sends this as two events, one before the ampersand and one after. That yields two data sections (when there is only one). Ideas on how to keep them together? Is this a bug? kind regards, bill hollett ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- 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] Chopping off extra characters from input
I've got a problem where people are entering extra characters (due to an inonsistency in the tracking numbers they are being given) in a number they are entering in a form field. I have a PHP script querying a MySQL database. What's the easiest way to take the input and use only the first 8 characters? Any help is appreciated! Thanks, Rory -- 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]
Re: [PHP] Chopping off extra characters from input
I've got a problem where people are entering extra characters (due to an inonsistency in the tracking numbers they are being given) in a number they are entering in a form field. I have a PHP script querying a MySQL database. What's the easiest way to take the input and use only the first 8 characters? Any help is appreciated! Thanks, Rory $tracking = substr($input,0,8); Would be as easy as I can think of. * Chris O'Brien ([EMAIL PROTECTED]) * Excel.Net,Inc. - http://www.excel.net/ * (920) 452-0455 - Sheboygan/Plymouth area * (888) 489-9995 - Other areas, toll-free -- 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]
Re: [PHP] Chopping off extra characters from input
The substr function's a good safeguard, as well as using the maxlength=8 param in the input tag for the text field (in the HTML) =) -- From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts and Software on your Site. http://www.phpgalaxy.com/aff/ Also, get a fast free POP3 email account, you @php.la at http://www.phpgalaxy.com/search/ -- 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] fopen and paths
I am trying to log particular information in an access log and I need it to be used on several pages all in different directories, I would like the actual log to be stored in a directory called data in the root directory of my web page. I using an include() on each page where I would like the info logged. I am using: $log_fp = fopen(../data/access_log.txt, a,1); with the use_include_path set to 1. My problem is that a new file is being created in each directory that the logging.inc file is added to. Can anyone help? Steffan DISCLAIMER Any opinions expressed in this email are those of the individual and not necessarily the company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. It may contain material protected by attorney-client privilege. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. If you have received this email in error please notify the Network Manager by telephone on +44 (0) 870 243 2431. Please then delete this email and destroy any copies of it. This email has been swept for viruses before leaving our system. Admiral Insurance Services Limited, Cardiff CF10 3AZ _ This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information visit http://www.messagelabs.com/stats.asp
[PHP] Cookies, Sessions and Login Process
Hi there, I'm new to php coming from an asp background and would like to know the easiest way to automate a login process. I have one page called 'index.php' and it contains a form with 2 elements, username and password. This page is posted to th 'login.php' and here I do a check against the database to see if the person is who they say they are. This where I came across a problem...I would like to set a cookie on the user's machine once I know they are who they say they are. So I attempted to create a cookie to hold their username and password upon successful login..I received the following error...Warning: Cannot add header information - headers already sent by (output started at E:\ez\codesnipits\login.php:16) in E:\ez\codesnipits\login.php on line 66. So I looked up in the manual and found that I can't do it this way. I can't send header info after the header has been sent for obvious reasons. So how the heck do I manage to do this? What I would to do is have the user login once, and each subsequent time they visit , skip the login process via their username and password in the cookie. Any insight to this type of process would greatly be appreciated. Thx Joe p.s Sorry about the bold font ;) -- 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]
RE: [PHP] Url Length Limitations?
You can try this class for POSTing: http://phpclasses.upperdesign.com/browse.html/package/375 --Daniel -Original Message- From: Valentin V. Petruchek [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 7:05 AM To: [EMAIL PROTECTED] Subject: [PHP] Url Length Limitations? Hi everyone! Is there any limitation for length of url like this accept.php?set=qwerty... What is the maximum $set length i can pass to script as a parameter? Zliy Pes: http://zliypes.com.ua [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]
Re: [PHP] Cookies, Sessions and Login Proceess
Just do your authentication before you send any HTML (including any whitespace). I actually recommend not sending ANY HTML from your authentication script. Authenticate them, set your cookie, and redirect the visitor to an appropriate next page, based on whether or not they've successfully authenticated. BTW - storing the username/password in the cookie makes no sense They've already authenticated ... just store a user-is-logged-in cookie which expires after X minutes/hours/etc. It's a good practice for when you'll have to deal with privacy security concerns. ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden On Mon, 12 Nov 2001, Joe Van Meer wrote: Hi there, I'm new to php coming from an asp background and would like to know the easiest way to automate a login process. I have one page called 'index.php' and it contains a form with 2 elements, username and password. This page is posted to th 'login.php' and here I do a check against the database to see if the person is who they say they are. This where I came across a problem...I would like to set a cookie on the user's machine once I know they are who they say they are. So I attempted to create a cookie to hold their username and password upon successful login..I received the following error...Warning: Cannot add header information - headers already sent by (output started at E:\ez\codesnipits\login.php:16) in E:\ez\codesnipits\login.php on line 66. So I looked up in the manual and found that I can't do it this way. I can't send header info after the header has been sent for obvious reasons. So how the heck do I manage to do this? What I would to do is have the user login once, and each subsequent time they visit , skip the login process via their username and password in the cookie. Any insight to this type of process would greatly be appreciated. Thx Joe p.s Sorry about the bold font ;) -- 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]
Re: [PHP] Cookies, Sessions and Login Proceess
Thx Christopher for replying. Ok, let me see if I understand you correctly... The user enters username and password on index.php, this is posted to login.php. On login.php after I verify the user is who he/she says they are I set a cookie called accessedbefore to yes and redirect them to the main page. Am I allowed to set a cookie and redirect them after determining who the user is? How would I redirect them after setting the cookie? Header function or is there a better way? Thx Joe :) Christopher William Wesley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Just do your authentication before you send any HTML (including any whitespace). I actually recommend not sending ANY HTML from your authentication script. Authenticate them, set your cookie, and redirect the visitor to an appropriate next page, based on whether or not they've successfully authenticated. BTW - storing the username/password in the cookie makes no sense They've already authenticated ... just store a user-is-logged-in cookie which expires after X minutes/hours/etc. It's a good practice for when you'll have to deal with privacy security concerns. ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden On Mon, 12 Nov 2001, Joe Van Meer wrote: Hi there, I'm new to php coming from an asp background and would like to know the easiest way to automate a login process. I have one page called 'index.php' and it contains a form with 2 elements, username and password. This page is posted to th 'login.php' and here I do a check against the database to see if the person is who they say they are. This where I came across a problem...I would like to set a cookie on the user's machine once I know they are who they say they are. So I attempted to create a cookie to hold their username and password upon successful login..I received the following error...Warning: Cannot add header information - headers already sent by (output started at E:\ez\codesnipits\login.php:16) in E:\ez\codesnipits\login.php on line 66. So I looked up in the manual and found that I can't do it this way. I can't send header info after the header has been sent for obvious reasons. So how the heck do I manage to do this? What I would to do is have the user login once, and each subsequent time they visit , skip the login process via their username and password in the cookie. Any insight to this type of process would greatly be appreciated. Thx Joe p.s Sorry about the bold font ;) -- 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] Serial Port Programing
Hello all, Does PHP have the ability to control a serial port? I see we can use the Printer but that was All I saw. -- 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]
Re: [PHP] Cookies, Sessions and Login Proceess
header(); function is fine. Another option is javascript which is dependent on the client software. But you get the picture about the login process. I just have to agree with Chris, something name 'is_logged' is better than 'accessedbefore'. -- Julio Nobrega A hora está chegando: http://toca.sourceforge.net Joe Van Meer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thx Christopher for replying. Ok, let me see if I understand you correctly... The user enters username and password on index.php, this is posted to login.php. On login.php after I verify the user is who he/she says they are I set a cookie called accessedbefore to yes and redirect them to the main page. Am I allowed to set a cookie and redirect them after determining who the user is? How would I redirect them after setting the cookie? Header function or is there a better way? Thx Joe :) -- 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] Re: possible safe mode bug with opendir() ?
Hi again, I believe it should disallow openning a directory in safe mode if the UID of the directory does not match the UID of the PHP script. That is exactly the behavior of fopen() in safe mode. Without that behavior, users are permitted to write a PHP script that lets them crawl around the webserver seeing things they have no rights to see. It happens on our system that there will never be any files owned by user A under a directory owned by user B. But even if there were, I think safe mode should disallow this type of filesystem reading. Do you think the fact that this file reading is permitted is a bug that should be reported? A. It works like user/group permission as you know. I don't know what you want to protect :) Do you mean a script with opendir() shouldn't allow openning any directory under open_basedir if UID does not match? You can protect file basis, why do you need other protection for directories under open_basedir? Do you have good reason for this? -- Yasuo Ohgaki -- 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]
Re: [PHP] Cookies, Sessions and Login Proceess
On Mon, 12 Nov 2001, Joe Van Meer wrote: Thx Christopher for replying. Ok, let me see if I understand you correctly... The user enters username and password on index.php, this is posted to login.php. On login.php after I verify the user is who he/she says they are I set a cookie called accessedbefore to yes and redirect them to the Exactly. main page. Am I allowed to set a cookie and redirect them after determining who the user is? How would I redirect them after setting the cookie? Header You can set a cookie any time before any standard output is sent to the browser (and before you send a new Location header). Your login.php can look something like this (with pseudo-ish code) ... ?php $input_ok = validate_user_input( $username, $password ); if( $input_ok ){ $user_ok = authenticate_user( $username, $password ); if( $user_ok ){ setcookie( myuser, ok, time()+7200, / ); header( Location: congratulations.html ); } else { header( Location: go_away.html ); } } else { header( Location: go_away.html ); } ? ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden -- 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] XML DTD
I know this is a PHP news group, but i've seen some XML questions before and I was wondering if anyone knew how to apply a DTD, or where to find one. thanks for any help, Melih Onvural [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]
Re: [PHP] url extracting
On Mon, Nov 12, 2001 at 04:42:08PM -, Caspar Kennerdale wrote: I am yrying to read free urls from a moreover.com to a director app which will be a news reader without a browser 'm using php top extrat the headlines each headline looks similar to this (http://c.moreover.com/click/here.pl?l27536670;) If a browser goes to this page then it is redirected to the appropriate page ie www.newssite.com/etc/etc/etc Director does not interpret the redirection. Can anyone think of a way for a script to go the to the moreover link and then return the 'real url as a variable or as an array of links (if multiple headlines are required You can open a socket to the web server with PHP and grab the Location header from the response. See the fsockopen() man page for examples, or sendtohost.txt for a simple function to handle passing the right headers. http://www.php.net/manual/en/function.fsockopen.php http://dodds.net/~cardinal/sendtohost.txt Matt -- 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] Getting uploaded filename directory
In setting up a form to allow a user to upload a file, upon submission of that form, you can get the actual file name that is being uploaded by accessing the variable: $userfile_name (assuming the form element's name where the user specifies the file is $userfile). Is there a way to get the full path as well? ie: c:\program files\this directory\uploaded_file.txt ? I tried echoing out $userfile to no avail. I also tried some javascript that when the form was submitted, the value for the userfile element was copied to a hidden form element, but that didn't work either. Any ideas? Suggestions? Chris
Re: [PHP] XML DTD
From: Melih Onvural [EMAIL PROTECTED] I know this is a PHP news group, but i've seen some XML questions before and I was wondering if anyone knew how to apply a DTD, or where to find one. thanks for any help, This is not a newsgroup it is a mailing list. We use the DocBook XML DTD to produce the PHP manuals. You can find a copy of it at http://www.oasis-open.org/ or http://nwalsh.com/ -Egon -- 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]
Re: [PHP] Cookies, Sessions and Login Proceess
Thanx a bunch you guys! Got my login process going the way I wanted it. I appreciate your help, as I['m new to php. The first of many questions I suppose :) Cheers Joe Christopher William Wesley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Mon, 12 Nov 2001, Joe Van Meer wrote: Thx Christopher for replying. Ok, let me see if I understand you correctly... The user enters username and password on index.php, this is posted to login.php. On login.php after I verify the user is who he/she says they are I set a cookie called accessedbefore to yes and redirect them to the Exactly. main page. Am I allowed to set a cookie and redirect them after determining who the user is? How would I redirect them after setting the cookie? Header You can set a cookie any time before any standard output is sent to the browser (and before you send a new Location header). Your login.php can look something like this (with pseudo-ish code) ... ?php $input_ok = validate_user_input( $username, $password ); if( $input_ok ){ $user_ok = authenticate_user( $username, $password ); if( $user_ok ){ setcookie( myuser, ok, time()+7200, / ); header( Location: congratulations.html ); } else { header( Location: go_away.html ); } } else { header( Location: go_away.html ); } ? ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden -- 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]
Re: [PHP] Getting uploaded filename directory
If the path doesn't ride along in the _name variable (and I don't know of a case when it would), Nope. The value of the input element when the type = file isn't useable, except as an initial file name, so using JavaScript won't be helpful. I think the input element is implemented for type = file that way on purpose. Providing user/visitor filesystem information is a privacy/security risk. Your last chance to get the path info would be to ask the user to explicitly put it into a text form field ;) ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden On Mon, 12 Nov 2001, Boget, Chris wrote: In setting up a form to allow a user to upload a file, upon submission of that form, you can get the actual file name that is being uploaded by accessing the variable: $userfile_name (assuming the form element's name where the user specifies the file is $userfile). Is there a way to get the full path as well? ie: c:\program files\this directory\uploaded_file.txt ? I tried echoing out $userfile to no avail. I also tried some javascript that when the form was submitted, the value for the userfile element was copied to a hidden form element, but that didn't work either. Any ideas? Suggestions? 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]
[PHP] Destroying Session Prob
Hi again, I've just completed my logout process, everything is going great but after I log out (logout.php has session_start() followed by session_destroy(). ) I get two weird symbols printing out. One is like a box and the a B. My code is below. ?php session_start(); ? ?php session_destroy(); print You are now logged off. BR ? Any ideas why I'm getting these 2 symbols printing out? Thx Joe :) -- 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] PHPINTERNATIONAL.COM
Dear Sir/Madam, PHPINTERNATIONAL.COM - $725 - includes 5 year registration (until 2006 worth up to $150*) I am a domain name broker and have been tracking PHPINTERNATIONAL.COM which expired and became available for a very short period today. I registered it on behalf of a client, however, on contacting this client to notify her of this successful registration she informed me that she will not be proceeding with her venture. If you have an interest in acquiring this domain, please contact me at your earliest convenience. I will be contacting anyone who I feel may have an interest and have priced it for a quick sale. All transactions are 100% secure and are transacted with the largest e-commerce company on the net. The transfer process is extremely simple and you can also be confident that with Namegiant.com, you are dealing with a reputable company and will receive all the assistance and support that you may require throught any transfer process - and beyond. If this email is of no interest, I apologize for this intrusion and can assure you you will not be mailed again. This is a one-off approach because we felt this development could be of geuine interest to you and your company - if it isn't, once again, please let me convey our sincere apologies. Kind regards, Julia Admin Namegiant.com www.namegiant.com * based on the $30 per year that many top registrars charge to extend the registration period and park the domain. Please note that the whois system takes a couple of days to update before it will be reflecting our registration. Thank you -- 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]
Re[2]: [PHP] Help me to win the battle with browser's cache
Hello Girish, Monday, November 12, 2001, 4:29:55 PM, you wrote: GN Hi GN I've found some code which i put it into this function. I've never got the GN meta tag technique to work but this seems to do the trick. GN Call noCache() before outputting anything to the page. GN function noCache() { GN header (Expires: Mon, 26 Jul 1997 05:00:00 GMT);// Date in the past GN header (Last-Modified: . gmdate(D, d M Y H:i:s) . GMT); // always GN modified GN header (Cache-Control: no-cache, must-revalidate); file://HTTP/1.1 GN header (Pragma: no-cache); // HTTP/1.0 GN } Thanks! That's what I've been looking for. But there is something wrong with this headers. I pasted the code above, and peges really stopped loading from cache. But... I tested it with IE 5.5 SP2 and Netscape 4.77 (I don't use Netscape 6.x because it's just useless cputime eater). The page works fine with Navigator, but IE shows blank page each time I click a link. It shows the page properly only after clicking Refresh. I remember I have the same problem 1/2 year ago when I was unsuccesfully tried to win the battle with the browser cache :). Now I commented the 3rd header (with cache-control), and now IE works perfect too. I don't know why it works on your pages :). The problem is not in my personal IE because the same problem was (as I said) whan I used IE 5.0. So, if there are some people who have the same problem, I would suggest to put these 3 lines on the top of the page: header(Expires: Mon, 26 Jul 1997 05:00:00 GMT); header(Last-Modified: .gmdate(D, d M Y H:i:s). GMT); header(Pragma: no-cache); Thanks to Girish and others who tried to help me! P.S. There can be another problem: client's clock. If it's 20 Jan 1985 on client's machine, than ... Do you think I can put in the first header some very old date like 1 Jan 1970? I just want it to work in any case. -- Best regards, Olexandrmailto:[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] Re: Destroying Session Prob
Try a more simple: ?php session_start(); session_destroy(); echo(You are now logged off br); ? Joe Van Meer [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi again, I've just completed my logout process, everything is going great but after I log out (logout.php has session_start() followed by session_destroy(). ) I get two weird symbols printing out. One is like a box and the a B. My code is below. ?php session_start(); ? ?php session_destroy(); print You are now logged off. BR ? Any ideas why I'm getting these 2 symbols printing out? Thx Joe :) -- 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] problems with php and jscript....
I have written an html page with jscript and php code, but I have some problems. The errors are in black letter: why is not correct this code? ?php include(configuration.php4); global $g_language; $lang = $g_language; ? HTML HEAD meta http-equiv=Content-Type content=text/html; charset=windows-1252 META HTTP-EQUIV=Content-Type CONTENT=text/html; charset=iso-8859-1 script language=JavaScript !-- BtOver = (((navigator.appName == Netscape) (parseInt(navigator.appVersion) = 3 )) || ((navigator.appName == Microsoft Internet Explorer) (parseInt(navigator.appVersion) = 4 ))); function BtPreload(img) { var a=new Image(); a.src=img; return a; } if(BtOver) { BnavN_Info=BtPreload('images/button_informacion.jpg'); BnavO_Info=BtPreload('images/button_informacion_over.jpg'); BnavN_eInfo=BtPreload('images/button_information.jpg'); BnavO_eInfo=BtPreload('images/button_information_over.jpg'); } function process_mouse_over(obj){ if (document.lang.value==0){ obj.src = BnavO_Info.src ; } else obj.src=BnavO_eInfo.src; } // -- /script /HEAD BODY BGCOLOR=#00 input type=hidden name=lang CENTER TABLE WIDTH=775 BORDER=0 CELLPADDING=0 CELLSPACING=0 TR TD !-- BOTON INFORMACION -- a href=frm_information.htm onmouseover=process_mouse_over(document.Bnav_Info) onmouseout=if(BtOver) document['Bnav_Info'].src=BnavN_Info.src IMG SRC=images/button_informacion.jpg BORDER=0 WIDTH=175 HEIGHT=75 name=Bnav_Info/abr/TD . /TABLE /CENTER /BODY /HTML If somebody has an idea, please, help me Silvia Mahiques
RE: [PHP] Getting uploaded filename directory
In setting up a form to allow a user to upload a file, upon submission of that form, you can get the actual file name that is being uploaded by accessing the variable: $userfile_name (assuming the form element's name where the user specifies the file is $userfile). Is there a way to get the full path as well? ie: c:\program files\this directory\uploaded_file.txt ? I tried echoing out $userfile to no avail. I also tried some javascript that when the form was submitted, the value for the userfile element was copied to a hidden form element, but that didn't work either. Any ideas? Suggestions? It's not very secure, I think it isn't possible to get a full path Lubo Gabal -- 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] Re: session
well i have a solution to my problem that makes no sense if i declare session_start(); on my login.html page which precedes these two pages it works and is now login.php this page creates the session and all is well if i create session_start(); on the next page and leave it off my login.php page i get multiple sessions. I cannot find any reason behind this and no one seems to have any idea what i am talking about Thanks anyway Brendon Brendon [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am using PHP 4.06, IE 6 and Win 2000. When i register a session like so: session_start(); session_register(SESSION_UserID); and on the next page refer to the session: session_start(); if(!session_is_registered(SESSION_UserID)) { header(Location: error.php?ec=1); exit; } ? It registers a new session: I then have a session as so in the sessons directory: SESSION_UserID|s:1:1;SESSION_UPERMS|s:1:1; and a blank new one. any ideas? -- 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]
Re: [PHP] PHPINTERNATIONAL.COM
It's not bad enough that you're squatting the domain, you have to spam the list on top of it? On Mon, 12 Nov 2001 11:37:32 -0800, Mark Segal wrote: Dear Sir/Madam, PHPINTERNATIONAL.COM - $725 - includes 5 year registration (until 2006 worth up to $150*) I am a domain name broker and have been tracking PHPINTERNATIONAL.COM which expired and became available for a very short period today. I registered it on behalf of a client, however, on contacting this client to notify her of this successful registration she informed me that she will not be proceeding with her venture. If you have an interest in acquiring this domain, please contact me at your earliest convenience. I will be contacting anyone who I feel may have an interest and have priced it for a quick sale. All transactions are 100% secure and are transacted with the largest e-commerce company on the net. The transfer process is extremely simple and you can also be confident that with Namegiant.com, you are dealing with a reputable company and will receive all the assistance and support that you may require throught any transfer process - and beyond. If this email is of no interest, I apologize for this intrusion and can assure you you will not be mailed again. This is a one-off approach because we felt this development could be of geuine interest to you and your company - if it isn't, once again, please let me convey our sincere apologies. Kind regards, Julia Admin Namegiant.com www.namegiant.com * based on the $30 per year that many top registrars charge to extend the registration period and park the domain. Please note that the whois system takes a couple of days to update before it will be reflecting our registration. Thank you -- 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]
Re: [PHP] Serial Port Programing
On Mon, 12 Nov 2001 12:36:07 -0500, Brian C. Doyle wrote: Hello all, Does PHP have the ability to control a serial port? I see we can use the Printer but that was All I saw. I don't know about windows but on linux I guess you would just fopen /dev/ttyS0 and read or write to it. -- 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]
PD: [PHP] javascript problems
Hi all, Could someone send me URL for JavaScript help list like this on php3.. ..or you could solve my problem ? --- Here is part of scriptand the problemat the end - function checkChoice(whichbox) { with (whichbox.form) { if (whichbox.checked == false) hiddentotal.value = eval(hiddentotal.value) - eval(whichbox.value); else hiddentotal.value = eval(hiddentotal.value) + eval(whichbox.value); hiddentotal2.value = eval(hiddentotal.value)*? print($mnoznik);?; return(formatCurrency(hiddentotal.value)); } } The first checkbox is Special...i press it... input name=special type=checkbox value=4200 onClick=this.form.total.value= checkChoice(this); the value is send to the total counter. next it the form are those eleme nts : input name=114 type=checkbox value=4200 onClick=this.form.total.value=chec kChoice(this); input name=222 type=checkbox value=22 onClick=this.form.total.value=checkC hoice(this); input name=333 type=checkbox value=11 onClick=this.form.total.value=checkC hoice(this); How to make a restriction that if you selected Special checkbox you cannot p ress the 114 and 333 ..some alert box...i cannot make this... Very glad if someone could help me TeqilaMan -- 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] GURU HELP: session_unset
http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.phps I'm trying to session_unset() - it worked I thought. session_unset(postcard); unset($postcard); unset($MyImage); Go to: http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.php and click me. It sets a session, displays an image, and then is supposed to destroy itself so that when I go back to http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.php (and or reload http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.php) I should see the text/html header and not an image/png header. The only way to right myself is to exit Netscape altogether. I have tried session_destroy() session_unregister and even session_write_close - not that any of those worked. I consulted the online manual and thought this would be enough: session_unset(postcard); unset($postcard); unset($MyImage); I have even used the echo on line 3 to prove to myself that my session terminated itself. I believe the session terminates, but for what ever reason, http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.php is still receiving header(Content-type: image/png) and not header(Content-type: text/html) Can someone help? John (Post reply would be helpful please.) -- 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] using mail
Hello, I am using the mail() function right now to send e-mails. Is there a way I can dynamically change where it says the e-mail is from? Thanks Brandon
RE: [PHP] using mail
the forst param to mail is the extra headers to send add in Reply-To: [EMAIL PROTECTED]\r\n and/or From: [EMAIL PROTECTED]\r\n ( I think this one's correct ) -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 9:41 AM To: PHP User Group Subject: [PHP] using mail Hello, I am using the mail() function right now to send e-mails. Is there a way I can dynamically change where it says the e-mail is from? Thanks Brandon
RE: [PHP] using mail
oops, forst is meant to be forth -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 9:44 AM To: 'Brandon Orther'; PHP User Group Subject: RE: [PHP] using mail the forst param to mail is the extra headers to send add in Reply-To: [EMAIL PROTECTED]\r\n and/or From: [EMAIL PROTECTED]\r\n ( I think this one's correct ) -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 9:41 AM To: PHP User Group Subject: [PHP] using mail Hello, I am using the mail() function right now to send e-mails. Is there a way I can dynamically change where it says the e-mail is from? Thanks Brandon
Re: [PHP] php slowdown under apache on win 2000 only under netscape
I've noticed this same problem on both of my computers, but have not yet found a solution. I've got Apache, Mysql, and php running on my personal computer. When I access it via http://localhost any screens that use a POST will timeout until I ALT-TAB to a non-Netscape window. Once I ALT-TAB, or mouse click a different window, the Netscape localhost issue resolves itself, the variables POST just fine, and my page displays. This problem does not happen in IE. Very strange. -Steve Laurence Gordon [EMAIL PROTECTED] wrote: Actually I kind of made the problem go away, but I don't know why... I reduced the priority of the netscape process to Below Normal and it works fine. Why would netscape take up so much of the cpu? Larry Laurence Gordon [EMAIL PROTECTED] wrote in message 9c7b2h$qcp$[EMAIL PROTECTED]">news:9c7b2h$qcp$[EMAIL PROTECTED]... Hi, My problem is that my local apache 1.3.19 server running under windows 2000 on a LAN has slow execution issues. When I submit a form with POST variables, the script takes forever and a day to execute, sometimes returning after 15 seconds, sometimes hitting a max execution time. This behavior is not seen under IE and is not seen when the scripts are running from a freeBSD platform through netscape. software: windows 2000 pro sp1 php 4.0.4pl1 apache 1.3.19 mysql 3.23.33 all installed from binaries. Thanks in advance, Larry -- 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] -- ls -- 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]
Re: [PHP] using mail
Did you RTFM? http://www.php.net/manual/en/function.mail.php Just create a variable and input it as an extra header. $from = from: [EMAIL PROTECTED]\r\n ; mail($to,$subject,$message,$from); On Monday 12 November 2001 02:41 pm, you wrote: Hello, I am using the mail() function right now to send e-mails. Is there a way I can dynamically change where it says the e-mail is from? Thanks Brandon -- 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]
RE: [PHP] using mail
YES I DID READ THE F...in MANUAL -Original Message- From: Kurt Lieber [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 2:56 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] using mail Did you RTFM? http://www.php.net/manual/en/function.mail.php Just create a variable and input it as an extra header. $from = from: [EMAIL PROTECTED]\r\n ; mail($to,$subject,$message,$from); On Monday 12 November 2001 02:41 pm, you wrote: Hello, I am using the mail() function right now to send e-mails. Is there a way I can dynamically change where it says the e-mail is from? Thanks Brandon -- 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]
RE: [PHP] using mail
Then why didn't you notice that in the additional headers you can specify the from header? mail([EMAIL PROTECTED], Whee, Whee! Mail Body, From: Jason Murray [EMAIL PROTECTED]\n); Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT Work now, freak later! -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 9:52 AM To: PHP User Group Subject: RE: [PHP] using mail YES I DID READ THE F...in MANUAL -Original Message- From: Kurt Lieber [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 2:56 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] using mail Did you RTFM? http://www.php.net/manual/en/function.mail.php Just create a variable and input it as an extra header. $from = from: [EMAIL PROTECTED]\r\n ; mail($to,$subject,$message,$from); On Monday 12 November 2001 02:41 pm, you wrote: Hello, I am using the mail() function right now to send e-mails. Is there a way I can dynamically change where it says the e-mail is from? Thanks Brandon -- 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] Re: GURU HELP: session_unset
Source is here: http://www.CollegeSherbrooke.qc.ca/~languesmodernes/course/test_session.phps -- 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]
Re: [PHP] XML DTD
Here's a DTD: !DOCTYPE stuff [ !ELEMENT stuff (thing+) !ELEMENT thing (#PCDATA) ] Whether it is of any USE to anyone is debatable.. At 12:41 12/11/2001 -0500, Melih Onvural wrote: I know this is a PHP news group, but i've seen some XML questions before and I was wondering if anyone knew how to apply a DTD, or where to find one. thanks for any help, Melih Onvural [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] - Brian White Step Two Designs Pty Ltd - SGML, XML HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: [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] Re: possible safe mode bug with opendir() ?
[EMAIL PROTECTED] wrote: Hi again, I believe it should disallow openning a directory in safe mode if the UID of the directory does not match the UID of the PHP script. That is exactly the behavior of fopen() in safe mode. Without that behavior, users are permitted to write a PHP script that lets them crawl around the webserver seeing things they have no rights to see. Now I see what you want :) It happens on our system that there will never be any files owned by user A under a directory owned by user B. But even if there were, I think safe mode should disallow this type of filesystem reading. Under UNIX like systems, /tmp is world writable and everyone on the system can open dir/wirte/read files, but it's possible to secure files/directory under /tmp. I think you can apply the same. GID support also helps to allow opening files certain group. Is it not enough for your security needs? Do you think the fact that this file reading is permitted is a bug that should be reported? I think the feature that check dir UID/GID will be useful for some prople. How about submit a feature request (It's one of bug report types) BTW, you have opotion that disallow opendir at all, with disable_functions directive in php.ini -- Yasuo Ohgaki _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.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]
[PHP] Re: possible safe mode bug with opendir() ?
Yasuo Ohgaki wrote: [EMAIL PROTECTED] wrote: It happens on our system that there will never be any files owned by user A under a directory owned by user B. But even if there were, I think safe mode should disallow this type of filesystem reading. Under UNIX like systems, /tmp is world writable and everyone on the system can open dir/wirte/read files, but it's possible to secure files/directory under /tmp. I think you can apply the same. GID support also helps to allow opening files certain group. Is it not enough for your security needs? BTW, if you get rid of read permission for a directory, directory listing is not possible under UNIX like systems. You can still read/write files with proper permission. (unlink/create files with proper permission also. You can get rid of write permission for directory, too.) Just in case, you didn't know about it :) php.ini entries like safe_mode_opendir_sid safe_mode_opendir_gid will help to improve security still. I just don't need this kind of feature, but others may need it. -- Yasuo Ohgaki _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.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]