php-general Digest 12 Apr 2001 13:41:59 -0000 Issue 623 Topics (messages 48226 through 48298): Re: checkdnsrr() in PHP 4.0.5rc1 48226 by: Yasuo Ohgaki Re: install LONG_MAX 48227 by: Yasuo Ohgaki array() stuff 48228 by: Duke 48229 by: Gfunk 48230 by: CC Zona Re: foreach vs. while(list() = each()) 48231 by: Lewis Bergman 48233 by: Plutarck 48258 by: Maxim Derkachev 48260 by: Brian Clark 48262 by: Brian Clark 48275 by: Tim Ward popup window 48232 by: Dan Harrington 48236 by: Plutarck Re: timer in PHP 48234 by: Plutarck Re: No new topic using reply please. 48235 by: Plutarck Re: Making ALL your scripts work with register.globals turned off 48237 by: Plutarck Case-Sensitivity with PHP and MySQL 48238 by: midget2000x 48240 by: Plutarck Newsgroups like this one? 48239 by: Plutarck 48243 by: Alvin Tan Re: Database result set question 48241 by: Yasuo Ohgaki Re: System V Semaphores 48242 by: Yasuo Ohgaki slashes added to template files 48244 by: Franklin Hays uploading with ftp 48245 by: David Minor Passing Parameter 48246 by: Jack Sasportas Re: passthru 48247 by: Dean Hall syntax 48248 by: Wade Halsey 48249 by: Jason Murray 48266 by: elias 48283 by: Renze Munnik 48291 by: elias array output as a variable? 48250 by: midget2000x 48251 by: Brian Clark 48252 by: elias 48254 by: Brian Clark Re: PHP and IE5.5 download problem 48253 by: trogers VERY URGENT -- MIRROR FOR PHP.NET ?? 48255 by: Reuben D Budiardja 48257 by: Brian Clark 48259 by: Rasmus Lerdorf 48264 by: Chris Fry Re: HELP with (Fatal Error: Call to a member function on a non-object) 48256 by: Taylor, Stewart 48286 by: g0thic Re: THANKS (was: VERY URGENT -- MIRROR FOR PHP.NET ??) 48261 by: Reuben D Budiardja Any limits while using FILE() 48263 by: elias mail function???? 48265 by: Terence Truong 48267 by: elias 48268 by: Matt Williams Re: $8 PHP hosting from Jeffrey Greer 48269 by: Greig, Euan 48290 by: Plutarck attachments in mail 48270 by: Dan Cleveland 48274 by: KPortsmout.aol.com Re: radio groups in looped form 48271 by: Rudolf Visagie Re: __ $8/mo php hosting on 24/7, OC3+ web server ___ 48272 by: Harshdeep S Jawanda 48273 by: Dominick Vansevenant Re: windows 2000 install 48276 by: Paul Grant Re: Can't redeclare already declared function 48277 by: Christian Reiniger Re: php.ini 48278 by: Michael Hall Re: Javascript issue 48279 by: Tim Ward Php-extensies 48280 by: Sebastian Van Dingenen Loop issue 48281 by: Fates Re: Are calling COM applications a trojan? 48282 by: Zeus 48284 by: Matt Williams Updating a value in a session 48285 by: Tobias Talltorp 48289 by: Plutarck HELP! URGENT Upload file issue 48287 by: g0thic search highlighting 48288 by: Matt Williams 48292 by: Plutarck Editors ... calling them, or PHP-based one? 48293 by: The Hermit Hacker 48294 by: Dominick Vansevenant 48295 by: Plutarck www.php.net - gateway timeout? 48296 by: maatt php-lib questions 48297 by: Mark 48298 by: Plutarck Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
If you are using Windows, no. (resolver does not work under windows) Regards, -- Yasuo Ohgaki "Jochen Kaechelin" <[EMAIL PROTECTED]> wrote in message NFBBLHGFAKNLFNPOHMPHCEENCGAA.jk@intern">news:NFBBLHGFAKNLFNPOHMPHCEENCGAA.jk@intern... > What about this error: > > checkdnsrr() is not supported in this PHP build > > Any answers? > > -- > Jochen Kaechelin - Ihr WEBberater > Stuttgarter Str.3, D-73033 Goeppingen > Tel. 07161-92 95 94, Fax 07161-92 95 98 > http://www.wa-p.de, mailto:[EMAIL PROTECTED] > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Do you install Linux kernel source? and have correct symlink for kernel headers? Sounds like it's the cause to me. Regards, -- Yasuo Ohgaki ""Plamen Slavov"" <[EMAIL PROTECTED]> wrote in message 002a01c0c276$32b005e0$98d209c0@plamensl2">news:002a01c0c276$32b005e0$98d209c0@plamensl2... > Hi all, > i try to install e php-4.0.4pl1 on a redhat 6.0 with apache_1.3.19, > but when i try to make php i get the following error message: > > make[1]: Entering directory `/home/plamen/www/php-4.0.4pl1/Zend' > /bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main > -DXML_BYTE_ORDER=12 -g -O2 -c zend_hash.c > zend_hash.c: In function `zend_hash_add_or_update': > zend_hash.c:257: `LONG_MAX' undeclared (first use in this function) > zend_hash.c:257: (Each undeclared identifier is reported only once > zend_hash.c:257: for each function it appears in.) > zend_hash.c: In function `zend_hash_del_key_or_index': > zend_hash.c:502: `LONG_MAX' undeclared (first use in this function) > zend_hash.c: In function `zend_hash_find': > zend_hash.c:852: `LONG_MAX' undeclared (first use in this function) > zend_hash.c: In function `zend_hash_exists': > zend_hash.c:902: `LONG_MAX' undeclared (first use in this function) > make[1]: *** [zend_hash.lo] Error 1 > make[1]: Leaving directory `/home/plamen/www/php-4.0.4pl1/Zend' > make: *** [all-recursive] Error 1 > > Does someone have any ideas how to fix this? > i do not know where the problem is > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I'm trying to create the following array: $host_info = array( "hostname" => "localhost" "log" => "rocketbox_db.log" "username" => $username "password" => $password "database" => "rocketbox" "table" => $table ); however when I try and access the document, I get the following error: Parse error: parse error, expecting `')'' in /usr/home/kidlinux/htdocs/rocketbox/admin/index.php on line 26 line 26 is \* "log" => "rocketbox_db.log" *\ in the array code I pasted above. This isn't very far into my script, and I'm sure I havn't missed anything like a ) in my code anywhere before that array() declaration. I've gone over my code several times. According to the documentation (or my interpretation of it) that array should be correct. One other thing I'm unsure of that doesn't seem to be covered in the documentation is referring to variables in an array, like \* "username" => $username *\ where $username is a variable submitted by an html form via the post method. Should that work?? And what about referring to a function in an array such as the following: $value = array( "date" => $date = strftime('%Y-%m-%d') "title" => $info_title "dept" => $info_dept "info" => $info ); Is that valid? Can i just do \* "date" => strftime('%Y-%m-%d') *\ ?? Thanks for your help.
Dude, you need commas between your array items. ---------------------------------------------------------------------------- Gfunk - [EMAIL PROTECTED] - http://www.gfunk007.com/ ----- Original Message ----- From: "Duke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 12, 2001 12:05 PM Subject: [PHP] array() stuff > I'm trying to create the following array: > > $host_info = array( > "hostname" => "localhost" > "log" => "rocketbox_db.log" > "username" => $username > "password" => $password > "database" => "rocketbox" > "table" => $table > ); > > however when I try and access the document, I get the following error: > > Parse error: parse error, expecting `')'' in > /usr/home/kidlinux/htdocs/rocketbox/admin/index.php on line 26 > > line 26 is \* "log" => "rocketbox_db.log" *\ in the array code I > pasted above. This isn't very far into my script, and I'm sure I havn't > missed anything like a ) in my code anywhere before that array() > declaration. I've gone over my code several times. According to the > documentation (or my interpretation of it) that array should be correct. > One other thing I'm unsure of that doesn't seem to be covered in the > documentation is referring to variables in an array, like \* "username" => > $username *\ where $username is a variable submitted by an html form via > the post method. Should that work?? And what about referring to a function > in an array such as the following: > > $value = array( > "date" => $date = strftime('%Y-%m-%d') > "title" => $info_title > "dept" => $info_dept > "info" => $info > ); > > Is that valid? Can i just do \* "date" => strftime('%Y-%m-%d') *\ ?? > > Thanks for your help. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
In article <000501c0c2f5$185e8e80$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Duke") wrote: > I'm trying to create the following array: > > $host_info = array( > "hostname" => "localhost" > "log" => "rocketbox_db.log" > "username" => $username > "password" => $password > "database" => "rocketbox" > "table" => $table > ); > > however when I try and access the document, I get the following error: > > Parse error: parse error, expecting `')'' in > /usr/home/kidlinux/htdocs/rocketbox/admin/index.php on line 26 Your array elements need to be delimited by commas: $host_info = array( "hostname" => "localhost", "log" => "rocketbox_db.log", "username" => $username, "password" => $password, "database" => "rocketbox", "table" => $table ); -- CC
> One apparent problem with foreach() is it can misbehave code as > follows. (4.0.4pl1, 4.0.5RC6) > > function foo($a) { > foreach ($a[0] as $k => $v) { > echo $k.$v; > } > } > > $a = 'abc'; > foo($a); > > You'll get 'server not found' or browser waiting forever with this > code. (If you don't, please let me know) > Good point but I wouldn't characterize a launguage's or function's expectation that you use correct syntax as a problem.
I believe foreach also works on a copy basis, not a pointer or reference. So if you try and alter the array you are foreach'ing it won't work as expected. For instance this: $array = array("var1", "var2", "var3"); foreach ($array as $val) { if ($val == "var2") { $val = "changed2"; } } print_r($array); Will show you that no change to $array has occurred. It's basically the same as list(), but it's worth noting. Other than backwards compliance, I've never used the list/each way of doing it. Never really had a reason too...I think it basically just comes down to user preference. -- Plutarck Should be working on something... ...but forgot what it was. "Joe Stump" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > What are the differences in these? I know with while() you have to reset() the > array afterwards, but foreach() you don't. Also foreach() appears to be quite > a bit faster. > > My main question is there ANY difference in how these two loop through the > array. > > --Joe > > > > /*************************************************************************** ***\ > * Joe Stump - PHP/SQL/HTML Developer * > * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * > * "Better to double your money on mediocrity than lose it all on a dream." * > \*************************************************************************** ***/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hello Joe, Wednesday, April 11, 2001, 10:49:31 PM, you wrote: JS> What are the differences in these? I know with while() you have to reset() the JS> array afterwards, but foreach() you don't. Also foreach() appears to be quite JS> a bit faster. You don't need to reset() the array, You also don't need list() and each(), which impose additional overhead. You put the array loop to the foreach() implementation, which is in C, instead of implementing it with PHP with while(), list() and each(). That must be a lot faster. JS> My main question is there ANY difference in how these two loop through the JS> array. The main difference is that foreach() works with the array's copy. It works with the same data (using reference counts) while the initial array hasn't changed . But if you change the array, the real copy will be created, and you won't see the changes within the foreach() loop - it will operate with the copy of the initial array (unchanged). So, foreach() should be used if you don't change the array in the loop. If you do, use while(). E.g: <?php $a = array (1, 2, 3); print "foreach:\n"; foreach ($a as $k => $v) { if (!$k) unset($a[1]); print "$v\n"; } print "while:\n"; while (list ($k, $v) = each ($a)) { print "$v\n"; } ?> will output: foreach: 1 2 ---> it should not, the value has already been unset! 3 while: 1 3 -- Best regards, Maxim Derkachev mailto:[EMAIL PROTECTED] Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia
Hi Maxim, @ 3:39:55 AM on 4/12/2001, Maxim Derkachev wrote: > Hello Joe, > Wednesday, April 11, 2001, 10:49:31 PM, you wrote: JS>> What are the differences in these? I know with while() you have to reset() the JS>> array afterwards, but foreach() you don't. Also foreach() appears to be quite JS>> a bit faster. > You don't need to reset() the array, You also don't need list() and > each(), which impose additional overhead. You put the array loop to the foreach() > implementation, which is in C, instead of implementing it with PHP with while(), > list() and each(). > That must be a lot faster. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
@ 3:45:39 AM on 4/12/2001, Brian Clark wrote: ... >> You don't need to reset() the array, You also don't need list() and >> each(), which impose additional overhead. You put the array loop to >> the foreach() implementation, which is in C, instead of >> implementing it with PHP with while(), list() and each(). That must >> be a lot faster. D'oh, I need to be asleep. Sorry for shooting blanks. :) Anyway, I was just going to say that I wanted this in PHP3 for a long time (foreach()), then it arrived, and we're still using PHP3 for various reasons (don't ask) and PHP3 doesn't have foreach(). :( <violin> It's quite a sad story. </violin> -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
you can't nest foreach as you should be able to. Ecah foreach is supposed to have it's own pointer in the array, but it doesn't ... this is a known bug. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -----Original Message----- > From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]] > Sent: 12 April 2001 02:37 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] foreach vs. while(list() = each()) > > > One apparent problem with foreach() is it can misbehave code > as follows. > (4.0.4pl1, 4.0.5RC6) > > function foo($a) { > foreach ($a[0] as $k => $v) { > echo $k.$v; > } > } > > $a = 'abc'; > foo($a); > > You'll get 'server not found' or browser waiting forever with > this code. > (If you don't, please let me know) > > String can be accessed like array, but foreach does not > handle invalid parameter > well. > While() does not misbehave with equivalent code. > > Regards, > -- > Yasuo Ohgaki > > > "Joe Stump" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > What are the differences in these? I know with while() you > have to reset() the > > array afterwards, but foreach() you don't. Also foreach() > appears to be quite > > a bit faster. > > > > My main question is there ANY difference in how these two > loop through the > > array. > > > > --Joe > > > > > > > > > /************************************************************* > *****************\ > > * Joe Stump - PHP/SQL/HTML Developer > * > > * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * > * "Better to double your money on mediocrity than lose it all on a dream." * > \*************************************************************************** ***/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hello, Does anyone have ideas about this kind of scenario? 1) Load a php page, based on whether a user is currently authenticated either: a) if not authenticated: pop up a new browser window or b) if already authenticated, proceed 2) Based on the login id of the individual that either failed to login or succeeded, you either: a) close the little popup window and load a user information page from a database on the original page. or b) close the little popup window and load an error message up on the original page. The average gray generic "enter user name and password" in IE or Netscape isn't good enough because the login page needs to have multiple options that are dynamically generated as well (login.php would be the contents of a popup) I know how to do popups with Javascript, but what I want is to use purely PHP. Is there a way to spawn a browser window from a server-side action? Thanks Dan
> I know how to do popups with Javascript, but what I want is > to use purely PHP. Is there a way to spawn a browser window > from a server-side action? I'm afraid you'll have you use Javascript. The only way to make a new window is to use window.open, or to have someone click a link with the target of _blank. So with window.open and window.close, I think you can accomplish all you'd like to. But if someone turns off java, none of it will work. So you'll probably want to allow some other way of logging in. I know many places (game sites are especially guilty of this) that require javascript just to login, even though nothing in the site even uses javascript! I really do hate that. -- Plutarck Should be working on something... ...but forgot what it was. ""Dan Harrington"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > Does anyone have ideas about this kind of scenario? > > 1) Load a php page, based on whether a user is currently > authenticated either: > a) if not authenticated: pop up a new browser window > or > b) if already authenticated, proceed > > 2) Based on the login id of the individual that either > failed to login or succeeded, you either: > > a) close the little popup window and > load a user information page from a database > on the original page. > or > > b) close the little popup window and > load an error message up on the original page. > > The average gray generic "enter user name and password" in > IE or Netscape isn't good enough because the login page > needs to have multiple options that are dynamically generated > as well (login.php would be the contents of a popup) > > I know how to do popups with Javascript, but what I want is > to use purely PHP. Is there a way to spawn a browser window > from a server-side action? > > Thanks > Dan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I'm guessing it's either for a Quiz script or an Auction script. If you want to make it easy on yourself, use a database to store the starting time (when the timer "starts") and what time the test/auction should end. When someome makes a submission, get the time stored in the database and see if the person's submission is within the timelimit (check if the current time is less than the finish time). If the current time is within 2 minutes of the ending time, then take the ending time, add 5 minutes to it, and then store it. If you try to do this all in a sort of real-time, you're only making it hard on yourself and it's more or less impossible to do (without killing yourself in resources, anyway). Doing it with a database, once you get it working in the first place, may even be considered trivial. You may be pleasantly surprised...unless you can't use a database :) -- Plutarck Should be working on something... ...but forgot what it was. ""george"" <[EMAIL PROTECTED]> wrote in message 9b1p05$t6c$[EMAIL PROTECTED]">news:9b1p05$t6c$[EMAIL PROTECTED]... > I need to have a time running and after a certain time it will not allow > you to submit anything else, on top of that if someone makes an entry with > less than 2 minutes to go the time must be extended by 5 minutes. > I really am at a loss how to do this. > Can it be done. > > TIA > > George > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Better than the people who make a new thred by hitting Forward ;) -- Plutarck Should be working on something... ...but forgot what it was. ""Chris Lee"" <[EMAIL PROTECTED]> wrote in message 9b1rbb$mr3$[EMAIL PROTECTED]">news:9b1rbb$mr3$[EMAIL PROTECTED]... Accually, Ive noticed in Outlook Express Ctrl - N = new message Ctrl - R = relpy to user directly, does not get posted to newsgroup/mailling list Ctrl - G = relpy directly to newsgroup, in turn gets posted to the mailing list On another note, good post, I see alot of people posting 'new' threads by hitting relpy, hehe. -- Chris Lee [EMAIL PROTECTED] ""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message news:9b1k02$f6h$[EMAIL PROTECTED]... Hello all, I think most of users knows about news://news.php.net and list archives, if you use your mail client's reply button, it becomes part of a thread. (It does not start new thread) Therefore, do not post new topic using reply button. Regards, -- Yasuo Ohgaki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
I've been working on a way to strip invalid characters from user input with little or no need to rip the hair out of my head, and I learned some interesting things in the process. For one thing, hair really is stuck in there good, man. But the important thing is how to increase your global namespace, make debugging and refining user-input easier, make your scripts more readable (arguably), and maybe even make your scripts a little more secure in the process. And all it requires is one single little line being present in either an included file, or at the top of your script. *basks in the beauty of the variable variable* And that line is (actually it's two lines, but one is a comment to make things easier on people who read your code): // To refer to variables submitted via GET or POST use: ${$f}[" $f = 'HTTP_' . $HTTP_SERVER_VARS["REQUEST_METHOD"] . '_VARS'; Now, if someone submits a form with the field "email", you refer to it in your code as: ${$f}["email"] It works if it was submitted via POST or GET, so you never have to worry about needing one feature or the other. And if you do want to lock it in to POST only, you just do: $f = 'HTTP_POST_VARS'; ...right at the top of the script where you want to lock it in. It effectively reduces having to type $HTTP_POST_VARS to ${$f} (hard to type at first, I know). And now you can instantly know what variable is suppose to be user submitted, and what isn't. And you can now safely turn off register.globals in your .ini file, or run your script in a place where register.globals is off (track_vars must be enabled, but I don't know anyone who actually turns it off, and it's always enabled in version 4.0.3+). The reason for not just using $email to refer to the "email" field is something I recently found out. If you change the value of $HTTP_POST_VARS["email"], it will not change the value of $email! Doh! So my great big script which flawlessly strips all invalid characters from POST, COOKIE, and GET global variables did squat. I've fallen in love with variable variables, I admit it. Oh how I love them so... ...anyway, I just thought some of you might benefit from my discovery of variable variables using REQUEST_METHOD, since I've never actually seen it used in any scripts (I actually got the idea from "Decae", a programmer at Evernight...I have no idea when he figured it out). So I hope it helps some of you out. Enjoy! -- Plutarck Should be working on something... ...but forgot what it was.
I am writing a PHP script that operates on a MySQL database that uses the e-mail address as the primary key. If the e-mail doesn't exist in the database (when a form is submitted), I want to insert a new record. If it does, I want to update the existing record. How can I make the query that checks if the e-mail exists case-insensitive? I want to avoid users creating another record if they type in their e-mail in a different case. Thanks! rory ----------- providing the finest in midget technology
I had a similar question about case-sensitivity, and I was told that MySQL is automatically case-insensitive! But it depends on your version of MySQL. Go to the mysql manual and look at chapter 20.16 "Case sensitivity in searches". In the newest versions of MySQL, all searches are case-insensitive by default. To make them case-sensitive however, is a royal pain in the arse. -- Plutarck Should be working on something... ...but forgot what it was. "midget2000x" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I am writing a PHP script that operates on a MySQL database that uses the > e-mail address as the primary key. If the e-mail doesn't exist in the database > (when a form is submitted), I want to insert a new record. If it does, I want > to update the existing record. > > How can I make the query that checks if the e-mail exists case-insensitive? I > want to avoid users creating another record if they type in their e-mail in a > different case. > > Thanks! > > rory > > ----------- > providing the finest in midget technology > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I was looking at marc.theaimsgroup.com listing of message archives (which is how I finally found the address to this newsgroup in the firstplace) to find the MySQL group, however I noticed that the one at mysql.com is just a "mailing list". (I prefer to preserve my inbox for personal messages and spam that slips by my filters ;) Are there any good listings of topic-grouped "newsgroups" (like this one) for MySQL, javascript, C, etc? I'd like a newsgroup to ask my non-PHP questions where people expect non-PHP questions :) Thanks in advance! -- Plutarck Should be working on something... ...but forgot what it was.
Hi Plutarck, The 'mailing list' at MySQL _is_ very much like this one and is also very active. Send mail to [EMAIL PROTECTED] to subscribe. Regards, @lvin -----Original Message----- From: Plutarck [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 11:40 AM To: [EMAIL PROTECTED] Subject: [PHP] Newsgroups like this one? I was looking at marc.theaimsgroup.com listing of message archives (which is how I finally found the address to this newsgroup in the firstplace) to find the MySQL group, however I noticed that the one at mysql.com is just a "mailing list". (I prefer to preserve my inbox for personal messages and spam that slips by my filters ;) Are there any good listings of topic-grouped "newsgroups" (like this one) for MySQL, javascript, C, etc? I'd like a newsgroup to ask my non-PHP questions where people expect non-PHP questions :) Thanks in advance! -- Plutarck Should be working on something... ...but forgot what it was. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Most PostgreSQL functions are wrapper functions for libpq. Reading documents about libpq will help. Answer to your question is, it does not read all data into memory. I think most DB doesn't do that also. Data will be buffered in PostgreSQL backend, size is depends on your configuration. I'm not sure if it buffers on client side. Regards, -- Yasuo Ohgaki "Morgan Curley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Just out of curiosity, can anyone explain the mechanics behind accessing a > database query result set. > ie > $result_id = pg_execute( 'select * from my_table' ); > > when I call loop through pg_fetch_row( $result_id, $rom_num ) or > pg_fetch_object( $result_id, $rom_num ) > has php read the entire result set into memory( say the result set has > 10,000 records ), cached a fixed number of records in memory or does it > simply have a record_set_pointer of some sort that tells the DB where to > fetch the next asked for record from. > > This is probably a DB engine setting but I am curious what the process is. > > Thanks, > Morgan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
It means your OS does not allocate enough resources. Linux: $ ipcs -l -s FreeBSD: $ ipcs -S Refer to your OS manual to change them. Regards, -- Yasuo Ohgaki ""Philip Murray"" <[EMAIL PROTECTED]> wrote in message 002e01c0c20a$b17e9ba0$0201a8c0@sparlak">news:002e01c0c20a$b17e9ba0$0201a8c0@sparlak... > Hi, > > I've been trying to use SystemV Semaphores as a kind of locking system in a > webpage, but after a few hours I get this message: > > Warning: semget() failed for key 0x0: No space left on device in > /1/home/xxxx/admin/htdocs/prop/lock.php on line 8 > > Warning: 0 is not a SysV semaphore index in > /1/home/xxxx/admin/htdocs/prop/lock.php on line 19 > > Couldn't grab lock! > > It isn't disk space, and there's plenty of free memory. So how do I fix it > and stop it doing it in the future? > > Apart from this it seems to work fine. I've attached some sample code which > is pretty much exactly what I'm doing. > > > Cheers > > -------------------------------------------------------------------------------- > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
Apologies in advance if this has been discussed before or is a simple fubar on my part. I can only search through the archives for so long... :-) Experiencing a frustrating problem on this end with slashes being added to my template files. Here are the details: Using PHP on a webhost that compiled php as a cgi in my www/cgi-bin directory. I have all HTML files in templates/filename.tpl and all PHP files in includes/filename.inc, this includes the template.inc file from PHPLib. I have a file called 'script' with the following in it: <?php require('includes/Directory.inc'); include('includes/Header.inc'); // Now parse a second template: $t->set_file("MainHandle","MainGadget.tpl"); // wholePage.ihtml has "{MyOutput}" in it $vari= $t->parse("MyFinalOutput","MainHandle"); // All {MyOutput}'s get replaced $t->p("MyFinalOutput"); // output the value of MyFinalOutput /*eval( "?>".$vari );*/ include('includes/Footer.inc'); ?> include/Directory.inc has the following in it: <?php include('includes/Template.inc'); $url_array=explode("/",$REQUEST_URI); $url_cat=$url_array[3]; $url_grp=$url_array[4]; $url_misc=$url_array[5]; $t = new Template("/www/hostname/ocean/templates/"); $title = "name"; if($url_misc == 'misc') { $Handle='MiscHandle'; $Template='MiscGadget.tpl'; } elseif ($url_grp == 'tanks') { $Handle='TankHandle'; $Template='TankGadget.tpl'; } elseif ($url_cat == 'psupply') { // These three lines are the same as the first example: $Handle='PowerHandle'; $Template='PowerGadget.tpl'; } elseif ($url_cat == 'purpose') { $Handle='PurposeHandle'; $Template='PurposeGadget.tpl'; } else { $Handle='IntroHandle'; $Template='IntroGadget.tpl'; } $t->set_file("$Handle","$Template"); $t->set_var("name",$title); $t->parse("MyOutput","$Handle"); ?> Now, this setup work without a hitch on my personal development server where PHP is loaded as a module in Apache. The file called via the 'script' above is loaded into the MainGadget.tpl template and displayed without a problem. Everything, including javascript, works great. Now, I moved this code to the providers server, where the only difference I can tell is php works as a cgi , and I get output from the HTML files with slashes added to the HTML, such as: <a href=\'about.php\' onMouseOut=\'MM_swapImgRestore()\" onMouseOver=\"MM_swapImage(\'about\',\'\',\'graphics/toolsbar3_01.gif\',1)\"><img name=\"about\" border=\"0\" src=\"graphics/toolsbar_01.gif\" width=\"105\" height=\"35\"></a> <a href=\'contact.php\' onMouseOut=\'MM_swapImgRestore()\' onMouseOver=\'MM_swapImage(\'contact\',\'\',\'graphics/toolsbar3_02.gif\',1)\"><img name=\"contact\" border=\"0\" src=\"graphics/toolsbar_02.gif\" width=\"96\" height=\"35\"></a> Everything else is output just fine. The only HTML with this in it is the {MyOutput} files from templates directory (.tpl files). I am not very familiar with PHPLib but imagine there is some other not so subtle item I am missing since things work great on my linux/apache/php4 server. Any ideas? I have tried using stripslashes() in the 'script' above but get errors. Is there something unique to the php cgi I am missing? Something else? Any all help is greaty appreciated!! Thanks, //frank
I'm getting this: "Warning: error opening in /path/to/file.php on line 32" Here's what I want to do, maybe I'm approaching it incorrectly? I need to collect multiple files via a form and upload them via FTP (can't use HTTP because I'm uploading to a different server). I collect them just fine, but my process script connects, changes directories, makes a new directory to insert the files into and changes to that new directory, but it fails on the ftp_put() call. Here is the code. I've also tried to simplify it to just one file with no success. I think I'm just missing something about the ftp_put function. <PRE> for ($i=1; $i<=$num_spots; $i++) { $upload = ftp_put($conn_id, "$new_file[$i]", "$new_file[$i]", FTP_BINARY); if (!$upload) echo "FTP upload for '$new_title[$i]' has failed!<BR>"; else echo "Uploaded '$new_title[$i]' to '$__ftphost__' as '$new_file[$i]'.<BR>"; } </PRE> Thanks for your help. David Minor
I have called from html a php form and passwd a value, but how can I from PHP pass the value to an html for, without using php ? Scenario After searching a db, a list of valid part numbers gets displayd from the Mysql db, the client picks part#2 and then that click would call the html form which needs the value being passed to it, in this case part_no then I would take other input information and pass all if it along with part_no to a cgi script. Can someone give me a good sample ? Thanks ! -- ___________________________________________________________ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net
"Michael Dickson" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On the server itself (to which I have root access) I type: > > someProgram arg1 arg2 arg3 > > and it runs properly, returning the proper output to standard output (the > screen). I can do this from anywhere on the server (for example, from the > same directory where my php scripts are located, /var/www/html/blah), and I > can do it as the same user that apache runs as ('apache'). > > BUT, when I try: > > <?php passthru("someProgram arg1 arg2 arg3"); ?> > > it fails. I get no output at all. I'm just guessing since I can't access the PHP manual and since I don't know what program you're running here -- but perhaps "someProgram" is outputting to stderr by mistake. That's my only guess. Dean Hall. http://hall.apt7.com
Hi I need to name a file like this $fp=fopen('echo $agentcode' .'CyberTrac.ctr', "w"); the file gets named echo $agentcodeCyberTrac.ctr, now I want a real value in $agentcode, there is a value in there so it must be my syntax, anyone help? TIA Wade
> I need to name a file like this > $fp=fopen('echo $agentcode' .'CyberTrac.ctr', "w"); > > the file gets named echo $agentcodeCyberTrac.ctr, now I want > a real value in $agentcode, there is a value in there so it > must be my syntax, anyone help? $fp=fopen($agentcode.'CyberTrac.ctr', "w"); Jason
You can use the same code as you typed but use double-quotes instead of single-quotes: $fp=fopen("echo $agentcode' .'CyberTrac.ctr", "w"); -elias http://www.kameelah.org/eassoft ""Wade Halsey"" <[EMAIL PROTECTED]> wrote in message 007401c0c318$1d488fe0$256410ac@wadeh">news:007401c0c318$1d488fe0$256410ac@wadeh... Hi I need to name a file like this $fp=fopen('echo $agentcode' .'CyberTrac.ctr', "w"); the file gets named echo $agentcodeCyberTrac.ctr, now I want a real value in $agentcode, there is a value in there so it must be my syntax, anyone help? TIA Wade
elias wrote: > > You can use the same code as you typed but use double-quotes instead of > single-quotes: > $fp=fopen("echo $agentcode' .'CyberTrac.ctr", "w"); > > -elias > http://www.kameelah.org/eassoft Why the H*ll would you wanna use echo there?!?!?! Just fopen($agentcode."CyberTrac.ctr", "w"); works (like someone already mentioned before), so why would you use some _UGLY_ construction with echo??? -- * R&zE: *************************** ** Renze Munnik ** ** E: [EMAIL PROTECTED] ** M: +31 6 218 111 43 ***************************
Hey, i didn't write 'echo' in the origin but i just double-quoted what he wrote in the first place w/o even noticing the 'echo' ;) "Renze Munnik" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > elias wrote: > > > > You can use the same code as you typed but use double-quotes instead of > > single-quotes: > > $fp=fopen("echo $agentcode' .'CyberTrac.ctr", "w"); > > > > -elias > > http://www.kameelah.org/eassoft > > Why the H*ll would you wanna use echo there?!?!?! > Just fopen($agentcode."CyberTrac.ctr", "w"); works (like someone > already mentioned before), so why would you use some _UGLY_ > construction with echo??? > > -- > > * R&zE: > > *************************** > ** Renze Munnik > ** > ** E: [EMAIL PROTECTED] > ** M: +31 6 218 111 43 > *************************** > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
another newbie programmer question... is it possible to output the results of an array loop into a variable, or directly into an SQL call? Obviously the code below is impossible, but illustrates what I want to do: //declare the array $info_request = array (1 => "firstname","lastname","email","howfound","optin","comments","request_type","request_bucket","date"); //output the array loop results to a variable $array_results = foreach ($info_request As $value) { print "$value,"; } //place the output variable into an SQL call (therefore making it dynamic): INSERT INTO $tablename ($array_results) ... thanks! ----------- providing the finest in midget technology
Hi midget2000x, @ 2:13:10 AM on 4/12/01, midget2000x wrote: ... > Obviously the code below is impossible, but illustrates what I want to do: > //declare the array > $info_request = array (1 => >"firstname","lastname","email","howfound","optin","comments","request_type","request_bucket","date"); > > //output the array loop results to a variable > $array_results = foreach ($info_request As $value) { print "$value,"; } > //place the output variable into an SQL call (therefore making it > dynamic): > INSERT INTO $tablename ($array_results) How about: <?php $info = array ( "firstname","lastname","email","howfound","optin", "comments","request_type","request_bucket","date" ); while(list($idx,$value) = each($info)) { $results .= ($idx == (sizeof($info) - 1) ? "'$value'" : "'$value',"); } /* INSERT INTO foo ($results) */ ?> -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
$info_request = array (1 => "firstname","lastname","email","howfound","optin","comments","request_type", "request_bucket","date"); $flds = implode(",", $info_request); $sql = "INSERT INTO mytable($flds)" mysql_query($sql) hope it helps at least a little. -elias http://www.kameelah.org/eassoft "midget2000x" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > another newbie programmer question... > is it possible to output the results of an array loop into a variable, or > directly into an SQL call? > > Obviously the code below is impossible, but illustrates what I want to do: > > //declare the array > $info_request = array (1 => "firstname","lastname","email","howfound","optin","comments","request_type", "request_bucket","date"); > > //output the array loop results to a variable > $array_results = foreach ($info_request As $value) { print "$value,"; } > > //place the output variable into an SQL call (therefore making it > dynamic): > > INSERT INTO $tablename ($array_results) > ... > > thanks! > ----------- > providing the finest in midget technology > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
@ 2:39:12 AM on 4/12/01, Brian Clark wrote: ... > @ 2:13:10 AM on 4/12/01, midget2000x wrote: ... >> //declare the array >> $info_request = array (1 => >"firstname","lastname","email","howfound","optin","comments","request_type","request_bucket","date"); ^^^^ Sorry, I guess this would be more complete: <?php $tablename = 'foo'; $info = array(0 => array('billy bob','joe','email','yahoo','sort of','foo','firm','large','date'), 1 => array('james j','frank','email','google','no','bar','soft','small','date')); while(list(,$array) = each($info)) { $results = 'INSERT INTO $tablename VALUES('; while(list($idx,$value) = each($array)) { $results .= ($idx == (sizeof($array) - 1) ? "'$value'" : "'$value',"); } $results .= ')'; print "$results\n"; /* INSERT here. */ } ?> I guess it could be made into a function($info,$table) -- whatever, but you'd need error checking a returns on the inserts. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
Hi For some reason this works for me, can even download .html files $headertxt = "Content-Disposition: attachment; filename=\"".$filename."\""; header("Content-Type: application/force-download");header($headertxt); Tom At 12:09 AM 12/04/01 +0500, Vikram Vaswani wrote: >Hi! > >I have a script which sends the following headers in order to get the >client to display a "file save" prompt. > > > header ("Content-Type: application/octet-stream"); > > header ("Content-Disposition: attachment; filename=$filename"); > > readfile($filename); > >This works well on Netscape/lynx. However, IE 5.5 has a problem with this - >I get a message saying that the "file could not be found". Looked around >online, some sites say that this is an IE-specific issue with MIME-type >recognition. > >However, I see sites like yahoo and deja allowing users to download email >attachments using a similar technique, and that works fine on IE. Any ideas >on what I'm doing wrong here? > >TIA! > >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]
Hi All, I'm in the middle of crisis. I need to meet the deadline tomorrow, and tonight the www.php.net seems to be down. Anyone know any mirror site of www.php.net? I need function reference and manual only, and I have been always totally dependence on www.php.net. So, if anyone can tell me any mirror site of www.php.net so that I can continue my work, that would be really-really great. Thanks a lot Reuben D. Budiardja
Hi Reuben, @ 3:33:21 AM on 4/12/2001, Reuben D Budiardja wrote: > I'm in the middle of crisis. I need to meet the deadline tomorrow, > and tonight the www.php.net seems to be down. Anyone know any mirror > site of www.php.net? I can get there using http://us.php.net/ If that doesn't fly, try the au mirror: http://au.php.net/ Or the Canadian mirror: http://ca.php.net/ -Brian -- PGP is spoken here: 0xE4D0C7C8 Please do not carbon copy me on list replies.
Pick just about any country code. ie. ca.php.net, uk.php.net, de.php.net, us2.php.net (second US mirror) On Thu, 12 Apr 2001, Reuben D Budiardja wrote: > Hi All, > I'm in the middle of crisis. I need to meet the deadline tomorrow, and > tonight the www.php.net seems to be down. > Anyone know any mirror site of www.php.net? > I need function reference and manual only, and I have been always totally > dependence on www.php.net. So, if anyone can tell me any mirror site of > www.php.net so that I can continue my work, that would be really-really great. > > > Thanks a lot > Reuben D. Budiardja > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
We have a copy of the manual on our site http://www.quillsoft.com.au The click on PHP Manual The search facility searches the manual. Regards Chris Fry Reuben D Budiardja wrote: > Hi All, > I'm in the middle of crisis. I need to meet the deadline tomorrow, and > tonight the www.php.net seems to be down. > Anyone know any mirror site of www.php.net? > I need function reference and manual only, and I have been always totally > dependence on www.php.net. So, if anyone can tell me any mirror site of > www.php.net so that I can continue my work, that would be really-really great. > > Thanks a lot > Reuben D. Budiardja > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: [EMAIL PROTECTED] http://www.quillsoft.com.au You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt ********************************************************************** This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so. This notice should not be removed.
This error suggests the $tpl is undefined i.e. you forget to create it using new. -Stewart -----Original Message----- From: g0thic [mailto:[EMAIL PROTECTED]] Sent: 12 April 2001 01:17 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [PHP] HELP with (Fatal Error: Call to a member function on a non-object) Hi guys, Below is the error message that I am receiving, and 3 or 4 lines around the code that seems to be causing the issue. Lines are numbered so it gives you a good idea of line 183. What I need to know, is in my context, what is the error saying, and if there is a variable (or function or class) to define, how can I tell which one it is? Fatal error: Call to a member function on a non-object in /home/httpd/www/g0thic/cawood_a4/edit_f.php on line 183 178- if($seditFileErr == "") 179- { 180- // Load primary key and form parameters 181- $fldf_id = get_param("f_id"); 182- $fldu_id = get_param("u_id"); 183- $tpl->set_var("Trn_u_id", get_param("u_id")); 184- $pf_id = get_param("f_id"); 185- $tpl->set_var("editFileError", ""); 186- } Get_param is a function to get the variable "u_id" that would have been sent back with the page url (e.g.: page.php?u_id=3993) Any ideas? Cheers, Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Thanks! That solved that one.. Now just a few more.. But with a different subject. On 4/12/01 12:34 AM, "Taylor, Stewart" <[EMAIL PROTECTED]> wrote: > This error suggests the $tpl is undefined i.e. you forget to create it using > new. > > -Stewart > > -----Original Message----- > From: g0thic [mailto:[EMAIL PROTECTED]] > Sent: 12 April 2001 01:17 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: [PHP] HELP with (Fatal Error: Call to a member function on a > non-object) > > > Hi guys, > > Below is the error message that I am receiving, and 3 or 4 lines around > the code that seems to be causing the issue. Lines are numbered so it gives > you a good idea of line 183. What I need to know, is in my context, what is > the error saying, and if there is a variable (or function or class) to > define, how can I tell which one it is? > > Fatal error: Call to a member function on a non-object in > /home/httpd/www/g0thic/cawood_a4/edit_f.php on line 183 > > 178- if($seditFileErr == "") > 179- { > 180- // Load primary key and form parameters > 181- $fldf_id = get_param("f_id"); > 182- $fldu_id = get_param("u_id"); > 183- $tpl->set_var("Trn_u_id", get_param("u_id")); > 184- $pf_id = get_param("f_id"); > 185- $tpl->set_var("editFileError", ""); > 186- } > > Get_param is a function to get the variable "u_id" that would have been sent > back with the page url (e.g.: page.php?u_id=3993) > > Any ideas? > > Cheers, > > Sean > > > -- > PHP General Mailing List (http://www.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] > >
I see. Wonderful !! Thanks again to anyone who responded within minutes. This is a great list :). Reuben D. B At 12:37 AM 4/12/01 -0700, Rasmus Lerdorf wrote: >Pick just about any country code. ie. ca.php.net, uk.php.net, >de.php.net, us2.php.net (second US mirror) > >On Thu, 12 Apr 2001, Reuben D Budiardja wrote: > > > Hi All, > > I'm in the middle of crisis. I need to meet the deadline tomorrow, and > > tonight the www.php.net seems to be down. > > Anyone know any mirror site of www.php.net? > > I need function reference and manual only, and I have been always totally > > dependence on www.php.net. So, if anyone can tell me any mirror site of > > www.php.net so that I can continue my work, that would be really-really > great. > > > > > > Thanks a lot > > Reuben D. Budiardja > > > > > > -- > > PHP General Mailing List (http://www.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]
mydb.txt username:password:email:fullname:phone what are the appropriate ways to read the mydb.txt for authentication purposes? use the FILE() or FREAD? any ideas about what functions should i use to manipulate this file? if i use file() and mydb.txt was 9mb will the array be able to hold the result? -elias http://www.kameelah.org/eassoft
Hi, I have PHP 4.0 with IIS on Win2K and I think compiled everything right. I'm not sure how this works on Win32, but on unix it's fine. It's the mail() function. ex. mail("[EMAIL PROTECTED]","My Subject","My Test"); and it returns: Warning: Server Error in C:\PHP/index.php on line 4 ANY HELP IS APPRECIATED... -Terence
in PHP.ini you have to specify the outgoing mail server: [mail function] SMTP= smtp.blah.com ; for Win32 only sendmail_from= [EMAIL PROTECTED] ; for Win32 only ;sendmail_path=;for unix only, may supply arguments as well (default is 'sendmail -t -i') -elias http://www.kameelah.org/eassoft ""Terence Truong"" <[EMAIL PROTECTED]> wrote in message 9b3o6n$6fn$[EMAIL PROTECTED]">news:9b3o6n$6fn$[EMAIL PROTECTED]... > Hi, > I have PHP 4.0 with IIS on Win2K and I think compiled everything right. > I'm not sure how this works on Win32, but on unix it's fine. It's the mail() > function. > ex. mail("[EMAIL PROTECTED]","My Subject","My Test"); > and it returns: Warning: Server Error in C:\PHP/index.php on line 4 > > > ANY HELP IS APPRECIATED... > > -Terence > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
> Hi, > I have PHP 4.0 with IIS on Win2K and I think compiled > everything right. > I'm not sure how this works on Win32, but on unix it's fine. It's > the mail() > function. > ex. mail("[EMAIL PROTECTED]","My Subject","My Test"); > and it returns: Warning: Server Error in C:\PHP/index.php on line 4 Hi Firstly, you need to add your smtp server in php.ini under the [mail function] heading ie. SMTP = smtp.mydomain.com and secondly your connection to this needs to be open. I've had php report errors before depending on whether the mail server likes \r or \n or neither. But if you're just sending the one liner like above this obviously rules that out. HTH M@
Isn't it time to give this poor guy a rest?!? -----Original Message----- From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] Sent: 11 April 2001 15:21 To: [EMAIL PROTECTED] Subject: Re: [PHP] $8 PHP hosting from Jeffrey Greer Jeffrey Greer wrote: > Is 1/2 per > year too much down time? <sarcasm> Half a year downtime? Yes, I would have a BIG problem with that. </sarcasm> AMK4 -- W | | I haven't lost my mind; it's backed up on tape somewhere. |____________________________________________________________________ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. . eFax 248.671.0909 http://www.pcraft.com . 3550 Arapahoe Ave #6 .................. . . . . Boulder, CO 80303, USA ************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. **************************************************************************
Anyone wonder if he was kidding? The part about adding mod_ssl to apache just reaks of concept comedy to me. Then again, I see a joke in every phrase... -- Plutarck Should be working on something... ...but forgot what it was. ""Greig, Euan"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Isn't it time to give this poor guy a rest?!? > > -----Original Message----- > From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] > Sent: 11 April 2001 15:21 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] $8 PHP hosting from Jeffrey Greer > > > Jeffrey Greer wrote: > > > Is 1/2 per > > year too much down time? > > <sarcasm> > Half a year downtime? Yes, I would have a BIG problem with that. > </sarcasm> > > AMK4 > > -- > W | > | I haven't lost my mind; it's backed up on tape somewhere. > |____________________________________________________________________ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 > SysAdmin / Websmith . 800.441.3873 x130 > Photo Craft Laboratories, Inc. . eFax 248.671.0909 > http://www.pcraft.com . 3550 Arapahoe Ave #6 > .................. . . . . Boulder, CO 80303, USA > > > > > ************************************************************************** > Any opinions expressed in this email are those of the individual and > not necessarily the Company. This email and any files transmitted with > it, including replies and forwarded copies (which may contain alterations) > subsequently transmitted from the Company, are confidential and solely for > the use of the intended recipient. If you are not the intended recipient > or the person responsible for delivering to the intended recipient, be > advised that you have received this email in error and that any use is > strictly prohibited. > > ************************************************************************** > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
How can i include a file as an attachment in an email? I'm looking for something like this... mail($to_email,%subject,$content,$attached_file); Thanks in advance! Dan +-------------------------------------------------------------------+ | | | If Yoda so strong in force is, | | why words in proper order he cannot put? | | | +-------------------------------------------------------------------+ | | +-------------------------------------------------------------------+ | Daniel J. Cleveland | | e-mail: [EMAIL PROTECTED]| +-------------------------------------------------------------------+
In a message dated 12/04/2001 09:55:18 GMT Daylight Time, [EMAIL PROTECTED] writes: << How can i include a file as an attachment in an email? I'm looking for something like this... mail($to_email,%subject,$content,$attached_file); Thanks in advance! Dan >> Unfortunately it`s not that easy :-) Try taking a look at the following URL which should enlighten you a bit as to whats involved. http://www.phpbuilder.com/columns/kartic20000807.php3 HtH Ade
Hi Peter I use this function in one of my scripts. Maybe you can get a few ideas from it. function WriteRadio ($FieldNo, $NOptions, $OptionValue, $Option, $SelectedValue, $NullValue) { /* The Radio function writes a group of HTML INPUT radio buttons. $OptionValue = input value $Option = the option wording in the radio button group $SelectedValue = the option value that is currently checked $NullValue = the first option is empty if true (returns all records for queries) */ if ($NullValue) { echo "<INPUT type='radio' value='' name='f[".$FieldNo."]'> N/A"; } for ($i = 0; $i <= $NOptions[$FieldNo]; $i++) { if ($OptionValue[$FieldNo][$i] == $SelectedValue) { echo "<INPUT type='radio' value='".$OptionValue[$FieldNo][$i]."' name='f[".$FieldNo."]' checked> ".$Option[$FieldNo][$i]; } else { echo "<INPUT type='radio' value='".$OptionValue[$FieldNo][$i]."' name='f[".$FieldNo."]'> ".$Option[$FieldNo][$i]; } } return 0; } Rudolf Visagie [EMAIL PROTECTED] -----Original Message----- From: Peter Houchin [mailto:[EMAIL PROTECTED]] Sent: 12 April 2001 01:33 To: Php-General@Lists. Php. Net Subject: [PHP] radio groups in looped form hiya, I have a script that repeats a form x number of times depending on how many records there are, what's happening is when i go to update my radio buttons it sees every radio button on the page as the ONE group when really it's x number of groups (again depending on how many records there are) How can i differ between raido groups with out having to get the name changed for every record after the 1st one? Peter Houchin [EMAIL PROTECTED] ========================================================= _____ __ /\ /_/_/_\ / |_/ \ /_/_/_ __ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/ v ________ ________________________________________ /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ ______ __ __ /_/ ____ __ ______ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/ ========================================================= Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 ************* We rent the dot in .COM! **************
Hey people, is this getting us anywhere at all? If you can help Greer make his site more secure, GREAT! If you can help him in any other way, fantastic! But if you have nothing constructive to offer... well, you know, replies to this thread have already created more spam than Greer himself ;-). The Hermit Hacker wrote: > On Tue, 10 Apr 2001, Jeffrey Greer wrote: > > > >what about security? are they on top of the latest versions and > > >patches.....i mean after all...it is REDHACK...... > > > > > > > I'm no security expert, but I can apply the most important patches. > > Yesterday I added mod_ssl to apache. > > Okay, can you explain how this improve the security of your RedHat server? > > > >spammers are funny people :-) > > > > > >~kurth > > > > > > > I'm not your average spammer. I am a computer scientist dedicated to > > the struggle against the fascist MS hegemony and all other fascist > > corporations who try to control computer technology. Support my > > business and you'll be doing the world a favor. ;^) > > ... and help advocate mail list spam while you are at it ... Woo Hoo ... > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Regards, Harshdeep S Jawanda.
I think 8 USD a month is good value, I pay 10 USD now on phpwebhosting.com Their admin service is down a lot, speed is acceptable. However, they had their server crashed once, all email accounts were deleted. They apparently had problems with backup. I recreated the email addresses since my business depends on it. After I recreated the email accounts they managed to delete the accounts _again_ by apparently trying to restore some ancient backup or something. My business was closed then for a week, I was out of the country so all emails sent to my addresses kept bouncing for a week. I guess it cost me revenue, I am still with that same hosting provider, didn't take the effort in moving my 2 domains .... sigh .... D. -----Original Message----- From: Jeffrey Greer [mailto:[EMAIL PROTECTED]] Sent: woensdag 11 april 2001 3:07 To: [EMAIL PROTECTED] Subject: Re: [PHP] __ $8/mo php hosting on 24/7, OC3+ web server ___ I'm not trying to provide the level of service of a large isp or even get 100 customers. I would just like to pay for my half of the web portal. I thought $8/mo for my service would be a good value for php programmers who do not need a high level of security. Would you say $8/mo is not a good value for the level of service I will provide? Web hosting is not my main business. I'm a software developer. Earlier I wrote: > I'm no security expert, but I can apply the most important patches. > Yesterday I added mod_ssl to apache. I didn't mean adding ssl is a patch. I know how to apply patches to source code and make other updates. On 10 Apr 2001 15:12:59 -0700, [EMAIL PROTECTED] ("Phillip Bow") wrote: >Hi, > I don't mean to bash, but these sort of answers don't give me a lot of >faith in the service you are starting. At the very least I expect my >service provider to provide competent answers to questions, and to know the >basics of security. > <snipped> -- Jeff Greer - B.S. computer science - Univ. MO - Rolla - I do web hosting and development. Details at http://www.singlesconnection.org/services/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
The php4win site (http://www.php4win.de/) is a good source of information on PHP running on Windows. Ok I know you said that you can't use Apache but if the specter of Notes changes your mind, PHP Triad (http://www.phpgeek.com/) is a great way to get PHP, MySQL and Apache up and running quickly. Paul > -----Original Message----- > From: Deborah Dennison [SMTP:[EMAIL PROTECTED]] > Sent: 11 April 2001 21:55 > To: [EMAIL PROTECTED] > Subject: [PHP] windows 2000 install > > Desperate and frustrated new php peep here. Trying to install php4 on > windows 2000 using IIS5. I have tried EVERYTHING. Last thing I tried was > the easyinstaller from the phpeverywhere people. No luck. Everytime I try > a > test, I get a blank page??? > > Take pity on me please!!!!!!! If I cannot get this to work I have to use > Lotus Domino (yuck) and I am signed up to take a class but have to have > php > installed first. I already bought the book. I want to use this. I like > this. But cannot get past the installation. Am I a lost cause already??? > > Is there anyone out there who has been in my shoes and worked this all > out? > Can someone give me a list of what to check etc.. Everytime I try to > install. I follow the directions and nothing seems to work. I have been to > the php.net site and no luck with those instructions either. And no, I > cannot use Apache so please don't even mention it. > > The sad thing is I had installed Apache and php4 on Windows NT in about a > 1/2 hour. Ran my phpinfo test and it worked. Then, my system config > changed > and now under 2000/IIs I cannot get it to work. Help me please....... > > Thanks So much > Deb > > P.S. I have tried sending this to the windows php list and it keeps > getting > returned so I thought I would try here > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this e-mail is confidential, may be privileged and is intended only for the use of the recipient named above. If you are not the intended recipient or a representative of the intended recipient, you have received this e-mail in error and must not copy, use or disclose the contents of this email to anybody else. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the copy you received. This email has been swept for computer viruses. However, you should carry out your own virus checks. Registered in Ireland, No. 205721. http://www.FINEOS.com
On Wednesday 11 April 2001 17:50, you wrote: > Thanks to all who suggested using include_once. Maybe it is just me > (long FORTRAN background), but the very idea of include_once makes me > nervous, and I don't use it. It violates my sense of acceptable design. > I would rather design my code such that a file is *really* only > included once, if that is what is supposed to happen. I *want* PHP to I'd say *not* using include_once () leads to worse design, because it means that for every module you have to know (a) where it is included from and (b) what is included by the files it is included from. Sounds complicated because it *is* complicated. It's much better to let each module include_once() everything it depends on. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "These are the people who proudly call themselves "hackers" -- not as the term is now abused by journalists to mean a computer criminal, but in its true and original sense of an enthusiast, an artist, a tinkerer, a problem solver, an expert." - ESR
I did, but got Internal Server Errors for several different command formats using = and " ". In the end, this format appears to work (no error message anyway, and the files upload) ... php_value max_execution_time 60 Mick > > Is it possible to override the maximum script execution time as set in > > php.ini using an Apache directive like this in an .htaccess file?: > > > > php_value max_execution_time = 60 > > What about simply trying it? :)
all the javascript cares about is the page after it is sent by php. browse the page and view source will show you what the problem is. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -----Original Message----- > From: Jack Sasportas [mailto:[EMAIL PROTECTED]] > Sent: 11 April 2001 20:37 > To: php > Subject: Javascript issue > > > I am doing a basic mouseiver on a page where some php code > also resides. > > I basically dump the top of the web page through a function page_top() > which is just passing all the html & java through a string, then pull > some db stuff out, and finally call the page_bottom() which > pulls in the > rest of the html. > > The problem is that the mouseover doesn't work within the php > page which > puts the whole thing together. > > Any ideas on how to work around this ? > > Thanks > > -- > ___________________________________________________________ > Jack Sasportas > Innovative Internet Solutions > Phone 305.665.2500 > Fax 305.665.2551 > www.innovativeinternet.com > www.web56.net > > >
Is there a manual or book on how to write php extensions, with nice and full explications?? Sebastian __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
I am trying to make a simple HTML menu system. I am having problems displaying menu links under the correct submenu from a loop. I want to be able to change web menus on the fly. I have a database with two tables. One table holds menu and sub menu headings and the other table holds the contents of each submenu (the actual menu links and names). I need to display the menu title and then the sub menu title from table 1 and then display the submenu contents or links from table 2 and then display the next set of links under the correct submenu Example output would look like this: Say person clicks on Admin menu which is already displayed then the networking submenu heading will display along with the submenu links: Example: Admin (main menu title from db table 1) Networking (submenu title , from db table 1 ping (Link to ping from db table 2) traceroute (Link to ping from db table 2) nsloopup etc........ I don't know how to go about outputing the links under the correct submenu. The main menu is no problem. I am thinking I would need a loop within a loop. The query I use: $query = "SELECT * FROM menutable, elementstable WHERE menutable.menutable_id = elementstable.menuid AND menutable.mainmenu = 'Admin' "; $result = mysql_db_query("menus", $query); This loop simply assigns variables and prints out all output under the main menu called Admin. The problem is how do I display while ($r = mysql_fetch_array($result)) { // start menu table (table holds main menu/sub menu headings $menutable_id = $r["menutable_id"]; $menunumber = $r["menunumber"]; $mainmenu = $r["mainmenu"]; $submenu = $r["submenu"]; // start elements table (table that holds the links and names of each link) // element_id references menu table $element_id = $r["element_id"]; $element = $r["element"]; $url = $r["url"]; $menuid = $r["menuid"]; // next display data this is wrong cause it displays 1 submenu and 1 link looping ?> <TD><? echo "$submenu"; ?></TD> <TD><a href="<? echo "$url"; ?> "> <? echo "$element"; ?></a> </TD> <? // this doesn't work if ($menutable_id == $menuid) { ?> <TD><? echo "equal $submenu"; ?></TD> <? // print "both equal"; // // $b = $a; } ?> Notes: // outer loop display submenus (when submenu changes display next set of elements or links from inner loop) if submenu changes then display next set of menu links for that submenu // inner loop display elements or links for that submenu until sub menu changes MySQL and PHP4 latest using Linux OS
Honestly, I still don't get you. How can the client's Word not open if the script didn't make it open with COM. ----- Original Message ----- From: Hoover, Josh <[EMAIL PROTECTED]> To: 'Pierre-Yves Lemaire' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, 11 April, 2001 10:31 PM Subject: RE: [PHP] Are calling COM applications a trojan? > >And, I read a book saying that you can open a word document on the client > >side and insert words in it. > > Are you sure this was done on the client side and not on the server side? > Here is a common example used to show a simple use of COM and PHP: > > $word=new COM("word.application") or die("Cannot start word for you"); > print "Loaded word version ($word->Version)\n"; > $word-visible =1 ; > $word->Documents->Add(); > $word->Selection->Typetext("Dit is een test"); > $word->Documents[1]->SaveAs("burb ofzo.doc"); > $word->Quit(); > > This does not work on the client. PHP is on the server side. COM is used > to access local objects, not remote ones. So, in the example, PHP is using > word on the server and opening a document and saving it on the server. This > has nothing to do with a client. The use of COM and PHP would mainly be for > PHP to access COM objects that a business has currently in other > applications. Many times it would be nice for PHP to utilize objects > already written, and in the Windows world right now those objects are > normally accessible via COM if they're accessible at all. > > Josh Hoover > KnowledgeStorm, Inc. > [EMAIL PROTECTED] > > Searching for a new IT solution for your company? Need to improve your > product marketing? > Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify > the process for you. > KnowledgeStorm - Your IT Search Starts Here >
> Honestly, I still don't get you. > > How can the client's Word not open if the script didn't make it open with > COM. ????? Anyway, The only way PHP can make Word open on a clients machine is if a word document is sent to the client, or the clients browser believes that is receiving a word document. You may be able to open word and insert text client side by using activex or vbscript but PHP is server side and cannot spawn Word on a clients machine using COM. You would have to use COM server side to create the document the send it to the browser NB. This requires word to be installed server side. M@
On my first page I have a form that posts a value to page2 where it gets registered in a session. Works like a charm... When I try to do this again, but send another value, the session doesn´t update the new value. Why? PAGE 1 ---> <form action="page2.php" method="post"> <input type="text" name="value" size="30"> <input type="submit" name="submit"> </form> PAGE 2 ---> <? session_start(); session_register("value"); ?> Thanks, // Tobias
What happens is when you use session_start(), all variables in the session become initialized to the values they have previously been given. So when you call session_start the second time, a variable named $value is created with the value it was given earlier. The problem is, it over-writes the variable $value which was submitted in the form. The way to get around this is to rename your form to "form_value". Then right after you register value in your session, insert this: $value = $form_value; It should work without error. -- Plutarck Should be working on something... ...but forgot what it was. ""Tobias Talltorp"" <[EMAIL PROTECTED]> wrote in message 9b431b$fau$[EMAIL PROTECTED]">news:9b431b$fau$[EMAIL PROTECTED]... > On my first page I have a form that posts a value to page2 where it gets > registered in a session. Works like a charm... > When I try to do this again, but send another value, the session doesn´t > update the new value. > Why? > > PAGE 1 ---> > <form action="page2.php" method="post"> > > <input type="text" name="value" size="30"> > <input type="submit" name="submit"> > > </form> > > > PAGE 2 ---> > <? > session_start(); > session_register("value"); > ?> > > Thanks, > // Tobias > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hey there guys; I have been going hard at this problem for a while now, but at the end of the day, I always get the same error. Unfortunately I have a deadline that I have to meet :( k, here is the error (I am sure you have all seen this one before): Warning: Unable to create '/home/httpd/www/g0thic/cawood_files/email.html': No such file or directory in /home/httpd/www/g0thic/cawood/edit_f.php on line 31 now, I have done some extensive checking, and this is the same script /html file used to upload the file, the interesting part is that the file is in the /tmp/ directory before and after upload. I am running the script to list the contents of the /tmp directory BEFORE AND AFTER attempting the copy routine: copy($f_loc,$destination.''.$f_loc_name); Contents of $destination = /home/httpd/www/g0thic/cawood_files/ the entire copy string looks like this (of course this is after the variables have been populated): /tmp/phpE85ySu,/home/httpd/www/g0thic/cawood_files/email.html Ok, you will probably ask what the perms of ./cawood_files/ is, I have chmod'd them to 777, the perms of /tmp are also @ 777. I know the destination is created correctly, because this is the string I am using: $destination = "$DOCUMENT_ROOT/cawood_files/"; and ./cawood_files/ is a valid directory, I used the Apache $DOCUMENT_ROOT variable to provide consistency if I ever changed the location of the /cawood_files directory. Below are just a few extras: //BEGIN UPLOAD FILE SEQUENCE global $fldf_loc; global $destination; //LISTING DIR BEFORE COPY $handle=opendir('/tmp/'); while ($file = readdir($handle)) { if ($file != "." && $file != ".." && $file != "xml-edifact" && $file != ".qmail-qread" && $file != ".font-unix" && $file != ".esd" && $file != ".qmail-qstat") { echo "$file<BR>"; } } closedir($handle); //COPY FILE copy($f_loc,$destination.''.$f_loc_name); //LISTING DIR AFTER COPY (using different variables just to make sure) $extra_handle=opendir('/tmp/'); while ($extra_file = readdir($handle)) { if ($extra_file != "." && $extra_file != ".." && $extra_file != "xml-edifact" && $extra_file != ".qmail-qread" && $extra_file != ".font-unix" && $extra_file != ".esd" && $extra_file != ".qmail-qstat") { echo "$extra_file<BR>"; } } closedir($handle); //ECHO COPY PARAMETERS echo "<BR>$f_loc,$destination$f_loc_name<BR>"; Any ideas? Cheers,
Hi I'm implementing a simple keyword search. I want the results to be displayed with the keywords highlighted. I am currently using this to highlight the keywords str_replace($string,"<b>$string</b>",$field); If I search for php, it will find PHP, PhP etc... but using the above only php will will be highlighted, not PHP. I've tried eregi_replace but I could only get that to change the case and highlight that ie. PHP would become php. Can anyone point me in the direction of how to highlight the string regardless of case but keep the case for the match. TIA M@
You'll probably want to use preg_replace. For instance: $string = "/(PHP)/i"; $target = "Please highlight PhP for me."; echo $target, '<br>'; $target = preg_replace($string, "<b>\\1</b>", $target); echo $target, '<br>'; \\1 is whatever was found in the first parentheses(sp). -- Plutarck Should be working on something... ...but forgot what it was. ""Matt Williams"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > > I'm implementing a simple keyword search. > I want the results to be displayed with the keywords highlighted. > I am currently using this to highlight the keywords > > str_replace($string,"<b>$string</b>",$field); > > If I search for php, it will find PHP, PhP etc... but using the above only > php will will be highlighted, not PHP. > I've tried eregi_replace but I could only get that to change the case and > highlight that ie. PHP would become php. > > Can anyone point me in the direction of how to highlight the string > regardless of case but keep the case for the match. > > TIA > > M@ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Sorry for vague subject, only so many things you can put in there ... I'm looking for someone way, in PHP4, to take a "form/template" for a letter on the server side, pass it to the client, let them edit it (including markup tags like bold and underline) and then pass it back to the server ... It has to be relatively transparent to the end user ... I don't want to have to teach them to put <B></B> tags around where they want bold ... I'm not particular on editor ... right now, if I have to force the client to install StarOffice for commonality across platforms, I'll do that and expand from that ... but some way of 'click here, download doc to computer, open up file with <insert editor of choice>, save back to server (if possible)' ... Ideas? thanks ... Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy Systems Administrator @ hub.org primary: [EMAIL PROTECTED] secondary: scrappy@{freebsd|postgresql}.org
You can let the users edit online a form which returns html code, it is called dhtmled, you can find it on msdn.microsoft.com http://msdn.microsoft.com/workshop/author/dhtml/edit/default.asp If you play with it a bit, you will find a way to upload a html doc to the client, let him edit and send it back. Regards, D. -----Original Message----- From: The Hermit Hacker [mailto:[EMAIL PROTECTED]] Sent: donderdag 12 april 2001 14:55 To: [EMAIL PROTECTED] Subject: [PHP] Editors ... calling them, or PHP-based one? Sorry for vague subject, only so many things you can put in there ... I'm looking for someone way, in PHP4, to take a "form/template" for a letter on the server side, pass it to the client, let them edit it (including markup tags like bold and underline) and then pass it back to the server ... It has to be relatively transparent to the end user ... I don't want to have to teach them to put <B></B> tags around where they want bold ... I'm not particular on editor ... right now, if I have to force the client to install StarOffice for commonality across platforms, I'll do that and expand from that ... but some way of 'click here, download doc to computer, open up file with <insert editor of choice>, save back to server (if possible)' ... Ideas? thanks ... Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy Systems Administrator @ hub.org primary: [EMAIL PROTECTED] secondary: scrappy@{freebsd|postgresql}.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]
Ick...I'd say it's a good idea, but it's going to be a bi...tter fight with technology. First, you have to have some application do the loading/unloading. PHP can't do that, of course. But, you could use some form of java...but you'd have to get fancy. Or you could just use file upload in a form, which is easier. If you do that, you need only parse out the file. The best way to do that is pick a text format that does what you want it to do, and is universal across platforms. You don't even need to worry about the editor they use, as long as it's saved in the proper format. I reccomend you use either a word document, or perhaps Rich Text Format is best (rtf). Then you just have to figure out how text is saved in that format, and viola. You just use PHP to go from there... ...I'm sure it's easier said than done, and I have absolutely no clue how the content of rtf files is different from txt (but I'd love to know!), but I can see it being very possible if you pick only a few standard file formats, and use the file upload features. It's actually a very good idea. I'm surprised no one has done it...which should probably worry you ;) -- Plutarck Should be working on something... ...but forgot what it was. "The Hermit Hacker" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Sorry for vague subject, only so many things you can put in there ... > > I'm looking for someone way, in PHP4, to take a "form/template" for a > letter on the server side, pass it to the client, let them edit it > (including markup tags like bold and underline) and then pass it back to > the server ... > > It has to be relatively transparent to the end user ... I don't want to > have to teach them to put <B></B> tags around where they want bold ... > > I'm not particular on editor ... right now, if I have to force the client > to install StarOffice for commonality across platforms, I'll do that and > expand from that ... but some way of 'click here, download doc to > computer, open up file with <insert editor of choice>, save back to server > (if possible)' ... > > Ideas? > > thanks ... > > Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy > Systems Administrator @ hub.org > primary: [EMAIL PROTECTED] secondary: scrappy@{freebsd|postgresql}.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] >
Anyone else having probs getting through? Or is it just me? Been trying since the wee hours (GMT). -- Matt Kynaston remove the green eggs before replying
I have a php script which is like a modified shopping cart. It starts with a search that calls a perl script ( I know, but it's the only way I can include certain proprietary functionality I need). This returns a results set of documents that can be either downloaded or requested depending on permissions. If you click to request a document a php script request.php is called it is sort of like a cart script, and uses phplib sessions and db_oci8. The strange problem I am having is this: If it is the first time you have reqeusted this script since last opening your browser, you will get a 404, if you hit back/forward or refresh the script works fine as if nothing ever happened. You will not get this error again as long as you do not close and reopen your browser. Any ideas?
That sounds like a problem with the way you handle sessions. What happens is your program tries to start a session, but the page isn't sent if a session isn't started. It still shouldn't reply with a 404 though...search your script for header and see if you send any. Once someone has the session, then the page will load correctly. Muck through your php code and see if there are any conditions or loops which require a session to be running. Still, that shouldn't happen and it's probably one of those bugs that you can't figure out why they happen, or what causes them, but after tinkering around suddenly everything works. One thing to try, if it's available, is use the ob_* functions as a debugger. Stick an obstart at the begining and a ob_end_flush at the end, and see if the problem disappears magically. Odd what sometimes fixes things... -- Plutarck Should be working on something... ...but forgot what it was. ""Mark"" <[EMAIL PROTECTED]> wrote in message 9b4ar1$t6i$[EMAIL PROTECTED]">news:9b4ar1$t6i$[EMAIL PROTECTED]... > I have a php script which is like a modified shopping cart. > > It starts with a search that calls a perl script ( I know, but it's the only > way I can include certain proprietary functionality I need). This returns a > results set of documents that can be either downloaded or requested > depending on permissions. > > If you click to request a document a php script request.php is called it is > sort of like a cart script, and uses phplib sessions and db_oci8. > > The strange problem I am having is this: > > If it is the first time you have reqeusted this script since last opening > your browser, you will get a 404, if you hit back/forward or refresh the > script works fine as if nothing ever happened. You will not get this error > again as long as you do not close and reopen your browser. Any ideas? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >