RE: [PHP] % operator
It doesn't have a use in only PHP but in all programming languages. It's a math thing .. u can get a remainder of a division. 10%8 = 2 12%8 = 4 10%5 = 0 12%5 = 2 Simple application: $ppl = 23; $grpsize = 7; echo ("when $ppl people are divided over groups of $grpsize, ". $ppl%$grpsize ." people are ungrouped."); This operator can be used for more complex situations. Cheers; Eelco. > Hi! > > what is the use of % > Is it called modulo..what is it's use in PHP.? > > > Thanx! > Dhaval Desai > > __ > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Session With Cookies
This will store a cookie with a userid and an unique number ($token) as session-id (??). If I'm not mistaken, this session-id is not checked here. Thus serves no purose. Anybody who retrieve the cookie from the cookie file on the system can use it to resume the session (if done within the set 3600sec.). Even if the browser has been closed. In case of login/password required sites, I use the login and password as cookie values and have _no_ expiredate set. Every time a request is made _both_ cookie values (login and password) are checked with that on the server. When the browser is closed, the cookie is gone. It works but I think it's quite an unconventional way ... any suggestions/comments on this method? Cheers; Eelco. > Try this: > > // Set Cookie if not already set > if (!isset($user_id)) { > $token = md5(uniqid(rand())); > setcookie("user_id", $token, time()+3600,"/",".yourdomain.com"); > } > > look at the setcookie function on php.net to figure out all the > parameters: > http://www.php.net/manual/en/function.setcookie.php > > -Shane > > - Original Message - > From: "phpLover" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, February 03, 2001 11:25 PM > Subject: [PHP] Session With Cookies > > > > How can I maintain a user session using cookies? > > > > Thanks > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / TODO
sterlingSun Feb 4 01:19:01 2001 EDT Modified files: /php4 TODO Log: Add a bunch of stuff.. Index: php4/TODO diff -u php4/TODO:1.109 php4/TODO:1.110 --- php4/TODO:1.109 Wed Jan 24 11:16:43 2001 +++ php4/TODO Sun Feb 4 01:19:01 2001 @@ -52,7 +52,17 @@ - * add remarks in the documentation which functions are not implemented on win32. * add remarks in the documentation which functions are not binary-safe. + * improve documentation for the sablotron extension + * update curl documentation + * write documentation for the bzip2 extension + * write documentation for the zziplib extension +ext/curl + + * Use the cURL write handler to save data for use when returning data or +outputting + data. + * Have a warning scheme for when people use unsupported features. + ext/dav * rewrite. @@ -61,21 +71,31 @@ * all OCIFetch*() functions should return 0 for no more data and false on error. * have a flag that trims trailing spaces from CHAR fields on retrieval. - * make allow_call_time_pass_reference=Off working. + * make allow_call_time_pass_reference=Off working. + * for additional todo information, see oci8.c, in ext/oci8 ext/pcre * update the online docs from version 3.1 man page +ext/sablot +-- + * Re-write the error handling and reporting interface + * Cleanup the underlying code a bit + * Add proper support for the message handlers + ext/session --- -* implement a call to set a session read-only to overcome - the need to serialize frame-loads. * maybe implement finer-grained session variables that could be locked individually. * write a network-transparent storage back-end with fallover facilities +ext/sockets +--- + * Make the extension work on windows + * Make the extension work with Solaris and the Sun GCC + ext/standard * add a version number to data serialized via serialize(). @@ -94,6 +114,10 @@ strip_tags() * rewrite win32 SMTP code to be useable for *ix to, maybe as a (default) module of its own (Hartmut) + +ext/zziplib + + * more fully support the zziplib api ext/wddx -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / TODO
sterlingSun Feb 4 01:20:31 2001 EDT Modified files: /php4 TODO Log: # *Brain Fart* Index: php4/TODO diff -u php4/TODO:1.110 php4/TODO:1.111 --- php4/TODO:1.110 Sun Feb 4 01:19:01 2001 +++ php4/TODO Sun Feb 4 01:20:31 2001 @@ -71,7 +71,7 @@ * all OCIFetch*() functions should return 0 for no more data and false on error. * have a flag that trims trailing spaces from CHAR fields on retrieval. - * make allow_call_time_pass_reference=Off working. + * make allow_call_time_pass_reference=Off working. * for additional todo information, see oci8.c, in ext/oci8 ext/pcre -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Session With Cookies
Eelco de Vries wrote: > This will store a cookie with a userid and an unique number ($token) as > session-id (??). > If I'm not mistaken, this session-id is not checked here. Thus serves no > purose. Anybody who retrieve the cookie from the cookie file on the system > can use it to resume the session (if done within the set 3600sec.). Even if > the browser has been closed. >> >> // Set Cookie if not already set >> if (!isset($user_id)) { >> $token = md5(uniqid(rand())); >> setcookie("user_id", $token, time()+3600,"/",".yourdomain.com"); >> } The example here has nothing to do with sessions, you are correct. The person who replied to you simply gave you a code snippet from one of my books that assigns a unique id via a cookie. It does not map to a PHP session. As to your case: > In case of login/password required sites, I use the login and password as > cookie values and have _no_ expiredate set. Every time a request is made > _both_ cookie values (login and password) are checked with that on the > server. I would hope that you are not storing and matching the user's plaintext password... ++ | Julie Meloni ([EMAIL PROTECTED]) | || | "PHP Essentials" and "PHP Fast & Easy" | | http://www.thickbook.com | ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] my bugaboo.
I had a problem similar to this myself a while ago... I don't believe the issue is with the differing versions of PHP, but rather with the improper escaping of the quote characters. There are two PHP functions: addslashes() and stripslashes() Call the former when you submit the information to properly escape the characters that need it, something like: $new_data = addslashes($old_data); should work... then when you go to display the information, call stripslashes to de-escape everything: $display_str = stripslashes($new_data); I hope this helps. -Matt At 06:42 PM 2/3/2001, you wrote: >Hi.. > >I have a routine where we input text to fields. When there is an apostrophe it >handles it correctly. When the form is brought back for editing, the field >values show up in the input fields, with all apostrophes intact, just as it >should be. > >When I upload this script to my isp, it doesn't work.. The apostrophes >truncate >the rest of the text. 'Don't cry over spilled milk', in a field, turns into >'Don'... > >I have php4 mod in my win32 devbox. The isp is php3. Is this the problem? >What is the best way out of it please? > >Thanks in advance. > >Floyd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Session With Cookies
> > In case of login/password required sites, I use the login and > password as > > cookie values and have _no_ expiredate set. Every time a request is made > > _both_ cookie values (login and password) are checked with that on the > > server. > > I would hope that you are not storing and matching the user's plaintext > password... > Well .. I am ... nobody but the user itself can see the login and password in the cookie. Unless it's on non-SSL connection and somebody is packet-shiffing around. Otherwise there would be no leak for somebody else to get this information, is there? And if the user doesn't logout, the cookie is still destroyed when the browser is closed anyway. Eelco. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] getimagesize question
$size = getimagesize($Frame."top.gif"); I think you should read this : http://www.zend.com/zend/tut/using-strings.php Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 04, 2001 5:28 AM To: [EMAIL PROTECTED] Subject: [PHP] getimagesize question Hi, I`m using the following to get the image size... $size = getimagesize("$Frame"); My problem is $Frame can`t contain the full name of the image for various reasons, so what I need to do is somehow add the rest, something along the lines of this... $size = getimagesize("$Frame'top.gif'"); If $Frame = Hello then the getimagesize would perform on Hellotop.gif but as yet it isn`t working anyone have a suggestion? I have tried a few variations such as ("$Frame" + "top.gif") ("$Frame\"top.gif\"") ($Frame"top.gif") Thanks Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Undefined variable
try setting error_reporting(0) in PHP.ini Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Dundee (Roland) [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 04, 2001 5:35 AM To: Php_List Subject: [PHP] Undefined variable Hello When creating a page(php) on Win2000 I get alot of 'Undefined variable' error messages, but there are no errors at all running the same page on a apache server. How come? Thanks for some hints. Roland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP hosting - the final frontier.
Well, I'll contribute to the discussion whether you like or not... For a year I was running a website on Canaca.com (former Nortel.no) ... They've been nice, I though ... Then I once tried one weird thing: '.show_code('/usr/local/apache/conf/httpd.conf').''?> from a simple PHP page ... hmm ... Not only I broke to the hell their security, but I also found 342 matches under a simple search for mailto:[EMAIL PROTECTED]] Sent: Sunday, February 04, 2001 6:27 AM To: 'Robert Covell'; 'Boaz Yahav'; 'Ben Peter'; 'Chris Mason' Cc: 'Php-General' Subject: RE: [PHP] PHP hosting - the final frontier. Actually, there is nothing wrong with a one-manned hosting service. I agree with Robert in this, there are a lot of big hosting companies that don't really have a personal hold of their business to really care about their clients. To them everything is automated and all they do is hire customer service people who are only taught to, well, "serve customers" with answers to questions they don't know in the first place. They just read from the script and have basic step-by-step trouble shooting instructions in front of them to solve a client's problems/requests. If you need an updated software package, like PHP4, froman old PHP3 engine, you'de have to beg for it and you might have to go through several layers of support just for that request to go through. Let me remind you that the software is free of charge. If the request is accepted, then more power to you. If it's not then you'll have to deal with it until you decide to find another host. I have one question for you Robert. XML has been in the market for a long time (since 1998), and the recommendations are now set to a true standard. Why do most hosting services not have support for XML based languages yet? Thanks... Navid Yar -Original Message- From: Robert Covell [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 2:40 PM To: Boaz Yahav; Ben Peter; Chris Mason Cc: Php-General Subject: RE: [PHP] PHP hosting - the final frontier. I shouldn't even reply to this... Yes I would host with me. Have you ever heard of a backup plan. People that would step in if something happens to me? People that I trust to keep the company going if it fails. With all due respect, how do people host with a company that doesn't give a rats ass about them or their business. How many big companies redirect your call, or brush you away when problems occur. I been over backwards for my clients. Providing better service then many of the bigger companies out there. That is why people do and will continue to host with me. Like I said, I plan on hiring people in the near future. Things take time to evolve. I am not saying that my company is for everyone. If you don't like a one man shop then don't go there. People have taken a chance with me and have not been disappointed like so many times before. Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 1:38 PM To: 'Robert Covell'; Ben Peter; Chris Mason Cc: Php-General Subject: RE: [PHP] PHP hosting - the final frontier. And if, God forbid, something was to happen to you... 120 People / Companies would be left with a server that no one knows the root password too? With all due respect, how can someone in his right mind host with a one man gang company? For all I know you can be a hosting genius and give the best service around but you are still one man. Would you host with you ? :) Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Robert Covell [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 9:16 PM To: Ben Peter; Chris Mason Cc: Php-General Subject: RE: [PHP] PHP hosting - the final frontier. I am going to have to disagree on this one. I run a successful (and profitable) hosting company(http://www.rolet.com). My employees total 1 (me, myself and I). The number of clients hosted is roughly 120. I provide a wide variety of services on Linux, FreeBSD, NT, and W2K. Yes it is hard to believe that 1 person can be available 24x7, or not take vacations, but this is what I do and LOVE every second of it. I value customer satisfaction and strive to provide that best Internet services possible. For me this is a career for life, not just a job. So I do believe that 1 person can be available 24x7 and not take vacations. Don't get me wrong, some days it is tough. I would like to have other employees in the future, but don't mind the sacrifices taken to get there. Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED
RE: [PHP] php-nuke?
Use cron ... Search archives for something like "running PHP with cron" Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: FredrikAT [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 04, 2001 9:24 AM To: [EMAIL PROTECTED] Subject: [PHP] php-nuke? What is php-nuke? How could I make a php-page execute something (itself?) without entering the site... it starts evry hour?! - Fredrik A. Takle [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Stringing sql queries?
So you are talking about two different queris in one call? No, you can't do this ... you have to then use some kind of loop or something ... Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Randy Johnson [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 04, 2001 2:25 PM To: Thomas Weber; Sandeep Hundal Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Stringing sql queries? What about an insert or an update instead of a select? thanks randy -Original Message- From: Thomas Weber [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 8:37 PM To: Sandeep Hundal Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Stringing sql queries? Yep, try this: SELECT a.col1, a.col2, b.col3, c.col4 FROM table1 a, table2 b, table3 c This should give you an array [col1,col2,col3,col4] Thomas Weber --- EMail: [EMAIL PROTECTED] Homepage: http://www.youngarts.org / http://www.visions-of-future.de - Original Message - From: "Sandeep Hundal" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Sunday, February 04, 2001 1:44 AM Subject: [PHP] Stringing sql queries? > All, > can I string 2 sql queries one after the other? > like "select * from $table; select * from $table2;" ??? > > If I can, does that mean if I use mysql_fetch_array then it'll > convert results from both queries into variables? > > TIA > > > __ > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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-CVS] cvs: CVSROOT / avail cvsusers gen_acl_file.m4
rasmus Sun Feb 4 02:05:13 2001 EDT Modified files: /CVSROOTavail cvsusers gen_acl_file.m4 Log: doc account for Andre Roque Index: CVSROOT/avail diff -u CVSROOT/avail:1.71 CVSROOT/avail:1.72 --- CVSROOT/avail:1.71 Fri Feb 2 08:31:32 2001 +++ CVSROOT/avail Sun Feb 4 02:05:12 2001 @@ -7,7 +7,7 @@ avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,hholzgra|functable avail|rasmus,sterling,jimw|pres avail|jalal,zak,waldschrott,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben,hellekin|qaweb -avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely|phpdoc +avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq|phpdoc avail|andrei|php-gtk avail|rasmus|php4/ext/aspell avail|andi|php4/ext/bcmath Index: CVSROOT/cvsusers diff -u CVSROOT/cvsusers:1.201 CVSROOT/cvsusers:1.202 --- CVSROOT/cvsusers:1.201 Fri Feb 2 08:31:32 2001 +++ CVSROOT/cvsusersSun Feb 4 02:05:12 2001 @@ -250,3 +250,4 @@ hellekin Hellekin O. Wolf[EMAIL PROTECTED] QA rjs Rainer Schaaf [EMAIL PROTECTED] pdflib kgergely Kontra Gergely [EMAIL PROTECTED] Hungarian translation +andreroq Andre Roque [EMAIL PROTECTED] +Brazilian Portuguese translation Index: CVSROOT/gen_acl_file.m4 diff -u CVSROOT/gen_acl_file.m4:1.72 CVSROOT/gen_acl_file.m4:1.73 --- CVSROOT/gen_acl_file.m4:1.72Fri Feb 2 08:31:32 2001 +++ CVSROOT/gen_acl_file.m4 Sun Feb 4 02:05:12 2001 @@ -3,7 +3,7 @@ dnl PHP Developers (full access to the source trees) define(`php_dev', `php_group,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs') dnl PHP Documentation Group -define(`php_doc', `chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely')dnl +define(`php_doc', +`chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritt
[PHP-CVS] cvs: CVSROOT / avail gen_acl_file.m4
rasmus Sun Feb 4 02:07:49 2001 EDT Modified files: /CVSROOTavail gen_acl_file.m4 Log: Karma for Vlad Index: CVSROOT/avail diff -u CVSROOT/avail:1.72 CVSROOT/avail:1.73 --- CVSROOT/avail:1.72 Sun Feb 4 02:05:12 2001 +++ CVSROOT/avail Sun Feb 4 02:07:48 2001 @@ -2,12 +2,12 @@ unavail avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane|CVSROOT avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,waldschrott,sniper,david,lyric,zimt,mk,goba,zak|phpweb -avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,jon,rael,jlp,sbergmann,troels,urs,jpm,adaniel,tuupola,mj,ssb,metallic,heyesr,aj,waldschrott,zimt,uw,jeichorn|php4/pear,pearweb,pear -avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs|php4,php3,php31,phpfi -avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,hholzgra|functable +avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jon,rael,jlp,sbergmann,troels,urs,jpm,adaniel,tuupola,mj,ssb,metallic,heyesr,aj,waldschrott,zimt,uw,jeichorn|php4/pear,pearweb,pear +avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad|php4,php3,php31,phpfi +avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,hholzgra|functable avail|rasmus,sterling,jimw|pres avail|jalal,zak,waldschrott,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben,hellekin|qaweb -avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq|phpdoc +avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce
[PHP-CVS] cvs: CVSROOT / avail cvsusers gen_acl_file.m4
rasmus Sun Feb 4 02:10:57 2001 EDT Modified files: /CVSROOTavail cvsusers gen_acl_file.m4 Log: doc account for Eduard Hergenroeder Index: CVSROOT/avail diff -u CVSROOT/avail:1.73 CVSROOT/avail:1.74 --- CVSROOT/avail:1.73 Sun Feb 4 02:07:48 2001 +++ CVSROOT/avail Sun Feb 4 02:10:57 2001 @@ -7,7 +7,7 @@ avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,hholzgra|functable avail|rasmus,sterling,jimw|pres avail|jalal,zak,waldschrott,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben,hellekin|qaweb -avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq|phpdoc +avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq,eduardh|phpdoc avail|andrei|php-gtk avail|rasmus|php4/ext/aspell avail|andi|php4/ext/bcmath Index: CVSROOT/cvsusers diff -u CVSROOT/cvsusers:1.202 CVSROOT/cvsusers:1.203 --- CVSROOT/cvsusers:1.202 Sun Feb 4 02:05:12 2001 +++ CVSROOT/cvsusersSun Feb 4 02:10:57 2001 @@ -251,3 +251,4 @@ rjs Rainer Schaaf [EMAIL PROTECTED] pdflib kgergely Kontra Gergely [EMAIL PROTECTED] Hungarian translation andreroq Andre Roque [EMAIL PROTECTED] Brazilian Portuguese translation +eduardh Eduard Hergenroeder [EMAIL PROTECTED] +German translation Index: CVSROOT/gen_acl_file.m4 diff -u CVSROOT/gen_acl_file.m4:1.74 CVSROOT/gen_acl_file.m4:1.75 --- CVSROOT/gen_acl_file.m4:1.74Sun Feb 4 02:07:48 2001 +++ CVSROOT/gen_acl_file.m4 Sun Feb 4 02:10:57 2001 @@ -3,7 +3,7 @@ dnl PHP Developers (full access to the source trees) define(`php_dev', `php_group,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad') dnl PHP Documentation Group -define(`php_doc', `chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq')dnl +define(`php_doc', +`chad,torben
Re: [PHP] Session With Cookies
It's unlikely I suppose, but there's a must-have book you should look at if you want info on hacks, including browser hacks (Hacking Exposed: Network Security Secrets and Solutions, 2nd Edition). The cookie hack that comes to mind only works in IE or MS products (but that's only what, 90% of the web), but all it is is a line or so of html code that somebody places on their site (say in an iframe...) that sends them all your cookie data (if the user uses outlook, they can also just place it in an email). from there, they use the cookie data to pose as that person on various sites trying to gain sensitive info. but if you're already giving them the password, how much more sensitive can you get? so really, if they don't close their browser for a while, this possibility increases. and it may be a slim possibility, but it's better to be safe than sorry. later lux > Well .. I am ... nobody but the user itself can see the login and password > > in the cookie. Unless it's on non-SSL connection and somebody is > > packet-shiffing around. Otherwise there would be no leak for somebody else > > to get this information, is there? > > And if the user doesn't logout, the cookie is still destroyed when the > > browser is closed anyway. > > > > Eelco. -- John Luxford Simian Systems w: www.simian.ca e: [EMAIL PROTECTED] p: 204.946.5955 -- -- PHP General Mailing List (http://www.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] Working with email piped to PHP
Ok, I've got an email address setup to pipe to a PHP script setup to handle the request and do whatever I need to. (In my specific situation, it's a help email address, and will create a ticket in a database.) As a test, I'm opening the STDIN data stream and writing it to a file to make sure the email looks correct. As stated, it does create the test.txt in the specified location, however, upon inspection of the file, it only shows the following text: "Resource id #1" on the first line, and that's it. I'm using PHP compiled as an apache module. Is there something I'm doing wrong? Thanks, Roy Wilson, Jr. Director, Administration/Information Services Aosdic Realm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Working with email piped to PHP
> # This is the standard input script. > > $fp = fopen("php://stdin","r"); > $writer_file = fopen("test.txt","w"); > fwrite($writer_file,"$fp"); > fclose($writer_file); > fclose($fp); > > ?> > > As stated, it does create the test.txt in the specified location, > however, > upon inspection of the file, it only shows the following text: > "Resource id > #1" on the first line, and that's it. This is what would be expected, your writing a file pointer to file not the coentents of the stdin, you need to do somthing along the lines of the following // Untested Code /* -*- Open stdin for reading -*- */ $fp = fopen("php://stdin","r"); /* -*- Open test.txt for writing -*- */ $writer_file = fopen("test.txt","w"); /* -*- Check both were opened -*- */ if($fp && $writer_file) { /* -*- Read in stdin -*- */ while(!feof($fp)) { $stdin .= fread($fp, 4096); } /* -*- Write to test.txt -*- */ if (sizeof($stdin) != fwrite($writer_file, $stdin, sizeof($stdin))) { //Not all of stdin was written to file } else { /* -*- Close Files -*- */ fclose($writer_file); fclose($fp); } } else { //files were not opened } James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-CVS] cvs: php4 /ext/sockets sockets.c
On Fri, 2 Feb 2001, Colin Viebrock wrote: > I for one would like to see #8839 fixed ... hint, hint Derick! ;) Gr :) Derick Rethans - PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED] - JDI Media Solutions - www.jdimedia.nl - [EMAIL PROTECTED] H.v. Tussenbroekstraat 1 - 6952 BL Dieren - The Netherlands - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CGI vs PHP
On Saturday 03 February 2001 22:03, phpLover wrote: > I am sorry if my question is confusing. What I mean is that CGI is > excellent in handling flat file data base, reading and writing files > line by line, word by wor. So is PHP equally strong? That's exactly what he meant - CGI is an interface specification, PHP is a programming language. You can use PHP via CGI :) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "Never doubt that a small group of thoughtful, committed people can change the world... Indeed, it's the only thing that ever has." - Margaret Mead -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: Fw: [PHP] Problem compiling PHP4 Nr. 2
On Saturday 03 February 2001 22:03, Thomas Weber wrote: > I have solved the problem. But now i have another problem: > > Look at this screenshot: http://electic.hn.org/tunix.gif The webserver doesn't send a proper Content-Type: Header. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "Never doubt that a small group of thoughtful, committed people can change the world... Indeed, it's the only thing that ever has." - Margaret Mead -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP code beautifier?
Yes, I know it should be written correctly from the beginning. But, in case it isn't: what do you use to format ugly looking scripts? Maciek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is this a missing feature?
On Sunday 04 February 2001 07:31, John Luxford wrote: > function foo (&$hash) { >while (list ($k, $v) = each ($hash)) { > echo "$k :: $v\n"; >} > } > // but what I want to say is something like this > > foo (["one" => "value", "two" => "value"]); foo () is declared to take a reference to a variable. This only works with "real" variables, not the temporary ones returned from array() etc. Modify it to function foo ($hash) { and it will work -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "Never doubt that a small group of thoughtful, committed people can change the world... Indeed, it's the only thing that ever has." - Margaret Mead -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re:What version of Linux?
On Sunday 04 February 2001 05:03, John Hinsley wrote: > > Well, my home server is a wimpy P90 with 48MB RAM. It serves as web > > server (all my technical docs, php website testing, more), web cache [...] > > else :) Ah, yes. MySQL for my php stuff also runs on it. > > That's pretty impressive! Well, Linux makes it possible *cough* :) > > The only problem I have with its performance is that it's only > > connected to my other machines via 10 MBit ethernet (well, and the > > ram is a bit on the low side). The processor's limits aren't reached > > by a long shot. > > It'd be interesting to do some benchmarking on it. My guess (nothing > more) is that the limitations are RAM, disk read/write speed and > network speed in that order. disk r/w speed isn't really an issue. If it is, it's because the machine doesn't have enough RAM to buffer the stuff. Network speed should be at the top of that list for fileserving, but for PHP stuff 10MBit is completely sufficient. Processor performance *is* somehow a point for PHP - on my more complex pages I have script parsing times of 0.5-0.7 seconds, plus 1-1.5s for DB queries, output generation etc (yes, I do cache such heavy pages. just took that as example) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "Never doubt that a small group of thoughtful, committed people can change the world... Indeed, it's the only thing that ever has." - Margaret Mead -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Select list with PHP
This worked! But, I get this color selection increment on each subsequent menu where the colors from the row above mix with the ones below and so on. Assume that the numbers are the actual colors: Select a color: first menu1 next menu-> 1 next menu-> even longer 2 2 3 3 4 4 55 1 2 3 4 5 mysql_connect(); while ($row = mysql_fetch_array($sql_result)) { echo""; echo $row["paint"]; echo""; echo $row["bucket"]; echo""; echo"http://www.\" method=\"POST\">"; $Colors = $row["Color"]; $options = explode(",", $Colors); while (list(,$Color) = each($options)){ $option .= "$Color\n"; } echo""; echo "$option"; echo""; echo""; echo" > It's usually a better idea to store this as a "relation": I'm afraid so. Thanks: Gerry Figueroa - Modern Confucious: Man who run behind car get exhausted. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Select list with PHP/oops!
Well I messed up... I forgot to add the final ";} at the bottom of my sample code but here it is. sorry! Gerry wrote: > > This worked! > But, I get this color selection increment on each subsequent menu where > the colors from the row above mix with the ones below and so on. Assume > that the numbers are the actual colors: > > Select a color: > > first menu1 next menu-> 1 next menu-> even longer > 2 2 > 3 3 > 4 4 > 5 5 > 1 > 2 > 3 > 4 > 5 > --- > mysql_connect(); > while ($row = mysql_fetch_array($sql_result)) { > echo""; > echo $row["paint"]; > echo""; > echo $row["bucket"]; > echo""; > echo"http://www.\" method=\"POST\">"; > $Colors = $row["Color"]; > $options = explode(",", $Colors); > while (list(,$Color) = each($options)){ > $option .= "$Color\n"; > } > echo""; > echo "$option"; > echo""; > echo""; > echo""; } -- > > > It's usually a better idea to store this as a "relation": > > I'm afraid so. > > Thanks: > Gerry Figueroa > > - > Modern Confucious: > Man who run behind car get exhausted. -- PHP General Mailing List (http://www.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] HTTP compression
Hi, I've just started experimenting with ob_start("ob_gzhandler") a bit, and I have found that if any output is generated before ob_start() is called, nothing at all gets compressed; if ob_start() is called before any output, everything is compressed. Is this the case, I mean, is this "by design" ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTTP compression
> I've just started experimenting with ob_start("ob_gzhandler") a bit, and I > have found that if any output is generated before ob_start() is called, > nothing at all gets compressed; if ob_start() is called before any output, > everything is compressed. > > Is this the case, I mean, is this "by design" ? Yes, it wouldn't really work any other way. You can't mix non-compressed and compressed in the same request. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] XML - XSL with PHP
> Is there any way of to use PHP3 with XSL? > can anyone help me? Unless someone back-ports the sablotron stuff to PHP 3 you are pretty much out of luck. Upgrade. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Arrays from forms
Can someone please help me with this code I'm having major problems with arrays. This code is part of a function I'm writing to deal with an array returned from a HTML form of check boxes so if anyone has an example of this sort of thing I'd appreciate a look at it. Anyway Code follows : //Reading from a data base $db = mysql_connect("$DB_Server", "$DB_Login, $DB_Password"); mysql_select_db("$DB_Name",$db); $results = mysql_query("SELECT option_type, code FROM options WHERE code='000' ORDER BY option_type",$db); mysql_fetch_array($results); // From what understand I should have an array some thig like this: // ("Size"=>"A4" , "Size" => "A3", "Size"=>"A5", "Colour"=>"Red", etc..); $types = array_values($results); // OK so now I think I have an array like this: // ("A4" , "A3", "A5", "Red", etc..); while ($type =array_pop($types)){ echo $type.""; } // Now I'm expecting this list to be printed to be outputted A4 A5 A3 Red etc... I'm figureing that this would be a good way to retreive a listing from the web site arrays and test and insert them one by one. /// The table options option_type || code || option_preferences Size || 000 || A4 Size || 000 || A3 Size || 000 || A5 Colour || 000 || Red Colour || 000 || Blue Colour || 000 || Green
RE: [PHP] HTTP compression
Rasmus, Thanks for the clarification; it seems obvious, too, that mixing compressed and non compressed content would be quite difficult to implement; at least it would partially compromise the speed/size gain because of added protocol overhead. Now, imagining that we have enabled compression by calling ob_start("ob_gzhandler"), what happens for a document that contains something along these lines: ... This is a normal HTML section ... In this particular case, what would be compressed ? As far as I have understood, nothing at all, because some part of the output is not "passing through" PHP, right ? > -Message d'origine- > De : Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > Envoye : dimanche 4 fevrier 2001 14:34 > A : Alain Fontaine > Cc : [EMAIL PROTECTED] > Objet : Re: [PHP] HTTP compression > > > > I've just started experimenting with ob_start("ob_gzhandler") a > bit, and I > > have found that if any output is generated before ob_start() is called, > > nothing at all gets compressed; if ob_start() is called before > any output, > > everything is compressed. > > > > Is this the case, I mean, is this "by design" ? > > Yes, it wouldn't really work any other way. You can't mix non-compressed > and compressed in the same request. > > -Rasmus > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Future plans (4.1) ?
Hi Rasmus, thanks for you reply. As some of the phpers already stated I also disagree about the visibility issue. But it's IMHO anyway (besides I do not have technical skills enough to try to implement it). I'll check the template you mentioned but I was wondering if a "built-in" one would not give a better integration and give php users a "standard" way... So what's in the TODO list for a 4.1 release ? Thanks again --- Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: > > For a fast templating system, see Smarty. > http://www.phpinsider.com/php/code/Smarty/ > > As for better OO. I think many of the things people > ask for, like > visibility (public,private,protected) class > properties, aren't actually > features that add functionality, but more just > convenience features that > could be implemented in user space. > > For example, you could establish a convention that > said that any class > property that starts with an _underscore should be > considered a private > property, and one would hope that your UML tool > could be configured to > understand that. __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 4 Feb 2001 15:14:52 -0000 Issue 492
php-general Digest 4 Feb 2001 15:14:52 - Issue 492 Topics (messages 38021 through 38108): IIS & ISAPI 38021 by: Shane McBride 38025 by: Chris Fry 38028 by: Shane McBride Re: Re:What version of Linux? 38022 by: John Hinsley 38100 by: Christian Reiniger Compile error w/ libextra.a (ranlib) 38023 by: Doug Taylor php_imap4r2.dll not loaded ?!?! (win2k) 38024 by: Eelco de Vries Session With Cookies 38026 by: phpLover 38030 by: Shane McBride 38084 by: Eelco de Vries 38085 by: Julie Meloni 38087 by: Eelco de Vries 38093 by: Lux Replacing A Word in HTML page 38027 by: phpLover 38081 by: Steve Werby HTTP Authentication w/IIS 38029 by: Shane McBride Multi-Dimensional Array Problems 38031 by: Toby Miller Re: Stringing sql queries? 38032 by: Randy Johnson 38092 by: PHPBeginner.com Re: Oracle Function list 38033 by: Richard Lynch Re: trouble with reading session variables: BUG? 38034 by: Richard Lynch Re: disabling page caching, yes or no 38035 by: Richard Lynch Re: About function Include 38036 by: Richard Lynch Re: check email exists under Windows NT! 38037 by: Richard Lynch Re: Bcc email does not work 38038 by: Richard Lynch Re: REGULAR EXPRESSION 38039 by: Richard Lynch Re: php changing passwd from unixusers? 38040 by: Richard Lynch Re: Oracle8 OciLogon ! 38041 by: Richard Lynch Re: Pricing for PHP programming??? 38042 by: Richard Lynch 38045 by: Richard Lynch Re: imap (nntp) message tracking 38043 by: Richard Lynch Re: Program execution 38044 by: Richard Lynch Re: Loading Files & Writing... 38046 by: Richard Lynch Re: new mail() function 38047 by: Richard Lynch Re: Win2K/PHP4.0.4pl1 - include_path mess (won't include from the current directory) 38048 by: Richard Lynch Re: Inappropriate ioctl for device 38049 by: Richard Lynch Re: Image 38050 by: Richard Lynch Re: How does memory limit work? 38051 by: Richard Lynch Re: Odd problem 38052 by: Richard Lynch Re: Performance hit with certain apache configs? 38053 by: Richard Lynch Re: Java variables - PHP varialbles 38054 by: Richard Lynch Re: Email Attachment 38055 by: Richard Lynch Re: Transitioning from php3 to php4 38056 by: Richard Lynch Re: errors when included functions call functions 38057 by: Richard Lynch Re: rephrasing: start session in frame-index, continue in pages 38058 by: Richard Lynch Re: Dnloading FDF docs / acrobat integration 38059 by: Richard Lynch Re: PHP a lightweight language? 38060 by: Richard Lynch Re: Php Database 38061 by: Richard Lynch Re: Mysql Question 38062 by: Richard Lynch Re: Zend Debug Server 38063 by: Richard Lynch Re: pg_Exec: Warning: 1 is not a valid PostgreSQL link resource. 38064 by: Richard Lynch Re: duplicate entries in mysql column 38065 by: Richard Lynch Re: Probem with headers. HELP ME!!! 38066 by: Richard Lynch Re: Data Entry From Listbox 38067 by: Richard Lynch Re: fucntion if not working bug error 38068 by: Richard Lynch Re: exec() won't start SAS job 38069 by: Richard Lynch Re: i want permanently connect in imap_open() 38070 by: Richard Lynch Re: Immediately write me!! Row size in mysql 38071 by: Richard Lynch Re: apache/SUexec/PHP 38072 by: Richard Lynch Re: Select list with PHP 38073 by: Richard Lynch 38101 by: Gerry Re: sessions without cookies 38074 by: Richard Lynch Re: php-nuke? 38075 by: Richard Lynch 38091 by: PHPBeginner.com Re: Oracle sessions 38076 by: Richard Lynch Re: my bugaboo. 38077 by: Richard Lynch 38086 by: Matt Re: Bah, XML 38078 by: Andrew Golovin Is this a missing feature? 38079 by: John Luxford 38099 by: Christian Reiniger Sydney Australia PHP meet talk brag See phpsydney.com for details 38080 by: PHP Sydney % operator 38082 by: Dhaval Desai 38083 by: Eelco de Vries Re: getimagesize question 38088 by: PHPBeginner.com Re: Undefined variable 38089 by: PHPBeginner.com Re: PHP hosting - the final frontier. 38090 by: PHPBeginner.com Working with email piped to PHP 38094 by: Roy Wilson, Jr. 38095 by: James Moore Re: CGI vs PHP 38096 by: Christian Reiniger Re: Problem compiling PHP4 Nr. 2 38097 by: Christian Reiniger PHP code beautifier? 38098 by: Maciek Uhlig Re: Select list with PHP/oops! 38102 by: Gerry HTTP compression 38103 by: Alain Fontaine 38104 by: Rasmus Lerdorf 38107 by: Alain Fontaine Re: XML - XSL with PHP 38105 by: Rasmus Lerdorf Arrays from
[PHP-CVS] cvs: php4 /win32 time.c
jmoore Sun Feb 4 07:52:33 2001 EDT Modified files: /php4/win32 time.c Log: Fix for time.c under win32. Patch By: "Vanhanen, Reijo" <[EMAIL PROTECTED]> @- microtime under windows now returns accurate values (James) Index: php4/win32/time.c diff -u php4/win32/time.c:1.4 php4/win32/time.c:1.5 --- php4/win32/time.c:1.4 Wed Jun 16 10:06:53 1999 +++ php4/win32/time.c Sun Feb 4 07:52:32 2001 @@ -11,7 +11,15 @@ * */ +/* $Id: time.c,v 1.5 2001/02/04 15:52:32 jmoore Exp $ */ + /** + * + * 04-Feb-2001 + * - Added patch by "Vanhanen, Reijo" <[EMAIL PROTECTED]> + * Improves accuracy of msec + */ + /* Include stuff */ #include "time.h" @@ -21,22 +29,92 @@ #include #include +int getfilesystemtime(struct timeval *time_Info) +{ +FILETIME ft; +__int64 ff; + +GetSystemTimeAsFileTime(&ft); /* 100 ns blocks since 01-Jan-1641 */ +/* resolution seems to be 0.01 sec */ +ff = *(__int64*)(&ft); +time_Info->tv_sec = (int)(ff/(__int64)1000-(__int64)11644473600); +time_Info->tv_usec = (int)(ff % 1000)/10; +return 0; +} + + + int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info) { - _int64 mstimer, freq; + + static struct timeval starttime = {0, 0}; + static __int64 lasttime = 0; + static __int64 freq = 0; + __int64 timer; + LARGE_INTEGER li; + BOOL b; + double dt; + /* Get the time, if they want it */ if (time_Info != NULL) { - time_Info->tv_sec = time(NULL); - /* get ticks-per-second of the performance counter - Note the necessary typecast to a LARGE_INTEGER structure -*/ - if (!QueryPerformanceFrequency((LARGE_INTEGER *) & freq)) { - time_Info->tv_usec = 0; - } else { - QueryPerformanceCounter((LARGE_INTEGER *) & mstimer); - mstimer = (__int64) (mstimer * .8); - time_Info->tv_usec = (long) (mstimer % 0x0FFF); - } + if (starttime.tv_sec == 0) { +b = QueryPerformanceFrequency(&li); +if (!b) { +starttime.tv_sec = -1; +} +else { +freq = li.QuadPart; +b = QueryPerformanceCounter(&li); +if (!b) { +starttime.tv_sec = -1; +} +else { +getfilesystemtime(&starttime); +timer = li.QuadPart; +dt = (double)timer/freq; +starttime.tv_usec -= (int)((dt-(int)dt)*100); +if (starttime.tv_usec < 0) { +starttime.tv_usec += 100; +--starttime.tv_sec; +} +starttime.tv_sec -= (int)dt; +} +} +} +if (starttime.tv_sec > 0) { +b = QueryPerformanceCounter(&li); +if (!b) { +starttime.tv_sec = -1; +} +else { +timer = li.QuadPart; +if (timer < lasttime) { +getfilesystemtime(time_Info); +dt = (double)timer/freq; +starttime = *time_Info; +starttime.tv_usec -= (int)((dt-(int)dt)*100); +if (starttime.tv_usec < 0) { +starttime.tv_usec += 100; +--starttime.tv_sec; +} +starttime.tv_sec -= (int)dt; +} +else { +lasttime = timer; +dt = (double)timer/freq; +time_Info->tv_sec = starttime.tv_sec + (int)dt; +time_Info->tv_usec = starttime.tv_usec + +(int)((dt-(int)dt)*100); +if (time_Info->tv_usec > 100) { +time_Info->tv_usec -= 100; +++time_Info->tv_sec; +} +} +} +} +if (starttime.tv_sec < 0) { +getfilesystemtime(time_Info); +} + } /* Get the timezone, if they want it */ if (timezone_Info != NULL) { @@ -52,21 +130,32 @@ /* this usleep isnt exactly accurate but should do ok */ void usleep(unsigned int useconds) { - __int64 mstimer, freq; - long now, then; - if (QueryPerformanceFrequency((LARGE_INTEGER *) & freq)) { - QueryPerformanceCounter((LARGE_INTEGER *) & mstimer); - now = (long) (((__int64) (mstimer * .8)) % 0x0FFF); - then = now + useconds; -
[PHP-CVS] cvs: php4 /ext/standard microtime.c
jmoore Sun Feb 4 08:18:36 2001 EDT Modified files: /php4/ext/standard microtime.c Log: Always return a value even if HAVE_GETTIMEOFDAY is not set Index: php4/ext/standard/microtime.c diff -u php4/ext/standard/microtime.c:1.27 php4/ext/standard/microtime.c:1.28 --- php4/ext/standard/microtime.c:1.27 Mon Jun 5 12:47:44 2000 +++ php4/ext/standard/microtime.c Sun Feb 4 08:18:36 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: microtime.c,v 1.27 2000/06/05 19:47:44 andi Exp $ */ +/* $Id: microtime.c,v 1.28 2001/02/04 16:18:36 jmoore Exp $ */ #include "php.h" @@ -57,11 +57,13 @@ if (gettimeofday((struct timeval *) &tp, (NUL)) == 0) { msec = (double) (tp.tv_usec / MICRO_IN_SEC); sec = tp.tv_sec; - } - if (msec >= 1.0) msec -= (long) msec; - snprintf(ret, 100, "%.8f %ld", msec, sec); - RETVAL_STRING(ret,1); + + if (msec >= 1.0) msec -= (long) msec; + snprintf(ret, 100, "%.8f %ld", msec, sec); + RETVAL_STRING(ret,1); + } else #endif + RETURN_FALSE; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Newbie:Cannot send session cookie...
1. Cannot send session cookie - headers already sent by (output started at c:/program files/apache group/apache/htdocs/index.php4:10) in c:/program files/apache group/apache/htdocs/index.php4 on line 11 What does it mean? Any hints? 2. Another problem: My htm page has two frames (left and right). I activate php4 script from button on left frame. Question: How can I print the result of query on the right frame? Thanks in advance Jacek Wojcik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] HTTP compression
Alain, When PHP parses a file, it treats the stuff that's not in blocks as though each line were a print or echo statement. So your whole file will be compressed and sent to the browser. Regards, Sean On Sun, 4 Feb 2001, Alain Fontaine wrote: > Rasmus, > > Thanks for the clarification; it seems obvious, too, that mixing compressed > and non compressed content would be quite difficult to implement; at least > it would partially compromise the speed/size gain because of added protocol > overhead. > > Now, imagining that we have enabled compression by calling > ob_start("ob_gzhandler"), what happens for a document that contains > something along these lines: > > > ... > // Enable HTTP compression > ob_start("ob_gzhandler"); > > // PHP content > $content = "This is some content."; > ?> > > This is a normal HTML section > > // PHP content continues > $content .= "And the rest of it."; > echo $content; > ?> > ... > > > In this particular case, what would be compressed ? As far as I have > understood, nothing at all, because some part of the output is not "passing > through" PHP, right ? > > > -Message d'origine- > > De : Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > > Envoye : dimanche 4 fevrier 2001 14:34 > > A : Alain Fontaine > > Cc : [EMAIL PROTECTED] > > Objet : Re: [PHP] HTTP compression > > > > > > > I've just started experimenting with ob_start("ob_gzhandler") a > > bit, and I > > > have found that if any output is generated before ob_start() is called, > > > nothing at all gets compressed; if ob_start() is called before > > any output, > > > everything is compressed. > > > > > > Is this the case, I mean, is this "by design" ? > > > > Yes, it wouldn't really work any other way. You can't mix non-compressed > > and compressed in the same request. > > > > -Rasmus > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] % operator
"Dhaval Desai" <[EMAIL PROTECTED]> wrote: > what is the use of % It returns a remainder. For example 7 % 2 = 1. > Is it called modulo..what is it's use in PHP.? There are plenty of situations where it's useful. For example, if you're displaying data in rows and want to shade every other row: if ( 1 == $row_count % 2 ) { echo "$data"; } else { echo "$data"; } Or if you have a data set you want to display in an HTML table across multiple rows, you'll probably find it useful for determining when to put or as you loop through your data set and use it to calculate whether you will need to fill cells at the end of the table with non-breaking spaces. There are many other applications, but these two come up pretty frequently in web applications. -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-CVS] cvs: php4 /win32 time.c
This patch reduces accuracy to milliseconds rather than microseconds but the results are actaully accurate rather than before where the time was collected in two function calls (so seconds would be out of sync with the number of microseconds). Some acuraccy has been lost but the function actually works now. Ill look and see if theres a way to make it as accurate as the *nix version. James > -Original Message- > From: James Moore [mailto:[EMAIL PROTECTED]] > Sent: 04 February 2001 15:53 > To: [EMAIL PROTECTED] > Subject: [PHP-CVS] cvs: php4 /win32 time.c > > > jmooreSun Feb 4 07:52:33 2001 EDT > > Modified files: > /php4/win32 time.c > Log: > Fix for time.c under win32. Patch By: "Vanhanen, Reijo" > <[EMAIL PROTECTED]> > > @- microtime under windows now returns accurate values (James) > > > > Index: php4/win32/time.c > diff -u php4/win32/time.c:1.4 php4/win32/time.c:1.5 > --- php4/win32/time.c:1.4 Wed Jun 16 10:06:53 1999 > +++ php4/win32/time.c Sun Feb 4 07:52:32 2001 > @@ -11,7 +11,15 @@ > * > > ** > ***/ > > +/* $Id: time.c,v 1.5 2001/02/04 15:52:32 jmoore Exp $ */ > > + /** > + * > + * 04-Feb-2001 > + * - Added patch by "Vanhanen, Reijo" <[EMAIL PROTECTED]> > + * Improves accuracy of msec > + */ > + > /* Include stuff > */ > > #include "time.h" > @@ -21,22 +29,92 @@ > #include > #include > > +int getfilesystemtime(struct timeval *time_Info) > +{ > +FILETIME ft; > +__int64 ff; > + > +GetSystemTimeAsFileTime(&ft); /* 100 ns blocks since 01-Jan-1641 */ > +/* resolution seems to be > 0.01 sec */ > +ff = *(__int64*)(&ft); > +time_Info->tv_sec = (int)(ff/(__int64)1000-(__int64)11644473600); > +time_Info->tv_usec = (int)(ff % 1000)/10; > +return 0; > +} > + > + > + > int gettimeofday(struct timeval *time_Info, struct timezone > *timezone_Info) > { > - _int64 mstimer, freq; > + > + static struct timeval starttime = {0, 0}; > + static __int64 lasttime = 0; > + static __int64 freq = 0; > + __int64 timer; > + LARGE_INTEGER li; > + BOOL b; > + double dt; > + > /* Get the time, if they want it */ > if (time_Info != NULL) { > - time_Info->tv_sec = time(NULL); > - /* get ticks-per-second of the performance counter > -Note the necessary typecast to a LARGE_INTEGER structure > - */ > - if (!QueryPerformanceFrequency((LARGE_INTEGER *) & freq)) { > - time_Info->tv_usec = 0; > - } else { > - QueryPerformanceCounter((LARGE_INTEGER *) & > mstimer); > - mstimer = (__int64) (mstimer * .8); > - time_Info->tv_usec = (long) (mstimer % 0x0FFF); > - } > + if (starttime.tv_sec == 0) { > +b = QueryPerformanceFrequency(&li); > +if (!b) { > +starttime.tv_sec = -1; > +} > +else { > +freq = li.QuadPart; > +b = QueryPerformanceCounter(&li); > +if (!b) { > +starttime.tv_sec = -1; > +} > +else { > +getfilesystemtime(&starttime); > +timer = li.QuadPart; > +dt = (double)timer/freq; > +starttime.tv_usec -= (int)((dt-(int)dt)*100); > +if (starttime.tv_usec < 0) { > +starttime.tv_usec += 100; > +--starttime.tv_sec; > +} > +starttime.tv_sec -= (int)dt; > +} > +} > +} > +if (starttime.tv_sec > 0) { > +b = QueryPerformanceCounter(&li); > +if (!b) { > +starttime.tv_sec = -1; > +} > +else { > +timer = li.QuadPart; > +if (timer < lasttime) { > +getfilesystemtime(time_Info); > +dt = (double)timer/freq; > +starttime = *time_Info; > +starttime.tv_usec -= (int)((dt-(int)dt)*100); > +if (starttime.tv_usec < 0) { > +starttime.tv_usec += 100; > +--starttime.tv_sec; > +} > +starttime.tv_sec -= (int)dt; > +} > +else { > +lasttime = timer; > +dt = (double)timer/freq; > +time_Info->tv_sec = starttime.tv_sec + (int)dt; > +time_Info->tv_usec = starttime.tv_usec + > (int)((dt-(int)dt)*100); > +if (time_Info->tv_usec > 100) { > +tim
[PHP-CVS] cvs: php4 /ext/standard/tests/time .cvsignore 001.phpt
jmoore Sun Feb 4 08:56:59 2001 EDT Added files: /php4/ext/standard/tests/time .cvsignore 001.phpt Log: Adding microtime() tests Index: php4/ext/standard/tests/time/.cvsignore +++ php4/ext/standard/tests/time/.cvsignore *.exp *.out *.php phpt.* Index: php4/ext/standard/tests/time/001.phpt +++ php4/ext/standard/tests/time/001.phpt --TEST-- microtime() function --POST-- --GET-- --FILE-- --EXPECT-- Passed: 10 Failed: 0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Arrays from forms
"Jamie" <[EMAIL PROTECTED]> wrote: > $results = mysql_query("SELECT option_type, code FROM options WHERE > code='000' ORDER BY option_type",$db); > mysql_fetch_array($results); > // From what understand I should have an array some thig like this: > // ("Size"=>"A4" , "Size" => "A3", "Size"=>"A5", "Colour"=>"Red", etc..); According to your SQL statement that doesn't appear to be true. According to your SQL statement you'll return two fields: option_type and code. > $types = array_values($results); > // OK so now I think I have an array like this: > // ("A4" , "A3", "A5", "Red", etc..); > while ($type =array_pop($types)){ >echo $type.""; > } I'd avoid using array_values() and array_pop(). Simply do this: while ( $row = mysql_fetch_array( $result ) ) { $option_type = $row[option_type]; $code = $row[code]; echo "$option_type $code"; } Hopefully that'll be enough to get you going. -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem with Zend Encoder testdrive - Win2k
Downloaded the Encoder testdrive and installed it with a license file (zend_encoder.dat). Did what the manual stated, except that I installed it on E:\program files\zend instead of C:\program files\zend (I did modify the install_license.reg before installing it into the registration database) When I run the zendenc.exe, I get a dialog stating that it cannot find the license data. I'm able to specify it manually, but then I get another errormessage saying "Error in saving configuration settings". Anyone else had this problem? - Carsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP Authenticate
Hi... I have a problem with PHP Authenticate ...if I enter user/pw wrong the first time it stops and I have to close/open browser.! I've tried to unset $PHP_AUTH_USER but then it just loops... if(!isset($PHP_AUTH_USER)) { Header("WWW-Authenticate: Basic realm=\".: Privat område :.\""); Header("HTTP/1.0 401 Unauthorized"); echo "Secured Area!"; exit; } else { $PHP_AUTH_PW_ENCRYPTED = crypt("$PHP_AUTH_PW", "wP"); $connect = mysql_connect($hostname,$username,$password) or die ("Klarer ikke koble til MqSQL db..."); $query = "SELECT * FROM forfatter"; $query .= " where id = $PHP_AUTH_USER"; $result = mysql_db_query($db, $query); while($row = mysql_fetch_array($result)) { $id = $row["id"]; $navn = $row["navn"]; $pw = $row["pw"]; } if (($id == $PHP_AUTH_USER) AND ($pw == $PHP_AUTH_PW_ENCRYPTED)) $bruker_ok = true; } else exit; } } - Fredrik A. Takle [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP and Oracle resources
Kristofer Widholm wrote: > > Well, I've been given the joyous task of implementing the DaveTV > project at CBS via PHP, using Oracle as a database. > > I've never used Oracle before. > > Looking at the PHP functions for Oracle, and having heard about it in > the past, it seems like quite a different approach than any SQL > database I've ever used. I still don't get the whole point of cursor > objects, etc. :-) > > It would all be pretty hilarious if it weren't so real, and with a > big fat deadline looming smack for the end of February. > > To get to the point: Anyone have any good PHP & Oracle tutorials, > resources, books, etc, to point me to? EVERYTHING I see is MySQL, > MySQL, MySQL, and all I get for Oracle are lists of unexplained PHP > function calls. > > Just point me in the right direction. I can walk there myself. > > Thanks for the help. > > Kristofer > -- > __ > > Kristofer Widholm > Web Pharmacy > [EMAIL PROTECTED] > 191 Grand Street, Brooklyn NY 11211 > 718.599.4893 > __ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] A list of Oracle related PHP functions can be found at: http://www.php.net/manual/en/ref.oci8.php Good luck, Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] HTTP compression
Sean, Thanks, I see. How about headers ? Do they need to be compressed, too; in other words, do headers "belong" to the output ? > -Message d'origine- > De : Sean Cazzell [mailto:[EMAIL PROTECTED]] > Envoye : dimanche 4 fevrier 2001 17:39 > A : Alain Fontaine > Cc : [EMAIL PROTECTED] > Objet : RE: [PHP] HTTP compression > > > Alain, > > When PHP parses a file, it treats the stuff that's not in blocks > as though each line were a print or echo statement. So your whole file > will be compressed and sent to the browser. > > Regards, > > Sean > > On Sun, 4 Feb 2001, Alain Fontaine wrote: > > > Rasmus, > > > > Thanks for the clarification; it seems obvious, too, that > mixing compressed > > and non compressed content would be quite difficult to > implement; at least > > it would partially compromise the speed/size gain because of > added protocol > > overhead. > > > > Now, imagining that we have enabled compression by calling > > ob_start("ob_gzhandler"), what happens for a document that contains > > something along these lines: > > > > > > ... > > > // Enable HTTP compression > > ob_start("ob_gzhandler"); > > > > // PHP content > > $content = "This is some content."; > > ?> > > > > This is a normal HTML section > > > > > // PHP content continues > > $content .= "And the rest of it."; > > echo $content; > > ?> > > ... > > > > > > In this particular case, what would be compressed ? As far as I have > > understood, nothing at all, because some part of the output is > not "passing > > through" PHP, right ? > > > > > -Message d'origine- > > > De : Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > > > Envoye : dimanche 4 fevrier 2001 14:34 > > > A : Alain Fontaine > > > Cc : [EMAIL PROTECTED] > > > Objet : Re: [PHP] HTTP compression > > > > > > > > > > I've just started experimenting with ob_start("ob_gzhandler") a > > > bit, and I > > > > have found that if any output is generated before > ob_start() is called, > > > > nothing at all gets compressed; if ob_start() is called before > > > any output, > > > > everything is compressed. > > > > > > > > Is this the case, I mean, is this "by design" ? > > > > > > Yes, it wouldn't really work any other way. You can't mix > non-compressed > > > and compressed in the same request. > > > > > > -Rasmus > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- PHP General Mailing List (http://www.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] db paging with MS Sql
Has anyone seen a good lession or code example on paging records from MS Sql 7? Say I have 300 records and want to break them down to 10 per page using [previous | next ] and a list of page numbers at the bottom. tia -- PHP General Mailing List (http://www.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] 2 questions
Hi I have a couple of questions. One about hosting and the other about IP addresses. The first on the IP's. I have been speaking to a company that I am looking at getting a dedicated server from. They ONLY do one IP address per server and use name-based hosting. I have asked for dedicated IP's, but their answer has been that all hosting companies are going to have to go to name-based hosting now. What is everyone's feeling on this? Years ago, the company I was with used name-based and I remember that the search engines did not like this On to hosting, the above server is a Cobalt Raq 4i. Does anyone else on the list use one of these and what do you think? I want to make sure that it's easy enough to compile latest php and mysql whenever I want to Thanks for any advice Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 2 questions
Hi, name-based hostig is quite okay but you shoulsd know that the cobald raq needs an extra ip for each site offering anonymous ftp and using ssl-certificate !! i installed php4.04pl1 and mysql 3.22.32 ( its easy and straightforward ) [ have a look at cobalt-users list ] greetings andreas - Original Message - From: "Adrian Teasdale" <[EMAIL PROTECTED]> To: "PHP List Post" <[EMAIL PROTECTED]> Sent: Sunday, February 04, 2001 6:47 PM Subject: [PHP] 2 questions > Hi I have a couple of questions. One about hosting and the other about IP > addresses. The first on the IP's. > > I have been speaking to a company that I am looking at getting a dedicated > server from. They ONLY do one IP address per server and use name-based > hosting. I have asked for dedicated IP's, but their answer has been that > all hosting companies are going to have to go to name-based hosting now. > What is everyone's feeling on this? Years ago, the company I was with used > name-based and I remember that the search engines did not like this > > On to hosting, the above server is a Cobalt Raq 4i. Does anyone else on the > list use one of these and what do you think? I want to make sure that it's > easy enough to compile latest php and mysql whenever I want to > > Thanks for any advice > > Ade > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTTP compression
Alain Fontaine wrote: > > Sean, > > Thanks, I see. How about headers ? Do they need to be compressed, too; in > other words, do headers "belong" to the output ? a HTTP response is made of response header(s) and the response body. Only the body is compressed, and this is signaled in the headers so the User Agent will know not to stare to a bunch of binary data :) -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Newbie:Cannot send session cookie...
james wrote: > > 1. Cannot send session cookie - headers already sent by (output started at > c:/program files/apache group/apache/htdocs/index.php4:10) in c:/program > files/apache group/apache/htdocs/index.php4 on line 11 > > What does it mean? > > Any hints? the error message is quite explicit. By the time it reaches the line 11 in index.php4 you already sent something to output, so if you have on index.php4:11 something like header(), setCookie() or session_start() which imply sending a header, is no longer possible [ you cannot send a header after you already started sending the body ]. > > 2. Another problem: > > My htm page has two frames (left and right). > I activate php4 script from button on left frame. > > Question: How can I print the result of query on the right frame? ... -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] HTTP compression
Teodor, Looked at it from that point of view, the question was pretty stupid ! ;) > -Message d'origine- > De : Teodor Cimpoesu [mailto:[EMAIL PROTECTED]] > Envoye : dimanche 4 fevrier 2001 19:09 > A : Alain Fontaine > Cc : Sean Cazzell; [EMAIL PROTECTED] > Objet : Re: [PHP] HTTP compression > > > > > Alain Fontaine wrote: > > > > Sean, > > > > Thanks, I see. How about headers ? Do they need to be > compressed, too; in > > other words, do headers "belong" to the output ? > > a HTTP response is made of response header(s) and the response body. > Only the body > is compressed, and this is signaled in the headers so the User Agent > will know > not to stare to a bunch of binary data :) > > -- teodor > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] db paging with MS Sql
Scott, As far as I know, MS SQL supports a syntax like this: SELECT TOP 10 FROM table_name WHERE etc etc However, I don't know how to make it start from a certain offset; I guess MS SQL's documentation, especially the T-SQL doc, should help. ""Scott Parks"" <[EMAIL PROTECTED]> a écrit dans le message news: 00b601c08ed1$ef153f30$[EMAIL PROTECTED] > Has anyone seen a good lession or code example on paging records from MS Sql > 7? Say I have 300 records and > want to break them down to 10 per page using [previous | next ] and a list > of page numbers at the bottom. > > tia > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTTP compression
From: "Teodor Cimpoesu" <[EMAIL PROTECTED]> Sent: Sunday, February 04, 2001 7:08 PM > a HTTP response is made of response header(s) and the response body. > Only the body > is compressed, and this is signaled in the headers so the User Agent > will know > not to stare to a bunch of binary data :) Where can I get the specs on the compression algorithm? Is it specified in a RFC? - Carsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is this a missing feature?
Where do I make a formal request for a feature? In Perl or Ruby, I could have said: foo ({ 'var1' => 'value', 'var2' => 'value'}); and it is so much more elegant than having to say: $hash = array ( 'var1' => 'value', 'var2' => 'value' ); foo ($hash); elegance is everything, man. lux Christian Reiniger wrote: > On Sunday 04 February 2001 07:31, John Luxford wrote: > > > > >> function foo (&$hash) { > >>while (list ($k, $v) = each ($hash)) { > >> echo "$k :: $v\n"; > >>} > >> } > > > >> // but what I want to say is something like this > >> > >> foo (["one" => "value", "two" => "value"]); > > > > foo () is declared to take a reference to a variable. This only works > > with "real" variables, not the temporary ones returned from array() etc. > > Modify it to > > function foo ($hash) { > > > > and it will work -- John Luxford Simian Systems w: www.simian.ca e: [EMAIL PROTECTED] p: 204.946.5955 -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 2 questions
"Adrian Teasdale" <[EMAIL PROTECTED]> wrote: > I have been speaking to a company that I am looking at getting a dedicated > server from. They ONLY do one IP address per server and use name-based > hosting. I have asked for dedicated IP's, but their answer has been that > all hosting companies are going to have to go to name-based hosting now. > What is everyone's feeling on this? Years ago, the company I was with used > name-based and I remember that the search engines did not like this Search engines handle name-based sites just fine now. Very old browsers (I don't recall what generation) are not able to access name-based sites, but that's probably not justification for needing individual IPs for each site. If you plan on hosting many sites and need anonymous FTP or SSL for these sites you'll need more IP addresses. IP addresses can be hard to come by for some hosting companies so if you actually need them you should shop around or explain your situation to the hosting company you're talking to. There are *tons* of web hosting companies that will lease or colocate a RaQ4 for a reasonable price with more than 1 IP. > On to hosting, the above server is a Cobalt Raq 4i. Does anyone else on the > list use one of these and what do you think? I want to make sure that it's > easy enough to compile latest php and mysql whenever I want to Until about six months ago when I joined another business I did a lot of business as an independent Cobalt consultant. You shouldn't have any problem installing PHP and MySQL with whatever configuration options you want. In fact, I currently run several older generation RaQs that use the Mips architecture instead of the x86 architecture used by the RaQ4 and I've been installing development versions of PHP and MySQL as they were released every few weeks. You may want to visit www.cobalt.com and sign up for the cobalt-users mailing list and/or bookmark a mailing list archive of it like the one found at http://marc.theaimsgroup.com/. As far as the RaQ4 itself goes, for less_than_expert Linux system administrators, the GUI makes certain functions very easy to do (add users, websites, control DNS), but if you're comfortable doing things from the commandline or you expect heavy CPU usage or you plan on installing a lot of programs and modifying the system or you need redundancy and failover it might not be the best server for you. With that said, it's a great server [appliance] for basic web and email hosting and less than enterprise level database usage. -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Session With Cookies
I never wanted this question to be an offense for anyone. I thank you all for your answers. Regards PHPLover Lux <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > It's unlikely I suppose, but there's a must-have book you should look at > if you want info on hacks, including browser hacks (Hacking Exposed: > Network Security Secrets and Solutions, 2nd Edition). The cookie hack > that comes to mind only works in IE or MS products (but that's only > what, 90% of the web), but all it is is a line or so of html code that > somebody places on their site (say in an iframe...) that sends them all > your cookie data (if the user uses outlook, they can also just place it > in an email). from there, they use the cookie data to pose as that > person on various sites trying to gain sensitive info. but if you're > already giving them the password, how much more sensitive can you get? > > so really, if they don't close their browser for a while, this > possibility increases. and it may be a slim possibility, but it's > better to be safe than sorry. > > later > > lux > > > Well .. I am ... nobody but the user itself can see the login and password > > > > in the cookie. Unless it's on non-SSL connection and somebody is > > > > packet-shiffing around. Otherwise there would be no leak for somebody else > > > > to get this information, is there? > > > > And if the user doesn't logout, the cookie is still destroyed when the > > > > browser is closed anyway. > > > > > > > > Eelco. > > > -- > > John Luxford > Simian Systems > > w: www.simian.ca > e: [EMAIL PROTECTED] > p: 204.946.5955 > > -- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Replacing A Word in HTML page
Thanks for your answerm but what does eregi_replace() do? Regards "Steve Werby" <[EMAIL PROTECTED]> wrote in message 045801c08e7f$3c4f61c0$6401a8c0@mobile">news:045801c08e7f$3c4f61c0$6401a8c0@mobile... > "phpLover" <[EMAIL PROTECTED]> wrote: > > I want to read an HTML page from another site and replace certain > characters > > with capital letters and show them in another dynamically generated web > page > > on my site. I know this is possible in Perl, but can this be done in PHP? > If > > yes, then how? > > It's definitely possible in PHP. I've done it. You probably want to use a > combination of fopen() and other file handling functions, eregi_replace() > and str_replace(). > > -- > Steve Werby > COO > 24-7 Computer Services, LLC > Tel: 804.817.2470 > http://www.247computing.com/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTTP compression
Carsten Gehling wrote: > > From: "Teodor Cimpoesu" <[EMAIL PROTECTED]> > Sent: Sunday, February 04, 2001 7:08 PM > > > a HTTP response is made of response header(s) and the response body. > > Only the body > > is compressed, and this is signaled in the headers so the User Agent > > will know > > not to stare to a bunch of binary data :) > > Where can I get the specs on the compression algorithm? Is it specified in a > RFC? erm, it's gzip I guess. PHP uses zlib to send compressed output, afaik [i.e. you must have --with-zlib in order to use the output compression handler ] -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is this a missing feature?
Lux wrote: > > Where do I make a formal request for a feature? In Perl or Ruby, I > could have said: > > foo ({ 'var1' => 'value', 'var2' => 'value'}); > > and it is so much more elegant than having to say: > > $hash = array ( >'var1' => 'value', >'var2' => 'value' > ); > foo ($hash); > > elegance is everything, man. > > lux lux in latin means 'light' right? :) let me enlighten then :-P foo ($hash = array('var1'=>'value', 'var2'=>'value')); should work. Now, I don't undestand why exactly do you need references. By default everything is passed in a referenced manner, if I undestood correct the explanation Zeev wrote right after 4.0 was out, or so. Don't take references like something that will boost your skript speed to 200%. Use them only when you need them, and to find out when you actually need them check out an article on references at zend.com. Now, let me tell you that somehow I agreed with you :) cause I love Python way of dealing with arrays, but we are in PHP, so we have to figure PHP way, not way. ciao -- teodor -- PHP General Mailing List (http://www.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] Connectivity to AS/400
I'm going to be trying to connect to the native DB2 database in a AS/400 So far thats all I know about the IBM side. Can someone give me a short update on what options I have ? TIA !!! -pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Replacing A Word in HTML page
"phpLover" <[EMAIL PROTECTED]> wrote: > Thanks for your answerm but what does eregi_replace() do? Short answer is to see http://www.php.net/manual/en/function.eregi-replace.php. Usage examples can be found right on php.net. See longer answer below. Previously "phpLover" <[EMAIL PROTECTED]> wrote: > I want to read an HTML page from another site and replace certain > characters > with capital letters and show them in another dynamically generated web > page on my site. I should have said use ereg_replace(). It matches text using regular expressions (regular expressions allow for complex matching) in a case-sensitive manner. Depending on the specifics of what you're attempting it may be of use. You could use it to replace certain characters within a specific part of the HTML source page (but ignore the same characters within other parts of the page) with capital letters (like you described). If you simply want to replace all matches within the page str_replace() is a better choice. Regular expressions are a more difficult concept to master than a lot of other concepts within PHP so you may want to look at some tutorials or books on the subject. -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is this a missing feature?
At 8:40 PM +0200 2/4/01, Teodor Cimpoesu wrote: >Lux wrote: >> >> Where do I make a formal request for a feature? In Perl or Ruby, I >> could have said: >> >> foo ({ 'var1' => 'value', 'var2' => 'value'}); >> >> and it is so much more elegant than having to say: >> >> $hash = array ( >> 'var1' => 'value', >> 'var2' => 'value' >> ); >> foo ($hash); >> >> elegance is everything, man. >> >> lux >lux in latin means 'light' right? :) let me enlighten then :-P > foo ($hash = array('var1'=>'value', 'var2'=>'value')); >should work. And just to turn up the wattage a little further (hey, I work for the University of California whose motto is 'Fiat Lux', menaing either Lux drives an Italian car or 'Let there be light')... You don't need the $hash in that function call unless you need to use it later on in your main program, so you can just say: foo (array('var1'=>'value', 'var2'=>'value')); which is basically the same as the Perl or Ruby (??? never heard of that...) call above, with the addition of array(...). I use the function(array('param1'=>'value', ...)) syntax a lot instead of individual parameters in function calls. I don't have to remember function argument order that way. - steve >Now, I don't undestand why exactly do you need references. By default >everything is passed in a referenced manner, if I undestood correct the >explanation Zeev wrote right after 4.0 was out, or so. > >Don't take references like something that will boost your skript speed >to 200%. >Use them only when you need them, and to find out when you actually need >them >check out an article on references at zend.com. > >Now, let me tell you that somehow I agreed with you :) cause I love >Python way >of dealing with arrays, but we are in PHP, so we have to figure PHP way, >not > way. > >ciao > >-- teodor -- +--- "They've got a cherry pie there, that'll kill ya" --+ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +-- FBI Special Agent Dale Cooper ---+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] HTTP compression
Check the http 1.1 rfc - http://www.faqs.org/rfcs/rfc2616.html It links to the gzip file format rfc - http://www.faqs.org/rfcs/rfc1952.html > -Original Message- > From: Carsten Gehling [mailto:[EMAIL PROTECTED]] > Sent: 4 February 2001 19:19 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] HTTP compression > > > From: "Teodor Cimpoesu" <[EMAIL PROTECTED]> > Sent: Sunday, February 04, 2001 7:08 PM > > > a HTTP response is made of response header(s) and the response body. > > Only the body > > is compressed, and this is signaled in the headers so the User Agent > > will know > > not to stare to a bunch of binary data :) > > Where can I get the specs on the compression algorithm? Is it > specified in a > RFC? > > - Carsten > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is this a missing feature?
Thanks, just what I was looking for! > Now, let me tell you that somehow I agreed with you :) cause I love > > Python way > > of dealing with arrays, but we are in PHP, so we have to figure PHP way, > > not > > way. Let's make PHP our favourite language! If another has a better feature, take it. later, Lux > > > > ciao > > > > -- teodor -- John Luxford Simian Systems w: www.simian.ca e: [EMAIL PROTECTED] p: 204.946.5955 -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] HTTP compression
> Sean, > > Thanks, I see. How about headers ? Do they need to be compressed, too; in > other words, do headers "belong" to the output ? How about RTFR? :) (Read the .. RFC.) Really, when you've read http://www.faqs.org/rfcs/rfc2616.html you'll be able to understand a lot more about how http requests and responses work, and how stuff like compression fits into the picture, etc, etc. Basically a must-read for anyone serious about working with the web on a technical level. (That'd be you, php'ers :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is this a missing feature?
> > foo ($hash = array('var1'=>'value', 'var2'=>'value')); > >should work. > You don't need the $hash in that function call unless you need to use > it later on in your main program, so you can just say: > > foo (array('var1'=>'value', 'var2'=>'value')); that won't work (Lux's complaint) when foo() is declared function foo (&$hash) cause PHP cannot extract the reference of an array unbound to any PHP variable. There is only one exception, which is for objects created with new. -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DB] Connectivity to AS/400
There's been a lot of talk about this recently. Check the archives for the last 2 months, and PHPBuilder.com Last I heard, you needed DRDA(DB2 Connect) installed, as well as the runtime client. Also on the client - DB2 Application Development package. Use this to compile PHP --with-ibm-db2=. Make sure you run the CATALOG commands on the client so that it can find the AS400 database. 'Luck! -Szii At 10:41 AM 2/4/2001 -0800, Pete Lancashire wrote: >I'm going to be trying to connect to the native DB2 database in a AS/400 >So far thats all I know about the IBM side. > >Can someone give me a short update on what options I have ? > >TIA !!! > >-pete > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 /win32 time.c
I don't think you should be using static variables in the functions. Don't forget that you might have more than one thread accessing this function at a time (unless you came to the conclusion that a race here can't do any harm). Andi At 03:52 PM 2/4/2001 +, James Moore wrote: >jmoore Sun Feb 4 07:52:33 2001 EDT > > Modified files: > /php4/win32 time.c > Log: > Fix for time.c under win32. Patch By: "Vanhanen, Reijo" > <[EMAIL PROTECTED]> > > @- microtime under windows now returns accurate values (James) > > > >Index: php4/win32/time.c >diff -u php4/win32/time.c:1.4 php4/win32/time.c:1.5 >--- php4/win32/time.c:1.4 Wed Jun 16 10:06:53 1999 >+++ php4/win32/time.c Sun Feb 4 07:52:32 2001 >@@ -11,7 +11,15 @@ > * > >*/ > >+/* $Id: time.c,v 1.5 2001/02/04 15:52:32 jmoore Exp $ */ > >+ /** >+ * >+ * 04-Feb-2001 >+ * - Added patch by "Vanhanen, Reijo" <[EMAIL PROTECTED]> >+ * Improves accuracy of msec >+ */ >+ > /* Include stuff > */ > > #include "time.h" >@@ -21,22 +29,92 @@ > #include > #include > >+int getfilesystemtime(struct timeval *time_Info) >+{ >+FILETIME ft; >+__int64 ff; >+ >+GetSystemTimeAsFileTime(&ft); /* 100 ns blocks since 01-Jan-1641 */ >+/* resolution seems to be 0.01 sec */ >+ff = *(__int64*)(&ft); >+time_Info->tv_sec = (int)(ff/(__int64)1000-(__int64)11644473600); >+time_Info->tv_usec = (int)(ff % 1000)/10; >+return 0; >+} >+ >+ >+ > int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info) > { >- _int64 mstimer, freq; >+ >+ static struct timeval starttime = {0, 0}; >+ static __int64 lasttime = 0; >+ static __int64 freq = 0; >+ __int64 timer; >+ LARGE_INTEGER li; >+ BOOL b; >+ double dt; >+ > /* Get the time, if they want it */ > if (time_Info != NULL) { >- time_Info->tv_sec = time(NULL); >- /* get ticks-per-second of the performance counter >- Note the necessary typecast to a LARGE_INTEGER structure >- */ >- if (!QueryPerformanceFrequency((LARGE_INTEGER *) & freq)) { >- time_Info->tv_usec = 0; >- } else { >- QueryPerformanceCounter((LARGE_INTEGER *) & mstimer); >- mstimer = (__int64) (mstimer * .8); >- time_Info->tv_usec = (long) (mstimer % 0x0FFF); >- } >+ if (starttime.tv_sec == 0) { >+b = QueryPerformanceFrequency(&li); >+if (!b) { >+starttime.tv_sec = -1; >+} >+else { >+freq = li.QuadPart; >+b = QueryPerformanceCounter(&li); >+if (!b) { >+starttime.tv_sec = -1; >+} >+else { >+getfilesystemtime(&starttime); >+timer = li.QuadPart; >+dt = (double)timer/freq; >+starttime.tv_usec -= (int)((dt-(int)dt)*100); >+if (starttime.tv_usec < 0) { >+starttime.tv_usec += 100; >+--starttime.tv_sec; >+} >+starttime.tv_sec -= (int)dt; >+} >+} >+} >+if (starttime.tv_sec > 0) { >+b = QueryPerformanceCounter(&li); >+if (!b) { >+starttime.tv_sec = -1; >+} >+else { >+timer = li.QuadPart; >+if (timer < lasttime) { >+getfilesystemtime(time_Info); >+dt = (double)timer/freq; >+starttime = *time_Info; >+starttime.tv_usec -= (int)((dt-(int)dt)*100); >+if (starttime.tv_usec < 0) { >+starttime.tv_usec += 100; >+--starttime.tv_sec; >+} >+starttime.tv_sec -= (int)dt; >+} >+else { >+lasttime = timer; >+dt = (double)timer/freq; >+time_Info->tv_sec = starttime.tv_sec + (int)dt; >+time_Info->tv_usec = starttime.tv_usec + >(int)((dt-(int)dt)*100); >+if (time_Info->tv_usec > 100) { >+time_Info->tv_usec -= 100; >+++time_Info->tv_sec; >+} >+} >+} >+} >+if (starttime.tv_sec < 0) { >+getfilesystemtime(time_Info); >+} >+ > } > /* Get the timezone, if they want it */ > if (timezone_Info != NULL) { >@@ -52,21 +130,
[PHP] XML Parsing with PHP
Where can I find some info on parsing XML with PHP? I am not looking for functions, but examples and explanations ! Thx -- PHP General Mailing List (http://www.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] Email Selected Data
Hi, I am selecting data using the below and trying to insert it into a mail, it does everything except send the data selected, anyone have an idea? $SQLStatement = "SELECT * FROM Orders Where Status='N' Order by OrderID"; $SQLConn = mysql_connect($host, $user, $pass); $db = mysql_select_db($dbase, $SQLConn); $SQLResult = mysql_query($SQLStatement); $num_rows=mysql_num_rows($SQLResult); for ($i=0; $i<$num_rows; $i++) { mysql_data_seek($SQLResult, $i); $array=mysql_fetch_array($SQLResult); $content=printf("First Name: %s\nLast Name: %s\n",$array['FirstName'], $array['LastName']); } mail($MAIL, "Order", $content , "From:[EMAIL PROTECTED]"); I know it is working to a degree because it prints out the data on the resulting page and sends a blank email, it just doesn`t put it in the email. TIA Ade -- PHP General Mailing List (http://www.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] Installing Verisign PFPro Support
Hello! I'm trying to configure PHP with Verisign PayFlow PRO support on my server. I'm running FreeBSD 4, Apache 1.3.12, mod_ssl, openSSL, and mySQL 3.23.32. I downloaded the newest release of PHP (4.0.4pl2) and tried compiling it, using the ./configure --with-pfpro=[dir] thing and I get the following error: /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to `pthread_mutex_unlock' /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to `pthread_self' /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to `pthread_mutex_destroy' /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to `pthread_mutex_lock' /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to `pthread_mutex_init' I've never done anything like this before, so I'm not really sure what's goin' on. Any insight into the problem would be greatly appreciated! Thanks! -brady -- Brady J. Horenstein [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] XML Parsing with PHP
phpbuilder.com - there are a few articles on the site about XML --Joe On Sun, Feb 04, 2001 at 05:02:43PM +0100, Steve Haemelinck wrote: > Where can I find some info on parsing XML with PHP? > I am not looking for functions, but examples and explanations ! > > Thx > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- --- Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Installing Verisign PFPro Support
Brady- Regardless of your compilation problems, Verisign has not yet released their fixed SDK for BSD. They've only released it for Linux (libc5 & glibc2) and Solaris. You're kind of SOL until they do. See the user comments on www.php.net/pfpro for why you're SOL. John On Sun, 4 Feb 2001, Brady J. Horenstein wrote: > Hello! > > I'm trying to configure PHP with Verisign PayFlow PRO support on my server. > I'm running FreeBSD 4, Apache 1.3.12, mod_ssl, openSSL, and mySQL 3.23.32. > > I downloaded the newest release of PHP (4.0.4pl2) and tried compiling it, > using the ./configure --with-pfpro=[dir] thing and I get the following > error: > > /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to > `pthread_mutex_unlock' > /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to > `pthread_self' > /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to > `pthread_mutex_destroy' > /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to > `pthread_mutex_lock' > /usr/home/arcwebn/signio/freebsd3/lib/libpfpro.so: undefined reference to > `pthread_mutex_init' > > I've never done anything like this before, so I'm not really sure what's > goin' on. > > Any insight into the problem would be greatly appreciated! > > Thanks! > > -brady > > -- > Brady J. Horenstein > [EMAIL PROTECTED] > > > -- John Donagher Application Engineer Intacct Corp. - Powerful Accounting on the Web 408-395-0989 720 University Ave. Los Gatos CA 95032 www.intacct.com Public key available off http://www.keyserver.net Key fingerprint = 4024 DF50 56EE 19A3 258A D628 22DE AD56 EEBE 8DDD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP hosting - the final frontier.
No need to get upset :) just stating MHO (nothing personal). In your own words you say : "People have taken a chance with me" and that's really what they did. Cause you know what happens to backup plans that don't have backup plans that don't... I'm assuming that there may be an audience for this kind of hosting but personally I wouldn't host my site under such circumstances. Prices are so cheep today and you can get so much for so less with many ISP's that have a department of people running the show. As for the Service, well, if you chose a company and don't like the service you can always go somewhere else. Most companies that I worked with gave amazing service. Today I work with PhenomiNET and the service is simply amazing. you can look at what they offer here : http://www.weberdev.com/index.php3?GoTo=phenominet/prices.htm This is your one stop shop for hosting. WeberDev.com is hosted there and I can tell you that their service is amazing. They are fast, reliable and more than anything, very professional (specially in PHP / MySQL). Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Robert Covell [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 10:40 PM To: Boaz Yahav; Ben Peter; Chris Mason Cc: Php-General Subject: RE: [PHP] PHP hosting - the final frontier. I shouldn't even reply to this... Yes I would host with me. Have you ever heard of a backup plan. People that would step in if something happens to me? People that I trust to keep the company going if it fails. With all due respect, how do people host with a company that doesn't give a rats ass about them or their business. How many big companies redirect your call, or brush you away when problems occur. I been over backwards for my clients. Providing better service then many of the bigger companies out there. That is why people do and will continue to host with me. Like I said, I plan on hiring people in the near future. Things take time to evolve. I am not saying that my company is for everyone. If you don't like a one man shop then don't go there. People have taken a chance with me and have not been disappointed like so many times before. Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 1:38 PM To: 'Robert Covell'; Ben Peter; Chris Mason Cc: Php-General Subject: RE: [PHP] PHP hosting - the final frontier. And if, God forbid, something was to happen to you... 120 People / Companies would be left with a server that no one knows the root password too? With all due respect, how can someone in his right mind host with a one man gang company? For all I know you can be a hosting genius and give the best service around but you are still one man. Would you host with you ? :) Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Robert Covell [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 03, 2001 9:16 PM To: Ben Peter; Chris Mason Cc: Php-General Subject: RE: [PHP] PHP hosting - the final frontier. I am going to have to disagree on this one. I run a successful (and profitable) hosting company(http://www.rolet.com). My employees total 1 (me, myself and I). The number of clients hosted is roughly 120. I provide a wide variety of services on Linux, FreeBSD, NT, and W2K. Yes it is hard to believe that 1 person can be available 24x7, or not take vacations, but this is what I do and LOVE every second of it. I value customer satisfaction and strive to provide that best Internet services possible. For me this is a career for life, not just a job. So I do believe that 1 person can be available 24x7 and not take vacations. Don't get me wrong, some days it is tough. I would like to have other employees in the future, but don't mind the sacrifices taken to get there. Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ben Peter Sent: Saturday, February 03, 2001 11:59 AM To: Chris Mason Cc: Php-General Subject: Re: [PHP] PHP hosting - the final frontier. Chris, This all sounds good but for one thing: I firmly believe that one man with a root password is not enogh to look after even one client. I have hosted with 3 one-man-companies, and it always came to the point where I couldn't reach someone for a week, or I waited for 3 months, only to be granted connect privileges to the mysql database - no offense meant! I think it's just too much for one man, you cannot be available 24/7, and you will want holidays. Still, a PHP-spe
Re: [PHP] Is this a missing feature?
On Sunday 04 February 2001 20:09, Lux wrote: > > Now, let me tell you that somehow I agreed with you :) cause I love > > Python way > > of dealing with arrays, but we are in PHP, so we have to figure PHP > > way, > Let's make PHP our favourite language! If another has a better > feature, take it. But the feature is useless :) Let me elaborate: You declared your function as function foo (&$hash) That is you take a reference to that parameter ($hash). That's only useful if you want to modify that parameter in such a way that the caller also notices that modification. Now if you pass an anonymous array to the function, you could modify that, but after your function exits that array is automatically destroyed, before the caller can do anything with it. So if you don't have a good reason to use a reference in that place (I very much assume you don't), use normal pass-by-value. In PHP4 that's just as fast as pass-by-reference (read http://www.zend.com/zend/art/ref-count.php) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka", but "That's funny..." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Replacing A Word in HTML page
On Sunday 04 February 2001 19:23, phpLover wrote: > Thanks for your answerm but what does eregi_replace() do? Exactly the thing that's written in the documentation for it :) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka", but "That's funny..." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Email Selected Data
On Sunday 04 February 2001 21:31, [EMAIL PROTECTED] wrote: > for ($i=0; $i<$num_rows; $i++) > { > mysql_data_seek($SQLResult, $i); > $array=mysql_fetch_array($SQLResult); > $content=printf("First Name: %s\nLast Name: %s\n",$array['FirstName'], Re-read the documentation for "printf". You want to use sprintf() here. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka", but "That's funny..." - Isaac Asimov -- PHP General Mailing List (http://www.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] Strange behavior with parser/methods?
[script at end] Does it seem strange that although object members can store functions, they can't be used as methods? That is, we can have $TestObject->mTestMember = create_function('','echo "TestMember";'); but we can't do $TestObject->mTestMember(); Can I get around this using clever placement of {}'s or ()'s? Or do I have to make two separate calls, such as $temp = $TestObject->mTestMember; $temp(); At first glance, it seems like a parser problem. But I couldn't get it to go away by placing ()'s and {}'s... Perhaps I wasn't being clever enough. Can anyone help? It seems odd that accessing members as methods wouldn't be allowed, but variable functions (http://www.php.net/manual/en/functions.variable-functions.php PHP Manual, Chap 12) would be. On the other hand, it's not safe to willy-nilly be introducing methods to a class. But then again, I can still do $TestObject->mPreviouslyUndeclaredMember = 'Huh?'; so, I don't buy this line of reasoning. Bug or language feature or other? Thanks, TSB Here's a script which illustrates this problem... "; } function Init() { $this->mTestMember = create_function('','echo "TestMember";'); } var $mTestMember; } $Tc = new TestClass; //case 1: works (standard method invocation) $Tc->TestMethod(); $Tc->Init(); //case 2: doesn't work (member as method) //$Tc->mTestMember(); //doesn't work //case 3: works (two-step) $holder = $Tc->mTestMember; $holder(); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP hosting - the final frontier.
I understand your concerns, but with this type of logic this mailing list not not be around. Niether would Linux, Apache, MySql or anyother open source tool that so many people utilize today. We would all be on NT instead of Linux and using IIS with ASP instead of PHP. Do think Ramsus when he started out on PHP/FI was thinking I am only one person I shouldn't even try to make it because the big guys are more reliable. Or Linus thought the same thing when he made his first kernel. I really doubt it, and neither did I when I decided to take a chance learn PHP/FI on Linux using Apache about 5 years ago. Look at where they are today and the bazillion people who rely on the tools that one or two people took the time and a chance on developing. Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 - Original Message - From: "Boaz Yahav" <[EMAIL PROTECTED]> To: "'Robert Covell'" <[EMAIL PROTECTED]>; "Boaz Yahav" <[EMAIL PROTECTED]>; "Ben Peter" <[EMAIL PROTECTED]>; "Chris Mason" <[EMAIL PROTECTED]> Cc: "Php-General" <[EMAIL PROTECTED]> Sent: Sunday, February 04, 2001 3:29 PM Subject: RE: [PHP] PHP hosting - the final frontier. > No need to get upset :) just stating MHO (nothing personal). > > In your own words you say : "People have taken a chance with me" > and that's really what they did. Cause you know what happens to > backup plans that don't have backup plans that don't... > > I'm assuming that there may be an audience for this kind of hosting > but personally I wouldn't host my site under such circumstances. > > Prices are so cheep today and you can get so much for so less with > many ISP's that have a department of people running the show. > > As for the Service, well, if you chose a company and don't like the service > you can always go somewhere else. Most companies that I worked with > gave amazing service. > > Today I work with PhenomiNET and the service is simply amazing. > you can look at what they offer here : > > http://www.weberdev.com/index.php3?GoTo=phenominet/prices.htm > > This is your one stop shop for hosting. WeberDev.com is hosted there > and I can tell you that their service is amazing. They are fast, reliable > and more than anything, very professional (specially in PHP / MySQL). > > Sincerely > > berber > > Visit http://www.weberdev.com Today!!! > To see where PHP might take you tomorrow. > > > -Original Message- > From: Robert Covell [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 03, 2001 10:40 PM > To: Boaz Yahav; Ben Peter; Chris Mason > Cc: Php-General > Subject: RE: [PHP] PHP hosting - the final frontier. > > > I shouldn't even reply to this... > > Yes I would host with me. > > Have you ever heard of a backup plan. People that would step in if > something happens to me? People that I trust to keep the company going if > it fails. > > With all due respect, how do people host with a company that doesn't give a > rats ass about them or their business. How many big companies redirect your > call, or brush you away when problems occur. I been over backwards for my > clients. Providing better service then many of the bigger companies out > there. That is why people do and will continue to host with me. Like I > said, I plan on hiring people in the near future. Things take time to > evolve. > > I am not saying that my company is for everyone. If you don't like a one > man shop then don't go there. People have taken a chance with me and have > not been disappointed like so many times before. > > Sincerely, > > Robert T. Covell > President / Owner > Rolet Internet Services, LLC > Web: www.rolet.com > Email: [EMAIL PROTECTED] > Phone: 816.210.7145 > Fax: 816.753.1952 > > -Original Message- > From: Boaz Yahav [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 03, 2001 1:38 PM > To: 'Robert Covell'; Ben Peter; Chris Mason > Cc: Php-General > Subject: RE: [PHP] PHP hosting - the final frontier. > > > And if, God forbid, something was to happen to you... > 120 People / Companies would be left with a server > that no one knows the root password too? > > With all due respect, how can someone in his > right mind host with a one man gang company? > > For all I know you can be a hosting genius and > give the best service around but you are still one > man. > > Would you host with you ? :) > > Sincerely > > berber > > Visit http://www.weberdev.com Today!!! > To see where PHP might take you tomorrow. > > > -Original Message- > From: Robert Covell [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 03, 2001 9:16 PM > To: Ben Peter; Chris Mason > Cc: Php-General > Subject: RE: [PHP] PHP hosting - the final frontier. > > > I am going to have to disagree on this one. > > I run a successful (and profitable) hosting company(http://www.rolet.com). > My employees total 1 (me, myself and I). The number of clients hosted is > roughl
Re: [PHP] 2 questions
I use a RaQ3 and have no problems running PHP and MySQL. I started out using one IP but the biggest problem I found was that in order to view the site or make changes to it, the domain name must resolve to the server before it would work. I decided it would be best for me to assign each site an IP and go with it. I am not sure who you are talking to about a dedicated RaQ but look into http://www.4webspace.com. I have a RaQ3 with 100 gig transfer and 30 IP's for $110 a month. They do have RaQ4's for a little more money. David Smith - Original Message - From: Adrian Teasdale <[EMAIL PROTECTED]> To: PHP List Post <[EMAIL PROTECTED]> Sent: Sunday, February 04, 2001 12:47 PM Subject: [PHP] 2 questions > Hi I have a couple of questions. One about hosting and the other about IP > addresses. The first on the IP's. > > I have been speaking to a company that I am looking at getting a dedicated > server from. They ONLY do one IP address per server and use name-based > hosting. I have asked for dedicated IP's, but their answer has been that > all hosting companies are going to have to go to name-based hosting now. > What is everyone's feeling on this? Years ago, the company I was with used > name-based and I remember that the search engines did not like this > > On to hosting, the above server is a Cobalt Raq 4i. Does anyone else on the > list use one of these and what do you think? I want to make sure that it's > easy enough to compile latest php and mysql whenever I want to > > Thanks for any advice > > Ade > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP hosting - the final frontier.
On Sunday 04 February 2001 23:18, Robert Covell wrote: > I understand your concerns, but with this type of logic this mailing > list not not be around. Niether would Linux, Apache, MySql or anyother > open source tool that so many people utilize today. We would all be on > NT instead of Linux and using IIS with ASP instead of PHP. Do think > Ramsus when he started out on PHP/FI was thinking I am only one person > I shouldn't even try to make it because the big guys are more reliable. That's comparing apples to oranges. If all of Rasmus's computers fail while he's on holiday for 3 weeks, who cares? (Sorry Rasmus :) If some machine at a hosting company shows glitches while the only admin is sick, things will be very bad for the hosted people/companies. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka", but "That's funny..." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] db paging with MS Sql
I'm pretty sure there's no other way to do it but to read them all in and only display what you need. AFAIK, MSSQL doesn't support paging itself, but relies on the ADO driver to do this. If you make an reference to an ADO object in VBScript, you can set how many rows are in a 'page', then tell it to jump to a specific page, to jump to that group of rows. My terminology is probably wrong above, haven't used ADO/VBScript stuff in awhile. But that's the gist. Scott Parks wrote: > Has anyone seen a good lession or code example on paging records from MS Sql > 7? Say I have 300 records and > want to break them down to 10 per page using [previous | next ] and a list > of page numbers at the bottom. > > tia > > -- > PHP General Mailing List (http://www.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] Learning MySQL
What would your advice be for learning MySQL with PHP on an Apache server? I know a little Perl and am beginning to learn PHP. I'm more of a designer than a programmer (not enough geek genes). I went through the tutorial at WebMonkey and have it all installed and working, but the tutorial isn't able to go in depth about the basic functions of MySQL. Is this something better learned from a book? Suggestions for books and/or tutorials online would be appreciated. Jeff Oien, WebDesigns http://www.webdesigns1.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] db forms creator?
Hi, can anyone point me towards an easy way to generate forms to update a mysql database? I've seen some sites where I can specify a list of table fields and the datatype for each, and get an output of: 1. the sql to create the table 2. a php form that can be used to update the table problem is I can't find the site now :) has anyone else found this? Regards, jaxon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Learning MySQL
On Sun, Feb 04, 2001 at 05:06:02PM -0600, Jeff Oien wrote: > What would your advice be for learning MySQL with PHP on an > Apache server? I know a little Perl and am beginning to learn PHP. > I'm more of a designer than a programmer (not enough geek genes). > I went through the tutorial at WebMonkey and have it all installed > and working, but the tutorial isn't able to go in depth about the > basic functions of MySQL. Is this something better learned from > a book? Suggestions for books and/or tutorials online would be > appreciated. Read the book from Paul DuBois about MySQL. You can find this book at the end of http://php.net/books.php -Egon -- http://www.linuxtag.de/ http://php.net/books.php http://www.concert-band.de/ http://www.php-buch.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] upload
Hello, How can i upload a file from a client to server ? I tryed copy() but it doesint works. Paul
Re: [PHP] Is this a missing feature?
> But the feature is useless :) Here, I removed the reference, so we can stop fussing over it (it wasn't the question to begin with), and here's an example of a potential use for this (a stupid example, but still...). I'm not weighing out the benefits of references, I'm striving to achieve the cleanest and most elegant code I can, because the larger the project, the more code you have to read, and the uglier it can get. That's where a language like Ruby excels. There's less syntactical crap, it's very easy to read, and it's caused me to consider switching to eRuby (like mod_perl, allows <% ruby this, ruby that %> in your html) because it is structurally easier and more geared towards larger projects. (that last statement will probably get me murdered on a PHP list) But honestly, the only problem is finding a host running eRuby that I don't have to maintain myself. I'm lazy, after all. later, lux $text"; } function img ($hash) { $attr_text = ""; while (list ($k, $v) = each ($hash)) { $attr_text .= " $k=\"$v\""; } return ""; } // works this way $attrs = array ( "href" => "http://www.google.com/", "target" => "_blank" ); echo a ($attrs, "Visit Google!"); echo "\n\n"; // also this way (thanx teodor!) echo a ($attrs = array ( "href" => "http://www.google.com/", "target" => "_blank" ), "Visit Google!"); // ideally, i'd like to say this though... // echo a (["href" => "http://www.google.com/", "target" => "_blank"], "Visit Google!"); // what also doesn't work // echo a (array("href" => "http://www.google.com/", "target" => "_blank"), "Visit Google!"); echo "\n\n"; // another example echo a ($attrs = array ("href" => "http://www.google.com/"), img ($attrs = array ( "src" => "http://www.google.com/images/title_homepage4.gif", "alt" => "Visit Google!", "border" => "0") ) ); /* now ideally, this could be written much more cleanly, perhaps... echo a(['href' => [http://www.google.com/'], img(['src' => 'http://www.google.com/images/title_homepage4.gif', 'alt' => 'Visit Google!', 'border' => '0']) ); */ ?> -- John Luxford Simian Systems w: www.simian.ca e: [EMAIL PROTECTED] p: 204.946.5955 -- -- PHP General Mailing List (http://www.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] I should apologize
I don't mean to bash php in any way (as in the Ruby plugs in my last post). I use it because it has so many advantages over other more system-oriented not web-oriented languages for this type of work. It's fantastic. I see so much enthusiasm on the web for this language, a significant codebase, feature list (I'm not sure, but does ASP generate SWF files, PDF files, support IMAP, etc), and it has a lot of great developers dedicated to it. But we need to be constantly self-critical, or we won't see areas we can improve in. I also feel it's good to know more than one language, so you get more than one approach and you're more adaptable to situations that PHP (or whatever your language of choice may be) can't work in. (And I'm far too opinionated for my own good) later Lux -- John Luxford Simian Systems w: www.simian.ca e: [EMAIL PROTECTED] p: 204.946.5955 -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is this a missing feature?
What's this ruby? Care to send the list a URL so we can go have a look for ourselves? Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "Lux" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, February 05, 2001 10:51 AM Subject: Re: [PHP] Is this a missing feature? > > But the feature is useless :) > > Here, I removed the reference, so we can stop fussing over it (it wasn't the > question to begin with), and here's an example of a potential use for this > (a stupid example, but still...). I'm not weighing out the benefits of > references, I'm striving to achieve the cleanest and most elegant code I > can, because the larger the project, the more code you have to read, and > the uglier it can get. > > That's where a language like Ruby excels. There's less syntactical crap, > it's very easy to read, and it's caused me to consider switching to eRuby > (like mod_perl, allows <% ruby this, ruby that %> in your html) because it > is structurally easier and more geared towards larger projects. > > (that last statement will probably get me murdered on a PHP list) > > But honestly, the only problem is finding a host running eRuby that I don't > have to maintain myself. I'm lazy, after all. > > later, > > lux > > > function a ($hash, $text = "") { >$attr_text = ""; >while (list ($k, $v) = each ($hash)) { > $attr_text .= " $k=\"$v\""; >} >return "$text"; > } > > function img ($hash) { >$attr_text = ""; >while (list ($k, $v) = each ($hash)) { > $attr_text .= " $k=\"$v\""; >} >return ""; > } > > // works this way > > $attrs = array ( >"href" => "http://www.google.com/", >"target" => "_blank" > ); > echo a ($attrs, "Visit Google!"); > > echo "\n\n"; > > // also this way (thanx teodor!) > > echo a ($attrs = array ( > "href" => "http://www.google.com/", > "target" => "_blank" > ), "Visit Google!"); > > // ideally, i'd like to say this though... > // echo a (["href" => "http://www.google.com/", "target" => > "_blank"], "Visit Google!"); > > // what also doesn't work > // echo a (array("href" => "http://www.google.com/", "target" => > "_blank"), "Visit Google!"); > > echo "\n\n"; > > // another example > > echo a ($attrs = array ("href" => "http://www.google.com/"), > img ($attrs = array ( > "src" => "http://www.google.com/images/title_homepage4.gif", > "alt" => "Visit Google!", > "border" => "0") > ) > ); > > /* now ideally, this could be written much more cleanly, perhaps... > > echo a(['href' => [http://www.google.com/'], > img(['src' => > 'http://www.google.com/images/title_homepage4.gif', 'alt' => 'Visit > Google!', 'border' => '0']) > ); > > */ > > ?> > > -- > > John Luxford > Simian Systems > > w: www.simian.ca > e: [EMAIL PROTECTED] > p: 204.946.5955 > > -- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is this a missing feature?
sure here's the ruby page: http://www.ruby-lang.org/ here's another ruby site: http://www.rubycentral.com/ there's also a really good book you can find info about here: http://pragmaticprogrammer.com/ruby/index.html it's not really used much yet anywhere except japan, where it's actually overtaken python in popularity! later lux Josh G wrote: > What's this ruby? Care to send the list a URL so we can go have a > > look for ourselves? > > > > Gfunk - http://www.gfunk007.com/ > > > > I sense much beer in you. Beer leads to intoxication, intoxication to > > hangovers, and hangovers to... suffering. > > > > > > - Original Message - > > From: "Lux" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, February 05, 2001 10:51 AM > > Subject: Re: [PHP] Is this a missing feature? > > > > > > >>> But the feature is useless :) > >> >> Here, I removed the reference, so we can stop fussing over it (it wasn't > > > the > > >> question to begin with), and here's an example of a potential use for this > >> (a stupid example, but still...). I'm not weighing out the benefits of > >> references, I'm striving to achieve the cleanest and most elegant code I > >> can, because the larger the project, the more code you have to read, and > >> the uglier it can get. > >> > >> That's where a language like Ruby excels. There's less syntactical crap, > >> it's very easy to read, and it's caused me to consider switching to eRuby > >> (like mod_perl, allows <% ruby this, ruby that %> in your html) because it > >> is structurally easier and more geared towards larger projects. > >> > >> (that last statement will probably get me murdered on a PHP list) > >> > >> But honestly, the only problem is finding a host running eRuby that I > > > don't > > >> have to maintain myself. I'm lazy, after all. > >> > >> later, > >> > >> lux > >> > >> >> > >> function a ($hash, $text = "") { > >>$attr_text = ""; > >>while (list ($k, $v) = each ($hash)) { > >> $attr_text .= " $k=\"$v\""; > >>} > >>return "$text"; > >> } > >> > >> function img ($hash) { > >>$attr_text = ""; > >>while (list ($k, $v) = each ($hash)) { > >> $attr_text .= " $k=\"$v\""; > >>} > >>return ""; > >> } > >> > >> // works this way > >> > >> $attrs = array ( > >>"href" => "http://www.google.com/", > >>"target" => "_blank" > >> ); > >> echo a ($attrs, "Visit Google!"); > >> > >> echo "\n\n"; > >> > >> // also this way (thanx teodor!) > >> > >> echo a ($attrs = array ( > >> "href" => "http://www.google.com/", > >> "target" => "_blank" > >> ), "Visit Google!"); > >> > >> // ideally, i'd like to say this though... > >> // echo a (["href" => "http://www.google.com/", "target" => >> "_blank"], "Visit Google!"); > >> > >> // what also doesn't work > >> // echo a (array("href" => "http://www.google.com/", "target" => >> "_blank"), "Visit Google!"); > >> > >> echo "\n\n"; > >> > >> // another example > >> > >> echo a ($attrs = array ("href" => "http://www.google.com/"), > >> img ($attrs = array ( > >> "src" => "http://www.google.com/images/title_homepage4.gif", > >> "alt" => "Visit Google!", > >> "border" => "0") > >> ) > >> ); > >> > >> /* now ideally, this could be written much more cleanly, perhaps... > >> > >> echo a(['href' => [http://www.google.com/'], > >> img(['src' => >> 'http://www.google.com/images/title_homepage4.gif', 'alt' => 'Visit > >> Google!', 'border' => '0']) > >> ); > >> > >> */ > >> > >> ?> >> >> -- > >> > >> John Luxford > >> Simian Systems > >> > >> w: www.simian.ca > >> e: [EMAIL PROTECTED] > >> p: 204.946.5955 > >> > >> -- > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> To contact the list administrators, e-mail: [EMAIL PROTECTED] > >> -- John Luxford Simian Systems w: www.simian.ca e: [EMAIL PROTECTED] p: 204.946.5955 -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] db paging with MS Sql
Hello Scott, On 04-Feb-01 14:41:58, you wrote: >Has anyone seen a good lession or code example on paging records from MS Sql >7? Say I have 300 records and >want to break them down to 10 per page using [previous | next ] and a list >of page numbers at the bottom. You may want to use Metabase that lets you pick the range of rows that are returned by a SELECT query. It works not only with Microsoft SQL server but also many other databases supported by PHP. http://phpclasses.UpperDesign.com/browse.html/package/20 You may also want to try this query result table display class that displays select query result rows in HTML tables and may generate automatically links to move go to the Previous, Next, First, Last or any other page of query results. http://phpclasses.UpperDesign.com/browse.html/package/130 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is this a missing feature?
On Monday 05 February 2001 00:51, Lux wrote: > > But the feature is useless :) > function a ($hash, $text = "") { >$attr_text = ""; >while (list ($k, $v) = each ($hash)) { > $attr_text .= " $k=\"$v\""; >} >return "$text"; > } > // what also doesn't work > // echo a (array("href" => "http://www.google.com/", "target" => > "_blank"), "Visit Google!"); Works fine for me, sorry (php 4.0.4) > // another example > > echo a ($attrs = array ("href" => "http://www.google.com/"), > img ($attrs = array ( > "src" => > "http://www.google.com/images/title_homepage4.gif", "alt" => "Visit > Google!", > "border" => "0") > ) > ); works, rewritten to echo a (array ("href" => "http://www.google.com/"), img (array ( "src" => "http://www.google.com/images/title_homepage4.gif", "alt" => "Visit Google!", "border" => "0") ) ); > /* now ideally, this could be written much more cleanly, perhaps... > > echo a(['href' => [http://www.google.com/'], > img(['src' => > 'http://www.google.com/images/title_homepage4.gif', 'alt' => 'Visit > Google!', 'border' => '0']) > ); > > */ So it basically boils down to "array (a => b)" versus "[a => b]" And I personally feel the array () notation is at least as nice as the [] one. Well, it's a matter of taste. But it certainly isn't harder to read, not detrimental on cleanness and elegance of the code. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka", but "That's funny..." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] db paging with MS Sql
AFAIK this is more of a SQL thing than a DB specific thing. Just look up the LIMIT equivilent in MS SQL (should just be LIMIT) and use that for paging, once you get the hang of it it's quite easy. You can look through my paging class at www.miester.org/software - it goes one deeper and does [ prev ] [1] [2] [3] [ next ] and then only shows X ammount of pages so when you get to page 10 it would show [9] [10] [11] Hope that helps. --Joe On Sun, Feb 04, 2001 at 10:02:06PM -0300, Manuel Lemos wrote: > Hello Scott, > > On 04-Feb-01 14:41:58, you wrote: > > >Has anyone seen a good lession or code example on paging records from MS Sql > >7? Say I have 300 records and > >want to break them down to 10 per page using [previous | next ] and a list > >of page numbers at the bottom. > > You may want to use Metabase that lets you pick the range of rows that are > returned by a SELECT query. It works not only with Microsoft SQL server > but also many other databases supported by PHP. > > http://phpclasses.UpperDesign.com/browse.html/package/20 > > > You may also want to try this query result table display class that displays > select query result rows in HTML tables and may generate automatically links > to move go to the Previous, Next, First, Last or any other page of query > results. > > http://phpclasses.UpperDesign.com/browse.html/package/130 > > > Regards, > Manuel Lemos > > Web Programming Components using PHP Classes. > Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] > -- > E-mail: [EMAIL PROTECTED] > URL: http://www.mlemos.e-na.net/ > PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp > -- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- --- Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] db paging with MS Sql
AFAICT there is no 'LIMIT' feature in MS SQL products (TOP and supposedly BOTTOM, but BOTTOM has never worked for me and TOP doesn't seem to work on all versions). How is metabase handling this? Pulling everything, looping thru, and only returning the requested rows? Yes, I could log in/download/uncompile and spend the next 20 minutes finding it for myself, but I'm in the midst of work! ;) And getting and explanation from the horse's mouth might be more instructive anyway. !!! Manuel Lemos wrote: > Hello Scott, > > On 04-Feb-01 14:41:58, you wrote: > > >Has anyone seen a good lession or code example on paging records from MS Sql > >7? Say I have 300 records and > >want to break them down to 10 per page using [previous | next ] and a list > >of page numbers at the bottom. > > You may want to use Metabase that lets you pick the range of rows that are > returned by a SELECT query. It works not only with Microsoft SQL server > but also many other databases supported by PHP. > > http://phpclasses.UpperDesign.com/browse.html/package/20 > > You may also want to try this query result table display class that displays > select query result rows in HTML tables and may generate automatically links > to move go to the Previous, Next, First, Last or any other page of query > results. > > http://phpclasses.UpperDesign.com/browse.html/package/130 > > Regards, > Manuel Lemos > > Web Programming Components using PHP Classes. > Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] > -- > E-mail: [EMAIL PROTECTED] > URL: http://www.mlemos.e-na.net/ > PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp > -- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is this a missing feature?
I should check my version then... =O) lux Christian Reiniger wrote: > On Monday 05 February 2001 00:51, Lux wrote: > > >>> But the feature is useless :) > >> > >> function a ($hash, $text = "") { > >>$attr_text = ""; > >>while (list ($k, $v) = each ($hash)) { > >> $attr_text .= " $k=\"$v\""; > >>} > >>return "$text"; > >> } > > > >> // what also doesn't work > >> // echo a (array("href" => "http://www.google.com/", "target" => >> "_blank"), "Visit Google!"); > > > > Works fine for me, sorry (php 4.0.4) > > > > > > >> // another example > >> > >> echo a ($attrs = array ("href" => "http://www.google.com/"), > >> img ($attrs = array ( > >> "src" => >> "http://www.google.com/images/title_homepage4.gif", "alt" => "Visit > >> Google!", > >> "border" => "0") > >> ) > >> ); > > > > works, rewritten to > > echo a (array ("href" => "http://www.google.com/"), > > img (array ( > > "src" => "http://www.google.com/images/title_homepage4.gif", > > "alt" => "Visit Google!", > > "border" => "0") > > ) > >); > > > > > > >> /* now ideally, this could be written much more cleanly, perhaps... > >> > >> echo a(['href' => [http://www.google.com/'], > >> img(['src' => >> 'http://www.google.com/images/title_homepage4.gif', 'alt' => 'Visit > >> Google!', 'border' => '0']) > >> ); > >> > >> */ > > > > > So it basically boils down to "array (a => b)" versus "[a => b]" > > And I personally feel the array () notation is at least as nice as the [] > > one. Well, it's a matter of taste. But it certainly isn't harder to read, > > not detrimental on cleanness and elegance of the code. -- John Luxford Simian Systems w: www.simian.ca e: [EMAIL PROTECTED] p: 204.946.5955 -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] reload help!!!
Wen Ni Leong wrote: > > Can you please explain more detail because I'm new in Javascript and > PHP? How should I write my coding in order to target the parent > window? I am trying so many ways but I'm still can't manage to do it. > > Please help me again. > > This is in Parent window. The delete buttons are looping buttons. > > Delete button in parent window > print " value=\"del\" > >onclick=\"NewWin=window.open('URL?count=$count&doc_var=$doc_var&doc_no=$doc_no&doc_rev=$doc_rev&flow_no=$flow_no','NewWin','toolbar=no,status=no,scrollbars=yes,width=400,height=200')\">\n"; > > # > In child window have two delete buttons: > > ### > function delopt() > ### > { > global $h,$newbutton,$doc_var,$count,$doc_no,$doc_rev,$flow_no; > > $db = mysql_select_db("tkenet_db"); > > print " > > PMP Document Approval > > \n"; > print " \n"; > print "function confirm_del() >{ > if(confirm('Are you sure you want to delete!')) >{self.location.href=\"URL\"} >else > {return false;} > > }\n"; > print "\n"; > > print" action=\"newwin.php\" onSubmit=\"return confirm_del(); window.close\"> > > Delete Option > > >Delete Link = Delete the document number in the textbox >Delete All = Delete the document number in all tables > > > Link\"> > > > > > > > > > > \n"; > } > > > > John Luxford wrote: > > > > Could you not just set the target in the new window form to the name of > > the parent window, and use an onsubmit="window.close ()" to lose the > > popup as well? > > > > Lux > > > > Wen Ni Leong wrote: > > > > > I am not sure whether this is related to PHP. I'm using PHP and > > > > > > Javascript to do my program. > > > > > > I have some problem with my reloading parent window. > > > > > > > > > > > > In my program, I have a delete button which will pop up a child window > > > > > > once the user clicked the button. In the child window will have two > > > > > > option of delete buttons. > > > > > > Once the user clicked either one button, i want the child window to be > > > > > > close and at the same time the parent window will reload. How should I > > > > > > do this. > > > > > > Please give some advise or tips to me. > > > > > > > > > > > > thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] I should apologize
Lux wrote: > I don't mean to bash php in any way (as in the Ruby plugs in my last > post). I use it because it has so many advantages over other more > system-oriented not web-oriented languages for this type of work. It's > fantastic. > Yes it is. :) > > I see so much enthusiasm on the web for this language, a significant > codebase, feature list (I'm not sure, but does ASP generate SWF files, > PDF files, support IMAP, etc), and it has a lot of great developers > dedicated to it. To be fair, PHP doesn't either. You have to get the packages, compile them, and dl() or compile them into your PHP. Most, if not all, of the capabilities of PHP can be had in ASP, through third party objects. Major problem is cost for most people. > But we need to be constantly self-critical, or we > won't see areas we can improve in. > > I also feel it's good to know more than one language, so you get more > than one approach and you're more adaptable to situations that PHP (or > whatever your language of choice may be) can't work in. > WRT web programming, there's probably very little that PHP *can't* do, but your point is still well taken. > > (And I'm far too opinionated for my own good) No problem. :) Speaking of "other languages" - anyone have any input or comments on REBOL? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP hosting - the final frontier.
I agree, point taken... Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 - Original Message - From: "Christian Reiniger" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Sunday, February 04, 2001 4:37 PM Subject: Re: [PHP] PHP hosting - the final frontier. On Sunday 04 February 2001 23:18, Robert Covell wrote: > I understand your concerns, but with this type of logic this mailing > list not not be around. Niether would Linux, Apache, MySql or anyother > open source tool that so many people utilize today. We would all be on > NT instead of Linux and using IIS with ASP instead of PHP. Do think > Ramsus when he started out on PHP/FI was thinking I am only one person > I shouldn't even try to make it because the big guys are more reliable. That's comparing apples to oranges. If all of Rasmus's computers fail while he's on holiday for 3 weeks, who cares? (Sorry Rasmus :) If some machine at a hosting company shows glitches while the only admin is sick, things will be very bad for the hosted people/companies. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka", but "That's funny..." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Learning MySQL
I agree. It's a great reference & learning guide, but you _have_ to be patient and not skip around too much with it or it'll be quite intimidating. --Toby [EMAIL PROTECTED] wrote: > > On Sun, Feb 04, 2001 at 05:06:02PM -0600, Jeff Oien wrote: > > What would your advice be for learning MySQL with PHP on an > > Apache server? I know a little Perl and am beginning to learn PHP. > > I'm more of a designer than a programmer (not enough geek genes). > > I went through the tutorial at WebMonkey and have it all installed > > and working, but the tutorial isn't able to go in depth about the > > basic functions of MySQL. Is this something better learned from > > a book? Suggestions for books and/or tutorials online would be > > appreciated. > > Read the book from Paul DuBois about MySQL. You can find this book at the > end of http://php.net/books.php > > -Egon > > -- > http://www.linuxtag.de/ > http://php.net/books.php > http://www.concert-band.de/ > http://www.php-buch.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]
Re: [PHP] db paging with MS Sql
Hello Michael, On 04-Feb-01 21:23:26, you wrote: >AFAICT there is no 'LIMIT' feature in MS SQL products (TOP and supposedly >BOTTOM, but BOTTOM has never worked for me and TOP doesn't seem to work on >all versions). >How is metabase handling this? Pulling everything, looping thru, and only >returning the requested rows? No, Metabase use server side cursors. It just seeks for the first row that it is requested and starts fetching rows from there. It works on MS SQL 6.5 on which the TOP clause is not available. >Yes, I could log in/download/uncompile and spend the next 20 minutes finding >it for myself, but I'm in the midst of work! ;) And getting and explanation >from the horse's mouth might be more instructive anyway. !!! :-) Ok, now that you got your explanation you may download Metabase to look in for the details. http://phpclasses.UpperDesign.com/browse.html/package/20 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]