[PHP] Ahhh...I see
Thanks for the site...it answered my question, actually. I was not aware that an auto_increment must be not null. And am I correct that when it says it must be a "key", it means that it must be either Primary or Unique? That I did not know. Anyway, it's working now :) -- Plutarck Should be working on something... ...but forgot what it was. ""Jason Lotito"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... -Original Message- From: Plutarck [mailto:[EMAIL PROTECTED]] Sent: Friday, April 06, 2001 10:35 PM To: [EMAIL PROTECTED] Subject: [PHP] AUTO_INCREMENT with MySQL phpmyadmin At first I thought this might be better suited on the mysql list, but since I'm using phpmyadmin I thought it better to ask here. My problem is I can't figure out how to create a column with the auto_increment attribute. I want to make one called userid whose value is one higher than the highest number in the userid column, which according to the manual is exactly what auto_increment should do. But I flat out can't figure out how to do it. I'm using the "add new field" attribute in phpmyadmin, and I've tried making one with no name and with many different names, and I don't get nuttin'. Occassionally it will announce that the table was altered with something like the message: SQL-query: ALTER TABLE test_kingdoms_userauth ADD useridi TINYINT not null AUTO_INCREMENT But according to the display, no matter how many times I refresh it, there is no listing of ANY column other than the two I currently have. So I'm totally confused, and out of the whole mysql manual I just don't know what's wrong. So the question: What kind of selections do I need to make to create an AUTO_INCREMENT column? Can you post the current schema (design) of the table with datatypes, etc. http://www.newbienetwork.net/sections.php?op=viewarticleartid=10 Also, check out the above link, that my help some. Jason Lotito www.NewbieNetwork.net Where those who can, teach; and those who can, learn. -- 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] here doc performance
To my knowledge, though I haven't done any testing with microtime, heredoc is as faster as using single quotes. Since the only thing PHP looks for is the characters that were present at the very begining on the string, there should certainly be no slowdowns at all. If it's not that way, I imagine it would be just a bad implementation which will be fixed soon. But I strongly doubt a bad implementation of here doc printing was made. -- Plutarck Should be working on something... ...but forgot what it was. ""Jack Dempsey"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, I use the here doc option heavily in pages i create, outputting large chunks of HTML with variables inside the echoEOF .. EOF; syntax...is there a better way to do this? I'm wondering if anyone knows of running times for things like that...i would think that it'd be better than going back and forth between php and html (certainly easier), wouldn't have to escape the quotes like you would if you used echo " lots of html ... "; Any thoughts on this? -- 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] here doc performance
Thanks for your thoughts. I don't believe it can be as fast as single quotes, simply because it does variable interpolation, and that's why printing doubly quoted strings are slower than singles, hence i would think here docs would be slower as well...but nothing so great that i would to worry about anyone else? is a big here doc the "fastest" way to print out a lot of html with variables? -Original Message- From: Plutarck [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 2:31 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] here doc performance To my knowledge, though I haven't done any testing with microtime, heredoc is as faster as using single quotes. Since the only thing PHP looks for is the characters that were present at the very begining on the string, there should certainly be no slowdowns at all. If it's not that way, I imagine it would be just a bad implementation which will be fixed soon. But I strongly doubt a bad implementation of here doc printing was made. -- Plutarck Should be working on something... ...but forgot what it was. ""Jack Dempsey"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, I use the here doc option heavily in pages i create, outputting large chunks of HTML with variables inside the echoEOF .. EOF; syntax...is there a better way to do this? I'm wondering if anyone knows of running times for things like that...i would think that it'd be better than going back and forth between php and html (certainly easier), wouldn't have to escape the quotes like you would if you used echo " lots of html ... "; Any thoughts on this? -- 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]
Re: [PHP] here doc performance
I'm sorry, I was mistaken. I was thinking that it did not perform variable interpolation for some reason, but of course in fact it does. So switch my comment around to say that here doc is about as fast as double quotes. I'd test it with microtime, but on windows the "it finished before it started" bug prevents me from it :) -- Plutarck Should be working on something... ...but forgot what it was. ""Jack Dempsey"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks for your thoughts. I don't believe it can be as fast as single quotes, simply because it does variable interpolation, and that's why printing doubly quoted strings are slower than singles, hence i would think here docs would be slower as well...but nothing so great that i would to worry about anyone else? is a big here doc the "fastest" way to print out a lot of html with variables? -Original Message- From: Plutarck [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 2:31 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] here doc performance To my knowledge, though I haven't done any testing with microtime, heredoc is as faster as using single quotes. Since the only thing PHP looks for is the characters that were present at the very begining on the string, there should certainly be no slowdowns at all. If it's not that way, I imagine it would be just a bad implementation which will be fixed soon. But I strongly doubt a bad implementation of here doc printing was made. -- Plutarck Should be working on something... ...but forgot what it was. ""Jack Dempsey"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, I use the here doc option heavily in pages i create, outputting large chunks of HTML with variables inside the echoEOF .. EOF; syntax...is there a better way to do this? I'm wondering if anyone knows of running times for things like that...i would think that it'd be better than going back and forth between php and html (certainly easier), wouldn't have to escape the quotes like you would if you used echo " lots of html ... "; Any thoughts on this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] help! - array comparision
Yesterday I posted a HELP message without any code as a reference. A member of this list suggests me to post something so here is the story: The idea is to compare two arrays and substitute information when necessary. I have to use PHP3 and PHPLIB templates. This is my today table showing my actual stock (2001-04-01): (table 1 - actual date) t-shirt blue L jacket blackM sweater red S shirtwhiteM Then I have a future stock table, it's showing changes for the next month (2001-05-01). (table 2 - changes for 2001-05-01) t-shirt red L sweater greenS If the user selects in a menu 2001-04 the orginal table 1 should be seen. But if user selects 2001-05 this should be display: (table 3- a mix of table 1 and table 2) t-shirt redL jacketblack M sweater green S shirt white M I tried different code but basically this is the idea and it's not working: ?php //MySqlConn - function to connect to db $mylink=MySqlConn($host,$user,$passw,$db,"error connecting"); $t=new Template(); $t-set_file("internal", "templates/chnl_lu_info_internal.html"); // TODAY DATE SHOWS TABLE 1 $today_date=date("Y").'-'.date("m").'-'.date("d"); // IF USERS SELECTS A FUTURE DATE, FOR EXAMPLE 2001-05-01, THEN THE TABLE 3 SHOULD BE ON THE SCREEN if($future_dates != $today_date) { $sql_changes='select * from stock_changes where stock_id="'.$stock_id.'" and activ_date="'.$future_dates.'"'; // QUERIES, OBVIOUSLY, IS A FUNCTION TO MAKE SQL QUERIES $result_changes=queries($sql_changes,"sql error!"); } $sql='select * from stock where stock_id="'.$stock_id.'"'; $result=queries($sql,"sql error 2!"); // THIS IS THE PART THAT IS NOT WORKING if (!empty ($result_changes)) { while ($ret=mysql_fetch_array($result)) { while (list($key,$value)=each($ret)) { while ($ret_ch=mysql_fetch_array($result_changes)) { if(!empty($ret_ch[$key])) { $t-set_var(array($key, $ret_ch[$key])); } else { $t-set_var(array($key, $ret[$key])); } } } $t-parse("channel_lineup_info_internal","internal",true); } } else { // THIS PART IS WORKING 'COS THERE IS NO COMPARISION HERE- I LEAVE IT AS A REFERENCE while ($ret=@mysql_fetch_array($result)) { while (list($key,$value)=each($ret)) { if ($key=="carriage_type") { if ($value=="P") { $value='a href="carriage_type.php3?ftime='.$ret['from_time'].'ttime='.$ret['to_time'].'"'.$value.'/a'; } } $t-set_var(array($key=$value)); } $t-parse("channel_lineup_info_internal","internal",true); } } // CLOSING CONNECTION TO DB @mysql_close(); ? Hope someone can help me. /paula
[PHP] text string in a gif
Hello friends, For those who are not allergic to newbie questions: I want to make a button for a web page from a background gif and a string. Till here nothing unusual. I used the example from the php manual and it works like a breeze. ?php Header("Content-type: image/gif"); $string=implode($argv," "); $im = imageCreateFromGif("MyBackground.gif"); $color = ImageColorAllocate($im, 196, 51, 28); ImageTTFText ($im, 20, 0, 6, 7, $color, "MyFont.ttf", $string); ImageGif($im); ImageDestroy($im); ? The only problem I have (and for me it is really big) is that when I use a string which contains a blank eg "My text" the text of the button looks like "My%20TEXT" :-( How can I fix it?? TIA, Victor -- 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] String in a string
On Friday 06 April 2001 16:42, you wrote: How do I find out if a string is contained in a string. I just need true/false. strstr()? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match. - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him. -- 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] mail() limit?
On Friday 06 April 2001 22:47, you wrote: Hi, Does anyone know if and what the limit is of bcc that can be used in the mail() function? Hundreds, thousands? If you wonder about approaching such a limit you'll be better off with a real mailinglist manager (mailman, listar, ezmlm, ...) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match. - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him. -- 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] X509
Hello ! I want to write a small script to decrypt/encrypt/sign emails with the X509-protocoll. Does anybody know, where to get information about this protocoll ? Does anybody has some examples how to use it in php ? Any ready-to-go-code ? Any help is welcome ! Martin -- 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 7 Apr 2001 12:32:53 -0000 Issue 613
php-general Digest 7 Apr 2001 12:32:53 - Issue 613 Topics (messages 47527 through 47557): Re: Nearly all (1755) PHP functions in a text file 47527 by: Plutarck HELP!! comparing arrays 47528 by: paula 47542 by: Yasuo Ohgaki Re: Print or Echo. 47529 by: Philip Olson 47545 by: Jason Lotito how do i...? 47530 by: rswfire PHP form script in Javascript window 47531 by: Claudia cookies that don't expire 47532 by: Joseph Bannon Re: Update: 1767 functions! 47533 by: Steve Werby 47537 by: Plutarck $8/mo php hosting on 24/7, OC3+ web server 47534 by: Jeffrey Greer experienced PHP/MYSQL/Perl/JAVA programmer 47535 by: SAM G PHP coding question 47536 by: Rory O'Connor 47538 by: Gustavo Vieira Goncalves Coelho Rios 47539 by: andre Re: Nested for() loops? - Now Multi Dimension Arrays 47540 by: Yasuo Ohgaki Double your website traffic 47541 by: webmaster.gopopup.com Re: fwrite() 47543 by: Adam Re: escape characters 47544 by: Adam AUTO_INCREMENT with MySQL phpmyadmin 47546 by: Plutarck 47547 by: Jason Lotito here doc performance 47548 by: Jack Dempsey 47550 by: Plutarck 47551 by: Jack Dempsey 47552 by: Plutarck Ahhh...I see 47549 by: Plutarck help! - array comparision 47553 by: paula text string in a gif 47554 by: Victor Re: String in a string 47555 by: Christian Reiniger Re: mail() limit? 47556 by: Christian Reiniger X509 47557 by: Martin Thoma 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] -- The ones that started talking to me half-way through. I'd like to give a shout out to 346, 789, and 1747, and blue function#9. *twitch* -- Plutarck Should be working on something... ...but forgot what it was. ""Johnson, Kirk"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... So, now that you've seen 'em all, which one is your favorite? :) Kirk -Original Message- From: Plutarck [mailto:[EMAIL PROTECTED]] Sent: Friday, April 06, 2001 1:17 AM To: [EMAIL PROTECTED] Subject: [PHP] Nearly all (1755) PHP functions in a text file In any case, there are 1755 entries in the blasted thing. If it's in the PHP manual or get_defined_functions, it's in there. And damn is that alot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Hi- I'm new here and have this problem that's DRIVING ME CRAZY. I have two arrays as a result of two queries that I have to compare. Supose this two tables: This is my today table showing my actual stock (2001-04): t-shirtblue L jacket blackM sweater red S shirt whiteM Then I have a future stock table, it's showing changes for the next month (2001-05). t-shirt red L sweatergreenS If the user selects in a menu 2001-04 the orginal first table should display. But if user selects 2001-05 this should be display: t-shirt red L jacket blackM sweatergreen S shirt whiteM This has to work with PHP3 and using PHPLIB templates. I've tried EVERYTHING! Nested whiles, nested for, just E V E R Y T H I N G . I don't know what else to do and my nerves are about to kill me. PLEASE! ANY HELP IS WELCOME!! thank you people, /paula How about post some code that does not work as expected? (Simpler code is better) Regards, -- Yasuo Ohgaki ""paula"" [EMAIL PROTECTED] wrote in message 001501c0bf29$2f35e740$0f01a8c0@pau">news:001501c0bf29$2f35e740$0f01a8c0@pau... Hi- I'm new here and have this problem that's DRIVING ME CRAZY. I have two arrays as a result of two queries that I have to compare. Supose this two tables: This is my today table showing my actual stock (2001-04): t-shirtblue L jacket blackM sweater red S shirt whiteM Then I have a future stock table, it's showing changes for the next month (2001-05). t-shirt red L sweatergreenS If the user selects in a menu 2001-04 the orginal first table should display. But if user selects 2001-05 this should be display: t-shirt red L jacket blackM sweatergreen S shirt whiteM This has to work with PHP3 and using PHPLIB templates. I've tried EVERYTHING! Nested whiles, nested for, just E V E R Y T H I N G . I don't know what else to do and my nerves are about to kill me. PLEASE! ANY HELP IS
Re: [PHP] Extension_dir in php.ini?
If you are talking about PHP on UNIX, I think the default is /usr/local/lib/php/extensions/no-debug-non-zts-version For windows, I don't know. Regards, -- Yasuo Ohgaki "Lindsay Adams" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Okay, you may call me an idiot all you want, But if the extension_dir= ./ In php.ini And PHP is loaded as an apxs module in apache, then just where does ./ point to? ServerRoot? DocumentRoot? Some other directory? Having a major brain in getting my .so into the right place. Also, how can I compile libpdf.so (version 3) to work with PHP4.0.4pl1? If I have to go backwards in PHP (say to 4.0.3pl1) to be able to get PDF support compiled into PHP (because it just isn't working for me on 4.0.4pl1) then somebody please tell me that. I have read through all the suggestions in the list archive I have downloaded the latest versions of files pertaining to pdf and 4.0.4pl1 from cvs.php.net and yet, I still get the problem, during ./configure, of it complaing about my version 3 pdflib, not being version 3 because it can't find pdf_show_boxed(). I _NEED_ pdf support, so any help in choosing the right set of versions would be greatly helpful! Thanks gang! Ps- yes, I also changed ext/crypt.c php_srand... On line 150(or thereabouts) to make php work at all on my box (Qube2) -- 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] possible to get the fully qualified path name for file updloads?
Hi, I'm doing file uploads through PHP and now have a need to retrieve and store the original fully qualified directory path name used for the upload. For example if the user copied image file sample.jpg from c:\temp I need to retrieve and store the c:\temp\ in addition to the sample.jpg that I am already storing. The directory path does not seem to be availble anywhere. Is there some way to get this? TIA! Andre -- 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] text string in a gif
urldecode($string) On Sat, 7 Apr 2001, Victor wrote: Hello friends, For those who are not allergic to newbie questions: I want to make a button for a web page from a background gif and a string. Till here nothing unusual. I used the example from the php manual and it works like a breeze. ?php Header("Content-type: image/gif"); $string=implode($argv," "); $im = imageCreateFromGif("MyBackground.gif"); $color = ImageColorAllocate($im, 196, 51, 28); ImageTTFText ($im, 20, 0, 6, 7, $color, "MyFont.ttf", $string); ImageGif($im); ImageDestroy($im); ? The only problem I have (and for me it is really big) is that when I use a string which contains a blank eg "My text" the text of the button looks like "My%20TEXT" :-( How can I fix it?? TIA, Victor -- 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] possible to get the fully qualified path name for fileupdloads?
I'm doing file uploads through PHP and now have a need to retrieve and store the original fully qualified directory path name used for the upload. For example if the user copied image file sample.jpg from c:\temp I need to retrieve and store the c:\temp\ in addition to the sample.jpg that I am already storing. The directory path does not seem to be availble anywhere. Is there some way to get this? No. This information is not transferred. -Rasmus -- 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] How to change useragent-ID sent by PHP4.0.5RC1
Hallo I am downloading a HTML-File with PHP4.0.5RC1 and I want to change the useragent-ID from PHP, which will be sent to the webserver where the HTML-File is. I am using PHP4.0.5RC1 with NT. Do you have any ideas ? -- Markus Wagner email: [EMAIL PROTECTED] Hobby: 747 Jumbo-Jet, Pontiac -- 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: equivalent of asp's %= strTest %
So sprach Costas am Wed, Apr 04, 2001 at 02:07:54PM +0100: Is there an equivalent in PHP of the following code: equivalent of asp's %= strTest % Uhm - what does this strange line do?? Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die guenstige Art an Linux Distributionen zu kommen Uptime: 3 days 20 hours 46 minutes -- 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: equivalent of asp's %= strTest %
PHP does have an equivelent, as shown by Shaun : ?=$var? Things to keep in mind : 1. Is PHP4+ specific 2. Won't work if short_open_tag setting is off (in php.ini) - One reason to turn this off, to enable XML support 3. Doesn't follow up-and-coming PEAR coding standards And as you've seen, many don't even know what ?= is. You'll find zealots on both sides of this use, the choice is yours. ;-) Regards, Philip On Sun, 8 Apr 2001, shaun wrote: I haven't done asp in a while so if this just shows the var's value then you just replace % with ? ?= $hi ? On Saturday 07 April 2001 11:00, Alexander Skwar wrote: So sprach Costas am Wed, Apr 04, 2001 at 02:07:54PM +0100: Is there an equivalent in PHP of the following code: equivalent of asp's %= strTest % Uhm - what does this strange line do?? Alexander Skwar -- 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] lowest number in field
Is it possible to be able to query the DB find the lowest numebr in the table and then display it on the page. TIA George -- 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] lowest number in field
SELECT * FROM table ORDER BY number LIMIT 1 --Joe On Sat, Apr 07, 2001 at 05:36:04PM +0100, george wrote: Is it possible to be able to query the DB find the lowest numebr in the table and then display it on the page. TIA George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] /**\ *Joe Stump - PHP/SQL/HTML Developer * * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * * "Better to double your money on mediocrity than lose it all on a dream." * \**/ -- 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-I18N] ADD A PROVEN LEAD SYSTEM FOR EXPLOSIVE GROWTH
PRE-QULIFIED NETWORK MARKETER LEADS FOR YOUR BUSINESS! SALE PRICES ALL THIS WEEK! SHARE WITH YOUR ENTIRE DOWNLINE FOR GUARANTEED SUCCESS! CHECK OUT OUR SITE AND LET US KNOW WHAT WE CAN DO TO HELP YOU SUCCEED!! http://www.geocities.com/betterleadsthanever ** THIS EMAIL COMPLIES WITH ALL REGULATIONS. TO BE REMOVED SIMPLY EMAIL [EMAIL PROTECTED] FOR IMMEDIATE REMOVAL FROM ANY FUTURE EMAILS FROM OUR COMPANY. ** -- PHP Internationalization 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: equivalent of asp's %= strTest %
Yes yes I'm a zealot. :) If the people defining the PEAR standards really were that interested in standards, why include alternate ways of doing something? ?=$blah;? And if the 'short tag' method is useful enough for people, why 'exclude' it from a standard? This notion of 'PEAR standards' does irk me some, because it's been so long in coming, and people are deferring to it before it's a reality. At least, that's the impression that I get. Philip Olson wrote: 1. Is PHP4+ specific 2. Won't work if short_open_tag setting is off (in php.ini) - One reason to turn this off, to enable XML support 3. Doesn't follow up-and-coming PEAR coding standards And as you've seen, many don't even know what ?= is. You'll find zealots on both sides of this use, the choice is yours. ;-) -- 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] DESPERADED HELP NEEDED, PLEASE PLEASE PLEASE
Hi folks! have anyone already used FastTemplate over php4 (with the necessary patches applied) ? I am facing error when using dymanic macros, have anyone experienced any problem ? Thanks a lot for your help! -- 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: equivalent of asp's %= strTest %
Have a look here : http://www.php.net/manual/en/pear.standards.php Regarding ?= : the PEAR example was just part of it as it relates to short_tags, not ?= specifically. http://www.php.net/manual/en/configuration.php#ini.short-open-tag Regards, Philip On Sat, 7 Apr 2001, Michael Kimsal wrote: Yes yes I'm a zealot. :) If the people defining the PEAR standards really were that interested in standards, why include alternate ways of doing something? ?=$blah;? And if the 'short tag' method is useful enough for people, why 'exclude' it from a standard? This notion of 'PEAR standards' does irk me some, because it's been so long in coming, and people are deferring to it before it's a reality. At least, that's the impression that I get. Philip Olson wrote: 1. Is PHP4+ specific 2. Won't work if short_open_tag setting is off (in php.ini) - One reason to turn this off, to enable XML support 3. Doesn't follow up-and-coming PEAR coding standards And as you've seen, many don't even know what ?= is. You'll find zealots on both sides of this use, the choice is yours. ;-) -- 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] bcc, cc limit on recepients?
Hi! Is there any limit on the number of recepients that a bcc or a cc field email can be sent to? I have a loop which extracts arounf 400 emails from the database and then sends it as email to all the 400 recepients but the script fails and I get a mysql error. SO is there any limit on the number of recepients? Thank you Dhaval Desai __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.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] Char Problem
Hello... I have a problem with some special chars I created some kind of editor for text files but chars like " get a \ in front everytime you send it here is my code: form action="self.html" enctype="text/plain" textarea name="text" cols="80" rows="15" wrap=off ?=$text? /textareabr INPUT TYPE="submit" VALUE="Send" /form If you just enter " and click send you see what my problem is does someone have a idea how to fix 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] Char Problem
look in your php.ini for the setting of magic_quotes if on, then php will automatically escape quotes for you once you've submitted data...you can turn it off, and then addslashes right before you enter your info into a database, or leave it on and stripslashes where appropriate. -jack -Original Message- From: Mon Akira [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 2:45 PM To: [EMAIL PROTECTED] Subject: [PHP] Char Problem Hello... I have a problem with some special chars I created some kind of editor for text files but chars like " get a \ in front everytime you send it here is my code: form action="self.html" enctype="text/plain" textarea name="text" cols="80" rows="15" wrap=off ?=$text? /textareabr INPUT TYPE="submit" VALUE="Send" /form If you just enter " and click send you see what my problem is does someone have a idea how to fix 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]
[PHP] putting a list of data into 3 columns?
Hi, I would like to display a list of products from a MySQL database in 3 columns. as shown below: Product A Product D Product G Product B Product E Product H Product C Product F The problem I have is I don't know how many products there will be, so I can't just print out the first 3, start new column, print out next three, start new column, print out rest, end table. I presume I will have to count the number of results, then use this to wok out how many have to go in the first column etc. As I have only recently started using PHP / MySQL I am not sure how this should be done, has anybody done this (or something similar) so that I could look at the relevant code. Many thanks for your help, Donald -- 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] putting a list of data into 3 columns?
Hi, I would like to display a list of products from a MySQL database in 3 columns. as shown below: Product A Product D Product G Product B Product E Product H Product C Product F The problem I have is I don't know how many products there will be, so I can't just print out the first 3, start new column, print out next three, start new column, print out rest, end table. I presume I will have to count the number of results, then use this to wok out how many have to go in the first column etc. As I have only recently started using PHP / MySQL I am not sure how this should be done, has anybody done this (or something similar) so that I could look at the relevant code. Many thanks for your help, Donald -- 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] putting a list of data into 3 columns?
You don't need to count...in your loop you can do something like this: if($current_pos%3==0){ //then you're at a multiple of three //code to start new column here } -jack -Original Message- From: DRN [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 2:55 PM To: [EMAIL PROTECTED] Subject: [PHP] putting a list of data into 3 columns? Hi, I would like to display a list of products from a MySQL database in 3 columns. as shown below: Product A Product D Product G Product B Product E Product H Product C Product F The problem I have is I don't know how many products there will be, so I can't just print out the first 3, start new column, print out next three, start new column, print out rest, end table. I presume I will have to count the number of results, then use this to wok out how many have to go in the first column etc. As I have only recently started using PHP / MySQL I am not sure how this should be done, has anybody done this (or something similar) so that I could look at the relevant code. Many thanks for your help, Donald -- 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] Char Problem
look here http://www.php.net/manual/en/function.set-magic-quotes-runtime.php -jack -Original Message- From: Mon Akira [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 3:03 PM To: "Jack Dempsey" Subject: Re: [PHP] Char Problem On my server I cant change anything on the php.ini is there any way how to solve this problem in the code? - Original Message - From: ""Jack Dempsey"" [EMAIL PROTECTED] Newsgroups: php.general Sent: Saturday, April 07, 2001 8:48 PM Subject: RE: [PHP] Char Problem look in your php.ini for the setting of magic_quotes if on, then php will automatically escape quotes for you once you've submitted data...you can turn it off, and then addslashes right before you enter your info into a database, or leave it on and stripslashes where appropriate. -jack -Original Message- From: Mon Akira [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 2:45 PM To: [EMAIL PROTECTED] Subject: [PHP] Char Problem Hello... I have a problem with some special chars I created some kind of editor for text files but chars like " get a \ in front everytime you send it here is my code: form action="self.html" enctype="text/plain" textarea name="text" cols="80" rows="15" wrap=off ?=$text? /textareabr INPUT TYPE="submit" VALUE="Send" /form If you just enter " and click send you see what my problem is does someone have a idea how to fix 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] -- 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] putting a list of data into 3 columns?
Assuming your items are in an array $items =array() //assume a bunch of items in this array For($i = 0; $i (count($items)/3); $i +=1){ printf("%s\t%s\t%s",$items[$i],$items[$i+3],$items[$i+6]); } Should print 3 columns of tab separated text. Note: typed this quickly, untested, but the theory is sound. Might have to twiddle the $i(count... Section. If you have 8 itesm, as shown and you divide by 3 you get 2.xx So, the the loop will print out: $items[0] $items[3] $items[6] $items[1] $items[4] $items[7] $items[2] $items[5] $items[8} // because $items[8] doesn't exist, it won't print. // if it spits out an error there, put a @in front of printf to turn off error reporting. On 4/7/01 11:58 AM, "Jack Dempsey" [EMAIL PROTECTED] wrote: You don't need to count...in your loop you can do something like this: if($current_pos%3==0){//then you're at a multiple of three //code to start new column here } -jack -Original Message- From: DRN [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 2:55 PM To: [EMAIL PROTECTED] Subject: [PHP] putting a list of data into 3 columns? Hi, I would like to display a list of products from a MySQL database in 3 columns. as shown below: Product A Product D Product G Product B Product E Product H Product C Product F The problem I have is I don't know how many products there will be, so I can't just print out the first 3, start new column, print out next three, start new column, print out rest, end table. I presume I will have to count the number of results, then use this to wok out how many have to go in the first column etc. As I have only recently started using PHP / MySQL I am not sure how this should be done, has anybody done this (or something similar) so that I could look at the relevant code. Many thanks for your help, Donald -- 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] Char Problem
On my server I cant change anything on the php.ini is there any way how to solve this problem in the code? No. This setting cannot be set within the script but can be with .htaccess with the following : php_flag magic_quotes_gpc off And be sure to have a look here (see user comments too) : http://www.php.net/manual/en/function.get-magic-quotes-gpc.php http://www.php.net/manual/en/configuration.php#ini.magic-quotes-gpc But, if you just want to strip the slashes before display it's common to use the stripslashes function : http://www.php.net/manual/en/function.stripslashes.php Which means in your case you can do : ?php echo stripslashes($text) ? It'll print $text as desired. magic_quotes are on by default and are pretty common and useful, like for putting the data into the database (as it escapes \"stuff\" automagically!) Regards, Philip - Original Message - From: ""Jack Dempsey"" [EMAIL PROTECTED] Newsgroups: php.general Sent: Saturday, April 07, 2001 8:48 PM Subject: RE: [PHP] Char Problem look in your php.ini for the setting of magic_quotes if on, then php will automatically escape quotes for you once you've submitted data...you can turn it off, and then addslashes right before you enter your info into a database, or leave it on and stripslashes where appropriate. -jack -Original Message- From: Mon Akira [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 2:45 PM To: [EMAIL PROTECTED] Subject: [PHP] Char Problem Hello... I have a problem with some special chars I created some kind of editor for text files but chars like " get a \ in front everytime you send it here is my code: form action="self.html" enctype="text/plain" textarea name="text" cols="80" rows="15" wrap=off ?=$text? /textareabr INPUT TYPE="submit" VALUE="Send" /form If you just enter " and click send you see what my problem is does someone have a idea how to fix 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] -- 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] AUTO_INCREMENT with MySQL phpmyadmin
I don't know why your query isn't working, but why aren't you using phpMyAdmin's add field section? Browse the tables definition page, and underneath the column descriptsion, is a line that says Add new fields [textbox: #][popup:At End of Database][button: Go] That brings up a fully functional column add page. Unless your permissions don't allow you to alter tables? Double check that. On 4/6/01 10:35 PM, "Plutarck" [EMAIL PROTECTED] wrote: At first I thought this might be better suited on the mysql list, but since I'm using phpmyadmin I thought it better to ask here. My problem is I can't figure out how to create a column with the auto_increment attribute. I want to make one called userid whose value is one higher than the highest number in the userid column, which according to the manual is exactly what auto_increment should do. But I flat out can't figure out how to do it. I'm using the "add new field" attribute in phpmyadmin, and I've tried making one with no name and with many different names, and I don't get nuttin'. Occassionally it will announce that the table was altered with something like the message: SQL-query: ALTER TABLE test_kingdoms_userauth ADD useridi TINYINT not null AUTO_INCREMENT But according to the display, no matter how many times I refresh it, there is no listing of ANY column other than the two I currently have. So I'm totally confused, and out of the whole mysql manual I just don't know what's wrong. So the question: What kind of selections do I need to make to create an AUTO_INCREMENT column? -- Plutarck Should be working on something... ...but forgot what it was. -- 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-CVS] cvs: php4 /ext/yp yp.c
jon Sat Apr 7 11:22:27 2001 EDT Modified files: /php4/ext/ypyp.c Log: Fix compilation (strict compilers require constant initializers). Index: php4/ext/yp/yp.c diff -u php4/ext/yp/yp.c:1.19 php4/ext/yp/yp.c:1.20 --- php4/ext/yp/yp.c:1.19 Tue Mar 20 12:04:41 2001 +++ php4/ext/yp/yp.cSat Apr 7 11:22:26 2001 @@ -16,7 +16,7 @@ | Fredrik Ohrn| +--+ */ -/* $Id: yp.c,v 1.19 2001/03/20 20:04:41 ohrn Exp $ */ +/* $Id: yp.c,v 1.20 2001/04/07 18:22:26 jon Exp $ */ #include "php.h" #include "ext/standard/info.h" @@ -215,9 +215,13 @@ { int r; zval *status, *key, *value; - zval **args [3] = { status, key, value }; + zval **args [3]; zval *retval; CLS_FETCH(); + + args[0] = status; + args[1] = key; + args[2] = value; MAKE_STD_ZVAL (status); ZVAL_LONG (status, ypprot_err (instatus)); -- PHP CVS 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] Char Problem
are you sure? have you looked here - http://www.php.net/manual/en/function.set-magic-quotes-runtime.php maybe i'm misinterpreting it, but it seems to do just what he wants... -jack -Original Message- From: Philip Olson [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 3:23 PM To: Mon Akira Cc: Jack Dempsey; PHP General List Subject: RE: [PHP] Char Problem On my server I cant change anything on the php.ini is there any way how to solve this problem in the code? No. This setting cannot be set within the script but can be with .htaccess with the following : php_flag magic_quotes_gpc off And be sure to have a look here (see user comments too) : http://www.php.net/manual/en/function.get-magic-quotes-gpc.php http://www.php.net/manual/en/configuration.php#ini.magic-quotes-gpc But, if you just want to strip the slashes before display it's common to use the stripslashes function : http://www.php.net/manual/en/function.stripslashes.php Which means in your case you can do : ?php echo stripslashes($text) ? It'll print $text as desired. magic_quotes are on by default and are pretty common and useful, like for putting the data into the database (as it escapes \"stuff\" automagically!) Regards, Philip - Original Message - From: ""Jack Dempsey"" [EMAIL PROTECTED] Newsgroups: php.general Sent: Saturday, April 07, 2001 8:48 PM Subject: RE: [PHP] Char Problem look in your php.ini for the setting of magic_quotes if on, then php will automatically escape quotes for you once you've submitted data...you can turn it off, and then addslashes right before you enter your info into a database, or leave it on and stripslashes where appropriate. -jack -Original Message- From: Mon Akira [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 2:45 PM To: [EMAIL PROTECTED] Subject: [PHP] Char Problem Hello... I have a problem with some special chars I created some kind of editor for text files but chars like " get a \ in front everytime you send it here is my code: form action="self.html" enctype="text/plain" textarea name="text" cols="80" rows="15" wrap=off ?=$text? /textareabr INPUT TYPE="submit" VALUE="Send" /form If you just enter " and click send you see what my problem is does someone have a idea how to fix 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] -- 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] Char Problem
At 20:45 7/4/2001 +0200, you wrote: Hello... I have a problem with some special chars I created some kind of editor for text files but chars like " get a \ in front everytime you send it here is my code: form action="self.html" enctype="text/plain" textarea name="text" cols="80" rows="15" wrap=off ?=$text? /textareabr INPUT TYPE="submit" VALUE="Send" /form If you just enter " and click send you see what my problem is does someone have a idea how to fix this??? Thanks! try stripslashes()... like thistextarea ...?=stripslashes($text)?/textarea -- 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] running as a script
How do you get PHP to run at a script, like at a telnet prompt? J -- 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] running as a script
At 05:32 PM 4/7/2001, Joseph Bannon wrote: you must compile php as a CGI executable. :-) see the man ~kurth How do you get PHP to run at a script, like at a telnet prompt? J -- 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] adding methods to classes
Does PHP allow you to add methods to a class outside the class definition? This seems not to be straightforward since class prototypes are not allowed. For instance, what I'm trying to do is add a method to the DB class (in PEAR) that will do a database query, test if the result is an error/warning, trigger and error/warning, and (if possible) return the result. Something like: DB::ecQuery($db, $query) { $result = $db-query($query); if(DB::isError($result)) { triggerError(DB::errorMessage($result), E_USER_ERROR); } else if(DB::isWarning($result)) { triggerError(DB::errorMessage($result), E_USER_WARNING); } return $result; } I can't just add this to my own local copy of PEAR, because my app will be a public use app, and I'd like my users to have the convenience of using their preinstalled versions of PEAR (although I've thought of doing something like BinaryCloud, which includes a distribution of metabase in its distribution). Also, in case you're wondering, I'm triggering these errors b/c I know my app will appropriately set PHP error_reporting to a user-defined value. As it is, I have a "static" class called "Error" with a method called "dbQuery" that I'm using, but a class called "Error" doesn't seem appropriate -- "DB" does. Anybody know if this is possible? Thanks. Dean. -- 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] X509
Martin. "Martin Thoma" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I want to write a small script to decrypt/encrypt/sign emails with the X509-protocoll. Does anybody know, where to get information about this protocoll ? As far as I'm aware, X509 is just a file format for a certificate, not a protocol. I believe that if you were to support these types of certificates, you would have to support every encryption/digital signature/MAC algorithm that X509 does. I think mcrypt should be sufficient for most of those algorithms. As for the X509 format itself, check the RFC (I don't know where to find this -- you should try google.com). Dean Hall. http://hall.apt7.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]
RE: [PHP] X509
From: Dean Hall [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 2:57 PM Martin. "Martin Thoma" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I want to write a small script to decrypt/encrypt/sign emails with the X509-protocoll. Does anybody know, where to get information about this protocoll ? As far as I'm aware, X509 is just a file format for a certificate, not a protocol. I believe that if you were to support these types of certificates, you would have to support every encryption/digital signature/MAC algorithm that X509 does. I think mcrypt should be sufficient for most of those algorithms. As for the X509 format itself, check the RFC (I don't know where to find this -- you should try google.com). www.openssl.org -- 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] PEAR Standards (was Re: equivalent of asp's %= strTest %)
I have some problems with the PEAR "standards", and I'm wondering what others have to say about what the PHP developers are doing to overcome PHP's obvious shortcomings. bitch moan It seems that one obvious improvement to be made to PHP would be the implementation of real namespaces. It seems pretty simple to implement this and stay backwards compatible with PHP3/4. Does anyone know if plans are in the work for this? The PEAR standards try to make up for the lack of namespaces . . . and I suppose its the best that can be done, but it's simply awful! It not only proposes a standard, it proposes to mandate naming conventions and coding style as well! I think the PHP developers should look to the example that Perl has set for graceful, non-obtrusive namespaces that don't enforce coding style or naming conventions for classes. (I mean, I don't have to name a subclass of "DB" "DB_mysql" -- it can be "DB::Mysql".) /moan /bitch "Michael Kimsal" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If the people defining the PEAR standards really were that interested in standards, why include alternate ways of doing something? ?=$blah;? And if the 'short tag' method is useful enough for people, why 'exclude' it from a standard? This notion of 'PEAR standards' does irk me some, because it's been so long in coming, and people are deferring to it before it's a reality. First of all, I think that the PEAR folk are on a different endeavor than the PHP developers. The PEAR people seem to be trying to propose a good standard for a language that needs some improvement. They're doing a decent job, but I think PEAR should wait till PHP matures a bit. Second, there is one very good reason not to use short tags: XML. All the same, I'd rather just enable ASP tags than do away with short tags, as short tags are irreplacable in templates rich in content and sparse on code. My $0.02. Dean Hall. http://hall.apt7.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]
Re: [PHP] bcc, cc limit on recepients?
"Dhaval Desai" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi! Is there any limit on the number of recepients that a bcc or a cc field email can be sent to? I have a loop which extracts arounf 400 emails from the database and then sends it as email to all the 400 recepients but the script fails and I get a mysql error. If your getting a mysql error, is your script failing before you even send the mail? Dean Hall. http://hall.apt7.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]
Re: [PHP] PEAR Standards (was Re: equivalent of asp's %= strTest%)
If the people defining the PEAR standards really were that interested in standards, why include alternate ways of doing something? ?=$blah;? And if the 'short tag' method is useful enough for people, why 'exclude' it from a standard? This notion of 'PEAR standards' does irk me some, because it's been so long in coming, and people are deferring to it before it's a reality. First of all, I think that the PEAR folk are on a different endeavor than the PHP developers. The PEAR people seem to be trying to propose a good standard for a language that needs some improvement. They're doing a decent job, but I think PEAR should wait till PHP matures a bit. Second, there is one very good reason not to use short tags: XML. All the same, I'd rather just enable ASP tags than do away with short tags, as short tags are irreplacable in templates rich in content and sparse on code. I'm not sure why XML is an issue. Does XML use the ? in it's syntax? XML tags are, to my knowledge, of the blahblah/ style. Am I missing something? I admit it's been a bit since I've gotten into dealing with XML at any real in-depth level, but the short tags in PHP don't seem like they'd be a problem. If they're a problem for PHP, I think a lot of ASP shops will be caught short when dealing with XML. -- 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] PEAR Standards (was Re: equivalent of asp's %= strTest %)
"Michael Kimsal" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm not sure why XML is an issue. Does XML use the ? in it's syntax? XML tags are, to my knowledge, of the blahblah/ style. Am I missing something? I admit it's been a bit since I've gotten into dealing with XML at any real in-depth level, but the short tags in PHP don't seem like they'd be a problem. If they're a problem for PHP, I think a lot of ASP shops will be caught short when dealing with XML. ?xml version="1.0"? This is the first line of an XML file. Including XML files from PHP scripts will be a real problem if short tags are enabled. Dean Hall. http://hall.apt7.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-CVS] cvs: php4 /ext/standard file.c
sniper Sat Apr 7 14:46:43 2001 EDT Modified files: /php4/ext/standard file.c Log: ws pollution removed. Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.149 php4/ext/standard/file.c:1.150 --- php4/ext/standard/file.c:1.149 Fri Mar 23 01:30:51 2001 +++ php4/ext/standard/file.cSat Apr 7 14:46:43 2001 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: file.c,v 1.149 2001/03/23 09:30:51 romolo Exp $ */ +/* $Id: file.c,v 1.150 2001/04/07 21:46:43 sniper Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -906,15 +906,17 @@ convert_to_long_ex(arg2); len = (*arg2)-value.lval; -if (len 0) { + + if (len 0) { php_error(E_WARNING, "length parameter to fgets() may not be negative"); RETURN_FALSE; -} + } if (type == le_socket) { issock=1; socketd=*(int*)what; } + buf = emalloc(sizeof(char) * (len + 1)); /* needed because recv doesnt put a null at the end*/ memset(buf,0,len+1); -- PHP CVS 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] PEAR Standards (was Re: equivalent of asp's %= strTest%)
On Sat, 7 Apr 2001, Dean Hall wrote: "Michael Kimsal" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm not sure why XML is an issue. Does XML use the ? in it's syntax? XML tags are, to my knowledge, of the blahblah/ style. Am I missing something? I admit it's been a bit since I've gotten into dealing with XML at any real in-depth level, but the short tags in PHP don't seem like they'd be a problem. If they're a problem for PHP, I think a lot of ASP shops will be caught short when dealing with XML. ?xml version="1.0"? This is the first line of an XML file. Including XML files from PHP scripts will be a real problem if short tags are enabled. Dean Hall. http://hall.apt7.com DUH! :( Why did those pesky XML people have to do that??? All of that cool header stuff is stuff I normally skip - like the ISO charset stuff that WYSIWYG editors are fond of putting at the top of every file they create. :) And oh yeah, I realized my ASP comment mistake about 4 seconds after hitting send... Not a good mailing day for me today! ;) -- 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] bcc, cc limit on recepients?
Is there any limit on the number of recepients that a bcc or a cc field email can be sent to? I have a loop which extracts arounf 400 emails from the database and then sends it as email to all the 400 recepients but the script fails and I get a mysql error. SO is there any limit on the number of recepients? Hear things like this before.. could be a timeout.. like the maximum time a script may run.. Could very well be a maximum on recipients too.. If you do such things on a regular basis you might want to use a mailinglist manager.. These things handle bounces all by theirselves Bye, B. -- 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] new php.net look
The older look was neat to show off to people re: pop up menus, etc., but this is a real speed demon, and will be much more useful for searching around. Speaking of which - there used to be a little HOWTO for doing those kind of popups - does anyone know where it has gone to? regards, jaxon Thanks again! -- 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] new php.net look
The older look was neat to show off to people re: pop up menus, etc., but this is a real speed demon, and will be much more useful for searching around. Speaking of which - there used to be a little HOWTO for doing those kind of popups - does anyone know where it has gone to? regards, jaxon Thanks again! -- 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] PEAR Standards (was Re: equivalent of asp's %= strTest %)
I'm pretty sure you can make php use the asp style % though too, not sure if that's for short tags, regular tags or both, I know it's in the config though, anyone know? Shaun On Saturday 07 April 2001 18:46, Michael Kimsal wrote: On Sat, 7 Apr 2001, Dean Hall wrote: "Michael Kimsal" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm not sure why XML is an issue. Does XML use the ? in it's syntax? XML tags are, to my knowledge, of the blahblah/ style. Am I missing something? I admit it's been a bit since I've gotten into dealing with XML at any real in-depth level, but the short tags in PHP don't seem like they'd be a problem. If they're a problem for PHP, I think a lot of ASP shops will be caught short when dealing with XML. ?xml version="1.0"? This is the first line of an XML file. Including XML files from PHP scripts will be a real problem if short tags are enabled. Dean Hall. http://hall.apt7.com DUH! :( Why did those pesky XML people have to do that??? All of that cool header stuff is stuff I normally skip - like the ISO charset stuff that WYSIWYG editors are fond of putting at the top of every file they create. :) And oh yeah, I realized my ASP comment mistake about 4 seconds after hitting send... Not a good mailing day for me today! ;) -- 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] PEAR Standards (was Re: equivalent of asp's %= strTest %)
(Reply to your TOFU:) "shaun" [EMAIL PROTECTED] wrote in message 01040817181702.01567@box">news:01040817181702.01567@box... I'm pretty sure you can make php use the asp style % though too, not sure if that's for short tags, regular tags or both, I know it's in the config though, anyone know? Shaun Yeah, ASP tags are all short, I believe. There is no long version. (Okay, I'm not completely sure, but pretty sure.) Dean. -- 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] adding methods to classes
Stupid me. Just extend the class. Now the real question: Is there any dynamic binding in PHP? Can I override a method in a subclass? Dean. -- 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] putting a list of data into 3 columns?
Lindsay Adams [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... | Assuming your items are in an array | $items =array() //assume a bunch of items in this array | For($i = 0; $i (count($items)/3); $i +=1){ | printf("%s\t%s\t%s",$items[$i],$items[$i+3],$items[$i+6]); | } | | Should print 3 columns of tab separated text. | Note: typed this quickly, untested, but the theory is sound. Might have to | twiddle the $i(count... Section. | | If you have 8 itesm, as shown and you divide by 3 you get 2.xx | So, the the loop will print out: | | $items[0] $items[3] $items[6] | $items[1] $items[4] $items[7] | $items[2] $items[5] $items[8} | // because $items[8] doesn't exist, it won't print. | // if it spits out an error there, put a @in front of printf to turn off | error reporting. | | | On 4/7/01 11:58 AM, "Jack Dempsey" [EMAIL PROTECTED] wrote: | | You don't need to count...in your loop you can do something like this: | if($current_pos%3==0){//then you're at a multiple of three | //code to start new column here | } | | -jack | Neither of these were quite what I was looking for, I was hoping I could make a table with 3 td's side by side, each having a third of the list of products (with br between them). Is this possible? If not I will try to adapt one of these methods. Cheers for your help, Donald -- 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] Checking the REFERER
Waht might be the most secure method to check, if a certain page was reached by submitting a form instead of typing the adress directly? I read, the the $HTTP_REFERER may be changed, e.g. when WEBWASHER or other programs are in use! Pleas help! Thanx -- Jochen Kaechelin - Ihr WEBberater Stuttgarter Str.3, D-73033 Goeppingen Tel. 07161-92 95 94, Fax 07161-92 95 98 http://www.wa-p.de, 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] html forms, reading writing data, etc
First thanks to all the ideas for reading one word from a file, but I hit another snag. Here is what I am trying to accomplish. I have a text file (questionFile.txt) and it contains questions that can be arranged like: 1. Question One A1. Question OneA C. Question Three For this email, I will call the 1. A1. C. all question numbers. So my first php script reads this file and for each question it creates a place for a user to enter the answer and each answer input has should have a name that correspondes to each question number (e.g. 1. A1. C. or whatever comes before the period). So the code that does this is ($wd is the file that contains the questions): while(!feof($wd) ) { $question = trim( fgets($wd, 4096) ); if (strlen($question)) { $questionWordArray = explode(" ", $question); $currentQuestionNumber = $questionWordArray[0]; //$questionNumberArray[$questionCounter]=$currentQuestionNumber; echo "$question input NAME=\"$currentQuestionNumber\"br"; //echo "input type=\"hidden\" name=\"questionNumberArray[$questionCounter]\" value=\"$questionNumberArray[$questionCounter]\""; $questionCounter++; } } Then once the user enters answers to the questions he or she knows, they hit the submit button and my second script takes that data, writes it to the answer file and displays all the other answers that people have entered for these questions. I was trying to get the answer file to be written in the following manner: 1. First person that answers questoin 1 A1. First person that answers question A1 1. Second person that answers question 2 C. first person to answer question C. Then for displaying the questions and all the answers for that questions, I was having the second script, print the first question and then compare the first question's question number to each of the question numbers in the answer file and if they match then it prints that answer and continues to search for more answers for that question. My problem is in writing this answer file. Since the name of the input field for the questions is the question Numbers, I don't see how to differentiate the value contained in $currentQuestionNumber. $currentQuestionNumber is the name of each of the input fields and it also should contain the data that the user enters for the answer to the question. When I am trying to write the answer file, I am not sure how to get access to the answer the user put in, when I try to just write $currentQuestionNumber for each of the questions, it just writes 1. 1. A1. A1. C. C. instead of 1. Answer 1 here A2. Answer A2 here C. Answer C here. I was playing around with putting all the $currentQuestionNumber into an array (as you can see from the commented out section) in hopes that then I could use those to refer to the actual answer but that didn't work. So how would you go about doing this? ---Andrew V. Romero If you want to reply personally, remove all numbers from my address. -- 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] Cookie Expire Problem
This code won't set a cookie. I took the time part from a past post to set the time for wy ahead. I must be doing it wrong though: $time = time(); $cookie_name = "auth"; $cookie_value = "ok"; $cookie_expire = "$time*3"; $cookie_domain = ""; setcookie($cookie_name, $cookie_value, $cookie_expire, "/" , $cookie_domain, 0); Thanks. Jeff Oien -- 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] Checking the REFERER
"Jochen Kaechelin" [EMAIL PROTECTED] wrote in message NFBBLHGFAKNLFNPOHMPHOEKLCFAA.jk@intern">news:NFBBLHGFAKNLFNPOHMPHOEKLCFAA.jk@intern... Waht might be the most secure method to check, if a certain page was reached by submitting a form instead of typing the adress directly? Well, the HTTP_REFERRER is not reliable at all. Some agents (browsers) fill this up with a bunch of worthless foo, so never depend on it. The best way I can think of is to have some very secret and persistent key on the server and hash it (perhaps with another value like the current timestamp or the filename of the form-processor you want to redirect the user from) and send the hash (and the other value, if you used one) to the client as a GET parameter. The page can then check to see if the hash is good. If it is (and the key is kept secret), then you know the page was reached by the form-handler. You can use the built-in md5 for this, but if security is a major concern, get the mhash extensioin for PHP and use SHA1 or RIPEMD160, as md5 is known to have weaknesses. Dean Hall. -- 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 8 Apr 2001 00:43:26 -0000 Issue 614
php-general Digest 8 Apr 2001 00:43:26 - Issue 614 Topics (messages 47558 through 47605): Re: Extension_dir in php.ini? 47558 by: Yasuo Ohgaki possible to get the fully qualified path name for file updloads? 47559 by: Andre Bajew 47561 by: Rasmus Lerdorf Re: text string in a gif 47560 by: Rasmus Lerdorf How to change useragent-ID sent by PHP4.0.5RC1 47562 by: Markus Wagner Re: equivalent of asp's %= strTest % 47563 by: Alexander Skwar 47564 by: shaun 47565 by: Philip Olson 47569 by: Michael Kimsal 47571 by: Philip Olson lowest number in field 47566 by: george 47567 by: Joe Stump 47568 by: B. van Ouwerkerk DESPERADED HELP NEEDED, PLEASE PLEASE PLEASE 47570 by: Gustavo Vieira Goncalves Coelho Rios bcc, cc limit on recepients? 47572 by: Dhaval Desai 47590 by: Dean Hall 47594 by: B. van Ouwerkerk Char Problem 47573 by: Mon Akira 47574 by: Jack Dempsey 47578 by: Jack Dempsey 47580 by: Philip Olson 47582 by: Jack Dempsey 47583 by: Christian Dechery putting a list of data into 3 columns? 47575 by: DRN 47576 by: DRN 47577 by: Jack Dempsey 47579 by: Lindsay Adams 47601 by: DRN Re: AUTO_INCREMENT with MySQL phpmyadmin 47581 by: Lindsay Adams running as a script 47584 by: Joseph Bannon 47585 by: Kurth Bemis adding methods to classes 47586 by: Dean Hall 47600 by: Dean Hall Re: X509 47587 by: Dean Hall 47588 by: Roeland Meyer PEAR Standards (was Re: equivalent of asp's %= strTest %) 47589 by: Dean Hall 47591 by: Michael Kimsal 47592 by: Dean Hall 47593 by: Michael Kimsal 47597 by: shaun 47599 by: Dean Hall Re: new php.net look 47595 by: jaxon 47596 by: jaxon PHP-Tuxedo Open Source Project 47598 by: Brian Foddy Checking the REFERER 47602 by: Jochen Kaechelin 47605 by: Dean Hall html forms, reading writing data, etc 47603 by: Andrew V. Romero Cookie Expire Problem 47604 by: Jeff Oien 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] -- If you are talking about PHP on UNIX, I think the default is /usr/local/lib/php/extensions/no-debug-non-zts-version For windows, I don't know. Regards, -- Yasuo Ohgaki "Lindsay Adams" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Okay, you may call me an idiot all you want, But if the extension_dir= ./ In php.ini And PHP is loaded as an apxs module in apache, then just where does ./ point to? ServerRoot? DocumentRoot? Some other directory? Having a major brain in getting my .so into the right place. Also, how can I compile libpdf.so (version 3) to work with PHP4.0.4pl1? If I have to go backwards in PHP (say to 4.0.3pl1) to be able to get PDF support compiled into PHP (because it just isn't working for me on 4.0.4pl1) then somebody please tell me that. I have read through all the suggestions in the list archive I have downloaded the latest versions of files pertaining to pdf and 4.0.4pl1 from cvs.php.net and yet, I still get the problem, during ./configure, of it complaing about my version 3 pdflib, not being version 3 because it can't find pdf_show_boxed(). I _NEED_ pdf support, so any help in choosing the right set of versions would be greatly helpful! Thanks gang! Ps- yes, I also changed ext/crypt.c php_srand... On line 150(or thereabouts) to make php work at all on my box (Qube2) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Hi, I'm doing file uploads through PHP and now have a need to retrieve and store the original fully qualified directory path name used for the upload. For example if the user copied image file sample.jpg from c:\temp I need to retrieve and store the c:\temp\ in addition to the sample.jpg that I am already storing. The directory path does not seem to be availble anywhere. Is there some way to get this? TIA! Andre I'm doing file uploads through PHP and now have a need to retrieve and store the original fully qualified directory path name used for the upload. For example if the user copied image file sample.jpg from c:\temp I need to retrieve and store the c:\temp\ in addition to the sample.jpg that I am already storing. The directory path does not seem to be availble anywhere. Is there some way to get this? No. This information is not transferred. -Rasmus urldecode($string) On
[PHP] gd 2.0
has anyone gotten php to compile with gd 2.0? i know gd 2.0 is still in beta, but i was able to compile and install it without any problems. when compiling php, however, i end up with some error in regards to the libmysql extension. if i switch back to gd 1.8, all works fine. -jr -- 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-CVS] cvs: php4 /ext/imap php_imap.c
jon Sat Apr 7 18:13:08 2001 EDT Modified files: /php4/ext/imap php_imap.c Log: Use tabs instead of spaces. Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.63 php4/ext/imap/php_imap.c:1.64 --- php4/ext/imap/php_imap.c:1.63 Fri Mar 16 05:17:54 2001 +++ php4/ext/imap/php_imap.cSat Apr 7 18:13:07 2001 @@ -25,7 +25,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.63 2001/03/16 13:17:54 sniper Exp $ */ +/* $Id: php_imap.c,v 1.64 2001/04/08 01:13:07 jon Exp $ */ #define IMAP41 @@ -428,29 +428,29 @@ #if 1 #ifndef PHP_WIN32 - mail_link(unixdriver); /* link in the unix driver */ + mail_link(unixdriver); /* link in the unix driver */ #endif - mail_link(imapdriver); /* link in the imap driver */ - mail_link(nntpdriver); /* link in the nntp driver */ - mail_link(pop3driver); /* link in the pop3 driver */ + mail_link(imapdriver); /* link in the imap driver */ + mail_link(nntpdriver); /* link in the nntp driver */ + mail_link(pop3driver); /* link in the pop3 driver */ #ifndef PHP_WIN32 - mail_link(mhdriver);/* link in the mh driver */ - mail_link(mxdriver);/* link in the mx driver */ + mail_link(mhdriver); /* link in the mh driver */ + mail_link(mxdriver); /* link in the mx driver */ #endif - mail_link(mbxdriver); /* link in the mbx driver */ - mail_link(tenexdriver); /* link in the tenex driver */ - mail_link(mtxdriver); /* link in the mtx driver */ + mail_link(mbxdriver); /* link in the mbx driver */ + mail_link(tenexdriver);/* link in the tenex driver */ + mail_link(mtxdriver); /* link in the mtx driver */ #ifndef PHP_WIN32 - mail_link(mmdfdriver); /* link in the mmdf driver */ - mail_link(newsdriver); /* link in the news driver */ - mail_link(philedriver); /* link in the phile driver */ - auth_link(auth_log);/* link in the log authenticator */ + mail_link(mmdfdriver); /* link in the mmdf driver */ + mail_link(newsdriver); /* link in the news driver */ + mail_link(philedriver);/* link in the phile driver */ + auth_link(auth_log); /* link in the log authenticator */ #ifdef HAVE_IMAP_SSL ssl_onceonlyinit (); - auth_link (auth_ssl); /* link in the ssl authenticator */ + auth_link (auth_ssl); /* link in the ssl authenticator */ #endif #endif - mail_link(dummydriver); /* link in the dummy driver */ + mail_link(dummydriver);/* link in the dummy driver */ #else /* link in the c-client mail and auth drivers */ #include "linkage.c" -- PHP CVS 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] putting a list of data into 3 columns?
the method i gave you will do this..if you use the if clause i showed and work with it for more than a minute you'll see how you can test to see if you should add an /tdtd to your data, and this will let you make your columns.play with it and you'll see.. -jack -Original Message- From: DRN [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 07, 2001 7:55 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] putting a list of data into 3 columns? Lindsay Adams [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... | Assuming your items are in an array | $items =array() //assume a bunch of items in this array | For($i = 0; $i (count($items)/3); $i +=1){ | printf("%s\t%s\t%s",$items[$i],$items[$i+3],$items[$i+6]); | } | | Should print 3 columns of tab separated text. | Note: typed this quickly, untested, but the theory is sound. Might have to | twiddle the $i(count... Section. | | If you have 8 itesm, as shown and you divide by 3 you get 2.xx | So, the the loop will print out: | | $items[0] $items[3] $items[6] | $items[1] $items[4] $items[7] | $items[2] $items[5] $items[8} | // because $items[8] doesn't exist, it won't print. | // if it spits out an error there, put a @in front of printf to turn off | error reporting. | | | On 4/7/01 11:58 AM, "Jack Dempsey" [EMAIL PROTECTED] wrote: | | You don't need to count...in your loop you can do something like this: | if($current_pos%3==0){//then you're at a multiple of three | //code to start new column here | } | | -jack | Neither of these were quite what I was looking for, I was hoping I could make a table with 3 td's side by side, each having a third of the list of products (with br between them). Is this possible? If not I will try to adapt one of these methods. Cheers for your help, Donald -- 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] PHP-Tuxedo Open Source Project
Open Source Project Announcement... I have started an open source project to build a module for PHP4 that will allow direct calls to Tuxedo services from the PHP script, the project name is php-tuxedo. Think about it for a second... The ability from inside a PHP web page to directly call already existing Tuxedo services anywhere in your environment. Just like PHP can open a database connection to Oracle or Sybase, it would open a Tuxedo connection as a Tux client to a Tuxedo middleware environment. For those who have used PHP, you know how easy it is to build dynamic web pages. But those pages are mostly limited to database queries or flat file access for data. With this project you could call all your existing enterprise Tuxedo services directly. I believe this would be a very powerful enhancement to PHP's capabilities. To those familiar with Tuxedo, you know about how powerful an implementation of Tux middleware services can be for departmental and enterprise solutions. I want to bring these two pieces together. Project status. The project is in its early infancy, but some parts are functional. I have successfully built a client page that uses a STRING buffer to call a service with tpcall and returns a STRING buffer back. Primitive? Sure, but this is only the start. I have ideas of how to implement many other functions and buffer types including FMLs. There is much work to do, but if you are interested please check out http://php-tuxedo.sourceforge.net. There you can download my first cut and more importantly follow the project as it progresses. For the really ambitious I would welcome any testing or development help on the project. Please note I'm posting this note to several lists I don't normally monitor, so I may not see a reply on the list. Hope to hear from you. Brian Foddy [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] Wrapping Text
I've been having large problems with this so I decided to ask you guys(and gals ^_^). I have a textarea where you can type your text and it is saved to a file. Then another script includes that. Unfortunately I can't find a way for the textarea to wrap the text, or make it so it shows it they way they typed it in. Any help would be appreciated
Re: [PHP] adding methods to classes
""Dean Hall"" [EMAIL PROTECTED] wrote in message 9ao8dc$s6t$[EMAIL PROTECTED]">news:9ao8dc$s6t$[EMAIL PROTECTED]... Stupid me. Just extend the class. Now the real question: Is there any dynamic binding in PHP? You can do simlar thing with Variable Function. For example. class foo { var $function_name; function foo($fname) {$this-function_name = $fname; $this-$function_name;} function a() {echo 'a';} function b() {echo 'b';} } foo('b'); // calls foo::b() Can I override a method in a subclass? Yes. -- Yasuo Ohgaki Dean. -- 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] new php.net look
Read FAQ. Description is in there. Regards, -- Yasuo Ohgaki "jaxon" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The older look was neat to show off to people re: pop up menus, etc., but this is a real speed demon, and will be much more useful for searching around. Speaking of which - there used to be a little HOWTO for doing those kind of popups - does anyone know where it has gone to? regards, jaxon Thanks again! -- 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] Wrapping Text
one thing that would help is to str_replace("\n", "br"); I think textarea has a wrap attribute doesn't it? On Wednesday 04 April 2001 13:20, Chris Anderson wrote: I've been having large problems with this so I decided to ask you guys(and gals ^_^). I have a textarea where you can type your text and it is saved to a file. Then another script includes that. Unfortunately I can't find a way for the textarea to wrap the text, or make it so it shows it they way they typed it in. Any help would be appreciated -- 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] PEAR Standards (was Re: equivalent of asp's %= strTest%)
"shaun" [EMAIL PROTECTED] wrote : I'm pretty sure you can make php use the asp style % though too, not sure if that's for short tags, regular tags or both, I know it's in the config though, anyone know? Info related to the above can be seen here : http://www.php.net/manual/en/language.basic-syntax.php http://www.php.net/manual/en/configuration.php#ini.asp-tags Regarding PEAR standards, I think they're good to teach. For instance, imagine if all written PHP books and tutorials followed such a standard, would that be cool? Yes. From there us PHP minions can do as we choose. A related article is as such (see user comments too) : http://phpbuilder.com/columns/tim20010101.php3 Regards, Philip -- 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] odd cookie behaviour
I think you might wanna check if $cookie is set, not $cookie[0], if that doesn't work just check if $cookie[0] = 0 -Shaun On Saturday 07 April 2001 21:10, matt thompson wrote: hey, i'm designing a small shopping cart w/ cookies where the cookie is used as an array (the array id being the product id) and the array value being the number of items selected. anyways, for the most part everything works fine, but with certain items if they're added to the cart, they get added, but unfortunately do not display in the cart until a few other items are added (the quantity of that product continues to increase regardless of whether or not it's shown in the cart). i have absolutely no idea why this is happening, and feel like i've tried most things that have come to mind. my cookie is being set like: if (!isset($cookie[0])) setcookie("cookie[0]", "0"); i do not have a product w/ id of zero (0), so i use that as the default id / value to set the cookie with. any suggestions _at_all_ would be appreciated. :) thanks, 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] PHP asp
I guess this one is quite interesting... http://www.sitepointforums.com/showthread.php?threadid=19417 and the battle begins... -km -- 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] Wrapping Text
Or better yet, use nl2br() : http://www.php.net/manual/en/function.nl2br.php Regarding the html WRAP attribute, this little tutorial looks interesting : http://www.web-wise-wizard.com/html-tutorials/ html-form-forms-textarea-wrap.html (note: it's one link, had to split up as it's so long!) Regards, Philip On Sat, 7 Apr 2001, shaun wrote: one thing that would help is to str_replace("\n", "br"); I think textarea has a wrap attribute doesn't it? On Wednesday 04 April 2001 13:20, Chris Anderson wrote: I've been having large problems with this so I decided to ask you guys(and gals ^_^). I have a textarea where you can type your text and it is saved to a file. Then another script includes that. Unfortunately I can't find a way for the textarea to wrap the text, or make it so it shows it they way they typed it in. Any help would be appreciated -- 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] Checking the REFERER
There really isn't a way to be truly sure. You might not even need to be in the first place. If for instance you have a login page that will display an error message ff the login data was invalid, but if someone just typed in the address to the login page you don't want to show that error message or even check to see if it's valid, you can do a few things. For one thing you can give the "submit" button on your form a name attribute, so that it will send it's value with the form if someone uses it. So then you can just check if that data was submitted. But that doesn't stop anyone from just including "?submitbutton=Submit" into the title. One thing you can do is use some crypt function on the current unix timestamp, and include that data onto the form. Then have your login page decrypt the data, and ensure that is recent enough to be considered valid. That way you can ensure someone is using the newest version of your form, and if someone is trying to fake you out then they can only do it for a few hours before having to remake the fake form. Since they can never guess what the crypted string will be, then they will have to try and do it either manually or dynamically. If you get creative you can stop them from doing that, but... If you really have to be _that_ sure that a user is physically using your form, then your application is probably too unsecure, and it's design needs to be altered. -- Plutarck Should be working on something... ...but forgot what it was. "Jochen Kaechelin" [EMAIL PROTECTED] wrote in message NFBBLHGFAKNLFNPOHMPHOEKLCFAA.jk@intern">news:NFBBLHGFAKNLFNPOHMPHOEKLCFAA.jk@intern... Waht might be the most secure method to check, if a certain page was reached by submitting a form instead of typing the adress directly? I read, the the $HTTP_REFERER may be changed, e.g. when WEBWASHER or other programs are in use! Pleas help! Thanx -- Jochen Kaechelin - Ihr WEBberater Stuttgarter Str.3, D-73033 Goeppingen Tel. 07161-92 95 94, Fax 07161-92 95 98 http://www.wa-p.de, 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]
Re: [PHP] PEAR Standards (was Re: equivalent of asp's %= strTest %)
As long as PEAR standars are enforced ONLY for the PEAR library, then it's ok. It makes it alot easier to read such code if all of it's contents use the same style. But when they try to reach over and make all applications do it, then it's too far. But I don't see them trying to do that. When PEAR says not to use short-tags, they aren't saying it just becase they "prefer that style". They say it for this exact reason. The standard tags work great with XML, but with short tags xml may break. ASP tags should be avoided, because what if your application get's installed on a server that supports ASP? So your PHP code get's passed to an ASP parser, and it gets all confused, and it could accidentally totally screw up your app and open a security hole. Don't look at PEAR as trying to set standards for _you_. Look at the standards as for PEAR library content, and ask why they say such things. For instance, when they say not to use 4 spaces (or was it 3?) instead of tabs? I think that's stupid, and I don't do it. But they did it for a reason, even if I don't understand it. I will abide by it if I want my stuff included in PEAR, but in my own apps I keep using tabs (it's easier to use backspace/delete on a tab, for one thing). PEAR servers a valuable role as instructor. You may never have thought there was a reason to add that extra "php" on your opening tag, but now you know why they reccommend it ;) Let's not try and restrict what the developers of an entirely seperate standard (XML) do with their code just so we can avoid writing our code like it was intended to be written :) As long as PEAR is a restriction on PEARlib content, and just a suggestion to everyone else, then PEAR is great. If PEAR trys to force me to use their standards in my programming in any way, then they've become "code police", and we sure as heck don't need that. Remember, PHP is a "loosely typed" language. That's why I like it. However I often treat it as strictly typed to ensure I don't create any errors, but I like having that choice to just be "loose". Ya know? -- Plutarck Should be working on something... ...but forgot what it was. ""Dean Hall"" [EMAIL PROTECTED] wrote in message 9ao32a$n7v$[EMAIL PROTECTED]">news:9ao32a$n7v$[EMAIL PROTECTED]... I have some problems with the PEAR "standards", and I'm wondering what others have to say about what the PHP developers are doing to overcome PHP's obvious shortcomings. bitch moan It seems that one obvious improvement to be made to PHP would be the implementation of real namespaces. It seems pretty simple to implement this and stay backwards compatible with PHP3/4. Does anyone know if plans are in the work for this? The PEAR standards try to make up for the lack of namespaces . . . and I suppose its the best that can be done, but it's simply awful! It not only proposes a standard, it proposes to mandate naming conventions and coding style as well! I think the PHP developers should look to the example that Perl has set for graceful, non-obtrusive namespaces that don't enforce coding style or naming conventions for classes. (I mean, I don't have to name a subclass of "DB" "DB_mysql" -- it can be "DB::Mysql".) /moan /bitch "Michael Kimsal" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If the people defining the PEAR standards really were that interested in standards, why include alternate ways of doing something? ?=$blah;? And if the 'short tag' method is useful enough for people, why 'exclude' it from a standard? This notion of 'PEAR standards' does irk me some, because it's been so long in coming, and people are deferring to it before it's a reality. First of all, I think that the PEAR folk are on a different endeavor than the PHP developers. The PEAR people seem to be trying to propose a good standard for a language that needs some improvement. They're doing a decent job, but I think PEAR should wait till PHP matures a bit. Second, there is one very good reason not to use short tags: XML. All the same, I'd rather just enable ASP tags than do away with short tags, as short tags are irreplacable in templates rich in content and sparse on code. My $0.02. Dean Hall. http://hall.apt7.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 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] image validation
I'm wondering if there is any sure way for PHP to determine whether an uploaded file is definitely an image file. I have a script that checks for size and mime type ('image/png' or 'image/jpeg'). The script works fine, but I've heard that it is possible to add those mime type headers to files that aren't images at all, and possibly something mailicious. Mick -- 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 asp
Bah. No matter how fast I read, by the time I get to the end of a page a new page has filled with comments. I'd say something witty about TIMTOWTDI, microwaves, and what a drunk sorrority girl has in common with R2D2, but I can't get to the end of the friggin' thread! It never ends! *cries* -- Plutarck Should be working on something... ...but forgot what it was. ""Kittiwat Manosuthi"" [EMAIL PROTECTED] wrote in message 008f01c0bfd5$9b78d320$3d88aacb@notebook">news:008f01c0bfd5$9b78d320$3d88aacb@notebook... I guess this one is quite interesting... http://www.sitepointforums.com/showthread.php?threadid=19417 and the battle begins... -km -- 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] Cookie Expire Problem
The problem is that it is too far in the future. Your cookie is set to expire in the year 2280. You think that's a little overkill? And it runs into the UNIX-style Y2K problem which is...um...13 years from now? Well anyway... Make your cookie's expire time a little more reasonable. Like 5 years from now, which is this many seconds: 15768 So set it to time()+15768 If someone has your cookie on their machine in the year 2280 and gets pissed that their login failed when it shouldn't of, don't worry about it. You'll be dead, too feeble to care, or a god for creating an application that still works after 270 years ;P -- Plutarck Should be working on something... ...but forgot what it was. ""Jeff Oien"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... This code won't set a cookie. I took the time part from a past post to set the time for wy ahead. I must be doing it wrong though: $time = time(); $cookie_name = "auth"; $cookie_value = "ok"; $cookie_expire = "$time*3"; $cookie_domain = ""; setcookie($cookie_name, $cookie_value, $cookie_expire, "/" , $cookie_domain, 0); Thanks. Jeff Oien -- 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] Segfaults with t1lib
php-4.0.4pl1 compiled with --with-t1lib alternatively segfaults or gives error messages, depending on where you call ImagePsText(). This is the warning: [Sun Apr 8 06:16:57 2001] [error] PHP Warning: libt1 returned error 11 in /var/www/larsi/lib/chart.php on line 493 And this is what apache says when being run under gdb, and php segfaults: GDB 4.16 (i386-redhat-linux), Copyright 1996 Free Software Foundation, Inc... (gdb) run -X Starting program: /usr/local/lib/apache-1.3/bin/httpd-1.3.19-php-4.0.4pl1-oci-xml-ssl-gettext -X Program received signal SIGSEGV, Segmentation fault. 0x40028561 in T1_SetString () at t1set.c:1142 1142} (gdb) bt #0 0x40028561 in T1_SetString () at t1set.c:1142 #1 0x4002e840 in T1_AASetString () at t1aaset.c:741 #2 0x80ba9bb in php_if_imagepstext (ht=12, return_value=0x847e784, this_ptr=0x0, return_value_used=0) at gd.c:2468 #3 0x810ebe5 in execute (op_array=0x83bda24) at ./zend_execute.c:1519 #4 0x810edd9 in execute (op_array=0x83ba734) at ./zend_execute.c:1559 #5 0x810edd9 in execute (op_array=0x834fa7c) at ./zend_execute.c:1559 #6 0x80a4a90 in zend_execute_scripts (type=8, file_count=3) at zend.c:729 #7 0x80b0e28 in php_execute_script (primary_file=0xbb24) at main.c:1221 #8 0x80aeed7 in apache_php_module_main (r=0x833d01c, display_source_mode=0) at sapi_apache.c:89 #9 0x809900a in send_php () #10 0x809903b in send_parsed_php () #11 0x812f886 in ap_invoke_handler () #12 0x813f5ed in process_request_internal () #13 0x813f63b in ap_process_request () #14 0x8138254 in child_main () #15 0x813849f in startup_children () #16 0x8138bf9 in standalone_main () #17 0x8139643 in main () (gdb) I have seen this being reported several times before, but as far as I can see, it hasn't been fixed. Has ImagePsText become unsupported? -- (domestic pets only, the antidote for overdose, milk.) [EMAIL PROTECTED] * Lars Magne Ingebrigtsen -- 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: equivalent of asp's %= strTest %
And if the 'short tag' method is useful enough for people, why 'exclude' it from a standard? Because no matter what installation of PHP you have, this works: ?php echo $var; ? But this: ?=$var? Or this: ? echo $var; ? Or this: % echo $var; % ...is made invalid if short_tags are disabled (and the last only works with ASP tag support, and I'd say 90% of PHP users don't have it enabled). And if the tags are turned off, guess what happens to all the code between those tags? woops ;) And as mentioned, short_tags must be disabled on .xml pages. Or they at least "should" be. While there are work-arounds, if you didn't use short-tags you wouldn't ever have a problem with any standard unless ?php becomes part of their markup, lol. And if it does, they will have to be "dealt with" :) -- Plutarck Should be working on something... ...but forgot what it was. "Michael Kimsal" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Yes yes I'm a zealot. :) If the people defining the PEAR standards really were that interested in standards, why include alternate ways of doing something? ?=$blah;? And if the 'short tag' method is useful enough for people, why 'exclude' it from a standard? This notion of 'PEAR standards' does irk me some, because it's been so long in coming, and people are deferring to it before it's a reality. At least, that's the impression that I get. Philip Olson wrote: 1. Is PHP4+ specific 2. Won't work if short_open_tag setting is off (in php.ini) - One reason to turn this off, to enable XML support 3. Doesn't follow up-and-coming PEAR coding standards And as you've seen, many don't even know what ?= is. You'll find zealots on both sides of this use, the choice is yours. ;-) -- 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] PHP asp
Well.. I forgot to warn that read it "only" when you've free time. Having read though all those made me feel sick, and wanted to stop programming for a year. He he. -km - Original Message - From: "Plutarck" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 08, 2001 10:54 AM Subject: Re: [PHP] PHP asp Bah. No matter how fast I read, by the time I get to the end of a page a new page has filled with comments. I'd say something witty about TIMTOWTDI, microwaves, and what a drunk sorrority girl has in common with R2D2, but I can't get to the end of the friggin' thread! It never ends! *cries* -- Plutarck Should be working on something... ...but forgot what it was. -- 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] configure not doing anything and file not found
I'm trying to compile PHP version 4.0.4pl1 (module and/or cgi) on my windows 98 system using Microsoft Visuall C++, and I have two "little" problems. For one thing, doing anything like this in my DOS prompt: ./configure ./configure --with-mysql configure /configure et al ...returns: Bad command or file name. I've heard that means that "Dev Tools" aren't on my system, which is why "make" or "make install" didn't do anything. But I installed cygwin utilities and UnxUtils. I also have Active Perl installed on my system. So what do I need to do to get such commands to do what they are supposed to? And I'm not sure if this is related, but when I try to compile the source code as an apache module I get: fatal error C1083: Cannot open source file: 'C:\php-4.0.4pl1\Zend\zend_language_scanner.cpp': No such file or directory Seing as how there are no .cpp files in the source code from php.net, I imagine it would be hard to find that file ;) I'm using this article for instruction: http://www.mm4.de/php4win/article.php3?id=2language=en -- Plutarck Should be working on something... ...but forgot what it was. -- 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] submitting to a remote form
I have a remote php script on a remote server that I need to submit information to. Does PHP have the ability for me to submit information remotely? J Say I'm Hot! - Post Your Picture! http://www.sayimhot.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]
Re: [PHP] Segfaults with t1lib
[EMAIL PROTECTED] (Lars Magne Ingebrigtsen) writes: php-4.0.4pl1 compiled with --with-t1lib alternatively segfaults or gives error messages, depending on where you call ImagePsText(). I don't know anything about php's internals, but since 4.0.3 worked, and 4.0.4pl1 didn't I just compared the two versions of the function. The following patch fixes the segfault problem for me: --- gd.c~ Wed Nov 29 16:25:42 2000 +++ gd.cSun Apr 8 06:45:44 2001 @@ -2390,6 +2390,7 @@ if (zend_get_parameters_ex(12, img, str, fnt, sz, fg, bg,\ px, py, sp, wd, ang, aas) == FAILURE) { RETURN_FALSE; } + convert_to_string_ex(str); convert_to_long_ex(sp); convert_to_long_ex(aas); convert_to_long_ex(wd); The other problem (the warning) was due to me calling ImagePsText with a non-integer px or py parameter. I'm guessing it's a bug that gd.c doesn't coerce those parameters to integers, but I leave that to others to fix. -- (domestic pets only, the antidote for overdose, milk.) [EMAIL PROTECTED] * Lars Magne Ingebrigtsen -- 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] unable to run lynx from exec or passthru
Hi! i have php as an apache mod. i want to exec lynx from php. but when i have typed the following command exec("lynx http://mywebsite.com"); OR passthru("lynx http://mywebsite.com"); it simply does not show any output, just a blank page. I think its the prb of permission. Please help me how can i configure it to work for me. Junaid Mansoor _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] putting a list of data into 3 columns?
This is exactly what I sent you. You have to realize that you can't print down one column, and then start a new one. You have to print across, left to right before you go down. You have to modify the print statement to put it into a table, but that is easy: Print should be: printf("trtd%s/tdtd%s/tdtd%s/td/tr",$items[$i],$items[$i+3], $items[$i+6]); That will print your 3 columns in a table. And it is essentially identical to to what I sent. Just have to modify the format of the printf statement. You can also do it in a regular print statement: Print("trtd$items[$i]/tdtd$items[$i+3]/tdtd$items[$i+6]/td/tr \n"); Or how about a here doc for php4 Print EOF trtd$items[$i]/tdtd$items[$i+3]/tdtd$items[$i+6]/td/tr\n EOF The for loop stays the same, only the print statement changes. Lindsay Adams --- On 4/7/01 4:55 PM, "DRN" [EMAIL PROTECTED] wrote: Lindsay Adams [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... | Assuming your items are in an array | $items =array() //assume a bunch of items in this array | For($i = 0; $i (count($items)/3); $i +=1){ | printf("%s\t%s\t%s",$items[$i],$items[$i+3],$items[$i+6]); | } | | Should print 3 columns of tab separated text. | Note: typed this quickly, untested, but the theory is sound. Might have to | twiddle the $i(count... Section. | | If you have 8 itesm, as shown and you divide by 3 you get 2.xx | So, the the loop will print out: | | $items[0] $items[3] $items[6] | $items[1] $items[4] $items[7] | $items[2] $items[5] $items[8} | // because $items[8] doesn't exist, it won't print. | // if it spits out an error there, put a @in front of printf to turn off | error reporting. | | | On 4/7/01 11:58 AM, "Jack Dempsey" [EMAIL PROTECTED] wrote: | | You don't need to count...in your loop you can do something like this: | if($current_pos%3==0){//then you're at a multiple of three | //code to start new column here | } | | -jack | Neither of these were quite what I was looking for, I was hoping I could make a table with 3 td's side by side, each having a third of the list of products (with br between them). Is this possible? If not I will try to adapt one of these methods. Cheers for your help, Donald -- 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] submitting to a remote form
You can use fopen/fread to open the script remotely. Just append the query string onto the url something like this: www.example.com/example.php?var1=var ...and example.php will have $var1 with the value "var". That's basically like using GET on a form. I believe that's what you wanted to do? -- Plutarck Should be working on something... ...but forgot what it was. ""Joseph Bannon"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a remote php script on a remote server that I need to submit information to. Does PHP have the ability for me to submit information remotely? J Say I'm Hot! - Post Your Picture! http://www.sayimhot.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 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] unable to run lynx from exec or passthru
Most likely, lynx is not in the PATH of the user that the webserver is running as, and may not have permission, if it was. Try telneting in and finding the absolute pathname to lynx, and user that in your exec statement and see what happens. Might also help if you redirected stderr to a file so you could read the error that it encounters when you try to exec lynx in a script. On 4/7/01 10:15 PM, "Junaid MAnsoor" [EMAIL PROTECTED] wrote: Hi! i have php as an apache mod. i want to exec lynx from php. but when i have typed the following command exec("lynx http://mywebsite.com"); OR passthru("lynx http://mywebsite.com"); it simply does not show any output, just a blank page. I think its the prb of permission. Please help me how can i configure it to work for me. Junaid Mansoor _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] odd cookie behaviour
same results. certain items don't immediately show up in the cart until i add numerous other items. it's funny, because some items show up all the time, regardless of what order, etc. they're placed in the cart. very weird. thanks for your help though! "shaun" [EMAIL PROTECTED] wrote in message 01040720420304.01567@box">news:01040720420304.01567@box... I think you might wanna check if $cookie is set, not $cookie[0], if that doesn't work just check if $cookie[0] = 0 -Shaun On Saturday 07 April 2001 21:10, matt thompson wrote: hey, i'm designing a small shopping cart w/ cookies where the cookie is used as an array (the array id being the product id) and the array value being the number of items selected. anyways, for the most part everything works fine, but with certain items if they're added to the cart, they get added, but unfortunately do not display in the cart until a few other items are added (the quantity of that product continues to increase regardless of whether or not it's shown in the cart). i have absolutely no idea why this is happening, and feel like i've tried most things that have come to mind. my cookie is being set like: if (!isset($cookie[0])) setcookie("cookie[0]", "0"); i do not have a product w/ id of zero (0), so i use that as the default id / value to set the cookie with. any suggestions _at_all_ would be appreciated. :) thanks, 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 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]