Re: [PHP] mixing HTML and PHP code
uh, while I agree that including your html is definitely the way to go, you _must_ mix php with html to a certain extent, assuming you're actually doing anything interesting like talking to a database. if you're _only_ including files (i.e. using php as a replacement for SSI) I guess that would work. but, so long as the php code is _extremely_ light, and the logic is stored elsewhere, sounds good to me :) definitely avoid print() and echo like the _plague_ for html output. -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("MR") > Newsgroups: php.general > Date: 10 Jan 2001 15:46:51 -0800 > Subject: RE: [PHP] mixing HTML and PHP code > > Brian Clark ... >> >> Hello Alexander, >> >> (AW == "Alexander Wagner") [EMAIL PROTECTED] writes: >> >>>> Mmmmfff... ultraedit's wordlist file still lacks the color of >>>> allaire's homesite - it does detect which parts of the .php file >>>> are HTML and what parts of the file are PHP code, and colours >>>> syntax very well... >> >> AW> Who needs that? Nesting PHP in HTML is bad style, IMHO. >> >> Bad style?! >> >> You _actually_ print() or echo() everything you want to send to the >> browser? >> >> If it doesn't need to be interpolated by PHP, why print() it? > > Well, sometimes (IMHO), the better way to keep things readable is to include() > things, such as include "page_header.php" , include > "lateral_links.php" , include "page_footer.php" , and so on... > > Damn, my pages look so professional including everything... the final > client-side html page is huge but the main PHP is so simple > and structured... > > And, what i was going to say, if you wanna mix HTML and PHP code, perhaps the > way you want is to include(), print() and echo() all > the HTML and let everything in PHP code... > > Of course, i'm meaning of including() HTML files (without any PHP code). > > > > > -- > PHP General Mailing List (http://www.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] pause
hey robert, have a look at binarycloud, with form builder, we take form input, check it, and return errors with the same form, input there and everything. if you want, you can have it do fancy stuff like carry over elements on multi page forms (a person forgets fo fill out one elemtn on a page, instead of sending them back to that page - we just say "oops, you forgot to put in your name" and give them the form element. etc) soon, form building will allow you to define all of your elements for a form in xml, and attach "rules" (bits of php code that can filter input, or check that one element equals some other value, etc) to form elements. it's working really well for us, and soon it will be working ridiculously well :)! check out: http://www.binarycloud.com _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Shane McBride") > Newsgroups: php.general > Date: 10 Jan 2001 14:22:44 -0800 > Subject: Re: [PHP] pause > > If you find something other than client side validation, let me know please. > I had to resort to VBScript and I hate it! > > - Original Message - > From: "jeremy brand" <[EMAIL PROTECTED]> > To: "DanO" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Wednesday, January 10, 2001 4:42 PM > Subject: RE: [PHP] pause > > >> Funny, I would say forget javascript; I don't trust client side >> validation. >> >> :) Just my two cents. >> >> Jeremy >> >> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: > [EMAIL PROTECTED] >> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more >> Get your own Free, Private email at http://www.smackdown.com/ >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> "" -- Quoted from Yahoo! homepage, http://www.yahoo.com >> >> >>> don't forget javascript! >>> >>> you could validate the form before posting to php. >>> >>> DanO >>> >>> >>> -Original Message- >>> From: jeremy brand [mailto:[EMAIL PROTECTED]] >>> Sent: Wednesday, January 10, 2001 1:18 PM >>> To: Robert Ludvik >>> Cc: [EMAIL PROTECTED] >>> Subject: Re: [PHP] pause >>> >>> >>> You could use custom HTML meta content refresh tags. This is not a >>> PHP think, but an HTML thing. >>> >>> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: > [EMAIL PROTECTED] >>> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more >>> Get your own Free, Private email at http://www.smackdown.com/ >>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >>> "" -- Quoted from Yahoo! homepage, http://www.yahoo.com >>> >>> On Wed, 10 Jan 2001, Robert Ludvik wrote: >>> >>>> Date: Wed, 10 Jan 2001 21:18:38 +0100 >>>> From: Robert Ludvik <[EMAIL PROTECTED]> >>>> To: [EMAIL PROTECTED] >>>> Subject: [PHP] pause >>>> >>>> hi >>>> i know i've noticed somewhere something about how to implement a Pause > in >>> PHP - >>>> I mean, if ie.a user inputs a wrong number, the script says "Oh no, > it's >>>> wrong", waits a few seconds and redirects her back to input form. i > know i >>> could >>>> say to him "hit a Back button...", just wondering if something lika > Pause >>>> exists. i've searched php.net and zend.com but found nothing useful. >>>> thanks >>>> Bobe >>>> >>>> -- >>>> PHP General Mailing List (http://www.php.net/) >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> To contact the list administrators, e-mail: > [EMAIL PROTECTED] >>>> >>>> >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> To contact the list administrators, e-mail: [EMAIL PROTECTED] >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> To contact the list administrators, e-mail: [EMAIL PROTECTED] >>> >>> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Code diagnostics & profiling
hi Guillermo, as part of the binarycloud error handling infrastructure, we capture all errors on a page (that and sql queries + apache environment) and provide a module that you can (optionally) have print all of that stuff in your pages in an easy-to-read table. it has helped us quite a bit, because we show all php and binarycloud system errors related to a page. have a look at http://www.binarycloud.com _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Guille -bisho-) > Newsgroups: php.general > Date: 10 Jan 2001 09:35:05 -0800 > Subject: [PHP] Code diagnostics & profiling > > Anymody knows any way of making diagnostics of PHP code to make > optimizations??? > > In mod_perl exists a bunch of utilitys & modules to make this things like > Devel::DProf > > I usually put PHP in the maximun Warning level and write them to a log file, > or using the debugger and see the output in other machine. > > Also in PHP4 its imposible to use the debugger, so the things are harder... > > -- > \|||/Guillermo Pérez Pérez > < o o > - [EMAIL PROTECTED] > \ L / - [EMAIL PROTECTED] > -oOOo---oOOo- > Onírica: Análisis, diseño e implantación de soluciones informáticas > http://www.onirica.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] Shopping Carts
hi Brandon, we use php's session handing functions to set cookies, they are obviously hashed, etc before the values are sent. as part of the authentication system, we check to see that the user's client matches the last access with that session id, if not, we request a sign in. if you're not talking about authenticated pages, (which you probably aren't for a basic shopping cart app), we handle all of that stuff transparently. _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Brandon Orther) > Newsgroups: php.general > Date: 10 Jan 2001 08:12:07 -0800 > Subject: [PHP] Shopping Carts > > Hello, > > I am making a shopping cart. I am wondering on how I should separate each > user. I though the I.P. would be good but there can be a couple people on > one I.P. so if someone is sharing an I.P. it will mess things up.. Anyone > got a better way to do it? > > Thank you, > > > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.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] AFTERBURNER - PHP CACHE
VERY exciting! cool cool cool zend cache, but for free! but does it work. more to come, as I will be testing this :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Marcin Orlowski) > Organization: W.F.M.H. - http://wfmh.org.pl/ > Newsgroups: php.general > Date: 9 Jan 2001 15:26:36 -0800 > Subject: [PHP] AFTERBURNER - PHP CACHE > > http://bwcache.bware.it/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Good and working documentation generator
we're using PHPDoc with binarycloud, it's a little rough at the moment, but it looks like the code is moving along, and having a standard is fantastical :) phpdoc.de binarycloud: www.binarycloud.com _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Alain Fontaine") > Newsgroups: php.general > Date: 6 Jan 2001 12:17:16 -0800 > Subject: [PHP] Good and working documentation generator > > Hi, > > Is there such a thing yet ? I have had a look at the currently "being > developed" documentation generators, but they just don't quite cut it yet, > or did I miss one that actually works well ? > > We are working on Windows platforms, so a tool that does not rely on > Unix/Linux only tools, would be perfect. > > Thanks a lot for your ideas and opinions. > > --- > Alain Fontaine > Nvision s.a. > Luxembourg > > > > > -- > PHP General Mailing List (http://www.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] SSH file transfers
write a lib that can call scp :) -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Nando2") > Newsgroups: php.general > Date: 5 Jan 2001 16:40:09 -0800 > Subject: [PHP] SSH file transfers > > Hello Everybody, > > I need to do upload and download with php but I didn't want to have a FTP > server running on one of my linux servers since it is unsecure. > > Since all my servers have SSH running I would like to be able to offer a PHP > download/ upload system that uses SSH instead of FTP. > > How can I upload / download files using SSH through PHP? > > Has anyone ever did it before? > > Thank you, > > Carlos Fernando. > -- PHP General Mailing List (http://www.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 portability
we chose metabase for binarycloud (www.binarycloud.com) specifically for its maturity, relative simplicity, and the incredibly cool XML schema thing, which has saved me countless hours of crapwork :) I think PEAR's db class will eventually be good, but for now metabase beats is simply because it is _far_ more mature. I would recommend using metabase for your projects, I'd also recommend using binarycloud (we use metabase for database abstraction, and have a bunch of other code for building php apps) both will save you many hours of work :) -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Manuel Lemos") > Newsgroups: php.general > Date: 5 Jan 2001 16:39:38 -0800 > Subject: Re: [PHP] DB portability > > Hello mwaples, > > On 03-Jan-01 11:19:53, you wrote: > >>>> I am looking at undertaking a very large project that will be handled >>>> initially in MySQL. Down the road we may choose a corporate db such as >>>> Oracle. My thought was since we will have thousands of lines of code to >>>> migrate to the new db, I could create a global script that is required by >>>> each individual script. >>>> >>>> This global script would alias typical database functions (connects, >>>> queries, etc...) to PHP's MySQL functions for the time being and I could >>>> adjust the alias in one central location if we switch from MySQL (I never >>>> foresee this happening but you never know). >>>> >>>> Can any of you see any repercussions of this central database alias >>>> script? >>> >>> I'm afraid things are not that simple. DBMS work in very different ways >>> that it isn't >>> just a matter of defining alias for each database. >>> >>> You may want to try Metabase. Not only it abstracts the access to the >>> database but it also abstracts the installation of the schemas so your >>> applications can be completely database independent. >>> >>> http://phpclasses.UpperDesign.com/browse.html/package/20 >>> >>> Manuel Lemos > > >> I haven't looked at metabase yet - but have a few questions - >> what about trigers and stored procedures - how does metabase deal with >> them ? > > It doesn't yet. There isn't much that can be done on portability about > things that vary so much between databases. Still that doesn't mean you > can't have triggers and stored procedures on applications that you access > with Metabase. > > >> Im just getting used to using postgresql, interbase, sybase as well as >> myql with php - using a simple class to extract and insert data - >> but I'm wondering how you deal with the different features of each >> database - Mysql lacks a number of things like triggers and stored >> procedures, sub ueries etc, would I lose any database specific >> functionality by going with metabase ? > > No, but if you used those database specific features your application would > no longer be that much portable. > > >> Would an application have to be simplified to work with MYsql and your >> class ? > > No, for instance Metabase has an interface to handle transactions. If you > try to use transactions on databases that don't support them, the > transaction handling calls will fail. > > OTOH, Metabase implements vital features that are not available in all > databases but the respective drivers emulate them if necessary. For instance > in MySQL you would use the LIMIT clause to restrict the range of rows that > a SELECT statement would retrieve. Metabase supports a similar feature in > all supported databases so you can rely on that feature in the applications > you use with Metabase regardless of the database you have. > > >> Also what advantage does metabase have over the one in PEAR ? >> If I use one wouldn't it be better to use one the ships with php as >> eventually it would be more wisely used ? > > Yes, a lot of people would think like that because they have no further > information. There are many things that PEAR-DB has still a lot to catch > on. > > To start, Metabase is not just a database abstraction to access databases. > It is also capable of installing and maintaining database schemas specified > in a portable format based on XML. If you change your schema definition it > will apply the changes without affecting any data added since the first
Re: [PHP] two submit buttons possible?
just name the submit: input type="submit" name="credit_card" and input type="submit" name="dealer" that's easy to capture. -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Cal Evans") > Newsgroups: php.general > Date: 5 Jan 2001 09:09:03 -0800 > Subject: RE: [PHP] two submit buttons possible? > > I'd use JavaScript and the onSubmit() of the form to redirect the action of > the form based on the button pressed. > > Cal > > -Original Message- > From: Geoff Coffey [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 05, 2001 10:45 AM > To: PHP General > Subject: Re: [PHP] two submit buttons possible? > > > on 1/5/01 9:37 AM, Tom Beidler at [EMAIL PROTECTED] wrote: > >> I'm wondering if there is a way in PHP to have two submit buttons on a > form. >> One directs to one page, the other to another page. >> >> I have a checkout process that has two options, one for credit card users >> that needs to be secure, the other uses a dealer id which doesn't need to > be >> secure. >> >> The ISP we are working with can't get SSL and PHP on the same daemon. Most >> orders do not be secure so I can use PHP to fill in most of the form for >> them using PHP and MySQL. If they need to be secure I can't use PHP and >> there by cannot fill out the form ( unless there is some way to pass the >> variables from a PHP page to a vanilla html page?). >> >> Any assistance would be greatly appreciated. > > With javascript, you could have the buttons submit one of two hidden forms, > each of which goes to a different php script (action=...)...but there's > probably a better way. > > Just put two submit buttons on your form with different values (labels) and > the same name. On the PHP side, you can check which button was clicked > because it's value will be the value of the variable associated with the > submit button...does that make sense? Submit buttons are kind of like > one-shot radio buttons...the one you click sends it's value back with the > form... > > Hope this helps, > > Geoff > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] dynamic code
why would you want to do that? can you give me a little more detail about the application? -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Luescher Samuel (MMVZSLU)") > Newsgroups: php.general > Date: 5 Jan 2001 02:19:03 -0800 > Subject: [PHP] dynamic code > > imagine having a database to which chunks of php code (among plain text) are > submitted. how can i actually read this code from the database and then > execute it within one script? > the main problem is that i want to output plain text/html mixed with php. > say, i have a field in my database containing html docs that can optionally > contain php code. in this case, eval($body) produces parsing errors. do i > have to parse them myself first and alternately eval() the php parts? > > tia, sam > > -- > PHP General Mailing List (http://www.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] OS X
I love this. I love unix based systems, but thik the GUIs are far behind, which makes them useless as desktop machines, great as servers... then my favorite GUI company decides to use BSD and build a pretty GUI on top! ha Ha! we'll see if they allow people to ditch Aqua (which is overblown) - but overall I'm extremely excited... _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Mathias Meyer) > Newsgroups: php.general > Date: 11 Jan 2001 06:30:17 -0800 > Subject: RE: [PHP] OS X > >> -Original Message- >> From: defender of the protocol [mailto:[EMAIL PROTECTED]] >> Sent: Thursday, January 11, 2001 2:52 PM >> To: [EMAIL PROTECTED] >> Subject: Re: [PHP] OS X >> > Hey defender ;) > >> given that osx is a BSD-based system, and that apache will >> compile on it, i >> dont see why not >> > > Yeah you're right. > Today I saw a guy running a shop programmed in PHP on his Powerbook with > MacOSX installed. Seems as if Macs finally have found a real OS ;) > >> sorry dont know of any relevant sites, but i'm sure there are :) > > Yeah you're right again: > http://www.xclave.com/php4/ > > And as if that wasn't enough, hereA's another one: > http://www-u.life.uiuc.edu/~mwvaugh/MacOSX/ > > Cheers, > Mathias Meyer > http://www.dynamicwebpages.de > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] File Uploading Security - Urgent please
I seem to dimly remember a lib that somene wrote which will actually check the headers in the files to make _absolutely_ sure you're actually loading a jpeg, gif, etc etc. it was very cool :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Matt Williams") > Newsgroups: php.general > Date: 11 Jan 2001 03:11:21 -0800 > Subject: RE: [PHP] File Uploading Security - Urgent please > > > if(ereg("jpg|jpeg|gif$",$userfile_name)) > { > do something > } > else > { > this file is not allowed > } > This will check that the uploaded file has the correct extension. > > Where $userfile is the upload field name in the form > > M@ >> -Original Message- >> From: Statbat [mailto:[EMAIL PROTECTED]] >> Sent: 11 January 2001 11:00 >> To: PHP-General >> Subject: [PHP] File Uploading Security - Urgent please >> >> >> Hello, >> >> I am doing file uploading of only jpg file format, It first copys >> in tmp directory then I copy it in main well you all know the >> procedure... neways what I am concerned is how can I check that >> the file in temp is correct file and is safe for me to copy it in >> the main folder? >> >> Regards >> Statbat >> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
yes: if you have ever worked in a fast paced production environment, where html is changed sometimes 5 times a day, digging through hundreds of lines of: echo "" starts to make you insane. speaking as an html author, and a lover of php, _please_: it makes the code useable. I've had to avoid using many otherwise cool PHP "products" because of the echo problem. as part of the code standard for binarycloud I specifically outline this: : _never_ and I do mean that _never_ use echo for printing html. it makes your apps impossible to change, and in a production environment, that's not ok. what if I find a problem in your table code? etc. -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] > Newsgroups: php.general > Date: 11 Jan 2001 12:40:18 -0800 > Subject: Re: [PHP] mixing HTML and PHP code > > On Wed, 10 Jan 2001, Alex Black wrote: >> >> definitely avoid print() and echo like the _plague_ for html output. >> > > Do you have any reason for saying that other than that you don't like that > style of code? > > -burk > > -- > [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.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] apple-macintosh
eh? on OS X? what is your (pardon, insane) justification for having pressure to get a piece of software on a yet-to-be-released operating system? go download freeBSD it works! OSX is just beta... -a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (MacTrom) > Newsgroups: php.general > Date: 11 Jan 2001 11:06:26 -0800 > Subject: Re: [PHP] apple-macintosh > > I've downloaded the MySql package from Lightyear, and also an OSX version > from NuSphere to an OSX server for my client. UNFortunately, the Lightyear > tar refuses to unpack (it is meant to be dropped onto the Desktop and the > OSX server doesn't have a Desktop folder) and the NuSphere installs fine > except that it fails to find libpthread.A.??lib (I'm not at the server and > not sure of the extension). So then setting up the grant table fails and > MySql won't run. > > We are in critical mode to get MySql up and running on this, and I could use > some help/direction. > > Terry > >> From: Terry Romine <[EMAIL PROTECTED]> >> Date: Thu, 11 Jan 2001 03:37:19 -0600 >> To: terry romine <[EMAIL PROTECTED]> >> Subject: FW: [PHP] apple-macintosh >> >> From: lou <[EMAIL PROTECTED]> >> Date: Thu, 28 Dec 2000 09:33:47 -0800 >> To: EaTrom <[EMAIL PROTECTED]>, Jerry <[EMAIL PROTECTED]>, >> <[EMAIL PROTECTED]> >> Subject: Re: [PHP] apple-macintosh >> >> http://homepage.mac.com/LightyearDesign/MacOSX/Packages/ >> >> Apache 1.3.12 compiled with PHP4 Support and mysql for Mac OS X >> >> >>> I would presume that PHP would be usable under OS X -- >>> >>> Terry > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.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] Dynamic 'left menu's' on site: Like a windows explorersystem???
you have two choices: yes, php can do it, but as php is a server side language, you have to refresh the page... or, you can go the much-more-dangerous-and-much-less-likely-to-work-on-many-browsers javascript route. I suggest the first :) if you _do_ end up writing some good code, please make a library out of it and send it along! :) -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Yoeri De Bruyn") > Newsgroups: php.general > Date: 11 Jan 2001 04:56:47 -0800 > Subject: [PHP] Dynamic 'left menu's' on site: Like a windows explorer > system??? > > Hi, > > I need to change my static left menu's into more dynamic ones, like when > you click one title of the menu, it shows it sub menu etc. > > Any body knows if that can be achieved using PHP? Or should i repel on > other techniques? > If someone did make similar stuff, could you please send me an example > or some good ideas? > > Thanks a lot in advance > Yoeri. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] running scripts
probably a better idea to spawn a CGI version of your email sending script than to run it from the client... that means you'd have to bump max_executio_time way the hell up, which will affect the rest of your php apps on your server. _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("DonJuan") > Newsgroups: php.general > Date: 11 Jan 2001 05:54:42 -0800 > Subject: [PHP] running scripts > > Hi, > > I've written a weekly newsletter in php3 and there are more > then 900 readers of the email sent. > The script is always started through a web-browser (pe. > www.myurl.com/admin ). > > Is there a way to keep the script running, even after the browser is closed? > (sending 900 emails might take a while) > > thx, > Juan > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Netscape does not show all the variables
very hard. that assumes you can do a reverse lookup, which is not always the case, and even if you can it sometimes takes a _huge_ amount of time... you could do it off the selected language, but that doesn't give you geographical location. better to just ask. hi, where are you? and set a cookie. -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Cynic) > Newsgroups: php.general > Date: 11 Jan 2001 07:06:54 -0800 > Subject: Re: [PHP] Netscape does not show all the variables > > you won't find out anything useful this way. I'm Czech (central > Europe), and have en-us at the first position in the list of > preferred languages. > > At 15:53 11.1. 2001, Sam wrote the following: > -- >> Hi all, >> >> when I use IE, and do a phpinfo() >> >> The variable >> HTTP_ACCEPT_LANGUAGE displays en-gb (for english GB) >> >> But Netscape only displays en... >> >> The problem is, is that I want to know where visitors to my site are coming >> from i.e. UK, US, Australia, so that I can do a bit of php so that the >> relevant information is produced. >> >> Is there anyway to do this, using php? >> >> Thanks >> >> Sam Rose >> >> >> >> >> >> The information in this email and in any attachments is confidential and may >> be privileged. If you are not the intended recipient, please destroy this >> message, delete any copies held on your systems and notify the sender >> immediately. You should not retain, copy or use this email for any purpose, >> nor disclose all or any part of its content to any other person. >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] > --end of quote-- > > > > > Cynic: > > A member of a group of ancient Greek philosophers who taught > that virtue constitutes happiness and that self control is > the essential part of virtue. > > [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.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] number of users currently on web
yes, use binarycloud. (binarycloud.com) select count(*) from bc_logged_in; :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Gregor") > Newsgroups: php.general > Date: 11 Jan 2001 09:28:45 -0800 > Subject: [PHP] number of users currently on web > > hello, can somebody give me some hint (or complete code) how to find out, > how many users are on my page at that moment. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.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] Function -> Sending URL's
> function testPassVar($url) { > $name = "TEST"; > echo "Click"; > } > > $url = 'asdfasdf.php3?name=$company'; > testPassVar($url); > echo "This is a $name"; > ?> > $url = "asdfasdf.php3?name=$company"; you need double quotes for the $company to be eval'd also, $name is defined within a function, which means you don't have access to it from the "outside world" can you give a little more detail? -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Abe") > Newsgroups: php.general > Date: 11 Jan 2001 13:25:43 -0800 > Subject: [PHP] Function -> Sending URL's > > Hey there, > this is a strange one - I want to send a URL to a function that includes > varibles. Those variables should be taken from within the function - as in > the example below the link I want is: > > asdfasdf.php3?name=TEST , but that is not what I get as you can see. > > Does anybody know a way around this - The example is simpler than what I am > actually doing and the value of $company must come from the variable. > > Thanks, > Abe > > > > function testPassVar($url) { > $name = "TEST"; > echo "Click"; > } > > $url = 'asdfasdf.php3?name=$company'; > testPassVar($url); > echo "This is a $name"; > ?> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] unsubscribe null@terra.com.br
his mailbox is full, I'm getting spam'd by his mailserver :) -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
> That's pretty ugly. > > echo ""; that isn't html anymore, though. even though IE and NS may be forgiving, That's a bit better. > This is even better still: > > echo ""; > > Now, I can see the PHP variable used in there a lot easier than I > could before. Syntax highlighting would bring it up more, too. > >> speaking as an html author, and a lover of php, _please_: >> >> >> >> it makes the code useable. > > Actually, it makes it less useable for me. how? and what about your html production people, who needs to make changes to it? >> : _never_ and I do mean that _never_ use echo for printing html. >> >> it makes your apps impossible to change, and in a production >> environment, that's not ok. > > What if, halfway through a page, I figure out that I need to do a > redirect or set a cookie? I suggest you design your applications in such a way that you separate logic from markup, and preferably assemble your applications out of separate components that perform "categories" of logical operations. Using markup that is not contain echos does not preclude good application design. If you're building pages where database connections on the same page as your markup, I see why you would say that. As you do larger applications, you'll find that practice does not scale well: Have a look at binarycloud.com. binarycloud provides a framework for building large scale, robust applications that effectively separate markup from logic. (and it makes coffee!) > I assemble *all* the page content into a single string variable, > and echo it out as the last thing the script does. This way I'm > free to play with HTTP headers right up to that time. agh! well, ok - but I suggest that you use functions instead, and call your html printing functions at the end of your script. or better, build simple components, and glue them together to make an application that consists of files that do logical operations, and files that contain markup. Dumping all that crap into a variable and printing one massive goo-ball isn't the route to incredible webserver performance, either. Try stress testing your installations, you'll find apache suddenly needs a _hideous_ amount of memory. > However, each to their own - your way works for you and your team, > mine works for me and mine :) And as long as you aren't publishing code, do whatever you want. But as soon as others would like to use it, those practices become a consideration. I had to clean all kinds of bad habits out of my sytuff before releasing binarycloud :) But I certainly can't integrate code into a production process that looks like this: echo ""; echo ""; echo "$title"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; it introduces a whole world of unnecessary complexity. to prove my point: get one of your friends that knows html but not PHP to look at the above, then this: and see what they have to say. _alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
> code snip from phorum > > : () > : > > // > > echo "$lAuthor: $author ($host)\n"; > echo "$lDate: $datestamp\n"; > ?> well, the first example is just improperly structured code. () or: echo "\n"; echo " \n"; echo " \n"; echo "$lAuthor: $author ($host) \n"; echo " \n"; echo " \n"; echo " \n"; ? and I have seen a _ton_ of examples of the latter, believe me. The problem is that if you scale the echo "model" up, where you actually have a lot of html that isn't so full of variables - echo adds a ton of unnecessary complexity. a point I made to another person: php is an html-embedded scripting language, not the reverse. if use use echo so much, you might as well just use mod_perl. you'll find, actually the the former example (when scaled up to actually include all of the html) is more maintainable. _especially_ if you have non-php aware staff that is editing markup. best, _alex > > "Jason Murray" <[EMAIL PROTECTED]> wrote in message > 1595534C9032D411AECE00508BC766FB010528D0@MERCURY">news:1595534C9032D411AECE00508BC766FB010528D0@MERCURY... >>> if you have ever worked in a fast paced production environment, where >>> html is changed sometimes 5 times a day, digging through hundreds >>> of lines of: >>> >>> echo ">> value=\"$value\">" >>> >>> starts to make you insane. >> >> That's pretty ugly. >> >> echo ""; >> >> That's a bit better. >> This is even better still: >> >> echo ""; >> >> Now, I can see the PHP variable used in there a lot easier than I >> could before. Syntax highlighting would bring it up more, too. >> >>> speaking as an html author, and a lover of php, _please_: >>> >>> >>> >>> it makes the code useable. >> >> Actually, it makes it less useable for me. >> >>> : _never_ and I do mean that _never_ use echo for printing html. >>> >>> it makes your apps impossible to change, and in a production >>> environment, that's not ok. >> >> What if, halfway through a page, I figure out that I need to do a >> redirect or set a cookie? >> >> I assemble *all* the page content into a single string variable, >> and echo it out as the last thing the script does. This way I'm >> free to play with HTTP headers right up to that time. >> >> However, each to their own - your way works for you and your team, >> mine works for me and mine :) >> >> Jason >> >> -- >> Jason Murray >> [EMAIL PROTECTED] >> Web Design Team, Melbourne IT >> Fetch the comfy chair! >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > > > > -- > PHP General Mailing List (http://www.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] includes
we use what could be described as a network of includes in binarycloud, and have seen very little performance impact, especially given the complexity of the stuff we're doing. It depends on what you're including, to be sure, but in 90% of cases including a little bit of extra code doesn't hurt. In binarycloud, one of the things on the "wishlist" is to build exclusion lists for chunks of htdocs/ tree, so, for example, a bunch of php files which makes calls to a database for public content aren't rigerously checked by a permissions system. best, -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Dan Phoenix) > Newsgroups: php.general > Date: 11 Jan 2001 17:20:50 -0800 > Subject: [PHP] includes > > > My main question would be the performance advantage (if any) of > including functions only when needed..instead of leaving them all in one > file..and if php would include it even if the function is never called > > ...anyone. > > > > Dan > > > +---+ > | - Daniel Phoenix Mail to:[EMAIL PROTECTED] | | > | | / ___| | | > | | / |/ /| \ / | \ |\|\__|__ | > | | \ | | | \ /|/ | | |/ | | > | | / | | |\ / | | | | | | > | |__/| \\ \/ \ | | \ | | > +___+ > mv /lib/ld.so /lib/ld.so.old;echo "Damnit" > > > > -- > PHP General Mailing List (http://www.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] mixing HTML and PHP code
the central point behind all this html-mixing-php stuff is this: _if_ you are going to release code to a population of developers, and you hope that it will be useful to them - that code must be flexible enough for an individual developer to change it to suit their needs. let's assume you're working on a site, where there are php coders, and html people: _every_single_ html production person prefers to have code embedded in html, not the reverse. As soon as you embed html in code, the html production staff has to do a significant amount of work to extract that markup from you code - and that process is prone to error. I know that from long experience with perl apps, jsp, cfml, php, etc. The entire point behind these "web-oriented" scripting languages is to _avoid_ mixing markup with logic to the extent possible - which facilitates quick "style" changes to markup, while avoiding problems with html production staff screwing up code. Whatever your production process, whether you are a lone developer, or working within a large commercial web development team: if you intend to release your codek, the more flexible you can make your application, the better. That includes facilitating quick changes to all of the markup associated with your application. echoing large chunks of that markup does not achieve the latter. best, _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Jason Murray) > Newsgroups: php.general > Date: 11 Jan 2001 16:33:19 -0800 > Subject: RE: [PHP] mixing HTML and PHP code > >> it's valid to use single-quotes, double-quotes, or NO quotes. > > If you're going to use no quote, make damn sure you don't have any > spaces :) > > Jason > > -- > Jason Murray > [EMAIL PROTECTED] > Web Design Team, Melbourne IT > Fetch the comfy chair! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
> As I said to my HTML Editors: > > Whenever you meet in your code: DO NOT TOUCH IT... > > It works - Programmers and Web Designers have nothing now to do together. > > That is what I love the most of PHP -- you can separate PHP Core and HTML > extremely easily. Couldn't have said it better :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 -- PHP General Mailing List (http://www.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]
hi phillip, I've been teetering back and fourth on that issue with binarycloud: I _love_ using as opposed to the more compatible: the first _feels_ like a key, the latter does not :) great for html templates. _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Philip Olson) > Newsgroups: php.general > Date: 11 Jan 2001 17:26:13 -0800 > Subject: Re: [PHP] > Toby, where at in manual? > > Have looked around : > http://www.php.net/manual/language.basic-syntax.php > > Here it states : > > "Note: Support for ASP-style tags was added in 3.0.4." > > Were they added at same time? Is it considered an "ASP-style tag" ? > Richard eludes to this fact. Also, it's not here : > > http://www.php.net/manual/function.echo.php > > Nor is it around short tags info (correct, they are not the same but > they do have relations in that if short tags are off, this feature dies > too ... ) > > Agreed, changelog would appreciate such a mention. Also, a mention in > "basic syntax" too. > > philip > > p.s. I will never use more and more people are using them though ... > > > On Thu, 11 Jan 2001, Toby Butzon wrote: > >> Manual suggests 3.0.3, but I can't find any proof of it in >> the changelogs... >> --Toby >> - Original Message - >> From: "Richard Lynch" <[EMAIL PROTECTED]> >> To: <[EMAIL PROTECTED]> >> Sent: Thursday, January 11, 2001 6:34 PM >> Subject: Re: [PHP] > >> >>>> when was >> >>> Definitely before that -- Not sure when. >>> >>> It was a long discussion, and some PHP Developers still >> think it was a Bad >>> Idea (tm). >>> >>> *SHOULD* be in the ChangeLogs somewhere... >>> >>> It mostly keeps the recent ASP converts from whining :-) >>> >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, e-mail: >> [EMAIL PROTECTED] >>> For additional commands, e-mail: >> [EMAIL PROTECTED] >>> To contact the list administrators, e-mail: >> [EMAIL PROTECTED] >>> >>> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
that may work for you, but it created a lot of overhead in your applications, and anyone that doesn't know about you special "html api" will be screwed... by all means use whatever techniques you like in-house, but that would be completely useless to someone in the "outside world" -alex > (comments) > > (include files) > > (page specific variables) > > html(); > > head($title); > head_css('stylesheet.css'); > head_script('script.js); > x('head'); > > body($style) > table(0, 0, 0, '100%', '', BLACK); > tr('top'); td(); image('fire.jpg'); x('td'); x('tr'); > x('table'); > > x('body'); > x('html'); -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
> No. > > > > makes the code usable, and your HTML can even be edited with a > graphical HTML-editor. > > There is no reason to mix up HTML and PHP, except for very small > projects. > > regards > Wagner and the problem with that, is you're not paring tons of html through a search-replace function, which also created unnecessary overheead, and forces you (once again) to make a spec that says "here's how this template system works) part of the point was for _PHP_ to be embedded html, in my opinion your example above takes the "don't mix logic with markup" much too far: is really not that much harder to write. html people can ignore it, php can find their code, and those that know both can reap the benefits. what about loops? etc... you start building your own little template language constructs, which is dumb because php already has them! :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
> Coding standards are being created (via PEAR) and a few recent articles > exist but point is we're teaching differently, everywhere. PHP is loose > as a goose! print 'foo'; print("foo"); print "foo"; printf("%s","foo"); > ... all being taught, all being read, all being (mis)used. ! http://www.binarycloud.com/code_standard.html > Am looking forward to the in-progress PEAR Standards, which can partially > be seen here : > > http://marc.theaimsgroup.com/?l=php-pear&m=97603413001842&w=2 > > Once this comes about we'll start teaching _GOOD_ coding techniques and > after awhile many more will become pretty little coders writing (and > copying) pretty little recognizable scripts. Looking forward to it. > Looking forward to picking up a PHP book and seeing concepts shown through > standards and not through the authors preferred style at the moment. This > is especially true regarding articles/tutorials. Learn the standards > first! Then you may be free to roam about the isles. absolutely :) > > Go here, be sure to sift through the user comments : > > Best Practices: PHP Coding Style : > http://phpbuilder.com/columns/tim20010101.php3 > > Smart Architectures in PHP : > http://phpbuilder.com/columns/tim20001010.php3 > > A few humble thoughts. > > Happily yours, > > Philip > > > On Fri, 12 Jan 2001, Alexander Wagner wrote: > >> Alex Black wrote: >>> echo ">> value=\"$value\">" >>> >>> starts to make you insane. >> >> If it is done wrong spread over the whole project hidden between lines >> of PHP-code, it sure does. >> >>> speaking as an html author, and a lover of php, _please_: >>> >>> >>> >>> it makes the code useable. >> >> No. >> >> >> >> makes the code usable, and your HTML can even be edited with a >> graphical HTML-editor. >> >> There is no reason to mix up HTML and PHP, except for very small >> projects. >> >> regards >> Wagner >> >> -- >> Sanity is calming, but madness is more interesting. >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
> or more like : > > > > > Name : > $name = 'johnny'; > echo $name; ?> > > > Title : > $title = 'smith'; > echo $title; ?> > > > yes, uhhzakkly :) > > --- > Yeah, there are more important things in life than money, but they won't go > out with you if you don't have any. heh. now come on... that's not supposed to be true (noink) _a -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
>> and the problem with that, is you're not paring tons of html through a >> search-replace function, which also created unnecessary overheead, and > > You have a point here. Template-systems are slow. yeppers... that's why I didn't implement one of those keyword things in binarycloud. ergh. >> forces you (once again) to make a spec that says "here's how this template >> system works) > > There are "standard"-template-systems like FastTemplates or PHPLIB templates. that's true. >> part of the point was for _PHP_ to be embedded html, in my opinion your > > It was created that way. It still is possible. Is can be quite handy, > sometimes (or often, depends on what you do). That doesn't mean you have to > use it. I'm not implying that there are rules etched in stone somewhere, but I am trying to prove a point, because I see many people making the "echo" mistake, which makes their otherwise great code much less useful. >> example above takes the "don't mix logic with markup" much too far: > > I don't think I crossed a border here. When execution-speed doesn't matter > that much (wich often is the case), there is only one rule: Get it done as > fast and reusable as possible. Ok, execution speed does matter to me. I run webserver installations, and anything over about 2 tenths of a second starts to get annoying when you send a lot of users to a site. > Code that uses templates tends to be very reusable, at least it is VERY easy > to change the design. > And if the design is done by a designer who doesn't know PHP, it may also be > done faster. The code I have to maintain (single-handedly when it comes to html) for even very large stuff inside of binarycloud is pretty simple. One of the core team is actually working on a feature for form builder that will further simplify the markup files. >> >> >> is really not that much harder to write. > > With a HTML-editor? It probably would HTML-encode this, so you end up with > <=$value> Maybe if you have a badang-crap html editor :) Try using emacs, BBEdit, HomeSite, or any of the other quality editors out there. I don't think that's a consideration. >> html people can ignore it, > > almost yes, come on. >> php can find their code, and those that know >> both can reap the benefits. >> >> what about loops? > > Templates can do loops, with so called "blocks". > Your system can't. Not whithout mixing PHP and HTML in a way that will make a > designer throw hardware at you. eh? my system does loops with php code. it is very important to note that that code need not be embeddedin the same file as the markup. for example, I need a "style" for an individual record coming out of a database. so I make that html, put a little function "tag" around it" That is an intentionally simplistic example, but you can obviously see that if a php coder tells the html coder "that bit of html is going to be looped for as many records as we get out of the database - they html coder should think accordingly. After all, we really aren't talking about "rocket science". >> etc... >> >> you start building your own little template language constructs, which is >> dumb because php already has them! > > There are clean (but slow) template-solutions out there. Maybe this will > change some day. This is true - some of the parsed-template systems use nicely clean code. But they cost cpu cycles, bigtime. And, ok, hardware is commodity, but you can actually do more cool things if you use simple php in html, with controlling logic. > Anyway, from a designers point of view, your system is far messier > (especially with loops) than templates. But faster, both for you to write and > to execute for PHP. Well, this is a world of tradeoffs. Absolutely not. under my system, we don't end u splitting html into billions of little chunks, we make a "page" of html which is associated with a piece of controlling logic in a separate file, then insert discreet function "tags" which allows the controlling logic to do its stuff. _alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
yeah, but it's good to agree on something so that people can use each other's code... -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Mark Maggelet) > Newsgroups: php.general > Date: 12 Jan 2001 11:40:32 -0800 > Subject: Re: [PHP] mixing HTML and PHP code > >> http://www.binarycloud.com/code_standard.html > >>> http://marc.theaimsgroup.com/?l=php-pear&m=97603413001842&w=2 > >>> Best Practices: PHP Coding Style : >>> http://phpbuilder.com/columns/tim20010101.php3 > >>> Smart Architectures in PHP : >>> http://phpbuilder.com/columns/tim20001010.php3 > > These are all just opinions, none of these are official Php style > guidelines, so there's no real reason to follow them. > > - Mark > > > -- > PHP General Mailing List (http://www.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] mixing HTML and PHP code
> That I prefer to call it "investment" instead of overhead because it has > given us a system we vastly prefer. hehe, I like that. I still disagree, but that was good :) >> by all means use whatever techniques you like in-house, but that would be >> completely useless to someone in the "outside world" > > That's fine. I just wanted to show people how we did it. I don't expect this > to be useful in a all situations. > > In our experience PHP programmers who work with us don't have any > problem figuring out how our system works. Without knowing anything > about our system tell me you can't look at that code and "get it" that's true of all of these systems. I'm not implying that one is hard to understand as opposed to the other, I'm arguing for efficiency and portability. _alex > Jade > >>> (comments) >>> >>> (include files) >>> >>> (page specific variables) >>> >>> html(); >>> >>> head($title); >>> head_css('stylesheet.css'); >>> head_script('script.js); >>> x('head'); >>> >>> body($style) >>> table(0, 0, 0, '100%', '', BLACK); >>> tr('top'); td(); image('fire.jpg'); x('td'); x('tr'); >>> x('table'); >>> >>> x('body'); >>> x('html'); >> > > > > > -- > PHP General Mailing List (http://www.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] on style (was mixing PHP and HTML code)
actually, that's a good separate point: I dislike the PEAR coding standard's inflexibility. I _fully_ dig coding standards, but that feels a little too "iron fisted" to me... who cares if someone uses 4 spaces instead of a tab? hopefully I'm not putting my foot in my mouth and have that somewhere in the binarycloud code standard... maybe I should go look :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("DanO") > Newsgroups: php.general > Date: 12 Jan 2001 12:14:44 -0800 > Subject: [PHP] on style (was mixing PHP and HTML code) > > > the main reason to follow guidelines like this is to make your code legible > and modifiable. > > i come to PHP from HTML via Perl/CGI, and have inherited some nasty code on > sites i have worked on. i've always appreciated code that is structurally > formatted. > > Perl is notorious for its intrinsic flexiblity and default global variables, > which allows for programmers to write statements that are very hard to > comprehend while reading the code. this follows for other scripted > languages like JavaScript and PHP. > > using braces and indents are a part of authoring legible code in almost any > programming language, and should be exercised whenever possible if you are > writing code that others will work on, or if you intend for your code to be > portable. > > i do think that the code standard has some good elements to it, but it goes > too far to specify a 4-space indent and to specify no spaces within if > (condition) statements. > > we all benefit from writing legible code, plain and simple. > > DanO > > > -Original Message- > From: Mark Maggelet [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 12, 2001 11:40 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] mixing HTML and PHP code > > >> http://www.binarycloud.com/code_standard.html > >>> http://marc.theaimsgroup.com/?l=php-pear&m=97603413001842&w=2 > >>> Best Practices: PHP Coding Style : >>> http://phpbuilder.com/columns/tim20010101.php3 > >>> Smart Architectures in PHP : >>> http://phpbuilder.com/columns/tim20001010.php3 > > These are all just opinions, none of these are official Php style > guidelines, so there's no real reason to follow them. > > - Mark > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
> connect_to_database(); > parse_query(); > execute_query(); > > echo ""; > > while (fetch_row_from_query()) > { > $output = data_from_fetched_row(); > $more_output = more_data_from_fetched_row(); > > echo " $output $more_output "; > > } > echo ""; > ?> Well, this may be a bit specific, but that is probably part of your problem. You have no structure associated with your application design: what are you doing making a connection to a database on the same page you spit out the results from? You should be including a wrapper file, and calling a function which talks to the database. Also, all of that logic should be in a file that is separate from the markup _anyway_ > connect_to_database(); > parse_query(); > execute_query(); > ?> > > > > $more_output = more_data_from_fetched_row();?> > > > > > > > > I _personally_ prefer the upper implementation, as all my web developing team > (that is, only me :-) know both PHP and HTML and don't > like the code to be *plagued* ofas in above example. I digress. _alex > > > -- > PHP General Mailing List (http://www.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] mixing HTML and PHP code
> > {:each:output} > > {output}{more_output} > > {:next:more_output} > {:end} > > > Even a pot-smoking mac-using hippie web designer can understand that. :-) > And it's readable in Dreamweaver or GoLive or any of those visual HTML > tools. For Dreamweaver I added a little custom definition that makes a nice > icon wherever it sees a template tag in the HTML file. Speaking as a not-pot-smoking mac-using only partially hippie web designer: why bother with creating your own syntax? why not just explain some _super_basic_ php syntax to the "html dude" and have him do the code himself? also, dreamweaver nicely ignores etc. -a > ...and our PHP geeks just stuff a results array into the template. Too > easy. > > - Tim > http://www.phptemplates.org > >> >> > while (fetch_row_from_query()){ >> $output = data_from_fetched_row(); >> $more_output = more_data_from_fetched_row();?> >> >> >> >> >> >> > > > > -- > PHP General Mailing List (http://www.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] Script execution Speed
sort of. if you will always need the same functions for every page, it is probably faster to put them all in one file (where pure speed is concerned) in binarycloud, everything that makes sense to logically separate into separate files. I though that would be kind of "ok" re speed until zend cache, but it turns out to be rippin' fast, so I'd say put stuff in different files, because it's easy to use. btw, if you're building something big, have a look at binarycloud.com, it will save you a lot of time. -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Randy Johnson") > Newsgroups: php.general > Date: 12 Jan 2001 15:24:53 -0800 > Subject: [PHP] Script execution Speed > > Is it faster and more efficient to have smaller scripts that only do one > specific thing when it is executed or can I have a script perform to > different tasks based on a variable sent to it? It will be a high user > website so I am thinking that the smaller the script the better? Am I > right? > > Randy > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] apple-macintosh
pardon. sorry original poster. rhapsody... I had completely forgotten it exists :) -a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Michael Stearne) > Newsgroups: php.general > Date: 12 Jan 2001 08:18:44 -0800 > Subject: Re: [PHP] apple-macintosh > > He is installing on OS X Server, which has been out for a year. Poster: Try > http://www.xclave.com/ for more info on PHP/MySQL on OS X S. If you get the > PHP/MySQL/Apache source they should compile out of the box on OS X Server. > > Michael > > > On Thursday, January 11, 2001, at 06:25 PM, Alex Black wrote: > >> eh? >> >> on OS X? >> >> what is your (pardon, insane) justification for having pressure to get a >> piece of software on a yet-to-be-released operating system? >> >> go download freeBSD it works! OSX is just beta... >> >> -a >> >> >> -- >> Alex Black, Head Monkey >> [EMAIL PROTECTED] >> >> The Turing Studio, Inc. >> http://www.turingstudio.com >> >> vox+510.666.0074 >> fax+510.666.0093 >> >> Saul Zaentz Film Center >> 2600 Tenth St Suite 433 >> Berkeley, CA 94710-2522 >> >> >> >> >>> From: [EMAIL PROTECTED] (MacTrom) >>> Newsgroups: php.general >>> Date: 11 Jan 2001 11:06:26 -0800 >>> Subject: Re: [PHP] apple-macintosh >>> >>> I've downloaded the MySql package from Lightyear, and also an OSX version >>> from NuSphere to an OSX server for my client. UNFortunately, the Lightyear >>> tar refuses to unpack (it is meant to be dropped onto the Desktop and the >>> OSX server doesn't have a Desktop folder) and the NuSphere installs fine >>> except that it fails to find libpthread.A.??lib (I'm not at the server and >>> not sure of the extension). So then setting up the grant table fails and >>> MySql won't run. >>> >>> We are in critical mode to get MySql up and running on this, and I could use >>> some help/direction. >>> >>> Terry >>> >>>> From: Terry Romine <[EMAIL PROTECTED]> >>>> Date: Thu, 11 Jan 2001 03:37:19 -0600 >>>> To: terry romine <[EMAIL PROTECTED]> >>>> Subject: FW: [PHP] apple-macintosh >>>> >>>> From: lou <[EMAIL PROTECTED]> >>>> Date: Thu, 28 Dec 2000 09:33:47 -0800 >>>> To: EaTrom <[EMAIL PROTECTED]>, Jerry <[EMAIL PROTECTED]>, >>>> <[EMAIL PROTECTED]> >>>> Subject: Re: [PHP] apple-macintosh >>>> >>>> http://homepage.mac.com/LightyearDesign/MacOSX/Packages/ >>>> >>>> Apache 1.3.12 compiled with PHP4 Support and mysql for Mac OS X >>>> >>>> >>>>> I would presume that PHP would be usable under OS X -- >>>>> >>>>> Terry >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> To contact the list administrators, e-mail: [EMAIL PROTECTED] >>> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> >> >> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Special Characters
eh? check out htmlspecialchars() (I think that's right, from memory) it basically lets you fuggeddaboutit. -a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("TV Karthick Kumar") > Newsgroups: php.general > Date: 12 Jan 2001 06:36:49 -0800 > Subject: [PHP] Special Characters > > Hi all, > > Where can I get all the special characters that can come from a Keyboard > ?. Is there any site which gives information like that ?. > > I need your help. Thanks in advance. > > ~ Karthick > > > > -- > PHP General Mailing List (http://www.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] DocBook Editors?
hi all, anyone found a good graphical SGML editor for any platform that's no a fortune? http://www.adobe.com/store/products/framemakersgml.html It would be really annoying to have to write a bunch of documentation for binarycloud inside an plaintext xml document. I'm surprised DocBook has gained so much support given the apparent lack of good tools for authoring. ? _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 -- PHP General Mailing List (http://www.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 vs JSP
http://www.zdnet.com/enterprise/stories/linux/0,12249,2646052,00.html gah: "Also, any organization doing clustering or failover with PHP is in largely uncharted waters. " what _bull_! what does loadbalancing and clustering have to do with any scripting language? this guy is obviously one of those dilettantes that things CFML is the holy grail :P anyway, that article is wrong, _except_ the part about JSP: -slow -extremely time consuming -friggin annoying :) I've worked on a couple of projects with JSP, and decided to use PHP to build binarycloud. 'nuff said :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Donald Goodwill) > Newsgroups: php.general > Date: 14 Jan 2001 15:13:12 -0800 > Subject: Re: [PHP] PHP vs JSP > > There is an interesting ZD Net comparison of several > scripting languages at > http://www.zdnet.com/enterprise/stories/linux/0,12249,2646052,00.html > Some time ago I did the comparison of JSP to PHP and > JSP turned out to be much, much slower. > > Now I'm just learning CodeCharge generator and so far > it seems really helpful. I even started redoing one > project from scratch using it. Maybe surprise your > client and create both PHP and JSP versions... > > > - Original Message - > From: <[EMAIL PROTECTED]> > To: PHP list <[EMAIL PROTECTED]> > Sent: Sunday, January 14, 2001 7:35 PM > Subject: [PHP] PHP vs JSP > > >> Hi all >> >> I'm busy working on a contract .. and we need to do > some web based > stuff > .. but the client is intent on using jsp and not PHP. >> Is there somewhere where I can get good comparists > between the two > pro and > cons etc etc .. >> >> I would much rather use PHP then JSP for the > development >> >> Thanks >> Henti Smith >> > > > __ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] logging page views, which method is better????
the problem with that is as soon as you run a load-baanced installation, collecting apache logs start to be a pain in the a$$ :) I have given some thought to the logging thing, but am still undecided re: letting apache do its thing, and writing scripts to aggregate the logs, or turning off apache logging and going to the DB. problem is this puts an annoying amount of stress on the production DB, so there you have it, the dilemma :) -a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] > Newsgroups: php.general > Date: 14 Jan 2001 01:58:33 -0800 > Subject: Re: [PHP] logging page views, which method is better > > Addressed to: "Dallas Kropka" <[EMAIL PROTECTED]> > [EMAIL PROTECTED] > > ** Reply to note from "Dallas Kropka" <[EMAIL PROTECTED]> Sun, 14 Jan 2001 > 00:57:10 -0600 >> >> >> I have a large site, with several hundred pages its a product >> listing and shopping cart and I want to log my page views I >> receive an average of 3000 hits per minute. >> >> Is it better (faster) to log my views to a database table? or to a >> flat file? > > > No need to re-invent the wheel, all accesses are already being logged. > > > If you are using Apache, take a look at the access log. Every hit to > the server is already logged there. I am not sure what the default > location for the file is, but you can find it with > > locate access_log > > or by looking for the string Log in your httpd.conf file. I believe > it may appear under either the AccessLog or CustomLog keywords. > > You might want to look at Webalizer, or a couple of other programs to > analyze the contents. > > http://www.mrunix.net/webalizer/ > > There are others, but this is the one I use. > > > > > > Rick Widmer > Internet Marketing Specialists > http://www.developersdesk.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Templates
well, I suppose it could, but it's pretty weird... why would you want to directly hook up presentation w/sql queries ? :) -a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (andrew) > Newsgroups: php.general > Date: 13 Jan 2001 17:06:48 -0800 > Subject: Re: [PHP] Templates > > Sure, > > My understanding of templating engines > 1.array or item is assigned to a variable > 2.php placeholders in a html page match in name to above variable. > 3.a parser separate from php subsitutes the variable values set in (1) > into (2) > > I've seen plenty of examples where there is a file containing lists of > variable to item assignment, and thase files are passed to a one of a few > template pages for layout. > > There must be a way to pass the result set of an SQL query into the set of > placeholders - the end result would be that you could call whole sites via > simple queries. All you have to pass in would be the SQL parameter. > > i.e. Table named 'Pvalues' > > Pvalues Sample Row > -- > page_id contactus.html > page_name Contact Us > page_title Contact US > header_text Please send an email > body_text [EMAIL PROTECTED] > footer_text thanks! > > > You can even generate a list of links dynamically for nav bar via: > > "select page_name, page_id from Pvalues", if you account for performance > issues. > > If the usre clicks on the "contact us" link, it returns a page_id value of > contactus.html. So then: > > "select * from Pvalues where page_id = "contactus.html" > > Then call a templating parser and pass it the values of the select statement > and which template to use. > > Can this be done, or I am way off base on this? > > regards, > andrew > > > > > > > > > > On 1/13/01 7:27 PM, "Michael Kimsal" <[EMAIL PROTECTED]> wrote: > >> I thought I understood your question, but I think I need a clarification. >> Can you elaborate a bit? I think I have an answer, but I'm not 100% what >> you're meaning here. >> >> Thanks. >> >> >> andrew wrote: >> >>> Michael, >>> >>> Wouldn't a benefit be that you could pass a database query in via that >>> variable, either via form submit or value of a clicked link? >>> >>> I know PHP can do this without a separate templating engine, but if you do >>> use one then you can submit an array to a specific template. Is there a way >>> to do this via built in functions without constructing the set of page >>> object's first, or can you only do this in templates? >>> >>> regards, >>> andrew >>> >>> On 1/13/01 7:06 PM, "Michael Kimsal" <[EMAIL PROTECTED]> wrote: >>> >>>> >>>> >>>> [EMAIL PROTECTED] wrote: >>>> >>>>> I looked around the web for templates and founf FastTemplates. Not exactly >>>>> what i was looking for thoug >>>>> lets say I have >>>>> $file = "111" >>>>> and there is a template "template.txt" >>>>> and it contains >>>>> "file #$file is blahlah" >>>>> >>>>> how can I make that a template? >>>>> >>>>> Thanks >>>>> - Peter >>>>> >>>> >>>> Any reason 'template.txt' couldn't just say >>>> >>>> file $ is blahlah >>>> >>>> then include('template.txt'); in your main file? >>>> >>>> Not sure why you'd want to complicate things with >>>> something like FastTemplates - I understand it has a use >>>> and purpose, but the only long term benefit I see from >>>> involved schemes like that won't be realized anyway >>>> (discussion for another day). >>>> >>>> >>>> >> > > > -- > PHP General Mailing List (http://www.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] mixing HTML and PHP code
the horse is back from the dead! I can't resist: > From: [EMAIL PROTECTED] ("Iván Sánchez Ortega \"MR\"") > Newsgroups: php.general > Date: 13 Jan 2001 14:17:35 -0800 > Subject: Re: [PHP] mixing HTML and PHP code > > "Alex Black" ... >>> >> connect_to_database(); >>> parse_query(); >>> execute_query(); >>> >>> echo ""; >>> >>> while (fetch_row_from_query()) >>> { >>> $output = data_from_fetched_row(); >>> $more_output = more_data_from_fetched_row(); >>> >>> echo " $output $more_output "; >>> >>> } >>> echo ""; >>> ?> >> >> Well, this may be a bit specific, but that is probably part of your > problem. >> You have no structure associated with your application design: >> >> what are you doing making a connection to a database on the same page you >> spit out the results from? > > Nonononono... that was just an example. My real code looks more like this > example: > > - > include "common_head.php"; > > echo "Welcome to blah blah section"; > > echo "NameEmail"; > > $query=ociparse($conection,"select name,email from people where blah blah > blah"); > ociexecute($query); > while (ocifetch($query)) > { > $name=ociresult($query,"NAME"); > $email=ociresult($query,"EMAIL"); > > echo "$name$email"; > > } > > ocifreecursor($query); // optional > > > include "common_footer.php"; > ?> > -- > > > In common_head.php i have the conect-to-database functions, and because the > way include() works, i can happily use $connection in the main code. It also > makes a login&password comprobation, getting data from cookies and the > stuff. > common_head.php also has a main component: the UPPER WEB DESIGN. That means > that the upper logo, left-side menus, CSS links, common javascript code and > stuff is also stored there. > > common_footer just has the bottom part of the design - bottom common links, > and lots of well measured closings. > > The trick is tell the web designer to work the main common design in > dreamweaver or so, then pick the HTML code, and separate it in "upper" and > "bottom"... in the middle of that you have the space to put whatever you are > spitting out from the DB. > > And aside from that, i don't have a one and only common_head.php ... i have > a separate plain common head, in plain HTML... the real common_head.php > should look like (definitively not real PHP sintax): right, and though this is not directly related to templating: I thik you would benefit greatly by introducing some system design (i.e. separate "layers" doing separate tasks) I don't like to do database connections when I've already output markup, what if something goes wrong, or I want to do a redirect, etc? I like to access functions in "DB Object" files - those functions return results in arrays which I can pass into markup. Makes the code a _helluvuh_ lot more maintainable. > > connect_to_database(); > do_cookie_stuff(); // First of spitting any HTML, > // you get from cookies, make comprobations, > // and re-store cookies or whatever... > // This do_cookie_stuff can be a little hard. > > include "plain_html_head.php"; > ?> > > > > That way, your dreamweaver expert can design the main design (better with > some stupid test text in the place of the spitted-out-from-database-data), > and you as PHPer only have to cut out the HTML code (not a really hard work) > into two parts. > > As i see, it can work perfectly this way. > > > How you format the spitted data and stuff is another matter but anyway, > getting the code that dreamweaver generates and implementing it shouldn't be > a real hard task. True, but why not just bitch at macromedia until they include support for PHP in ultradev? (plegh, visual authoring tools: a necessary evil) :) _a -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] load balancing with php/apache?
what? you use an utterly completely stateless model? craziness! so you set cookies, and store the sig in the db? agh! :) I'm using this box from "coyote systems" called, wait for it: "THE EQUALIZER" which is a really obnoxious name, but it sticks clients with a particular server intelligently, so we can be ever-so-slightly-lazy about that. do you _like_ that system? (that isn't a challenge, it's real interest) _a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (jeremy brand) > Newsgroups: php.general > Date: 13 Jan 2001 13:41:19 -0800 > Subject: RE: [PHP] load balancing with php/apache? > > we store the sessions in the DB. > > Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] > http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more > Get your own Free, Private email at http://www.smackdown.com/ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > "" -- Quoted from Yahoo! homepage, http://www.yahoo.com > > On Sat, 13 Jan 2001, Cal Evans wrote: > >> Date: Sat, 13 Jan 2001 14:43:19 -0600 >> From: Cal Evans <[EMAIL PROTECTED]> >> To: jeremy brand <[EMAIL PROTECTED]> >> Cc: [EMAIL PROTECTED] >> Subject: RE: [PHP] load balancing with php/apache? >> >> When you say "handled by us" do you mean you: >> >> 1) Write the sess_* files to a shared drive >> 2) Store them in the database >> 3) ignore them totally, who needs users anyhow? >> 4) some other option? >> >> Cal >> http://www.calevans.com >> >> >> -Original Message- >> From: jeremy brand [mailto:[EMAIL PROTECTED]] >> Sent: Saturday, January 13, 2001 2:20 PM >> To: Cal Evans >> Cc: [EMAIL PROTECTED] >> Subject: RE: [PHP] load balancing with php/apache? >> >> >> We have a centralized DB server. Sessions are handled by us, the >> programmers, not the cluster. >> >> Jeremy >> >> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] >> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more >> Get your own Free, Private email at http://www.smackdown.com/ >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> "" -- Quoted from Yahoo! homepage, http://www.yahoo.com >> >> On Sat, 13 Jan 2001, Cal Evans wrote: >> >>> Date: Sat, 13 Jan 2001 11:51:01 -0600 >>> From: Cal Evans <[EMAIL PROTECTED]> >>> To: [EMAIL PROTECTED] >>> Subject: RE: [PHP] load balancing with php/apache? >>> >>> How does it deal with sessions? Or do use store sessions in the database? >>> >>> Cal >>> >>> -Original Message- >>> From: Joe Stump [mailto:[EMAIL PROTECTED]] >>> Sent: Saturday, January 13, 2001 11:22 AM >>> To: Rasmus Lerdorf >>> Cc: [EMAIL PROTECTED] >>> Subject: Re: [PHP] load balancing with php/apache? >>> >>> >>>> http://www.linuxvirtualserver.org/ >>> >>> We use LVS on our website - it works great! We have 2 load balancers with >>> the >>> HA package and 6 PHP webservers running behind it (with a central DB >>> server). >>> >>> In short, it's possible and works quite well. BTW We user FreeBSD for >>> webservers >>> if that's any help (though linux, NT, solaris, etc would all work) >>> >>> --Joe >>> >>> >>> >>> >>>> http://linas.org/linux/load.html >>>> >>>> -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] >>> >>> -- >>> >>> Joe Stump, PHP Hacker >>> [EMAIL PROTECTED] >>> http://www.miester.org/ >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> To contact the list administrators, e-mail: [EMAIL PROTECTED] >>> >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >&g
Re: [PHP] load balancing with php/apache?
> Whoever said NFS is slow hasn't used a NetApp amen brother. -a -- PHP General Mailing List (http://www.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] Use
can people give me opinions as to why http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Philip Olson) > Newsgroups: php.general > Date: 13 Jan 2001 12:18:08 -0800 > Subject: Re: [PHP] Use > My understanding is : > > 1. 2. Will not work if short_tags_open setting is off (in php.ini) because of > the fact that > Regarding its relation to the ASP counterpart, it is not directly related > to <%= as that is an ASP tag which refers to the asp_tags setting which if > on, <%= will work, if not on, it will not. Information and references to > this can be found here : > > http://www.php.net/manual/language.basic-syntax.php > http://www.php.net/manual/en/configuration.php#ini.asp-tags > http://www.php.net/manual/en/configuration.php#ini.short-open-tag > > I've personally never tried asp tags. Earlier within this thread , the > following php internals were posted by Jim Winstead : > > http://cvs.php.net/viewcvs.cgi/php3/language-scanner.lex.diff?r1=1.3&r2=1.4 > http://cvs.php.net/viewcvs.cgi/php3/language-scanner.lex.diff?r1=1.6&r2=1.7 > > All in all, if others will be playing with your scripts, don't use asp > style as usually this is usually turned off. Use of dangerous (and debated, my view is 'bad') to use given the reasons above. > > > Philip Olson > http://www.cornado.com/ > > On 13 Jan 2001, Arcady Genkin wrote: > >> I have noticed that > in documentation, how safe is it to use it? >> >> Many thanks, >> -- >> Arcady Genkin >> Don't read everything you believe. >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] load balancing with php/apache?
check out http://www.coyotepoint.com/ only $4000! does 512 clients! can even stick clients through the famous AOHell proxies! cheap! :) -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (jeremy brand) > Newsgroups: php.general > Date: 13 Jan 2001 12:16:09 -0800 > Subject: Re: [PHP] load balancing with php/apache? > >>> We use LVS on our website - it works great! We have 2 load balancers with >>> the >>> HA package and 6 PHP webservers running behind it (with a central DB >>> server). >> >> Yes, I have heard very good things about LVS. Haven't had a chance to set >> it up myself yet. Definitely something for the TODO list. > > LVS with linux-ha is a win-win situation. Even if you loose a LVS, > the failover is transparent. The connections hang for about 5-15 > seconds, then transfer over to the other machine. > > With the traffic that we have, we opted to use direct > routing, this way there is no translation (thus no additional CPU on > the LVS machine) needed for the answers; the web servers talk directly > back to the client themselves. > > We were planning on using Local Directors, then cost became a major > issue. I'm actually glad we did it this way, because personally I > like envesting my knowledge in open solutions rather than learning > proprietary OSs and strategies. > > Jeremy > > Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] > http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more > Get your own Free, Private email at http://www.smackdown.com/ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > "" -- Quoted from Yahoo! homepage, http://www.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] mixing HTML and PHP code
> There are things that can be done to speed things up though...cacheing files > at the page level, or even cacheing templated components at the sub-page > level where possible can overcome much of the overhead of using templates. but that doesn't do you any good on pages that are getting results from a DB, unless you're doing straight content queries. in which case, why not just use a cache in front of your webservers that filters urls? oh, and for good measure, tim: "binarycloud" b i n a r y c l o u d binrcld I believe that's three times :) _a -- PHP General Mailing List (http://www.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] DocBook Editors?
> A lot of technical people aren't keen on WYSIWYG editors. Especially when I'm technical, and I'm not looking for WYSIWYG. I'm looking for something that doesn't require me to memorize yet another large set of tags. :) > dealing with something like docbook that is designed to generate > documentation in dozens of formats. vim with its syntax colouring or > emacs with its validation mode really do a good job. I have been writing > a lot of docbook stuff lately for work and I find I am an order of > magnitude more productive than I ever was using something like Word. Well, word is a terrible example being a terrible app, especially for structured content. Nothing? No options? No SGML editors out there with a tag catalog, etc? and yes, WYSINWYG = what you see is _never_ what you get _a > -Rasmus > > On Sun, 14 Jan 2001, Alex Black wrote: > >> hi all, >> >> anyone found a good graphical SGML editor for any platform that's no a >> fortune? >> >> http://www.adobe.com/store/products/framemakersgml.html >> >> It would be really annoying to have to write a bunch of documentation for >> binarycloud inside an plaintext xml document. >> >> I'm surprised DocBook has gained so much support given the apparent lack of >> good tools for authoring. >> >> ? >> >> _alex >> >> >> -- >> Alex Black, Head Monkey >> [EMAIL PROTECTED] >> >> The Turing Studio, Inc. >> http://www.turingstudio.com >> >> vox+510.666.0074 >> fax+510.666.0093 >> >> Saul Zaentz Film Center >> 2600 Tenth St Suite 433 >> Berkeley, CA 94710-2522 >> >> >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] load balancing with php/apache?
> > We used LocalDirector for awhile, with it's 'sticky bit' functionality, > and it basically didn't work with AOL. I just looked at the > coyote product and they claim it works with 'large ISP' proxies - maybe a > veiled > reference to AOL directly (why not just say AOL?). from my testing, the "EQUALIZER" (I kind of like how obnoxious the name is, actually :) does in fact work with AOL. > Do you have any more info on HOW they do this? The > only thing I can think of is that they code it recognize particular IP blocks > known to be proxies for AOL/mindspring/etc and route ALL traffic from these to > a > particular box, which doesn't seem terribly balanced. OR... they drop a > separate > 'cookie' or similar header data piece between the server and the client and > track > that. The installation I tested is not large, though, and I did not hit it with more than one client.. in the case of the particular site, it doesn't matter... but I would be interested to know that. > Either way, it seems a bit expensive, although cheaper than LD, last time I > checked. Yeah, Cisco r' bastards :) At _least_ for the money, their stuff does actually work most of the time. > Personally, we do the 'stateless' model with session data in a database - > works > fine. Your coyote solution is still stateless, but the session data is kept > local > to the webserver. Yeah, we might end up writing a session handler for binarycloud, probably "switchable" so you can store sessions on the machine re: php.ini, or pipe 'em to your DB. > Problem I see with that is that if you need to take a particular machine > offline, > hundreds of people could lose their session data. Same can be said of taking > the > database offline, but taking a db offline will probably affect the whole site > anyway. Part of the benefit of an intelligent load balancer is that you can > remove/take down machines for maintenance/upgrades without worrying about the > impact on the visitors. > > Am I missing something? Nope, not a thing. That is a consequence of the stateless-but-not-quite model. In my case, it's fine. In other cases, it certainly is not :) _alex > > Alex Black wrote: > >> what? >> >> you use an utterly completely stateless model? >> >> craziness! >> >> so you set cookies, and store the sig in the db? >> >> agh! :) >> >> I'm using this box from "coyote systems" called, wait for it: >> >> "THE EQUALIZER" >> >> which is a really obnoxious name, but it sticks clients with a particular >> server intelligently, so we can be ever-so-slightly-lazy about that. >> >> do you _like_ that system? (that isn't a challenge, it's real interest) >> >> _a >> >> -- >> Alex Black, Head Monkey >> [EMAIL PROTECTED] >> >> The Turing Studio, Inc. >> http://www.turingstudio.com >> >> vox+510.666.0074 >> fax+510.666.0093 >> >> Saul Zaentz Film Center >> 2600 Tenth St Suite 433 >> Berkeley, CA 94710-2522 >> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Perl-like DBI and generic SQL
I have found metabase to be superior to any other abstraction layer I've ever come across. Hey, it also allows you to do DB schema definitions with XML files, which is hugely cool. We're running development of commercial-grade (tested, yadda-yadda) doing development on mySQL, and moving to Oracle in production. With no problems. Without metabase, I would consider the above suicidal and idiotic, but with metabase it works like a charm. If you'd like other resources beyond an abstraction layer (like authentication, permissions, and all kinds of other groovy tools), have a look at binarycloud.com. _a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Michael Kimsal) > Newsgroups: php.general > Date: 15 Jan 2001 06:28:19 -0800 > Subject: Re: [PHP] Perl-like DBI and generic SQL > > > > Dean Hall wrote: > >> I read once on this list that PHP supports a DBI-like database access object >> (such as the one in Perl). Is this true? Does anyone know where I can find >> documentation for it? I can't seem to find it in the manual. >> >> Also, how do you all handle generic SQL for multiple DBMSs? I'd like >> (ideally) to write SQL that is DBMS-independent, although that's probably not >> possible. I'm very familiar with mysql and not much else; as far as I'm >> aware, mysql is the primary DBMS that has problems with standard SQL (like >> nested queries and such). Does anyone even worry about this? >> >> I'm writing a little piece of software that I'd like to be as extensible as >> possible and as usable as possible for people using any DBMS, including >> mysql. >> >> Anyway, if I can't find a generic built-in database interface in PHP, it'll >> all be moot. I'd really rather not use phplib; I'd like to use an interface >> built in to the interpreter rather than something that's interpreted on every >> page access. >> > > You won't find one. The 'benefit' of PHP is that is, for the most part, uses > native db drivers for access to each db. Should be a bit faster and allows > access to the specific features of each db. > > There is a PEAR repository which offers something similar to DBI, afaik, but > it's not widely discussed, from what I can see. PEAR is a set of files that > comes with a distribution, and there is a README. People on shared host > environments may be out of luck here, though, with respect to a README (d/l > the file and read it manualyl I guess). > > "metabase" from manuel lemos purports to be a single interface to multiple dbs > - write one SQL statement and it'd do the necessary translation on the SQL to > be specific to whatever db you are using. Haven't used it, but heard nice > things about it. But, it violates your 'not interpreted' clause. > > Good luck. > > > > >> >> Thanks for the help. >> Dean. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Regex for telephone number
case "phone_us": if(ereg("^([2-9][0-9]{2})([2-9][0-9]{2})([0-9]{4})$", $var)){ return TRUE; }else{ set_stringtypes_error(throw_error3("lib_string_types_108", $var)); } break; case "phone_int": if(!preg_match("/[^0-9\(\)\-\. ]/", $var)){ return TRUE; }else{ set_stringtypes_error(throw_error("lib_string_types_109", $var)); } break; works good for us. that's from the stringtypes lib in binarycloud. we're going to convert all of that stuff to be stored as rules in XML... groovy changes are afoot! _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Vikram Vaswani) > Newsgroups: php.general > Date: 15 Jan 2001 04:23:51 -0800 > Subject: [PHP] Regex for telephone number > > Hi! > > Can someone help me out with a regex to validate a phone number? > > Thanks > > Vikram > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mixing HTML and PHP code
>> the horse is back from the dead! > >huh? inside joke. > Why? If nested tables can do the work, i won't bother learning how layers > work... um, I mean in your application design, not your html. >> I don't like to do database connections when I've already output markup, >> what if something goes wrong, or I want to do a redirect, etc? > > If something goes wrong -> It's the DBA fault. :-) hehe in a production encironment: agh! >> I like to access functions in "DB Object" files - those functions return >> results in arrays which I can pass into markup. >> >> Makes the code a _helluvuh_ lot more maintainable. > > I'm pretty comfortable programming directly with OCIwhatever() functions > directly in the main code, that's it. ok, go ahead. that in my opinion is not the way to go, especially for portability and reuse of code... it's also the quick route to hair-pulling if you QA your code... > In other words, i don't need to make my code more maintainable because i'm > comfortable with maintaining it right now. well, then why bother arguing the point? my opinion only matters if you care about it? otherwise I'm just babbling. (ohh I see some responses to this one) >> True, but why not just bitch at macromedia until they include support for >> PHP in ultradev? > > (Well, i haven't purchased dreamweaver either) good, that means you're not using any diabolical visual tools :) >> (plegh, visual authoring tools: a necessary evil) > > Why, when you have notepad.exe and a couple of browsers to test that the > pages work properly? whoa, dude. that's scary. but do whatever you want! -alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Help! Oracle...
I have a vague memory of ORA-12545 being a database not available error. but go by the oracle errors, they are usually pretty informative. -a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Paul) > Newsgroups: php.general > Date: 16 Jan 2001 17:55:43 -0800 > Subject: [PHP] Help! Oracle... > > > Can some one help me understand this error? > > > _oci_open_server: Error while trying to retrieve text for error ORA-12545 > in /home/develop/www/htdocs/php_dev/oracle.php on line 11 > > > My php.php server status page shows: > > oci8 > > OCI8 Support.enabled > Oracle Version8.1 > Compile-time ORACLE_HOME > /u01/app/oracle/product/8.1.5/ > > Libraries Used (none listed) > > > Thanks! > > Paul > -- > ___ > Paul Luscher > Web Developer > Studeo Interactive Direct > Ph. 801.993.2219 > > [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] Re: XML, what is that supposed to do?
> First when most people say "the internet" now, they pretty much mean > "the web" and e-mail. When people say "the web" they mean HTTP and HTML > (with a little SSL thrown in for e-commerce). HTTP is the transport protocol > (how it is delivered) and HTML is the markup language (the message). XML > attempts to replace and supersede HTML without saying anything about HTTP > (though one can assume that most of the delivery will be done via HTTP, much > to the chagrin of many security administrators who depend on firewalls). That is not really the case. XML cannot be a replacement for html because xml is not a set of defined elements like html is. Think of XML as the _rules_ for defining your own markup languages. XHTML is an attempt to being html in-line with the XML standard, but there are gazillions of XML DTDs (document type definition, basically says what elements and attributes you can have in a particular XML document) for all kinds of things. XML is fantastic specifically because it is _not_ a markup language: it enables companies and industries to create _their_own_ markup languages for specific purposes. > XML is a markup language like HTML. Unlike HTML, the markup language is > extensible (basically think of it as saying you can define your own tags and > attributes). This means you can make descriptive tags such as Ah, from the above, I thought you did not understand, but you do :) > Joe BlogsSATs - How to be > beaten by the systemTest preparation > > Which looks a lot like HTML but isn't. Interestingly, the tags are > descriptive of the content which beats the hell out of UN/EDIFACT if you've > ever had to do any work for big business. Other differences are the rules > are more rigid than HTML: all tags must close, all attributes must be > quoted, all reserved characters must be escaped properly, all tags and > attributes are case sensitive. The default format for display is double byte > encoded characters (UTF-16 / UNICODE) (Note: The default used by PHP seems > to be UTF-8 so you should change it to that charset in the XML directives > line).- > So basically what you have when you are done is a text based > hierarchical data structure that's extensible and machine readable. That's > all XML is. yeppers. I luv xml. :) > Now the things you can do with it. Obviously for one I can use this to > serialize objects in PHP very easily since I can store objects in XML > representation which is just a string to be saved. The WDDX module does that > in some standard way. yes, and you can use it for document storage, remote procedure calls, EDI, _anything_ that has a data payload :)! > A note about standards. Since XML is extensible, there is a need to be > specified so that I can communicate with you and we understand each other. > XML is really more like a markup language FORMAT than a language (or seen > another way, it's a standard but not a specification). There are various > specifications and attempts at specifications out there and are usually > referred to as DTDs, Document Type Definitions, or Schema. It used to be you > specified your Schema in another markup language called SGML but then some > people figured if XML is so extensible you should be able to specify your > own Schema in an Schema language which itself is XML. This is known, not > surprisingly, as XML Schema. Which represents another thing you can do with > XML: Use XML to specify XML data formats. for example, a DTD for that bookmark example above is unly useful if a bunch of people agree on it as a standard, otherwise it doesn't do any real good. > A useful one for web programmers right now is you can use XML to turn > XML into other XML formats. This is done through XSL-T (eXtensible > Stylesheet Language - Transform) which is built into a PHP module called > Sablotron (Side Note: I couldn't compile Sablotron 0.50 in PHP yet, it yes, this is a slightly more sad situation. (feel free to flame away - but you have to do it on this list, not privately :) XST (and XSLT) are fairly good for transforming between two document types, but some people have started using it as a template mechanism for XML -> HTML. Problem is, you have to write like _ten_times_ as much XSL as html just to get a basic template going. XSL is like CFML but the design is even worse (gah) and it can't talk to a database :)! (ok, that't not a perfect example...) > failes during the linking step in Apache and claims that it can't find some > library that is in Expat). Sablotron (and many XML-T parsers) is a little > robust in that you can use it to transform it into HTML and text too. This > warrants a bit larger description... > > Basically XSL works by taking an input XML file (we'll call this the > "data store") and using another XML file written using the XSL specification > (we'll call this the "rules file") to create another file in a different XML > format (we'll all this the "presentation file"). Obviously when the > presentation fil
Re: [PHP] Macromedia and Allaire (cold fusion) have agreed tomerge.
aw, crap. I never liked allaire... but I did kinda like macromedia. (giant-toilet-flushing-sound) -a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (lou) > Newsgroups: php.general > Date: 16 Jan 2001 15:50:47 -0800 > Subject: [PHP] Macromedia and Allaire (cold fusion) have agreed to merge. > > http://www.macromedia.com/special/allaire/ > > So much for php in ultradev ;) > > > -- > PHP General Mailing List (http://www.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] RedHat+Apache+php+MSSQL
dude, I installed RH7 _nightmare_ so I promptly uninstalled it, and am happily running 6.2 I would advise convincing whoever told you to do that out of doing that :) I would recommend waiting until oracle runs on redhat 7.(x) - that's a good litmus test. _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Chris Lee") > Organization: Mediawaveonline.com > Newsgroups: php.general > Date: 16 Jan 2001 08:41:34 -0800 > Subject: Re: [PHP] RedHat+Apache+php+MSSQL > > why go for anything but the newest ? is this production ? if so stick to > non-beta probably. > > Chris Lee > Mediawaveonline.com > > > > "Francesc Lladó" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> I have to install in a computer with RedHat 7.0, an Apache web server >> and php with connection at Microsoft SQL Server 7. >> >> Which kind of versions of Apache and php do you recommend? >> Someone of you has tried it? Which are the more frequently problems? >> >> Tank you very much!!! >> >> -- >> Francesc Lladó i Dardet >> [EMAIL PROTECTED] >> >> Interkonet Publishers s.l. >> Atenes 22 >> 08006 Barcelona >> Tel. 932 530 866 >> Fax. 932 530 866 >> http://www.interkonet.com >> [EMAIL PROTECTED] >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Template parser
you can do that in .htaccess or httpd.conf with the apache rewrite engine. _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Hrishi") > Newsgroups: php.general > Date: 16 Jan 2001 03:38:30 -0800 > Subject: [PHP] Template parser > > Hello, > > Is it possible using apache .htaccess to have every file served from a > particular domain/directory > pass through a custom script? or is it necessary to make changes at the root > level? > > Thanks, > Hrishi > > > -- > PHP General Mailing List (http://www.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] error message handling
> You probably want to suppress the error message with an @ symbol. Try > putting an "@" before the function calls that give you errors. you want to avoid doing that, I recommend properly handling the error. > $x = @php_function_here(); > ?> > > This suppresses the error function. Many functions return FALSE if > unsuccessful, so you can test and supply your own error message. better to write a handler to deal with your errors properly. > if ($x == FALSE) { > print ("error."); > } > ?> > > If you find yourself doing this alot, you may want to create a wrapper > function or wrapper class around the original. Look at PHPLIB's DB_SQL > class for an example of how they suppress error messages. Look at > www.php.net for more info. or have a look at binarycloud: http://www.binarycloud.com best, _alex -- PHP General Mailing List (http://www.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] Merging PHPLIB into PEAR
what are the plans in PEAR for dependencies on the pear components? for example, I would like to be able to use other pear libs in binarycloud without running into all sorts of conflicts, especially re: DB abstraction etc. best, _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Sebastian Bergmann) > Organization: http://www.sebastian-bergmann.de/ > Newsgroups: php.general > Date: 17 Jan 2001 10:33:45 -0800 > Subject: [PHP] Merging PHPLIB into PEAR > > Hello there, > > Kristian Köhntopp and Ulf Wendel approached me today and told me that > they have decided to merge the existing classes and modules of > PHPLIB 7 and those that are currently beeing worked on (for PHPLIB > 8, which will now never be released) into PEAR and asked me to > coordinate efforts in order to do so. > > The merging with PHPLIB brings thought-through, well-tested classes > for Authorisation, User and Permission Management, classes for the > abstraction of forms (with Layout Management Engine) and a lot of > other stuff (table proxies, ...) into PEAR. > > I hope everyone is happy with this step, at least I am. :-) Why? > Until now there were two standard repositories one could use and now > there is the opportunity to join the strengths of both. > > One thing is for sure: The process of integrating PHPLIB's concept of > Auth/User/Perm into PEAR will not be finished over-night. > PHPLIB's Sess(ion) class is currently beeing ported to PHP 4 to act > as a wrapper for the native session-management functions of PHP 4. > What needs to be done now is port PHPLIB's classes for Auth/User/Perm > to PEAR::DB, because they are using PHPLIB's own database abstraction > system, which has come of age. > > Ulf Wendel is currently working on the new OOHForms and a Layout > Management System. I am sure he can elaborate on this topic on this > list. Ulf? > > A first, but rather unimportant step was my last commit which moved > the IT[X] template classes from phpdoc/redist to HTML/ and removed > the redist/ directory. > > Yours, > Sebastian > > -- > sebastian bergmann e-mail : [EMAIL PROTECTED] > homepage : http://www.sebastian-bergmann.de > make a gift : http://wishlist.sebastian-bergmann.de > measure the usability of your web application -> http://phpOpenTracker.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] how do i hide my .inc files in apache??
move them out of your apache docroot. /usr/local/apache/htdocs/blah.php includes /usr/local/apache/include/hoo.inc _a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Matt Williams") > Newsgroups: php.general > Date: 17 Jan 2001 05:58:59 -0800 > Subject: RE: [PHP] how do i hide my .inc files in apache?? > > > Order allow,deny > Deny from all > > > in either your httpd.conf or a .htaccess file will deny users access to your > *.inc files > > M@ > >> -Original Message- >> From: Jon Haworth [mailto:[EMAIL PROTECTED]] >> Sent: 17 January 2001 13:01 >> To: 'Jamie Burns' >> Cc: '[EMAIL PROTECTED]' >> Subject: RE: [PHP] how do i hide my .inc files in apache?? >> >> >> I take it you're talking about normal html .inc files, and not the PHP >> include() function? If so, this is well off-list, try the >> comp.infosystems.www.servers heirarchy for this sort of thing. >> >> But... >> >> You can't, AFAIK. The whole *point* of an include file is that the entire >> contents of that file are included in whatever document you call it from. >> You use them for holding repetitive information that you don't >> want to type >> out for every page, such as a footer, eg: >> >> This page is copyright blah blah blah >> mailto:[EMAIL PROTECTED]">E-mail the webmaster >> >> would be a candidate for a .inc file. >> >> If I have completely missed the point, please forgive me. >> >> >> Cheers >> Jon >> >> >> -Original Message- >> From: Jamie Burns [mailto:[EMAIL PROTECTED]] >> Sent: 17 January 2001 12:48 >> To: [EMAIL PROTECTED] >> Subject: [PHP] how do i hide my .inc files in apache?? >> >> >> hi.. >> >> can anyone tell me how i get apache to never send out the contents of my >> include files (*.inc) to users? >> >> i dont want my source sode to be visible to browsers. >> >> thanks, >> >> jamie. >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Forms!
you'd need a java applet to do that... I actually had one made, but you can't get text in on the clipboard because java can't get access to system resources, which of course makes it useless. :) -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Fredrik Arild Takle") > Newsgroups: php.general > Date: 18 Jan 2001 08:11:40 -0800 > Subject: [PHP] Forms! > > I know this isn't the right place to ask this question, but... > > Anybody know how i can make/find a wysiwy (what you see is what you get) > online html editor (like the one Hotmail has!) ... > > I'm gonna use it in a newsgroup (which supports rich text)! > > Any tips anyone? > > NOTE! I'm not a part of this group at home, but could you please answer me > directly? [EMAIL PROTECTED] > > Best Regards > Fredrik A. Takle > > -- PHP General Mailing List (http://www.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] < Levels of Access >
it's the difference between group/category or "object level" access: i.e. "this function is level 1, and all level 1 users can execute it) or this function may be executed by level 1, level 2 users, but that function may only be executed by level 3" or user x can access: -function 1 -function 2 etc (ver long list :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Chris Aitken) > Newsgroups: php.general > Date: 17 Jan 2001 15:07:06 -0800 > Subject: Re: [PHP] < Levels of Access > > > At 10:36 PM 17/01/2001, you wrote: >> Hey Guys, >> >> I wonder if anyone can shed light... >> I have a system that internal users access - >> >> I have separated access levels into 1, 2, 3 etc. So if you have access 1 >> you can view certain things - If you are 2 then you can view more or other >> things. >> >> However the problem arises when someone in access level 1 wants to access a >> level 2 function. I then manually specify that: >> >> if (access = 2 or user=joe) { >> Allow the functions ... >> } >> >> This can get messy - as individuals will be specified all over the place on >> a large system to override levels of access. >> >> Is there a sensible standard that is used to have levels of access but >> special people can access certain higher level functions.? > > > Why not have a database with all usernames/passwords/access levels in > there, and when the user logs in (either with htpasswd or a form login > script system) that info is recorded by a cookie. > > Than have a function which is at the start of every page which passes the > access level of the user, and which levels can access the page. Say there > was 5 levels, you could call the function this way > > auth_user("$access_level","N","N","Y","N","Y"); > > The function just needs to grab the first variable as the users given > access level, then the next 5 variables state whether levels 1 thru 5 are > allowed to view the page (only level 3 and 5 can view it in the above > example). If the users access level returns a Y for its corresponding > level, then its allowed to proceed, otherwise they are shuffled off to a > page telling them to (nicely) go away. > > I dunno if this is a clutzy way of doing it (chances are it is) but thats > how I would try and implement it, and you can also create a nice simple > admin screen system to maintain all users and access levels. Change it in > the DB and its instant on all pages. > > > > > Chris > > > -- > PHP General Mailing List (http://www.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] How to avoid submitting twice?
1: register a ver in the session or 2: register the event in the DB -a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Chakravarthy K Sannedhi) > Newsgroups: php.general > Date: 17 Jan 2001 13:11:20 -0800 > Subject: [PHP] How to avoid submitting twice? > > hello all, > > I am having a form which contains a dropdown listbox > and a submit button. The user will choose any number > from 1 to 5 and hits the submit button. After this the > data that he had selected (1,2,3,4 or 5) enters into a > mysql database(this data enters into the row with the > latest userid) and a link appears, so that by click > that link he can go to next page. > I want to avoid the user from submitting his opinion > once again if he does it already. > Here is the code that i have wrote, which is going > logically some where wrong. > FYI : opinion and submit are the names of the dropdown > listbox and submit buttons. scene1 is the name of the > field in the table named testtable into which the data > enters(one of 1 to 5) > > mysql_connect ('localhost','myname','password') or die > ('unable to connect to the database.'); > mysql_select_db ('usertest') or die ('unable to > select the database.'); > > if ($submit) { > $result = mysql_query("select * from testtable order > by userid desc limit 1"); > $myrow = mysql_fetch_array ($result); > $id = $myrow["userid"]; > $query = "update testtable set scene1='$opinion' where > userid=$id"; > mysql_query ($query); > echo "Go to next page"; > /* this is the part i am trying to use to avoid him > from doing submission second time */ > $result=mysql_query("select * from testtable order by > userid desc limit 1"); > $myrow = mysql_fetch_array ($result); > $scene1 = $myrow["scene1"]; > if ($scene1 == 1||2||3||4||5) { > echo ""; > echo "alert(\"You can choose the rating only > once\");"; > echo ""; > } > } > > Thanks > Chakravarthy K Sannedhi > > __ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP]
xml problems? _what_ xml problems? _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Teodor Cimpoesu) > Organization: DIGICOM, Romania > Newsgroups: php.general > Date: 17 Jan 2001 12:57:37 -0800 > Subject: Re: [PHP] > Hi Philip! > On Wed, 17 Jan 2001, Philip Olson wrote: > >> >>> Short open tags won't work with xml. Therefore they won't work with >>> xhtml. They conflict with where the Web is going. >> >> Aha! Yet another reason not to use > >> :-) >> > you can always use <% and <%= instead. > No XML problems, and you may confuse your {A,J}SP coders :) > > -- 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 General Mailing List (http://www.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] Forms!
Unfortunately, that makes it a little weird to distribute as a free product, and has all sorts of yucky legal implications (or inconvenience) :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Clive Cartlidge) > Newsgroups: php.general > Date: 18 Jan 2001 12:42:33 -0800 > Subject: RE: [PHP] Forms! > > Alex, > > True ... to a point. A signed applet has access to read/write to the client's > clipboard. > > Cheers. > > > -- http://www.datamirror.com > Clive Cartlidge mailto:[EMAIL PROTECTED] > Senior Web Developer phone: 905-415-0310 x160 > DataMirror Corporation fax: 905-415-0340 > >> -Original Message- >> From: Alex Black [mailto:[EMAIL PROTECTED]] >> Sent: January 18, 2001 3:30 PM >> To: [EMAIL PROTECTED] >> Subject: Re: [PHP] Forms! >> >> >> you'd need a java applet to do that... I actually had one >> made, but you >> can't get text in on the clipboard because java can't get >> access to system >> resources, which of course makes it useless. >> >> :) >> >> >> -- >> Alex Black, Head Monkey >> [EMAIL PROTECTED] >> >> The Turing Studio, Inc. >> http://www.turingstudio.com >> >> vox+510.666.0074 >> fax+510.666.0093 >> >> Saul Zaentz Film Center >> 2600 Tenth St Suite 433 >> Berkeley, CA 94710-2522 >> >> >> >> >>> From: [EMAIL PROTECTED] ("Fredrik Arild Takle") >>> Newsgroups: php.general >>> Date: 18 Jan 2001 08:11:40 -0800 >>> Subject: [PHP] Forms! >>> >>> I know this isn't the right place to ask this question, but... >>> >>> Anybody know how i can make/find a wysiwy (what you see is >> what you get) >>> online html editor (like the one Hotmail has!) ... >>> >>> I'm gonna use it in a newsgroup (which supports rich text)! >>> >>> Any tips anyone? >>> >>> NOTE! I'm not a part of this group at home, but could you >> please answer me >>> directly? [EMAIL PROTECTED] >>> >>> Best Regards >>> Fredrik A. Takle >>> >>> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: >> [EMAIL PROTECTED] >> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] question (as if anything else would be in an email tothe list...)
that's the MS debugger being bitchy. as far as I know that's a) legal and b)useful. then again, in the context of what you're doing, why not just build in a little php logic that knows if your select is a certain value, something else should happen? note that onChange may only be associated with the element, not the element. -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Jason Jacobs") > Newsgroups: php.general > Date: 18 Jan 2001 13:29:29 -0800 > Subject: [PHP] question (as if anything else would be in an email to the > list...) > > Hi again. I have a new problem. I have a form with a drop down list. When > the user chooses something from the list, I need a variable to change values > so it can be used upon submission of the form. I thought maybe I could > throw a little line of code into an onChange() function in the > tag, but I got the MS Debugger thrown up on me. Anyone got an idea of how > to do this? Is it possible to call a javascript function and change the > variable in there? Or an easier way (like inline php code...)? Thanks > > Jason > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Profanity Filter
hey, does anyone have a big compiled list? like a profanity library? maybe even a multi-lingual one! hey, it would be fun to make :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Sterling Hughes") > Organization: Pentap Technologies > Newsgroups: php.general > Date: 19 Jan 2001 12:09:56 -0800 > Subject: Re: [PHP] Profanity Filter > > > >> On Fri, 19 Jan 2001, Ignacio Vazquez-Abrams wrote: >> >>> On Fri, 19 Jan 2001, Sterling Hughes wrote: >>> >>>> I'm saying use the same method, but use an array and avoid the > strpos() >>>> function: >>>> >>>> $words = preg_split("//", $data); >>>> foreach ($words as $word) { >>>> if (in_array($prof, $words)) { >>>> echo "BAD WORD"; >>>> echo "BAD WORD"; >>>> echo "I'M TELLING"; >>>> } >>>> } >>>> >>>> -Sterling >>>> >>> >>> That method suffers from the dictionary problem that Egan brought up. >>> >> >> Hey, wait a second... >> >> Does that code even make sense? I must be missing something... >> >> -- > > well if you have a concussion... :) > > Its a whip up of what I was talking about, I didn't mean it as real code > :)... Switch $words to $word and then swith the argument order to in_array > and yes, it makes sense... > > $profanities = array("fuck", "shit"); > > $words = preg_split("/\s+/", $data); > foreach ($words as $word) { > if (in_array($word, $profanities)) { > echo "you did a naughty thing"; > break; > } > } > ?> > > > Would be the somewhat sane version... > > _Sterling > > > -- > PHP General Mailing List (http://www.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 it possible to communicate javascript and php?
no without submitting information to the server with get or post. for example, if a bit of javascript you have comes up with some value, the only way you can get it to the server is to put it in a get and send the user to that url: http://www.mysite.com/index.php?your_js_var=your_value etc. _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Evelio Martinez) > Newsgroups: php.general > Date: 19 Jan 2001 09:01:33 -0800 > Subject: [PHP] is it possible to communicate javascript and php? > > I would like to know if it possible to pass in any way some values > > from javascript functions to php variables ? > > Any FAQ? > > Thanks > > -- > Evelio Martínez > Testanet. Dept. desarrollo software. > Av. Reino de Valencia, 15 - 5 > 46005 Valencia (Spain) > Tel: +34 96 395 90 00 > Fax: +34 96 316 23 19 > > > -- PHP General Mailing List (http://www.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: Ethics question...
>>> is there any benchmarks or proof that I should host a high traffic site on a >>> FREEBSD/APACHE instead of a redhat Linux/Apache server? I have _heard_ that linux is great under medium load, but does not deal as well with super-high loads as well as freeBSD. that has not stopped me from using linux in all of my commercial installations, with not a problem once :) I think the answer is to say: we'll use apache, on (insert your fav. *nix here) - in a cluster of webservers that can be easily expanded as the need arises. I personally dislike sun: expensive, hyper-proprietary (almost worse then MS, because its their hardware as well), and really_really_rude What's great about both FreeBSD and Linux: commodity hardware! cheap! easy to get! cheap! It's easier to build in redundancy than it is to engineer 100% uptime. _alex -- PHP General Mailing List (http://www.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] solutions to disadvantages when register_globals is off
> include $HTTP_POST_VARS['file']; > ... > ?> > > really isn't any safer. People won't be able to put file=/etc/passwd > right in the URL, but they can still trivially fake up a form post and > inject whatever value for 'file' into the POST data. > > It all boils down to verifying any and all user-supplied data. > > -Rasmus totally :) I toyed with turning off register globals in binarycloud, only to a) have that pointed out to me, and b) realize that it would be a total hassle. we're extremely paranoid about user input, and you have to get used to making your code only accept _exactly_ what it is expecting with regards to user input. I've seen: file.php?message=hello&[EMAIL PROTECTED] can you say spam-engine ? :) _alex -- PHP General Mailing List (http://www.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] picture quality question
older versions of AOL use a custom 256 palette to support the AOL gui. this has nothing to do with php. -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Robert V. Zwink") > Newsgroups: php.general > Date: 22 Jan 2001 13:15:19 -0800 > Subject: RE: [PHP] picture quality question > > This could be your video card or something. I doubt is has anything to do > with php. If you have an older card, or not enough ram on the card, you > might experience something like that. Try updating your video card driver, > or replace the card. > > Robert Zwink > http://zwink.levitate.org > > -Original Message- > From: Pat Hanna [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 22, 2001 3:23 PM > To: php help > Subject: [PHP] picture quality question > > > I have these pictures that I'm using for my webpage. Their background > changes from blue to white. When I loaded them onto the server, they looked > very nice and they always looked good on netscape browsers. Every once and a > while though, the background turns bad and all the pictures look terrible on > AOL and Internet explorer. The colors don't fade evenly between each other > and it's rather ugly. I have to reload them or redraw them in order for them > to look the same on all the browsers. How can I fix this? > Very frustrated, > Patrick > > > -- > PHP General Mailing List (http://www.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] 404 handler
I have note tested this, but I think you can probably get this in before the apache header info: header("HTTP/1.0 200 OK"); I'll go test that, I've also got a 404 handler, and wouldn't mind never having 404s reported to IE :) -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Dieter Kneffel) > Organization: http://mopilot.com - your personal mobile agent > Newsgroups: php.general > Date: 22 Jan 2001 05:58:52 -0800 > Subject: [PHP] 404 handler > > Currently I use customized pages for 404 error handling. > Problem is, even if my HTML page is sent, the header still > contains the '404 not found' > > How can I avoid an '404 not found' header to be sent? > I want a normal page to show up without having sent > the usuall 404 header. > > Thanks, > > dk > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Sending a mail in HTML format
that html mail class is fantastical :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Jade Ohlhauser") > Newsgroups: php.general > Date: 23 Jan 2001 12:51:45 -0800 > Subject: Re: [PHP] Sending a mail in HTML format > > 1.that won't always display properly > 2.that doesn't allow for inline images > > To do it properly use MIME. Richard Heyes has already done all the hard work > for you: > http://www.zend.com/codex.php?id=103&single=1 > > . Jade Ohlhauser > [website architect]... http://bandwidthplace.com > > > - Original Message - > From: "Kristi Russell" <[EMAIL PROTECTED]> > To: "Pascal Clerin" <[EMAIL PROTECTED]> > Cc: "php" <[EMAIL PROTECTED]> > Sent: Saturday, January 20, 2001 11:31 PM > Subject: Re: [PHP] Sending a mail in HTML format > > >> Nothing special, just add at the beginning of what you're trying to >> send as HTML. Always worked for me? >> >> Kristi >> >> - Original Message - >> From: "Pascal Clerin" <[EMAIL PROTECTED]> >> To: <[EMAIL PROTECTED]> >> Sent: Saturday, January 20, 2001 8:46 PM >> Subject: [PHP] Sending a mail in HTML format >> >> >>> Hello, >>> >>> I want to send a mail in HTML format with the mail() function. >>> I have tried to send html stuff in the message parameter, but when I > read >> it >>> in my hotmail account, I just see the html code and not what the html is >>> supposed to show. >>> I suppose that it is necessary to send some additional headers to > specify >> that >>> the mail is in html format. >>> Thanks for your help. >>> >>> Pascal >>> >>> >>> Get free email and a permanent address at http://www.netaddress.com/?N=1 >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> To contact the list administrators, e-mail: [EMAIL PROTECTED] >>> >> >> >> -- >> PHP General Mailing List (http://www.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] zend ide & debugger
ola all, has anyone used the zend ide+debugger? before I slap down $800, I'd like to know if people who have think it's groovy.. :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] zend ide & debugger
> The IDE+Debugger combo really looks great, esp. because of the debug > support being AWOL in PHP4. I'm a little bit irked about that actually, they obviously stopped the "free" development on it, and moved it in house. But I guess you gotta put food on the table :) I really would prefer to have debug info printed to a browser instead of _only_ accessible through their IDE. anyway. > I'm a little worried about the IDE being written in java tho...I hope its > not as slow/memory hungry/crash happy as the other java + JRE apps I've > used... That's getting a bit better, I've got a couple apps that run fine on win2k that are java. they're memory pigs but that's the multiplatform life. also, you're sort of screwed if you want to go X + windows, without maintaining two separate codebases, so I understand the choice. plus, swing is very mac-esque, so I approve :) > Too bad there's not an evaluation version available for download. I've sent mail to one of their sales guys, adam, about that. The 30-day "evaluation" is pretty funny: you have to pay $100 for it. (come _on_)! _but_, for me the "encoder se" is worth the $800 right out, I can ensure some values stored in my apps right now are ripped up in a binary, which is extra-extra-groovy for security. -alex > Ben > > At 03:15 PM 1/23/2001, you wrote: >> ola all, >> >> has anyone used the zend ide+debugger? >> >> before I slap down $800, I'd like to know if people who have think it's >> groovy.. >> >> :) >> >> _alex >> >> >> -- >> Alex Black, Head Monkey >> [EMAIL PROTECTED] >> >> The Turing Studio, Inc. >> http://www.turingstudio.com >> >> vox+510.666.0074 >> fax+510.666.0093 >> >> Saul Zaentz Film Center >> 2600 Tenth St Suite 433 >> Berkeley, CA 94710-2522 >> >> >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php.ini
locate php.ini in windoze, the windows key+f, type in php.ini _a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Michael A. Peters") > Newsgroups: php.general > Date: 23 Jan 2001 18:07:42 -0800 > Subject: Re: [PHP] php.ini > > try find / -print |grep "php\.ini" after your make install. > will take awhile, but that should find it :D > > On Tuesday, January 23, 2001, at 04:44 PM, Rasmus Resen Amossen wrote: > >> Everybody talks about this nice configuration file, but where is it?! >> I have compiled php4 with apache, but even a »find . -name "php.ini« >> gives anything. >> Do I really need to recompile php to change its configuration? >> >> -- >> Rasmus Resen Amossen | stud.mat.dat at the University of Copenhagen >> Jagtvej 120, -244| http://www.math.ku.dk/muh >> 2200 Kbh. N | http://w1.1444.telia.com/~u14441 >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> >> > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=- > Michael A. Peters > Abriasoft Senior Developer > > (510) 623-9726x357 > Fax: (510) 249-9125 > -- > PHP General Mailing List (http://www.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] Form data is not "remembered"
> If the form page is not being cached, it would probably get reloaded > when they clicked back, thus losing the data. > > I'd suggest redrawing the form with the fields populated and with the > appropriate error messages. Then you don't need to mess with caches or > sessions for that matter, and the user doesn't need to take an extra > step to get back to the form. yep, best way is to move the control of your form into the php script itself, so the script can spit up the form with errors, saying "you screwed this, and that up" instead of making them go back, which 90% of the time will force them to re-enter the data, and we all know how much that sucks :) in short, don't use the php script like most people use cgi scripts. have it control the entire peocess. -alex -- PHP General Mailing List (http://www.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] building a language pack
I'm of the opinion that abstracting all "lang-specific" strings to an xml file is the easiest, cleanest way to go. that means "layman" authors can translate without screwing up your code, and you can get a lot of languages fast. it's also pretty convenient to get the strings out, and to add new ones. just assign an id, like: 12 hello, world bonjour, monde or something :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] > Newsgroups: php.general > Date: 24 Jan 2001 10:08:55 -0800 > Subject: [PHP] building a language pack > > I'm the author of an opensource php auctioning system and have recently been > receving alot of emails concerning the availibility of different languages. > I was wondering what the best way to build a sort of language pack would be > (one file for french, one for english, one for german, etc). Something like > replacing one file containing the language specs & translations would > translate the entire system. I'm just looking for recommendations before I > start asking volunteers to translate the words. Thanks. > > > > > > ___ > Send a cool gift with your E-Card > http://www.bluemountain.com/giftcenter/ > > > > -- > PHP General Mailing List (http://www.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] SMTP interface in php?
yes, manuel lemos has a fantastic one at phpclasses.upperdesign.com I've got it running a couple places, it works _really_ well :) but I've never done mass mailing with it. -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (George Schlossnagle) > Organization: Community Connect, Inc. > Newsgroups: php.general > Date: 24 Jan 2001 11:38:11 -0800 > Subject: [PHP] SMTP interface in php? > > Is there a generic SMTP interface library for php? Something akin to > perl's Net::SMTP. php's mail() is not terribly flexible for sending > mass mail, and I was going to write one that's a lower-level interface, > but I don't want to waste my time re-inventing the wheel if one already > exists > > Thanks, > > George > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.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] Integration of PHP with MS Outlook?
if you're using exchange server, I _think_ that runs on top of SQL server. so, yes, if all the above is true, and assuming it's possible to figure out the schema and what all the fields are for. then you could have php talk to SQL server, and insert records. my _guess_ is that I'm probably wrong, and outlook uses some terrible internal db that's hyper proprietary, which doesn't accept connections :) _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Chris Lee") > Newsgroups: php.general > Date: 24 Jan 2001 10:10:06 -0800 > Subject: Re: [PHP] Integration of PHP with MS Outlook? > > Well, php is server side, so wahtever you want todo serverside php can > probably try todo. is outlook express on the server? if not I doubt you'll > have any luck at all. > > You might be able to do this is if you had php dynamically write VBscript > and email that to the client. I dont know about that. > > PHP on a windows box can use windows DOM, if outlook express was on the > server then you might be able to use this too, I cant say for sure. All I > can say for sure is that php is serverside, so if ou want php todo anything > but serverside your looking in the wrong spot. > > Chris Lee > Mediawaveonline.com > > > > > "Jon Haworth" <[EMAIL PROTECTED]> wrote in message > 431205EC9190D4119E2800D0B720FA3F397343@BOOTROS">news:431205EC9190D4119E2800D0B720FA3F397343@BOOTROS... >> Hi list, >> >> Is it possible to get PHP to create entities in Outlook, specifically > tasks >> and calendar entries? >> >> TIA >> Jon >> >> >> Please visit us on the Internet: >> http://www.witanjardine.co.uk >> >> 'The information included in this e-mail is of a confidential nature and > is >> intended only for the addressee. If you are not the intended addressee, > any >> disclosure, copying or distribution by you is prohibited and may be >> unlawful. Disclosure to any party other than the addressee, whether >> inadvertent or otherwise is not intended to waive privilege of >> confidentiality' >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] easy question.
if(($fname) && ($lname) && ($email)) { echo "test"; } > > Is there an easier way to write the IF line? if (isset($fname) && isset($lname) && isset($email)) { echo "test"; } I believe the parens in your code don't do anything. anyway, best o' my knowledge that's the way to do it. "_) -a > Thank You > > .:: Nathan Cook [ [EMAIL PROTECTED] ] ::. > Systems & Network Administrator :: Programmer > [ phone - 208.343.3110 ][ pager - 208.387.9983 ] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.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] Turning off scrollbar
you cannot independently control the bottom scrollbar. if you want to get rid of it, find the problem in your table code, or if you layout is just too wide, make it less-wide :) I wish I could control that too, but nay. -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Chris Hayes") > Newsgroups: php.general > Date: 24 Jan 2001 14:25:55 -0800 > Subject: Re: [PHP] Turning off scrollbar > >> (Wac == "[EMAIL PROTECTED]") [EMAIL PROTECTED] writes: >> >> Wac> Can anyone tell me how to turn off the bottom scrollbar in both >> Wac> IE and Netscape?? > > Open the page from another page using javascript to open a window with > feature not to scroll. > See FAQS on www.irt.org or the Netscape Javascript guide. > > > > -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Cookie semi-security.
well, first off, you should md5 the cookie value or something to avoid having the value correlate directly with your system values. I like to use at least one level of "shift" in apps, to make sure that user input is never taken verbatim. -alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] ("Toby Butzon") > Newsgroups: php.general > Date: 24 Jan 2001 14:10:40 -0800 > Subject: Re: [PHP] Cookie semi-security. > > Enable track_vars in php's config and use > $PHP_COOKIE_VARS['cookie_id'] to get the value of the > cookie. > > --Toby > > - Original Message - > From: "April" <[EMAIL PROTECTED]> > To: "PHP General" <[EMAIL PROTECTED]> > Sent: Wednesday, January 24, 2001 5:06 PM > Subject: [PHP] Cookie semi-security. > > >> Stupid question, but I'm stumped. >> >> I'm passing a persons id through a cookie, then using that > to determine if >> they're allowed to be doing what they're trying to do > (change listings, >> etc.). Right now, I'm getting the value of the cookie by > just accessing >> $cookie_id, without anything fancy. The problem is, if > someoen just denies a >> cookie and adds ?cookie_id=9 at the end, they might as > well be the person >> with an id of 9. Is there a way for me to check and be > sure that that >> value came from a cookie, and not the url bar? >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: > [EMAIL PROTECTED] >> For additional commands, e-mail: > [EMAIL PROTECTED] >> To contact the list administrators, e-mail: > [EMAIL PROTECTED] >> >> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] setting register_globals off
Sort of along these lines, has anyone done tests to see if you can 100% ditch php.ini, and run all the php config info in httpd.conf? I'd much rather do it that way, I'd only have to maintain 1 file... _a On 1/25/01 1:36 AM, in article Pine.BSF.4.10.10101250910530.26823-10@localhost, "Philip Olson" <[EMAIL PROTECTED]> wrote: > Hi Catalin, > > I'm trying to decipher what can and cannot be set with ini_set myself and > am slowly figuring it out :-) This cannot be set this way but rather it > could be set through .htaccess so : > > this works in .htaccess : > > php_value register_globals off > > this will not work in script : > > ini_set("register_globals","off"); > > The latter will set the "local value" but it won't be of any use, it will > remain "on" although if you do ini_get("register_globals") right below it > it'll report them as "off" when in fact they are "on" There you have it. > The answer is "NO" as, as quoted from a similar question awhile ago : > > "Directives that affect actions that are taken before a script is > parsed, such as mangling EGPCS data, can not be changed by the script." >- Rasmus > > This certainly falls into that category. > > Regards, > > be outside the box. > Philip Olson > http://www.cornado.com/ > > > On Thu, 25 Jan 2001, Catalin Borcea wrote: > >> Can I set "register_globals=off" using a runtime configuration directive >> (something like )? >> >> TIA >> -- Catalin Borcea -- >> \\\|/// >> \\ - - // >>( @ @ ) >> -oOOO(_)OOOo >> >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > -- PHP General Mailing List (http://www.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] Best way to describe Doc as HTML
> print "Content-type: text/html\n\n"; That's the "perl" method, because perl doesn't have any native functions for adding stuff to the response header, so you just print it :) > header( "Content-type: test/html" ); The above is correct. _alex -- PHP General Mailing List (http://www.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] Compiler? (Was Re: [PHP] PHP site on CD-ROM)
Does the encoder have support for multiple file encoded "bundles" ? i.e. If there's an include statement in a file I encode, can I specify the included file should be wrapped in to the same file? Obviously that's a totally simplistic example, but you get the idea :) _alex -- PHP General Mailing List (http://www.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] get all defined constants?
hi all, can't find a function for getting a complete list of defined constants. this exists for classes, I think it must for constants even if it is undocumented. I'm writing a bit of debug code, and I'd rather not build a bunch of implicit knowledge about my set of constants into the code - I'd like to just dump everything in my environment onto the page. please respond to me @ [EMAIL PROTECTED] tia all, _alex -- PHP General Mailing List (http://www.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] get all defined constants?
> phpinfo() allways has a list of variables. but of course every variable is > allways in $GLOBALS too. including constants? I just print_r'd globals to refresh my memory, and found what I was expecting: none of my constants. ? _alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] array sort
hi all, I'm trying to do an array sort that takes: $test = array( array( // this is $test[0]. string => "this is the second", num => 2 ), array( // this is $test[1]. string=> "this is the first", num => 1 ), ); and sorts that array based on $test[$x][num], so I get: $test = array( array( // this was $test[1], now $test[0]. string=> "this is the first", num => 1 ), array( // this was $test[0], now $test[1]. string=> "this is the second", num => 2 ), ); Note that the key/value pairs _must_not_ change, so I can't just copy this stuff around to get what I want. (because I'm actually doing this for load order of class instances) so, I'm trying to sort the order of the top level arrays in a structure, based on a key. I played with array_moltisort, but could not get what I wanted out of it. I have this nagging feeling like I _could_ get what I want out of it, thus the post :) oh yes, please cc me @ [EMAIL PROTECTED] tia, all. _alex -- PHP General Mailing List (http://www.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 & URL Question - omitting index.php
> http://www.blahbalh.com/directory/?arg1=arg1&arg2=arg2 > > In this case the "directory" would have an index.php file that would react > based on the query string, but as you can see I'm not including the > index.php in the link. > > Is this o.k. or will some browsers get confused? I've never seen a problem with this: /?stuff=foo I like: /foo.php?stuff or better, if I'm willing to put in the time to do the apache config: /foo?stuff which I particularly like. have a look at http://www.arsdigita.com/doc/abstract-url _alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] array sort
> Use 'uasort()': > > function my_hash_sort( $a, $b) { > $a = $a['num']; > $b = $b['num']; > if( $a == $b) return 0; > return ( $a > $b) ? -1 : 1; > } > > uasort( $test, 'my_hash_sort'); hoping this wouldn't be the answer, thanks :) another for you: I've now coded my function, and the ordering works fine. except I'm inside a class and would really rather not include some strange little file with a single function in it. my code here on a whim, I tried uasort($this->modules[$group], '$this->_ary_sort()'); with no luck :) ideas? tia, _alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] array sort
> on a whim, I tried > uasort($this->modules[$group], '$this->_ary_sort()'); hi all, for those of you interested: uasort($this->modules[$group], array(&$this,'_ary_sort')); note the &$this... this is a very good point, if you use $this, a new instance of your class is created just to handle to sort :) elsewhere in the same class: function _ary_sort($a,$b) { return $a['init'] - $b['init']; } is my 'final' code (thanks markus). _alex -- PHP General Mailing List (http://www.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: [binarycloud-dev] Re: [PEAR-DEV] New Metabase Aniversaryrelease
>> I will first focus on the functional aspects, then step by step making >> the necessary changes to make that final code compliant to the PEAR >> coding standard. > This makes no sense for PEAR. > > I propose this way: > 1. pearize Metabase (functionNames, using PEAR_Error) > 2. commit the stuff to PEAR > 3. create a wrapper class matching PEAR::DB I agree with all but 3. Metabase offers a superset of the functionality available in pear, so the exiting API must be extended to support metabase's additional functionality. otherwise, Lukas, fantastic and I await your work... we will be using your code in binarycloud as soon as it's ready. Manuel: will you mintain metabase based on Lukas's work? i.e. is he taking a branch or are you working together? (I hope it is the latter... as I would really like to see the metabase code adhere to the pear coding standards). best, _alex -- PHP General Mailing List (http://www.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: [binarycloud-dev] Re: [PEAR-DEV] Re: [metabase-dev] RE:[PEAR-DEV] New Metabase Aniversary release
> * Manuel Lemos wrote: >> I think that the greatest point of the merger is to have one and only >> one abstraction layer in PEAR, > > I think consensus was that there shouldn't be "the one and > only XYZ" PEAR class but "more than one XYZ" PEAR class (like > IT[X] and the PEAR rewrite of PHPLib's Template class). Again, I agree about everything but database abstraction. It's fine to have applications use 5 different template engines as its only a matter of taste. binarycloud supports smarty, xslt, and standard php classes.. I'm sure we'll support more in the future. The database abstraction layer's behavior and capabilities dictate application development and we sure as hell don't want 5 abstraction layers with the same API floating around. IMHO that's actually _worse_ than just having different abstraction layers compete, because it can confuse new developers. We had this discussion a while ago, I was actually under the impression that everyone agreed that metabase was the most architecturally and functionally mature package, while PEAR clearly had a cleaner OO api because it wasn't burdened with PHP3 compatibility. I would _very_very_very_ much like to see metabase core code replace the current PEAR::DB codebase, but use the same API as the existing PEAR::DB. PEAR people and us out there building applications have a lot to gain if that happens. _If_ that happens I think we are all better for it: we gain both the good api and the mature package... and everyone can start using the same abstraction layer so we can all start sharing applications properly (again one of the primary ideas behind binarycloud). If it is indeed the intention of those running pear to (in the long run) have multiple abstraction layers, I think that is a bad mistake. However, until whoever decides these things makes themselves clear I don't really have an opinion :) _alex -- PHP General Mailing List (http://www.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: [binarycloud-dev] Re: [PEAR-DEV] Re: [metabase-dev] RE:[PEAR-DEV] New Metabase Aniversary release
> I'm currently writing "The PEAR Manifest", a document that clearly > defines PEAR once and for all. I'll post the first draft on pear-dev > here when it's done, but to answer your question, there has been talk > about a "core" set of packages for a while. In the manifest these are > called PFC (PHP Foundation Classes), although it will not say which > packages the PFC includes. The manifest also covers PECL, and how PEAR > relates to applications and frameworks. Fantastic. This is all great news and I really do look forward to working with you so we don't duplicate efforts. It's great to hear that you're going to "define" PEAR once and for all. best, _alex -- PHP General Mailing List (http://www.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: [binarycloud-dev] Re: [PHP] Re: Seeking comments: Horde or BinaryCloud
> What is the guestimate release date for r2? it depends on how much additional help we receive. the data i/o pipeline is functional and nearing completion our presentation tools are under development and I expect those to go pretty quickly there is some work left to do on the make system. and after that we need to generate usage/reference documentation for developers. with the current level of activity, probably the end of the month for the early releases and a "full" r2 ~3 weeks or a month after that. _alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SAP DB
hi all, One of the binarycloud developers just told me to have a look at the SAP OS database, SAPDB. I'm going to test it tomorrow to see if it actually does what it claims, but this _looks_ like serious OS competition to Oracle, and if it is I would very much like to use it for my next project. So, question: Has anyone used SAPDB with PHP? If so, experiences? And if not, are there plans for drivers? I looked in the manual and I didn't see any mention of SAPDB. Oh, and I just found a mention of PHP on the SAPDB site. Looks like the connection is over ODBC, which I really _really_ dislike... are there plans for anything native? like a sapdb_connect :)? In any case I think this database has a _HUGE_ amount of potential and PHP would benefit if access to SAPDB was possible. please e-mail me directly as I am not subscribed to the NGs: [EMAIL PROTECTED] or [EMAIL PROTECTED] thanks, _alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DEV] SAP DB
> SAP DB is just another name for AdabasD from a programmers point of view- Ah, cool. > http://www.php.net/manual/en/ref.odbc.php Well, yes. > " In addition to normal ODBC support, the Unified ODBC functions in PHP allow > you to access several databases that have borrowed the semantics of the ODBC > API to implement their own API. Instead of maintaining multiple database > drivers that were all nearly identical, these drivers have been unified > into a single set of ODBC functions." > > so the call interface to AdabasD/SapDB looks like ODBC, but you have > direct access to the database using PHP, you don't have to deal with > ODBC driver management and all the stuff if you don't want you AHA! Fantastic! > as said above: it is all there ... just the documentation could need > a little update ... Yes, As I didn't know that SAPDB = AdabasD I was unaware... In any case you have made my day, thank you :) All on bc-dev... hehehehe, + excellent +. and Mike, I'm going to use this. (as I suspect you will as well) _alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php