[PHP] From $25 to Half a Million, As Seen on TV
Dear Friends Future Millionaire:=20 AS SEEN ON NATIONAL TV:=20 Making over half million dollars every 4 to 5 months from your home for=20 an investment of only $25 U.S. Dollars expense one time=20 THANK'S TO THE COMPUTER AGE AND THE INTERNET !=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =20 BE A MILLIONAIRE LIKE OTHERS WITHIN A YEAR!!!=20 Before you say ''Bull'', please read the following. This is the letter you=20 have been hearing about on the news lately. Due to the popularity of=20 this letter on the Internet, a national weekly news program recently devote= d=20 an entire show to the investigation of this program described below, to see= =20 if it really can make people money. The show also investigated whether or=20 not the program was legal.=20 Their findings proved once and for all that there are ''absolutely NO Laws=20 prohibiting the participation in the program and if people can -follow the=20 simple instructions, they are bound to make some mega bucks with only=20 $25 out of pocket cost''. DUE TO THE RECENT INCREASE OF=20 POPULARITY RESPECT THIS PROGRAM HAS ATTAINED,=20 IT IS CURRENTLY WORKING BETTER THAN EVER.=20 This is what one had to say: ''Thanks to this profitable opportunity. I=20 was approached many times before but each time I passed on it. I am=20 so gladI finally joined just to see what one could expect in return for the= =20 minimal effort and money required. To my astonishment, I received total $=20 610,470.00 in 21 weeks, with money still coming in."=20 Pam Hedland, Fort Lee, New Jersey.=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=20 Here is another testimonial: "This program has been around for a long=20 time but I never believed in it. But one day when I received this again=20 in the mail I decided to gamble my $25 on it. I followed the simple=20 instructions and walaa . 3 weeks later the money started to come in.=20 First month I only made $240.00 but the next 2 months after that I made=20 a total of $290,000.00. So far, in the past 8 months by re-entering the=20 program, I have made over $710,000.00 and I am playing it again. The=20 key to success in this program is to follow the simple steps and NOT change= =20 anything.'' More testimonials later but first,=20 =3D=3D=3D=3D=3D PRINT THIS NOW FOR YOUR FUTUREREFERENCE =3D=3D=3D=3D=3D=3D=20 $=20 If you would like to make at least $500,000 every 4 to 5 months easily and=20 comfortably, please read the following...THEN READ IT AGAIN and AGAIN!!!=20 $=20 FOLLOW THE SIMPLE INSTRUCTION BELOW AND YOUR FINANCIAL=20 DREAMS WILL COME TRUE, GUARANTEED! INSTRUCTIONS:=20 =3D=3D=3D=3D=3DOrder all 5 reports shown on the list below =3D=3D=3D=3D=3D=20 For each report, send $5 CASH, THE NAME NUMBER OF THE REPORT=20 YOU ARE ORDERING and YOUR E-MAIL ADDRESS to the person whose=20 name appears ON THAT LIST next to the report. MAKE SURE YOUR RETURN=20 ADDRESS IS ON YOUR ENVELOPE TOP LEFT CORNER in case of any mail=20 problems.=20 =3D=3D=3D When you place your order, make sure you order each of the 5 repo= rts.=20 You will need all 5 reports so that you can save them on your computer=20 and resell them. YOUR TOTAL COST $5 X 5=3D$25.00.=20 Within a few days you will receive, vie e-mail, each of the 5 reports from=20 these 5 different individuals. Save them on your computer so they will be=20 accessible for you to send to the 1,000's of people who will order them=20 from you. Also make a floppy of these reports and keep it on your desk in=20 case something happen to your computer.=20 IMPORTANT - DO NOT alter the names of the people who are listed next=20 to each report, or their sequence on the list, in any way other than what i= s=20 instructed below in step '' 1 through 6 '' or you will loose out on majorit= y=20 of your profits. Once you understand the way this works, you will also see=20 how it does not work if you change it. Remember, this method has been=20 tested, and if you alter, it will NOT work !!! People have tried to put the= ir=20 friends/relatives names on all five thinking they could get all the money. = But=20 it does not work this way. Believe us, we all have tried to be greedy and t= hen=20 nothing happened. So Do Not try to change anything other than what is=20 instructed. Because if you do, it will not work for you.=20 Remember, honesty reaps the reward!!!=20 1 After you have ordered all 5 reports, take this advertisement and=20 REMOVE the name address of the person in REPORT # 5. This person=20 has made it through the cycle and is no doubt counting their fortune.=20 2 Move the name address in REPORT # 4 down TO REPORT # 5.=20 3 Move the name address in
[PHP] Upgrade PHP3 to PHP4
I would like to upgrade PHP3 to PHP4 on my Turbo Linux, does anyone has experience on this? -- best wishes, enethk -- PHP General Mailing List (http://www.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] __FILE__,$PATH_INFO,$PATH_TRANSLATED
Hi, please, would anybody be so kind and tell me what differences are amoung __FILE__, $PATH_INFO and $PATH_TRANSLATED? And in which cases they will have other values? Thanks. Regards, PETER - Tento e-mail byl odesln ze serveru www.worldmail.cz -- PHP General Mailing List (http://www.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] Upgrade PHP3 to PHP4
Hello TOM, (T == "TOM") [EMAIL PROTECTED] writes: T I would like to upgrade PHP3 to PHP4 on my Turbo Linux, does anyone T has experience on this? Not specifically on Turbo Linux, but this may shed some light on the subject: http://www.php.net/version4/migration.php T enethk -Brian -- PHP General Mailing List (http://www.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] mixing HTML and PHP code
"Alex Black" ... the horse is back from the dead! huh? And aside from that, i don't have a one and only common_head.php ... i have a separate plain common head, in plain HTML... the real common_head.php should look like (definitively not real PHP sintax): right, and though this is not directly related to templating: I thik you would benefit greatly by introducing some system design (i.e. separate "layers" doing separate tasks) Why? If nested tables can do the work, i won't bother learning how layers work... I don't like to do database connections when I've already output markup, what if something goes wrong, or I want to do a redirect, etc? If something goes wrong - It's the DBA fault. :-) I like to access functions in "DB Object" files - those functions return results in arrays which I can pass into markup. Makes the code a _helluvuh_ lot more maintainable. I'm pretty comfortable programming directly with OCIwhatever() functions directly in the main code, that's it. In other words, i don't need to make my code more maintainable because i'm comfortable with maintaining it right now. True, but why not just bitch at macromedia until they include support for PHP in ultradev? (Well, i haven't purchased dreamweaver either) (plegh, visual authoring tools: a necessary evil) Why, when you have notepad.exe and a couple of browsers to test that the pages work properly? -- PHP General Mailing List (http://www.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] tie string value together
"Brian Clark" ... Not quite; you want the concatenation operator: $Birthdate = $year . $month . $day; /* assuming day was a typo */ This will also work: $Birthdate = "$year$month$day"; As i know, databases use a 00/00/ date format, so the thing you may do is $birthdate = $day . "/" . $month . "/" . $year; or $birthdate = "$day/$month/$year"; But you should refer to your database's documentation, i'm not sure it's always true. -- PHP General Mailing List (http://www.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] __FILE__,$PATH_INFO,$PATH_TRANSLATED
__FILE__ is the filename of the current file being parsed. This can change around as the php script includes other files. It is mostly used for printing out information on where an error occurred. $PATH_INFO is the part of the URI after the script. ie. www.php.net/test.php/whatever/blah In this case $PATH_INFO would be /whatever/blah $PATH_TRANSLATED is $PATH_INFO translated to an absolute file path on the file system. So something like /var/web/whatever/blah for the above example. -Rasmus On Mon, 15 Jan 2001 [EMAIL PROTECTED] wrote: Hi, please, would anybody be so kind and tell me what differences are amoung __FILE__, $PATH_INFO and $PATH_TRANSLATED? And in which cases they will have other values? Thanks. Regards, PETER - Tento e-mail byl odeslán ze serveru www.worldmail.cz -- PHP General Mailing List (http://www.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] hello
Hi Herb, PHP is wonderful. Regarding any upgrade issues, check out : http://www.php.net/FAQ.php#11 http://www.php.net/version4/migration.php http://www.opendeveloper.org/PHP/HowTo/Upgrading_From_PHP3_to_PHP4/ AFAIK, it *won't* cause problems upgrading. Do be sure to parse the current extension though (i.e. be sure to keep .php3 within httpd.conf) For information on all this check out : http://www.e-gineer.com/instructions/ http://www.php.net/manual/en/install.unix.php Doing it at 3am is suggested and giving users some warning just in case :-) Regarding learning php, there are some main sites to consider for learing : http://www.devshed.com/ http://www.phpbuilder.com/ http://www.zend.com/ http://php.faqts.com/ There are others (and others). Like for instance : http://php.faqts.com/ http://www.thickbook.com/ http://www.weberdev.com/ http://www.google.com/ http://www.google.com/ http://www.google.com/ Regarding books, the wrox books are popular, check them out. The php site lists books and by purchasing there money goes to PHP effort, list is here : http://www.php.net/books.php And you will need to know SQL, here is a basic tutorial : http://www.sqlcourse.com/ And if you want to know my favorite php tutorial that I wish all php users would consider and print out it is as follows : http://www.zend.com/zend/tut/using-strings.php And remember, practise makes perfect this is so very true. Nobody is perfect and we've all written crappy code in the past (and present) so it's okay. And, nobody memorizes the manual, keep this in mind. It's a reference/tool. It is very valuable and contains many useful friendly examples. At least skimming through it and working the examples through (if not code, at least in head and say to self "ah, that makes sense") it is important as in the future when one wants to do something the brain will think "hmm, I've read about this once before" and thus one searches the manual and finds. Also, searching the mailing list is very important, use one or two specific words that are sure to exist in question. It is okay to ask questions but odds are someone else has asked a similar question in past, an archive is found here (google also keeps this archive!!!): http://marc.theaimsgroup.com/?l=php-general It is very useful to add this and php site to browser "command line" and instruction on this can be found here : http://www.php.net/tips.php That's what comes to mind at this point, hopefully this rambling email makes sense. Just remember, start small. Build an addressbook. After that, add features to it like make sure user inputs real data (not blank (empty), is x characters in length (strlen) or is an email address (ereg). Then make users name in addressbook apear with First Letter Capitalized (ucwords) and so on, so forth. Also, be sure to research, it is very useful to do. If one wants to do something odds are there is a function to do it or a function was created to help do it. For scripts, look here : http://www.hotscripts.com/ http://px.sklar.com/ http://www.freshmeat.net/ http://www.sourceforge.net/ And through all that all will be good. This now concludes this post, good luck! Philip -- Philip Olson http://www.cornado.com/ On Mon, 15 Jan 2001, SuiteNet Operations Manager wrote: I was wondering what Im sure a well knowledged php expert like your self would recommend a hands on php crash course. The best way for me to jump right in to understanding php and getting started making my first data base. with php3 and mysql. I understand that is how you have to do it. See Im running a apache server that my father started. And up to this point have been working with basic cgi stuff and dealing with tech support and minor web design. But I need to get into data base stuff and the only way Im going to be able to make something like a shopping cart or anything of that nature is to learn. My father knew allot of this stuff but Un fortunately he past away and Im stuck. So any suggestions would be great and can I count on you to answer any questions I might have. I have been going to the php.net site. And are starting there. Thank you and god Bless. Ps. Any books you think would be my best start. Im pretty good at picking things up but I have never messed with php3 either. I also Know about php4 but I have users I guess up till now are using php3 will this change what the are doing and continuing to do. I mean do they have learn and change everything to or is it I except everything till now and then more of what php4 offers too. Im not sure how that works. I do not want to change anything on the server UN LESS IM VERY VERY SURE Ok well I thank you so much. -- Regards Herb McDonald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
RE: [PHP] Problem with Exec()
| | It should also be noted that the system interaction functions (namely, | passthru(), exec(), system() and popen()) are | broken/incorrectly implemented, | actually, its windows that's incorrectly implemented, but be | that as it may, the | functions do not work with windows). Well, I guess that clears that up... cheers Mr. Gates | | To the original poster: | Hello | Use PHP's built-in mail() function instead, don't fork | out to sendmail, | actually, better yet, use linux :-). I spotted the mail() function about ten minutes after I posted... (and I would be on a linux box if I could persuade my boss) Cheers Jon -- PHP General Mailing List (http://www.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] variable size limit?
I'm generating a page of HTML by reading an entire page of HTML source into a variable, and then doing various functions and str_replace on the variable. However when I finialy write this out to a file the variable containing the HTML source is truncated, at about 5800-ish bytes. Is there a limit of the amount of data a variable can store? Or is there a better way to manipulate the text in file? It seems that when I did my fread, I was using the wrong filename in the filesize function. Therefore The file was being read into the variable and getting truncated at the incorrect limit. -- Andrew -- PHP General Mailing List (http://www.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 php_string.h
zeevMon Jan 15 02:48:48 2001 EDT Modified files: /php4/ext/standard php_string.h Log: Nuke a couple of warnings Index: php4/ext/standard/php_string.h diff -u php4/ext/standard/php_string.h:1.32 php4/ext/standard/php_string.h:1.33 --- php4/ext/standard/php_string.h:1.32 Sun Jan 14 08:36:30 2001 +++ php4/ext/standard/php_string.h Mon Jan 15 02:48:48 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_string.h,v 1.32 2001/01/14 16:36:30 elixer Exp $ */ +/* $Id: php_string.h,v 1.33 2001/01/15 10:48:48 zeev Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -79,6 +79,12 @@ PHP_FUNCTION(substr_count); PHP_FUNCTION(str_pad); PHP_FUNCTION(sscanf); + + +#if defined(HAVE_LOCALECONV) defined(ZTS) +PHP_MINIT_FUNCTION(localeconv); +PHP_MSHUTDOWN_FUNCTION(localeconv); +#endif #define strnatcmp(a, b) \ strnatcmp_ex(a, strlen(a), b, strlen(b), 0) -- 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] regular expression
On Monday 15 January 2001 09:03, Fai wrote: ^.+@.+\\..+$ This regular expression can check if the email address is valid. But it cannot validate the email address with two "@", does I use this code: /* * Check whether the supplied string is a * (syntactically) valid email address * Only does a very rough check. Checking for complete * validity is nearly impossible. */ function pbIsMailAddress ($Address) { // strip comments while (preg_match ('/\([^()]*\)/', $Address)) $Address = preg_replace ('/\([^()]*\)/', '', $Address); // strip leading/trailing whitespace $Address = trim ($Address); // check for basic form return preg_match ('/^[^@]+@[\w-]+(\.[\w-]+)+$/', $Address); } -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "Software is like sex: the best is for free" -- Linux Torvalds -- PHP General Mailing List (http://www.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] Modifying arrays
How do I modify the value of the current element of an array? -- Catalin Borcea -- \\\|/// \\ - - // ( @ @ ) -oOOO(_)OOOo -- PHP General Mailing List (http://www.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 /main php_globals.h php_ini.c
zeevMon Jan 15 02:52:02 2001 EDT Modified files: /php4/main php_globals.h php_ini.c Log: - Remove the ini_extension_list global - Switch to delayed loading of Zend extensions Index: php4/main/php_globals.h diff -u php4/main/php_globals.h:1.60 php4/main/php_globals.h:1.61 --- php4/main/php_globals.h:1.60Sun Jan 14 19:21:05 2001 +++ php4/main/php_globals.h Mon Jan 15 02:52:02 2001 @@ -124,8 +124,6 @@ zend_bool during_request_startup; zend_bool allow_url_fopen; - - zend_llist ini_extension_list; }; Index: php4/main/php_ini.c diff -u php4/main/php_ini.c:1.48 php4/main/php_ini.c:1.49 --- php4/main/php_ini.c:1.48Sun Jan 14 19:21:05 2001 +++ php4/main/php_ini.c Mon Jan 15 02:52:02 2001 @@ -28,6 +28,10 @@ static HashTable configuration_hash; PHPAPI char *php_ini_opened_path=NULL; +typedef struct _php_extension_lists { + zend_llist engine; + zend_llist functions; +} php_extension_lists; static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type) { @@ -117,7 +121,7 @@ } } -static void php_config_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg) +static void php_config_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, +php_extension_lists *extension_lists) { switch (callback_type) { case ZEND_INI_PARSER_ENTRY: { @@ -128,18 +132,19 @@ } if (!strcasecmp(Z_STRVAL_P(arg1), "extension")) { /* load function module */ zval copy; - PLS_FETCH(); copy = *arg2; zval_copy_ctor(copy); copy.refcount = 0; - zend_llist_add_element(PG(ini_extension_list), copy); + +zend_llist_add_element(extension_lists-functions, copy); } else if (!strcasecmp(Z_STRVAL_P(arg1), ZEND_EXTENSION_TOKEN)) { /* load Zend extension */ - zend_load_extension(Z_STRVAL_P(arg2)); + char *extension_name = +estrndup(Z_STRVAL_P(arg2), Z_STRLEN_P(arg2)); + + +zend_llist_add_element(extension_lists-engine, extension_name); } else { zend_hash_update(configuration_hash, Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, arg2, sizeof(zval), (void **) entry); Z_STRVAL_P(entry) = zend_strndup(Z_STRVAL_P(entry), Z_STRLEN_P(entry)); - } + } } break; case ZEND_INI_PARSER_SECTION: @@ -147,13 +152,19 @@ } } -static void php_apply_ini_extension_list(void *dummy) + +static void php_load_function_extension_cb(void *arg) { - zval *extension = (zval *) dummy; + zval *extension = (zval *) arg; zval zval; php_dl(extension, MODULE_PERSISTENT, zval); - zval_dtor(extension); +} + + +static void php_load_zend_extension_cb(void *arg) +{ + zend_load_extension(*((char **) arg)); } @@ -164,13 +175,15 @@ char *open_basedir; int free_ini_search_path=0; zend_file_handle fh; + php_extension_lists extension_lists; PLS_FETCH(); if (zend_hash_init(configuration_hash, 0, NULL, (dtor_func_t) pvalue_config_destructor, 1)==FAILURE) { return FAILURE; } - zend_llist_init(PG(ini_extension_list), sizeof(zval), NULL, 1); + zend_llist_init(extension_lists.engine, sizeof(zval), free_estring, 1); + zend_llist_init(extension_lists.functions, sizeof(zval), ZVAL_DESTRUCTOR, 1); safe_mode_state = PG(safe_mode); open_basedir = PG(open_basedir); @@ -220,11 +233,14 @@ } fh.type = ZEND_HANDLE_FP; fh.filename = php_ini_opened_path; + + zend_parse_ini_file(fh, 1, php_config_ini_parser_cb, extension_lists); - zend_parse_ini_file(fh, 1, php_config_ini_parser_cb, NULL); + zend_llist_apply(extension_lists.engine, php_load_zend_extension_cb); + zend_llist_apply(extension_lists.functions, php_load_function_extension_cb); - zend_llist_apply(PG(ini_extension_list), php_apply_ini_extension_list); - zend_llist_destroy(PG(ini_extension_list)); + zend_llist_destroy(extension_lists.engine); + zend_llist_destroy(extension_lists.functions); if (php_ini_opened_path) { zval tmp; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: [PHP] SMs
On Sat, 13 Jan 2001, Dhaval Desai wrote: Hi Dhaval, I am trying to build a SMS(Short message service) It is really very simple as long as you have a tie up with SMSC (usually a mobile phone service operator) Then all you have to do is (in most cases) send a specially formatted email to the SMSC the email address is usually [EMAIL PROTECTED] mesaging system..can anybody tell me what are the requirements for this... For developement purposes visit http://www.gnokii.org Cheers Tarique -- = B2B Application Providers http://www.sanisoft.com Vortal for Nagpur http://nagpurcity.net = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Session cookies appearing where there is no session
This must sound pretty far-fetched, but as far as I can tell, my site is attempting to set a session cookie from any and all PHP pages, even when the page has no calls to session_* functions and where there were also no previous visits to pages with such calls. Where is the setting that is initializing these unneccessary sessions and sending the cookies? I looked for something in php.ini or phpinfo() to explain it, but came up empty. Below are excerpts from a phpinfo() dump. I wondered about that "session.use_trans_sid", but there's no reference to it in my php.ini file (yes, I checked that phpinfo says I'm looking at the correct one) and I also cannot find anything about it in the PHP.net online docs. What does that setting do, and where is it configured? TIA begin excerpts from phpinfo() Directive Local Value Master Value assert.active 1 1 assert.bail 0 0 assert.callback no value no value assert.quiet_eval 0 0 assert.warning 1 1 safe_mode_allowed_env_vars PHP_ PHP_ safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH session.use_trans_sid 1 1 session Session Support enabled Directive Local Value Master Value session.auto_start On On session.cache_expire 60 60 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.entropy_file no value no value session.entropy_length 0 0 session.gc_maxlifetime 1800 1800 session.gc_probability 1 1 session.name SID SID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies On On snip HTTP Response Headers Set-Cookie SID=0c6a1e4a46c8d9d840ac865d4a9d8e6f; path=/ Expires Thu, 19 Nov 1981 08:52:00 GMT Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma no-cache snip -- CC -- PHP General Mailing List (http://www.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] Templates
andrew wrote: Sure, My understanding of templating engines 1.array or item is assigned to a variable 2.php placeholders in a html page match in name to above variable. 3.a parser separate from php subsitutes the variable values set in (1) into (2) I've seen plenty of examples where there is a file containing lists of variable to item assignment, and thase files are passed to a one of a few template pages for layout. There must be a way to pass the result set of an SQL query into the set of placeholders - the end result would be that you could call whole sites via simple queries. All you have to pass in would be the SQL parameter. i.e. Table named 'Pvalues' Pvalues Sample Row -- page_id contactus.html page_name Contact Us page_title Contact US header_text Please send an email body_text [EMAIL PROTECTED] footer_text thanks! Check out http://www.scripps.edu/~jesusmc/cachedtpl/CachedTemplate.html by Jesus M Castagnetto. His class solves the problem with caching templates for all the template classes he has found. One of those he found was a class called XTemplates, that class have some very good functions, you could write this in your templae page: {Pvalues.page_id} and in the php page you could assign the result set directly to Pvalues, and all items called Pvalues.something would be filled out with the column of the same name. The only drawback of XTemplates is that it adds some extra spaces to the output, which on large pages might amount to quite a bit, but since you're complentating working something like this out, you might instead rewrite this class to remove that bit of a problem. (I haven't had the time to track the bug down myself.) Some timings I've made have shown that XTemplates on a large result set seems to be only 10% slower than the templates which comes with PHPLib, which is pretty good. Finally it is much easier to use and initalize than any template engine I've tried. -- Paul K Egell-Johnsen Developer/PR Manager zez.org: about code http://zez.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] hello
subscribe
[PHP] Regex for telephone number
Hi! Can someone help me out with a regex to validate a phone number? Thanks Vikram -- PHP General Mailing List (http://www.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] kevin@intuitive.net
subscribe
[PHP-CVS] cvs: php4 /ext/mhash mhash.c
eschmid Mon Jan 15 04:01:35 2001 EDT Modified files: /php4/ext/mhash mhash.c Log: Some protos fixed. Index: php4/ext/mhash/mhash.c diff -u php4/ext/mhash/mhash.c:1.24 php4/ext/mhash/mhash.c:1.25 --- php4/ext/mhash/mhash.c:1.24 Wed Nov 22 13:52:53 2000 +++ php4/ext/mhash/mhash.c Mon Jan 15 04:01:34 2001 @@ -75,8 +75,8 @@ return SUCCESS; } -/* {{{ proto int mhash_count() - get the number of available hashes */ +/* {{{ proto int mhash_count(void) + Gets the number of available hashes */ PHP_FUNCTION(mhash_count) { RETURN_LONG(mhash_count()); @@ -85,7 +85,7 @@ /* }}} */ /* {{{ proto int mhash_get_block_size(int hash) - get the block size of hash */ + Gets the block size of hash */ PHP_FUNCTION(mhash_get_block_size) { pval **hash; @@ -103,7 +103,7 @@ /* }}} */ /* {{{ proto string mhash_get_hash_name(int hash) - get the name of hash */ + Gets the name of hash */ PHP_FUNCTION(mhash_get_hash_name) { pval **hash; @@ -127,8 +127,8 @@ /* }}} */ -/* {{{ proto string mhash(int hash, string data, [string key]) - hash data with hash */ +/* {{{ proto string mhash(int hash, string data [, string key]) + Hash data with hash */ PHP_FUNCTION(mhash) { pval **hash, **data, **key; @@ -194,7 +194,7 @@ /* }}} */ /* {{{ proto string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes) - generate a key using hash functions */ + Generates a key using hash functions */ /* SALTED S2K uses a fixed salt */ #define SALT_SIZE 8 PHP_FUNCTION(mhash_keygen_s2k) -- 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] Sessions
Randy Johnson [[EMAIL PROTECTED]] wrote: Hello, I was going to use sessions to save a logged in variable so if the user logged in with a username and password I checked for the session variable and if it existed then I could continue. Is there a way for the loggedin session variable to automatically be destroyed after 5 minutes for example? If not what would be another way I could implement the above. Look at your php.ini configuration - specifically session.gc_probability session.gc_maxlifetime they will help you manage sessions and give a lifetime to each session. You can also use a scheduled(cron on *nix) job to remove sessions older than ??? minutes. HTH. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com thanks, Randy -- PHP General Mailing List (http://www.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] Regex for telephone number
At 17:55 15/01/01 +0500, Vikram Vaswani wrote: Hi! Can someone help me out with a regex to validate a phone number? We'd need to know what format of telephone numbers you're looking to validate, first. Angus. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] imap ssl
Is there any IMAP PHP functions using ssl ?? Do I have to just switch the port 143-993 to use ssl or do I have to use specific functions implemented in PHP 4 ?? __ ifrance.com, l'email gratuit le plus complet de l'Internet ! vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP... http://www.ifrance.com/_reloc/email.emailif -- PHP General Mailing List (http://www.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] Regex for telephone number
Hi! Can someone help me out with a regex to validate a phone number? Read the examples at: http://www.php.net/manual/en/function.ereg-replace.php Der Heiko Buchtipp: http://www.aufbruch.com/ Heiko und Gisela Spallek: Aufbruch ins Land der unbegrenzten Moeglichkeiten. Studieren, Arbeiten und Leben in den USA: Tips fuer Neuankoemmlinge 2. erweiterte und ueberarbeitete Auflage: ISBN: 3-934407-01-3 -- PHP General Mailing List (http://www.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] Modifying arrays
try this one.. seems to easy though. Maybe I'm missing something?? ? /* throw a few values into an array */ $my_arr[1]= "ichi"; $my_arr[2]= "ni"; $my_arr[3]= "san"; $my_arr[4]= "shi"; $my_arr[5]= "go"; /* set a variable equal to the current value in the array using pos() */ $curr_val = pos($my_arr); /* set another variable equal to the current key in the array using key() */ $curr_key = key($my_arr); /* for debug's sake, print the variables out */ print($curr_val."\n"); /* returns "ichi" */ print($curr_key."\n"); /* returns "1" */ /* now, use that key variable to change the current value */ $my_arr[$curr_key] = "one"; /* now, reprint the key directly from the array to show it's changed */ print($my_arr[$curr_key]."\n"); ? Cheers, Brad On Mon, 15 Jan 2001, Catalin Borcea wrote: How do I modify the value of the current element of an array? -- Catalin Borcea -- \\\|/// \\ - - // ( @ @ ) -oOOO(_)OOOo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Apache 1.3.14 - PHP-404 - GD-1.3.8 problems
Hi all, I've some strange problems. First i tried to update PHP-403pl1 with PHP-404. PHP was running smoothly on my Apache-1.3.14 but after the upgrade (no compile errors, ./configure okay and no errors at all when compiling PHP-404) i wanted to restart Apache.. it said something like: crc32; undefined reference. and, the /www/libexec/php4lib.so gave a seg. fault when I tried to run it. So, i compiled apache PHP from fresh .tar.gz, but this time, not as DSO, but static. This time, PHP isn't giving any troubles at all, but the compilation of apache gives some errors when trying to compile the PHP4 module... here are they: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- gcc -DLINUX=2 -I/root/source/php-4.0.4 -I/root/source/php-4.0.4/main -I/roo t/source/php-4.0.4/main -I/root/source/php-4.0.4/Zend -I/root/source/php-4.0 .4/Zend -I/root/source/php-4.0.4/TSRM -I/root/source/php-4.0.4/TSRM -I/root/ source/php-4.0.4 -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci` \ -o httpd buildmark.o modules.o modules/standard/libstandard.a modules/php4/libphp4.a main/libmain.a ./os/unix/libos.a ap/libap.a lib/expat-lite/libexpat.a -rdynamic -Lmodules/php4 -L../modules/php4 -L../. ./modules/php4 -lmodphp4 -ldl -lz -lpng -lgd -lresolv -lm -ldl -lcrypt -ln sl -lresolv -lm -lcrypt /usr/local/lib/libgd.a(gd_png.o): In function `gdPngErrorHandler': gd_png.o(.text+0x37): undefined reference to `png_get_error_ptr' /usr/local/lib/libgd.a(gd_png.o): In function `gdPngReadData': gd_png.o(.text+0x95): undefined reference to `png_get_io_ptr' /usr/local/lib/libgd.a(gd_png.o): In function `gdPngWriteData': gd_png.o(.text+0xc5): undefined reference to `png_get_io_ptr' /usr/local/lib/libgd.a(gd_png.o): In function `gdImageCreateFromPngCtx': gd_png.o(.text+0x155): undefined reference to `png_check_sig' ... /usr/local/lib/libgd.a(gd_png.o): In function `gdImagePngCtx': gd_png.o(.text+0x975): undefined reference to `png_create_write_struct' gd_png.o(.text+0x9ab): undefined reference to `png_create_info_struct' ... gd_png.o(.text+0xefd): undefined reference to `png_write_end' gd_png.o(.text+0xf16): undefined reference to `png_destroy_write_struct' collect2: ld returned 1 exit status make[3]: *** [target_static] Error 1 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Does anyone know a solution? please let me know :) My commands to compile: ~/source/php-4.0.4# ./configure --with-apache=../apache_1.3.14 --with-mysql --with-gd --without- ttf -with-ftp ; make ; make install ~/source/php-4.0.4# cd ../apache_1.3.14 ~/source/apache_1.3.14# ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a ; make ; make install I have/try: PHP 4.0.4 Apache 1.3.114 GD 1.3.8 libpng 1.0.8 zlib1.1.3 Linux 2.2.17 Original distro Slackware 7.0 Kees Hoekzema, [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] Perl-like DBI and generic SQL
Dean Hall wrote: I read once on this list that PHP supports a DBI-like database access object (such as the one in Perl). Is this true? Does anyone know where I can find documentation for it? I can't seem to find it in the manual. Also, how do you all handle generic SQL for multiple DBMSs? I'd like (ideally) to write SQL that is DBMS-independent, although that's probably not possible. I'm very familiar with mysql and not much else; as far as I'm aware, mysql is the primary DBMS that has problems with standard SQL (like nested queries and such). Does anyone even worry about this? I'm writing a little piece of software that I'd like to be as extensible as possible and as usable as possible for people using any DBMS, including mysql. Anyway, if I can't find a generic built-in database interface in PHP, it'll all be moot. I'd really rather not use phplib; I'd like to use an interface built in to the interpreter rather than something that's interpreted on every page access. You won't find one. The 'benefit' of PHP is that is, for the most part, uses native db drivers for access to each db. Should be a bit faster and allows access to the specific features of each db. There is a PEAR repository which offers something similar to DBI, afaik, but it's not widely discussed, from what I can see. PEAR is a set of files that comes with a distribution, and there is a README. People on shared host environments may be out of luck here, though, with respect to a README (d/l the file and read it manualyl I guess). "metabase" from manuel lemos purports to be a single interface to multiple dbs - write one SQL statement and it'd do the necessary translation on the SQL to be specific to whatever db you are using. Haven't used it, but heard nice things about it. But, it violates your 'not interpreted' clause. Good luck. Thanks for the help. 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] Unknown number of fields
Hi, I need to be able to reactive an unknown number of fields from a Data Base generated form. How do I handle an unknown number of fields? II can generate a list of all possible fields and try them all but will this generate errors? I will appreciate any help or information. Thanks Shimon Dekel == Shimon Dekel Israeli Vegetable Board Information System Manager 2 Karlibach St Tel-Aviv 67132 [EMAIL PROTECTED] www.yerek.co.il == -- PHP General Mailing List (http://www.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] Unknown number of fields
http://www.php.net/manual/en/function.mysql-fetch-field.php --Joe On Mon, Jan 15, 2001 at 05:27:03PM +0200, Shimon Dekel wrote: Hi, I need to be able to reactive an unknown number of fields from a Data Base generated form. How do I handle an unknown number of fields? II can generate a list of all possible fields and try them all but will this generate errors? I will appreciate any help or information. Thanks Shimon Dekel == Shimon Dekel Israeli Vegetable Board Information System Manager 2 Karlibach St Tel-Aviv 67132 [EMAIL PROTECTED] www.yerek.co.il == -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Joe Stump, PHP Hacker [EMAIL PROTECTED] http://www.miester.org/ -- PHP General Mailing List (http://www.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 15 Jan 2001 14:44:12 -0000 Issue 456
he calls are made. The places you see these warnings. This style is going out of style, in favor of one where you define passing by reference in the function definition. What to do: Change the function calls from: function_whatever( $var1, $var2 ); to function_whatever( $var1, $var2 ); and change the finction definitions from: function function_whatever( $var1, $var2 ) { to: function function_whatever( $var1, $var2 ) { For now, since these are just warnings you could just turn down error reporting, or enable allow_call_time_pass_reference as shown in the warning, but you should seriously consider fixing the problem by changing the code. Someday soon PHP will no longer allow the old syntax at all. For more information see: http://www.php.net/manual/en/html/language.references.html and: http://www.php.net/manual/en/html/features.error-handling.html Rick Widmer Internet Marketing Specialists http://www.developersdesk.com Greeting all, Just now I asked about to tie string values together and would like to thank Jason for that. Anyway one more thing, after I have tied string values together and assigned that to a virables. can I used the value from that variables to compare with another date value? Say another date value I will use is also retrieved from a field in table which is in Date data type as well. So it will be like $query = "select myBirthdate from date where userId='1' "; $dateResult =mysql_query($query); $myBirthDate = (mysql_result($dateResult,0,"myBirthdate")); $thisBirthdate = "$year"."$month"."$day"; if ($thisBirthdate $myBirthdate) { do something } else { do some other thing } Is it the correct way to do that? cheers Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" can I used the value from that variables to compare with another date value? Say another date value I will use is also retrieved from a field in table which is in Date data type as well. When you get into this stuff, it all starts getting a lot more complicated. If you want to compare two fields, make sure they're in the same format. Basically, make sure you use four digit years and two digit months and days to create your birthday fields, so they look like (for example, with today's date, 20010115 instead of 2001115 - that second one could really be anything). If you're sure you're storing the birthdays properly, you can then cut the strings up when you pull them out of the database, the first 4 chars are the year, the next two make the month (regardless of the actual month, this way it'll be "01" not "1"), then the day. Do that for both of the dates. Now, you can use the mktime() command to turn them into unix tiumestamps. $unixtimeme = mktime(myhour, myminute, mysecond, mymonth, myday, myyear); $unixtimethem = mktime(theirhour, theirminute, theirsecond, theirmonth, theirday, theiryear); Now, a unix timestamp is the number of seconds from 00:00:01, Jan 1, 1970. You can figure out the difference in seconds between the two timestamps. Divide it by (24*3600), which is the number of seconds in a day, and there you have the number of days between the dates. Incidentally, if you want to find the number of days between your birthDAYS, then you'll want to substitute in a specific year in the mktime() statements above, as you'll otherwise end up with the number of days between your exact DATES of birth. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! all right, now I have both date values in the same format (/mm/dd), say $Date1 = 20010115 and $Date2 =20010120. If what I want is to find out if $Date1 come before $Date2, can I just use this sniplet below? if ($Date1 $Date2) { ... } else { ... } Do I still need to use mktime() for this purpose? cheers Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" - Original Message - From: Jason Murray [EMAIL PROTECTED] To: 'Jacky@lilst' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, January 14, 2001 11:37 PM Subject: RE: [PHP] date comparison can I used the value from that variables to compare with another date value? Say another date value I will use is also retrieved from a field in table which is in Date data type as well. When you get into this stuff, it all starts getting a lot more complicated. If you want to compare two fields, make sure they're in the same format. Basically, make sure you use four digit years and two digit months and days to create your birthday fields, so they look like (for example, with today's date, 20010115 instead of 2001115 - that second one could really be anything). If you're sure you're storing the birthdays properly, you can then cut the strings up when you pull them out of the database, the firs
Re: [PHP] Date data type problem
This is not possibly - do this on $date2 first: $foo_date2 = str_replace('-',$foo_date2); then if($date1 $foo_date2) { } else { } --Joe On Mon, Jan 15, 2001 at 03:15:38PM -0600, Jacky@lilst wrote: Hi people, I have tried to compare 2 date values to see if one come before another using the sniplet below: if ($date1 $date2) { do something }else{ ... } while $date1 is in "mmdd" format but $date2 is in "-mm-dd" formate because I get value of $date2 from a "date" data type field from a table. Can I use this "-mm-dd" to compare with value from another date variabile in the "mmdd" format? If not possible, How do I make both of them to be in the same format? cheers Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" -- Joe Stump, PHP Hacker [EMAIL PROTECTED] http://www.miester.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]
Re: [PHP] load balancing with php/apache?
I would agree - we started using one at work (the 760 I believe) with 128GB of online RAID 4 storage - YUM! We run a large SUN DB and run our DB straight from the NetApp. NetApp basically rules. --Joe On Mon, Jan 15, 2001 at 10:08:32AM -, Tim Parkin wrote: A NetApp (Network Appliance) is a big RAID that uses multiple scsi drives to create a single transparent volume which, with CIFS (transparent filesystem) can be used by any OS. They are v fast, use NVRAM buffering and can go up to post terabyte storage capacity without worries. Oh and they start at 60k pounds sterling But they are great. Network Attatched Storage at its best (gigabit fibre too) Tim Parkin Didio Communications -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, January 15, 2001 08:39 To: Alex Black; [EMAIL PROTECTED] Subject: Re: [PHP] load balancing with php/apache? Addressed to: Alex Black [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from Alex Black [EMAIL PROTECTED] Sun, 14 Jan 2001 17:16:50 -0800 Whoever said NFS is slow hasn't used a NetApp OK, I'll bite. What is NetApp? Network Appliance? Is this a cache technology, or will it help if I want to transfer 1GB of data with no duplication? Once upon a time I was considering using NFS for backing up my web servers. Then I found it would take over 150 hours per backup over my 56K Frame Relay link. I've got it down to about 46 hours with tar.gz and ftp. It takes most of my sleep time during the week. Rick Widmer Internet Marketing Specialists http://www.developersdesk.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] -- Joe Stump, PHP Hacker [EMAIL PROTECTED] http://www.miester.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] GD Library ??? Where to find.
Please point me to the GD library I cant seem to find it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] GD Library ??? Where to find.
www.boutell.com/gd/ IIRC At 18:26 15.1. 2001, Dallas Kropka wrote the following: -- Please point me to the GD library I cant seem to find it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Fixed: Simple form not passing variables
Thanks!, I was getting bogged down in variable declaration, OOP, etc. This works perfectly: Please enter user name here: FORM INPUT TYPE=text NAME=name INPUT TYPE=submit VALUE=Submit /FORMBR You typed: ? print $HTTP_GET_VARS["name"]; ? Within your configurations, is register_globals on? I try this code and it works just fine. Although if register_globals setting in php.ini is off it will not, try replacing : echo ($name); with print $HTTP_GET_VARS["name"]; And see what happens. If you want $name type variables to register as global, then turn the setting to on. Strangly, iirc, this should be on by default though. The fact that you have name=Bob in url would suggest this to be the "problem". Read about these settings here : http://www.php.net/manual/en/configuration.php#ini.register-globals Philip Olson http://www.cornado.com/ __ 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]
Re: [PHP] problem that has been really annoying me...
First of all check this: print(stripslashes("$num[sub]")); ... should be... print(stripslashes($num['sub'])); That will change the result, but I don't know if it's the result you're going for... One other note of interest... why is your variable named $num? If it was supposed to be a significant number I would understand, but as far as I can tell, it's not... so you might consider changing this to be a little more descriptively named ;) --Toby - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 15, 2001 12:21 PM Subject: [PHP] problem that has been really annoying me... I have a problem which i dont know how to solve my script... $game = "roguespear"; $title = "quepasa??mecasa..."; $num = mysql_query("SELECT * FROM DLtemplates WHERE id='$game'"); $num =mysql_fetch_array($num); print(stripslashes("$num[sub]")); what sub in DLtemplates where id=$game = $title so why does it print $title on the screen and not "quepasa??mecasa..."; any help apprecaited - Peter -- PHP General Mailing List (http://www.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] CyberCash Libraries?
Where can I get the Cybercash Libraries? -nc -- PHP General Mailing List (http://www.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] safe mode in 4.0.4pl1
I'm running PHP 4.0.4pl1 as a CGI under Apache 1.3.14 with suexec. Whenever I turn on safe_mode in php.ini, the following messages appear from a script owned by and running as uid 1013 which is trying to include files owned by uid 1013 in a directory owned by 1013: Warning: SAFE MODE Restriction in effect. The script whose uid is -1 is not allowed to access header.php owned by uid 1013 in archive.php on line 1. Any help would be much 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] load balancing with php/apache?
We used LocalDirector for awhile, with it's 'sticky bit' functionality, and it basically didn't work with AOL. I just looked at the coyote product and they claim it works with 'large ISP' proxies - maybe a veiled reference to AOL directly (why not just say AOL?). from my testing, the "EQUALIZER" (I kind of like how obnoxious the name is, actually :) does in fact work with AOL. Do you have any more info on HOW they do this? The only thing I can think of is that they code it recognize particular IP blocks known to be proxies for AOL/mindspring/etc and route ALL traffic from these to a particular box, which doesn't seem terribly balanced. OR... they drop a separate 'cookie' or similar header data piece between the server and the client and track that. The installation I tested is not large, though, and I did not hit it with more than one client.. in the case of the particular site, it doesn't matter... but I would be interested to know that. Either way, it seems a bit expensive, although cheaper than LD, last time I checked. Yeah, Cisco r' bastards :) At _least_ for the money, their stuff does actually work most of the time. Personally, we do the 'stateless' model with session data in a database - works fine. Your coyote solution is still stateless, but the session data is kept local to the webserver. Yeah, we might end up writing a session handler for binarycloud, probably "switchable" so you can store sessions on the machine re: php.ini, or pipe 'em to your DB. Problem I see with that is that if you need to take a particular machine offline, hundreds of people could lose their session data. Same can be said of taking the database offline, but taking a db offline will probably affect the whole site anyway. Part of the benefit of an intelligent load balancer is that you can remove/take down machines for maintenance/upgrades without worrying about the impact on the visitors. Am I missing something? Nope, not a thing. That is a consequence of the stateless-but-not-quite model. In my case, it's fine. In other cases, it certainly is not :) _alex Alex Black wrote: what? you use an utterly completely stateless model? craziness! so you set cookies, and store the sig in the db? agh! :) I'm using this box from "coyote systems" called, wait for it: "THE EQUALIZER" which is a really obnoxious name, but it sticks clients with a particular server intelligently, so we can be ever-so-slightly-lazy about that. do you _like_ that system? (that isn't a challenge, it's real interest) _a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 -- PHP General Mailing List (http://www.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] hello
My fault for missing the original post... but if this is the discussion I think it is... I'd say if you've already got one language under your belt you can probably learn PHP without too much trouble just by reading the first few chapters of the manual and using the function reference beyond that... If you don't have any prior programming experience, there are some concepts that should probably be taught a little more extensively than the manual covers... you might want to look into online tutorials, published books, etc. --Toby - Original Message - From: "Stephan Ahonen" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 15, 2001 1:13 PM Subject: Re: [PHP] hello I don't know about everybody else, but I learned PHP by taking a simple, pre-existing script and upgrading it to my needs by studying the syntax and putting in new code to do what I wanted it to, always keeping the PHP online manual at my side. By just jumping in like that, I've managed to build an acceptable knowledge of the language in about a month. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DEV] cookies and sessions security
Poor security: log in with a form or basic authentication; set cookie on client with username/password combo (vulnerable to network sniffers, anybody with access to browser's cookie file) Decent security: log in with form or basic authentication; set cookie with session id number and store user information in session database (or session file or in session memory or however your sessions are handled...) (vulnerable to sniffers) Good security: perform auth over a secure connection, set cookie with session id number and store user information (including ip address) in session database (and check ip address for a match before allowing any activity with the session)... (vulnerable to somebody copying a sniffed session id and spoofing the ip address to trick the remote site) Very good: keep the thing on a secure connection all the time, set a session id cookie and keep all user info (possibly including remote ip) in the server's session db... (vulnerable to nothing I can think of at the moment...) There are probably more things you could do I haven't thought of... but this oughta be a decent start ;) --Toby Wow, I never thought of using the remote IP! Thanks for the tip. I am going to use it today for an authentication system I'm building. Kristofer -- __ Kristofer Widholm Web Pharmacy [EMAIL PROTECTED] 191 Grand Street, Brooklyn NY 11211 718.599.4893 __ -- PHP General Mailing List (http://www.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] looping
excuse my density today my brain is still in weekend mode how would I make this loop put 4 or 5 items (haven't decided) per line instead of just one item and the checkbox on each line? snip echo "table border='1' cellpadding='2' cellspacing='2'"; while($myrow = mysql_fetch_array($result2)) { $name = $myrow["name"]; $personal_cost = $myrow["personal_cost"]; $small_cost = $myrow["small_cost"]; $large_cost = $myrow["large_cost"]; $category = $myrow["category"]; echo "tr"; echo "td"; echo $name; echo "/td"; echo "tdinput type=checkbox name=topping value=".$cost."".$cost."/td"; echo "/tr"; } echo "/table"; /snip Jerry Lake -- PHP General Mailing List (http://www.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] simple division.. but how?
if you want to do 10 / 3 i want it to show 3 and not 3.3 how do I control that? - 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] simple division.. but how?
look at the math functions. also, number_format() might be your friend. At 19:53 15.1. 2001, [EMAIL PROTECTED] wrote the following: -- if you want to do 10 / 3 i want it to show 3 and not 3.3 how do I control that? - 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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] CyberCash Libraries?
Nevermind, cybercash.com has an MCK (Merchant Kit) that has the libs in it. Thx, though. -nc --- .:: Nathan Cook- Network/Security Admin office: 208.343.3110 - Web Programmer email: [EMAIL PROTECTED] - Qmail Admin pager: 208.387.9983 - MIS Admin --- - Original Message - From: "ncook" [EMAIL PROTECTED] To: "Php List" [EMAIL PROTECTED] Sent: Monday, January 15, 2001 10:49 AM Subject: [PHP] CyberCash Libraries? Where can I get the Cybercash Libraries? -nc -- PHP General Mailing List (http://www.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] Format a number for Money
Hello Everybody, I want to take a number and echo it with only 2 numbers after the decimal point. I can't remember how to do this but I do remember it was easy. Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.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] simple division.. but how?
$a= intvalue(10/3) echo($a) Cal http://www.calevans.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, January 15, 2001 12:53 PM To: [EMAIL PROTECTED] Subject: [PHP] simple division.. but how? if you want to do 10 / 3 i want it to show 3 and not 3.3 how do I control that? - 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] gif vs png using gd
Hey folks, I've been experimenting with creating some graphics on the fly with GD. So far, so good. However, I've switched ISP's, and their gd doesn't support gifs. I've tried changing the header syntax header("content-Type: image/gif") to header("content-Type: image/png"); and the imagegif to imagepng, and all I get when I try to view the image is a broken quicktime icon. Is there some browser setting I need to change? Thanks in advance, Kelly --- This message was sent using Crocker Communications WebMail. https://webmail.crocker.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] mail() question
Sorry in advance for being redundant. I was unable to find the answer I needed, on the php.net site. We have a mailto form, which uses the mail() funciton. For the most part, it works as intended. All of my headers seem to be coming through intact (To, From, Reply-To, Return-Path, Error-To, etc). However, if the message should bounce, it always bounces back to nobody. When we want it to bounce back to say, rch instead. Can any offer a possible solution here? TIA -- Robert Hough ([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] mail() question
Your Return-Path: header should have that email address. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more Get your own Free, Private email at http://www.smackdown.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "body" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, Robert Hough wrote: Date: Mon, 15 Jan 2001 15:13:42 -0500 (EST) From: Robert Hough [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] mail() question Sorry in advance for being redundant. I was unable to find the answer I needed, on the php.net site. We have a mailto form, which uses the mail() funciton. For the most part, it works as intended. All of my headers seem to be coming through intact (To, From, Reply-To, Return-Path, Error-To, etc). However, if the message should bounce, it always bounces back to nobody. When we want it to bounce back to say, rch instead. Can any offer a possible solution here? TIA -- Robert Hough ([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] 4.0.4 Postgres link resource bug?
Hi, I have a script that worked up until I upgraded the server from PHP 4.0.2 to 4.0.4. I get: 1 is not a valid PostgreSQL link resource. Why is this broken all of a sudden? here is some code: function SQLCall($call){ global $psqlhost, $psqldb, $rows, $result; $db_connect=pg_connect("host=$psqlhost dbname=$psqldb"); $result=pg_exec($db_connect, "$call"); $rows=pg_numrows($result); } $call="insert into agents (fname, lname, address, city, state, zip, email, country, homephone, workphone, company, username, password, created, visits, fax, status, pridomain, title) values ('$fname', '$lname', '$address', '$city', '$bizstate', '$zip', '$email', '$country', '$homephone', '$workphone', '$company', '$username', '$cryptpass', '$created', $visits, '$fax', '$status', '$pridomain', '$title')"; SQLCall($call); include("results/newagent.php"); This (bug?) seems to only affect INSERT calls to pg_sql. The functions within the script which use UPDATE sql calls (using the same SQLCall($call) function in this script work fine. Any ideas? Thanks, Kris -- PHP General Mailing List (http://www.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() question
I understand. So, does $sender_address have the email address that you want it returned to? You didn't specifically say this, that is why I asked. If you actually get the mail sent on the internet, and the headers contain explicit instructions, then the mail has no choice but to return to who you specify in the Return-Path:. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more Get your own Free, Private email at http://www.smackdown.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "body" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, Robert Hough wrote: Date: Mon, 15 Jan 2001 15:27:06 -0500 (EST) From: Robert Hough [EMAIL PROTECTED] To: jeremy brand [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() question On Mon, 15 Jan 2001, jeremy brand wrote: Your Return-Path: header should have that email address. Thanks, but as stated in my post, all of my headers Return-Path included, are coming through correctly. Here is what I am using for my headers, is there something missing here? $headers .= "From: $sender_name $sender_address\n"; $headers .= "X-Sender: $sender_address\n"; $headers .= "X-Mailer: $version\n"; $headers .= "Return-Path: $sender_address\n"; $headers .= "Error-To: $sender_address\n"; -- Robert Hough ([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] Zend Optimizer
--- Marcus Ouimet [EMAIL PROTECTED] wrote: I have download the Zend Optimizer (Running Apache 1.3.14 and PHP 4.04) and untarred it. Then I copied the ZendOptimizer.so to usr/local/Zend/lib Then I edited the PHP.ini and added: zend_optimizer.optimization_level=15 zend_extension="/usr/local/Zend/lib/ZendOptimizer.so" Somewhere near the top. Then I restarted the server using apachectl restart. I also tried stopping and starting as well. It still isn't running? Any ideas. Is there anything else that needs to be done? with phpinfo() you see: This program makes use of the Zend scripting language engine: Zend Engine v1.0.3, Copyright (c) 1998-2000 Zend Technologies with Zend Optimizer v0.99, Copyright (c) 1998-2000, by Zend Technologies regards = == Ing. Alejandro Garín Telecom Internet __ 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] calling perl from within php
Apologies if this is documented here, especially since it seems to be something commonly done, but I couldn't locate it. My problem: We are running PHP 4 on a Solaris 2.7 box with Apache 1.3.11 with mod_perl 1.24. We need to communicate with 3rd-party Perl APIs from within PHP to handle processing of a form. The API functions each expect an associated array and will return a result value to the calling party. I would assume that we would use exec( 'perl cgi-bin/myscript.pl', $assoc_array, $return_value) to do this, placing the perl script I write to handle the values in the server's cgi-bin directory. If this seems right, I would see the array in the perl script by parsing out the array, getting the values and sending them to the API functions. When I get the returned value from the called perl function in the API, I return it by assigning it to the third parameter in the perl script. I've worked with perl before, but it's been a while and I am trying to get back in the perl mind frame and I've never combined it with PHP so I could be off here. Any help would be greatly appreciated. TIA -- Kevin McCarthy Body Soul http://www.bodynsoul.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] mail() question
On Mon, 15 Jan 2001, jeremy brand wrote: So, does $sender_address have the email address that you want it returned to? You didn't specifically say this, that is why I asked. Sorry, yes it does. The message, if delivered properly, is fine. The receiver can hit "Reply" and that works as intended. The From field also displays correctly. The problem happens when the message bounces. For whatever reason, if the message bounces, it returns to nobody. Which, of course is what the web server is running as. -- Robert Hough ([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] mail() question
Well, I don't know exactly what you mean by a bounce. But, an undelivered email will return to the Return-Path address. Why don't you forward the actuall email headers to the list and I can look at them. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more Get your own Free, Private email at http://www.smackdown.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "body" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, Robert Hough wrote: Date: Mon, 15 Jan 2001 15:53:01 -0500 (EST) From: Robert Hough [EMAIL PROTECTED] To: jeremy brand [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() question On Mon, 15 Jan 2001, jeremy brand wrote: So, does $sender_address have the email address that you want it returned to? You didn't specifically say this, that is why I asked. Sorry, yes it does. The message, if delivered properly, is fine. The receiver can hit "Reply" and that works as intended. The From field also displays correctly. The problem happens when the message bounces. For whatever reason, if the message bounces, it returns to nobody. Which, of course is what the web server is running as. -- Robert Hough ([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] PDFLIB 3.0 PHP 4.04
Has anyone gotten PHP 4.04 to compile with PDFLIB support? I have successfully compiled pdflib and all of it's supporting libs. (It runs the tests that come with it) But when I ./configure php, I use: ./configure --with-pdflib=/usr/local/lib And in the output of configure I see: ... checking whether to include Pdflib 3.x support... /usr/local/lib no ... I can't seem to figure out how to make it say YES! Any help would be greatly appreciated. Cal Cal http://www.calevans.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] Zend Optimizer
I did that and it only says: This program makes use of the Zend scripting language engine: Zend Engine v1.0.3, Copyright (c) 1998-2000 Zend Technologies And nothing about the optimizer. So I am assuming that it is not running? - Original Message - From: "Alejandro Garin" [EMAIL PROTECTED] To: "Marcus Ouimet" [EMAIL PROTECTED]; "PHP" [EMAIL PROTECTED] Sent: Monday, January 15, 2001 12:48 PM Subject: Re: [PHP] Zend Optimizer --- Marcus Ouimet [EMAIL PROTECTED] wrote: I have download the Zend Optimizer (Running Apache 1.3.14 and PHP 4.04) and untarred it. Then I copied the ZendOptimizer.so to usr/local/Zend/lib Then I edited the PHP.ini and added: zend_optimizer.optimization_level=15 zend_extension="/usr/local/Zend/lib/ZendOptimizer.so" Somewhere near the top. Then I restarted the server using apachectl restart. I also tried stopping and starting as well. It still isn't running? Any ideas. Is there anything else that needs to be done? with phpinfo() you see: This program makes use of the Zend scripting language engine: Zend Engine v1.0.3, Copyright (c) 1998-2000 Zend Technologies with Zend Optimizer v0.99, Copyright (c) 1998-2000, by Zend Technologies regards = == Ing. Alejandro Garn Telecom Internet __ 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 General Mailing List (http://www.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] BC Math
They do just what they say. see: http://php.net/bc One drawback is that PHP can't natively handle these big numbers, so the return values from these functions are of type string. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more Get your own Free, Private email at http://www.smackdown.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "body" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, Nathan Cook wrote: Date: Mon, 15 Jan 2001 14:19:55 -0700 From: Nathan Cook [EMAIL PROTECTED] To: Php List [EMAIL PROTECTED] Subject: [PHP] BC Math BC Math, Arbitrary Precision Numbers? Can someone shed some light on these functions for me? Thanks. --- .:: Nathan Cook- Network/Security Admin office: 208.343.3110 - Web Programmer email: [EMAIL PROTECTED] - Qmail Admin pager: 208.387.9983 - MIS Admin --- -- PHP General Mailing List (http://www.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] changing strings to float vars
Sometimes clients put a dollar sign "$" in a form that only needs a number (like "1.50"). Is there a way to take a post variable and automatically convert it to a float value, stripping off any non-numeric characters? I tried doubleval() without success and I can't use intval() because it has decimals. kind regards, bill -- PHP General Mailing List (http://www.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] Perl regular expression bug
This only applies to PHP 4.0.4 Back with PHP 4.0.2, I could do this: ?PHP $string = "[["; $string = preg_replace("/(\W)/", "1", $string); ? $string would then contain "\[\[". Now, if I use that same code, $string contains "\\1\\1\\1\\1". I tried to compensate for this using PHP's new ability to allow perl syntax in the replace section. ?PHP $string = "[["; $string = preg_replace("/(\W)/", "\\$1", $string); ? That leaves $string with "\$1\$1\$1\$1". Which tells me it thought I was backreferencing the $. So, to combat said assumption, I tried three, four, even five slashes in front of $1, and nothing worked. All I got were variations of "\$1\$1\$1\$1". I have to assume this is a bug, since this worked back in 4.0.2 which I stopped using due to segfaults under certain circumstances. Ideas? -- +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ | Shaun M. ThomasINN Database Programmer | | Phone: (309) 743-0812 Fax : (309) 743-0830| | Email: [EMAIL PROTECTED]AIM : trifthen | | Web : hamster.lee.net | | | | "Most of our lives are about proving something, either to | | "ourselves or to someone else." | | -- Anonymous | +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ -- PHP General Mailing List (http://www.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] Array...
How can I do an array like below 100-1? OPTION VALUE=\"100\"/OPTION OPTION VALUE=\"99\"/OPTION OPTION VALUE=\"98\"/OPTION OPTION VALUE=\"97\"/OPTION to OPTION VALUE=\"3\"/OPTION OPTION VALUE=\"2\"/OPTION OPTION VALUE=\"1\"/OPTION WreckRman2 Combat Flight Center http://www.combatfs.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] looping
Thanks, (Ignacio) I came up with this snip $counter++; if ($counter "4") { $counter = "1"; echo "/trtr bgcolor=" . $colors[ $i ++ % count( $colors ) ] . ""; } /snip Jerry Lake -Original Message- From: Ignacio Vazquez-Abrams [mailto:[EMAIL PROTECTED]] Sent: Monday, January 15, 2001 1:22 PM To: Jerry Lake Cc: PHP List Subject: Re: [PHP] looping On Mon, 15 Jan 2001, Jerry Lake wrote: excuse my density today my brain is still in weekend mode how would I make this loop put 4 or 5 items (haven't decided) per line instead of just one item and the checkbox on each line? snip echo "table border='1' cellpadding='2' cellspacing='2'"; while($myrow = mysql_fetch_array($result2)) { $name = $myrow["name"]; $personal_cost = $myrow["personal_cost"]; $small_cost = $myrow["small_cost"]; $large_cost = $myrow["large_cost"]; $category = $myrow["category"]; echo "tr"; echo "td"; echo $name; echo "/td"; echo "tdinput type=checkbox name=topping value=".$cost."".$cost."/td"; echo "/tr"; } echo "/table"; /snip Jerry Lake Join the club :) ?php define('PERLINE', 4); // or 5, depending on taste ... echo "table border='1' cellpadding='2' cellspacing='2'"; echo "tr"; $i=0; $numrows=mysql_num_rows($result2); while($myrow = mysql_fetch_array($result2)) { ++$i; ... echo "td"; ... echo "/td"; if (!($i%PERLINE) and ($numrows!=$i)) { echo("/trtr"); }; }; echo "/tr"; echo "/table"; ? -- Ignacio Vazquez-Abrams [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] Array...
for ($i=100; $i0; $i++) print "OPTION VALUE=\\\"$i\\\"/OPTION\n"; But, I presume you would rather do this: for ($i=100; $i0; $i++) print "OPTION VALUE=\"$i\"/OPTION\n"; because I can't imagine why you would want to escape double quotes in HTML. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more Get your own Free, Private email at http://www.smackdown.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "body" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, WreckRman2 wrote: Date: Mon, 15 Jan 2001 16:48:21 -0500 From: WreckRman2 [EMAIL PROTECTED] To: "'Php-General@Lists. Php. Net'" [EMAIL PROTECTED] Subject: [PHP] Array... How can I do an array like below 100-1? OPTION VALUE=\"100\"/OPTION OPTION VALUE=\"99\"/OPTION OPTION VALUE=\"98\"/OPTION OPTION VALUE=\"97\"/OPTION to OPTION VALUE=\"3\"/OPTION OPTION VALUE=\"2\"/OPTION OPTION VALUE=\"1\"/OPTION WreckRman2 Combat Flight Center http://www.combatfs.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] PDFLIB 3.0 PHP 4.04
On Mon, 15 Jan 2001, Cal Evans wrote: But when I ./configure php, I use: ./configure --with-pdflib=/usr/local/lib Leave the /lib part out..ie. use --with-pdflib=/usr/local instead. --Jani -- PHP General Mailing List (http://www.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] Regex for telephone number
case "phone_us": if(ereg("^([2-9][0-9]{2})([2-9][0-9]{2})([0-9]{4})$", $var)){ return TRUE; }else{ set_stringtypes_error(throw_error3("lib_string_types_108", $var)); } break; case "phone_int": if(!preg_match("/[^0-9\(\)\-\. ]/", $var)){ return TRUE; }else{ set_stringtypes_error(throw_error("lib_string_types_109", $var)); } break; works good for us. that's from the stringtypes lib in binarycloud. we're going to convert all of that stuff to be stored as rules in XML... groovy changes are afoot! _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 From: [EMAIL PROTECTED] (Vikram Vaswani) Newsgroups: php.general Date: 15 Jan 2001 04:23:51 -0800 Subject: [PHP] Regex for telephone number Hi! Can someone help me out with a regex to validate a phone number? Thanks Vikram -- PHP General Mailing List (http://www.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] checkboxes into MySQL
I know this has been discussed, but it messing with me. in a script I'm working on I pull out an array of checkboxes from a database, how do I store what people select back to the DB all I end up with is the last selection of the array. Jerry Lake -Original Message- From: jeremy brand [mailto:[EMAIL PROTECTED]] Sent: Monday, January 15, 2001 1:57 PM To: WreckRman2 Cc: 'Php-General@Lists. Php. Net' Subject: Re: [PHP] Array... for ($i=100; $i0; $i++) print "OPTION VALUE=\\\"$i\\\"/OPTION\n"; But, I presume you would rather do this: for ($i=100; $i0; $i++) print "OPTION VALUE=\"$i\"/OPTION\n"; because I can't imagine why you would want to escape double quotes in HTML. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more Get your own Free, Private email at http://www.smackdown.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "body" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, WreckRman2 wrote: Date: Mon, 15 Jan 2001 16:48:21 -0500 From: WreckRman2 [EMAIL PROTECTED] To: "'Php-General@Lists. Php. Net'" [EMAIL PROTECTED] Subject: [PHP] Array... How can I do an array like below 100-1? OPTION VALUE=\"100\"/OPTION OPTION VALUE=\"99\"/OPTION OPTION VALUE=\"98\"/OPTION OPTION VALUE=\"97\"/OPTION to OPTION VALUE=\"3\"/OPTION OPTION VALUE=\"2\"/OPTION OPTION VALUE=\"1\"/OPTION WreckRman2 Combat Flight Center http://www.combatfs.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 General Mailing List (http://www.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] Basic SQL syntax
OK, I got a simple search page working (thanks to all of you who helped me). Another simple question for you. If I had a search and the data to be searched needs to be determined by check boxes, How would I write the sql? Like this? $sql = "SELECT * FROM table WHERE town LIKE '%$search_data%' OR street LIKE '%$search_data%' "; Is "OR" even the correct syntax? Here's how I tried it, which didn't give any results. (Where reference is the id number (or map reference) and search_data is the text field for users to tpye the query. if ($reference != "") $search_reference = "OR id LIKE '%$reference%'"; } $sql = "SELECT * FROM table WHERE town LIKE '%$search_data%' $search_reference"; $result = @mysql_query($sql,$connection) or die (mysql_error()); $num = mysql_num_rows($result); TIA, James. -- PHP General Mailing List (http://www.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] checkboxes into MySQL
What I see is that the below is not an array of checkboxes (that would be input type="checkbox" ..., not option ...). Option ... are part of a select But, to make a checkbox be checked, you simply do this: input type="checkbox" ... checked Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more Get your own Free, Private email at http://www.smackdown.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "body" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, Jerry Lake wrote: Date: Mon, 15 Jan 2001 14:03:00 -0800 From: Jerry Lake [EMAIL PROTECTED] To: "'Php-General@Lists. Php. Net'" [EMAIL PROTECTED] Subject: [PHP] checkboxes into MySQL I know this has been discussed, but it messing with me. in a script I'm working on I pull out an array of checkboxes from a database, how do I store what people select back to the DB all I end up with is the last selection of the array. Jerry Lake -Original Message- From: jeremy brand [mailto:[EMAIL PROTECTED]] Sent: Monday, January 15, 2001 1:57 PM To: WreckRman2 Cc: 'Php-General@Lists. Php. Net' Subject: Re: [PHP] Array... for ($i=100; $i0; $i++) print "OPTION VALUE=\\\"$i\\\"/OPTION\n"; But, I presume you would rather do this: for ($i=100; $i0; $i++) print "OPTION VALUE=\"$i\"/OPTION\n"; because I can't imagine why you would want to escape double quotes in HTML. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more Get your own Free, Private email at http://www.smackdown.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "body" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, WreckRman2 wrote: Date: Mon, 15 Jan 2001 16:48:21 -0500 From: WreckRman2 [EMAIL PROTECTED] To: "'Php-General@Lists. Php. Net'" [EMAIL PROTECTED] Subject: [PHP] Array... How can I do an array like below 100-1? OPTION VALUE=\"100\"/OPTION OPTION VALUE=\"99\"/OPTION OPTION VALUE=\"98\"/OPTION OPTION VALUE=\"97\"/OPTION to OPTION VALUE=\"3\"/OPTION OPTION VALUE=\"2\"/OPTION OPTION VALUE=\"1\"/OPTION WreckRman2 Combat Flight Center http://www.combatfs.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 General Mailing List (http://www.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] password()
Hi. I use password() to excrypt my passwords when I'm adding users to my mysql database. I'm wondering if there's a function to use to un-encrypt it (for a web interface to change the password, and so the admin who is editing user info can see what it is). Thanks for any help. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] checkboxes into MySQL(trying again)
sorry about that, I forgot to erase the old post info here is a chunk of the code I am using snip //inclusion of pizza toppings from DB $query = ("SELECT * FROM toppings"); $result2 = mysql_db_query($DBName, $query) or die("Error in MySQL query"); echo "table border='1' cellpadding='2' cellspacing='2'"; echo "tr bgcolor=" . $colors[ $i ++ % count( $colors ) ] . ""; $colors = array( '#e4e4e4', '#ff' ); $i = 0; while($myrow = mysql_fetch_array($result2)) { $counter++; if ($counter "4") { $counter = "1"; echo "/trtr bgcolor=" . $colors[ $i ++ % count( $colors ) ] . ""; } $name = $myrow["name"]; $personal_cost = $myrow["personal_cost"]; $small_cost = $myrow["small_cost"]; $medium_cost = $myrow["medium_cost"]; $large_cost = $myrow["large_cost"]; $category = $myrow["category"]; /snip snip echo "td valign=top align=left\r\n"; echo "input type=checkbox name=".$name." value=".$cost."".$name."/td"; echo "/td\r\n"; } if ($counter 3) { while ($counter 3) { echo "tdnbsp;/td"; $counter++; } } echo "/tr"; echo "/table"; // memory flush mysql_free_result($result2); //end topping section /snip Jerry Lake- [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.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] Date data type problem
while $date1 is in "mmdd" format but $date2 is in "-mm-dd" formate because I get value of $date2 from a "date" data type field from a table. Ah, see ... this is what I was talking about with making sure they are in the same format :) Can I use this "-mm-dd" to compare with value from another date variabile in the "mmdd" format? If not possible, How do I make both of them to be in the same format? You can change -mm-dd to mmdd like this: $withoutdashes = ereg_replace("[^0-9]", "", $withdashes); This wil actually remove everything from the string that is not a number between 0 and 9 (ie, numbers). Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.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] logging page views, which method is better????
And the answer about merging logs for webalizer is: Is there a way to create a combined report showing hits to a number of separate servers all handling the same web sites. I am guessing all you have to do is feed it each of the log files in turn, and make sure you don't duplicate them. I think it requires not using incremental mode, but I hope you know for sure. I am in the process of recommending it on the php-general mailing list. Q: I have multiple load-balanced servers (or I'm using DNS round-robin to accoplish the same thing) and I want to generate one webalizer report for the whole farm, but each server generates its own log file. When I run webalizer on each of the logfiles in turn, it ignores a lot of the records because it thinks they're out of order! A: You need to merge all of the logfiles together so that webalizer sees the records in chronological order. One good way to do that on the fly is with mergelog (http://mergelog.sourceforge.net/), a quick common logfile sorter. An example: mergelog server1.log server2.log server3.log | webalizer -- Bradford L. Barrett [EMAIL PROTECTED] A free electron in a sea of neutrons DoD#1750 KD4NAW The only thing Micro$oft has done for society, is make people believe that computers are inherently unreliable. -- PHP General Mailing List (http://www.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] checkboxes into MySQL(trying again)
Hi Jerry, Feel free (as in GPL) to use my libHtmlForm functions. This should solve your problem. http://www.nirvani.net/software/libHtmlForm/ See: html_input_checkbox() specifically. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more Get your own Free, Private email at http://www.smackdown.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "body" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, Jerry Lake wrote: Date: Mon, 15 Jan 2001 14:11:18 -0800 From: Jerry Lake [EMAIL PROTECTED] To: "'Php-General@Lists. Php. Net'" [EMAIL PROTECTED] Subject: [PHP] checkboxes into MySQL(trying again) sorry about that, I forgot to erase the old post info here is a chunk of the code I am using snip //inclusion of pizza toppings from DB $query = ("SELECT * FROM toppings"); $result2 = mysql_db_query($DBName, $query) or die("Error in MySQL query"); echo "table border='1' cellpadding='2' cellspacing='2'"; echo "tr bgcolor=" . $colors[ $i ++ % count( $colors ) ] . ""; $colors = array( '#e4e4e4', '#ff' ); $i = 0; while($myrow = mysql_fetch_array($result2)) { $counter++; if ($counter "4") { $counter = "1"; echo "/trtr bgcolor=" . $colors[ $i ++ % count( $colors ) ] . ""; } $name = $myrow["name"]; $personal_cost = $myrow["personal_cost"]; $small_cost = $myrow["small_cost"]; $medium_cost = $myrow["medium_cost"]; $large_cost = $myrow["large_cost"]; $category = $myrow["category"]; /snip snip echo "td valign=top align=left\r\n"; echo "input type=checkbox name=".$name." value=".$cost."".$name."/td"; echo "/td\r\n"; } if ($counter 3) { while ($counter 3) { echo "tdnbsp;/td"; $counter++; } } echo "/tr"; echo "/table"; // memory flush mysql_free_result($result2); //end topping section /snip Jerry Lake- [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.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] Re: [PHP-DEV] cookies and sessions security
Very good: keep the thing on a secure connection all the time, set a session id cookie and keep all user info (possibly including remote ip) in the server's session db... (vulnerable to nothing I can think of at the moment...) Wow, I never thought of using the remote IP! Thanks for the tip. I am going to use it today for an authentication system I'm building. Careful. This will die in the butt if the client comes in from an ISP using load-balancing proxy servers. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair! -- PHP General Mailing List (http://www.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] Array...
On Mon, 15 Jan 2001 13:57:04 -0800 (PST), jeremy brand ([EMAIL PROTECTED]) wrote: for ($i=100; $i0; $i++) print "OPTION VALUE=\\\"$i\\\"/OPTION\n"; But, I presume you would rather do this: for ($i=100; $i0; $i++) ^^^ should be $i-- print "OPTION VALUE=\"$i\"/OPTION\n"; or how about: ?for($i=100; $i0; $i--){? OPTION VALUE="?echo $i?"/OPTION ?}? -- PHP General Mailing List (http://www.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] checkboxes into MySQL
it took me a while to find this out, too. If you have say, 5 checkboxes, name them like so: input type="checkbox" name="musicians[]" value="monk" input type="checkbox" name="musicians[]" value="trane" input type="checkbox" name="musicians[]" value="miles" input type="checkbox" name="musicians[]" value="dizzy" input type="checkbox" name="musicians[]" value="bird" when submitted, in the script processing the form, check the array $musicians[]. The checked selections will be included as elements. So if trane and bird were checked, you will have a 2-element array in $musicians[]. $musicians[0] == "trane" $musicians[1] == "bird" HTH. At 02:03 PM 1/15/2001 -0800, Jerry Lake wrote: I know this has been discussed, but it messing with me. in a script I'm working on I pull out an array of checkboxes from a database, how do I store what people select back to the DB all I end up with is the last selection of the array. Jerry Lake -Original Message- From: jeremy brand [mailto:[EMAIL PROTECTED]] Sent: Monday, January 15, 2001 1:57 PM To: WreckRman2 Cc: 'Php-General@Lists. Php. Net' Subject: Re: [PHP] Array... for ($i=100; $i0; $i++) print "OPTION VALUE=\\\"$i\\\"/OPTION\n"; But, I presume you would rather do this: for ($i=100; $i0; $i++) print "OPTION VALUE=\"$i\"/OPTION\n"; because I can't imagine why you would want to escape double quotes in HTML. Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more Get your own Free, Private email at http://www.smackdown.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "body" -- Quoted from Yahoo! homepage, http://www.yahoo.com On Mon, 15 Jan 2001, WreckRman2 wrote: Date: Mon, 15 Jan 2001 16:48:21 -0500 From: WreckRman2 [EMAIL PROTECTED] To: "'Php-General@Lists. Php. Net'" [EMAIL PROTECTED] Subject: [PHP] Array... How can I do an array like below 100-1? OPTION VALUE=\"100\"/OPTION OPTION VALUE=\"99\"/OPTION OPTION VALUE=\"98\"/OPTION OPTION VALUE=\"97\"/OPTION to OPTION VALUE=\"3\"/OPTION OPTION VALUE=\"2\"/OPTION OPTION VALUE=\"1\"/OPTION WreckRman2 Combat Flight Center http://www.combatfs.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 General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Kevin McCarthy Body Soul http://www.bodynsoul.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] changing strings to float vars
At 4:28 PM -0500 1/15/01, bill wrote: Sometimes clients put a dollar sign "$" in a form that only needs a number (like "1.50"). Is there a way to take a post variable and automatically convert it to a float value, stripping off any non-numeric characters? I tried doubleval() without success and I can't use intval() because it has decimals. kind regards, $SanitizedNumber = ereg_replace('[^0-9.]', '', $NumberString); If you really need to make this a float variable, then you can add $Number = (float)$SanitizedNumber; although in most cases PHP handles type conversion correctly on-the-fly. - steve +--- "They've got a cherry pie there, that'll kill ya" --+ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +-- FBI Special Agent Dale Cooper ---+ -- PHP General Mailing List (http://www.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() question
I asked the same question some weeks ago! The problem is, my root installed the mail-function so that "nobody" is the owner of the send-process! I wanted the same thing as you want - At last I did a workaround (not bad for sending that small amount of mails I do): I configured .procmailrc, so the mails I want to send are sent to my local account (specific subject), and then sendmail is called (the mail is sent with MY USER)! If I use headers like Error-To:, they now work as expected!! I hope you understand my filthy english! witty -- Sent through GMX FreeMail - http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Basic SQL syntax
""Johannes Janson"" [EMAIL PROTECTED] wrote in message 93vs9u$osj$[EMAIL PROTECTED]">news:93vs9u$osj$[EMAIL PROTECTED]... try this: $sql = "SELECT * FROM table WHERE town LIKE '%$search_data%' "; if ($reference != "") $sql .= "OR whatever"; Ah, so you can constantiate (right word?) the query? Cool, Thanks ;) James. -- PHP General Mailing List (http://www.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] Basic SQL syntax
Ah, so you can constantiate (right word?) the query? I don't know what you mean by 'constantiate', but glad to hear it worked It did, thank you ;) Someone pointed out where I'd gone wrong with the word privately: Ah, so you can constantiate (right word?) the query? concatenate :) -- PHP General Mailing List (http://www.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 FDF on Linux PPC
Has anyone configured PHP to work with FDF on a PPC box? If so, do you have any helpful hints that may get me up and running. Thanks for the help. [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] Magic Quotes - Problems with Inconsistent Behavior removing Slashes
I'm seeing strange behavior with Magic Quotes in PHP on my ISP hosted accounts. Basically, it's not consistently removing the escaped backslashes before displaying. For instance, take the following piece database text (stored in, say, a character field) It's fun to be a penguin. If I do a simple retrieve and echo on a webpage, I will get the following 80% of the time.. It's fun to be a penguin. But, the other 20% of the time I get It\'s fun to be a penguin. There's something inconsistent about the way MagicQuotes are removed by the system...it's as if the system gets "busy" or the cache gets flushed before PHP gets the opportunity to unescape the single quotes. Is anyone else seeing this behavior and has any suggestions on how to make it work more consistent? Yes, I've been including "stripslashes" to try to make SURE that these slashes get removed, but that doesn't work all the time EITHER. Roy -- PHP General Mailing List (http://www.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() question
Quick update, for anyone interested... I managed to answer my own question, but I'd still like to thank everyone that replied, it did lead me to the right place. What I ended up doing was using sendmail with the -f option. This did require me to add a new trusted user to my sendmail.cf though. Once that was done, I just used popen to dump the message to sendmail. Here's the ugly/incomplete version of the code. If you can't figure it out, or want to see the exacts let me know off list, and I'll send it to ya in the morning (read, give me time to clean it up). $mailer = "/usr/sbin/sendmail -t -i [EMAIL PROTECTED]"; $fd = popen($mailer, "w"); fputs($fd, "$headers"); fputs($fd, "$message"); pclose($fd); -- Robert Hough ([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] is_dir
I have a snipet of code i'm using for a file maintanance program. I have no idea why but when the main loop repeats, the is_dir function doesn't return true even though it prints out a directory in the server. chdir("/certain/place/for/files/"); $handle=opendir("."); $file=readdir($handle); //to get rid of "." and ".." $file=readdir($handle); while($file=readdir($handle)) { if (is_dir($file)){ chdir("/certain/place/for/files/".$file."/"); $handle2=opendir("."); $file2=readdir($handle2); $file2=readdir($handle2); while($file2=readdir($handle2)) { ? tr bgcolor="?php if ($j==0) { echo "ff"; $j=1; } else if ($j==1) { echo "cf"; $j=0; } ?" tda href="website?php echo $file;?/?php echo $file2;?"[view]/a/td td?php echo $file2;?/td tda href="deleteimage.php3?file=?php echo $file2;?root=?php echo $file;?"[delete]/a/td /tr ? } } else{ ? tr bgcolor="?php if ($j==0) { echo "ff"; $j=1; } else if ($j==1) { echo "cf"; $j=0; } ?" tda href="website?php echo $file;?"[view]/a/td td?php echo $file;?/td tda href="deleteimage.php3?file=?php echo $file;?root=/"[delete]/a/td /tr ? } the script will print out the contents of the first directory but then the others are never opened, just printed out. Thanks Patrick }
[PHP-CVS] cvs: php4 /pear/XML Render.php
metallicMon Jan 15 16:27:34 2001 EDT Modified files: /php4/pear/XML Render.php Log: Added a method to call the HTML and PDF rendering modes(not implemented yet). Added the parse function which should allow for finer XML parsing. The XML file contents are now stored in a var available to the entire class. Added a wrapper around setInputFile() and setInput() # This class still has a long ways to go, but this is a start. Index: php4/pear/XML/Render.php diff -u php4/pear/XML/Render.php:1.1 php4/pear/XML/Render.php:1.2 --- php4/pear/XML/Render.php:1.1Fri Jan 12 15:01:19 2001 +++ php4/pear/XML/Render.phpMon Jan 15 16:27:34 2001 @@ -16,31 +16,112 @@ // +-+ // | Authors: Sean Grimes [EMAIL PROTECTED]| // +-+ +// +// $Id: Render.php,v 1.2 2001/01/16 00:27:34 metallic Exp $ /** -* Render class for rendering HTML. This class inherits -* everything from XML_Parser, taking the variables that -* were parsed and rendering the file appropriatly. +* Render class for rendering from XML. * +* This class should render documents from xml. +* The intended rendering modes will be HTML and +* the Adobe PDF format. Maybe at some point I +* will make it possible to take a document from +* HTML to PDF, but this is unlikely. +* * @author Sean Grimes [EMAIL PROTECTED] */ -class XML_Render extends XML_Parser { +/*** Todo *** + ** - Implement the HTML and PDF rendering modes + ** - Extend the parse() function to what is needed + ** - Implement filesystem commands + ** - Come up with the XML language syntax + ** - Provide a better class interface + ** - Do some debugging +***/ - function Render_HTML() { +require_once "Parser.php"; - } +class XML_Render extends XML_Parser { - function _Render_HTML() { +var $data; // holds the file contents - } + function XML_Render($charset = 'UTF-8', $mode = "event") { + $this-XML_Parser($charset, $mode); - function Open($file) { + } - $fpointer = fopen($file, "w+"); - - - - + /** + * Set the input file. + * + * This overrides XML_Parser::setInputFile(), + * and creates a wrapper around XML_Parser::setInputFile() + * and XML_Parser::inputFile(). The functions are so similar + * that its confusing me(hint: document XML_Parser). + * + * @access public + * @param $file file to be input + */ + function setInputFile($file) { + $fp = @fopen($file, "r"); + if (is_resource($fp)) { + $this-fp = $fp; + return $this-setInput($file); + } else { + return new XML_Parser_Error($php_errormsg); // ?? + } + } +/** +* Parses the document +* +* This function extends the capabilities of the +* parse function in XML/Parser.php. The only real +* notable change is the addition of a command to +* store the contents of the file to a variable to +* make it available to the entire class +*/ +function parse() { +if(!is_resource($this-fp)) { +return new XML_Parser_Error("no input"); +} +if (!is_resource($this-parser)) { +return new XML_Parser_Error("no parser"); +} +while ($data = fread($this-fp, 2048)) { +$err = $this-parseString($data, $feof($this-fp)); +if (PEAR::isError($err)) { +return $err; +} +} +$this-data = $data; +return $true; +} + + + /** + * Renders the XML document. + * + * This function really isnt implemented yet. + * Basically, I just added the calls for the HTML + * and PDF subclass rendering modes. I'm hoping this + * class will be easily built onto over PEAR's lifetime. + * + * @param $mode Rendering mode. Defaults to HTML. + * @author Sean Grimes [EMAIL PROTECTED] + */ + + function render($mode = 'HTML') { + if($mode == 'HTML') { + $html = new XML_Render_HTML(); + $html-render(); + } + if($mode == 'PDF') { + $pdf = new XML_Render_PDF(); + $pdf-render(); + } else { + $message = "Error. Unsupported rendering mode."; + new PEAR_Error($message, 0, PEAR_ERROR_RETURN, E_USER_NOTIFY); + } + } } -- 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
Re: [PHP] password()
simple answer is no. the only way to decrypt the passwd is to run it through a cracker. All admins are used to this and know that if a user has lost a passwd that they are going to have to give them a new one, finding the old just isnt work one week of processing time :) Im curious to see how other php developers store their passwd's -plain text in db -use of unix password() -use of db password() -other ? Chris Lee Mediawaveonline.com ""Jason Jacobs"" [EMAIL PROTECTED] wrote in message 011501c07f3f$c415bcc0$5800a8c0@doc">news:011501c07f3f$c415bcc0$5800a8c0@doc... Hi. I use password() to excrypt my passwords when I'm adding users to my mysql database. I'm wondering if there's a function to use to un-encrypt it (for a web interface to change the password, and so the admin who is editing user info can see what it is). Thanks for any help. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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] password() ::: and it's return...
Instead I am curious how other developers on this list are returning the MD5, password() or whatever in permanently encrypted passwords... What are procedures and what is the way the return process work? Any tricks/tips to share with all of us? Cheers, Maxim Maletsky -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 10:53 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] password() simple answer is no. the only way to decrypt the passwd is to run it through a cracker. All admins are used to this and know that if a user has lost a passwd that they are going to have to give them a new one, finding the old just isnt work one week of processing time :) Im curious to see how other php developers store their passwd's -plain text in db -use of unix password() -use of db password() -other ? Chris Lee Mediawaveonline.com ""Jason Jacobs"" [EMAIL PROTECTED] wrote in message 011501c07f3f$c415bcc0$5800a8c0@doc">news:011501c07f3f$c415bcc0$5800a8c0@doc... Hi. I use password() to excrypt my passwords when I'm adding users to my mysql database. I'm wondering if there's a function to use to un-encrypt it (for a web interface to change the password, and so the admin who is editing user info can see what it is). Thanks for any help. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HELP WITH UPLOAD REQUIRED!!!!!!!!
Unlink works on some installations, not others. I think it works on NT but not 95 or perhaps the other way around. Why is this? Unlink is hardly an unsupported system call in windows! Anybody know? Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "Chris Lee" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 12:47 PM Subject: Re: [PHP] HELP WITH UPLOAD REQUIRED are you running php in safemode? according to http://php.net/manual/en/function.unlink.php unlink() may not work with windows servers, I have no personal experience with windows so I can not confirm this. have you tried http://php.net/manual/en/function.move-uploaded-file.php this might be better suited. Chris Lee Mediawaveonline.com "Mike Yuen" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to allow various users to upload their own picture. What I would like to happen is to have the copy statement rename the .jpg image to the username. For example, if the username is mike, then I want the picture to be renamed mike.jpg The following is a snippet of code: ?PHP print "$CUserName" //ensures name is carried over from session if(copy($userfile,"c:/phpweb/userpics/$CUserName.jpg")) { print "Your picture has been uploaded!"; } else { print "Error"; } unlink($userfile) ? The errors I get are as follows: Warning: unable to open " for reading: Permission denied in c:\phpweb/fuploadconfirm.php on line 15 Warning: Unlink failed (No such file or directory) in c:\phpweb/fuploadconfirm.php on line 31 Line 15 is the if copy($userfile) line in the above code AND Line 31 is the unlink statement at the end. Thanks, Mike -- PHP General Mailing List (http://www.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] HELP WITH UPLOAD REQUIRED!!!!!!!!
Josh G wrote: Unlink works on some installations, not others. I think it works on NT but not 95 or perhaps the other way around. Why is this? Unlink is hardly an unsupported system call in windows! Anybody know? Unlink comes from UNIX so it's probably supported by NT rather than Win9x. This is just a guess, though. Wagner -- One maniac alone can do what 20 together cannot -- PHP General Mailing List (http://www.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] password() ::: and it's return...
I'm not sure I understand the question. What exactly do you mean? Are you talking about returning it from the client already encrypted? Not sure if anybody does that, as JS doesn't have a whole lot of useful encryption stuff in it, and iirc the md5() algorith is rather lengthy. Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "Maxim Maletsky" [EMAIL PROTECTED] To: "'Chris Lee'" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 1:01 PM Subject: RE: [PHP] password() ::: and it's return... Instead I am curious how other developers on this list are returning the MD5, password() or whatever in permanently encrypted passwords... What are procedures and what is the way the return process work? Any tricks/tips to share with all of us? Cheers, Maxim Maletsky -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 10:53 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] password() simple answer is no. the only way to decrypt the passwd is to run it through a cracker. All admins are used to this and know that if a user has lost a passwd that they are going to have to give them a new one, finding the old just isnt work one week of processing time :) Im curious to see how other php developers store their passwd's -plain text in db -use of unix password() -use of db password() -other ? Chris Lee Mediawaveonline.com ""Jason Jacobs"" [EMAIL PROTECTED] wrote in message 011501c07f3f$c415bcc0$5800a8c0@doc">news:011501c07f3f$c415bcc0$5800a8c0@doc... Hi. I use password() to excrypt my passwords when I'm adding users to my mysql database. I'm wondering if there's a function to use to un-encrypt it (for a web interface to change the password, and so the admin who is editing user info can see what it is). Thanks for any help. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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] password() ::: and it's return...
Yeah, in fact that's my point. If you cannot decrypt a password, there's no way to return it , right? So how come these "big guys" DO return it to you? And what is the most secure way for it. Some of these companies deal with finances, the security is a REAL issue over there... Maxim Maletsky -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 11:16 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] password() ::: and it's return... sites do though. many sites allow me to click some link and they email me my passwd in case Ive forgoten it. ICQ.com even does this. Chris Lee Mediawaveonline.com ""Josh G"" [EMAIL PROTECTED] wrote in message 00e401c07f60$f325c2a0$0e01a8c0@swinger">news:00e401c07f60$f325c2a0$0e01a8c0@swinger... I'm not sure I understand the question. What exactly do you mean? Are you talking about returning it from the client already encrypted? Not sure if anybody does that, as JS doesn't have a whole lot of useful encryption stuff in it, and iirc the md5() algorith is rather lengthy. Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "Maxim Maletsky" [EMAIL PROTECTED] To: "'Chris Lee'" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 1:01 PM Subject: RE: [PHP] password() ::: and it's return... Instead I am curious how other developers on this list are returning the MD5, password() or whatever in permanently encrypted passwords... What are procedures and what is the way the return process work? Any tricks/tips to share with all of us? Cheers, Maxim Maletsky -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 10:53 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] password() simple answer is no. the only way to decrypt the passwd is to run it through a cracker. All admins are used to this and know that if a user has lost a passwd that they are going to have to give them a new one, finding the old just isnt work one week of processing time :) Im curious to see how other php developers store their passwd's -plain text in db -use of unix password() -use of db password() -other ? Chris Lee Mediawaveonline.com ""Jason Jacobs"" [EMAIL PROTECTED] wrote in message 011501c07f3f$c415bcc0$5800a8c0@doc">news:011501c07f3f$c415bcc0$5800a8c0@doc... Hi. I use password() to excrypt my passwords when I'm adding users to my mysql database. I'm wondering if there's a function to use to un-encrypt it (for a web interface to change the password, and so the admin who is editing user info can see what it is). Thanks for any help. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HELP WITH UPLOAD REQUIRED!!!!!!!!
Josh G wrote: A rose by any other name would smell as sweet, and I'm sure I remember deleting files back in my old dos days, not to mention win95 ;-) Um, I suppose every OS does. (I deleted one file or another as well) However this was about unlink, wasn't it? Unlink, basically, is a UNIX command. I don't really know how PHP-unlink works but it is possible that it simply won't work in a non-UNIX-environment. NT in a few ways is pretty close to UNIX so it may work here as well. Closer than 9x, anyway. Be warned. This whole mail is based on guesses. If you wanna know, try it, or ask someone who did. Wagner -- One maniac alone can do what 20 together cannot -- PHP General Mailing List (http://www.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] password() ::: and it's return...
that's very true, you put in the risk the others accounts Maxim Maletsky -Original Message- From: Josh G [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 11:32 AM To: PHP User Group Subject: Re: [PHP] password() ::: and it's return... Well it's up to you wether or not to encrypt passwords, but it's very irresponsible not to. If somebody cracks your system, chances are they'll get passwords that can be used on accounts your users have in other places, so your customers suffer more than they should for your lax in security. People say "but if they're in my db then the damage is done" but you're not the only one out there, and like it or not, there's no way anybody can manage a different password on every damned site that makes you sign up. Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "Maxim Maletsky" [EMAIL PROTECTED] To: "'Chris Lee'" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 1:27 PM Subject: RE: [PHP] password() ::: and it's return... Yeah, in fact that's my point. If you cannot decrypt a password, there's no way to return it , right? So how come these "big guys" DO return it to you? And what is the most secure way for it. Some of these companies deal with finances, the security is a REAL issue over there... Maxim Maletsky -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 11:16 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] password() ::: and it's return... sites do though. many sites allow me to click some link and they email me my passwd in case Ive forgoten it. ICQ.com even does this. Chris Lee Mediawaveonline.com ""Josh G"" [EMAIL PROTECTED] wrote in message 00e401c07f60$f325c2a0$0e01a8c0@swinger">news:00e401c07f60$f325c2a0$0e01a8c0@swinger... I'm not sure I understand the question. What exactly do you mean? Are you talking about returning it from the client already encrypted? Not sure if anybody does that, as JS doesn't have a whole lot of useful encryption stuff in it, and iirc the md5() algorith is rather lengthy. Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "Maxim Maletsky" [EMAIL PROTECTED] To: "'Chris Lee'" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 1:01 PM Subject: RE: [PHP] password() ::: and it's return... Instead I am curious how other developers on this list are returning the MD5, password() or whatever in permanently encrypted passwords... What are procedures and what is the way the return process work? Any tricks/tips to share with all of us? Cheers, Maxim Maletsky -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 10:53 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] password() simple answer is no. the only way to decrypt the passwd is to run it through a cracker. All admins are used to this and know that if a user has lost a passwd that they are going to have to give them a new one, finding the old just isnt work one week of processing time :) Im curious to see how other php developers store their passwd's -plain text in db -use of unix password() -use of db password() -other ? Chris Lee Mediawaveonline.com ""Jason Jacobs"" [EMAIL PROTECTED] wrote in message 011501c07f3f$c415bcc0$5800a8c0@doc">news:011501c07f3f$c415bcc0$5800a8c0@doc... Hi. I use password() to excrypt my passwords when I'm adding users to my mysql database. I'm wondering if there's a function to use to un-encrypt it (for a web interface to change the password, and so the admin who is editing user info can see what it is). Thanks for any help. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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
[PHP] How do I do to update part of a string?
I have a big string. How can I do to find some text inside and modify that text? I was thinking about ereg_replace(). But it is capable to handle big chuncks of text? If yes, it will notbe too heavy for theserver? Any other ideas? Thank you, Rom -- PHP General Mailing List (http://www.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 16 Jan 2001 03:19:07 -0000 Issue 457
: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- Hi! On my webserver I want to switch to enable safe_mode setup, but not for all directories. 1) I have one common directory, in which I have some root-owned files with the header and footer of our lab. I want to allow all users to include these files to easily make them look similar :-) 2) Besides this directory I would prefer safe_mode. Unfortunately, when enabling safe_mode, requirement 1 fails, as the user's web-pages are owned by the users themselves. They are colleagues with a shell account, so include() must fail because of the different uid. I did not manage to work around safe_mode in a partial manner (e.g. by using "php_admin_value safe_mode Off" in a Directory ... statement), I could only globally swith on and off safe_mode. Are there any recommondations on how to allow for the partial use of safe_mode? Many thanks in advance, Lutz -- Lutz Jaenicke [EMAIL PROTECTED] BTU Cottbus http://www.aet.TU-Cottbus.DE/personen/jaenicke/ Lehrstuhl Allgemeine Elektrotechnik Tel. +49 355 69-4129 Universitaetsplatz 3-4, D-03044 Cottbus Fax. +49 355 69-4153 The way you want to do this is with UNIX timestamps. FYI a timestamp is the number of seconds starting at 1970 and going up (it's important to remember that date - since some people were born before, etc.) So you need to do this: $dateA = '12-25-1999'; $dateB = '12-24-1999'; // convert to unix time stamps $fooA = explode('-',$dateA); $fooB = explode('-',$dateB); $timestampA = mktime(0,0,0,$fooA[0],$fooA[1],$fooA[0]); $timestampB = mktime(0,0,0,$fooB[0],$fooB[1],$fooB[0]); if($timestampA $timestampB) { echo $dateA . " is greater than B"; } Hope this helps - you can also check out this page: http://www.php.net/manual/en/ref.datetime.php --Joe On Mon, Jan 15, 2001 at 12:00:05PM -0600, Jacky@lilst wrote: Greeting all, Just now I asked about to tie string values together and would like to thank Jason for that. Anyway one more thing, after I have tied string values together and assigned that to a virables. can I used the value from that variables to compare with another date value? Say another date value I will use is also retrieved from a field in table which is in Date data type as well. So it will be like $query = "select myBirthdate from date where userId='1' "; $dateResult =mysql_query($query); $myBirthDate = (mysql_result($dateResult,0,"myBirthdate")); $thisBirthdate = "$year"."$month"."$day"; if ($thisBirthdate $myBirthdate) { do something } else { do some other thing } Is it the correct way to do that? cheers Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Joe Stump, PHP Hacker [EMAIL PROTECTED] http://www.miester.org/ Yes - it may work like you are saying, but I would use a timestamp to be sure. You can make comparisons on regular date formats from within MySQL with the date or datetime fields. --Joe On Mon, Jan 15, 2001 at 12:39:13PM -0600, Jacky@lilst wrote: all right, now I have both date values in the same format (/mm/dd), say $Date1 = 20010115 and $Date2 =20010120. If what I want is to find out if $Date1 come before $Date2, can I just use this sniplet below? if ($Date1 $Date2) { ... } else { ... } Do I still need to use mktime() for this purpose? cheers Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" - Original Message - From: Jason Murray [EMAIL PROTECTED] To: 'Jacky@lilst' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, January 14, 2001 11:37 PM Subject: RE: [PHP] date comparison can I used the value from that variables to compare with another date value? Say another date value I will use is also retrieved from a field in table which is in Date data type as well. When you get into this stuff, it all starts getting a lot more complicated. If you want to compare two fields, make sure they're in the same format. Basically, make sure you use four digit years and two digit months and days to create your birthday fields, so they look like (for example, with today's date, 20010115 instead of 2001115 - that second one could really be anything). If you're sure you're storing the birthdays properly, you can then cut the strings up when you pull them out of the databas
Re: [PHP] Problems sending to several recipients with mail() using WIN NT and Apache
I'm using Apache 1.3.14 on WIN NT, and can't send mail to more than one recipient using the PHP-mail command. I've checked php.ini, and everything seems to be fine... This is an example that won't work (but should have worked..?) mail("[EMAIL PROTECTED], [EMAIL PROTECTED]","subject","content"); This one however turns out fine: mail("[EMAIL PROTECTED]","subject","content"); I have also tried to "manipulate" the header with "cc:", but no copy arrives, only the one in the "to:" field. The To: parameter technically is only required to accept one (1) email. Many mail programs will accept multiple recipients there and DWIM and Cc: them. Your mail program is apparently not one of those. The Cc: thing with the extra headers should work on all compliant mail servers... $headers = "Cc: [EMAIL PROTECTED]\r\n"; $headers .= "From: [EMAIL PROTECTED]\r\n"; $headers .= "Reply-to: [EMAIL PROTECTED]\r\n"; mail("[EMAIL PROTECTED]", "subject", "content", $headers); Note that \r\n is spec, but many mail programs also accept \n only and DWIM. I'm guessing yours doesn't and that's what messed you up... -- PHP General Mailing List (http://www.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] Netscape differences?
Try sending the various "no-cache" and "expiration" headers. You can find more details in code archive samples linked from: http://php.net/links.php Naturally, IE and Netscape don't agree on which headers mean what, so you have to send at least twice as many as you'd expect. Am I the only one that wants to put all the IE and Netscape engineers on an island and not let them off until their specs agree?... Sort of like "Survivor" :-) - Original Message - From: Joel Dossey [EMAIL PROTECTED] Newsgroups: php.general Sent: Sunday, January 14, 2001 3:11 PM Subject: [PHP] Netscape differences? Greetings, I have a php script that generates a random image. All images are kept in a mysql table. It works fine when viewed by IE, but Netscape, and Lynx, always show the same image. The database information, however, is changed as it should be (correctly incrementing the times seen column for the image), and on refresh all information goes as it should, except for randomly selecting an image. This may be an apache caching problem, but I was wondering if anyone has run into this working with php in general, and what solutions I need to explore. Thanks much, Joel Dossey __ 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 General Mailing List (http://www.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] Missing function virtual () ???
compiled PHP3/PHP4 as external CGI under Apache. virtual("test.html"); Does is not work in a CGI-PHP ? Correct. virtual() cannot work in CGI. You'll have to use some combination of exec()/fopen()/popen() to achieve what you need. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]