RE: [PHP] sessions and domains
Bk, You would have to somehow pass all session variables onto the new host since session variables are stored server-side. You would have to have a function that took all session variables and passed them to the new domain including session id... then you would need a function that would take those variables and make them session variables in the new domain... SJK > -Original Message- > From: bk [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 28, 2003 5:35 AM > To: [EMAIL PROTECTED] > Subject: [PHP] sessions and domains > > Hi > > I've to set up a shared shopping cart to buy items > from four different sites and pay them at once > passing trough a single checkout. > > > Provided that these sites are hosted on the same > server (actually in the same directory), but have > different names, is it possible to share php > sessions across multiple domains? How? > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I change the timezone?
Thank you. I added 43200 then slove this problem. -- "Jay Blanchard" <[EMAIL PROTECTED]> ???:[EMAIL PROTECTED] [snip] How to do this? [snip] I am in Hong Kong and the server is in US. I can't change the server setting. [/snip] How about getting the server time and then adding or subtracting from that to get the appropriate time? http://us2.php.net/manual/en/function.time.php [/snip] Use mktime http://us2.php.net/manual/en/function.mktime.php HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: secure code
Here is exactly what you are looking for: "The Open Web Application Security Project" http://www.owasp.org/ best. Anil On Wed, 28 May 2003, Tim Burgan wrote: > Hello, > > I'm wondering if you can recommend any resources that discuss writing secure > code and how to put the best methods in place to prevent hackers. > > I'm particularly looking at resources from the web coding perspective, not > securing a server. > > Or, what things to you do to 'block' hackers. > > Thanks > Tim Burgan > > -- Linuxense Information Systems Pvt. Ltd., Trivandrum, India http://www.linuxense.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How can I change the timezone?
[snip] How to do this? [snip] I am in Hong Kong and the server is in US. I can't change the server setting. [/snip] How about getting the server time and then adding or subtracting from that to get the appropriate time? http://us2.php.net/manual/en/function.time.php [/snip] Use mktime http://us2.php.net/manual/en/function.mktime.php HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I change the timezone?
How to do this? -- "Jay Blanchard" <[EMAIL PROTECTED]> ???:[EMAIL PROTECTED] [snip] I am in Hong Kong and the server is in US. I can't change the server setting. [/snip] How about getting the server time and then adding or subtracting from that to get the appropriate time? http://us2.php.net/manual/en/function.time.php HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysq_connect - flags
Hi, Is there any body who have experience with the flags in mysql_connect() in php >= 4.3 . Especially the MYSQL_CLIENT_COMPRESS flag. I dont know if it works or not. I cant make any difference. Should php must be compiled with a special flag to get work this? atur -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How can I change the timezone?
[snip] I am in Hong Kong and the server is in US. I can't change the server setting. [/snip] How about getting the server time and then adding or subtracting from that to get the appropriate time? http://us2.php.net/manual/en/function.time.php HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How can I change the timezone?
I am in Hong Kong and the server is in US. I can't change the server setting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Update to DB
Kalle Saarinen wrote: Hello, I was just wondering how to update data to database from html text field. I have a form that retrieves data from dbase and put's values into text field in a web page. I want to be able to modify data and then save it dbase by hitting save button (also form object). ie. $sql="SELECT col1 FROM table WHERE id = 1"; $result=mysql_query($sql); $num = mysql_num_rows($result); $row = mysql_fetch_array($result); $var = $row["col1"]; echo ""; echo ""; echo ""; Anyone know what is the proper way to do this? -Kalle You need to capture the values passed by the form in the script referenced in the form action attribute, using the relevant superglobal referenced in the form method attribute (e.g. $_GET or $_POST). Using your example, you would access the "name" form element like so: $_POST['name'] Then you should use this variable in an UPDATE or INSERT statement and send that to your database server, e.g.: mysql_query("UPDATE table SET col1 = " . $_POST['name'] . " WHERE id = " . $_POST['id'] . " LIMIT 1"); I would suggest reading the PHP manual a little more carefully, in particular those sections regarding variable and form handling, as well as the section on MySQL. Regards, David -- David Grant Web Developer [EMAIL PROTECTED] http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered Office: 43 Royal Park, Bristol, BS8 3AN Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD Company registration number: 4016744 ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Update to DB
[snip] I was just wondering how to update data to database from html text field. Anyone know what is the proper way to do this? [/snip] The action for your form can contain an SQL UPDATE statement where the values in the database are updated with the values in the form. Fairly simple. Here is an example from some of my code on a project... //update tables for each set $qup = "UPDATE tblClassOthers "; $qup .= "SET BilledFlag = '" . date("Y-m-d") . "', "; $qup .= "CycleFlag = '" . $emicycle . "' "; $qup .= "WHERE RecordDate <= '" . $emidate . "' "; $qup .= "AND RecordID = '010101' "; $qup .= "AND BilledFlag = '' "; if(!($dbup = mysql_query($qup, $dbconnect))){ print("MySQL reports: " . mysql_error() . "\n"); exit(); } HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Trouble With FTP_PUT Please Help!
Hi, i have been having trouble working out how to upload an image, the most progress ive made is putting a blank file on the server, but thats it, any suggestions anyone?? Im using PHP 4.3.2, Apache 1.3.27 here is the code im using! photoposted.php postphoto.php "; echo "Click the Browse button to find the file you wish to upload"; echo ""; echo ""; echo ""; echo ""; ?> i am quite new to php, any suggestions would be highly appreciated! thanks :) adnan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Update to DB
Hello, I was just wondering how to update data to database from html text field. I have a form that retrieves data from dbase and put's values into text field in a web page. I want to be able to modify data and then save it dbase by hitting save button (also form object). ie. $sql="SELECT col1 FROM table WHERE id = 1"; $result=mysql_query($sql); $num = mysql_num_rows($result); $row = mysql_fetch_array($result); $var = $row["col1"]; echo ""; echo ""; echo ""; Anyone know what is the proper way to do this? -Kalle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re:Re: [PHP] About Guest Book\\\'s messages....
Hi, sir: I tried it but also failed. For One Chinese Character is composed with two bytes, and between every word and word in a line, there is no space " ",(Not like english). For example: English's thank you is : Thank you very much! Chinese's thank you is : ¯uªº¦hÁ±z¤F¡I and some word's second byte is "\" char, and it would be combine with "\n" to be "\\n", and it's structure would be destroied . Any idea ? Thanks . -original mail Greetings, How about some simple word detection attempts like: $words = explode (' ',$input); //create array $new_words = ''; //empty foreach ($words as $word) { if (strlen ($word) <= 40)) { $word = wordwrap ($word,40,"\n",1); } $new_words .= ' '.$word; //add word(s) to string } $new_words = trim ($new_words); //kill excess spaces So the idea here is to check each supposed word for it's length, if its a long word, longer than 40 characters, break it up. This should leave the smaller and hopefully real words away from the wordwrap-ing. note that this is completely untested, I just wrote it here in email. Hope that helps. -- Jason k Larson fongming wrote: > Hi, Sir: > > There may be someone leave a message like > following: > > U > > and it expand the width of the table on my web page and make pages ugly > > I used wordwrap($word,40,"\n",1) to prevent it, > but my system is BIG5 ,two bytes, > Sometimes this method would destroy the structure > of the two-bytes word. > > Any one has good ideas and could help me with that ? > Thanks > > > --- > Fongming from Taiwan. > > > -- > ¡»From: ¦¹«H¬O¥Ñ®ç¤p¹q¤l¶l¥ó1.5ª©©Òµo¥X... > http://fonn.fongming.idv.tw > [EMAIL PROTECTED] > -- ¡»From: ¦¹«H¬O¥Ñ®ç¤p¹q¤l¶l¥ó1.5ª©©Òµo¥X... http://fonn.fongming.idv.tw [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables don't pass... *sniff*
Leif K-Brooks wrote: To maintain absolute compatibility, just use $HTTP_GET_VARS. It's availalable in all PHP versions, just deprectaed in versions here $_GET is available. I would've thought that $HTTP_*_VARS will be deprecated sometime in the future. It might be an idea to write your own accessor methods, e.g. function RetrieveGetParameter($parameterValue) { if (FALSE == is_null($_GET)) { if (FALSE == empty($_GET[$parameterValue])) { return ($_GET[$parameterValue]); } else { return (NULL); } } else { if (FALSE == empty($HTTP_GET_VARS[$parameterValue])) { return ($HTTP_GET_VARS[$parameterValue]); } else { return (NULL); } } } -- David Grant Web Developer [EMAIL PROTECTED] http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered Office: 43 Royal Park, Bristol, BS8 3AN Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD Company registration number: 4016744 ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Variables don't pass... *sniff*
I think, you can write some wrapper arround this and in some config file just add one variable which will tell the script about PHP version. so You can than use something like this: switch (VERSION) { case 4.0: .. } DS -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 1:47 PM To: Leif K-Brooks; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Variables don't pass... *sniff* [snip] To maintain absolute compatibility, just use $HTTP_GET_VARS. It's availalable in all PHP versions, just deprectaed in versions here $_GET is available. [/snip] Just to be perfectly clear on this. Let's say that I am writing an application that I am going to release to the public (for free of course!). In order that the application be as compatible with the many installed versions of PHP as possible I should always use $HTTP_GET_VARS or $HTTP_POST_VARS ? Or is there a point at which the formation of the variable call changes (like the $_GET and $_POST in the latest versions)? If there is a point at which it changes how can I account for that in code, other than telling the potential use that "you must be running PHP 4.x.x"? Thanks! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 28 May 2003 11:52:08 -0000 Issue 2083
php-general Digest 28 May 2003 11:52:08 - Issue 2083 Topics (messages 149176 through 149228): secure code 149176 by: Tim Burgan 149181 by: Marco Weber 149182 by: Evan Nemerson Re: how to read the stuff that got piped ("|") to the script? 149177 by: Joe Stump Wild Card with unlink 149178 by: Vernon 149180 by: Vernon strip_tags() Quandry 149179 by: CF High 149185 by: Justin French Re: Mail problem 149183 by: Manuel Lemos Re: Help With Queue mail 149184 by: Manuel Lemos include_path 149186 by: Ashley M. Kirchner 149187 by: Tom Rogers 149188 by: Ashley M. Kirchner My Sincere Request!! 149189 by: REV DR EGO MOMOH Regexp question... 149190 by: Andrew D. Luebke 149196 by: David Grant Re: My Sincere Request!![Scanned] 149191 by: Michael Egan 149197 by: David Grant 149199 by: Gerhard Petrowitsch php 4.3.1 / latest 149192 by: km.mrna.tn.nic.in 149198 by: David Grant Re: ANY POSTNUKER? Security problem! 149193 by: nabil Re: cheap PHP+SQL WebHosting 149194 by: nabil Re: Error with directories 149195 by: Catalin Trifu Re: simple "while" loop terminated for no reason 149200 by: Raymond About Guest Book\'s messages 149201 by: fongming 149203 by: Jason k Larson id & name when identifying html elements 149202 by: Roland Tarver 149206 by: Jason k Larson flawless script 149204 by: electroteque 149207 by: Jason k Larson 149221 by: sven 149223 by: David Grant Re: how to process incoming mails? 149205 by: David Robley Variables don't pass... *sniff* 149208 by: daniel.rhesusb.dk 149209 by: Petre Agenbag 149211 by: Chris Hayes 149212 by: Jonathan Wilkes 149213 by: PHPSpooky 149214 by: daniel.rhesusb.dk 149215 by: daniel.rhesusb.dk 149216 by: Petre Agenbag 149217 by: Petre Agenbag 149219 by: Petre Agenbag 149225 by: daniel.rhesusb.dk 149226 by: Leif K-Brooks 149227 by: Jay Blanchard 149228 by: daniel.rhesusb.dk php working with iis 149210 by: Steve Barlow sessions and domains 149218 by: bk 149222 by: David Grant Triggers & events with objects 149220 by: Axel Tietje detect proxy 149224 by: sonjaya 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] -- --- Begin Message --- Hello, I'm wondering if you can recommend any resources that discuss writing secure code and how to put the best methods in place to prevent hackers. I'm particularly looking at resources from the web coding perspective, not securing a server. Or, what things to you do to 'block' hackers. Thanks Tim Burgan --- End Message --- --- Begin Message --- hi, well, there are a lot of articles on the internet... however, i bought a book... it really helped a lot! :) there are so many things, developers can do worng, but here is a listing of the most important ones: but the most important thing you can do is to check very varaible for bad characters... with some special chars you can manipulate SQL-queries, open otherfiles (on the local system OR even on remote systems) or even execute some nice bash-scripts... (you can avoid such attacks, if you've set register_globals to Off) i.e. if you include a page in your securityhole1.php via http get/post vars: make sure, the users can't enter something like this: securityhole1.php?page=http://www.somewhere.else/badcode.php the second important thing is to set the variables you need to a specific value, before you start using them, so that the users can't do something, they shouldn't do by setting the variable to a value by a get/post request: i.e. securityhole2.php: in this case you can access secret information by using the following url: securityhole2.php?showstuff=yes it also quite important to check numbers for their value (are they too high / low)... i made the experience, that you can slow down a webserver a lot, if you send multiple requests with number values that lead i.e. to an infinite loop... although php terminates the scripts after X seconds, it gives you the possibility to run a lot of php scripts simultaneously! :) Try to protect php scripts, which you don't need to access directly, i.e. with .htaccess files... i.e. store your libaries/templates in a directory and protect them with a .htaccess like this: BEGIN OF .htaccess sample--- order deny,allow deny from all END OF .htaccess sample--- there are also some important facts about file uploads... but for now, it's quite late (3:15 in the morning...) and i'm quite tired...
Re: [PHP] Variables don't pass... *sniff*
Thanks all! I think that I'll check for both variables to be absolutely 100% sure. I could easily imagine future version of PHP slowly getting rid of deprecated stuff like this to improve speed or something... Besides, the word "deprecated" scares me ;) Daniel "There are 10 kinds of people - those who know binary and those who don't" - Original Message - From: Leif K-Brooks To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 1:35 PM Subject: Re: [PHP] Variables don't pass... *sniff* To maintain absolute compatibility, just use $HTTP_GET_VARS. It's availalable in all PHP versions, just deprectaed in versions here $_GET is available. [EMAIL PROTECTED] wrote: >Thank you! =) > >Okay, okay... Sorry to keep rambling on like this, but I just need to get this 100% straight: > >I read up on the predefined variables on php.net, and as you said, in older PHP versions, the $_GET equivalent was $HTTP_GET_VARS, and that did the same as $_GET. > >So, the RegisterGlobals boolean did exist in older versions too, but just now defaulted to false instead of true? Meaning, that my older scripts which used neither $HTTP_GET_VARS nor $_GET will infact fail on all versions where RegisterGlobals is false. Is that correct? > >So, to maintain absolute compatibility, I'll just have to check if either $_GET[aVar] or $HTTP_GET_VARS[aVar] is set and get the value from the existing one? > >Again, thanks for the help =) > >Daniel > - Original Message - > From: Petre Agenbag > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Sent: Wednesday, May 28, 2003 12:02 PM > Subject: Re: [PHP] Variables don't pass... *sniff* > > > Sorry, I missunderstood your question about backwards compatible. > > YES, accessing your variables this way ($_POST[] etc), IS backwards > compatibel, ie, they are placed in those arrays anyways, BUT, the method > is not backwards compatible to older versions of PHP, there the arrays > were called $HTTP_GET_VARS or something similarly unlike $_GET... > > On Wed, 2003-05-28 at 11:49, [EMAIL PROTECTED] wrote: > > Thank you mate, this works! =) > > > > Just curious, though... I'd like to keep my scripts as compatible as > > possible, so can you tell me if this method is backwards compatible? I've > > never used this method before, the variables have just "been there" on a > > subsequent page. I'm kinda fearing for my previous work, if the servers > > suddenly change their configurations, rendering scripts non-functional... > > > > And, I'm guessing $_POST would be the array to hold POSTed variables, right? > > > > Is there a function to "release" the contents of these arrays into global > > variables in a scripts, so you don't have to go... > > $var1 = $_GET[var1]; > > $var2 = $_GET[var2]; > > ...if that's what you wanted? (Not sure I want to, but just to know) > > > > Again, thank you! =) > > > > Daniel > > > > > > - Original Message - > > From: Petre Agenbag > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Sent: Wednesday, May 28, 2003 11:40 AM > > Subject: Re: [PHP] Variables don't pass... *sniff* > > > > > > RegisterGlobals = Off > > > > You need to access these variables by > > > > $_POST[aVariable] or in your case ( adding the variables to the end of a > > URL means you are using the GET method: $_GET[aVAriable] etc. > > > > On Wed, 2003-05-28 at 11:37, [EMAIL PROTECTED] wrote: > > > Hi all! > > > > > > I'm using Apache 2.0.45, PHP 4.3.2RC4, and MySQL 3.23.49 on Windows 2003 > > > Server Standard. > > > > > > I have a problem passing variables between pages. They simply get lost. > > > Neither GET nor POST pass values, and even "hardcoding" them into the URL, > > > like > > > > > > htpp://localhost/comeon.php?aVariable=ding&anotherVariable=dong > > > > > > and putting this in comeon.php: > > > > > > echo("Values: $aVariable, $anotherVariable"); > > > > > > only outputs > > > > > > Values: , > > > > > > ...I've tried with RC3 of PHP, even 4.3.1, but it doesn't work. I've used > > > PHP on my machine with Apache 2 before, and it worked fine. Actually I > > used > > > the same scripts fine on my old config. This was on XP however, so I'm not > > > sure if it's got something to do with the OS. I'm hoping it's a > > > configuration issue. > > > > > > Any ideas are VERY much appreciated =). > > > > > > Thanks, > > > Daniel > > > > > > > > > » There are 10 kinds of people - those who know binary and those who > > don't. > > > « > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Variables don't pass... *sniff*
[snip] To maintain absolute compatibility, just use $HTTP_GET_VARS. It's availalable in all PHP versions, just deprectaed in versions here $_GET is available. [/snip] Just to be perfectly clear on this. Let's say that I am writing an application that I am going to release to the public (for free of course!). In order that the application be as compatible with the many installed versions of PHP as possible I should always use $HTTP_GET_VARS or $HTTP_POST_VARS ? Or is there a point at which the formation of the variable call changes (like the $_GET and $_POST in the latest versions)? If there is a point at which it changes how can I account for that in code, other than telling the potential use that "you must be running PHP 4.x.x"? Thanks! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables don't pass... *sniff*
To maintain absolute compatibility, just use $HTTP_GET_VARS. It's availalable in all PHP versions, just deprectaed in versions here $_GET is available. [EMAIL PROTECTED] wrote: Thank you! =) Okay, okay... Sorry to keep rambling on like this, but I just need to get this 100% straight: I read up on the predefined variables on php.net, and as you said, in older PHP versions, the $_GET equivalent was $HTTP_GET_VARS, and that did the same as $_GET. So, the RegisterGlobals boolean did exist in older versions too, but just now defaulted to false instead of true? Meaning, that my older scripts which used neither $HTTP_GET_VARS nor $_GET will infact fail on all versions where RegisterGlobals is false. Is that correct? So, to maintain absolute compatibility, I'll just have to check if either $_GET[aVar] or $HTTP_GET_VARS[aVar] is set and get the value from the existing one? Again, thanks for the help =) Daniel - Original Message - From: Petre Agenbag To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 12:02 PM Subject: Re: [PHP] Variables don't pass... *sniff* Sorry, I missunderstood your question about backwards compatible. YES, accessing your variables this way ($_POST[] etc), IS backwards compatibel, ie, they are placed in those arrays anyways, BUT, the method is not backwards compatible to older versions of PHP, there the arrays were called $HTTP_GET_VARS or something similarly unlike $_GET... On Wed, 2003-05-28 at 11:49, [EMAIL PROTECTED] wrote: > Thank you mate, this works! =) > > Just curious, though... I'd like to keep my scripts as compatible as > possible, so can you tell me if this method is backwards compatible? I've > never used this method before, the variables have just "been there" on a > subsequent page. I'm kinda fearing for my previous work, if the servers > suddenly change their configurations, rendering scripts non-functional... > > And, I'm guessing $_POST would be the array to hold POSTed variables, right? > > Is there a function to "release" the contents of these arrays into global > variables in a scripts, so you don't have to go... > $var1 = $_GET[var1]; > $var2 = $_GET[var2]; > ...if that's what you wanted? (Not sure I want to, but just to know) > > Again, thank you! =) > > Daniel > > > - Original Message - > From: Petre Agenbag > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Sent: Wednesday, May 28, 2003 11:40 AM > Subject: Re: [PHP] Variables don't pass... *sniff* > > > RegisterGlobals = Off > > You need to access these variables by > > $_POST[aVariable] or in your case ( adding the variables to the end of a > URL means you are using the GET method: $_GET[aVAriable] etc. > > On Wed, 2003-05-28 at 11:37, [EMAIL PROTECTED] wrote: > > Hi all! > > > > I'm using Apache 2.0.45, PHP 4.3.2RC4, and MySQL 3.23.49 on Windows 2003 > > Server Standard. > > > > I have a problem passing variables between pages. They simply get lost. > > Neither GET nor POST pass values, and even "hardcoding" them into the URL, > > like > > > > htpp://localhost/comeon.php?aVariable=ding&anotherVariable=dong > > > > and putting this in comeon.php: > > > > echo("Values: $aVariable, $anotherVariable"); > > > > only outputs > > > > Values: , > > > > ...I've tried with RC3 of PHP, even 4.3.1, but it doesn't work. I've used > > PHP on my machine with Apache 2 before, and it worked fine. Actually I > used > > the same scripts fine on my old config. This was on XP however, so I'm not > > sure if it's got something to do with the OS. I'm hoping it's a > > configuration issue. > > > > Any ideas are VERY much appreciated =). > > > > Thanks, > > Daniel > > > > > > » There are 10 kinds of people - those who know binary and those who > don't. > > « > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables don't pass... *sniff*
Thank you! =) Okay, okay... Sorry to keep rambling on like this, but I just need to get this 100% straight: I read up on the predefined variables on php.net, and as you said, in older PHP versions, the $_GET equivalent was $HTTP_GET_VARS, and that did the same as $_GET. So, the RegisterGlobals boolean did exist in older versions too, but just now defaulted to false instead of true? Meaning, that my older scripts which used neither $HTTP_GET_VARS nor $_GET will infact fail on all versions where RegisterGlobals is false. Is that correct? So, to maintain absolute compatibility, I'll just have to check if either $_GET[aVar] or $HTTP_GET_VARS[aVar] is set and get the value from the existing one? Again, thanks for the help =) Daniel - Original Message - From: Petre Agenbag To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 12:02 PM Subject: Re: [PHP] Variables don't pass... *sniff* Sorry, I missunderstood your question about backwards compatible. YES, accessing your variables this way ($_POST[] etc), IS backwards compatibel, ie, they are placed in those arrays anyways, BUT, the method is not backwards compatible to older versions of PHP, there the arrays were called $HTTP_GET_VARS or something similarly unlike $_GET... On Wed, 2003-05-28 at 11:49, [EMAIL PROTECTED] wrote: > Thank you mate, this works! =) > > Just curious, though... I'd like to keep my scripts as compatible as > possible, so can you tell me if this method is backwards compatible? I've > never used this method before, the variables have just "been there" on a > subsequent page. I'm kinda fearing for my previous work, if the servers > suddenly change their configurations, rendering scripts non-functional... > > And, I'm guessing $_POST would be the array to hold POSTed variables, right? > > Is there a function to "release" the contents of these arrays into global > variables in a scripts, so you don't have to go... > $var1 = $_GET[var1]; > $var2 = $_GET[var2]; > ...if that's what you wanted? (Not sure I want to, but just to know) > > Again, thank you! =) > > Daniel > > > - Original Message - > From: Petre Agenbag > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Sent: Wednesday, May 28, 2003 11:40 AM > Subject: Re: [PHP] Variables don't pass... *sniff* > > > RegisterGlobals = Off > > You need to access these variables by > > $_POST[aVariable] or in your case ( adding the variables to the end of a > URL means you are using the GET method: $_GET[aVAriable] etc. > > On Wed, 2003-05-28 at 11:37, [EMAIL PROTECTED] wrote: > > Hi all! > > > > I'm using Apache 2.0.45, PHP 4.3.2RC4, and MySQL 3.23.49 on Windows 2003 > > Server Standard. > > > > I have a problem passing variables between pages. They simply get lost. > > Neither GET nor POST pass values, and even "hardcoding" them into the URL, > > like > > > > htpp://localhost/comeon.php?aVariable=ding&anotherVariable=dong > > > > and putting this in comeon.php: > > > > echo("Values: $aVariable, $anotherVariable"); > > > > only outputs > > > > Values: , > > > > ...I've tried with RC3 of PHP, even 4.3.1, but it doesn't work. I've used > > PHP on my machine with Apache 2 before, and it worked fine. Actually I > used > > the same scripts fine on my old config. This was on XP however, so I'm not > > sure if it's got something to do with the OS. I'm hoping it's a > > configuration issue. > > > > Any ideas are VERY much appreciated =). > > > > Thanks, > > Daniel > > > > > > » There are 10 kinds of people - those who know binary and those who > don't. > > « > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
[PHP] detect proxy
dear milist any body now script to detect browser also ip event using proxy public or high anonymous .thank's -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flawless script
sven wrote: you can use the default: statement as last case in switch, too. I always use default: to exit() the script, as something is obviously fubar if it gets there... -- David Grant Web Developer [EMAIL PROTECTED] http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered Office: 43 Royal Park, Bristol, BS8 3AN Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD Company registration number: 4016744 ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sessions and domains
bk wrote: I've to set up a shared shopping cart to buy items from four different sites and pay them at once passing trough a single checkout. Provided that these sites are hosted on the same server (actually in the same directory), but have different names, is it possible to share php sessions across multiple domains? How? As far as I know, you cannot share a cookie-enabled session object between different domains (otherwise what's to stop me reading your session?). Perhaps if you serialize the session object to a file/database row using a unique identifier, that might be a way of doing it. -- David Grant Web Developer [EMAIL PROTECTED] http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered Office: 43 Royal Park, Bristol, BS8 3AN Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD Company registration number: 4016744 ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flawless script
you can use the default: statement as last case in switch, too. "Jason K Larson" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Greetings- > > I prefer to check the $_SERVER['REQUEST_METHOD'] before I do anything in a script that > operates for both GET and POST methods. Also, especially for a switch statement, I'd > check for the existance of the variable first, you know some sort of isset() or !is_null() > test. > > Hope that helps. > > -- > Jason k Larson > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Triggers & events with objects
Hi, I would like to do the following When an objects method is called like this: $test= new Testclass; $test->someMethod ($someArgument); I'd like to have an event handler outside Testclass to log this event, like this: function event_handler ( $method_name, $obj [, mixed parameter [, mixed...]]) { switch get_class($obj) { case "testclass" : // ... if ($method_name == "someMethod " { // ... } break; } } Is that possible in any way? TIA, Axel.
Re: [PHP] Variables don't pass... *sniff*
Maybe they could include a quick "overview" of the latest changes as well as a link to the on-line manual in your "sign-up" message when joining the list? On Wed, 2003-05-28 at 11:46, Chris Hayes wrote: > Could someone with power over php.net please try to make this change in > variable handling very extremely clear for downloaders? Make it something > you cannot miss? Not everybody reads release notes and readme.txt files. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sessions and domains
Hi I've to set up a shared shopping cart to buy items from four different sites and pay them at once passing trough a single checkout. Provided that these sites are hosted on the same server (actually in the same directory), but have different names, is it possible to share php sessions across multiple domains? How? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables don't pass... *sniff*
Sorry, I missunderstood your question about backwards compatible. YES, accessing your variables this way ($_POST[] etc), IS backwards compatibel, ie, they are placed in those arrays anyways, BUT, the method is not backwards compatible to older versions of PHP, there the arrays were called $HTTP_GET_VARS or something similarly unlike $_GET... On Wed, 2003-05-28 at 11:49, [EMAIL PROTECTED] wrote: > Thank you mate, this works! =) > > Just curious, though... I'd like to keep my scripts as compatible as > possible, so can you tell me if this method is backwards compatible? I've > never used this method before, the variables have just "been there" on a > subsequent page. I'm kinda fearing for my previous work, if the servers > suddenly change their configurations, rendering scripts non-functional... > > And, I'm guessing $_POST would be the array to hold POSTed variables, right? > > Is there a function to "release" the contents of these arrays into global > variables in a scripts, so you don't have to go... > $var1 = $_GET[var1]; > $var2 = $_GET[var2]; > ...if that's what you wanted? (Not sure I want to, but just to know) > > Again, thank you! =) > > Daniel > > > - Original Message - > From: Petre Agenbag > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Sent: Wednesday, May 28, 2003 11:40 AM > Subject: Re: [PHP] Variables don't pass... *sniff* > > > RegisterGlobals = Off > > You need to access these variables by > > $_POST[aVariable] or in your case ( adding the variables to the end of a > URL means you are using the GET method: $_GET[aVAriable] etc. > > On Wed, 2003-05-28 at 11:37, [EMAIL PROTECTED] wrote: > > Hi all! > > > > I'm using Apache 2.0.45, PHP 4.3.2RC4, and MySQL 3.23.49 on Windows 2003 > > Server Standard. > > > > I have a problem passing variables between pages. They simply get lost. > > Neither GET nor POST pass values, and even "hardcoding" them into the URL, > > like > > > > htpp://localhost/comeon.php?aVariable=ding&anotherVariable=dong > > > > and putting this in comeon.php: > > > > echo("Values: $aVariable, $anotherVariable"); > > > > only outputs > > > > Values: , > > > > ...I've tried with RC3 of PHP, even 4.3.1, but it doesn't work. I've used > > PHP on my machine with Apache 2 before, and it worked fine. Actually I > used > > the same scripts fine on my old config. This was on XP however, so I'm not > > sure if it's got something to do with the OS. I'm hoping it's a > > configuration issue. > > > > Any ideas are VERY much appreciated =). > > > > Thanks, > > Daniel > > > > > > » There are 10 kinds of people - those who know binary and those who > don't. > > « > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables don't pass... *sniff*
It's not backwards compatible. If your code simply mentioned the variable name and not the method array, it will not work (as you noticed) when registerglobals is turned off ( for security reasons). However, there are many ways of making your old code work, the easiest is probably to extract the $_POST or $_GET array. Look in the manual at the array functions ( extract() ) and also read up on working with registerglobals = off. On Wed, 2003-05-28 at 11:49, [EMAIL PROTECTED] wrote: > Thank you mate, this works! =) > > Just curious, though... I'd like to keep my scripts as compatible as > possible, so can you tell me if this method is backwards compatible? I've > never used this method before, the variables have just "been there" on a > subsequent page. I'm kinda fearing for my previous work, if the servers > suddenly change their configurations, rendering scripts non-functional... > > And, I'm guessing $_POST would be the array to hold POSTed variables, right? > > Is there a function to "release" the contents of these arrays into global > variables in a scripts, so you don't have to go... > $var1 = $_GET[var1]; > $var2 = $_GET[var2]; > ...if that's what you wanted? (Not sure I want to, but just to know) > > Again, thank you! =) > > Daniel > > > - Original Message - > From: Petre Agenbag > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Sent: Wednesday, May 28, 2003 11:40 AM > Subject: Re: [PHP] Variables don't pass... *sniff* > > > RegisterGlobals = Off > > You need to access these variables by > > $_POST[aVariable] or in your case ( adding the variables to the end of a > URL means you are using the GET method: $_GET[aVAriable] etc. > > On Wed, 2003-05-28 at 11:37, [EMAIL PROTECTED] wrote: > > Hi all! > > > > I'm using Apache 2.0.45, PHP 4.3.2RC4, and MySQL 3.23.49 on Windows 2003 > > Server Standard. > > > > I have a problem passing variables between pages. They simply get lost. > > Neither GET nor POST pass values, and even "hardcoding" them into the URL, > > like > > > > htpp://localhost/comeon.php?aVariable=ding&anotherVariable=dong > > > > and putting this in comeon.php: > > > > echo("Values: $aVariable, $anotherVariable"); > > > > only outputs > > > > Values: , > > > > ...I've tried with RC3 of PHP, even 4.3.1, but it doesn't work. I've used > > PHP on my machine with Apache 2 before, and it worked fine. Actually I > used > > the same scripts fine on my old config. This was on XP however, so I'm not > > sure if it's got something to do with the OS. I'm hoping it's a > > configuration issue. > > > > Any ideas are VERY much appreciated =). > > > > Thanks, > > Daniel > > > > > > » There are 10 kinds of people - those who know binary and those who > don't. > > « > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables don't pass... *sniff*
Hehe, guess I'm not the first to ask! =) I did actually read a lot, but at first it seemed to be my sessions that were destroyed, and indeed the session handling has changed, so... Forgot to read again I guess =) - Original Message - From: Chris Hayes To: [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 11:46 AM Subject: Re: [PHP] Variables don't pass... *sniff* Could someone with power over php.net please try to make this change in variable handling very extremely clear for downloaders? Make it something you cannot miss? Not everybody reads release notes and readme.txt files. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables don't pass... *sniff*
Thank you mate, this works! =) Just curious, though... I'd like to keep my scripts as compatible as possible, so can you tell me if this method is backwards compatible? I've never used this method before, the variables have just "been there" on a subsequent page. I'm kinda fearing for my previous work, if the servers suddenly change their configurations, rendering scripts non-functional... And, I'm guessing $_POST would be the array to hold POSTed variables, right? Is there a function to "release" the contents of these arrays into global variables in a scripts, so you don't have to go... $var1 = $_GET[var1]; $var2 = $_GET[var2]; ...if that's what you wanted? (Not sure I want to, but just to know) Again, thank you! =) Daniel - Original Message - From: Petre Agenbag To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 11:40 AM Subject: Re: [PHP] Variables don't pass... *sniff* RegisterGlobals = Off You need to access these variables by $_POST[aVariable] or in your case ( adding the variables to the end of a URL means you are using the GET method: $_GET[aVAriable] etc. On Wed, 2003-05-28 at 11:37, [EMAIL PROTECTED] wrote: > Hi all! > > I'm using Apache 2.0.45, PHP 4.3.2RC4, and MySQL 3.23.49 on Windows 2003 > Server Standard. > > I have a problem passing variables between pages. They simply get lost. > Neither GET nor POST pass values, and even "hardcoding" them into the URL, > like > > htpp://localhost/comeon.php?aVariable=ding&anotherVariable=dong > > and putting this in comeon.php: > > echo("Values: $aVariable, $anotherVariable"); > > only outputs > > Values: , > > ...I've tried with RC3 of PHP, even 4.3.1, but it doesn't work. I've used > PHP on my machine with Apache 2 before, and it worked fine. Actually I used > the same scripts fine on my old config. This was on XP however, so I'm not > sure if it's got something to do with the OS. I'm hoping it's a > configuration issue. > > Any ideas are VERY much appreciated =). > > Thanks, > Daniel > > > » There are 10 kinds of people - those who know binary and those who don't. > « > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Variables don't pass... *sniff*
Glory! Did you try turning Register_Globals = On in your php.ini ?? PHPSpooky __ "If God had wanted me otherwise, He would have created me otherwise." - Johann Wolfgang von Goethe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 3:08 PM To: [EMAIL PROTECTED] Subject: [PHP] Variables don't pass... *sniff* Hi all! I'm using Apache 2.0.45, PHP 4.3.2RC4, and MySQL 3.23.49 on Windows 2003 Server Standard. I have a problem passing variables between pages. They simply get lost. Neither GET nor POST pass values, and even "hardcoding" them into the URL, like htpp://localhost/comeon.php?aVariable=ding&anotherVariable=dong and putting this in comeon.php: echo("Values: $aVariable, $anotherVariable"); only outputs Values: , ...I've tried with RC3 of PHP, even 4.3.1, but it doesn't work. I've used PHP on my machine with Apache 2 before, and it worked fine. Actually I used the same scripts fine on my old config. This was on XP however, so I'm not sure if it's got something to do with the OS. I'm hoping it's a configuration issue. Any ideas are VERY much appreciated =). Thanks, Daniel > There are 10 kinds of people - those who know binary and those who don't. < -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Variables don't pass... *sniff*
not being funny ... but, you should read release notes, that's what they are for regards Jonathan -Original Message- From: Chris Hayes [mailto:[EMAIL PROTECTED] Sent: 28 May 2003 10:46 To: [EMAIL PROTECTED] Subject: Re: [PHP] Variables don't pass... *sniff* Could someone with power over php.net please try to make this change in variable handling very extremely clear for downloaders? Make it something you cannot miss? Not everybody reads release notes and readme.txt files. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables don't pass... *sniff*
Could someone with power over php.net please try to make this change in variable handling very extremely clear for downloaders? Make it something you cannot miss? Not everybody reads release notes and readme.txt files. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php working with iis
Ok, I'm having problems with configuring all the things together. I have loaded on Php 4.3.1, Mysql, IIS 5.1 and Dreamweaver MX, but I can't get php to work from dreamweaver, well i can't say it works at all having used a piece of code to check php works in html. I have installed php but I get an error message saying I have to manually configure the server connection as I don't have an OCX control. Can you help as I think this is the only block between me and using php with mysql in dreamweaver
Re: [PHP] Variables don't pass... *sniff*
RegisterGlobals = Off You need to access these variables by $_POST[aVariable] or in your case ( adding the variables to the end of a URL means you are using the GET method: $_GET[aVAriable] etc. On Wed, 2003-05-28 at 11:37, [EMAIL PROTECTED] wrote: > Hi all! > > I'm using Apache 2.0.45, PHP 4.3.2RC4, and MySQL 3.23.49 on Windows 2003 > Server Standard. > > I have a problem passing variables between pages. They simply get lost. > Neither GET nor POST pass values, and even "hardcoding" them into the URL, > like > > htpp://localhost/comeon.php?aVariable=ding&anotherVariable=dong > > and putting this in comeon.php: > > echo("Values: $aVariable, $anotherVariable"); > > only outputs > > Values: , > > ...I've tried with RC3 of PHP, even 4.3.1, but it doesn't work. I've used > PHP on my machine with Apache 2 before, and it worked fine. Actually I used > the same scripts fine on my old config. This was on XP however, so I'm not > sure if it's got something to do with the OS. I'm hoping it's a > configuration issue. > > Any ideas are VERY much appreciated =). > > Thanks, > Daniel > > > » There are 10 kinds of people - those who know binary and those who don't. > « > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Variables don't pass... *sniff*
Hi all! I'm using Apache 2.0.45, PHP 4.3.2RC4, and MySQL 3.23.49 on Windows 2003 Server Standard. I have a problem passing variables between pages. They simply get lost. Neither GET nor POST pass values, and even "hardcoding" them into the URL, like htpp://localhost/comeon.php?aVariable=ding&anotherVariable=dong and putting this in comeon.php: echo("Values: $aVariable, $anotherVariable"); only outputs Values: , ...I've tried with RC3 of PHP, even 4.3.1, but it doesn't work. I've used PHP on my machine with Apache 2 before, and it worked fine. Actually I used the same scripts fine on my old config. This was on XP however, so I'm not sure if it's got something to do with the OS. I'm hoping it's a configuration issue. Any ideas are VERY much appreciated =). Thanks, Daniel » There are 10 kinds of people - those who know binary and those who don't. « -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flawless script
Greetings- I prefer to check the $_SERVER['REQUEST_METHOD'] before I do anything in a script that operates for both GET and POST methods. Also, especially for a switch statement, I'd check for the existance of the variable first, you know some sort of isset() or !is_null() test. Hope that helps. -- Jason k Larson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] id & name when identifying html elements
PHP uses only the 'name' attribute of an element to assign the variable to. You can use 'id' and 'name' together, but the two are different, for instance no two form elements should have the same 'id', but depending on multiform pages with similar inputs, an identical 'name' attribute could be used several times without conflict. For PHP use, you have to use the 'name' attribute, but you've already figured that out. -- Jason k Larson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: how to process incoming mails?
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi, > > i'm using SuSE Linux 8.1 with Apache 2 and PHP 4... > here is what i want to do: > if someone writes a mail to [EMAIL PROTECTED] it should be directly > processed by a PHP script... > (I need it for a simple script, that validates email addresses... (similar > to the PHP newsgroups validation...)) > > how can i do that? > > is there a way, that sendmail directly passes incoming mails to a > PHP-script, when they arrive? > > Thanks in advance for any help... > > - Marco Weber - Yes - you need to set up an alias entry which points to the script. Add a line like theaddress: "| /path/to/script.php" to your alias file - IIRC its /etc/alias.txt on Slackware - and as root run the command newaliases to update the aliases database. Subsequently all mail to theaddress will be piped to the script. Then I think you need to open /dev/stdin in your script to access the data from the pipe. -- Quod subigo farinam $email =~ s/oz$/au/o; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] flawless script
hi guys, how does everyone usually go about posting within a script ? i usually contain everything i need to do for a script within the same script without the need for a seperate file for posting like so switch ($_POST['action']) { case 'insert': insert into db break; case 'edit': edit content break; } to keep the files to a minimum is this cool ? should i especially check for $_POST when inserting to make it more robust ? or someone could go action=insert without actually posting first -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] About Guest Book\'s messages....
Greetings, How about some simple word detection attempts like: $words = explode (' ',$input); //create array $new_words = ''; //empty foreach ($words as $word) { if (strlen ($word) <= 40)) { $word = wordwrap ($word,40,"\n",1); } $new_words .= ' '.$word; //add word(s) to string } $new_words = trim ($new_words); //kill excess spaces So the idea here is to check each supposed word for it's length, if its a long word, longer than 40 characters, break it up. This should leave the smaller and hopefully real words away from the wordwrap-ing. note that this is completely untested, I just wrote it here in email. Hope that helps. -- Jason k Larson fongming wrote: Hi, Sir: There may be someone leave a message like following: U and it expand the width of the table on my web page and make pages ugly I used wordwrap($word,40,"\n",1) to prevent it, but my system is BIG5 ,two bytes, Sometimes this method would destroy the structure of the two-bytes word. Any one has good ideas and could help me with that ? Thanks --- Fongming from Taiwan. -- ¡»From: ¦¹«H¬O¥Ñ®ç¤p¹q¤l¶l¥ó1.5ª©©Òµo¥X... http://fonn.fongming.idv.tw [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] id & name when identifying html elements
Hi I've got a question about about naming html components (text fields, select boxes etc) when submitting a form to a php page. First I tried identifying an element using the "id" attribute and found that it was not being posted to the php page. When I use the "name" attribute it did get posted to the page? I had a look on the w3c html spec and "name" takes precedence over "id" if used together but you should be able to use them individually with no problems. When you submit a form with this select box, "country" will is not submitted to the php page. one two When you use this code, it works fine. "country" gets submitted to the php page? one two Any thoughts? best wishes roland tarver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] About Guest Book\'s messages....
Hi, Sir: There may be someone leave a message like following: U and it expand the width of the table on my web page and make pages ugly I used wordwrap($word,40,"\n",1) to prevent it, but my system is BIG5 ,two bytes, Sometimes this method would destroy the structure of the two-bytes word. Any one has good ideas and could help me with that ? Thanks --- Fongming from Taiwan. -- ¡»From: ¦¹«H¬O¥Ñ®ç¤p¹q¤l¶l¥ó1.5ª©©Òµo¥X... http://fonn.fongming.idv.tw [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] simple "while" loop terminated for no reason
hi david. thanks for your reply. the error will occur even when value is reduced to 500. by clicking on the refresh button several times, it will produce different output. sometimes it might display garbage even before the http header too. realising that it might be a problem beyond the codes, such as at apache webserver or php api level. i re-read the manual, and i read a warning indicating not to use apache 2.0 and php in production environment. thus i believe apache 2.0 is still not fully tested or stable for use. now i install the MS IIS webserver on top my winXP, and then re-install php on it. it is working fine now. best regards, raymond "David Otton" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, 26 May 2003 05:12:14 +0800, you wrote: > > >hi, i'm using php ver 4.3.1 in winXP o/s. > > > >my html output always halted halfway from execution. i find out > >that it has got to do with the while loop. > > > >for simplicity, i created a test php file that will execute a loop for > >1000 times and print out some strings. however, even before it > >reach 1000, it stops. there is no error given. > > Odd... works ok here. Hmm... does it always halt on the same iteration? If > you have it pause inside the loop, does it halt on a smaller number? What if > you remove the string constant from the print line? Only go to 500 instead > of 1000? I'm just thinking out loud, but maybe you're running into the > maximum execution time for your script? > > Odd that it wouldn't report an error in that case... try turning the error > reporting up to way paranoid (error_reporting (E_ALL);) and see what it > offers you. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] My Sincere Request!![Scanned]
This is actually not even fun. If you would do 'business' with them, it could be that you end up in Nigeria and your family gets blackmailed to get you back (best case), or you just get killed (worst case)... Regards, Gerhard - Original Message - From: "David Grant" <[EMAIL PROTECTED]> To: "Michael Egan" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, May 28, 2003 10:06 AM Subject: Re: [PHP] My Sincere Request!![Scanned] > Michael Egan wrote: > > > And what exactly has this got to do with PHP :-) > > It's important to know that there are PHP users all around the world, > including Nigeria! Perhaps Rev. Dr. Ego Momoh wants someone on the list > to build him a web site, so he can provide even more information on this > scam^H^H^H^H business opportunity.. > > Man... I haven't seen one of these for a while... :) > > > -Original Message- > > From: REV DR EGO MOMOH [mailto:[EMAIL PROTECTED] > > Sent: 01 January 1999 17:59 > > To: [EMAIL PROTECTED] > > Subject: [PHP] My Sincere Request!![Scanned] > > > > > > BRANCH MANAGER, > > UNITED BANK FOR AFRICA PLC > > ILUPEJU BRANCH LAGOS NIGERIA > > ATTN: PRESIDENT/C.E.O > > I am pleased to get across to you for a very urgent and profitable business proposal, though I don't know you neither have I seen you before but my confidence was reposed on you when the Chief Executive of Lagos State chamber of Commerce and Industry handed me yourcontact for a confidential business. I am the manager of United Bank for Africa Plc (UBA),Ilupeju branch, Lagos Nigeria.The intended business is thus; We had a customer, a Foreigner (a Turkish) resident in Nigeria, he was a Contractor with one of the Government Parastatals.He has in his Account in my branch the sum of US 38.6 Million (Thirty Eight Million, Six HundredThousandU.SDollars).Unfortunately, the man died four years ago until today non-of his next of kin has come forward to claim the money. Having noticed this, I in collaboration with two other top Officials of the bank have covered up the account all this while. Now we want you (being a foreigner) to be fronted as one of his next of kin and forward your > account and other relevant documents to be advised to you by us to attest to the Claim. We will use our positions to get all internal documentations to back up the claims . The whole procedures will last only five working days to get the fund retrieved successfully without trace even now or in future.Your response is only what we are waiting for as we have arranged all necessary things. As soon as this message comes to you kindly get back to me indicating your interest, then I will furnish you with the whole procedures to ensure that the deal is successfully concluded. For your assistance we have agreed to give you twenty five percent (25%) of the Total sum at the end of the transaction while 65% would be for my colleagues and I and the remaining 10% would be for any form ofexpenses that may be incurred during the course of the transaction which would be given to us when the money is transferred into your account before splitting the balance on the agreed percentage of 65% t > o 25%. In order to get all the legal documents from the court, kindly send the following information to us immediately. Your full name,telephone,mobile and fax numbers as well as your resident or company address. I await your earliest response. > > Thanks, > > Yours Sincerely > > REV DR EGO MOMOH. > > > > > > > > > -- > David Grant > Web Developer > > [EMAIL PROTECTED] > http://www.wiredmedia.co.uk > > Tel: 0117 930 4365, Fax: 0870 169 7625 > > Wired Media Ltd > Registered Office: 43 Royal Park, Bristol, BS8 3AN > Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD > > Company registration number: 4016744 > > ** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the system manager. > > ** > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 4.3.1 / latest
[EMAIL PROTECTED] wrote: where can i find php (version 4.3.1 or latest ) rpm? i need to upgrade php on my RHL 8.0 box for its running on 4.2.2 and i cant use many inbuilt functions. http://rpmfind.net//linux/RPM/PLD/dists/ra/updates/security/i686/php-4.2.3-9.i686.html If this is the wrong processor type, just look here: http://rpmfind.net/linux/rpm2html/search.php?query=php&submit=Search+... If you must use RPMs :(, look no further that http://rpmfind.net. -- David Grant Web Developer [EMAIL PROTECTED] http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered Office: 43 Royal Park, Bristol, BS8 3AN Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD Company registration number: 4016744 ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] My Sincere Request!![Scanned]
Michael Egan wrote: And what exactly has this got to do with PHP :-) It's important to know that there are PHP users all around the world, including Nigeria! Perhaps Rev. Dr. Ego Momoh wants someone on the list to build him a web site, so he can provide even more information on this scam^H^H^H^H business opportunity.. Man... I haven't seen one of these for a while... :) -Original Message- From: REV DR EGO MOMOH [mailto:[EMAIL PROTECTED] Sent: 01 January 1999 17:59 To: [EMAIL PROTECTED] Subject: [PHP] My Sincere Request!![Scanned] BRANCH MANAGER, UNITED BANK FOR AFRICA PLC ILUPEJU BRANCH LAGOS NIGERIA ATTN: PRESIDENT/C.E.O I am pleased to get across to you for a very urgent and profitable business proposal, though I don't know you neither have I seen you before but my confidence was reposed on you when the Chief Executive of Lagos State chamber of Commerce and Industry handed me yourcontact for a confidential business. I am the manager of United Bank for Africa Plc (UBA),Ilupeju branch, Lagos Nigeria.The intended business is thus; We had a customer, a Foreigner (a Turkish) resident in Nigeria, he was a Contractor with one of the Government Parastatals.He has in his Account in my branch the sum of US 38.6 Million (Thirty Eight Million, Six HundredThousandU.SDollars).Unfortunately, the man died four years ago until today non-of his next of kin has come forward to claim the money. Having noticed this, I in collaboration with two other top Officials of the bank have covered up the account all this while. Now we want you (being a foreigner) to be fronted as one of his next of kin and forward your account and other relevant documents to be advised to you by us to attest to the Claim. We will use our positions to get all internal documentations to back up the claims . The whole procedures will last only five working days to get the fund retrieved successfully without trace even now or in future.Your response is only what we are waiting for as we have arranged all necessary things. As soon as this message comes to you kindly get back to me indicating your interest, then I will furnish you with the whole procedures to ensure that the deal is successfully concluded. For your assistance we have agreed to give you twenty five percent (25%) of the Total sum at the end of the transaction while 65% would be for my colleagues and I and the remaining 10% would be for any form ofexpenses that may be incurred during the course of the transaction which would be given to us when the money is transferred into your account before splitting the balance on the agreed percentage of 65% t o 25%. In order to get all the legal documents from the court, kindly send the following information to us immediately. Your full name,telephone,mobile and fax numbers as well as your resident or company address. I await your earliest response. Thanks, Yours Sincerely REV DR EGO MOMOH. -- David Grant Web Developer [EMAIL PROTECTED] http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered Office: 43 Royal Park, Bristol, BS8 3AN Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD Company registration number: 4016744 ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regexp question...
Andrew D. Luebke wrote: > OK, here is the regexp command I am trying to use: > > $split_filename = preg_split('/\./', $_FILES["userfile"]["name"], -1); > > However, when I do a count($split_filename) I don't get what I expect. > For instance if the input is: > > abc.xyz.123 > > I get 2 from count, why doesn't preg_split put three elements in the > array? It works since I'm actually looking for the last part of the > filename. Thanks for any help. If you're looking for the file extension, use pathinfo() instead. To actually answer your question, have you tried using print_r() to get the contents of the array? -- David Grant Web Developer [EMAIL PROTECTED] http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered Office: 43 Royal Park, Bristol, BS8 3AN Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD Company registration number: 4016744 ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Error with directories
Hi, It seems to me that a script from /var/www/wahtever/ includes a script called algo.php which can not be found by PHP, because, probably it is in the /var/www/ dir. Either you add /var/www/ to the php.ini include_path, or when you include files you give the full path. Cheers, Catalin "J0rd1 Adame" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, I compiled PHP 4.2.3 like this > ./configure --with-oracle=/home/oracle/OraHome1/ > -with-oci8=/home/oracle/OraHome1/ > --with-mysql=/usr --with-apxs > > I have my DocumentRoot in /var/www > when i access php files in /var/www everything's fine, but when I access files > in /var/www/whatever i get this error > Warning: Failed opening '/var/www/whatever/algo.php' for inclusion > (include_path='.:/usr/local/lib/php') in Unknown on line 0 > > how can i fix this? > thanx > > j0rd1 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cheap PHP+SQL WebHosting
www.spiderhosts.com i'v been for so long with them, and the service is good Nabil www.cabms.org www.d2ue.com "Arcadius A." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello! > Please, do you know of any cheap PHP+SQL web hosting company? > > I know we always get what we pay for, but I really need somethingk cheap. > > Thanks in advance. > > Arcadius. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ANY POSTNUKER? Security problem!
Thanks so much, it's done "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You might still have the old cookie set with long lifetime, and while > this cookie exists, no new is created. > > nabil wrote: > > >I set the life time to 0 and still logged in even I disconnect and reconnect > >to the internet, and closed the browser,,, what do u think ? > > > > > > > >"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message > >news:[EMAIL PROTECTED] > > > > > >>If the cookie lifetime is set to 0, it will live untill the browser is > >>closed. But why don't you just log out? > >> > >>nabil wrote: > >> > >> > >> > >>>i have problem with session in postnuke. > >>> > >>>the problem is that while i m logged in as a user, if i closed the > >>> > >>> > >browser, > > > > > >>>then i logged into it again , i still logged in, and that make a security > >>>hale, as any one can use my account on my pc... (ofcourse i don't want to > >>>log out) > >>> > >>>Any solution to make my login depending on a PHP session? so if the user > >>>closed the browser , then back in , he has to put his usernme and > >>> > >>> > >password. > > > > > >>>Best Rergards > >>> > >>> > >>> > >>> > >>> > >>> > >>> > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php 4.3.1 / latest
Hi all, where can i find php (version 4.3.1 or latest ) rpm? i need to upgrade php on my RHL 8.0 box for its running on 4.2.2 and i cant use many inbuilt functions. kindly enlighten, regards, KM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php