php-general Digest 11 Jan 2001 23:50:32 -0000 Issue 449 Topics (messages 33965 through 34156): Re: HTTP autentification] 33965 by: Michal Thomka Re: file uploading error - can't upload "none" 33966 by: WreckRman2 Stripping!!! 33967 by: K.Simon 33969 by: Moritz Petersen 34003 by: K.Simon 34032 by: Robin Vickery 34034 by: K.Simon PHP Programmer needed! 33968 by: K.Simon Re: declaring variables in class definitions 33970 by: Max A. Derkachev Check for spaces.. 33971 by: David Smith 34049 by: Jason Murray Iterating Multidimensional Arrays 33972 by: Cybercandy Ltd 33974 by: Cybercandy Ltd 33977 by: Abe Asghar 34139 by: Richard Lynch Dynamic 'left menu's' on site: Like a windows explorer system??? 33973 by: Yoeri De Bruyn 33976 by: Sander Pilon 33979 by: Hrishi 34133 by: Alex Black 34152 by: Josh G 34156 by: DanO Re: Running java under php4 (PHP4 ext/java) 33975 by: Eduard Witteveen 34022 by: Fraser MacKenzie 34024 by: Cynic Help---using pdfs with PHP 33978 by: Sam 34140 by: Richard Lynch Special Characters 33980 by: TV Karthick Kumar OS X 33981 by: Abe Asghar 33982 by: defender of the protocol 33996 by: Mathias Meyer 34059 by: Alex Black 34084 by: Michael Stearne running scripts 33983 by: DonJuan 34004 by: Sebastian Stadtlich 34134 by: Alex Black Re: Shopping Cart Schema - Sessions 33984 by: Paul K Egell-Johnsen 33987 by: Alexander Wagner 33993 by: Michael Kimsal 33997 by: Paul K Egell-Johnsen 34001 by: Paul K Egell-Johnsen 34006 by: Alexander Wagner 34012 by: Paul K Egell-Johnsen 34015 by: Michael Kimsal Re: PHP programmer needed. 33985 by: K.Simon 33999 by: K.Simon 34000 by: K.Simon 34002 by: Jon Haworth BIG site names using PHP? 33986 by: Monte Ohrt 34042 by: Philip Olson Re: Good and working documentation generator 33988 by: Paul K Egell-Johnsen Re: PHP simulator 33989 by: John Meyerhofer Re: AFTERBURNER - PHP CACHE 33990 by: Michael Kimsal Re: cool OOP-phenomena! 33991 by: Paul K Egell-Johnsen Re: looking for a PHP editor 33992 by: Miles Thompson Re: Session Mgmt in MySQL - cleanup 33994 by: Hardy Merrill Netscape does not show all the variables 33995 by: Sam 34008 by: Cynic 34016 by: Paul K Egell-Johnsen 34018 by: Sam 34021 by: Cynic 34135 by: Alex Black Content Pulls 33998 by: Wacks, David 34007 by: Alan Todd mysql index (semi ot) 34005 by: Larry Hotchkiss 34025 by: Paul K Egell-Johnsen Re: PHP makes sexy! 34009 by: Dieter Kneffel 34014 by: Michael Kimsal 34033 by: Dieter Kneffel 34039 by: WreckRman2 34043 by: Dieter Kneffel Re: include path confusion 34010 by: Randy 34013 by: Randy 34020 by: Paul K Egell-Johnsen 34038 by: Brian Clark 34040 by: Brian Clark Redhat 7 problem and fix 34011 by: Michael Kimsal 34143 by: Richard Lynch Managing MySQL over the web using PHP 34017 by: Nyon 34037 by: David Tod Sigafoos Re: SSH file transfers 34019 by: Sam Leibowitz 34088 by: Rouvas Stathis space increment 34023 by: Wee Chua 34054 by: Jason Murray passing data to another php page. 34026 by: jim davis 34027 by: Jeroen Wesbeek Post automaticly 34028 by: Knut Sćtre 34141 by: Richard Lynch session problems 34029 by: Marco A. López Villa Easy MySQL question 34030 by: Paulson, Joseph V. \"Jay\" 34036 by: Nicolas Windpassinger - Sun Re: [PHP-DB] Easy MySQL question 34031 by: Julie Meloni Lost connection to MySQL server during query 34035 by: Tim Colles 34142 by: Richard Lynch Re: FATAL: emalloc() error 34041 by: Justin Smith Re: How can I get a random number 34044 by: Carsten Gehling number of users currently on web 34045 by: Gregor 34047 by: Sebastian Stadtlich 34148 by: Alex Black how to track haeder trouble??? 34046 by: Sebastian Stadtlich 34081 by: Steve Edberg 34117 by: Aaron Gardner problem with rewind 34048 by: Jorge Inti Benites Roche 34050 by: O.Cook.etoncollege.org.uk 34052 by: Sebastian Stadtlich 34055 by: Jorge Inti Benites Roche Re: php binary? 34051 by: Jason Murray 34053 by: jeremy brand 34124 by: Brian White Re: [PHP-DB] Autonomous Mass Mail List System (Broadcast Email) 34056 by: jeff saenz .php file works but php script in html file does not work 34057 by: Yun Wan 34061 by: Philip Olson Multiform Woes 34058 by: Todd H MacPherson 34066 by: Todd H MacPherson Re: File Uploading Security - Urgent please 34060 by: Alex Black returning an array 34062 by: jim davis 34067 by: Ignacio Vazquez-Abrams 34073 by: Philip Olson Create Multiple Virtual Directory in Apache 34063 by: Roberto Ulises Pérez Quijano Walking Through Array Values, Simple? 34064 by: JB 34069 by: Ignacio Vazquez-Abrams Re: apple-macintosh 34065 by: MacTrom 34130 by: Alex Black Performance question 34068 by: John Guynn 34070 by: Ignacio Vazquez-Abrams 34083 by: Steve Edberg 34086 by: Chris Lee Re: PHP newbie question 34071 by: Neil Zanella 34074 by: Ignacio Vazquez-Abrams Sessions, no cookies and enable-trans-sid, oh my 34072 by: Boget, Chris 34080 by: Chris Lee 34085 by: Boget, Chris 34093 by: Boget, Chris 34153 by: Chris Hayes help database creation.... 34075 by: Jesus Nava 34078 by: Ignacio Vazquez-Abrams 34095 by: Web master serialized respresentations of variables 34076 by: TR Henigson 34079 by: Ignacio Vazquez-Abrams problem with rewind 2 34077 by: Jorge Inti Benites Roche 34092 by: Moritz Petersen JavaScript/PHP documentation 34082 by: Neil Zanella 34144 by: Richard Lynch <?= was born when? 34087 by: Philip Olson 34145 by: Richard Lynch Re: Accessing Common Log Format (CLF) info. 34089 by: Rouvas Stathis What a session is on php? 34090 by: Jesus Nava 34091 by: Philip Olson Re: mixing HTML and PHP code 34094 by: burk.pobox.com 34128 by: Alex Black 34131 by: Jason Murray 34154 by: Chris Lee Re: Removing spaces from a string 34096 by: Monte Ohrt Extending PHP 34097 by: Jason Lee 34098 by: Cynic PHP3 vs PHP4? 34099 by: ncook 34100 by: jeremy brand 34103 by: Maciek Uhlig Function -> Sending URL's 34101 by: Abe Asghar 34104 by: DanO 34105 by: Cal Evans 34106 by: Abe Asghar 34107 by: DanO 34108 by: Abe Asghar 34109 by: Abe Asghar 34110 by: Cal Evans 34114 by: Hsieh, Wen-Yang 34116 by: DanO 34120 by: Abe Asghar 34150 by: Alex Black Re: [PHP-DB] Cannot send session cache limiter - headers already sent Cannot send session cookie - headers already sent by 34102 by: JJeffman Making PHP Hold the hundreth place, instead of dropping the 0 34111 by: JB 34113 by: Cynic 34115 by: Cal Evans PHP 4.0.4 patchlevel 1 released 34112 by: Zeev Suraski Whats wrong with the following code? 34118 by: Web master 34119 by: Hsieh, Wen-Yang 34121 by: Web master killing the session 34122 by: Angel Behar 34125 by: Jon Rosenberg 34146 by: Richard Lynch ik 34123 by: philex.ifrance.com 34147 by: Richard Lynch Easy Path ? 34126 by: Chris 34127 by: Jason Murray Replace a space with _ 34129 by: David Smith 34155 by: Chris Lee globals broke 34132 by: Jon Rosenberg 34149 by: Chris Lee Re: Change Array Data 34136 by: Richard Lynch Re: Cookies 34137 by: Richard Lynch Re: image through php 34138 by: Richard Lynch unsubscribe [EMAIL PROTECTED] 34151 by: Alex Black Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
You can find usefull information also on http://www.phpbuilder.com br Michal ps: slovania si musia pomahat..;D -- **************************** Michal Thomka Programmer/Developer _______________________ surfEU.com GmbH Nordbahnstrasse 36/1/3 A-1020 Wien Tel: +43 1 9989777-208 Fax: +43 1 9989777-200 mailto: [EMAIL PROTECTED] http://www.surfeu.at/ **************************** -------- Original Message -------- Subject: Re: [PHP] HTTP autentification Date: Thu, 11 Jan 2001 12:45:26 +0100 From: "Pavel Kalian" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> http://www.php.net/manual/features.http-auth.php Pavel P.S. Manual je nekdy docela prima cteni. ;-) ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 12:42 PM Subject: [PHP] HTTP autentification > Please, can you send me where could I find more information about > HTTP autentification and PHP support. > > 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]
Fixed... <? if ($FileType== "none") { print "ERROR! - You must specify a File Type before we can begin the upload.<BR>"; } else { if ($filezip== "none") { print "ERROR! - You must specify a zip file to upload.<BR>"; } else { copy($filezip, "/home/sites/site1/ftp/$FileType/$filezip_name"); unlink($filezip); } if($fileimage== "none") { $fileimage_name = 'nopic.jpg'; } else { copy($fileimage, "/home/sites/site1/ftp/$FileType/$fileimage_name"); unlink($fileimage); } if($filezip_size >= 1048576) { $filezip_size = round($filezip_size / 1048576 * 100) / 100 . " Meg"; } elseif($filezip_size >= 1024) { $filezip_size = round($filezip_size / 1024 * 100) / 100 . " Kb"; } else{ $filezip_size = $filezip_size . " Bytes"; } $FileDate = date("Y-m-d H:i:s"); } ?> -----Original Message----- From: David Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 5:45 AM To: 'Php-General@Lists. Php. Net' Subject: [PHP] file uploading error - can't upload "none" Below is my code. I am uploading an image and a zip file only I want to make it insert nopic.jpg if they don't upload an image. When I change if($fileimage== "none") { to if($fileimage== "none") { $FileImage = 'nopic.jpg'; } else { $FileImage = $fileimage_name; } I get error can't upload "none" Is there a fix for this? ---------------------------- <? if ($FileType== "none") { print "ERROR! - You must specify a File Type before we can begin the upload.<BR>"; } else { if ($filezip== "none") { print "ERROR! - You must specify a zip file to upload.<BR>"; } elseif($fileimage== "none") { print "ERROR! - You must specify an image file to upload.<BR>"; } else { copy($filezip, "/home/sites/site1/ftp/$FileType/$filezip_name"); copy($fileimage, "/home/sites/site1/ftp/$FileType/$fileimage_name"); unlink($filezip); unlink($fileimage); if($filezip_size >= 1048576) { $filezip_size = round($filezip_size / 1048576 * 100) / 100 . " Meg"; } elseif($filezip_size >= 1024) { $filezip_size = round($filezip_size / 1024 * 100) / 100 . " Kb"; } else{ $filezip_size = $filezip_size . " Bytes"; } $FileDate = date("Y-m-d H:i:s"); } } ?> Thanks... 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]
I have a file with 45000 newsgroups in there. It looks like that: alt.1d 0000070753 0000057290 y alt.2600 0000515487 0000435743 y alt.3d 0000073441 0000059461 y alt.abortion.inequity 0000272142 0000227847 y alt.abuse-recovery 0000000036 0000000036 m alt.abuse.recovery 0000137940 0000021046 y alt.acting 0000052147 0000005774 y alt.activism 0000541011 0000437813 y alt.activism.d 0000050394 0000047001 y alt.activism.death-penalty 0000192721 0000097832 y Now i want to strip all the numbers out (not really all) so that it look like this: alt.1d alt.2600 alt.3d alt.abortion.inequity alt.abuse-recovery alt.abuse.recovery How can this be done with PHP?
with every line do the following to get the name: $name = strtok($line, " "); Mo. > -----Original Message----- > From: K.Simon [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 1:19 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Stripping!!! > > > I have a file with 45000 newsgroups in there. It looks like that: > > alt.1d 0000070753 0000057290 y > alt.2600 0000515487 0000435743 y > alt.3d 0000073441 0000059461 y > alt.abortion.inequity 0000272142 0000227847 y > alt.abuse-recovery 0000000036 0000000036 m > alt.abuse.recovery 0000137940 0000021046 y > alt.acting 0000052147 0000005774 y > alt.activism 0000541011 0000437813 y > alt.activism.d 0000050394 0000047001 y > alt.activism.death-penalty 0000192721 0000097832 y > > Now i want to strip all the numbers out (not really all) so that > it look like this: > > alt.1d > alt.2600 > alt.3d > alt.abortion.inequity > alt.abuse-recovery > alt.abuse.recovery > > How can this be done with PHP? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Thx, but could anybody give me an example? It shouldnt be too hard?! *********** REPLY SEPARATOR *********** On 11/01/2001 at 13:50 Moritz Petersen wrote: >with every line do the following to get the name: > >$name = strtok($line, " "); > >Mo. > >> -----Original Message----- >> From: K.Simon [mailto:[EMAIL PROTECTED]] >> Sent: Thursday, January 11, 2001 1:19 PM >> To: [EMAIL PROTECTED] >> Subject: [PHP] Stripping!!! >> >> >> I have a file with 45000 newsgroups in there. It looks like that: >> >> alt.1d 0000070753 0000057290 y >> alt.2600 0000515487 0000435743 y >> alt.3d 0000073441 0000059461 y >> alt.abortion.inequity 0000272142 0000227847 y >> alt.abuse-recovery 0000000036 0000000036 m >> alt.abuse.recovery 0000137940 0000021046 y >> alt.acting 0000052147 0000005774 y >> alt.activism 0000541011 0000437813 y >> alt.activism.d 0000050394 0000047001 y >> alt.activism.death-penalty 0000192721 0000097832 y >> >> Now i want to strip all the numbers out (not really all) so that >> it look like this: >> >> alt.1d >> alt.2600 >> alt.3d >> alt.abortion.inequity >> alt.abuse-recovery >> alt.abuse.recovery >> >> How can this be done with PHP? >> >> >> -- >> PHP General Mailing List (http://www.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]
>>>>> "S" == "K Simon" <[EMAIL PROTECTED]> writes: > Thx, but could anybody give me an example? It shouldnt be too hard?! If you feel you have to do it in php then this should work. You'd save a lot of effort if you used the unix 'cut' command though. cut -d ' ' -f 1 inputfile.txt > outputfile.txt is equivalent to (but considerably faster than) this: <?php $in_file = fopen( "inputfile.txt", "r" ) or die( "failed to open input file." ); $out_file = fopen( "outputfile.txt", "w" ) or die( "failed to open output file." ); while ( !feof($in_file) ) { fwrite( $out_file, strtok(fgets($in_file, 1024), " ") . "\n"); } fclose ($in_file); fclose ($out_file); ?> -- Still nothing
Ok Robin, Many Thx! *********** REPLY SEPARATOR *********** On 11/01/2001 at 16:13 Robin Vickery wrote: >>>>>> "S" == "K Simon" <[EMAIL PROTECTED]> writes: > > > Thx, but could anybody give me an example? It shouldnt be too hard?! > > >If you feel you have to do it in php then this should work. You'd save >a lot of effort if you used the unix 'cut' command though. > >cut -d ' ' -f 1 inputfile.txt > outputfile.txt > >is equivalent to (but considerably faster than) this: > ><?php > >$in_file = fopen( "inputfile.txt", "r" ) or die( "failed to open input file." ); >$out_file = fopen( "outputfile.txt", "w" ) or die( "failed to open output file." ); > >while ( !feof($in_file) ) { > fwrite( $out_file, strtok(fgets($in_file, 1024), " ") . "\n"); >} > >fclose ($in_file); >fclose ($out_file); > >?> > > >-- >Still nothing > >-- >PHP General Mailing List (http://www.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 want to open a domain registration company and i started to write a program myself because i couldnt find software which fits my needs and OpenSRS was not a choice for me. The software i am doing is basically a whois search and a mysql shopping cart (taken from a scripts found out there). Now as i am not a PHP programmer and I have to do more things i am at an death end. I need an programmer who's able to continue and finish fastly this project with me. After we would think about if we release it as GPL or commercial. Please contact me urgently under [EMAIL PROTECTED] Thx
Hello sam1600, Wednesday, January 10, 2001, 9:55:34 PM, you wrote: sic> Assigning something to $d->somevar when it is not declared in the sic> definition works fine. Well, if it still does assign to an undefined class property, I'm not sure that this behavior will remain in the future since it violates the OOP paradigm. It looks like a bug, not a feature to me. I'm not sure that PHP should invent its own OOP style. Once in the morning after update to a new PHP version you'll find that you classes won't work anymore if you do such things. sic> As far as I can tell, and from what we have found here, there is sic> absolutly no reason whatsoever to define variables in class definitions. The classes in PHP are intended to be used as a structured data storage. To use a structure, you should define it first. I guess its no good to have, e.g. two objects of the same class of completely different structure. Btw, there is absolutely no reason to use classes at all with your approach. OOP code in PHP works slower than plain procedural code, and if you have no structure, why use classes? sic> If someone can show me me a reason , other than a pure aesthetics, sic> why this is nessesary I would sure like to know. If anyone could sic> show me at least one example where not defining variables in class sic> definitions would somehow break the class, I would like to see it. See above. It's not only an aesthetics. It's a standard. Moreover, it's a common sense. Try to imagine what will say other developer which may use or maintain your code looking at this mess. -- Best regards, Max A. Derkachev mailto:[EMAIL PROTECTED] Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia
With the following code how can I check to see if the file being uploaded has a space in it? Maybe replace them with a _ or reject them all together... if ($FileType== "none") { print "ERROR! - You must specify a File Type before we can begin the upload.<BR>"; } else { if ($filezip== "none") { print "ERROR! - You must specify a zip file to upload.<BR>"; } else { copy($filezip, "/home/sites/site1/ftp/$FileType/$filezip_name"); unlink($filezip); } WreckRman2 Combat Flight Center http://www.combatfs.com
David Smith wrote: > > With the following code how can I check to see if the file being uploaded > has a space in it? Maybe replace them with a _ or reject them all > together... > I think you want: $new_fname = ereg_replace("[[:space:]]+", "_", $fname); Greetings, Jason -- Jason Murray Developer jWeb New Media Design 1 877 525 jWEB
I'm a bit stuck on this issue The following script produces a result that I can't get my head round: <? $allan[1][0] = 1; $allan[1][1] = "Alpha"; $allan[2][0] = 2; $allan[2][1] = "Beta"; While ($output = each($allan)){ print $output[1]; } ?>
sorry previous message was incomplete: I'm trying to get my head around multidimensional arrays and iterating using each(). I don't get why this script: <? $allan[1][0] = 1; $allan[1][1] = "Alpha"; $allan[2][0] = 2; $allan[2][1] = "Beta"; While ($output = each($allan)){ print $output[1]; } ?> prints ArrayArray rather than AlphaBeta can someone help me clear the fog? Allan
Hey there, try this... <? $allan[1][0] = 1; $allan[1][1] = "Alpha"; $allan[2][0] = 2; $allan[2][1] = "Beta"; reset($allan); echo "This is after"; while (list ($key1) = each ($allan)) { echo "$key1<br>\n"; while (list ( , $val) = each ($allan[$key1])) { echo " - $val<br>\n"; } } ?> Abe ----- Original Message ----- From: "Cybercandy Ltd" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 12:57 PM Subject: [PHP] iterating multidimensional arrays > sorry previous message was incomplete: > > I'm trying to get my head around multidimensional arrays and iterating using > each(). > > I don't get why this script: > > <? > > $allan[1][0] = 1; > $allan[1][1] = "Alpha"; > $allan[2][0] = 2; > $allan[2][1] = "Beta"; > > While ($output = each($allan)){ > print $output[1]; > } > > ?> > > prints ArrayArray > > rather than AlphaBeta > > can someone help me clear the fog? > > Allan > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
What output did you get? What did you expect? ----- Original Message ----- From: "Cybercandy Ltd" <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, January 11, 2001 6:54 AM Subject: [PHP] Iterating Multidimensional Arrays > I'm a bit stuck on this issue > > The following script produces a result that I can't get my head round: > > <? > > $allan[1][0] = 1; > $allan[1][1] = "Alpha"; > $allan[2][0] = 2; > $allan[2][1] = "Beta"; > > While ($output = each($allan)){ > print $output[1]; > } > > ?> > > > > -- > PHP General Mailing List (http://www.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 need to change my static left menu's into more dynamic ones, like when you click one title of the menu, it shows it sub menu etc. Any body knows if that can be achieved using PHP? Or should i repel on other techniques? If someone did make similar stuff, could you please send me an example or some good ideas? Thanks a lot in advance!!!! Yoeri.
> Hi, > > I need to change my static left menu's into more dynamic ones, like when > you click one title of the menu, it shows it sub menu etc. > > Any body knows if that can be achieved using PHP? Or should i repel on > other techniques? > If someone did make similar stuff, could you please send me an example > or some good ideas? > > Thanks a lot in advance!!!! > Yoeri. Such dynamic (no-reload) behaviour can only be achieved in a client side-solution. DHTML, java or flash is what you are looking for.
take a look at phpmyadmin. they have something similar. i cant remember the URL (and i'm too lazy) but u can find it from http://freshmeat.net/projects/phpmyadmin
you have two choices: yes, php can do it, but as php is a server side language, you have to refresh the page... or, you can go the much-more-dangerous-and-much-less-likely-to-work-on-many-browsers javascript route. I suggest the first :) if you _do_ end up writing some good code, please make a library out of it and send it along! :) -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] ("Yoeri De Bruyn") > Newsgroups: php.general > Date: 11 Jan 2001 04:56:47 -0800 > Subject: [PHP] Dynamic 'left menu's' on site: Like a windows explorer > system??? > > Hi, > > I need to change my static left menu's into more dynamic ones, like when > you click one title of the menu, it shows it sub menu etc. > > Any body knows if that can be achieved using PHP? Or should i repel on > other techniques? > If someone did make similar stuff, could you please send me an example > or some good ideas? > > Thanks a lot in advance!!!! > Yoeri. > > > -- > PHP General Mailing List (http://www.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 have a working javascript system for this, email me anybody if you want it. Note - It's a hulluva lot harder than you think to write.... Gfunk My name was Brian McGee, I stayed up listening to Queen, When I was seventeen. http://www.gfunk007.com/ ----- Original Message ----- From: "Alex Black" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 12, 2001 10:30 AM Subject: Re: [PHP] Dynamic 'left menu's' on site: Like a windows explorersystem??? > you have two choices: > > yes, php can do it, but as php is a server side language, you have to > refresh the page... > > or, you can go the > much-more-dangerous-and-much-less-likely-to-work-on-many-browsers javascript > route. > > I suggest the first :) > > if you _do_ end up writing some good code, please make a library out of it > and send it along! :) > > -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] ("Yoeri De Bruyn") > > Newsgroups: php.general > > Date: 11 Jan 2001 04:56:47 -0800 > > Subject: [PHP] Dynamic 'left menu's' on site: Like a windows explorer > > system??? > > > > Hi, > > > > I need to change my static left menu's into more dynamic ones, like when > > you click one title of the menu, it shows it sub menu etc. > > > > Any body knows if that can be achieved using PHP? Or should i repel on > > other techniques? > > If someone did make similar stuff, could you please send me an example > > or some good ideas? > > > > Thanks a lot in advance!!!! > > Yoeri. > > > > > > -- > > PHP General Mailing List (http://www.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] >
javascript IS the optimal solution for a user-friendly dynamic navbar. check this one out: http://javascript.internet.com/foldertree/ i do sense a certain amount of FEAR on behalf of php'ers in regards to javascript. no web application is complete without a mix of client-side and server-side application of code. DanO -----Original Message----- From: Alex Black [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 3:31 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Dynamic 'left menu's' on site: Like a windows explorersystem??? you have two choices: yes, php can do it, but as php is a server side language, you have to refresh the page... or, you can go the much-more-dangerous-and-much-less-likely-to-work-on-many-browsers javascript route. I suggest the first :) if you _do_ end up writing some good code, please make a library out of it and send it along! :) -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] ("Yoeri De Bruyn") > Newsgroups: php.general > Date: 11 Jan 2001 04:56:47 -0800 > Subject: [PHP] Dynamic 'left menu's' on site: Like a windows explorer > system??? > > Hi, > > I need to change my static left menu's into more dynamic ones, like when > you click one title of the menu, it shows it sub menu etc. > > Any body knows if that can be achieved using PHP? Or should i repel on > other techniques? > If someone did make similar stuff, could you please send me an example > or some good ideas? > > Thanks a lot in advance!!!! > Yoeri. > > > -- > PHP General Mailing List (http://www.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 was wondering if somebody could give me some links to information >> about running java. > Check out : > > Can someone explain me how PHP interacts with Java ? > -------------------------------------------------------------- > http://www.faqts.com/knowledge_base/view.phtml/aid/7137/fid/51 I still cant get it to work, my configuration is: php 4.0.4 jvm = IBM 1.1.8 (since jdk didnt work, atleast that does the documentation tell me) redhat 6.2 and the error that i get is: Fatal error: Unable to locate CreateJavaVM function in /www/documents/index.php on line 3 ( $system = new Java("java.lang.System"); ) -- Eduard Witteveen Systeemontwikkelaar NOS Internet Mediacentrum Kamer 203, tel. +31(0)35 6773059 Sed quis custodiet ipsos custodes? : The sixth Satire from Juvenal
I can get you past this part, but I cannot get you past the: unable to instantiate non-existant class: java error. It is driving me bloody nuts. I have tried 3..count em...3 different JDKs now. It has taken up way more of my time than I would have liked... Fraser On Thu, 11 Jan 2001, Eduard Witteveen wrote: > Hello, > > I was wondering if somebody could give me some links to information > about running java. > > I cant get a instance of a class, and i don't know what im doing wrong.. > the message that i get is 'Unable to locate CreateJavaVM function', So i > suspect that php cant find java. How do i debug this? > >
PHP so far AFAIK has problems with JVM. A wouldn't recommend playing with it yet unless you like pulling your hair out. At 16:29 11.1. 2001, Fraser MacKenzie wrote the following: -------------------------------------------------------------- >I can get you past this part, but I cannot get you past the: > >unable to instantiate non-existant class: java > >error. It is driving me bloody nuts. I have tried 3..count em...3 >different JDKs now. It has taken up way more of my time than I would have >liked... > >Fraser > >On Thu, 11 Jan 2001, Eduard Witteveen wrote: > >> Hello, >> >> I was wondering if somebody could give me some links to information >> about running java. >> >> I cant get a instance of a class, and i don't know what im doing wrong.. >> the message that i get is 'Unable to locate CreateJavaVM function', So i >> suspect that php cant find java. How do i debug this? >> >> > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] ------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]
This is the code I use if ($HTTP_ACCEPT_LANGUAGE=="en-gb") { header("location: URL/test.pdf"); exit; } but it doesn't work, whereas when I paste the URL into the browser, it works fine. Is there any reason for this? Thanks Sam Rose ____________________________________________________________________________ ________________________________________________________________ The information in this email and in any attachments is confidential and may be privileged. If you are not the intended recipient, please destroy this message, delete any copies held on your systems and notify the sender immediately. You should not retain, copy or use this email for any purpose, nor disclose all or any part of its content to any other person.
What's URL?... Is that the actual code you have? If so, the browser is going to try to do a *RELATIVE* path to that, I think... ----- Original Message ----- From: Sam <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, January 11, 2001 7:25 AM Subject: [PHP] Help---using pdfs with PHP > > This is the code I use > > if ($HTTP_ACCEPT_LANGUAGE=="en-gb") > { > header("location: URL/test.pdf"); > exit; > } > > but it doesn't work, whereas when I paste the URL into the browser, it works > fine. > Is there any reason for this? > > Thanks > Sam Rose > > ____________________________________________________________________________ > ________________________________________________________________ > > The information in this email and in any attachments is confidential and may > be privileged. If you are not the intended recipient, please destroy this > message, delete any copies held on your systems and notify the sender > immediately. You should not retain, copy or use this email for any purpose, > nor disclose all or any part of its content to any other person. > > > -- > PHP General Mailing List (http://www.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 3.0.17 with Oracle db Hi all, I am working on a search functionality where in I dont' get the exact search results if the user types in a name with special characters like: med vänlig hälsning, António etc. and characters like: åäö I dont' know whether there's any built in functions for recognising these special characters or not. If yes, pls. tell me where can I get the information about that from ?, and if not, how can I go about it ?. I dont' want to hard code all the special characters either. Whatever special characters I enter, it should cross check the database and give me the results properly. If this is not clear, pls. let me know so that I can explain you all once again. Pls. help me out in this issue. Thanks in advance. ~ Karthick
Hey there, does anyone use PHP 4 + Apache on MAC OS X. Is this possible? Also does anyone know any good sites with info about this. Thanks, Abe
given that osx is a BSD-based system, and that apache will compile on it, i dont see why not sorry dont know of any relevant sites, but i'm sure there are :) - jeremy At 08:35 AM 1/11/2001, you wrote: >Hey there, > >does anyone use PHP 4 + Apache on MAC OS X. > >Is this possible? > >Also does anyone know any good sites with info about this. > >Thanks, >Abe > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> -----Original Message----- > From: defender of the protocol [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 2:52 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] OS X > Hey defender ;) > given that osx is a BSD-based system, and that apache will > compile on it, i > dont see why not > Yeah you're right. Today I saw a guy running a shop programmed in PHP on his Powerbook with MacOSX installed. Seems as if Macs finally have found a real OS ;) > sorry dont know of any relevant sites, but i'm sure there are :) Yeah you're right again: http://www.xclave.com/php4/ And as if that wasn't enough, hereA's another one: http://www-u.life.uiuc.edu/~mwvaugh/MacOSX/ Cheers, Mathias Meyer http://www.dynamicwebpages.de
I love this. I love unix based systems, but thik the GUIs are far behind, which makes them useless as desktop machines, great as servers... then my favorite GUI company decides to use BSD and build a pretty GUI on top! ha Ha! we'll see if they allow people to ditch Aqua (which is overblown) - but overall I'm extremely excited... _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] (Mathias Meyer) > Newsgroups: php.general > Date: 11 Jan 2001 06:30:17 -0800 > Subject: RE: [PHP] OS X > >> -----Original Message----- >> From: defender of the protocol [mailto:[EMAIL PROTECTED]] >> Sent: Thursday, January 11, 2001 2:52 PM >> To: [EMAIL PROTECTED] >> Subject: Re: [PHP] OS X >> > Hey defender ;) > >> given that osx is a BSD-based system, and that apache will >> compile on it, i >> dont see why not >> > > Yeah you're right. > Today I saw a guy running a shop programmed in PHP on his Powerbook with > MacOSX installed. Seems as if Macs finally have found a real OS ;) > >> sorry dont know of any relevant sites, but i'm sure there are :) > > Yeah you're right again: > http://www.xclave.com/php4/ > > And as if that wasn't enough, hereA's another one: > http://www-u.life.uiuc.edu/~mwvaugh/MacOSX/ > > Cheers, > Mathias Meyer > http://www.dynamicwebpages.de > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
On Thursday, January 11, 2001, at 01:27 PM, Alex Black wrote: > we'll see if they allow people to ditch Aqua (which is overblown) - but > overall I'm extremely excited... > You can log in to OS X as "console" and there is no GUI. Also, you can get Darwin which is Open Source and is the guts of OS X for free and then install X Windows on top of it. XFree86 4.03 (I think) has support for Darwin out of the box. Or you can run Aqua along with X Windows apps in another configuration. > _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] (Mathias Meyer) > > Newsgroups: php.general > > Date: 11 Jan 2001 06:30:17 -0800 > > Subject: RE: [PHP] OS X > > > >> -----Original Message----- > >> From: defender of the protocol [mailto:[EMAIL PROTECTED]] > >> Sent: Thursday, January 11, 2001 2:52 PM > >> To: [EMAIL PROTECTED] > >> Subject: Re: [PHP] OS X > >> > > Hey defender ;) > > > >> given that osx is a BSD-based system, and that apache will > >> compile on it, i > >> dont see why not > >> > > > > Yeah you're right. > > Today I saw a guy running a shop programmed in PHP on his Powerbook with > > MacOSX installed. Seems as if Macs finally have found a real OS ;) > > > >> sorry dont know of any relevant sites, but i'm sure there are :) > > > > Yeah you're right again: > > http://www.xclave.com/php4/ > > > > And as if that wasn't enough, hereA's another one: > > http://www-u.life.uiuc.edu/~mwvaugh/MacOSX/ > > > > Cheers, > > Mathias Meyer > > http://www.dynamicwebpages.de > > > > -- > > PHP General Mailing List (http://www.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] > > >
Hi, I've written a weekly newsletter in php3 and there are more then 900 readers of the email sent. The script is always started through a web-browser (pe. www.myurl.com/admin ). Is there a way to keep the script running, even after the browser is closed? (sending 900 emails might take a while) thx, Juan
if your server is not in safemode or as stupid cgi: http://www.php.net/manual/html/function.ignore-user-abort.html Sebastian > -----Ursprüngliche Nachricht----- > Von: DonJuan [mailto:[EMAIL PROTECTED]] > Gesendet: Donnerstag, 11. Januar 2001 14:56 > An: [EMAIL PROTECTED] > Betreff: [PHP] running scripts > > > Hi, > > I've written a weekly newsletter in php3 and there are more > then 900 readers of the email sent. > The script is always started through a web-browser (pe. > www.myurl.com/admin ). > > Is there a way to keep the script running, even after the > browser is closed? > (sending 900 emails might take a while) > > thx, > Juan > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] >
probably a better idea to spawn a CGI version of your email sending script than to run it from the client... that means you'd have to bump max_executio_time way the hell up, which will affect the rest of your php apps on your server. _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] ("DonJuan") > Newsgroups: php.general > Date: 11 Jan 2001 05:54:42 -0800 > Subject: [PHP] running scripts > > Hi, > > I've written a weekly newsletter in php3 and there are more > then 900 readers of the email sent. > The script is always started through a web-browser (pe. > www.myurl.com/admin ). > > Is there a way to keep the script running, even after the browser is closed? > (sending 900 emails might take a while) > > thx, > Juan > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
JB wrote: > > I also forgot to mention. I am leaning towards using GET to send the session > ids. Many people have told me that customer penatration decreases, some Which people? What facts do they have to support their claims? Is this a bigger problem than distrust in credit card security? Is it a bigger problem than poorly designed shops where people never finalizes their deals? > times significantly, when requiring cookies to use the cart. How would this > have an effect on my script? i will have to call the sessid in all of my > links, correct? That is done automatically by PHP 4.x when using the correct settings, but I can't remember them. There might even be a method for asserting if a user digs cookies or not, and thus based on that set the correct run time status. What I really wanted to pounce on was the customer penetration mentioned. Does anyone have numbers/research on the following: How many don't like to use credit cards on line? How many turn off cookies? How many fear cookies? I feel that for the majority of people cookies are not an issue, probably due to lack of knowledge, or an attitude that it serves a purpose. If your shop is aimed towards fringe groups (like geeks) that sceptic group might be large. If your shop aims at the general population I'm pretty sure that most leave their cookies on because it makes their webmail easier to use, their accounts at amazon easier to use, etc. When in doubt, follow the stream... Check out this, Amazon uses cookies, Amazon does a lot of business. Do you really feel that Amazon misses out on a lot of customers? Do you know of any large websites doing shopping carts which doesn't rely on cookies? Finally the biggest obstacle might be credit card usage (lots of negative hype) or product cost, who wants to use cc for really cheap stuff? Even more finally, sorry that I can't shore up my thoughts with any good facts either, I just felt like questioning the statement since I feel that it isn't neccessary the full truth. -- Paul K Egell-Johnsen Utvikler/PR Manager eZ systems as http://ez.no/
Paul K Egell-Johnsen wrote: > When in doubt, follow the stream... Check out this, Amazon uses cookies, > Amazon does a lot of business. Do you really feel that Amazon misses out > on a lot of customers? Do you know of any large websites doing shopping > carts which doesn't rely on cookies? I don't fear cookies. As many other (geeks, mainly), I just don't like them. Especially those that don't serve a purpose (at least not for me). I don't know much about Amazon and other shops, but what is wrong about using a fallback to GET when cookies are not supported? IMHO any decent shop should have this. Even if one-click-one-buy doesn't work without a login then. regards Wagner -- One maniac alone can do what 20 together cannot
Paul K Egell-Johnsen wrote: > JB wrote: > > > > I also forgot to mention. I am leaning towards using GET to send the session > > ids. Many people have told me that customer penatration decreases, some > > Which people? What facts do they have to support their claims? Is this a > bigger problem than distrust in credit card security? Is it a bigger > problem than poorly designed shops where people never finalizes their > deals? > Good question - I worked at a shop some time ago with some of the largest ecommerce names (at that time anyway), and they didn't have a problem using cookies. *Perhaps* they would have had more shoppers, but I don't think so. I think a lot of the people who rant about cookies/privacy aren't the types who purchase much online anyway, or want to compile their own SSL extensions into lynx before "shopping" (slight exaggeration). :) > > > times significantly, when requiring cookies to use the cart. How would this > > have an effect on my script? i will have to call the sessid in all of my > > links, correct? > > That is done automatically by PHP 4.x when using the correct settings, > but I can't remember them. There might even be a method for asserting if > a user digs cookies or not, and thus based on that set the correct run > time status. > It's not done very usefully if you rely on forms at all - at least POST forms. You'll need to stick a hidden variable in every form - perhaps people have form classes that do this automatically, but I think it's still much easier to just use cookies for this. > > What I really wanted to pounce on was the customer penetration > mentioned. Does anyone have numbers/research on the following: > > How many don't like to use credit cards on line? > How many turn off cookies? > How many fear cookies? > You touch on it below, but rephrase that last one "how many people who would otherwise buy from you 'fear' cookies"? > > I feel that for the majority of people cookies are not an issue, > probably due to lack of knowledge, or an attitude that it serves a > purpose. If your shop is aimed towards fringe groups (like geeks) that > sceptic group might be large. If your shop aims at the general > population I'm pretty sure that most leave their cookies on because it > makes their webmail easier to use, their accounts at amazon easier to > use, etc. > > When in doubt, follow the stream... Check out this, Amazon uses cookies, > Amazon does a lot of business. Do you really feel that Amazon misses out > on a lot of customers? Do you know of any large websites doing shopping > carts which doesn't rely on cookies? > Only ones I see put the session ID in the URL string, but many use things like broadvision to handle this, which has its own problems... > > Finally the biggest obstacle might be credit card usage (lots of > negative hype) or product cost, who wants to use cc for really cheap > stuff? > > Even more finally, sorry that I can't shore up my thoughts with any good > facts either, I just felt like questioning the statement since I feel > that it isn't neccessary the full truth. >
Alexander Wagner wrote: > > Paul K Egell-Johnsen wrote: > > When in doubt, follow the stream... Check out this, Amazon uses cookies, > > Amazon does a lot of business. Do you really feel that Amazon misses out > > on a lot of customers? Do you know of any large websites doing shopping > > carts which doesn't rely on cookies? > > I don't fear cookies. As many other (geeks, mainly), I just don't like them. > Especially those that don't serve a purpose (at least not for me). > I don't know much about Amazon and other shops, but what is wrong about using > a fallback to GET when cookies are not supported? > IMHO any decent shop should have this. Even if one-click-one-buy doesn't work > without a login then. Hmm, I also said higher up in the post that PHP4 adds the cookie info to all links when the correct settings have been set and that it might be possible to determine if a browser allows cookies. (I'm pretty sure that this is doable, I just haven't taken the time at the moment to look up that information.) I do agree with you that one should try to support as many people as possible. But remember that get cookies can't be maintained over static html pages on a site, will not help you when other sites refers to a site, etc. What really irked me is that you've received advice about market penetration of shops. Based on my experience it is only geeks/OSS people who have any problem with cookies, and at the same time those are the people who are experts and then deal out advice about 'ooh that's bad karma dude, since many people don't like cookies'. Of course your advice could be based upon actual numbers, which really show a significant problem. That's why I tried to elicit from my e-mail, does anyone have numbers which can give a good indication of which things makes people stay or not stay at a shop? Then I'll worry about the most significant problem and work down the list. And, if I suspect correctly it isn't a problem with the get cookie vs ordinary cookie since PHP4 has an ease method for doing this if you use native cookie handling. http://manual.php.net/ would probably show you how to do this, btw. -- Paul K Egell-Johnsen Utvikler/PR Manager eZ systems as http://ez.no/
JB wrote: > > I also forgot to mention. I am leaning towards using GET to send the session > ids. Many people have told me that customer penatration decreases, some > times significantly, when requiring cookies to use the cart. How would this > have an effect on my script? i will have to call the sessid in all of my > links, correct? Here is the info you asked for originally:) http://www.php.net/manual/ref.session.php You'll need to have the sessid in all links, php does this for you (PHP4) automatically. It also discusses the problem you mention, that browsers aren't obliged to accept cookies and that get is needed. -- Paul K Egell-Johnsen Utvikler/PR Manager eZ systems as http://ez.no/
Paul K Egell-Johnsen wrote: > What really irked me is that you've received advice about market > penetration of shops. Based on my experience it is only geeks/OSS people > who have any problem with cookies, and at the same time those are the > people who are experts and then deal out advice about 'ooh that's bad > karma dude, since many people don't like cookies'. There are a variety of people who have a problem with cookies. The biggest part are the geeks, who just don't like the idea. Well, geeks know a lot of other geeks, who don't like cookies either. From this point, they are right. But you certainly have a point. There aren't too many of them. But did you know that for reasons of privacy it is officialy it is not allowed to set a cookie without asking in germany? (no one cares or even tries to enforce it, but thats not the point) regards Wagner -- One maniac alone can do what 20 together cannot
Alexander Wagner wrote: > But did you know that for reasons of privacy it is officialy it is not > allowed to set a cookie without asking in germany? (no one cares or even > tries to enforce it, but thats not the point) No, I didn't. I can see why, especially with the sneaky doubleclick stuff (ie. cookies via their ads). The best method would of course be that new technology (forced by more countries enforcing some similar law as Germany) would ask the user if it wants to announce who s/he is to the site upon entering. I'm a bit worried about my privacy, but mostly because I hate people earning money on MY data and my behaviour. If someone should be paid it is me, not someone else. They push ads at me, they track my movements, and they sell info about me? And it seems that it isn't much of a problem since I can turn get on/off in PHP4:) As long as there are easy workarounds I'm all for it (as with making web pages work both on Opera, IE and Netscape). I'm just not in for stuff if I don't know the exact basis for why I'm doing it. Now lets see if Germany can get the rest of EU to enforce a similar law, then perhaps some standards and practices are changed to accomodate the user's needs in a private and non-offencive method. -- Paul K Egell-Johnsen Utvikler/PR Manager eZ systems as http://ez.no/
Paul K Egell-Johnsen wrote: > Alexander Wagner wrote: > > > But did you know that for reasons of privacy it is officialy it is not > > allowed to set a cookie without asking in germany? (no one cares or even > > tries to enforce it, but thats not the point) Why don't they make it illegal to run your browser with cookie notification off? The technology is already in place - people are choosing to not use it (or they don't know it's there). Either way, it should be an education issue, not an 'official/legal' one. IMO, of course.
I did very much of the work already! There are just some smaller (and important) things to fix, but I think for an experienced programmer would it be just a day of work. You can see what i did until now here http://www.zabia.net/admin/dregtest/index.php?do_global=1 Just check it out! *********** REPLY SEPARATOR *********** On 11/01/2001 at 6:03 nonoy apellido wrote: >hi, > how much you could spare with us for doing the >job.. we are from philippines.. > > > >--- "K.Simon" <[EMAIL PROTECTED]> wrote: >> What i need is to integrate an existing domain >> search (which i modified to suit my needs)into an >> from me started shopping cart to enable online >> domain registrations. But now I dont know where to >> go on and i really dont have any spare time at the >> moment and this thing is urgent! Sooner i can start >> to make money :) >> >> > > >__________________________________________________ >Do You Yahoo!? >Yahoo! Photos - Share your holiday photos online! >http://photos.yahoo.com/
If you finish it fast and as i want (i will help with the signup) you will get 2 domain registrations for free for 2 years each!!! K.Simon Webmaster http://www.zabia.net *********** REPLY SEPARATOR *********** On 11/01/2001 at 6:32 nonoy apellido wrote: >hi, > > what do u you mean? we make it for you for >free? >what the deal if we can finish the said job? > > > >--- "K.Simon" <[EMAIL PROTECTED]> wrote: >> I did very much of the work already! There are just >> some smaller (and important) things to fix, but I >> think for an experienced programmer would it be just >> a day of work. You can see what i did until now here >> >http://www.zabia.net/admin/dregtest/index.php?do_global=1 >> Just check it out! >> >> *********** REPLY SEPARATOR *********** >> >> On 11/01/2001 at 6:03 nonoy apellido wrote: >> >> >hi, >> > how much you could spare with us for doing >> the >> >job.. we are from philippines.. >> > >> > >> > >> >--- "K.Simon" <[EMAIL PROTECTED]> wrote: >> >> What i need is to integrate an existing domain >> >> search (which i modified to suit my needs)into an >> >> from me started shopping cart to enable online >> >> domain registrations. But now I dont know where >> to >> >> go on and i really dont have any spare time at >> the >> >> moment and this thing is urgent! Sooner i can >> start >> >> to make money :) >> >> >> >> >> > >> > >> >__________________________________________________ >> >Do You Yahoo!? >> >Yahoo! Photos - Share your holiday photos online! >> >http://photos.yahoo.com/ >> >> >> > > >__________________________________________________ >Do You Yahoo!? >Yahoo! Photos - Share your holiday photos online! >http://photos.yahoo.com/
PS: Plus Free Domain Parking if you need to! *********** REPLY SEPARATOR *********** If you finish it fast and as i want (i will help with the signup) you will get 2 domain registrations for free for 2 years each!!! K.Simon Webmaster http://www.zabia.net *********** REPLY SEPARATOR *********** On 11/01/2001 at 6:32 nonoy apellido wrote: >hi, > > what do u you mean? we make it for you for >free? >what the deal if we can finish the said job? > > > >--- "K.Simon" <[EMAIL PROTECTED]> wrote: >> I did very much of the work already! There are just >> some smaller (and important) things to fix, but I >> think for an experienced programmer would it be just >> a day of work. You can see what i did until now here >> >http://www.zabia.net/admin/dregtest/index.php?do_global=1 >> Just check it out! >> >> *********** REPLY SEPARATOR *********** >> >> On 11/01/2001 at 6:03 nonoy apellido wrote: >> >> >hi, >> > how much you could spare with us for doing >> the >> >job.. we are from philippines.. >> > >> > >> > >> >--- "K.Simon" <[EMAIL PROTECTED]> wrote: >> >> What i need is to integrate an existing domain >> >> search (which i modified to suit my needs)into an >> >> from me started shopping cart to enable online >> >> domain registrations. But now I dont know where >> to >> >> go on and i really dont have any spare time at >> the >> >> moment and this thing is urgent! Sooner i can >> start >> >> to make money :) >> >> >> >> >> > >> > >> >__________________________________________________ >> >Do You Yahoo!? >> >Yahoo! Photos - Share your holiday photos online! >> >http://photos.yahoo.com/ >> >> >> > > >__________________________________________________ >Do You Yahoo!? >Yahoo! Photos - Share your holiday photos online! >http://photos.yahoo.com/
Wow, £20 worth of domains.... hooray... | -----Original Message----- | From: K.Simon [mailto:[EMAIL PROTECTED]] | Sent: 11 January 2001 14:35 | To: nonoy apellido; [EMAIL PROTECTED] | Subject: [PHP] Re: PHP programmer needed. | | | | If you finish it fast and as i want (i will help with the signup) | you will get 2 domain registrations for free for 2 years each!!! | K.Simon | Webmaster http://www.zabia.net | | *********** REPLY SEPARATOR *********** | | On 11/01/2001 at 6:32 nonoy apellido wrote: | | >hi, | > | > what do u you mean? we make it for you for | >free? | >what the deal if we can finish the said job? | > | > | > | >--- "K.Simon" <[EMAIL PROTECTED]> wrote: | >> I did very much of the work already! There are just | >> some smaller (and important) things to fix, but I | >> think for an experienced programmer would it be just | >> a day of work. You can see what i did until now here | >> | >http://www.zabia.net/admin/dregtest/index.php?do_global=1 | >> Just check it out! | >> | >> *********** REPLY SEPARATOR *********** | >> | >> On 11/01/2001 at 6:03 nonoy apellido wrote: | >> | >> >hi, | >> > how much you could spare with us for doing | >> the | >> >job.. we are from philippines.. | >> > | >> > | >> > | >> >--- "K.Simon" <[EMAIL PROTECTED]> wrote: | >> >> What i need is to integrate an existing domain | >> >> search (which i modified to suit my needs)into an | >> >> from me started shopping cart to enable online | >> >> domain registrations. But now I dont know where | >> to | >> >> go on and i really dont have any spare time at | >> the | >> >> moment and this thing is urgent! Sooner i can | >> start | >> >> to make money :) | >> >> | >> >> | >> > | >> > | >> >__________________________________________________ | >> >Do You Yahoo!? | >> >Yahoo! Photos - Share your holiday photos online! | >> >http://photos.yahoo.com/ | >> | >> | >> | > | > | >__________________________________________________ | >Do You Yahoo!? | >Yahoo! Photos - Share your holiday photos online! | >http://photos.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] |
Can anyone give me a list of big named sites (or point me to a list) that use PHP? Basically, site names that marketers can recognize as "big names", or very well known. Thanks Monte
Try : http://php.net/sites.php Philip p.s. all my sites use php but they aren't very big. On Thu, 11 Jan 2001, Monte Ohrt wrote: > Can anyone give me a list of big named sites (or point me to a list) > that use PHP? > Basically, site names that marketers can recognize as "big names", or > very well known. > > Thanks > Monte > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Alain Fontaine wrote: > > Hi, > > Is there such a thing yet ? I have had a look at the currently "being > developed" documentation generators, but they just don't quite cut it yet, > or did I miss one that actually works well ? > > We are working on Windows platforms, so a tool that does not rely on > Unix/Linux only tools, would be perfect. > > Thanks a lot for your ideas and opinions. At http://developer.ez.no you'll find eZPhpDoc which is based on perl. You'll find examples of its output at http://doc.ez.no it is released under GPL, of course. -- Paul K Egell-Johnsen Utvikler/PR Manager eZ systems as http://ez.no/
Todd, I currently have Apache 1.3.14 and PHP 4.04 running on WinNT 4.0 (on a laptop even!). I have also run it on Win 95 in the past. I've never had any problems with Apache on Windows even though the Apache people say that it "should still be considered beta quality code". It's worked really nice on NT because you can install it as a service and pretty much forget it, it automatically starts up when you boot up. The Apache install is just like any Windows install and very easy. Then you can configure from there. PHP install instructions on WinXX - http://www.php.net/manual/install-windows95-nt.php Apache install instructions on WinXX - http://httpd.apache.org/docs/windows.html Good luck! John "Todd Cary" <[EMAIL PROTECTED]> on 01/10/2001 05:10:50 PM To: "John Meyerhofer" <[EMAIL PROTECTED]> cc: [EMAIL PROTECTED] Subject: Re: [PHP] PHP simulator John - That sounds feasible. I have always associated Apache with Unix/Linux; not Windows.... The install of PHP 4.0.4 on my Win 2K was an absolute breeze running IIS 5. What is Apache like in the Windows envirnoment? Todd -- Todd Cary Ariste Software [EMAIL PROTECTED]
Our initial tests showed ~10-20% speed increase on benchmarks where we just hit a page over and over, but not on all pages. The code is included, so people can see what it's doing, but it is most likely not as sophisticated as Zend's upcoming offering. Zend actually knows how everything works - the bware author didn't, apparently. In some emails with the author, he stated that it's not intended to go 'head to head' with zend cache, but was meant to give them a moderate speed gain, which it did. YMMV Hope that helps. :) Marcin Orlowski wrote: > Anyone have played with Afterburner PHP cache ( > http://bwcache.bware.it/ )? I'm curious the resutls ;) > > Regards, > -- > You mean you have Windows98 and still have available memory?!? > > Marcin http://wfmh.org.pl/~carlos/ > 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]
Moritz Petersen wrote: > > Hi list, > > this is not a problem, but a nice feature of OOP, I found today. Maybe it is > useful for someone: > > <?php > // class test > > class Basis > { > var $name = "Basis"; > > function Basis($typ = false) > { > switch ($typ) > { > case "A": > $this = new Basis_A(); > break; > > case "B": > $this = new Basis_B(); > break; > } > } > The point is, that the class morphs itself into another class in the > constructor. > > Hope it helps someone, My idea would be to do the following: check if file $path_to_includes/$prefix$typ$postfix if file exists include_once that file and create an object of that type $this = new $typ(); Thus you get away from the switch case which you have to change for every new class you add to the inheritance tree. I've used this technique a few times, and I also think I've seen this used in some database wrapper classes. -- Paul K Egell-Johnsen Utvikler/PR Manager eZ systems as http://ez.no/
Hi Brian, Yes, I agree. Early on in using PHP I was working with someone else's code, and kept encountering the infamous condition test followed by straight HTML scenario, like so: if( this == true){?> followed by some HTML <?}else{?> and more HTML, often quite a bit, sometimes 30-40 lines maybe with ,<?echo $somevar ?> and then more and more then <?} back to php code. Coming from the world of desktop programming and straight HTML, I also hadn't grasped the concept that you do all your logic things up top, then issue HTML. So, I'd be trolling around trying to find where the page started it's display. It sort of soured me on switching PHP on and off. I'm also not fond of: <input type = "submit" name = "action[]" value= "<? echo $SendBid ?>" > although that's from my own code. It was simply cleaner. I suppose if there was one thing I'd like it would be creation of a closing bracket or tag when one enters the opening tag. But that becomes hellish when you're adjusting logic and your editor keeps "helping" you. Have a great day - it's sunny, cold and clear in Nova Scotia this morning. Miles PS Like your sig. At 10:10 PM 01/10/2001 -0500, you wrote: >Hello Miles, > >(MT == "Miles Thompson") [EMAIL PROTECTED] writes: > >MT> When I turn PHP on and off I tend to have "OOPS" scenarios, and >MT> have to go searching for the previous "?>" or "<?". > >Ah yes, but even that goes back to the Learning HTML days. "When you >open a tag, immediately create the closing tag." > >Out of habit, you'll eventually stop making that mistake. > >Likewise, if you get into the habit of doing <? ?> or ?> <? in tandem, >your worries will soon disappear. > >MT> Miles > > >-Brian >-- >Don't try to be like Jackie. There is only one Jackie. >Study computers instead. -- Jackie Chan >
Trying again - no-one responded 1st time... ----- Forwarded message from Hardy Merrill <[EMAIL PROTECTED]> ----- > Date: Wed, 10 Jan 2001 21:01:10 -0500 > From: Hardy Merrill <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [PHP] Session Mgmt in MySQL - cleanup > > I've adapted a session management script I found on > www.phpbuilder.com for storing session info in MySQL, but > I'm wondering about "garbage collection". Does the system > do the garbage collection itself somehow, or should my > sess_open function call sess_gc directly? > > I noticed that when I invoke session_destroy(), the session > row for that id remains in the database - but the session > data associated with that session id is gone. Is that normal? > I almost expected the whole session row to be removed, > especially since the sess_destroy function does actually > does a DELETE FROM. I don't quite understand how this is > working. > > Is there some documentation somewhere on the "user"(database) > functions for a session management in a database, like what > each function is expecting, and what each should return, and > when each one is called??? > > TIA. > > -- > Hardy Merrill > Mission Critical Linux, Inc. > http://www.missioncriticallinux.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] ----- End forwarded message -----
Hi all, when I use IE, and do a phpinfo() The variable HTTP_ACCEPT_LANGUAGE displays en-gb (for english GB) But Netscape only displays en... The problem is, is that I want to know where visitors to my site are coming from i.e. UK, US, Australia, so that I can do a bit of php so that the relevant information is produced. Is there anyway to do this, using php? Thanks Sam Rose ____________________________________________________________________________ ________________________________________________________________ The information in this email and in any attachments is confidential and may be privileged. If you are not the intended recipient, please destroy this message, delete any copies held on your systems and notify the sender immediately. You should not retain, copy or use this email for any purpose, nor disclose all or any part of its content to any other person.
you won't find out anything useful this way. I'm Czech (central Europe), and have en-us at the first position in the list of preferred languages. At 15:53 11.1. 2001, Sam wrote the following: -------------------------------------------------------------- >Hi all, > >when I use IE, and do a phpinfo() > >The variable >HTTP_ACCEPT_LANGUAGE displays en-gb (for english GB) > >But Netscape only displays en... > >The problem is, is that I want to know where visitors to my site are coming >from i.e. UK, US, Australia, so that I can do a bit of php so that the >relevant information is produced. > >Is there anyway to do this, using php? > >Thanks > >Sam Rose > > >____________________________________________________________________________ >________________________________________________________________ > >The information in this email and in any attachments is confidential and may >be privileged. If you are not the intended recipient, please destroy this >message, delete any copies held on your systems and notify the sender >immediately. You should not retain, copy or use this email for any purpose, >nor disclose all or any part of its content to any other person. > > >-- >PHP General Mailing List (http://www.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]
Sam wrote: > > Hi all, > > when I use IE, and do a phpinfo() > > The variable > HTTP_ACCEPT_LANGUAGE displays en-gb (for english GB) > > But Netscape only displays en... > > The problem is, is that I want to know where visitors to my site are coming > from i.e. UK, US, Australia, so that I can do a bit of php so that the > relevant information is produced. IE is installed on Windows. In all Windows installations you set your language and country, and I bet that IE knows its way around the registry to compose a correct language string and send it to you. Finally IE is only used on Windows. Though you can set the same info in Unix it is probably so that Netscapes encodes only the language you use in the interface, or the one used while downloading the program, or something similar. Obviously it doesn't go to the same lengths as IE to extract the needed information. > Is there anyway to do this, using php? Probably, but not using the info here. You can look up which block an IP address belongs to and then find out which country this is in. (Try www.ripe.org and siblings for more info on this). That's probably the only consistent (and costly in network time/parsing) method, and I wouldn't rely on it either... -- Paul K Egell-Johnsen Utvikler/PR Manager eZ systems as http://ez.no/
Yeah, but there are three locations that I have which are UK, US and Australia. Each of them have different en-??. Well on IE anyway. So I'm not sure which way to go about this. -----Original Message----- From: Cynic [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 3:12 PM To: Sam; '[EMAIL PROTECTED]' Subject: Re: [PHP] Netscape does not show all the variables you won't find out anything useful this way. I'm Czech (central Europe), and have en-us at the first position in the list of preferred languages. At 15:53 11.1. 2001, Sam wrote the following: -------------------------------------------------------------- >Hi all, > >when I use IE, and do a phpinfo() > >The variable >HTTP_ACCEPT_LANGUAGE displays en-gb (for english GB) > >But Netscape only displays en... > >The problem is, is that I want to know where visitors to my site are coming >from i.e. UK, US, Australia, so that I can do a bit of php so that the >relevant information is produced. > >Is there anyway to do this, using php? > >Thanks > >Sam Rose > > >___________________________________________________________________________ _ >________________________________________________________________ > >The information in this email and in any attachments is confidential and may >be privileged. If you are not the intended recipient, please destroy this >message, delete any copies held on your systems and notify the sender >immediately. You should not retain, copy or use this email for any purpose, >nor disclose all or any part of its content to any other person. > > >-- >PHP General Mailing List (http://www.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]
The HTTP_ACCEPT_LANGUAGE has nothing to do with location. Is it called HTTP_USER_POSITION? No. It's a code of the _language_ (well, actually, list of codes of languages, along with their preference weights (if that's the right word) that a user can set to _anything_ in their browser. Example: en-us,en-gb;q=0.7,cs;q=0.3 header sent along with a request for http://www.somewhere.tld/index.html means I want the document in US English or UK English, and when it's not available, in Czech. If none of these is available, I will get it in whatever language it's available in. And, of course, the server must be set up to grok this kind of negotiation. At 16:45 11.1. 2001, Sam wrote the following: -------------------------------------------------------------- >Yeah, but there are three locations that I have which are UK, US and >Australia. Each of them have different en-??. Well on IE anyway. > >So I'm not sure which way to go about this. > >-----Original Message----- >From: Cynic [mailto:[EMAIL PROTECTED]] >Sent: Thursday, January 11, 2001 3:12 PM >To: Sam; '[EMAIL PROTECTED]' >Subject: Re: [PHP] Netscape does not show all the variables > > >you won't find out anything useful this way. I'm Czech (central >Europe), and have en-us at the first position in the list of >preferred languages. > >At 15:53 11.1. 2001, Sam wrote the following: >-------------------------------------------------------------- >>Hi all, >> >>when I use IE, and do a phpinfo() >> >>The variable >>HTTP_ACCEPT_LANGUAGE displays en-gb (for english GB) >> >>But Netscape only displays en... >> >>The problem is, is that I want to know where visitors to my site are coming >>from i.e. UK, US, Australia, so that I can do a bit of php so that the >>relevant information is produced. >> >>Is there anyway to do this, using php? >> >>Thanks >> >>Sam Rose >> >> >>___________________________________________________________________________ >_ >>________________________________________________________________ >> >>The information in this email and in any attachments is confidential and >may >>be privileged. If you are not the intended recipient, please destroy this >>message, delete any copies held on your systems and notify the sender >>immediately. You should not retain, copy or use this email for any purpose, >>nor disclose all or any part of its content to any other person. >> >> >>-- >>PHP General Mailing List (http://www.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] ------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]
very hard. that assumes you can do a reverse lookup, which is not always the case, and even if you can it sometimes takes a _huge_ amount of time... you could do it off the selected language, but that doesn't give you geographical location. better to just ask. hi, where are you? and set a cookie. -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] (Cynic) > Newsgroups: php.general > Date: 11 Jan 2001 07:06:54 -0800 > Subject: Re: [PHP] Netscape does not show all the variables > > you won't find out anything useful this way. I'm Czech (central > Europe), and have en-us at the first position in the list of > preferred languages. > > At 15:53 11.1. 2001, Sam wrote the following: > -------------------------------------------------------------- >> Hi all, >> >> when I use IE, and do a phpinfo() >> >> The variable >> HTTP_ACCEPT_LANGUAGE displays en-gb (for english GB) >> >> But Netscape only displays en... >> >> The problem is, is that I want to know where visitors to my site are coming >> from i.e. UK, US, Australia, so that I can do a bit of php so that the >> relevant information is produced. >> >> Is there anyway to do this, using php? >> >> Thanks >> >> Sam Rose >> >> >> ____________________________________________________________________________ >> ________________________________________________________________ >> >> The information in this email and in any attachments is confidential and may >> be privileged. If you are not the intended recipient, please destroy this >> message, delete any copies held on your systems and notify the sender >> immediately. You should not retain, copy or use this email for any purpose, >> nor disclose all or any part of its content to any other person. >> >> >> -- >> PHP General Mailing List (http://www.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] >
Hi, I was wondering if anyone knew where to obtain content that can be incorporated into web pages. Partnering Opportunities, free, commercial content. Similar to an excite type offering, e.g. news, weather, movies, etc. I have some but am trying to build partnerships and enhance the offerings in a custom environment. Preferably ones that can be pulled and integrated with PHP. Thanks, Dave
I am developing a site with php, apache and mysql. The database will have likely 250k to 500k records at most, but the data will be changing often. New records will be constantly added and old ones removed. I am pretty new to DB's and was wondering what is the best way to keep the indexes tight and clean? How do others handle this type of scenario? Could I run a reindex or something from a cron job? Thanks for any input. --------------------------------- Larry Hotchkiss
Larry Hotchkiss wrote: > > I am developing a site with php, apache and mysql. The database will have > likely 250k to 500k records at most, but the data will be changing often. > New records will be constantly added and old ones removed. I am pretty new > to DB's and was wondering what is the best way to keep the indexes tight > and clean? How do others handle this type of scenario? Could I run a > reindex or something from a cron job? Thanks for any input. The indexes clean themselves. But you need to run OPTIMIZE TABLE once in a while (every week) in order to give the database the optimization info it needs. Check out info about this and other optimization info at http://www.mysql.com there you can also get info from the mysql mailing lists which are more appropriate for this kind of questions. -- Paul K Egell-Johnsen Utvikler/PR Manager eZ systems as http://ez.no/
Bryne Jørg Vidar wrote: > > If you set it up so that every incoming mail to your domain ends up in one > account, ... Well, just this is my problem: I don't have an account for every possible address. I don't know the address yet before it arrives at our server! - dk
But you SHOULD know what DOMAIN it's going to - [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] can all go to one account. It's not a case of setting up individual usernames to point to one account - mail for the whole domain could/should be routed to the one account. [EMAIL PROTECTED] would still go to the one account, get processed, etc. If the processing script finds it's an invalid 'address', it can do what it likes. Dieter Kneffel wrote: > Bryne Jørg Vidar wrote: > > > > If you set it up so that every incoming mail to your domain ends up in one > > account, ... > > Well, just this is my problem: I don't have an account for every > possible address. I don't know the address yet before it arrives > at our server! > > - dk > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
Oh, ok - that was a misunderstanding on my side! Of course it all goes to one account. Well, not really but instead of a real account it is piped directly into the script... But the problem still remains: If I am doing it this way, I never get to knoe the real receipient. Is there really no way to get the raw data? Perhaps in a similar manner as it works for UUCP??? Thanks a lot! dk Michael Kimsal schrieb: > > But you SHOULD know what DOMAIN it's going to - > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > > can all go to one account. It's not a case of setting up > individual usernames to point to one account - mail for > the whole domain could/should be routed to the one account. > > [EMAIL PROTECTED] > would still go to the one account, get processed, etc. If the > processing script finds it's an invalid 'address', it can > do what it likes. > > Dieter Kneffel wrote: > > > Bryne Jørg Vidar wrote: > > > > > > If you set it up so that every incoming mail to your domain ends up in one > > > account, ... > > > > Well, just this is my problem: I don't have an account for every > > possible address. I don't know the address yet before it arrives > > at our server! > > > > - dk > > > > -- > > PHP General Mailing List (http://www.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] -- dieter kneffel [cto | business development] -- http://wap4.com | tel: +49 9187 905 955 http://mopilot.com | fax: +49 9187 904 124 mail:[EMAIL PROTECTED] | mobile: +49 170 2376 394 Mobile Applications For A Portable Internet. --------------------------------------------------------------- This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of WAP4.COM. If you are not the intended recipient then please be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. If you have received this email in error, please notify WAP4.COM at +49.9187.905.955 or send an email to [EMAIL PROTECTED] Thank You
On all my domains if an account/email doesn't exist it forwards to my root account. You can still see who it was sent to and everything... Domain Aliasing or somthing... -----Original Message----- From: Dieter Kneffel [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 11:28 AM To: Michael Kimsal Cc: Bryne Jørg Vidar; php-general Subject: Re: [PHP] PHP makes sexy! Oh, ok - that was a misunderstanding on my side! Of course it all goes to one account. Well, not really but instead of a real account it is piped directly into the script... But the problem still remains: If I am doing it this way, I never get to knoe the real receipient. Is there really no way to get the raw data? Perhaps in a similar manner as it works for UUCP??? Thanks a lot! dk Michael Kimsal schrieb: > > But you SHOULD know what DOMAIN it's going to - > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > > can all go to one account. It's not a case of setting up > individual usernames to point to one account - mail for > the whole domain could/should be routed to the one account. > > [EMAIL PROTECTED] > would still go to the one account, get processed, etc. If the > processing script finds it's an invalid 'address', it can > do what it likes. > > Dieter Kneffel wrote: > > > Bryne Jørg Vidar wrote: > > > > > > If you set it up so that every incoming mail to your domain ends up in one > > > account, ... > > > > Well, just this is my problem: I don't have an account for every > > possible address. I don't know the address yet before it arrives > > at our server! > > > > - dk > > > > -- > > PHP General Mailing List (http://www.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] -- dieter kneffel [cto | business development] -- http://wap4.com | tel: +49 9187 905 955 http://mopilot.com | fax: +49 9187 904 124 mail:[EMAIL PROTECTED] | mobile: +49 170 2376 394 Mobile Applications For A Portable Internet. --------------------------------------------------------------- This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of WAP4.COM. If you are not the intended recipient then please be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. If you have received this email in error, please notify WAP4.COM at +49.9187.905.955 or send an email to [EMAIL PROTECTED] Thank You -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
WreckRman2 schrieb: > > On all my domains if an account/email doesn't exist it forwards to my root > account. You can still see who it was sent to and everything... Domain > Aliasing or somthing... How can you see it? The header not always gives you all information. To parse the header doesn't work if e.g. the email is sent to multiple receipients or as Bcc. I also got some emails where this information was completely missing. It works only as long as there is only one To: receipient and no Bcc or other stuff... Thanks, dk > > -----Original Message----- > From: Dieter Kneffel [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 11:28 AM > To: Michael Kimsal > Cc: Bryne Jørg Vidar; php-general > Subject: Re: [PHP] PHP makes sexy! > > Oh, ok - that was a misunderstanding on my side! Of course > it all goes to one account. Well, not really but instead of > a real account it is piped directly into the script... > > But the problem still remains: If I am doing it this way, I > never get to knoe the real receipient. Is there really no > way to get the raw data? Perhaps in a similar manner as it > works for UUCP??? > > Thanks a lot! > > dk > > Michael Kimsal schrieb: > > > > But you SHOULD know what DOMAIN it's going to - > > > > [EMAIL PROTECTED] > > [EMAIL PROTECTED] > > [EMAIL PROTECTED] > > > > can all go to one account. It's not a case of setting up > > individual usernames to point to one account - mail for > > the whole domain could/should be routed to the one account. > > > > [EMAIL PROTECTED] > > would still go to the one account, get processed, etc. If the > > processing script finds it's an invalid 'address', it can > > do what it likes. > > > > Dieter Kneffel wrote: > > > > > Bryne Jørg Vidar wrote: > > > > > > > > If you set it up so that every incoming mail to your domain ends up in > one > > > > account, ... > > > > > > Well, just this is my problem: I don't have an account for every > > > possible address. I don't know the address yet before it arrives > > > at our server! > > > > > > - dk > > >
Thanks for the info Brian. But what about the path you have in the include statement? IE: include "../path1/file.php" Does it ignore the path? Try the path? Or just append that path to the end of each path in the include_path? Best regards, Randy Wednesday, January 10, 2001, 5:06:44 PM, you wrote: BC> Hello Randy, BC> (R == "Randy") [EMAIL PROTECTED] writes: R>> How I think it SHOULD work is like DOS - First it looks at where R>> you say it is. If not there, it looks in the current directory. BC> Let's not forget Unix. ;-) R>> If not there, it looks in the directories in the path. I'm sure PHP R>> doesn't work this way, but I can't figure out how it does work. BC> % egrep include /usr/local/lib/php3.ini BC> include_path = ; UNIX: "/path1:/path2" Windows: "\path1;\path2" BC> It checks each path in order. It will stop when it finds the file in BC> the first available location. R>> Please, if anybody understands this, let me know. BC> -Brian BC> -- BC> An adequate bootstrap is a contradiction in terms.
Thanks for the info Brian. But what about the path you have in the include statement? IE: include "../path1/file.php" Does it ignore the path? Try the path? Or just append that path to the end of each path in the include_path? Best regards, Randy Wednesday, January 10, 2001, 5:06:44 PM, you wrote: BC> Hello Randy, BC> (R == "Randy") [EMAIL PROTECTED] writes: R>> How I think it SHOULD work is like DOS - First it looks at where R>> you say it is. If not there, it looks in the current directory. BC> Let's not forget Unix. ;-) R>> If not there, it looks in the directories in the path. I'm sure PHP R>> doesn't work this way, but I can't figure out how it does work. BC> % egrep include /usr/local/lib/php3.ini BC> include_path = ; UNIX: "/path1:/path2" Windows: "\path1;\path2" BC> It checks each path in order. It will stop when it finds the file in BC> the first available location. R>> Please, if anybody understands this, let me know. BC> -Brian BC> -- BC> An adequate bootstrap is a contradiction in terms.
Randy wrote: > > Thanks for the info Brian. But what about the path you have in > the include statement? IE: include "../path1/file.php" > > Does it ignore the path? Try the path? Or just append that path > to the end of each path in the include_path? > > Best regards, > Randy My experience is that "../path1/file.php" is appended to all paths in the include path, as well as your current path. Current path, btw, if you are using a lot of included files are always the path of the inital script called. -- Paul K Egell-Johnsen Utvikler/PR Manager eZ systems as http://ez.no/
Hello Randy, (R == "Randy") [EMAIL PROTECTED] writes: R> Thanks for the info Brian. But what about the path you have in the R> include statement? IE: include "../path1/file.php" R> Does it ignore the path? Try the path? Or just append that path to R> the end of each path in the include_path? Using PHP 3.0.18, every, single time I've used something like: include('../farmers/underwear.php'); It works as expected. -Brian -- Crashing is the only thing windows does quickly.
(BC == "Brian Clark") [EMAIL PROTECTED] writes: R>> Thanks for the info Brian. But what about the path you have in the R>> include statement? IE: include "../path1/file.php" R>> Does it ignore the path? Try the path? Or just append that path to R>> the end of each path in the include_path? BC> Using PHP 3.0.18, every, single time I've used something like: BC> include('../farmers/underwear.php'); BC> It works as expected. I'm half alseep. I see what you're saying. I suppose if you did: include('corn.php'); It's going to try each path. Ie. ".:/include:/usr/src" ./corn.php (if not in .) /include/corn.php (if not in /include) /usr/src/corn.php (if not in /usr/src) Error. And I *suspect* that even if you use ../corn.php, it's going to try the include paths in the same way. ../corn.php is equivalent to ./../corn.php -Brian -- Like punning, programming is a play on words.
We upgraded a box running RH6.2 to RH7. Same build process for PHP as before, but the ereg functions didn't work the same. ereg_replace("{cow}",$cow,$x); now needs to be ereg_replace("\{cow\}",$cow,$x); The {} are escaped now. Dunno what changed 'under the hood', but the only change we made (I'm about 90% certain) was going RH6.2 to 7. Hope this helps someone else doing an upgrade from going as crazy as we did... :)
{} inside of "" now does order-of-operations, I think... Something like that. It's in the docs somewhere. I thought this was a PHP3 -> PHP4 change, not related to RedHat nor ereg in particular... ----- Original Message ----- From: Michael Kimsal <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, January 11, 2001 9:08 AM Subject: [PHP] Redhat 7 problem and fix > We upgraded a box running RH6.2 to RH7. > > Same build process for PHP as before, but the ereg functions > didn't work the same. > > ereg_replace("{cow}",$cow,$x); > > now needs to be > > ereg_replace("\{cow\}",$cow,$x); > > The {} are escaped now. Dunno what changed 'under the hood', but > the only change we made (I'm about 90% certain) was going RH6.2 to > 7. > > Hope this helps someone else doing an upgrade from going as crazy as we > did... :) > > > > -- > PHP General Mailing List (http://www.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 am looking for an array of PHP scripts to manage a remote MySQL database. Functions include MySQL database maintanence and data entry/updating/editing/deletion. So far, I come across PHPMyAdmin. Is there any other solutions or tools ? Thanks Nyon
Hello Nyon, Thursday, January 11, 2001, 2:59:26 AM, you wrote: N> Hi, N> I am looking for an array of PHP scripts to manage a remote MySQL database. N> Functions include MySQL database maintanence and data N> entry/updating/editing/deletion. N> So far, I come across PHPMyAdmin. Is there any other solutions or tools ? Try DBTools ... http://dbtools.vila.bol.com.br -- DSig ````` David Tod Sigafoos ( O O ) mailto:[EMAIL PROTECTED] _______oOOo__( )__oOOo_______ Using 'The Bat' 1.48f
To my knowledge, there's no way to make a browser do SCP without coming up with a custom plugin, which isn't likely to be within the scope of stuff you're willing to take on. Fortunately, someone else has done it for you. F-Secure SSH is an SSH terminal client that includes tunneling and file transfer tools (SFTP and SCP). Unfortunately, it's US$150. Bleah. http://www.f-secure.com PuTTY and PSCP are free tools developed by the same author. PuTTY is also fun to say if you're a Seinfeld fan. http://www.chiark.greenend.org.uk/~sgtatham/putty/ There are a couple of other SCP tools out there for Windows (some of which are even free!), but you can search for the links yourself at the usual suspects' sites (download.com, zdnet.com, etc). If you're actually trying to make PHP handle file uploads and downloads securely, you're basically looking at HTTPS/SSL. HTH, Sam > > Yeek! Not quite what I meant. I don't think that web servers have any > business being on windows boxes. I was wondering if there were a way to > upload using something like scp from a windows (or other) browser to a > unix server. >
Try pscp from putty : <http://www.chiark.greenend.org.uk/~sgtatham/putty/> -Stathis. Kyle Jerviss wrote: > > Yeek! Not quite what I meant. I don't think that web servers have any > business being on windows boxes. I was wondering if there were a way to > upload using something like scp from a windows (or other) browser to a > unix server. > > bard wrote: > > > > the people who make putty (my favorite ssh client for windows) also make a command >line scp program. this could be included as an exec() in a script I would think... > > > > -- > > PHP General Mailing List (http://www.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]
Hi all, I would like to have codes which will could automatically generate as many as sequence number variables based on how many rows return from the query, such as if I have 10 rows from the query result, I would have $var1,$var2,$var3,$var4....and so on, but the value of $var1 would equal to 3 spaces, and value of $var2 would equal to 6 spaces, then $var3 would equal to 9 spaces and so on. Could anyone tell me how could I write codes for this purpose. Thank you very much in advance! Calvin Chua
Wee Chua wrote: > > Hi all, > I would like to have codes which will could automatically generate as many > as sequence number variables based on how many rows return from the query, > such as if I have 10 rows from the query result, I would have > $var1,$var2,$var3,$var4....and so on, but the value of $var1 would equal to > 3 spaces, and value of $var2 would equal to 6 spaces, then $var3 would equal > to 9 spaces and so on. Could anyone tell me how could I write codes for this > purpose. Thank you very much in advance! > > Calvin Chua > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] Use an array. Greetings, Jason -- Jason Murray Developer jWeb New Media Design 1 877 525 jWEB
Hello! I have looked up and found out how to pass data into a function and have that function return data. Now i was wondering if there was a way, with out using html's <form> tag, to call another php page and pass it data? Thanks! -Jim
read about the HTTP_GET vars (eg bla.php?var1=dgdsg&var2=DF&...&varn=3443) and se php4 session management... dowebwedo Jeroen Wesbeek .programming St. Jacobsstraat 16 Postbus 448 | 3500 AK Utrecht The Netherlands p 030 2348110 | f 030 2348605 [roses are red, violets are blue, I am schizophrenic and so am I ] -----Original Message----- From: jim davis [mailto:[EMAIL PROTECTED]] Sent: donderdag 11 januari 2001 17:03 To: [EMAIL PROTECTED] Subject: [PHP] passing data to another php page. Hello! I have looked up and found out how to pass data into a function and have that function return data. Now i was wondering if there was a way, with out using html's <form> tag, to call another php page and pass it data? Thanks! -Jim -- PHP General Mailing List (http://www.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! Is there a way to automaticly send a post request(redirect with method=post and some variables), using php. Like the user push the submit-button in a form. Knut G. Norway
Yes. Search for "PostToHost" and "Rasmus Lerdorf" in google, dogpile, or whatever. Or, dig through Manuel Lemos' class libraries for a OO version. ----- Original Message ----- From: Knut Sætre <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, January 11, 2001 10:00 AM Subject: [PHP] Post automaticly > Hi all! > Is there a way to automaticly send a post request(redirect with method=post > and some variables), using php. Like the user push the submit-button in a > form. > > Knut G. > Norway > > -- > PHP General Mailing List (http://www.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 am workink with php 4.0.2, apache server 1.312 and mySql and i´m having throubles using sessions....someone could help me thanks...
Hello everyone-- I've got a easy question that I can't seem to answer for myself. I'm running a query in MySQL and want to know how many entries are in a table and then echo that out onto a page. I thought this would be easy but I don't know why it's not working. Anyway, here's what I am doing: (open db connection) $query = "SELECT count(*) FROM Movie"; $result = mysql_query($sql, $dbLink); $myrow = mysql_result($result); echo $myrow; (close db connection) I know this is wrong but I don't know how to get the results to echo out to the page. Thanks, Jay
Joseph, here it is: Number of manpages in db: <?php $sql = "SELECT count(*) FROM manpagetool.manpages"; $result= mysql_query($sql); $number = mysql_fetch_array($result); echo $number["count(*)"]; ?> hope that's what you were looking for, Nicolas. "Paulson, Joseph V. \"Jay\"" wrote: > > Hello everyone-- > I've got a easy question that I can't seem to answer for myself. I'm > running a query in MySQL and want to know how many entries are in a table > and then echo that out onto a page. I thought this would be easy but I > don't know why it's not working. Anyway, here's what I am doing: > > (open db connection) > > $query = "SELECT count(*) FROM Movie"; > $result = mysql_query($sql, $dbLink); > $myrow = mysql_result($result); > echo $myrow; > > (close db connection) > > I know this is wrong but I don't know how to get the results to echo out to > the page. > > Thanks, > Jay > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
Paulson, Joseph V. \"Jay\" wrote: > Hello everyone-- > I've got a easy question that I can't seem to answer for myself. I'm > running a query in MySQL and want to know how many entries are in a table > and then echo that out onto a page. I thought this would be easy but I > don't know why it's not working. Anyway, here's what I am doing: > > (open db connection) > > $query = "SELECT count(*) FROM Movie"; > $result = mysql_query($sql, $dbLink); > $myrow = mysql_result($result); > echo $myrow; > $myrow = mysql_result($result,0,"count(*)"); -- +------------------------------------------------+ | Julie Meloni ([EMAIL PROTECTED]) | | Tech. Director, i2i Interactive (www.i2ii.com) | | | | "PHP Essentials" & "PHP Fast & Easy" | | http://www.thickbook.com/ | +------------------------------------------------+
Can anyone help with this. Got Apache 1.3.14, PHP 4.0.3pl1 and MySQL 3.22.32 happily installed. All seems to work fine, yet I keep getting these error messages when doing queries through PHP scripts (seems to work okay doing the same queries from the mysql prompt though). I tried the phpMyAdmin and bookmarker applications from the php projects page and although both work fine they have the exact same problem, you can always get the queries to go through eventually if you keep reloading the relevant php page until it loads without error - so there is nothing syntactically wrong with the query or with php/mysql being able to handle it. No large amounts of data are being handled and response times are in seconds (or less). Theres an example output of the error when it fails on bookmarker (reload the page a few times and there are usually different errors but eventually it will work correctly without any errors) at the end of this message. I looked at FAQ and mail archives from a number of sources and found a number of other people that have an identical error to this, but there is never any answer to the question (there are some suggestions that a common thread is running on Solaris 2.6 which I am and that it might be to do with error lookup). It seems there is a very fundamental problem with MySQL here which means it is useless on this platform - does anyone have it working on 2.6? Any help appreciated - otherwise I have to go look at postgresql :( Cheers, Tim. Some sample error messages - note that although it appears to be complaining about the SQL in some of these - the SQL actually runs fine under mysql and if you reload the same page repeatedly it eventually works without error. These are from bookmarker, but the problem is the same for phpmyadmin so its not the applications themselves: Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: select val from active_sessions where sid = '84aedf088024b988ff849922ea8c4b31' and name = 'bk_sess' Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: next_record called with no query pending. Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: cannot use database timctest Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: next_record called with no query pending. Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: update active_sessions set val='Ymtfc2VzczokdGhpcy0+aW4gPSAnMSc7ICR0aGlzLT5wdCA9IGFycmF5KCk7ICR0aGlzLT5wdFsnYXV0aCddID0gJzEnOyAkdGhpcy0+cHRbJ3Nlc3NfbXNnJ10gPSAnMSc7ICR0aGlzLT5wdFsnc2Vzc193YXJuX21zZyddID0gJzEnOyAkdGhpcy0+cHRbJ3Nlc3NfZXJyb3JfbXNnJ10gPSAnMSc7ICRHTE9CQUxTWydhdXRoJ10gPSBuZXcgYmtfY3JfYXV0aDsgJEdMT0JBTFNbJ2F1dGgnXS0+YXV0aCA9IGFycmF5KCk7ICRHTE9CQUxTWydhdXRoJ10tPmF1dGhbJ3VpZCddID0gJ25vYm9keSc7ICRHTE9CQUxTWydhdXRoJ10tPmF1dGhbJ3Blcm0nXSA9ICcnOyAkR0xPQkFMU1snYXV0aCddLT5hdXRoWydleHAnXSA9ICcyMTQ3NDgzNjQ3JzsgJEdMT0JBTFNbJ2F1dGgnXS0+YXV0aFsncmVmcmVzaCddID0gJzIxNDc0ODM2NDcnOyAkR0xPQkFMU1snc2Vzc19tc2cnXSA9ICcnOyAkR0xPQkFMU1snc2Vzc193YXJuX21zZyddID0gJyc7ICRHTE9CQUxTWydzZXNzX2Vycm9yX21zZyddID0gJyc7IA==', changed='20010111162415' where sid='84aedf088024b988ff849922ea8c4b31' and name='bk_sess' Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: select sum(total_public_bookmarks) as total_public from auth_user where username != '' Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: select category.name as category_name, bookmark.category_id, subcategory.name as subcategory_name, bookmark.subcategory_id, bookmark.id, bookmark.url, bookmark.name as bookmark_name, bookmark.ldesc, bookmark.keywords, rating.name as rating_name, bookmark.rating_id, bookmark.username from bookmark, category, subcategory, rating where ( bookmark.category_id = category.id and category.username = bookmark.username and bookmark.subcategory_id = subcategory.id and subcategory.username = bookmark.username and bookmark.rating_id = rating.id and rating.username = bookmark.username ) and ( bookmark.username = '' or bookmark.public_f='Y' ) order by category.name, subcategory.name, bookmark.name, bookmark.id Database Error Number: 2013 Message: Lost connection to MySQL server during query SQL Stmt: select category.name as category_name, bookmark.category_id, subcategory.name as subcategory_name, bookmark.subcategory_id, bookmark.id, bookmark.url, bookmark.name as bookmark_name, bookmark.ldesc, bookmark.keywords, rating.name as rating_name, bookmark.rating_id, bookmark.username from bookmark, category, subcategory, rating where ( bookmark.category_id = category.id and category.username = bookmark.username and bookmark.subcategory_id = subcategory.id and subcategory.username = bookmark.username and bookmark.rating_id = rating.id and rating.username = bookmark.username ) and ( bookmark.username = '' or bookmark.public_f='Y' ) order by category.name, subcategory.name, bookmark.name, bookmark.id
>[MySQL broken on Solaris?] > Any help appreciated - otherwise I have to go look at postgresql :( Hey, watch it! PostgreSQL rocks! I personally always find myself ham-strung by MySQL's lack of sub-selects and aggragates not allowed in the where clause... You can work around it, but it's a PITA. PostgreSQL is *much* faster than it used to be. Whether or not it's as fast as MySQL... I dunno. But show me verifiable benchmarks and tests from an unbiased source if you want to answer.
I'm passing odbe_exec() an ODBC connection ID (returned from odbc_connect()) and a SQL command that pulls several fields from a query in an Access database. Playing with it, I've determined that removing certain fields from my SQL command (not SELECT'ing them) will allow it to work. These fields are composed of other fields, joined together in the Access query (e.g. [Location] & [Sublocation]). I tried doing the join directly in my PHP SQL command ("SELECT [Location] & [Sublocation] AS Local FROM [Test Query] "), but this fails with: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2., SQL state 07001 in SQLExecDirect in... I'm not sure what the problem is here. Does the ODBC Access driver not support "AS" or is the syntax differet? Any tips on how to get it to join these fields that will work, either in Access or my SQL SELECT command? Justin On Thu, 11 Jan 2001, Richard Lynch wrote: > What arguments are you passing to odbc_exec()? > > ----- Original Message ----- > From: Justin Smith <[EMAIL PROTECTED]> > Newsgroups: php.general > Sent: Tuesday, January 09, 2001 1:07 PM > Subject: [PHP] FATAL: emalloc() error > > > > I'm trying to query an MS Access database via ODBC, but the odbc_exec > > command fails with this error: > > > > FATAL: emalloc(): Unable to allocate 2147483599 bytes > > > > I don't know why it could possibly be trying to allocate 2GB, as the > > database is only about 4MB. Any suggestions would be appreciated. Justin Smith New Mexico Natural Heritage Program University of New Mexico Department of Biology 167 Castetter Hall Albuquerque, New Mexico 87131 505-277-3822 x226 505-277-3844 (fax) [EMAIL PROTECTED]
From: "Philip Olson" <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 12:36 AM > I hear MIR is for sale. This could make a good PHP random function, one > that always works! Let's pool our resources and get on it. Great thing > is, no need for these mysterious seeds. > > philip > > > On Wed, 10 Jan 2001, Jerry Lake wrote: > > > We may as we set it up in space > > to minimalize gravity and friction > > -can't be adding any predictable forces ;) Ahh... but gravity and friction are exactly what makes the result unpredictable. If in no-gravity and in vacuum, you ought to be able to predict which ball you get, by taking into account the parameters when throwing the balls (direction of each ball, speed, spinning, etc.) and the sorroundings (walls' angels, extruding features - of which there would be plenty onboard the Mir - etc.). So the outcome will not be random but a precise (if mindnumbing) calculated result. :-) Maybe I ought to enter decaf-mode... - Carsten
hello, can somebody give me some hint (or complete code) how to find out, how many users are on my page at that moment.
Hi i think it's useless since http is stateless, but you can find one here : http://www.php-homepage.de/scripts/source.html?scriptid=20 Sebastian > -----Ursprüngliche Nachricht----- > Von: Gregor [mailto:[EMAIL PROTECTED]] > Gesendet: Donnerstag, 11. Januar 2001 18:29 > An: [EMAIL PROTECTED] > Betreff: [PHP] number of users currently on web > > > hello, can somebody give me some hint (or complete code) how > to find out, > how many users are on my page at that moment. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] >
yes, use binarycloud. (binarycloud.com) select count(*) from bc_logged_in; :) _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] ("Gregor") > Newsgroups: php.general > Date: 11 Jan 2001 09:28:45 -0800 > Subject: [PHP] number of users currently on web > > hello, can somebody give me some hint (or complete code) how to find out, > how many users are on my page at that moment. > > > > -- > PHP General Mailing List (http://www.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 my isp mumbels something about trouble with header changes with php since it's running in CGI mode. I diffuse remember a way to connect to a webserver with telnet on port 80 and then typing something to request a page.. could somone please tell me what that something was? or a page that point's out stuff like that? thanks Sebastian
At 6:34 PM +0100 1/11/01, Sebastian Stadtlich wrote: >Hi All > >my isp mumbels something about trouble with header changes with php since >it's >running in CGI mode. I diffuse remember a way to connect to a webserver with >telnet on port >80 and then typing something to request a page.. could somone please tell me >what that something >was? or a page that point's out stuff like that? > >thanks >Sebastian Offhand, I can't see what header changes might be causing trouble, but - To actually take a look at the headers returned, you can telnet to your web server, port 80 and then type an HTTP command. For instance: HEAD / HTTP/1.0 <press return key twice> This will give you a summary of info, with headers, of your default index page. GET /some/path/page.php HTTP/1.0 <press return key twice> , for example, will retrieve the entire page /some/path/page.php, including the HTTP headers. For more info on HTTP 1.1 (which most web servers should support by now), you can check out ftp://ftp.isi.edu/in-notes/rfc2616.txt (it's a ~412KB text doc). For a list of references to all HTTP protocols, extensions, proposals, etc. see http://www.w3.org/Protocols/ -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 ---+
Besides using Telent to look at HTTP header info, GNU wget is pretty handy (manual: http://www.gnu.org/manual/wget/html_mono/wget.html). To look just at header info I use: wget --spider -S http://your.web.site.com/somedir/page.php Aaron Gardner web developer yourfit.com -----Original Message----- At 6:34 PM +0100 1/11/01, Sebastian Stadtlich wrote: >Hi All > >my isp mumbels something about trouble with header changes with php since >it's >running in CGI mode. I diffuse remember a way to connect to a webserver with >telnet on port >80 and then typing something to request a page.. could somone please tell me >what that something >was? or a page that point's out stuff like that? > >thanks >Sebastian
Title: Jorge Inti Benites Roche
Hi!I try use this code, but not work$file = fopen (http://ultra10:9000/cgi-bin/query?mss=search, "r");
if (!$file) {
echo "<p>Unable to open remote file.\n";
exit;"rewind($file);"This is the error mesagge:"Warning: Unable to find file identifier 1 in /www/radar/busca.php3 "Why??????
Telecom Internet
Jorge Inti Benites Roche
Tel: +54 (11)4968-6106
Gcia. Web Services
$file = fopen (http://ultra10:9000/cgi-bin/query?mss=search, "r"); should be $file = fopen("http://ultra10:9000/cgi-bin/query?mss=search", "r"); Ollie -----Original Message----- From: Jorge Inti Benites Roche [mailto:[EMAIL PROTECTED]] Sent: 11 January 2000 17:41 To: [EMAIL PROTECTED] Subject: [PHP] problem with rewind Hi! I try use this code, but not work $file = fopen (http://ultra10:9000/cgi-bin/query?mss=search, "r"); if (!$file) { echo "<p>Unable to open remote file.\n"; exit; "rewind($file);" This is the error mesagge: "Warning: Unable to find file identifier 1 in /www/radar/busca.php3 " Why?????? Telecom Internet Jorge Inti Benites Roche Tel: +54 (11)4968-6106 Gcia. Web Services
[Sebastian Stadtlich] you are missing 2 times a ' $file = fopen (' http://ultra10:9000/cgi-bin/query?mss=search <http://ultra10:9000/cgi-bin/query?mss=search> ', "r"); ok? Sebastian Hi! I try use this code, but not work $file = fopen ( http://ultra10:9000/cgi-bin/query?mss=search <http://ultra10:9000/cgi-bin/query?mss=search> , "r"); if (!$file) { echo "<p>Unable to open remote file.\n"; exit; "rewind($file);" This is the error mesagge: "Warning: Unable to find file identifier 1 in /www/radar/busca.php3 " Why?????? Telecom Internet Jorge Inti Benites Roche Tel: +54 (11)4968-6106 Gcia. Web Services
yes, sorry, was my mistake in the mail, but in my code is ok $file = fopen("http://ultra10:9000/cgi-bin/query?mss=search", "r"); but not work Thanks Inti ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 2:46 PM Subject: RE: [PHP] problem with rewind > $file = fopen (http://ultra10:9000/cgi-bin/query?mss=search, "r"); > > should be > > $file = fopen("http://ultra10:9000/cgi-bin/query?mss=search", "r"); > > Ollie > -----Original Message----- > From: Jorge Inti Benites Roche [mailto:[EMAIL PROTECTED]] > Sent: 11 January 2000 17:41 > To: [EMAIL PROTECTED] > Subject: [PHP] problem with rewind > > > Hi! > I try use this code, but not work > > $file = fopen (http://ultra10:9000/cgi-bin/query?mss=search, "r"); > if (!$file) { > echo "<p>Unable to open remote file.\n"; > exit; > > "rewind($file);" > > This is the error mesagge: > "Warning: Unable to find file identifier 1 in /www/radar/busca.php3 " > > Why?????? > > > > Telecom Internet > Jorge Inti Benites Roche > Tel: +54 (11)4968-6106 > Gcia. Web 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] >
Jesus Climent wrote: > > Is it possible to have a "php" executable to generate static pages instead of using >the apache to generate the dynamic pages every time a connection is received? > > I would like to have a serer with static pages and recreate them using xml/html >every time there is a change... > > J:esse > Hi there, PHP 4 has a stand alone interpreter. If you have installed the cgi bit of PHP 3, then you have an interpreter in your cgi-bin directory. I'm not entirely sure about PHP 3... I'm trying to remember what a friend told me once. Since you are wanting something stand alone, do not forget that you can use other languages, too. Regards, Jason -- Jason Murray Developer jWeb New Media Design 1 877 525 jWEB
> > I would like to have a serer with static pages and recreate them using xml/html >every time there is a change... /. :) Yes, just compile PHP4 into your cgi binary. If you have php 3 on your system, name the binary php4 (for no better reason that so you don't over write your php 3 binary). You would just run it like this: /usr/local/bin/php4 -q your_script.php > your_output_file.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
I am brand new to this list but I have used PHP a little Yes - you can use PHP 3 in stand alone mode Issues: 1) The usage claimed to be able to set variables on the command line. I was able to set one but not more than that - basically I just ended up creating a temporary wrapper script 2) I was actually doing this from inside Python, which was in turn being run as a CGI. To actually get the PHP to run command line I had to unset a subset of the HTML variables in the system call( which I can't recall off the top of my head ) Regs Brian White At 12:54 PM 1/11/01 -0600, Jason Murray wrote: >Jesus Climent wrote: > > Is it possible to have a "php" executable to generate static > pages >instead of using the apache to generate the dynamic pages every > time >a connection is received? >... >PHP 4 has a stand alone interpreter. If you have installed the cgi bit >of PHP 3, then you have an interpreter in your cgi-bin directory. I'm >not entirely sure about PHP 3... I'm trying to remember what a friend >told me once. Since you are wanting something stand alone, do not forget >that you can use other languages, too. ------------------------- Brian White Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy http://www.steptwo.com.au/ [EMAIL PROTECTED]
I put together a small mailer using the perl Mail::Bulkmail module and the bounce mechanism from majordomo2. It has a module that you can failrly easily customize and wrapper. It's written in perl. I'm not sure how accurate the bounce parsing is, I just prototyped the system yesterday. The bounce code is in BounceHandler.pm and BounceParser.pm. jeff
Hi, I have just installed php on my windows 98 SE OS. and my .php file works file. However, the script of php embedded in html file does not work. Why? Thanks in advance! Yun
Apache does not know that you want to parse .html (anything other then .php) as php, it must be told this. Look for a line such as this, in httpd.conf : AddType application/x-httpd-php .php Add desired extensions to it, like this : AddType application/x-httpd-php .php .php3 .html .phtml .foo .blah What is added will be parsed and the code will do its thing. This assumes you're using apache but do other web servers exist? Note : http://www.php.net/manual/install-windows95-nt.php If you're running php3 then replace x-httpd-php with x-httpd-php3 in the above examples. After making changes to httpd.conf, as done above, restart apache. And note, for good measure, the following controls pretty source files : AddType application/x-httpd-php-source .phps Philip On Thu, 11 Jan 2001, Yun Wan wrote: > Hi, > > I have just installed php on my windows 98 SE OS. > and my .php file works file. However, the script of php embedded in html > file does not work. Why? > Thanks in advance! > > Yun > > > -- > PHP General Mailing List (http://www.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 This is my first post here and I am on the learning curve with php (php3 in particular as it is all my host has) and need help with a multi-page form. It is a subscription for users and consists of: 1) subscribe.php3 2) confirm.php3 subscribe.php3 is where the user enters data and then click's the "submit" button. It is a post action and refers to itself. If no errors are present it includes confirm.php3 which will display user inputs for them to verify as correct. If the click the "submit" button on this page it is supposed to write the inputs to the database. Herein lies the problem. It does not. For some reason the user inputs from subscribe.php3 do not write to the database but if I use <?print $we_first?> they display properly on confirm.php3. If I by-pass the confirmation and just write to the database it works. If I try to "halt proceedings" for the user to view it the user inputs disappear into oblivion. It looks as though the form action from subscribe.php3 and confirm.php3 are conflicting with each other. I have offered some code snippets below if anyone would be willing to help. Thanks Todd ++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++ Here is what I have in subscribe.php3: ++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++ CODE: <? if (count($HTTP_POST_VARS) <> 0) { //do stuff here to validate data - works ok } # Test form if send if ($err <> true) { include("/home/WWW/domain.com/htdocs/confirm.php3"); exit(); } } ?> FORM ACTION: <form action="subscribe.php3" METHOD="POST" ENCTYPE="multipart/form-data"> <input type="submit" value="Submit Subscription"> ++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++ Here is what I have in confirm.php3: ++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++ CODE: <? if (count($HTTP_POST_VARS) <> 0) { # Test form if send if (isset($confirm)) // If I remove this and the form action it writes perfectly but no confirmation available { /* declare some relevant variables */ $hostname = "db.domain.com"; $username = "bubba"; $password = "1234"; $userstable = "subscribe"; /* MySQL table created to store the data */ $dbName = "client"; /* make connection to database */ mysql_connect($hostname, $username, $password) OR die("Unable to connect to database"); mysql_select_db("$dbName") or die( "Unable to select database"); $query = "INSERT INTO $userstable (we_prefix,we_first,we_last,we_add1,we_add2,we_suite,we_city,we_prov,we_post al,we_phone,we_email,we_commetns,we_iud) VALUES ('$we_prefix','$we_first','$we_last','$fi_add1','$we_add2','$we_suite','$we_ city','$we_prov','$we_postal','$we_phone','$we_email','$we_cleancom', Null)"; $result = MYSQL_QUERY($query); /* Close the database connection */ MYSQL_CLOSE(); exit(); } } ?> FORM ACTION: <form action="confirm.php3" METHOD="POST" ENCTYPE="multipart/form-data"> <input type="submit" name="confirm" value="looks good...sign me up!">
I figured it out...sorry to have troubled you. I left out the hidden input fields Bye Todd
I seem to dimly remember a lib that somene wrote which will actually check the headers in the files to make _absolutely_ sure you're actually loading a jpeg, gif, etc etc. it was very cool :) _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] ("Matt Williams") > Newsgroups: php.general > Date: 11 Jan 2001 03:11:21 -0800 > Subject: RE: [PHP] File Uploading Security - Urgent please > > > if(ereg("jpg|jpeg|gif$",$userfile_name)) > { > do something > } > else > { > this file is not allowed > } > This will check that the uploaded file has the correct extension. > > Where $userfile is the upload field name in the form > > M@ >> -----Original Message----- >> From: Statbat [mailto:[EMAIL PROTECTED]] >> Sent: 11 January 2001 11:00 >> To: PHP-General >> Subject: [PHP] File Uploading Security - Urgent please >> >> >> Hello, >> >> I am doing file uploading of only jpg file format, It first copys >> in tmp directory then I copy it in main.... well you all know the >> procedure... neways what I am concerned is how can I check that >> the file in temp is correct file and is safe for me to copy it in >> the main folder? >> >> Regards >> Statbat >> > > -- > PHP General Mailing List (http://www.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 again! Ok, so I will give up the idea of calling a function from one php page and having that function return its value to another php page... BUT I was looking at the "php handbook" and found that I could return an array! this is the example thay gave: function small_numbers() { return array (0, 1, 2); } list ($zero, $one, $two) = small_numbers(); ok, that works fine for small arrays, but what if I had an array that was 20 or more elements big? Is there a way of returning a generic sized array? such as 'return array ($var[]);' ? I tried it, and it yelled at me, so I know that the above syntax is wrong, but is there an "easier" way? Thanks! -Jim
On Thu, 11 Jan 2001, jim davis wrote: > Hello again! Ok, so I will give up the idea of calling a function from > one php page and having that function return its value to another php > page... BUT I was looking at the "php handbook" and found that I could > return an array! this is the example thay gave: > > function small_numbers() { > return array (0, 1, 2); > } > list ($zero, $one, $two) = small_numbers(); > > ok, that works fine for small arrays, but what if I had an array that > was 20 or more elements big? Is there a way of returning a generic > sized array? such as 'return array ($var[]);' ? I tried it, and it > yelled at me, so I know that the above syntax is wrong, but is there an > "easier" way? > Thanks! > > -Jim > Have you tried 'return ($var)'? -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
<?php // First, create an array. Here are two ways : // first method : $array = array('a' => 33,'b' => 99,'c' => 383); // another method : $array[a] = 33; $array[b] = 99; $array[c] = 383; // Those are identical. Next, let's print all of them. foreach ($array as $key => $value) { print "<br>$key equals $value \n"; } // That will print them all. Now, let's say you wanted : // $a = 33 , $b = 99 and $c = 383 // Then do this : extract($array); // This will print 33 print $a; ?> Of course this does not explain everything about arrays but I think it refers to your question. Regards, Philip Olson http://www.cornado.com/ On Thu, 11 Jan 2001, jim davis wrote: > Hello again! Ok, so I will give up the idea of calling a function from > one php page and having that function return its value to another php > page... BUT I was looking at the "php handbook" and found that I could > return an array! this is the example thay gave: > > function small_numbers() { > return array (0, 1, 2); > } > list ($zero, $one, $two) = small_numbers(); > > ok, that works fine for small arrays, but what if I had an array that > was 20 or more elements big? Is there a way of returning a generic > sized array? such as 'return array ($var[]);' ? I tried it, and it > yelled at me, so I know that the above syntax is wrong, but is there an > "easier" way? > Thanks! > > -Jim > > > -- > PHP General Mailing List (http://www.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, could you give me an example inside of httpd.conf to create a virtual directory, i saw an example with virtual host, but i can´t Thanks
Well... I think I probably owe most of the people on this list some serious cash in consulting fees by now. But we're opensource, so I guess I'm off the hook, right? =) Anyways, another question for you people. I'm on the last leg of designing this e-commerce site. All I have left to design is the shopping cart. How I've set it up to add items is quite simple. The data is posted <add to cart> and stored like this: $cart[$prodid] = $my_qty; cart is the registered variable in my sessions. prodid is the product id, and my_qty is the quantity. now say a user wants 2 items with the id of 111 and 1 item with the id of 898. it should have the data stored as so: $cart[111] = 2 $cart[898] = 1 now.. had i been more experienced with arrays, this would not be hard. but.. i'm not sure when the user goes to check out how to walk through the data. basically i need to pull out each index (which is the product id number) as it's own variable and the qty that corresponds with it as it's own variable. >From there, although irrelevant to what the array, there variables will be passed in >a mysql query to get the info to display in the basket (ie- name, description, price). so, i figure i am going to have to loop the array to extract the info. this would probably be best since i'm going to be making seperate queries on it as well. loop until all indexes have been accounted for---> get prod id and qty from next instance in array, into $prodid and $qty query the db with the prodid display results end loop --> so.. i'm fine with the query and display, i just need to know how to get each instance into a variable in a loop. thanks a lot
On Thu, 11 Jan 2001, JB wrote: > Well... I think I probably owe most of the people on this list some serious cash in >consulting fees by now. But we're opensource, so I guess I'm off the hook, right? =) > > Anyways, another question for you people. I'm on the last leg of designing this >e-commerce site. All I have left to design is the shopping cart. > > How I've set it up to add items is quite simple. The data is posted <add to cart> >and stored like this: > > $cart[$prodid] = $my_qty; > > cart is the registered variable in my sessions. prodid is the product id, and my_qty >is the quantity. now say a user wants 2 items with the id of 111 and 1 item with the >id of 898. it should have the data stored as so: > > $cart[111] = 2 > $cart[898] = 1 > > now.. had i been more experienced with arrays, this would not be hard. but.. i'm not >sure when the user goes to check out how to walk through the data. > > basically i need to pull out each index (which is the product id number) as it's own >variable and the qty that corresponds with it as it's own variable. > > >From there, although irrelevant to what the array, there variables will be passed >in a mysql query to get the info to display in the basket (ie- name, description, >price). > > so, i figure i am going to have to loop the array to extract the info. this would >probably be best since i'm going to be making seperate queries on it as well. > > loop until all indexes have been accounted for---> > get prod id and qty from next instance in array, into $prodid and $qty > query the db with the prodid > display results > end loop --> > > so.. i'm fine with the query and display, i just need to know how to get each >instance into a variable in a loop. > > thanks a lot > Try: while (list($prodid, $qty)=each($cart)) { ... }; -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
I've downloaded the MySql package from Lightyear, and also an OSX version from NuSphere to an OSX server for my client. UNFortunately, the Lightyear tar refuses to unpack (it is meant to be dropped onto the Desktop and the OSX server doesn't have a Desktop folder) and the NuSphere installs fine except that it fails to find libpthread.A.??lib (I'm not at the server and not sure of the extension). So then setting up the grant table fails and MySql won't run. We are in critical mode to get MySql up and running on this, and I could use some help/direction. Terry > From: Terry Romine <[EMAIL PROTECTED]> > Date: Thu, 11 Jan 2001 03:37:19 -0600 > To: terry romine <[EMAIL PROTECTED]> > Subject: FW: [PHP] apple-macintosh > > From: lou <[EMAIL PROTECTED]> > Date: Thu, 28 Dec 2000 09:33:47 -0800 > To: EaTrom <[EMAIL PROTECTED]>, Jerry <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> > Subject: Re: [PHP] apple-macintosh > > http://homepage.mac.com/LightyearDesign/MacOSX/Packages/ > > Apache 1.3.12 compiled with PHP4 Support and mysql for Mac OS X > > >> I would presume that PHP would be usable under OS X -- >> >> Terry
eh? on OS X? what is your (pardon, insane) justification for having pressure to get a piece of software on a yet-to-be-released operating system? go download freeBSD it works! OSX is just beta... -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 > From: [EMAIL PROTECTED] (MacTrom) > Newsgroups: php.general > Date: 11 Jan 2001 11:06:26 -0800 > Subject: Re: [PHP] apple-macintosh > > I've downloaded the MySql package from Lightyear, and also an OSX version > from NuSphere to an OSX server for my client. UNFortunately, the Lightyear > tar refuses to unpack (it is meant to be dropped onto the Desktop and the > OSX server doesn't have a Desktop folder) and the NuSphere installs fine > except that it fails to find libpthread.A.??lib (I'm not at the server and > not sure of the extension). So then setting up the grant table fails and > MySql won't run. > > We are in critical mode to get MySql up and running on this, and I could use > some help/direction. > > Terry > >> From: Terry Romine <[EMAIL PROTECTED]> >> Date: Thu, 11 Jan 2001 03:37:19 -0600 >> To: terry romine <[EMAIL PROTECTED]> >> Subject: FW: [PHP] apple-macintosh >> >> From: lou <[EMAIL PROTECTED]> >> Date: Thu, 28 Dec 2000 09:33:47 -0800 >> To: EaTrom <[EMAIL PROTECTED]>, Jerry <[EMAIL PROTECTED]>, >> <[EMAIL PROTECTED]> >> Subject: Re: [PHP] apple-macintosh >> >> http://homepage.mac.com/LightyearDesign/MacOSX/Packages/ >> >> Apache 1.3.12 compiled with PHP4 Support and mysql for Mac OS X >> >> >>> I would presume that PHP would be usable under OS X -- >>> >>> Terry > > > -- > PHP General Mailing List (http://www.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 I pay a performance penality for calling a file that only contains html code .php or .php3? In otherwords what is the php parser overhead if there is no php code in the file? John Guynn This email brought to you by RFCs 821 and 1225.
On Thu, 11 Jan 2001, John Guynn wrote: > Do I pay a performance penality for calling a file that only contains html > code .php or .php3? In otherwords what is the php parser overhead if there > is no php code in the file? > > John Guynn > > This email brought to you by RFCs 821 and 1225. > Yes, because that file will be put through the parser regardless of whether or not there's any PHP in it. -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
At 2:22 PM -0500 1/11/01, Ignacio Vazquez-Abrams wrote: >On Thu, 11 Jan 2001, John Guynn wrote: > > > Do I pay a performance penality for calling a file that only contains html > > code .php or .php3? In otherwords what is the php parser overhead if there > > is no php code in the file? > > > > John Guynn > > > > This email brought to you by RFCs 821 and 1225. > > > >Yes, because that file will be put through the parser regardless of whether or >not there's any PHP in it. The extent of this overhead depends on whether you're running PHP as a module or as a CGI. With CGI, the overhead is quite large, probably too much unless you have a really meaty server or a lightly-hit web site. For an Apache module, I recall a test someone ran > 1 year ago that resulted in an extra ~4 % load for parsing plain html pages through php (as opposed to just statically serving the html pages). This person had set his server to php-parse the .html extension. - steve >-- >Ignacio Vazquez-Abrams <[EMAIL PROTECTED]> > +--- "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 ---+
has anyone ran any test to see what kind of performance hit? I know people are allways ranting and raving about single or double quotes regarding performance and people ranting and raving about HTML in or out of echo statements. the performance hit just isnt amazing, use what you want I figure, use whats easier to read. IMHO the last example is the hardest to read. please please everyone post your own results wether you wan tto back me or slash me. <? for ($c = 0; $c < 10000000; $c++) { echo "A"; } ?> [lee@server lee]$ time php -q test_1.php > /dev/null 23.82user 0.07system 0:25.76elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (448major+2606minor)pagefaults 0swaps [lee@server lee]$ time php -q test_1.php > /dev/null 23.19user 0.09system 0:24.03elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (447major+2606minor)pagefaults 0swaps [lee@server lee]$ time php -q test_1.php > /dev/null 23.27user 0.14system 0:26.84elapsed 87%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (447major+2606minor)pagefaults 0swaps //----------------- <? for ($c = 0; $c < 10000000; $c++) { echo 'A'; } ?> [lee@server lee]$ time php -q test_1.php > /dev/null 23.24user 0.01system 0:23.25elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (448major+2606minor)pagefaults 0swaps [lee@server lee]$ time php -q test_1.php > /dev/null 23.17user 0.10system 0:23.28elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (447major+2606minor)pagefaults 0swaps [lee@server lee]$ time php -q test_1.php > /dev/null 23.17user 0.08system 0:23.25elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (447major+2606minor)pagefaults 0swaps //------------------- <? for ($c = 0; $c < 10000000; $c++) { ?>A<? } ?> [lee@server lee]$ time php -q test_1.php > /dev/null 23.26user 0.05system 0:23.58elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (757major+2606minor)pagefaults 0swaps [lee@server lee]$ time php -q test_1.php > /dev/null 23.21user 0.06system 0:23.28elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (447major+2606minor)pagefaults 0swaps [lee@server lee]$ time php -q test_1.php > /dev/null 23.27user 0.02system 0:23.34elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (447major+2606minor)pagefaults 0swaps Chris Lee Mediawaveonline.com "Ignacio Vazquez-Abrams" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Thu, 11 Jan 2001, John Guynn wrote: > > > Do I pay a performance penality for calling a file that only contains html > > code .php or .php3? In otherwords what is the php parser overhead if there > > is no php code in the file? > > > > John Guynn > > > > This email brought to you by RFCs 821 and 1225. > > > > Yes, because that file will be put through the parser regardless of whether or > not there's any PHP in it. > > -- > 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] >
You are right. According to the PHP manual there is no boolean type as none is listed in chapter 2.6 but there are variables called TRUE and FALSE which evaluate to a true value and a false value respectively as indicated in chapter 2.8. Thanks for quoting from chapter 9. I should be paying more attention to the manual. BTW is there a way to determine the exact size of the integer type in PHP? Thanks, Neil
On Thu, 11 Jan 2001, Neil Zanella wrote: > > You are right. According to the PHP manual there is no boolean type > as none is listed in chapter 2.6 but there are variables called TRUE and > FALSE which evaluate to a true value and a false value respectively as > indicated in chapter 2.8. Thanks for quoting from chapter 9. I should > be paying more attention to the manual. > > BTW is there a way to determine the exact size of the integer type in PHP? > > Thanks, > > Neil > Actually, the PHP manual is lying. There is in fact a Boolean data type in PHP 4, it's just that no one's gotten around to fixing the manual. And true and false are constants in the same manner as 5 and "Hello World!". Integers are signed longs (32 bits) in PHP. -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
I know that if you compile PHP4 with --enable-trans-sid (as we have), it will automagically append SID to all href links. This is supposed to make it so that if a client's browser does not accept cookies, the session ID gets sent to any subsequent pages that the user gets to by clicking on links. My problem is this and I'm hoping someone can help me find a solution. In IE, I went to customize my security level. I disabled "Allow cookies that are stored on your computer" and I also disabled "Allow per session cookies (not stored)". If I do this, the enable trans sid doesn't work (as in, the value of SID is not automagically appended). If I enable the latter (with the former still disabled), the enable trans sid works beautifully. Now, my question is this the expected functionality? Or should the enable trans sid work regardless? Thanks! Chris
"allow per session cookies(not stored)" will enable cookies, IE just does some garbage collection when its closed thats all. so php realizes that IE is accepting cookies in this case and uses cookies vs trans-sid. disable all cookies in IE, and restart. goto the page your testing, you should see that in the HTML php has appended ?PHPSESSID=[PHPSESSID] to all urls and <input type=hidden name=PHPSESSID value=[PHPSESSID]> to all forms. php strangley enough ONLY does this if your urls are not absolute, ie. echo "<a href='index.php'>index<a/>\n"; will have the PHPSESSID added, and echo "<a href='http://somesite.com/index.php'>index<a/>\n"; will NOT have the PHPSESSID added. make sure of course too that session_start() is called from in your code too. else your not using sessions :) Chris Lee Mediawaveonline.com ""Boget, Chris"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I know that if you compile PHP4 with --enable-trans-sid > (as we have), it will automagically append SID to all href > links. This is supposed to make it so that if a client's browser > does not accept cookies, the session ID gets sent to any > subsequent pages that the user gets to by clicking on links. > > My problem is this and I'm hoping someone can help me > find a solution. In IE, I went to customize my security > level. I disabled "Allow cookies that are stored on your > computer" and I also disabled "Allow per session cookies > (not stored)". If I do this, the enable trans sid doesn't work > (as in, the value of SID is not automagically appended). If > I enable the latter (with the former still disabled), the enable > trans sid works beautifully. > Now, my question is this the expected functionality? Or > should the enable trans sid work regardless? > > Thanks! > > Chris >
> "allow per session cookies(not stored)" will enable cookies, > IE just does some garbage collection when its closed thats all. > so php realizes that IE is accepting cookies in this case and > uses cookies vs trans-sid. Ok. Makes sense. However, when this option is enabled, I see PHPSESSID passed via the URL whereas if both options are enabled, it is not (and is just being passed via cookie, presumably). I'm not surprised by this, it just seemed kind of odd if both options are using cookies. > disable all cookies in IE, and restart. goto the page your testing, > you should see that in the HTML php has appended > ?PHPSESSID=[PHPSESSID] > to all urls This is not happening. If I disable all cookies in NS, I, unsurprisingly, experience the same problem. > php strangley enough ONLY does this if your urls are not absolute, ie. > echo "<a href='index.php'>index<a/>\n"; > will have the PHPSESSID added, and > echo "<a href='http://somesite.com/index.php'>index<a/>\n"; > will NOT have the PHPSESSID added. Mine were absolute and I tried to do it the other way and it still didn't work. > make sure of course too that session_start() is called from > in your code too. else your not using sessions :) I am. :) Chris
> make sure of course too that session_start() is called from > in your code too. else your not using sessions :) These are the 3 files I'm using; they all reside in the same dir: "index.php" <script language="php"> session_start(); header( "location: page1.php?" . SID ); exit(); </script> "page1.php <script language="php"> session_start(); echo "Your session id is: " . session_id(); echo "<br><br>\n"; echo "<a href=\"page2.php\">Page2</a>\n"; </script> "page2.php" <script language="php"> session_start(); echo "Your session id is: " . session_id(); echo "<br><br>\n"; echo "<a href=\"page1.php\">Page1</a>\n"; </script> The PHPSESSID variable is *not* being passed on the url going between page1 and page 2 and the session id is always different (obviously). --enable-trans-sid IS turned on and I have no idea what's going on... Chris
> These are the 3 files I'm using; they all reside in the same dir: > > The PHPSESSID variable is *not* being passed on > the url going between page1 and page 2 and the > session id is always different (obviously). > --enable-trans-sid IS turned on and I have no idea > what's going on... When i try it it works. Same ID! (localhost on windows 98) Chris -------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------
Hi everybody!!! I want to create a new database using a form to take the name of the database. For some reason I get "Couldn't create database". Can some body tell me what I am doing wrong... <? if (!$dname) { header("Location: http://localhost/db_createdb.html"); exit; } $db_name = $dname; $connect = @mysql_connect("localhost", "jnava", "jnava77") or die("Couldn't connect"); $result = mysql_create_db($db_name, $connect) or die("Couldn't create database."); if ($result) { $msg = "<P>Database has been created!</P>"; } ?> <HTML> <HEAD> <TITLE>Create a MySQL Database</TITLE> </HEAD> <BODY> <? echo "$msg"; ?> <? echo "$connect"; ?> </BODY> </HTML>
On Thu, 11 Jan 2001, Jesus Nava wrote: > Hi everybody!!! > I want to create a new database using a form to take the name of the database. For >some reason I get "Couldn't create database". Can some body tell me what I am doing >wrong... > > <? > if (!$dname) > { > header("Location: http://localhost/db_createdb.html"); > exit; > } > $db_name = $dname; > $connect = @mysql_connect("localhost", "jnava", "jnava77") or die("Couldn't >connect"); > $result = mysql_create_db($db_name, $connect) or die("Couldn't create database."); > > if ($result) > { > $msg = "<P>Database has been created!</P>"; > } > ?> > <HTML> > <HEAD> > <TITLE>Create a MySQL Database</TITLE> > </HEAD> > <BODY> > <? echo "$msg"; ?> > <? echo "$connect"; ?> > </BODY> > </HTML> > Does that user have universal create rights? -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
better use 'root' user or create a user with enough privilage to create database Jesus Nava wrote: > Hi everybody!!! > I want to create a new database using a form to take the name of the database. For >some reason I get "Couldn't create database". Can some body tell me what I am doing >wrong... > > <? > if (!$dname) > { > header("Location: http://localhost/db_createdb.html"); > exit; > } > $db_name = $dname; > $connect = @mysql_connect("localhost", "jnava", "jnava77") or die("Couldn't >connect"); > $result = mysql_create_db($db_name, $connect) or die("Couldn't create database."); > > if ($result) > { > $msg = "<P>Database has been created!</P>"; > } > ?> > <HTML> > <HEAD> > <TITLE>Create a MySQL Database</TITLE> > </HEAD> > <BODY> > <? echo "$msg"; ?> > <? echo "$connect"; ?> > </BODY> > </HTML> >
I can see that "a" represents "Array", "s" represents "String", "i" represents "Index". What does "b" represent and is there any documentation for other representations? Ted
On Thu, 11 Jan 2001, TR Henigson wrote: > I can see that "a" represents "Array", "s" represents "String", > "i" represents "Index". What does "b" represent and is there any > documentation for other representations? > > Ted > Actually, "i" represents "Integer", "b" represents "Boolean", and "n" represents "Null". Don't ask me about the last one; I only saw it once and I don't know how it got there. -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
Title: Jorge Inti Benites Roche
Hi!
I try use this code, but not work
$file = fopen ("http://ultra10:9000/cgi-bin/query?mss=search" , "r");
if (!$file) {
echo "<p>Unable to open remote file.\n";
exit;
"rewind($file);"
This is the error mesagge:
"Warning: Unable to find file identifier 1 in /www/radar/busca.php3 "
Why??Thank you
Telecom Internet
Jorge Inti Benites Roche
Tel: +54 (11)4968-6106
Gcia. Web Services
Jorge Inti Benites RocheThe manual says: " The file pointer must be valid, and must point to a file successfully opened by fopen(). " "file" not "url". P.S.: please no HTML-mails. -----Original Message----- From: Jorge Inti Benites Roche [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 11, 2000 8:34 PM To: [EMAIL PROTECTED] Subject: [PHP] problem with rewind 2 Hi! I try use this code, but not work $file = fopen ("http://ultra10:9000/cgi-bin/query?mss=search" , "r"); if (!$file) { echo "<p>Unable to open remote file.\n"; exit; "rewind($file);" This is the error mesagge: "Warning: Unable to find file identifier 1 in /www/radar/busca.php3 " Why?? Thank you Telecom Internet Jorge Inti Benites Roche Tel: +54 (11)4968-6106 Gcia. Web Services
Hello, I have noticed that while the JavaScript/PHP documentation looks much nicer only an HTML version of the PHP documentaion is distributed. I would like to know whether it would be possible to obtain the original much more pleasant to read JavaScript/PHP documentation so that users may install a copy on their local hard drive and browse the pretty documentation while offline. Thanks, Neil
I *think* the JavaScript (and DHTML and whatnot) utilize server-side code to detect your browser and come up with different code. The alternative is to crash some browsers, which is not so nice. :-^ I think some complaints were even received at php.net from other webmasters who stole the site wholesale and then wrote to complain that it crashed other browsers. Go Figure. But this all goes back a ways, so might not be true any more. So, you'd essentially need to walk the site with your browser as user_agent to get the *right* HTML/JavaScript/etc, or essentially mirror the whole thing with PHP and database and all -- Not sure what the current legalities of either of those options are. ----- Original Message ----- From: Neil Zanella <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, January 11, 2001 1:48 PM Subject: [PHP] JavaScript/PHP documentation > > Hello, > > I have noticed that while the JavaScript/PHP documentation looks much > nicer only an HTML version of the PHP documentaion is distributed. > I would like to know whether it would be possible to obtain the > original much more pleasant to read JavaScript/PHP documentation > so that users may install a copy on their local hard drive and browse > the pretty documentation while offline. > > Thanks, > > Neil > > > -- > PHP General Mailing List (http://www.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! when was <?= 'enabled' in php? 4.0.0 ? tia, philip
> when was <?= 'enabled' in php? 4.0.0 ? Definitely before that -- Not sure when. It was a long discussion, and some PHP Developers still think it was a Bad Idea (tm). *SHOULD* be in the ChangeLogs somewhere... It mostly keeps the recent ASP converts from whining :-)
You don't need to hach into anything. Apache has builtin pipe redirection support. Search for "rotatelog" in Apache docs. -Stathis. Richard Lynch wrote: > > I doubt it... > > On busy servers, those files must get so huge, there's no way Apache can be > trying to keep it all in RAM. > > So, pretty much, Apache logs it and forgets it. > > The only place that data exists is in the log file... > > Unless you hack the Apache logging routine to send it to your database or > something else instead... I guess you could do that. > > ----- Original Message ----- > From: "Scott Hutchens" <[EMAIL PROTECTED]> > Newsgroups: php.general > Sent: Monday, January 08, 2001 6:02 PM > Subject: [PHP] Accessing Common Log Format (CLF) info. > > > Hi, > > > > Is it possible for PHP running as a mod on Apache to get the CLF data that > > you see in access.log without actually opening the file? > > > > Thanks for your time. > > > > Scott. > > > > > > > > > > -- > > PHP General Mailing List (http://www.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]
Could anybody explain me what a session is in php? Thank you...
Try this : I'm new to sessions and cookies , where should I start ? --------------------------------------------------------------- http://www.faqts.com/knowledge_base/view.phtml/aid/6621/fid/594 It refers to a few tutorials and information. Philip On Thu, 11 Jan 2001, Jesus Nava wrote: > Could anybody explain me what a session is in php? > > Thank you... >
On Wed, 10 Jan 2001, Alex Black wrote: > > definitely avoid print() and echo like the _plague_ for html output. > Do you have any reason for saying that other than that you don't like that style of code? -burk -- [EMAIL PROTECTED]
yes: if you have ever worked in a fast paced production environment, where html is changed sometimes 5 times a day, digging through hundreds of lines of: echo "<input type=\"text\" name=\"hello\" size=\"20\" value=\"$value\">" starts to make you insane. speaking as an html author, and a lover of php, _please_: <input type="text" name="hello" size="20" value="<?=$value?>"> it makes the code useable. I've had to avoid using many otherwise cool PHP "products" because of the echo problem. as part of the code standard for binarycloud I specifically outline this: : _never_ and I do mean that _never_ use echo for printing html. it makes your apps impossible to change, and in a production environment, that's not ok. what if I find a problem in your table code? etc. -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] > Newsgroups: php.general > Date: 11 Jan 2001 12:40:18 -0800 > Subject: Re: [PHP] mixing HTML and PHP code > > On Wed, 10 Jan 2001, Alex Black wrote: >> >> definitely avoid print() and echo like the _plague_ for html output. >> > > Do you have any reason for saying that other than that you don't like that > style of code? > > -burk > > -- > [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] >
> if you have ever worked in a fast paced production environment, where > html is changed sometimes 5 times a day, digging through hundreds > of lines of: > > echo "<input type=\"text\" name=\"hello\" size=\"20\" > value=\"$value\">" > > starts to make you insane. That's pretty ugly. echo "<input type='text' name='hello' size='20' value='$value'>"; That's a bit better. This is even better still: echo "<INPUT TYPE='TEXT' NAME='hello' SIZE='20' VALUE='$value'>"; Now, I can see the PHP variable used in there a lot easier than I could before. Syntax highlighting would bring it up more, too. > speaking as an html author, and a lover of php, _please_: > > <input type="text" name="hello" size="20" value="<?=$value?>"> > > it makes the code useable. Actually, it makes it less useable for me. > : _never_ and I do mean that _never_ use echo for printing html. > > it makes your apps impossible to change, and in a production > environment, that's not ok. What if, halfway through a page, I figure out that I need to do a redirect or set a cookie? I assemble *all* the page content into a single string variable, and echo it out as the last thing the script does. This way I'm free to play with HTTP headers right up to that time. However, each to their own - your way works for you and your team, mine works for me and mine :) Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair!
I have to agree with Jason on this one too. I work in a *production* enviroment, Ive worked on small (2k loc) to medium (45k loc) sites and I see no problem with echo "" accually I see a larger problem with going in and out of PHP, it breaks the consistancy. code snip from phorum <?PHP echo $lAuthor;?>: <?PHP echo $author; ?> (<?PHP echo $host; ?>)<br> <?PHP echo $lDate;?>: <?PHP echo $datestamp; ?><br> //---- <? echo "$lAuthor: $author ($host)<br>\n"; echo "$lDate: $datestamp<br>\n"; ?> I find the later easier to read, and modify, IMHO I cant see why it would be easier. Maybe just programming style, everyone to they're own. Chris Lee Mediawaveonline.com "Jason Murray" <[EMAIL PROTECTED]> wrote in message 1595534C9032D411AECE00508BC766FB010528D0@MERCURY">news:1595534C9032D411AECE00508BC766FB010528D0@MERCURY... > > if you have ever worked in a fast paced production environment, where > > html is changed sometimes 5 times a day, digging through hundreds > > of lines of: > > > > echo "<input type=\"text\" name=\"hello\" size=\"20\" > > value=\"$value\">" > > > > starts to make you insane. > > That's pretty ugly. > > echo "<input type='text' name='hello' size='20' value='$value'>"; > > That's a bit better. > This is even better still: > > echo "<INPUT TYPE='TEXT' NAME='hello' SIZE='20' VALUE='$value'>"; > > Now, I can see the PHP variable used in there a lot easier than I > could before. Syntax highlighting would bring it up more, too. > > > speaking as an html author, and a lover of php, _please_: > > > > <input type="text" name="hello" size="20" value="<?=$value?>"> > > > > it makes the code useable. > > Actually, it makes it less useable for me. > > > : _never_ and I do mean that _never_ use echo for printing html. > > > > it makes your apps impossible to change, and in a production > > environment, that's not ok. > > What if, halfway through a page, I figure out that I need to do a > redirect or set a cookie? > > I assemble *all* the page content into a single string variable, > and echo it out as the last thing the script does. This way I'm > free to play with HTTP headers right up to that time. > > However, each to their own - your way works for you and your team, > mine works for me and mine :) > > 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] >
$string = preg_replace("/\s+/","" $string); That will get spaces as well as special chars like \t,\n,\r and \f Ray Iftikhar wrote: > > How would I go about removing the space from a string? > (ie. 3 doors down -> 3doorsdown) > Last I checked I dont think that there was a specific function for it. > > Thanx in advance, > Ray... > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Monte Ohrt <[EMAIL PROTECTED]> http://www.ispi.net/
I'd like to write a module for PHP so that we can, from our PHP scripts, talk to our servers using our home grown communication library. My concern is that documentation says to use emalloc(), estrdup(), and efree(). Our code uses the STL quite heavily. Beyond getting past the C++ to C linker issues (extern "C" { ), will the STL cause memory problems? Is this the right forum for this kind of question? Thanks! -- Jason Lee | Get her boy and let yourself surrender. Run alone with Programmer/Analyst | her and never fall. She is wisdom and the most www.rri-medtech.com | praiseworthy trait of all.
You will probably get answers in php-dev rather than in php-general. At 21:58 11.1. 2001, Jason Lee wrote the following: -------------------------------------------------------------- >I'd like to write a module for PHP so that we can, from our PHP scripts, talk to our >servers using our home grown communication library. My concern is that documentation >says to use emalloc(), estrdup(), and efree(). Our code uses the STL quite heavily. >Beyond getting past the C++ to C linker issues (extern "C" { ), will the STL cause >memory problems? Is this the right forum for this kind of question? Thanks! > >-- >Jason Lee | Get her boy and let yourself surrender. Run alone with >Programmer/Analyst | her and never fall. She is wisdom and the most >www.rri-medtech.com | praiseworthy trait of all. > > >-- >PHP General Mailing List (http://www.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]
Which is better php3 or php4? Why? Are there pluses and minuses to each? Does php4 offer features that are useful for everyday web scripting? ----------------------------------------------------------------------- .:: Nathan Cook office: 208.343.3110 email: [EMAIL PROTECTED] pager: 208.387.9983 -----------------------------------------------------------------------
PHP3's strenghts: GPL'ed (or PHP3 license -- at your choice) PHP4's strengths: Faster (way faster) Garbage collection that works More functions -- bigger language Actively being developed These are just of the top of my head... 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 Thu, 11 Jan 2001, ncook wrote: > Date: Thu, 11 Jan 2001 14:15:56 -0700 > From: ncook <[EMAIL PROTECTED]> > To: Php List <[EMAIL PROTECTED]> > Subject: [PHP] PHP3 vs PHP4? > > Which is better php3 or php4? Why? Are there pluses and minuses to each? > > Does php4 offer features that are useful for everyday web scripting? > > ----------------------------------------------------------------------- > .:: Nathan Cook > office: 208.343.3110 > email: [EMAIL PROTECTED] > pager: 208.387.9983 > ----------------------------------------------------------------------- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
PHP4 is better than PHP3. Because it is newer. Bugs are fixed and new features are implemented on a daily basis. PHP3 is simpler, but /me personally prefer PHP4 because of output buffering feature. Yes, PHP4 offers these features. Undoubtedly. It allows you to produce many pages with a single script. :-) Maciek > -----Original Message----- > From: ncook [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 10:16 PM > To: Php List > Subject: [PHP] PHP3 vs PHP4? > > > Which is better php3 or php4? Why? Are there pluses and minuses to each? > > Does php4 offer features that are useful for everyday web scripting? > > ----------------------------------------------------------------------- > .:: Nathan Cook > office: 208.343.3110 > email: [EMAIL PROTECTED] > pager: 208.387.9983 > ----------------------------------------------------------------------- > > > -- > PHP General Mailing List (http://www.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, this is a strange one - I want to send a URL to a function that includes varibles. Those variables should be taken from within the function - as in the example below the link I want is: asdfasdf.php3?name=TEST , but that is not what I get as you can see. Does anybody know a way around this - The example is simpler than what I am actually doing and the value of $company must come from the variable. Thanks, Abe <? function testPassVar($url) { $name = "TEST"; echo "<a href=\"$url\">Click</a>"; } $url = 'asdfasdf.php3?name=$company'; testPassVar($url); echo "This is a $name"; ?>
you are assigning the variable within the function, then calling the function with the variable. this is a variable scoping issue. try this: <? function testPassVar($url) { echo "<a href=\"$url\">Click</a>"; } $company = "TEST"; $url = 'asdfasdf.php3?name='.$company; testPassVar($url); ?> -----Original Message----- From: Abe [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 1:35 PM To: [EMAIL PROTECTED] Subject: [PHP] Function -> Sending URL's Hey there, this is a strange one - I want to send a URL to a function that includes varibles. Those variables should be taken from within the function - as in the example below the link I want is: asdfasdf.php3?name=TEST , but that is not what I get as you can see. Does anybody know a way around this - The example is simpler than what I am actually doing and the value of $company must come from the variable. Thanks, Abe <? function testPassVar($url) { $name = "TEST"; echo "<a href=\"$url\">Click</a>"; } $url = 'asdfasdf.php3?name=$company'; testPassVar($url); echo "This is a $name"; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
There's a couple points here: 1: echo isn't what you want to do. You want to RETURN the value from you function. Try this: <? function testPassVar($url) { $name = "TEST"; echo "<a href=\"$url\">Click</a>"; return "<a href=\"$url?name=$name\">Click</a>"; } $url = 'asdfasdf.php3'; $newURL = testPassVar($url); echo($newURL); echo "This is a $name"; ?> 2: in the last line, you try to echo $name. $name is defined within the function testPassVar() and goes out of scope when that function is done At this point in your script, $name does not exist. Hope this helps, Cal http://www.calevans.com -----Original Message----- From: Abe [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 3:35 PM To: [EMAIL PROTECTED] Subject: [PHP] Function -> Sending URL's Hey there, this is a strange one - I want to send a URL to a function that includes varibles. Those variables should be taken from within the function - as in the example below the link I want is: asdfasdf.php3?name=TEST , but that is not what I get as you can see. Does anybody know a way around this - The example is simpler than what I am actually doing and the value of $company must come from the variable. Thanks, Abe <? function testPassVar($url) { $name = "TEST"; echo "<a href=\"$url\">Click</a>"; } $url = 'asdfasdf.php3?name=$company'; testPassVar($url); echo "This is a $name"; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
No, that wont work - unfortunately the purpose of the function is to read the values from a database then add them to the URL. So the URL is sent to the function - but the values within the URL will come from the database which is accessed from within the function. Thanks, Abe ----- Original Message ----- From: "DanO" <[EMAIL PROTECTED]> To: "Abe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 9:34 PM Subject: RE: [PHP] Function -> Sending URL's > > you are assigning the variable within the function, then calling the > function with the variable. > > this is a variable scoping issue. > > try this: > > <? > function testPassVar($url) { > echo "<a href=\"$url\">Click</a>"; > } > > $company = "TEST"; > $url = 'asdfasdf.php3?name='.$company; > testPassVar($url); > ?> > > > > -----Original Message----- > From: Abe [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 1:35 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Function -> Sending URL's > > > Hey there, > this is a strange one - I want to send a URL to a function that includes > varibles. Those variables should be taken from within the function - as in > the example below the link I want is: > > asdfasdf.php3?name=TEST , but that is not what I get as you can see. > > Does anybody know a way around this - The example is simpler than what I am > actually doing and the value of $company must come from the variable. > > Thanks, > Abe > > > > <? > function testPassVar($url) { > $name = "TEST"; > echo "<a href=\"$url\">Click</a>"; > } > > $url = 'asdfasdf.php3?name=$company'; > testPassVar($url); > echo "This is a $name"; > ?> > > > -- > PHP General Mailing List (http://www.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, but i didn't fully understand what you are trying to do. you can also pass 2 variables to the function: <? function testPassVar($url,$param) { echo "<a href="; echo $url; echo "?name="; echo $param; echo ">Click Here</a>"; } $script = 'asdfasdf.php3'; $company = 'TEST'; testPassVar($script,$company); ?> -----Original Message----- From: DanO [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 1:35 PM To: Abe; [EMAIL PROTECTED] Subject: RE: [PHP] Function -> Sending URL's you are assigning the variable within the function, then calling the function with the variable. this is a variable scoping issue. try this: <? function testPassVar($url) { echo "<a href=\"$url\">Click</a>"; } $company = "TEST"; $url = 'asdfasdf.php3?name='.$company; testPassVar($url); ?> -----Original Message----- From: Abe [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 1:35 PM To: [EMAIL PROTECTED] Subject: [PHP] Function -> Sending URL's Hey there, this is a strange one - I want to send a URL to a function that includes varibles. Those variables should be taken from within the function - as in the example below the link I want is: asdfasdf.php3?name=TEST , but that is not what I get as you can see. Does anybody know a way around this - The example is simpler than what I am actually doing and the value of $company must come from the variable. Thanks, Abe <? function testPassVar($url) { $name = "TEST"; echo "<a href=\"$url\">Click</a>"; } $url = 'asdfasdf.php3?name=$company'; testPassVar($url); echo "This is a $name"; ?> -- PHP General Mailing List (http://www.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]
Hey Cal - this makes sense but the thing is that different parts of the site will call such a function and they will all want different variables attached to the end - I could do it some other way - but I wanted to know if there was some way of doing it by sending the whole URL(incl. the variables) and letting them be dealt with by the function. Thanks, Abe ----- Original Message ----- From: "Cal Evans" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 9:40 PM Subject: RE: [PHP] Function -> Sending URL's > There's a couple points here: > > 1: echo isn't what you want to do. You want to RETURN the value from you > function. Try this: > <? > function testPassVar($url) { > $name = "TEST"; > echo "<a href=\"$url\">Click</a>"; > return "<a href=\"$url?name=$name\">Click</a>"; > } > > $url = 'asdfasdf.php3'; > $newURL = testPassVar($url); > > echo($newURL); > > echo "This is a $name"; > ?> > > 2: in the last line, you try to echo $name. $name is defined within the > function testPassVar() and goes out of scope when that function is done At > this point in your script, $name does not exist. > > Hope this helps, > Cal > > http://www.calevans.com > > -----Original Message----- > From: Abe [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 3:35 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Function -> Sending URL's > > > Hey there, > this is a strange one - I want to send a URL to a function that includes > varibles. Those variables should be taken from within the function - as in > the example below the link I want is: > > asdfasdf.php3?name=TEST , but that is not what I get as you can see. > > Does anybody know a way around this - The example is simpler than what I am > actually doing and the value of $company must come from the variable. > > Thanks, > Abe > > > > <? > function testPassVar($url) { > $name = "TEST"; > echo "<a href=\"$url\">Click</a>"; > } > > $url = 'asdfasdf.php3?name=$company'; > testPassVar($url); > echo "This is a $name"; > ?> > > > -- > PHP General Mailing List (http://www.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] >
Hey Dan You see in this example - the value of $company is coming from the script and not the function - I am trying to find a way of telling the function which variable I want to use, but the value for that variable to come from the function for exmaple: I want to tell the function - 'here is the name of the link, here are the variables to attach onto the end of it - but work out the values yourself!' Does that makes sense - I can't find a way to do that. Thanks, Abe ----- Original Message ----- From: "DanO" <[EMAIL PROTECTED]> To: "Abe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 9:41 PM Subject: RE: [PHP] Function -> Sending URL's > > sorry, but i didn't fully understand what you are trying to do. > > you can also pass 2 variables to the function: > > <? > function testPassVar($url,$param) { > echo "<a href="; > echo $url; > echo "?name="; > echo $param; > echo ">Click Here</a>"; > } > > $script = 'asdfasdf.php3'; > $company = 'TEST'; > testPassVar($script,$company); > ?> > > > > -----Original Message----- > From: DanO [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 1:35 PM > To: Abe; [EMAIL PROTECTED] > Subject: RE: [PHP] Function -> Sending URL's > > > > you are assigning the variable within the function, then calling the > function with the variable. > > this is a variable scoping issue. > > try this: > > <? > function testPassVar($url) { > echo "<a href=\"$url\">Click</a>"; > } > > $company = "TEST"; > $url = 'asdfasdf.php3?name='.$company; > testPassVar($url); > ?> > > > > -----Original Message----- > From: Abe [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 1:35 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Function -> Sending URL's > > > Hey there, > this is a strange one - I want to send a URL to a function that includes > varibles. Those variables should be taken from within the function - as in > the example below the link I want is: > > asdfasdf.php3?name=TEST , but that is not what I get as you can see. > > Does anybody know a way around this - The example is simpler than what I am > actually doing and the value of $company must come from the variable. > > Thanks, > Abe > > > > <? > function testPassVar($url) { > $name = "TEST"; > echo "<a href=\"$url\">Click</a>"; > } > > $url = 'asdfasdf.php3?name=$company'; > testPassVar($url); > echo "This is a $name"; > ?> > > > -- > PHP General Mailing List (http://www.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] >
Ok, what I would do is either pass in an array of key/value pairs OR pass in 2 variables, the key name and the value. $keyValuePairs["name"]="Company1"; $keyValuePairs["address"]="123 Main Street"; $keyValuePairs["city"]="Anytown"; $newURL = testPassVar("http://www.calevans.com",$keyValuePairs) function testPassVar($url, $keyValuePairs) { /* * There here in the function you unwind the array and add each to the URL in the form of * $thisKey=$keyValuePairs[$thiskey] * */ return $url } // function testPassVar($url, $keyValuePairs) A simpler method is to pass in a single key and value and let the function add them and return you the newly munged URL. function testPassVar($url, $key, $value) { //won't work if it's the first pair. need to test for that! return $url."&".$key."=".$value; } $newURL = testPassVar("http://www.calevans.com?test=one","name","Cal"); Cal http://www.calevans.com -----Original Message----- From: Abe [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 3:51 PM To: Cal Evans; [EMAIL PROTECTED] Subject: Re: [PHP] Function -> Sending URL's Hey Cal - this makes sense but the thing is that different parts of the site will call such a function and they will all want different variables attached to the end - I could do it some other way - but I wanted to know if there was some way of doing it by sending the whole URL(incl. the variables) and letting them be dealt with by the function. Thanks, Abe ----- Original Message ----- From: "Cal Evans" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 9:40 PM Subject: RE: [PHP] Function -> Sending URL's > There's a couple points here: > > 1: echo isn't what you want to do. You want to RETURN the value from you > function. Try this: > <? > function testPassVar($url) { > $name = "TEST"; > echo "<a href=\"$url\">Click</a>"; > return "<a href=\"$url?name=$name\">Click</a>"; > } > > $url = 'asdfasdf.php3'; > $newURL = testPassVar($url); > > echo($newURL); > > echo "This is a $name"; > ?> > > 2: in the last line, you try to echo $name. $name is defined within the > function testPassVar() and goes out of scope when that function is done At > this point in your script, $name does not exist. > > Hope this helps, > Cal > > http://www.calevans.com > > -----Original Message----- > From: Abe [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 3:35 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Function -> Sending URL's > > > Hey there, > this is a strange one - I want to send a URL to a function that includes > varibles. Those variables should be taken from within the function - as in > the example below the link I want is: > > asdfasdf.php3?name=TEST , but that is not what I get as you can see. > > Does anybody know a way around this - The example is simpler than what I am > actually doing and the value of $company must come from the variable. > > Thanks, > Abe > > > > <? > function testPassVar($url) { > $name = "TEST"; > echo "<a href=\"$url\">Click</a>"; > } > > $url = 'asdfasdf.php3?name=$company'; > testPassVar($url); > echo "This is a $name"; > ?> > > > -- > PHP General Mailing List (http://www.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] >
<? function testPassVar($url,$paramname) { $paramvalue="TEST"; echo "<a href=\"$url?$paramname=$paramvalue\">Click Here</a>"; } $script = 'asdfasdf.php3'; $paramname = 'name'; testPassVar($script,$paramname); ?> ----- Original Message ----- From: "Abe" <[EMAIL PROTECTED]> To: "DanO" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 1:59 PM Subject: Re: [PHP] Function -> Sending URL's > Hey Dan > > You see in this example - the value of $company is coming from the script > and not the function - I am trying to find a way of telling the function > which variable I want to use, but the value for that variable to come from > the function for exmaple: > > I want to tell the function - > 'here is the name of the link, here are the variables to attach onto the end > of it - but work out the values yourself!' > > Does that makes sense - I can't find a way to do that. > > Thanks, > Abe > > ----- Original Message ----- > From: "DanO" <[EMAIL PROTECTED]> > To: "Abe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Thursday, January 11, 2001 9:41 PM > Subject: RE: [PHP] Function -> Sending URL's > > > > > > sorry, but i didn't fully understand what you are trying to do. > > > > you can also pass 2 variables to the function: > > > > <? > > function testPassVar($url,$param) { > > echo "<a href="; > > echo $url; > > echo "?name="; > > echo $param; > > echo ">Click Here</a>"; > > } > > > > $script = 'asdfasdf.php3'; > > $company = 'TEST'; > > testPassVar($script,$company); > > ?> > > > > > > > > -----Original Message----- > > From: DanO [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, January 11, 2001 1:35 PM > > To: Abe; [EMAIL PROTECTED] > > Subject: RE: [PHP] Function -> Sending URL's > > > > > > > > you are assigning the variable within the function, then calling the > > function with the variable. > > > > this is a variable scoping issue. > > > > try this: > > > > <? > > function testPassVar($url) { > > echo "<a href=\"$url\">Click</a>"; > > } > > > > $company = "TEST"; > > $url = 'asdfasdf.php3?name='.$company; > > testPassVar($url); > > ?> > > > > > > > > -----Original Message----- > > From: Abe [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, January 11, 2001 1:35 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Function -> Sending URL's > > > > > > Hey there, > > this is a strange one - I want to send a URL to a function that includes > > varibles. Those variables should be taken from within the function - as > in > > the example below the link I want is: > > > > asdfasdf.php3?name=TEST , but that is not what I get as you can see. > > > > Does anybody know a way around this - The example is simpler than what I > am > > actually doing and the value of $company must come from the variable. > > > > Thanks, > > Abe > > > > > > > > <? > > function testPassVar($url) { > > $name = "TEST"; > > echo "<a href=\"$url\">Click</a>"; > > } > > > > $url = 'asdfasdf.php3?name=$company'; > > testPassVar($url); > > echo "This is a $name"; > > ?> > > > > > > -- > > PHP General Mailing List (http://www.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] >
ok, that makes sense now: <? function dataQuery($param) { $value = "results from $param"; return $value; } function passDataQuery($url,$param) { $results = dataQuery($param); $urlstring_new = "<a href=".$url."?".$param."=".$results.">Link Description</a>"; return $urlstring_new; } $script = "asdfasdf.php3"; $varname = "TESTNAME"; echo passDataQuery($script,$varname); ?> you could alternately perform the dataQuery statements with passDataQuery. DanO -----Original Message----- From: Abe [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 1:59 PM To: DanO; [EMAIL PROTECTED] Subject: Re: [PHP] Function -> Sending URL's Hey Dan You see in this example - the value of $company is coming from the script and not the function - I am trying to find a way of telling the function which variable I want to use, but the value for that variable to come from the function for exmaple: I want to tell the function - 'here is the name of the link, here are the variables to attach onto the end of it - but work out the values yourself!' Does that makes sense - I can't find a way to do that. Thanks, Abe ----- Original Message ----- From: "DanO" <[EMAIL PROTECTED]> To: "Abe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 9:41 PM Subject: RE: [PHP] Function -> Sending URL's > > sorry, but i didn't fully understand what you are trying to do. > > you can also pass 2 variables to the function: > > <? > function testPassVar($url,$param) { > echo "<a href="; > echo $url; > echo "?name="; > echo $param; > echo ">Click Here</a>"; > } > > $script = 'asdfasdf.php3'; > $company = 'TEST'; > testPassVar($script,$company); > ?> > > > > -----Original Message----- > From: DanO [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 1:35 PM > To: Abe; [EMAIL PROTECTED] > Subject: RE: [PHP] Function -> Sending URL's > > > > you are assigning the variable within the function, then calling the > function with the variable. > > this is a variable scoping issue. > > try this: > > <? > function testPassVar($url) { > echo "<a href=\"$url\">Click</a>"; > } > > $company = "TEST"; > $url = 'asdfasdf.php3?name='.$company; > testPassVar($url); > ?> > > > > -----Original Message----- > From: Abe [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 1:35 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Function -> Sending URL's > > > Hey there, > this is a strange one - I want to send a URL to a function that includes > varibles. Those variables should be taken from within the function - as in > the example below the link I want is: > > asdfasdf.php3?name=TEST , but that is not what I get as you can see. > > Does anybody know a way around this - The example is simpler than what I am > actually doing and the value of $company must come from the variable. > > Thanks, > Abe > > > > <? > function testPassVar($url) { > $name = "TEST"; > echo "<a href=\"$url\">Click</a>"; > } > > $url = 'asdfasdf.php3?name=$company'; > testPassVar($url); > echo "This is a $name"; > ?> > > > -- > PHP General Mailing List (http://www.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] >
That's the thing see - I don't want to send the value - but I guess I could do that with a case statement so if I want to append the 'address' then i could send the word address to the function and then have a case statement check if the var is address then if it is, to append the actual address value onto the it. Thanks eveyone, Abe ----- Original Message ----- From: "Cal Evans" <[EMAIL PROTECTED]> To: "Abe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 10:07 PM Subject: RE: [PHP] Function -> Sending URL's > > Ok, what I would do is either pass in an array of key/value pairs OR pass in > 2 variables, the key name and the value. > > $keyValuePairs["name"]="Company1"; > $keyValuePairs["address"]="123 Main Street"; > $keyValuePairs["city"]="Anytown"; > $newURL = testPassVar("http://www.calevans.com",$keyValuePairs) > function testPassVar($url, $keyValuePairs) { > /* > * There here in the function you unwind the array and add each to the URL > in the form of > * $thisKey=$keyValuePairs[$thiskey] > * > */ > return $url > } // function testPassVar($url, $keyValuePairs) > > A simpler method is to pass in a single key and value and let the function > add them and return you the newly munged URL. > > function testPassVar($url, $key, $value) { > //won't work if it's the first pair. need to test for that! > return $url."&".$key."=".$value; > > } > > $newURL = testPassVar("http://www.calevans.com?test=one","name","Cal"); > > > Cal > http://www.calevans.com > > -----Original Message----- > From: Abe [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 11, 2001 3:51 PM > To: Cal Evans; [EMAIL PROTECTED] > Subject: Re: [PHP] Function -> Sending URL's > > > Hey Cal - > > this makes sense but the thing is that different parts of the site will call > such a function and they will all want different variables attached to the > end - > > I could do it some other way - but I wanted to know if there was some way of > doing it by sending the whole URL(incl. the variables) and letting them be > dealt with by the function. > > Thanks, > Abe > > > ----- Original Message ----- > From: "Cal Evans" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, January 11, 2001 9:40 PM > Subject: RE: [PHP] Function -> Sending URL's > > > > There's a couple points here: > > > > 1: echo isn't what you want to do. You want to RETURN the value from you > > function. Try this: > > <? > > function testPassVar($url) { > > $name = "TEST"; > > echo "<a href=\"$url\">Click</a>"; > > return "<a href=\"$url?name=$name\">Click</a>"; > > } > > > > $url = 'asdfasdf.php3'; > > $newURL = testPassVar($url); > > > > echo($newURL); > > > > echo "This is a $name"; > > ?> > > > > 2: in the last line, you try to echo $name. $name is defined within the > > function testPassVar() and goes out of scope when that function is done > At > > this point in your script, $name does not exist. > > > > Hope this helps, > > Cal > > > > http://www.calevans.com > > > > -----Original Message----- > > From: Abe [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, January 11, 2001 3:35 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Function -> Sending URL's > > > > > > Hey there, > > this is a strange one - I want to send a URL to a function that includes > > varibles. Those variables should be taken from within the function - as > in > > the example below the link I want is: > > > > asdfasdf.php3?name=TEST , but that is not what I get as you can see. > > > > Does anybody know a way around this - The example is simpler than what I > am > > actually doing and the value of $company must come from the variable. > > > > Thanks, > > Abe > > > > > > > > <? > > function testPassVar($url) { > > $name = "TEST"; > > echo "<a href=\"$url\">Click</a>"; > > } > > > > $url = 'asdfasdf.php3?name=$company'; > > testPassVar($url); > > echo "This is a $name"; > > ?> > > > > > > -- > > PHP General Mailing List (http://www.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] >
> <? > function testPassVar($url) { > $name = "TEST"; > echo "<a href=\"$url\">Click</a>"; > } > > $url = 'asdfasdf.php3?name=$company'; > testPassVar($url); > echo "This is a $name"; > ?> > $url = "asdfasdf.php3?name=$company"; you need double quotes for the $company to be eval'd also, $name is defined within a function, which means you don't have access to it from the "outside world" can you give a little more detail? -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] ("Abe") > Newsgroups: php.general > Date: 11 Jan 2001 13:25:43 -0800 > Subject: [PHP] Function -> Sending URL's > > Hey there, > this is a strange one - I want to send a URL to a function that includes > varibles. Those variables should be taken from within the function - as in > the example below the link I want is: > > asdfasdf.php3?name=TEST , but that is not what I get as you can see. > > Does anybody know a way around this - The example is simpler than what I am > actually doing and the value of $company must come from the variable. > > Thanks, > Abe > > > > <? > function testPassVar($url) { > $name = "TEST"; > echo "<a href=\"$url\">Click</a>"; > } > > $url = 'asdfasdf.php3?name=$company'; > testPassVar($url); > echo "This is a $name"; > ?> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Look for empty lines, html tags,"echoes" or "prints" before the cookie session is tried, even in include files and clear them. Jayme. http://www.conex.com.br/jjeffman -----Mensagem Original----- De: JB <[EMAIL PROTECTED]> Para: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Enviada em: quarta-feira, 10 de janeiro de 2001 12:49 Assunto: [PHP-DB] Cannot send session cache limiter - headers already sent Cannot send session cookie - headers already sent by actually.. still give me the same error after i fixed that. new code as follows along with the error: if (!session_is_registered('cart')) { $cart = array(); session_register('cart'); } else { session_start(); } ?> Warning: Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14 Warning: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14 any other ideas? =) thanks > You are missing a parentheses: > > if (!session_is_registered('cart') { > > correct: > if (!session_is_registered('cart')) { > ^ > -----Original Message----- > From: JB [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 10, 2001 6:05 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Session Errors, do you recognize? > > > Hey, I keep getting the same error messages when trying to fire up sessions > in this code i wrote. i've written some test scripts to test sessions on my > machine, and they are working, so the problem must lie within my code. Here' > what I'm getting, anyone know how to resolve this? > > Warning: Cannot send session cookie - headers already sent by (output > started at C:\Program Files\Apache > Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14 > > Warning: Cannot send session cache limiter - headers already sent (output > started at C:\Program Files\Apache > Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14 > > > wpdbcon.php -------------- > > <? > $db = "mydb"; > $user = "mybot"; > $pw = "mypw"; > $mysql_access = mysql_connect("localhost", $user, $pw); > mysql_select_db($db, $mysql_access); > > session_start(); > > if (!session_is_registered('cart') { > $cart = array(); > session_register('cart'); > } > > ?> > > i also tried doing > > if (!session_is_registered('cart') { > $cart = array(); > session_register('cart'); > } > else { > session_start(); > } > > i thought it was sending conflicting data when it was trying to initialize, > didn't work either. > > thanks in advance. > >
Hey, Simple question. Breifly rumaged through the PHP docs and couldn't find this answer. How do i force PHP to hold ending zero in a double? Ie- if the price is 15.50, php will output it as 15.5 after it does the math. how do i overcome this. thanks! jason
number_format() At 16:09 11.1. 2001, JB wrote the following: -------------------------------------------------------------- >Hey, > >Simple question. Breifly rumaged through the PHP docs and couldn't find this answer. > >How do i force PHP to hold ending zero in a double? > >Ie- if the price is 15.50, php will output it as 15.5 after it does the math. how do >i overcome this. thanks! > >jason ------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]
I think you are looking for printf. Check the manual. it won't hold it, but you can make it PRINT it. (Which, I'm asumming, is what you really want) Cal http://www.calevans.com -----Original Message----- From: JB [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 9:09 AM To: [EMAIL PROTECTED] Subject: [PHP] Making PHP Hold the hundreth place, instead of dropping the 0 Hey, Simple question. Breifly rumaged through the PHP docs and couldn't find this answer. How do i force PHP to hold ending zero in a double? Ie- if the price is 15.50, php will output it as 15.5 after it does the math. how do i overcome this. thanks! jason
PHP 4.0.4 patchlevel 1 has been released. This version fixes a few party-crashing bugs that were found in PHP 4.0.4, and two security problem that was found in the Apache module of all versions of PHP 4.0. While the danger of being vulnerable to the security problems that were found is low, all users of PHP 4.0.x that use PHP alongside Apache are encouraged to upgrade to PHP 4.0.4pl1. The new version can be downloaded from http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gz 11 Jan 2001, Version 4.0.4pl1 - Fixed the various pdf_open_*() functions (Daniel) - Fixed a bug that could cause invalid INI entries to be used under certain circumstances (Zeev) - Fixed a bug in the Apache module that could cause invalid INI values to propogate to different virtual hosts, if one or more of the virtual hosts was configured with engine=Off (Zeev) - Fixed possible crash bugs in the session module (Sascha) - Fixed the ODBC module to build properly with Solid 3.0 and OpenLink (Dan Kalowsky) - Fixed possible corruption of line number information in PHP scripts (Zeev, Zend Engine) - Fixed a few possible crashes in functions that use user-defined callbacks (Zeev, Zend Engine) Zeev -- Zeev Suraski <[EMAIL PROTECTED]> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/
Hello, Could any tell me whats wrong with the following code? Even though I have more than 10 tables in the database, it is not showing any numbers. $id_link = @mysql_connect('localhost',$uid,$pwd); $result=@mysql_db_query($db,$id_link,"show tables"); $num_of_rows=@mysql_num_rows($result); echo $num_of_rows; Thanks.
----- Original Message ----- From: "Web master" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 2:36 PM Subject: [PHP] Whats wrong with the following code? > Hello, > > Could any tell me whats wrong with the following code? Even though I > have more than 10 tables in the database, it is not showing any numbers. > > $id_link = @mysql_connect('localhost',$uid,$pwd); > > $result=@mysql_db_query($db,$id_link,"show tables"); $result=@mysql_db_query($db, "show tables", $id_link); > $num_of_rows=@mysql_num_rows($result); > echo $num_of_rows; > > > 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] >
Thank you and sorry for this stupid mistake Hsieh, Wen-Yang wrote: > ----- Original Message ----- > From: "Web master" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, January 11, 2001 2:36 PM > Subject: [PHP] Whats wrong with the following code? > > >> Hello, >> >> Could any tell me whats wrong with the following code? Even though I >> have more than 10 tables in the database, it is not showing any numbers. >> >> $id_link = @mysql_connect('localhost',$uid,$pwd); >> >> $result=@mysql_db_query($db,$id_link,"show tables"); > > > $result=@mysql_db_query($db, "show tables", $id_link); > >> $num_of_rows=@mysql_num_rows($result); >> echo $num_of_rows; >> >> >> 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] >>
Hi !!! I'm using php 4.0.3pl1 with session support and I can't KILL the session, I unregister all the variables then I session_destroy() the session but if I push the back button I still have the session working. I had been reading all the documentation and cant' find the straight answer to this. My app it's a shopping cart app so the client once check out if he push the back button still have the cart content. Please help me, I'm in a hurry. Thanks in advance.
try this: session_unset(); - i think that's the one session_destroy(); ----------------------------------------------------------------- Jonathan Rosenberg Be fierce, be fabulous, change the world! ----- Original Message ----- From: "Angel Behar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 7:01 PM Subject: [PHP] killing the session > Hi !!! > > I'm using php 4.0.3pl1 with session support and I can't KILL the session, I > unregister all the variables then I session_destroy() the session but if I > push the back button I still have the session working. > > I had been reading all the documentation and cant' find the straight answer > to this. > > My app it's a shopping cart app so the client once check out if he push the > back button still have the cart content. > > Please help me, I'm in a hurry. > > Thanks in advance. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Force that page not to be cached. You're probably building a new session with all the date from the cart... See the Code Archives linked from http://php.net/links.php Search for "cache" and use all the related headers you can find. ----- Original Message ----- From: "Angel Behar" <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, January 11, 2001 4:59 PM Subject: [PHP] killing the session > Hi !!! > > I'm using php 4.0.3pl1 with session support and I can't KILL the session, I > unregister all the variables then I session_destroy() the session but if I > push the back button I still have the session working. > > I had been reading all the documentation and cant' find the straight answer > to this. > > My app it's a shopping cart app so the client once check out if he push the > back button still have the cart content. > > Please help me, I'm in a hurry. > > Thanks in advance. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
j ______________________________________________________________________________ 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
k ----- Original Message ----- From: <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, January 11, 2001 5:01 PM Subject: [PHP] ik j
if I have a dir like this root\main\test.php how could I access this: from that script root\test\test.php basicly I mean how do I access a path before the current one
> if I have a dir like this > root\main\test.php > > how could I access this: from that script > root\test\test.php > > basicly I mean how do I access a path before the current one $PHP_SELF will point to "root\test\test.php" (though, I think you'd be better off thinking of "/root/test/test.php"). You can explode this based on the "/" character to find the previous directory. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair!
With the following code how can I check to see if the file being uploaded has a space in it? Maybe replace them with a _ or reject them all together... if ($FileType== "none") { print "ERROR! - You must specify a File Type before we can begin the upload.<BR>"; } else { if ($filezip== "none") { print "ERROR! - You must specify a zip file to upload.<BR>"; } else { copy($filezip, "/home/sites/site1/ftp/$FileType/$filezip_name"); unlink($filezip); } WreckRman2 Combat Flight Center http://www.combatfs.com
just add this somewhere near the top. $filezip_name = ereg_replace(' ', '_', $filezip_name); Chris Lee Mediawaveonline.com ""David Smith"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > With the following code how can I check to see if the file being uploaded > has a space in it? Maybe replace them with a _ or reject them all > together... > > if ($FileType== "none") { > print "ERROR! - You must specify a File Type before we can begin the > upload.<BR>"; > } > else { > > if ($filezip== "none") { > print "ERROR! - You must specify a zip file to upload.<BR>"; > } > else { > copy($filezip, "/home/sites/site1/ftp/$FileType/$filezip_name"); > unlink($filezip); > } > > > > 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] >
I just installed 4.0.4pl1 upgrade from 4.0.3pl1. I changed nothing in my ini file and just left it inplace from the previous installation. I used the same configure options, --with-apxs and --with-mysql Now, my global variables don't work in my functions. ie. $foo = "bar"; $rap = 7; function bob(){ global $foo, $rap; echo $foo; ----------------no output is seen, but it is in 4.0.3pl1 do something return; } HELP!!! Thanks ----------------------------------------------------------------- Jonathan Rosenberg Be fierce, be fabulous, change the world!
well thats a strange one isn't it. I would double check your php.ini make sure it wasn't changed, also check the phpinfo() output to see if its accually using the right php.ini file http://php.net/manual/function.phpinfo.php can you use the GLOBALS array? echo $GLOBALS['foo']; I dont quite know what to say more, thats a strange one you got there :) Chris Lee Mediawaveonline.com ""Jon Rosenberg"" <[EMAIL PROTECTED]> wrote in message 001301c07c26$5609d3e0$75e2d2cc@slinkyboi5">news:001301c07c26$5609d3e0$75e2d2cc@slinkyboi5... > I just installed 4.0.4pl1 upgrade from 4.0.3pl1. I changed nothing in my > ini file and just left it inplace from the previous installation. I used > the same configure options, --with-apxs and --with-mysql > Now, my global variables don't work in my functions. > > ie. > > $foo = "bar"; > $rap = 7; > > function bob(){ > global $foo, $rap; > echo $foo; ----------------no output is seen, but it is in 4.0.3pl1 > do something > return; > } > > HELP!!! Thanks > ----------------------------------------------------------------- > Jonathan Rosenberg > Be fierce, be fabulous, change the world! > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
$cart['product17'] = 42; #order lots of these. unset($cart['product4']; # Don't need any of those. You probably should re-read the first section of the PHP Manual at http://php.net/manual A lot of the basics like this are in there to get you going strong. ----- Original Message ----- From: Kersten Lohmeyer <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, January 11, 2001 1:08 AM Subject: [PHP] Change Array Data > Hi, > > I'm new to PHP so I thought someone could give me some advice on this one: > > I'm creating a shopping cart, which is nothing but an array within a > session variable. Adding products to my cart works fine. But now I want to be > able to change certain fields in my already filled array, e.g. the amount of > one article or maybe delete one entire recordset. Is this possible? I have PHP > 4.0.4 installed on my system running apache. > > Thanks > > Kersten > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
http://php.net/setcookie Not sure why you want to put them in a cookie, though. The browser is going to keep representing the $HTTP_AUTH_USER and password variables as long as they don't quit their browser... ----- Original Message ----- From: "David Smith" <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, January 11, 2001 3:14 AM Subject: [PHP] Cookies > > > How cn I make the following code set a cookie for vars username and > password?? > > <?php > > $auth = false; // Assume user is not authenticated > > if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) > > > // Connect to MySQL > > mysql_connect( 'localhost', 'root', '*****' ) > or die ( 'Unable to connect to server.' ); > > // Select database on MySQL server > > mysql_select_db( 'cfsforums' ) > or die ( 'Unable to select database.' ); > > // Formulate the query > > $sql = "SELECT * FROM user WHERE > username = '$PHP_AUTH_USER' AND > password = '$PHP_AUTH_PW'"; > > // Execute the query and put results in $result > > $result = mysql_query( $sql ) > or die ( 'Unable to execute query.' ); > > // Get number of rows in $result. > > $num = mysql_numrows( $result ); > > if ( $num != 0 ) > > > // A matching row was found - the user is authenticated. > > $auth = true; > > } > > } > > if ( ! $auth ) > > > header( 'WWW-Authenticate: Basic realm="Combat Flight Center Members > Area"' ); > header( 'HTTP/1.0 401 Unauthorized' ); > echo 'Authorization Required.'; > exit; > > } else > > > echo '<!-- Login Successful -->'; > } > > ?> > > 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] >
Search the Code Archives linked from http://php.net/links.php Basically, it's just this: <?php header("Content-type: image/gif"); header("Content-length: " . file_length($filename)); #Whatever caching headers you want -- lots of them passthru($filename); ?> There are different twists and turns depending on how you want the image cached, and whether you want the images inside your web-tree or not, and if you want just GIF or a more general-purpose solution or... Code Archives have it all. ----- Original Message ----- From: <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, January 11, 2001 4:13 AM Subject: [PHP] image through php > Hi! > > I want to use a code like: > <img src="./randomgif.php"> > > I know, this is possible with perl, but with php? > ... and it should be performant as well :-) !! > > thanks > any hints appreciated > 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] >
his mailbox is full, I'm getting spam'd by his mailserver :) -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