php-general Digest 18 Jan 2001 03:58:48 -0000 Issue 461 Topics (messages 35050 through 35248): Re: XML, what is that supposed to do? 35050 by: Chris Lee Re: How can I get a random number 35051 by: Chris Lee Hello 35052 by: Karl J. Stubsjoen 35053 by: Augusto Cesar Castoldi Re: I love/hate FrontPage - need another HTML editor. 35054 by: Chris Lee 35059 by: Jerry 35065 by: Matthew Aznoe 35066 by: Dan Wright 35068 by: Scott Gerhardt 35070 by: Toby Butzon 35071 by: Alexander Wagner 35072 by: Matthew Aznoe 35086 by: jeremy 35117 by: John Hinsley Matching irregular cases 35055 by: jalist 35057 by: Robert Collins 35058 by: jalist 35060 by: Toby Butzon Re: Question concerning performance 35056 by: Toby Butzon 35085 by: jeremy 35105 by: Toby Butzon Change the session timeout within a php-script 35061 by: Jens Rehpöhler 35067 by: Toby Butzon 35089 by: Jens Rehpöhler 35110 by: Toby Butzon Functions 35062 by: Karl J. Stubsjoen 35064 by: Toby Butzon Re: Problem with Exec() 35063 by: Zbynìk ©kvor ASP to PHP 35069 by: Karl J. Stubsjoen 35115 by: Michael Simcich include statement 35073 by: Michael Zornek 35074 by: Adam Wright 35075 by: Toby Butzon 35076 by: Alexander Wagner 35078 by: Michael Zornek 35081 by: Adam Wright 35084 by: Karl J. Stubsjoen 35093 by: Adam Wright Session, register_globals, $HTTP_SESSION_VARS??? 35077 by: Andrew Sitnikov 35143 by: Teodor Cimpoesu Apache .htaccess Help (OT) 35079 by: Website4S.aol.com Can I fork a PHP thread? 35080 by: Dylan McNamee 35092 by: Chris Lee Ok thanx sessions that was great, now it's time to go back home!!! 35082 by: Brandon Orther 35083 by: andy.petdance.com 35091 by: Brandon Orther 35098 by: darkfires.com Re: REGEX for tag attributes? 35087 by: Robert Collins Re: Creating a text file 35088 by: Ignacio Vazquez-Abrams PHP connecting to FIlemaker Database 35090 by: Brandon Orther Re: regexps 35094 by: Monte Ohrt Re: Perl regular expression bug 35095 by: Monte Ohrt error message handling 35096 by: Jason Jacobs 35112 by: Benjamin Munoz 35128 by: Alex Black Re: mail list archive 35097 by: Neil Zanella Merging PHPLIB into PEAR 35099 by: Sebastian Bergmann 35129 by: Alex Black Netscape rand() not random 35100 by: Joel Dossey 35106 by: Romulo Roberto Pereira 35114 by: Joel Dossey A little problem 35101 by: Emiliano Marmonti <? PHP vs. <? 35102 by: Karl J. Stubsjoen 35104 by: Egon Schmid (.work) 35107 by: Romulo Roberto Pereira 35108 by: Rasmus Lerdorf 35109 by: Toby Butzon 35125 by: Michael Talbot-Wilson 35138 by: Philip Olson 35144 by: Teodor Cimpoesu 35205 by: Thomas Deliduka 35206 by: Rasmus Lerdorf MySQL and Array Problem 35103 by: Jerry Lake 35113 by: Jerry Lake Re: Netscape differences? 35111 by: Jeff Warrington MySQL Disk Space Usage 35116 by: [ rswfire ] 35120 by: Romulo Roberto Pereira 35123 by: [ rswfire ] 35127 by: [ rswfire ] 35135 by: Romulo Roberto Pereira Re: Problems compiling LDAP into php 4.0.2 35118 by: Bill.Hoffman.walgreens.com 35178 by: Jani Taskinen new email address 35119 by: Tom Beidler 4.0.4pl1 still reports version as 4.0.3pl1 35121 by: Hans Lehmann 35136 by: Phil Driscoll Postgres pconnect 35122 by: H. Wade Minter Two things 35124 by: Phil Labonte 35126 by: Rasmus Lerdorf 35130 by: Benjamin Munoz Re: how do i hide my .inc files in apache?? 35131 by: Alex Black 35134 by: Jon Niola Possible Sybase bug 35132 by: Darryl Friesen determine number of days, hours & minutes between 2 dates 35133 by: jeremyf10.excite.com Apache's PATH_TRANSLATED 35137 by: Heino H. Gehlsen 35152 by: Heino H. Gehlsen php 4.0.5.dev will not read php.ini on NT 35139 by: Robert changed database context message 35140 by: Slappy Smith Search Engine submittal and PHP 35141 by: Shane McBride 35162 by: 10,000 Screaming Monkeys how reliable is Windows2000 / php ? 35142 by: Jamie Burns 35151 by: John Guynn PHP Win32 and *NIX 35145 by: Marc Clerc 35146 by: Alexander Wagner Re: Sessions/security 35147 by: Boget, Chris Session and Cookies 35148 by: Hendry Sumilo How to avoid submitting twice? 35149 by: Chakravarthy K Sannedhi phpwebhosting.com 35150 by: Matt \"TrollBoy\" Wiseman 35159 by: John Guynn 35170 by: Egan 35175 by: Michael Kimsal 35197 by: Egan 35199 by: Toby Butzon 35202 by: Egan 35203 by: John Guynn 35204 by: Toby Butzon 35208 by: Leonard T. Harris 35213 by: Egan 35214 by: Jason Murray 35215 by: Egan 35218 by: Ken 35219 by: Josh G 35222 by: Egan 35233 by: php3.developersdesk.com PHP not working on Win95/Apache 35153 by: Phil Scopes Weird nested while loop problem 35154 by: Maurice Rickard 35156 by: Darryl Friesen 35177 by: Rasmus Lerdorf 35180 by: Maurice Rickard 35181 by: Darryl Friesen 35182 by: Ignacio Vazquez-Abrams 35183 by: Maurice Rickard 35185 by: Darryl Friesen 35188 by: Maurice Rickard Rounding a number up if the number is anything more than a whole number 35155 by: Brandon Orther 35158 by: Ignacio Vazquez-Abrams Mailto: tag, how do I insert line breaks..? 35157 by: David Bouw 35161 by: 10,000 Screaming Monkeys 35172 by: Ignacio Vazquez-Abrams Re: problem using flock() 35160 by: 10,000 Screaming Monkeys Homepage 35163 by: S Bey 35164 by: Alexander Wagner 35165 by: 10,000 Screaming Monkeys 35166 by: jeremy 35167 by: Kurth Bemis 35173 by: Romulo Roberto Pereira Ver3.0 Includes 35168 by: Karl J. Stubsjoen Hyperlink? 35169 by: Wee Chua 35171 by: Kurth Bemis 35174 by: Paquin, Dominique 35176 by: Romulo Roberto Pereira Strange pdf function error? 35179 by: Leonard T. Harris 35187 by: Jani Taskinen Register globals when option is turned on 35184 by: Carsten Gehling 35186 by: Ignacio Vazquez-Abrams < Levels of Access > 35189 by: Abe 35190 by: Ignacio Vazquez-Abrams 35191 by: Jason Murray 35192 by: Josh G 35194 by: Javier Muniz 35200 by: Chris Aitken LDAP access to MS Exchange server 35193 by: Jonathan Coker 35195 by: Ignacio Vazquez-Abrams 35241 by: Dan Lowe PHP locking up 35196 by: Phil Scopes 35198 by: Cal Evans mysql_fetch_row() and mysql_fetch_array()? 35201 by: Jimmy Bäckström 35207 by: Ignacio Vazquez-Abrams Sub Newbie Question On Error Message 35209 by: Dave Stewart 35210 by: Toby Butzon 35211 by: Romulo Roberto Pereira 35223 by: Dave Stewart Re: Sub Newbie Question On Error Message - Corrected... 35212 by: Romulo Roberto Pereira APC version 1.0.4 released 35216 by: Daniel Cowgill What's this? (IP-MIB) (IF-MIB) 35217 by: Robert String to Variable converstion 35220 by: Paul Cohen 35221 by: Ignacio Vazquez-Abrams 35229 by: Cal Evans Re: best user authentication method? 35224 by: Miles Thompson 35228 by: Miles Thompson Extracting Data from a URL output 35225 by: Chris Aitken 35230 by: Benjamin Munoz Grabbing referring keywords..... 35226 by: Dallas Kropka Re: How to escape from a function? 35227 by: Zenith Ethics question... 35231 by: Shane McBride 35232 by: Rasmus Lerdorf 35234 by: jeremy brand 35235 by: Maxim Maletsky 35236 by: Rasmus Lerdorf 35237 by: Kath 35238 by: Scott Gerhardt 35239 by: jeremy brand 35240 by: Rasmus Lerdorf 35242 by: Maxim Maletsky 35244 by: Maxim Maletsky 35245 by: Shane McBride HTML source in Apache error log 35243 by: Chien-pin Wang 35246 by: Jason Murray Installing with apache 35247 by: Assem Salama identifying clicked link? 35248 by: andrew Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
To everyone that wrote in answering this question, thanks. The answers were very interesting and well writen, I didn't post the origonal question but I am glad he did, Ive learned alot about something I allways wondered about :) On a side note, anyone ever see any good tutorials for XML - php ? Chris Lee Mediawaveonline.com "Brandon Orther" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello Everybody, > > I have seen a lot of people ask for XML support for PHP. I was wondering > what it does that makes it good for PHP. > > 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] >
This might not be quite what your looking for, but I often have then need for a unique number in an incrementing order. random isnt quite the word for it, unique is :) function mtime() { $mtime = microtime(); $mtime = str_replace("\.", '', $mtime); $mtime = explode(' ', $mtime); $mtime = $mtime[1] . $mtime[0]; return($mtime); } Chris Lee Mediawaveonline.com "Angela" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I see that you got a lot of responses, but I didn't see anyone using > what I use. I had problems using rand() because it wasn't quite random > enough. The following code is as random as you can get (at least from > what I've seen). > > mt_srand ((double) microtime() * 1000000); > $myrandomnumber = mt_rand($min_number, $max_number); > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hello, I'm an ASP guy gone PHP. So, be patient with me as I struggle my way with PHP. I have a some experience with writing C like syntax, as with JavaScript and TCL. I hope to pick up PHP quickly. 2 Questions: How to declare function and sub routines. How to call functions and sub routines. Thanks!
You can take a look here: http://www.php.net/manual/en/html/functions.html It's the documentation of PHP. regards, Augusto Cesar Castoldi On Wed, 17 Jan 2001, Karl J. Stubsjoen wrote: > Hello, > > I'm an ASP guy gone PHP. So, be patient with me as I struggle my way with > PHP. I have a some experience with writing C like syntax, as with > JavaScript and TCL. I hope to pick up PHP quickly. > > 2 Questions: > How to declare function and sub routines. > How to call functions and sub routines. > > Thanks! > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I use ultraedit 8.0 this editor rocks :) on a side note as someone else posted, 'everyone to their own' it dont matter what editor you love as long as the work gets done. Chris Lee Mediawaveonline.com ""Murph"" <[EMAIL PROTECTED]> wrote in message 003201c08027$e886c480$[EMAIL PROTECTED]">news:003201c08027$e886c480$[EMAIL PROTECTED]... Hi. FrontPage sucks for working with PHP. I've been doing all my coding by hand and that's fine as far as it goes but I just got a promotion at work where everyone uses FrontPage so I bought it to see how I can use it to show these old dogs some new tricks. Nice program. Allows for workgroups where different people can work on different parts of a project. That'll come in handy. It also has some nice tree charts to show you where the project is branching out and generates some useful reports like where the dead links are. What I *really* liked about it was the ability to apply a common theme across all my pages. Man, that was pretty cool. Plus, let's face it, using an HTML editor really takes some of the drudgery out of designing your pages. The problem is, if the web page that is designed with FrontPage doesn't end with a regularly accepted filename extension like *.htm, FrontPage doesn't seem to really know how to handle it and I need it to handle pages that end with *.php. What are my options? I don't think I missed anything with FrontPage after scouring the manual and online and inline help pages. Anyone out there using an HTML editor that they'd like to recommend? Why? Are there any FAQs I should be reading for this answer? Maybe I should just use a style sheet for a common look and for the rest, suck it up and take it like a man? Yours, Murph www.murphatnight.com __________________________________________________________________ Brian Murphy - 193A Lowell St., Apt. 24 - Methuen, MA 01844 - (978) 725-6654
In article <008301c0803a$ff59af20$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Murph") wrote: > But, you know, the look and feel of a site is pretty important and an > HTML editor goes a long way toward managing that part. If you can > find an editor that helps you set up some style sheets that carry > across all your pages without you having to type in all the code for > every page, you're golden. Why would you type in style sheet code on every page if you do it by hand? Doesn't that defeat half the purpose of style sheets? Jerry -- http://www.hoboes.com/jerry/ "Give a man a fish and you feed him for a day. Teach him to fish, and you've depleted the lake."--It Isn't Murder If They're Yankees (http://www.hoboes.com/jerry/Murder/)
Have any of you tried using EditPlus? (www.editplus.com) This is a great little editor for HTML, JavaScript, and PHP. You can download extra modules for color syntax hilighting of practically any language you can think of including many different databases. It has some nice useful HTML features and good handling of multiple documents... and most importantly, you don't have to worry about it mangling your code. It is helpful while also staying out of your way. The more I use it, the more I like it. It is simple, elegant, and it gives me all the control that I want. Its inexpensive and comes with a thirty day trial. Check it out. BTW, I do not work for EditPlus or have any association with them other than that of a satisfied customer. Matthew Aznoe
Homesite from Allaire - although $99US is what I have been using for years. I really like it for editing PHP, HTML, and JavaScript. Dan ""Murph"" <[EMAIL PROTECTED]> wrote in message 003201c08027$e886c480$[EMAIL PROTECTED]">news:003201c08027$e886c480$[EMAIL PROTECTED]... Hi. FrontPage sucks for working with PHP. I've been doing all my coding by hand and that's fine as far as it goes but I just got a promotion at work where everyone uses FrontPage so I bought it to see how I can use it to show these old dogs some new tricks. Nice program. Allows for workgroups where different people can work on different parts of a project. That'll come in handy. It also has some nice tree charts to show you where the project is branching out and generates some useful reports like where the dead links are. What I *really* liked about it was the ability to apply a common theme across all my pages. Man, that was pretty cool. Plus, let's face it, using an HTML editor really takes some of the drudgery out of designing your pages. The problem is, if the web page that is designed with FrontPage doesn't end with a regularly accepted filename extension like *.htm, FrontPage doesn't seem to really know how to handle it and I need it to handle pages that end with *.php. What are my options? I don't think I missed anything with FrontPage after scouring the manual and online and inline help pages. Anyone out there using an HTML editor that they'd like to recommend? Why? Are there any FAQs I should be reading for this answer? Maybe I should just use a style sheet for a common look and for the rest, suck it up and take it like a man? Yours, Murph www.murphatnight.com __________________________________________________________________ Brian Murphy - 193A Lowell St., Apt. 24 - Methuen, MA 01844 - (978) 725-6654 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
It is NOT ported to Linux is it? I couldn't find any information on the website indicating weather it was compiled for *NIX or not. - Scott > Have any of you tried using EditPlus? (www.editplus.com) This is a great > little editor for HTML, JavaScript, and PHP. You can download > extra modules > for color syntax hilighting of practically any language you can think of > including many different databases. It has some nice useful HTML features > and good handling of multiple documents... and most importantly, you don't > have to worry about it mangling your code. It is helpful while > also staying > out of your way. The more I use it, the more I like it. It is simple, > elegant, and it gives me all the control that I want. Its inexpensive and > comes with a thirty day trial. Check it out. > > BTW, I do not work for EditPlus or have any association with them > other than > that of a satisfied customer. > > Matthew Aznoe > >
Nope. EditPlus is Windows-only. --Toby ----- Original Message ----- From: "Scott Gerhardt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Php-General-Digest" <[EMAIL PROTECTED]>; "Chris Aitken" <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 11:54 AM Subject: RE: [PHP] I love/hate FrontPage - need another HTML editor. > It is NOT ported to Linux is it? > I couldn't find any information on the website indicating weather it was > compiled for *NIX or not. > > - Scott > > > Have any of you tried using EditPlus? (www.editplus.com) This is a great > > little editor for HTML, JavaScript, and PHP. You can download > > extra modules > > for color syntax hilighting of practically any language you can think of > > including many different databases. It has some nice useful HTML features > > and good handling of multiple documents... and most importantly, you don't > > have to worry about it mangling your code. It is helpful while > > also staying > > out of your way. The more I use it, the more I like it. It is simple, > > elegant, and it gives me all the control that I want. Its inexpensive and > > comes with a thirty day trial. Check it out. > > > > BTW, I do not work for EditPlus or have any association with them > > other than > > that of a satisfied customer. > > > > Matthew Aznoe > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
Scott Gerhardt wrote: > It is NOT ported to Linux is it? > I couldn't find any information on the website indicating weather it was > compiled for *NIX or not. Use emacs. Or vi. Or quanta. Or something else. Wagner -- One maniac alone can do what 20 together cannot
Sadly, no. As far as I know, it is a completely windows product. I am currently developing on a Windows box using Samba to access the files on my UNIX box from windows. Its not necessarily the best way of doing things and it requires two computers, but it seems to get the job done, and since I need to use Windows anyway for my company's standards of MS Office and Outlook, its tolerable. When running exclusively in UNIX, I run Elvis, a graphical vi with syntax hilighting. XEmacs also is not a bad option, but Elvis is much faster. Matthew Aznoe -----Original Message----- From: Scott Gerhardt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 9:54 AM To: [EMAIL PROTECTED]; Php-General-Digest; Chris Aitken Subject: RE: [PHP] I love/hate FrontPage - need another HTML editor. > It is NOT ported to Linux is it? > I couldn't find any information on the website indicating weather it was > compiled for *NIX or not. > > - Scott >> Have any of you tried using EditPlus? (www.editplus.com) This is a great >> little editor for HTML, JavaScript, and PHP. You can download >> extra modules >> for color syntax hilighting of practically any language you can think of >> including many different databases. It has some nice useful HTML features >> and good handling of multiple documents... and most importantly, you don't >> have to worry about it mangling your code. It is helpful while >> also staying >> out of your way. The more I use it, the more I like it. It is simple, >> elegant, and it gives me all the control that I want. Its inexpensive and >> comes with a thirty day trial. Check it out. >> >> BTW, I do not work for EditPlus or have any association with them >> other than >> that of a satisfied customer. >> >> Matthew Aznoe >> >>
I also find that ultraedit (forgive the goofy name, it's a _great_ app) works really well if I've got to code in a windows world. It's very flexible and fast on just any machine I've ever tried it on, while also doing syntax highlighting and compiling if you want it to. check it out at www.ultraedit.com It's actually the first piece of shareware that I had payed for, it's that good --something like $40 US, it's been a couple of years since I bought a license for it. Hmm, maybe I should go upgrade..... jeremy -- Jeremy Kelley <[EMAIL PROTECTED]> pgp keyid 0xAECBA355 Phil 1:21 www.ganooz.com Car pour moi, la vie c'est le Christ, et la mort est un gain. > -----Original Message----- > From: Matthew Aznoe [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 17, 2001 17:21 > To: Php-General-Digest; Chris Aitken > Subject: RE: [PHP] I love/hate FrontPage - need another HTML editor. > > > Have any of you tried using EditPlus? (www.editplus.com) > This is a great > little editor for HTML, JavaScript, and PHP. You can > download extra modules > for color syntax hilighting of practically any language you > can think of > including many different databases. It has some nice useful > HTML features > and good handling of multiple documents... and most > importantly, you don't > have to worry about it mangling your code. It is helpful > while also staying > out of your way. The more I use it, the more I like it. It > is simple, > elegant, and it gives me all the control that I want. Its > inexpensive and > comes with a thirty day trial. Check it out. > > BTW, I do not work for EditPlus or have any association with > them other than > that of a satisfied customer. > > Matthew Aznoe > >
Coming in on this late and from another platform: I use Bluefish and Gvim under Unix. Of the two, Gvim is probably the most configurable editor out there (macros, syntax highlighting, runs its own scripts, uses a variety of scripting languages) and is available for Windows. It's free (well, it's really charity ware) and Open Source. While Bluefish is a nice non-gui HTML editor, Gvim is what I use for "serious" coding in C, C++, Perl, Python, PHP and so on and on. It has "unlimited" undoos and built in syntax highlighting for languages I've never encountered in the "real world" (and a few I've never heard of). Highly recommended. Incidentally, could'nt you use PHP to manage the "look" at a CSS level? Should this be the job of the editor? -- ****************************************************************************** Marx: "Why do Anarchists only drink herbal tea?" Proudhon: "Because all proper tea is theft." ******************************************************************************
I think this'll be an easy one for you fellas... I'm writing a search function for my site. The code to search the mysql db's are in place and working but here's the problem. For any matches that are displayed, I want to change the search query so it stands out in the result list. I'm just using... ereg_replace($search_query, "<b>$search_query</b>", $row[6]); ...at the moment, but it wont match results where the case doesn't match. Ie if the search query is "blah", the mysql search will return both "blah" and "Blah" but the ereg_replace will only add the <b> tag to the "blah" result, not the "Blah" one. Thanks in advance. Steve
Steve, Try the ereg_replace()somthing like this: eregi_replace($search_query, "<b>$search_query</b>", $row[6]); Robert W. Collins Web Developer II Insight / TC Computers www.insight.com www.tccomputers.com -----Original Message----- From: jalist [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 8:47 AM To: [EMAIL PROTECTED] Subject: [PHP] Matching irregular cases I think this'll be an easy one for you fellas... I'm writing a search function for my site. The code to search the mysql db's are in place and working but here's the problem. For any matches that are displayed, I want to change the search query so it stands out in the result list. I'm just using... ereg_replace($search_query, "<b>$search_query</b>", $row[6]); ...at the moment, but it wont match results where the case doesn't match. Ie if the search query is "blah", the mysql search will return both "blah" and "Blah" but the ereg_replace will only add the <b> tag to the "blah" result, not the "Blah" one. Thanks in advance. Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
(/me smacks head) thanks, completely forgot about that. Steve -----Original Message----- From: Robert Collins [mailto:[EMAIL PROTECTED]] Sent: 17 January 2001 15:57 To: 'jalist'; [EMAIL PROTECTED] Subject: RE: [PHP] Matching irregular cases Steve, Try the ereg_replace()somthing like this: eregi_replace($search_query, "<b>$search_query</b>", $row[6]); Robert W. Collins Web Developer II Insight / TC Computers www.insight.com www.tccomputers.com
> displayed, I want to change the search query so it stands out in the result > list. I'm just using... > ereg_replace($search_query, "<b>$search_query</b>", $row[6]); > ...at the moment, but it wont match results where the case doesn't match. Try eregi_replace... php.net/eregi_replace --Toby
> Example ONE: (in just parse mode) > --------[cut]--------------- > <? > print "<html-tag>blah blah blah blah blah blah blah</html-tag>"; > print "<html-tag>" . $Var1 . "</html-tag><b-tag>" . $Var2 . "</b-tag>"; > ?> > --------[/cut]-------------- Ran a pretty rough benchmark: 10040 lines of code (5020 repetitions of the above example) 10 times with an average execution time of 6.07904628515244 seconds. > Example TWO: (in html && parse mode) > --------[cut]--------------- > <html-tag>blah blah blah blah blah blah blah</html-tag> > <html-tag><?=$Var1;?></html-tag><b-tag><?=$Var2;?></b-tag> > --------[/cut]-------------- Same benchmark, except these two lines were used instead of the two lines in the above case (obviously). Again, 10 executions; this time the average execution time was 6.40339350700379 seconds. There are 100 ways error could've been introduced into this test; even so, the results seem to lean towards not switching between html & php modes... although, you're talking about 1000 lines of code, and the test used 10 times that, and the resulting difference was a little more than 3 tenths of a second... if you compared it with 1/10th of the code (your 1000 line file), you'd probably have a difference in the hundredths-of-a-second range. It's up to you, but I agree with what Christian said - I'd probably shoot for being able to maintain the code; with such a little speed difference you might as well set up more servers than optimize for 1/5th of a second in execution time. --Toby
Now THAT's the kind of answer I was looking for. Thanks very much for checking that out. Mind if I ask what you used for your benchmarking/timing software-wise? blest, jeremy -- Jeremy Kelley <[EMAIL PROTECTED]> pgp keyid 0xAECBA355 Phil 1:21 www.ganooz.com Car pour moi, la vie c'est le Christ, et la mort est un gain. > -----Original Message----- > From: Toby Butzon [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 17, 2001 16:55 > To: jeremy; [EMAIL PROTECTED] > Subject: Re: [PHP] Question concerning performance > > > > Example ONE: (in just parse mode) > > --------[cut]--------------- > > <? > > print "<html-tag>blah blah blah blah blah blah blah</html-tag>"; > > print "<html-tag>" . $Var1 . "</html-tag><b-tag>" . $Var2 . > "</b-tag>"; > > ?> > > --------[/cut]-------------- > > Ran a pretty rough benchmark: 10040 lines of code (5020 > repetitions of the > above example) 10 times with an average execution time of > 6.07904628515244 > seconds. > > > > Example TWO: (in html && parse mode) > > --------[cut]--------------- > > <html-tag>blah blah blah blah blah blah blah</html-tag> > > <html-tag><?=$Var1;?></html-tag><b-tag><?=$Var2;?></b-tag> > > --------[/cut]-------------- > > Same benchmark, except these two lines were used instead of > the two lines > in the above case (obviously). Again, 10 executions; this > time the average > execution time was 6.40339350700379 seconds. > > There are 100 ways error could've been introduced into this > test; even so, > the results seem to lean towards not switching between html & > php modes... > although, you're talking about 1000 lines of code, and the > test used 10 > times that, and the resulting difference was a little more > than 3 tenths of > a second... if you compared it with 1/10th of the code (your 1000 line > file), you'd probably have a difference in the hundredths-of-a-second > range. > > It's up to you, but I agree with what Christian said - I'd > probably shoot > for being able to maintain the code; with such a little speed > difference > you might as well set up more servers than optimize for 1/5th > of a second > in execution time. > > --Toby > > > -- > PHP General Mailing List (http://www.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's time functions and this little library I put together a while back - http://imawebdesigner.com/utils/runtime_clock --Toby ----- Original Message ----- From: "jeremy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 12:49 PM Subject: RE: [PHP] Question concerning performance > Now THAT's the kind of answer I was looking for. Thanks very much for > checking that out. > > Mind if I ask what you used for your benchmarking/timing software-wise? > > blest, > jeremy > > > -- > Jeremy Kelley <[EMAIL PROTECTED]> pgp keyid 0xAECBA355 > Phil 1:21 www.ganooz.com > Car pour moi, la vie c'est le Christ, et la mort est un gain. > > > -----Original Message----- > > From: Toby Butzon [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, January 17, 2001 16:55 > > To: jeremy; [EMAIL PROTECTED] > > Subject: Re: [PHP] Question concerning performance > > > > > > > Example ONE: (in just parse mode) > > > --------[cut]--------------- > > > <? > > > print "<html-tag>blah blah blah blah blah blah blah</html-tag>"; > > > print "<html-tag>" . $Var1 . "</html-tag><b-tag>" . $Var2 . > > "</b-tag>"; > > > ?> > > > --------[/cut]-------------- > > > > Ran a pretty rough benchmark: 10040 lines of code (5020 > > repetitions of the > > above example) 10 times with an average execution time of > > 6.07904628515244 > > seconds. > > > > > > > Example TWO: (in html && parse mode) > > > --------[cut]--------------- > > > <html-tag>blah blah blah blah blah blah blah</html-tag> > > > <html-tag><?=$Var1;?></html-tag><b-tag><?=$Var2;?></b-tag> > > > --------[/cut]-------------- > > > > Same benchmark, except these two lines were used instead of > > the two lines > > in the above case (obviously). Again, 10 executions; this > > time the average > > execution time was 6.40339350700379 seconds. > > > > There are 100 ways error could've been introduced into this > > test; even so, > > the results seem to lean towards not switching between html & > > php modes... > > although, you're talking about 1000 lines of code, and the > > test used 10 > > times that, and the resulting difference was a little more > > than 3 tenths of > > a second... if you compared it with 1/10th of the code (your 1000 line > > file), you'd probably have a difference in the hundredths-of-a-second > > range. > > > > It's up to you, but I agree with what Christian said - I'd > > probably shoot > > for being able to maintain the code; with such a little speed > > difference > > you might as well set up more servers than optimize for 1/5th > > of a second > > in execution time. > > > > --Toby > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
Hi, is it possible to change the session timeout from within a script. I can't change it in the *.ini-file because I have not the sufficient access rights. Jens
set_time_limit($seconds) --Toby ----- Original Message ----- From: "Jens Rehpöhler" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 9:02 AM Subject: [PHP] Change the session timeout within a php-script > Hi, > > is it possible to change the session timeout from within a script. I can't > change it in the *.ini-file because I have not the sufficient access rights. > > Jens > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
I think you understood me wrong. I don't want to change (or limit) the execution time of a script. I want to change the lifetime of a http session. Toby Butzon wrote: > set_time_limit($seconds) > Jens
Setting the $seconds value to 0 makes the timeout value of the script unlimited. If you're having problems with the browser timing out, try sending a space every few seconds to keep the connection open. If I'm still misunderstanding your question, my apologies. --Toby ----- Original Message ----- From: "Jens Rehpöhler" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Toby Butzon" <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 1:05 PM Subject: Re: [PHP] Change the session timeout within a php-script > I think you understood me wrong. I don't want to change (or limit) the execution > time of a script. I want to change the lifetime of a http session. > > Toby Butzon wrote: > > > set_time_limit($seconds) > > > > Jens > > >
Okay, There aren't Sub Routines, just Functions? I've been to the manual recommended by Augusto *thank you*, that is helping! I created a function called Foo with a single argument (and I set it up as optional, that is way cool, I can't do that in ASP) ... and my question is: I can call foo like this echo foo(dog); // outputs "This is a dog" or like this echo foo('dog'); // outputs "This is a dog" or like this echo foo("dog"); // outputs "This is a dog" Does it matter which way I pass my arguments to foo? All arguments were passed as a string variable.
> echo foo(dog); // outputs "This is a dog" This is an example of using a "bareword" - PHP doesn't recognize _dog_ as any sort of reserved word or constant, so it sends it like a quoted string. I don't recommend using this because it's ambiguous whether you mean "dog" or if _dog_ is a constant or whatever else is possible. > echo foo('dog'); // outputs "This is a dog" Single-quoted string: this is good for strings that don't need to be "interpretted" by the parser; it's the ideal way to pass the string 'dog' to foo() in this case. > echo foo("dog"); // outputs "This is a dog" Double-quoted string: this WILL be interpretted by the parser; for example, if you had to pass the whole string "This is a dog" to the function, but "dog" could actually be any word contained in $thing, then you'd do something like this: echo foo("This is a $thing"); Et cetera... > > Does it matter which way I pass my arguments to foo? All arguments were > passed as a string variable. There are some very slight performance changes between these, but mostly it's a matter of style. --Toby
Hello, Is there anybody in this conference who can tell me whether exec() will work under WinNT in future PHP releases? I am bound to use Windows. Currently I am working this around so that I have a daemon under NT. Daemon watches out for commands, written by PHP into a file, and does the exec() job on his own. PHP then reads results from another file .... It works, but I hate it .... Thanks Zbynek Jon Haworth wrote: > | > | It should also be noted that the system interaction functions (namely, > | passthru(), exec(), system() and popen()) are > | broken/incorrectly implemented, > | actually, its windows that's incorrectly implemented, but be > | that as it may, the > | functions do not work with windows). > > Well, I guess that clears that up... cheers Mr. Gates > > | > | To the original poster: > | > > Hello.... > > | Use PHP's built-in mail() function instead, don't fork > | out to sendmail, > | actually, better yet, use linux :-). > > I spotted the mail() function about ten minutes after I posted... (and I > would be on a linux box if I could persuade my boss) > > Cheers > Jon > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- ----------------------------------------------------------------------- Zbynek Skvor Coordinator Region 8 IEEE Voluntary Contribution Fund mail: [EMAIL PROTECTED] fax: +420-2-3119958 www: http://www.cvut.cz/ascii/fee/k317/personnel/skvor
Is there such thing as program that will convert ASP code to PHP code? I have built some nice libraries with ASP and am interested in converting those over to PHP, rather than rewriting them! Thanks!
Try asp2php: http://asp2php.naken.cc/home.php Michael Simcich AccessTools -----Original Message----- From: Karl J. Stubsjoen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 8:48 AM To: PHP Mailing List Subject: [PHP] ASP to PHP Is there such thing as program that will convert ASP code to PHP code? I have built some nice libraries with ASP and am interested in converting those over to PHP, rather than rewriting them! Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
I'm a PHP newbie and am looking into using the include statement to put things like the header and footer in so they are always the same. I do this now with SSI. In SSI I'll use the following statement: <!--#include virtual="/includes/metatags.include" --> I like this cause it lets me use the same statement all over the site and I don't have to worry about where the document is and how many directories i have to go up an into "../../../../../" I was guessing PHP's version would be: <?PHP include("/includes/metatags.include"); ?> However I get an error. If I put the absolute it works: <?PHP include("/home/httpd/includes/metatags.include"); ?> which is scary cause this worked too: <?PHP include("/usr/local/apache/conf/httpd.conf"); ?> doesn't this seem like a huge security hole? Well what I want is to use something like /inc/footer.html so i can use the same PHP statements in any document and not worry about getting it "../../../" Any suggestions. Mike
This is because the PHP include statement is ment to include other blocks of PHP code, rather than bits of HTML. Hence, it includes things from anywhere on the system. To include things from under your current htdocs directory, use... include($DOCUMENT_ROOT . "/includes/metatags.include"); though the more 'correct' method would be readfile($DOCUMENT_ROOT . "/includes/metatags.include"); adamw ----- Original Message ----- From: "Michael Zornek" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 5:04 PM Subject: [PHP] include statement > I'm a PHP newbie and am looking into using the include statement to > put things like the header and footer in so they are always the same. > > I do this now with SSI. In SSI I'll use the following statement: > > <!--#include virtual="/includes/metatags.include" --> > > I like this cause it lets me use the same statement all over the site > and I don't have to worry about where the document is and how many > directories i have to go up an into "../../../../../" > > I was guessing PHP's version would be: > > <?PHP > include("/includes/metatags.include"); > ?> > > However I get an error. If I put the absolute it works: > > <?PHP > include("/home/httpd/includes/metatags.include"); > ?> > > which is scary cause this worked too: > > <?PHP > include("/usr/local/apache/conf/httpd.conf"); > ?> > > doesn't this seem like a huge security hole? > > Well what I want is to use something like /inc/footer.html so i can > use the same PHP statements in any document and not worry about > getting it "../../../" > > Any suggestions. > Mike > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
This all depends on your include_path set in the PHP config files; see the manual section on config for more info. About the security hole... yes it would be dangerous on a system where accounts are given to untrusted users (ie, customers), but there are ways to make PHP secure for multi-account environments as well; this is also is described in the manual. php.net/manual --Toby ----- Original Message ----- From: "Michael Zornek" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 12:04 PM Subject: [PHP] include statement > I'm a PHP newbie and am looking into using the include statement to > put things like the header and footer in so they are always the same. > > I do this now with SSI. In SSI I'll use the following statement: > > <!--#include virtual="/includes/metatags.include" --> > > I like this cause it lets me use the same statement all over the site > and I don't have to worry about where the document is and how many > directories i have to go up an into "../../../../../" > > I was guessing PHP's version would be: > > <?PHP > include("/includes/metatags.include"); > ?> > > However I get an error. If I put the absolute it works: > > <?PHP > include("/home/httpd/includes/metatags.include"); > ?> > > which is scary cause this worked too: > > <?PHP > include("/usr/local/apache/conf/httpd.conf"); > ?> > > doesn't this seem like a huge security hole? > > Well what I want is to use something like /inc/footer.html so i can > use the same PHP statements in any document and not worry about > getting it "../../../" > > Any suggestions. > Mike > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
Michael Zornek wrote: > which is scary cause this worked too: > > <?PHP > include("/usr/local/apache/conf/httpd.conf"); > ?> > > doesn't this seem like a huge security hole? No. If you know can trust your scripts, this is possible, but trusted scripts won't do any abuse, will they? If you can't trust your scripts, use safe-mode, and it isn't possible any more. Wagner -- One maniac alone can do what 20 together cannot
Adam(and everyone else who answers in 5 minutes, god i love this list), thanks for the help. Why is readfile more 'correct'? Just wondering? Mike At 5:07 PM +0000 1/17/01, Adam Wright wrote: >This is because the PHP include statement is ment to include other blocks of >PHP code, rather than bits of HTML. Hence, it includes things from anywhere >on the system. To include things from under your current htdocs directory, >use... > >include($DOCUMENT_ROOT . "/includes/metatags.include"); > >though the more 'correct' method would be > >readfile($DOCUMENT_ROOT . "/includes/metatags.include"); > >adamw > >----- Original Message ----- >From: "Michael Zornek" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Wednesday, January 17, 2001 5:04 PM >Subject: [PHP] include statement > > >> I'm a PHP newbie and am looking into using the include statement to >> put things like the header and footer in so they are always the same. >> >> I do this now with SSI. In SSI I'll use the following statement: >> >> <!--#include virtual="/includes/metatags.include" --> >> >> I like this cause it lets me use the same statement all over the site >> and I don't have to worry about where the document is and how many >> directories i have to go up an into "../../../../../" >> >> I was guessing PHP's version would be: >> >> <?PHP >> include("/includes/metatags.include"); >> ?> >> >> However I get an error. If I put the absolute it works: >> >> <?PHP >> include("/home/httpd/includes/metatags.include"); >> ?> >> >> which is scary cause this worked too: >> >> <?PHP >> include("/usr/local/apache/conf/httpd.conf"); >> ?> >> >> doesn't this seem like a huge security hole? >> >> Well what I want is to use something like /inc/footer.html so i can >> use the same PHP statements in any document and not worry about >> getting it "../../../" >> >> Any suggestions. >> Mike >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> >>
For your things (where you are including HTML), readfile just reads a file and dumps it to the screen. This is fine, because you are just dealing with HTML, so no processing is required. include will actually try and parse the file as if it has PHP inside somewhere, which your HTML (probably) doesnt. So, readfile uses less resources, and is much more like the SSI include statement than PHP's include :) adamw ----- Original Message ----- From: "Michael Zornek" <[EMAIL PROTECTED]> To: "Adam Wright" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 5:14 PM Subject: Re: [PHP] include statement > Adam(and everyone else who answers in 5 minutes, god i love this list), > > thanks for the help. > > Why is readfile more 'correct'? > > Just wondering? > Mike > > At 5:07 PM +0000 1/17/01, Adam Wright wrote: > >This is because the PHP include statement is ment to include other blocks of > >PHP code, rather than bits of HTML. Hence, it includes things from anywhere > >on the system. To include things from under your current htdocs directory, > >use... > > > >include($DOCUMENT_ROOT . "/includes/metatags.include"); > > > >though the more 'correct' method would be > > > >readfile($DOCUMENT_ROOT . "/includes/metatags.include"); > > > >adamw > > > >----- Original Message ----- > >From: "Michael Zornek" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Wednesday, January 17, 2001 5:04 PM > >Subject: [PHP] include statement > > > > > >> I'm a PHP newbie and am looking into using the include statement to > >> put things like the header and footer in so they are always the same. > >> > >> I do this now with SSI. In SSI I'll use the following statement: > >> > >> <!--#include virtual="/includes/metatags.include" --> > >> > >> I like this cause it lets me use the same statement all over the site > >> and I don't have to worry about where the document is and how many > >> directories i have to go up an into "../../../../../" > >> > >> I was guessing PHP's version would be: > >> > >> <?PHP > >> include("/includes/metatags.include"); > >> ?> > >> > >> However I get an error. If I put the absolute it works: > >> > >> <?PHP > >> include("/home/httpd/includes/metatags.include"); > >> ?> > >> > >> which is scary cause this worked too: > >> > >> <?PHP > >> include("/usr/local/apache/conf/httpd.conf"); > >> ?> > >> > >> doesn't this seem like a huge security hole? > >> > >> Well what I want is to use something like /inc/footer.html so i can > >> use the same PHP statements in any document and not worry about > >> getting it "../../../" > >> > >> Any suggestions. > >> Mike > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> To contact the list administrators, e-mail: [EMAIL PROTECTED] > >> > >> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
What about the security issue mentioned? Is it then possible (using the include and/or readfile) to grab anything found on the server? 1 More thing: what if I wanted to place the contents of a file into a variable. How do you achieve that? Karl *also a newbie, and this is a great group* ----- Original Message ----- From: "Adam Wright" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Michael Zornek" <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 10:18 AM Subject: Re: [PHP] include statement > For your things (where you are including HTML), readfile just reads a file > and dumps it to the screen. This is fine, because you are just dealing with > HTML, so no processing is required. include will actually try and parse the > file as if it has PHP inside somewhere, which your HTML (probably) doesnt. > So, readfile uses less resources, and is much more like the SSI include > statement than PHP's include :) > > adamw > > ----- Original Message ----- > From: "Michael Zornek" <[EMAIL PROTECTED]> > To: "Adam Wright" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Wednesday, January 17, 2001 5:14 PM > Subject: Re: [PHP] include statement > > > > Adam(and everyone else who answers in 5 minutes, god i love this list), > > > > thanks for the help. > > > > Why is readfile more 'correct'? > > > > Just wondering? > > Mike > > > > At 5:07 PM +0000 1/17/01, Adam Wright wrote: > > >This is because the PHP include statement is ment to include other blocks > of > > >PHP code, rather than bits of HTML. Hence, it includes things from > anywhere > > >on the system. To include things from under your current htdocs > directory, > > >use... > > > > > >include($DOCUMENT_ROOT . "/includes/metatags.include"); > > > > > >though the more 'correct' method would be > > > > > >readfile($DOCUMENT_ROOT . "/includes/metatags.include"); > > > > > >adamw > > > > > >----- Original Message ----- > > >From: "Michael Zornek" <[EMAIL PROTECTED]> > > >To: <[EMAIL PROTECTED]> > > >Sent: Wednesday, January 17, 2001 5:04 PM > > >Subject: [PHP] include statement > > > > > > > > >> I'm a PHP newbie and am looking into using the include statement to > > >> put things like the header and footer in so they are always the same. > > >> > > >> I do this now with SSI. In SSI I'll use the following statement: > > >> > > >> <!--#include virtual="/includes/metatags.include" --> > > >> > > >> I like this cause it lets me use the same statement all over the site > > >> and I don't have to worry about where the document is and how many > > >> directories i have to go up an into "../../../../../" > > >> > > >> I was guessing PHP's version would be: > > >> > > >> <?PHP > > >> include("/includes/metatags.include"); > > >> ?> > > >> > > >> However I get an error. If I put the absolute it works: > > >> > > >> <?PHP > > >> include("/home/httpd/includes/metatags.include"); > > >> ?> > > >> > > >> which is scary cause this worked too: > > >> > > >> <?PHP > > >> include("/usr/local/apache/conf/httpd.conf"); > > >> ?> > > >> > > >> doesn't this seem like a huge security hole? > > >> > > >> Well what I want is to use something like /inc/footer.html so i can > > >> use the same PHP statements in any document and not worry about > > >> getting it "../../../" > > >> > > >> Any suggestions. > > >> Mike > > >> > > >> > > >> -- > > >> PHP General Mailing List (http://www.php.net/) > > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > > >> For additional commands, e-mail: [EMAIL PROTECTED] > > >> To contact the list administrators, e-mail: > [EMAIL PROTECTED] > > >> > > >> > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
Pretty much, yes (within the bounds of the permissions of the files. Most webservers run as nobody on unix, and hence can only read those files which nobody can (confusing, huh :)). But, unless you have a mallicious user with upload access to your server, this isnt an issue. If you do, investigate "Safe mode" this instant :) adamw ----- Original Message ----- From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]> To: "Adam Wright" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Michael Zornek" <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 5:21 PM Subject: Re: [PHP] include statement > What about the security issue mentioned? Is it then possible (using the > include and/or readfile) to grab anything found on the server? > 1 More thing: what if I wanted to place the contents of a file into a > variable. How do you achieve that? > > Karl *also a newbie, and this is a great group* > > > > > ----- Original Message ----- > From: "Adam Wright" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; "Michael Zornek" > <[EMAIL PROTECTED]> > Sent: Wednesday, January 17, 2001 10:18 AM > Subject: Re: [PHP] include statement > > > > For your things (where you are including HTML), readfile just reads a file > > and dumps it to the screen. This is fine, because you are just dealing > with > > HTML, so no processing is required. include will actually try and parse > the > > file as if it has PHP inside somewhere, which your HTML (probably) doesnt. > > So, readfile uses less resources, and is much more like the SSI include > > statement than PHP's include :) > > > > adamw > > > > ----- Original Message ----- > > From: "Michael Zornek" <[EMAIL PROTECTED]> > > To: "Adam Wright" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Wednesday, January 17, 2001 5:14 PM > > Subject: Re: [PHP] include statement > > > > > > > Adam(and everyone else who answers in 5 minutes, god i love this list), > > > > > > thanks for the help. > > > > > > Why is readfile more 'correct'? > > > > > > Just wondering? > > > Mike > > > > > > At 5:07 PM +0000 1/17/01, Adam Wright wrote: > > > >This is because the PHP include statement is ment to include other > blocks > > of > > > >PHP code, rather than bits of HTML. Hence, it includes things from > > anywhere > > > >on the system. To include things from under your current htdocs > > directory, > > > >use... > > > > > > > >include($DOCUMENT_ROOT . "/includes/metatags.include"); > > > > > > > >though the more 'correct' method would be > > > > > > > >readfile($DOCUMENT_ROOT . "/includes/metatags.include"); > > > > > > > >adamw > > > > > > > >----- Original Message ----- > > > >From: "Michael Zornek" <[EMAIL PROTECTED]> > > > >To: <[EMAIL PROTECTED]> > > > >Sent: Wednesday, January 17, 2001 5:04 PM > > > >Subject: [PHP] include statement > > > > > > > > > > > >> I'm a PHP newbie and am looking into using the include statement to > > > >> put things like the header and footer in so they are always the > same. > > > >> > > > >> I do this now with SSI. In SSI I'll use the following statement: > > > >> > > > >> <!--#include virtual="/includes/metatags.include" --> > > > >> > > > >> I like this cause it lets me use the same statement all over the > site > > > >> and I don't have to worry about where the document is and how many > > > >> directories i have to go up an into "../../../../../" > > > >> > > > >> I was guessing PHP's version would be: > > > >> > > > >> <?PHP > > > >> include("/includes/metatags.include"); > > > >> ?> > > > >> > > > >> However I get an error. If I put the absolute it works: > > > >> > > > >> <?PHP > > > >> include("/home/httpd/includes/metatags.include"); > > > >> ?> > > > >> > > > >> which is scary cause this worked too: > > > >> > > > >> <?PHP > > > >> include("/usr/local/apache/conf/httpd.conf"); > > > >> ?> > > > >> > > > >> doesn't this seem like a huge security hole? > > > >> > > > >> Well what I want is to use something like /inc/footer.html so i can > > > >> use the same PHP statements in any document and not worry about > > > >> getting it "../../../" > > > >> > > > >> Any suggestions. > > > >> Mike > > > >> > > > >> > > > >> -- > > > >> PHP General Mailing List (http://www.php.net/) > > > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > >> To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > >> > > > >> > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > >
Hello , sess.php <? $var_name = 'TEST_VAR'; session_register($var_name); if (isset($HTTP_SESSION_VARS[$var_name])){ $HTTP_SESSION_VARS[$var_name] ++; }else{ $HTTP_SESSION_VARS[$var_name] = 0; } echo "\$HTTP_SESSION_VARS[$var_name] : ".$HTTP_SESSION_VARS[$var_name]; ?> Result: ---------------------------------------- if register_globals = On ---------------------------------------- always : $HTTP_SESSION_VARS[TEST_VAR] : 0 ---------------------------------------- if register_globals = Off ---------------------------------------- reload : $HTTP_SESSION_VARS[TEST_VAR] : 0 reload : $HTTP_SESSION_VARS[TEST_VAR] : 1 reload : $HTTP_SESSION_VARS[TEST_VAR] : 2 .... Why ? P.S. php 4.0.4pl1 Linux, php4.0.3pl1 BSDI, php4.0.4 Win2000 Best regards, Andrew Sitnikov
Hi Andrew! On Wed, 17 Jan 2001, Andrew Sitnikov wrote: > Hello , > > sess.php > <? > $var_name = 'TEST_VAR'; > > session_register($var_name); > > if (isset($HTTP_SESSION_VARS[$var_name])){ > $HTTP_SESSION_VARS[$var_name] ++; > }else{ > $HTTP_SESSION_VARS[$var_name] = 0; > } > > echo "\$HTTP_SESSION_VARS[$var_name] : ".$HTTP_SESSION_VARS[$var_name]; > ?> > > Result: > > ---------------------------------------- > if register_globals = On > ---------------------------------------- > always : $HTTP_SESSION_VARS[TEST_VAR] : 0 > if register_globals is on the variablea aren't stored anymore in $HTTP_SESSION_VARS but in $GLOBALS. -- teodor
Hi, Sorry this is off topic but I just can`t find anywhere with reliable information to help me get my .htaccess working on my server. I have followed many tutorials and none of them give me a working password protected dir, so if anyone can help I would appreciate it. My .htaccess file is as follows: AuthUserFile /usr/home/ukgs/volunteer/.htpasswd AuthGroupFile /dev/null AuthName Bill's Restaurant AuthType Basic <limit GET> require user shaun101 </limit> And My .htpasswd file just contains the user shaun101 with the scrambled up password. They are both in the same directory so when I log into my server I first click usr then home etc etc. But for some reason no matter what I do I still get direct access to the directory volunteer when I go to it in a browser. Anyone have any ideas what I`m doing wrong?? TIA Ade
There are occasions when I'd like to execute some long-running task in the background, in response to some user action. It seems that PHP has all the neccesary mechanisms to allow me to do this, but in my perusing of the manuals/FAQ's/digests, etc, I don't see such a facility. For example, I'd like to do something like this: function long_running_background_task() { ... } function handle_some_action() { ... fork (long_running_background_task); } In the cases I'd like to do this, I can manage synchronization externally... (i.e., implement join by waiting for a /tmp file to appear or something), so I'm not asking for a join, or any sychronization facilities. Does anyone agree that this would be useful? Is there another way to accomplish this? Better yet, does this function already exist, but has managed to hide for all this time...? thanks, dylan
Im nearly posative this isnt what your looking for, but I thought I would see if maybe it was :) compile php as a cgi so you can run it from the command prompt. then just run the php file from the command prompt through exec () <? exec("php -q somephpfile.php &"); ?> untested of course. Chris Lee Mediawaveonline.com "Dylan McNamee" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > There are occasions when I'd like to execute some long-running task > in the background, in response to some user action. It seems that > PHP has all the neccesary mechanisms to allow me to do this, but > in my perusing of the manuals/FAQ's/digests, etc, I don't see such > a facility. > > For example, I'd like to do something like this: > > function long_running_background_task() > { > ... > } > > function handle_some_action() > { > ... > fork (long_running_background_task); > } > > In the cases I'd like to do this, I can manage synchronization > externally... > (i.e., implement join by waiting for a /tmp file to appear or > something), > so I'm not asking for a join, or any sychronization facilities. > > Does anyone agree that this would be useful? Is there another way to > accomplish this? Better yet, does this function already exist, but has > managed to hide for all this time...? > > thanks, > dylan > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hello, I am getting started with session and really love the sessions to death, but when I try to end a session I get an error. Can someone give me an example of code that ends a session. Thank you, -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com --------------------------------------------
> I am getting started with session and really love the sessions to death, but > when I try to end a session I get an error. Can someone give me an example > of code that ends a session. What is the error that you get? What is the code you're now using that causes the error? It's like saying to your mechanic "When I do something in my car, it makes a noise." xxo, Andy -- # Andy Lester http://www.petdance.com AIM:petdance %_=split';','.; Perl ;@;st a;m;ker;p;not;o;hac;t;her;y;ju'; print map $_{$_}, split //, '[EMAIL PROTECTED]'
Actually it would be like saying to a mechanic, Hey when I try to change my oil it spills can you give me an example of how to change my oil. All I was asking for was an example snip of code. But if this can help here is the error I get: Warning: Session object destruction failed in c:\apache\htdocs\sessions\done.php on line 3 Here is the code I am using: <?php session_start("CONTROL"); session_destroy(); echo "It Werked<BR>"; ?> <A HREF="index.php">RESTART>></a> Thank you, -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com -------------------------------------------- -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 9:33 AM To: Brandon Orther Cc: PHP User Group Subject: Re: [PHP] Ok thanx sessions that was great, now it's time to go back home!!! > I am getting started with session and really love the sessions to death, but > when I try to end a session I get an error. Can someone give me an example > of code that ends a session. What is the error that you get? What is the code you're now using that causes the error? It's like saying to your mechanic "When I do something in my car, it makes a noise." xxo, Andy -- # Andy Lester http://www.petdance.com AIM:petdance %_=split';','.; Perl ;@;st a;m;ker;p;not;o;hac;t;her;y;ju'; print map $_{$_}, split //, '[EMAIL PROTECTED]'
What's "CONTROL" supposed to be? A variable passed? If so, you should use: session_start() session_register("CONTROL"); //to end the session simply call it up by: session_start(); //and then destroy it which also unregisters all variables passed... session_destroy(); Granted, I'm new at this too but this method seemed to work for me in a past project. Kristi ----- Original Message ----- From: "Brandon Orther" <[EMAIL PROTECTED]> To: "PHP User Group" <[EMAIL PROTECTED]> Sent: Monday, January 17, 2000 1:16 PM Subject: RE: [PHP] Ok thanx sessions that was great, now it's time to go back home!!! > Actually it would be like saying to a mechanic, Hey when I try to change my > oil it spills can you give me an example of how to change my oil. All I was > asking for was an example snip of code. > > But if this can help here is the error I get: > > Warning: Session object destruction failed in > c:\apache\htdocs\sessions\done.php on line 3 > > Here is the code I am using: > > <?php > session_start("CONTROL"); > session_destroy(); > echo "It Werked<BR>"; > ?> > <A HREF="index.php">RESTART>></a> > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.com > -------------------------------------------- > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 17, 2001 9:33 AM > To: Brandon Orther > Cc: PHP User Group > Subject: Re: [PHP] Ok thanx sessions that was great, now it's time to go > back home!!! > > > > I am getting started with session and really love the sessions to death, > but > > when I try to end a session I get an error. Can someone give me an > example > > of code that ends a session. > > What is the error that you get? What is the code you're now using that > causes the error? > > It's like saying to your mechanic "When I do something in my car, it makes > a noise." > > xxo, > Andy > > -- > # Andy Lester http://www.petdance.com AIM:petdance > %_=split';','.; Perl ;@;st a;m;ker;p;not;o;hac;t;her;y;ju'; > print map $_{$_}, split //, > '[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] >
Thomas, Not sure if this si what you want but it may start you in the right direction. <? $bob = "<div key1=val1 key2 = val2 key3='val3' key4 = \"val4\">"; preg_match_all( '/\S*\s?=\s?\S+[^>]/', $bob, $match ); foreach ($match[0] as $match_result) { echo $match_result."<BR>"; } ?> Robert W. Collins Web Developer II Insight / TC Computers www.insight.com www.tccomputers.com -----Original Message----- From: Thomas Angst [mailto:[EMAIL PROTECTED]] Sent: Monday, January 15, 2001 5:47 AM To: [EMAIL PROTECTED] Subject: [PHP] REGEX for tag attributes? Howdy, I need to divide several attributes of a tag. <div key1=val1 key2 = val2 key3='val3' key4 = "val4"> how can I do this without too many time lost? Is it possible to do this with a regular expression? Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
On Wed, 17 Jan 2001, Wade Halsey wrote: > Hi > > I have the following code in Delphi: > procedure TFormConfirmAllocation.CreateTxt; > var TxFile : TextFile; > Buffer : string; > x : integer; > begin > > AssignFile(TxFile,'\SkyTrac.sky'); > > > Rewrite(TxFile); > > with FormConfirmAllocation.Query1 do begin > open; > while not Eof do begin > for x := 0 to fields.Count - 1 do begin > Buffer := Fields[x].AsString; > Writeln(TxFile, Buffer); > end; > next; > end; > end;//with > CloseFile(TxFile); > end; > > Now I want to create the same sort of thing in Php, could someone please help! > Thanks > Wade > [EMAIL PROTECTED] > <?php ... $fp=fopen("/tmp/SkyTrac.sky", "w"); $result=xxx_query(...); while ($row=xxx_fetch_array($result)) { while (list($key, $val)=each($row)) { fputs($fp, $val); }; }; fclose($fp); ?> -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
Has anyone used PHP to connect to a FileMaker database? If you have a url to a tutorial please e-mail me. Thank you, -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com --------------------------------------------
preg_replace will implicitly allow arrays of values for the search/replace strings. Toby Butzon wrote: > > You could loop it with foreach (which I think is the same way Perl handles > the ex you gave). > > foreach ($myArr as $myStr) { > $myStr = ereg_replace($regexp, $myStr); > } > > Note quite "one statement", but if you really wanted to shorted it (and in > the opinion of most sacrafice readability), you could say: > > foreach ($myArr as $myStr) $myStr = ereg_replace(...etc...); > > --Toby > > ----- Original Message ----- > From: "Elliot L. Tobin" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, January 16, 2001 11:59 AM > Subject: [PHP] regexps > > > Is there a way to call one regexp on multiple variables, in one > statement? > > In Perl, I'd do: > > > > s/this/that for ($var1, $var2, $var3); > > > > tia.. and please reply directly. > > > > [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] -- Monte Ohrt <[EMAIL PROTECTED]> http://www.ispi.net/
It's a bug. Try the latest CVS, it has been fixed. Shaun Thomas wrote: > > This only applies to PHP 4.0.4 > > Back with PHP 4.0.2, I could do this: > > <?PHP > $string = "[["; > $string = preg_replace("/(\W)/", "\\\\1", $string); > ?> > > $string would then contain "\[\[". > > Now, if I use that same code, $string contains "\\1\\1\\1\\1". > > I tried to compensate for this using PHP's new ability to allow > perl syntax in the replace section. > > <?PHP > $string = "[["; > $string = preg_replace("/(\W)/", "\\$1", $string); > ?> > > That leaves $string with "\$1\$1\$1\$1". Which tells me it thought > I was backreferencing the $. So, to combat said assumption, I tried > three, four, even five slashes in front of $1, and nothing worked. > All I got were variations of "\$1\$1\$1\$1". > > I have to assume this is a bug, since this worked back in 4.0.2 which > I stopped using due to segfaults under certain circumstances. > > Ideas? > > -- > +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ > | Shaun M. Thomas INN Database Programmer | > | Phone: (309) 743-0812 Fax : (309) 743-0830 | > | Email: [EMAIL PROTECTED] AIM : trifthen | > | Web : hamster.lee.net | > | | > | "Most of our lives are about proving something, either to | > | "ourselves or to someone else." | > | -- Anonymous | > +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Monte Ohrt <[EMAIL PROTECTED]> http://www.ispi.net/
I tried to send this before, so if I did, forgive me, but I don't think it worked last time .:) I'm trying to find a way to handle errors by number. For example, if I get a "directory already exists" error, I want to know what the number that is so I can check the return value on the function that gave the error. That made no sense. Lemme try again. Instead of getting the php-generated error message, I want to create my own so the user has a nice message instead of one that makes it look like I don't know what I'm doing. :) Any suggestions? Jason
You probably want to suppress the error message with an @ symbol. Try putting an "@" before the function calls that give you errors. <?php $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. <?php 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. -Ben -----Original Message----- From: Jason Jacobs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 10:23 AM To: [EMAIL PROTECTED] Subject: [PHP] error message handling I tried to send this before, so if I did, forgive me, but I don't think it worked last time .:) I'm trying to find a way to handle errors by number. For example, if I get a "directory already exists" error, I want to know what the number that is so I can check the return value on the function that gave the error. That made no sense. Lemme try again. Instead of getting the php-generated error message, I want to create my own so the user has a nice message instead of one that makes it look like I don't know what I'm doing. :) Any suggestions? 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]
> 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. > <?php > $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. > <?php > 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
Check out The Mail Archive at http://www.mail-archive.com/ ! On Wed, 17 Jan 2001, Taras Vasylkevych wrote: > Hi, > > is it possible to review the archive of this mailing list. And if possible then >where? > > Thanks, > > Taras > > Mit freundlichen Grüßen > > Taras Vasylkevych > team in medias GmbH > Aachen, Berlin, Köln > 0241-4090909 > http://www.frohe-weihnachten.de > > *************************** > Unsere aktuellen Projekte > > mit Kurzerläuterung: > http://www.inmedias.de/referenz > > oder direkt: > http://www.elsa.de > http://www.nachbarland-niederlande.de > http://www.datavision.de > http://www.strabag.de > **************************** > > >
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
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] >
Hello, I have been toying with php for a short while and have problems getting the following code to correctly execute on Netscape: <?php header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s",getlastmod())." GMT"); header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache"); for($i=0; $i<40; $i++) { $rand= rand(1, 40); print "$rand<BR>"; } ?> I included the headers because I thought this would prevent caching, but even still, everytime I reload and shift-reload Netscape (browser cache is set to zero) I receive the same output from first access, which really ruins any true random activity. Any ideas? thanks much, Joel Dossey __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
you need to seed the rand with srand() before the rand() command... cheers, Rom ----- Original Message ----- From: Joel Dossey <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 1:39 PM Subject: [PHP] Netscape rand() not random Hello, I have been toying with php for a short while and have problems getting the following code to correctly execute on Netscape: <?php header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s",getlastmod())." GMT"); header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache"); for($i=0; $i<40; $i++) { $rand= rand(1, 40); print "$rand<BR>"; } ?> I included the headers because I thought this would prevent caching, but even still, everytime I reload and shift-reload Netscape (browser cache is set to zero) I receive the same output from first access, which really ruins any true random activity. Any ideas? thanks much, Joel Dossey __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Ah! excellent, it works fine now. I must apparently skipped that line about seeding it in the php documentation. (doh!) I wonder why IE5.5 didnt need the seeding in order to do the rand()? Thanks alot, Joel --- Romulo Roberto Pereira <[EMAIL PROTECTED]> wrote: > you need to seed the rand with srand() before the > rand() command... > > cheers, > > Rom > ----- Original Message ----- > From: Joel Dossey <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, January 17, 2001 1:39 PM > Subject: [PHP] Netscape rand() not random > > > Hello, > I have been toying with php for a short while and > have > problems getting the following code to correctly > execute on Netscape: > > <?php > header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); > header("Last-Modified: ".gmdate("D, d M Y > H:i:s",getlastmod())." GMT"); > header ("Cache-Control: no-cache, must-revalidate"); > header ("Pragma: no-cache"); > > for($i=0; $i<40; $i++) > { > $rand= rand(1, 40); > > print "$rand<BR>"; > } > ?> > > I included the headers because I thought this would > prevent caching, but even still, everytime I reload > and shift-reload Netscape (browser cache is set to > zero) I receive the same output from first access, > which really ruins any true random activity. Any > ideas? > > thanks much, > Joel Dossey > > __________________________________________________ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Hello all I have a little problem: Sometimes when you invokes some .php page, appears "could not redefine function...". It looks like a Web server problem because If you try again one or two times, the same operation works Ok. I´m using PHP 4, Win 98 SR2, PWS and MySql for Windows. Thanks. Emiliano Marmonti
Is PHP the implied script, so that it is okay to begin PHP code like this <? vs. like this <?php When is it not implied? *wow, some real beginer questions! eh?*
"Karl J. Stubsjoen" wrote: > > Is PHP the implied script, so that it is okay to begin PHP code like this <? > vs. like this <?php > When is it not implied? You should use <?php. In future versions the open short tag would be dropped or your administrator can disable the open short tag. -Egon -- SIX Offene Systeme GmbH · Stuttgart - Berlin - New York Sielminger Straße 63 · D-70771 Leinfelden-Echterdingen Fon +49 711 9909164 · Fax +49 711 9909199 http://www.six.de
I didn't know that - very intersting!!!!! thank you Egon, this reaaly helps... Rom ----- Original Message ----- From: Egon Schmid (@work) <[EMAIL PROTECTED]> To: Karl J. Stubsjoen <[EMAIL PROTECTED]> Cc: PHP Mailing List <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 1:51 PM Subject: Re: [PHP] <? PHP vs. <? "Karl J. Stubsjoen" wrote: > > Is PHP the implied script, so that it is okay to begin PHP code like this <? > vs. like this <?php > When is it not implied? You should use <?php. In future versions the open short tag would be dropped or your administrator can disable the open short tag. -Egon -- SIX Offene Systeme GmbH · Stuttgart - Berlin - New York Sielminger Straße 63 · D-70771 Leinfelden-Echterdingen Fon +49 711 9909164 · Fax +49 711 9909199 http://www.six.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]
> > Is PHP the implied script, so that it is okay to begin PHP code like this <? > > vs. like this <?php > > When is it not implied? > > You should use <?php. In future versions the open short tag would be > dropped or your administrator can disable the open short tag. Well, I don't see the short tag ever being dropped actually. But yes, <?php would be best for writing code meant to be portable. -Rasmus
> > Is PHP the implied script, so that it is okay to begin PHP code like this <? > > vs. like this <?php > > When is it not implied? > > You should use <?php. In future versions the open short tag would be > dropped or your administrator can disable the open short tag. Are there in fact plans to drop the short tags? --Toby
Ye 2001-01-17 13:54 -0500, Toby Butzon skribis: > > > Is PHP the implied script, so that it is okay to begin PHP code like > this <? > > > vs. like this <?php > > > When is it not implied? > > > > You should use <?php. In future versions the open short tag would be > > dropped or your administrator can disable the open short tag. > > Are there in fact plans to drop the short tags? Short open tags won't work with xml. Therefore they won't work with xhtml. They conflict with where the Web is going. Thus, they have already been dropped. You don't _need_ them. Stay away from them.
> 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 <?= :-) philip On Thu, 18 Jan 2001, Michael Talbot-Wilson wrote: > Ye 2001-01-17 13:54 -0500, Toby Butzon skribis: > > > > > Is PHP the implied script, so that it is okay to begin PHP code like > > this <? > > > > vs. like this <?php > > > > When is it not implied? > > > > > > You should use <?php. In future versions the open short tag would be > > > dropped or your administrator can disable the open short tag. > > > > Are there in fact plans to drop the short tags? > > Short open tags won't work with xml. Therefore they won't work with > xhtml. They conflict with where the Web is going. > > Thus, they have already been dropped. You don't _need_ them. Stay > away from them. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hi 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.
You know, this means that ALL of my hundreds of pages over multiple sites would break. That's really sad. I just think it's hard (to remember) when I have code like: <A HREF="filename.php?var=<? echo $thevar ?>">this link</A> to put in the 'php' there. It's so much easier just to code with short tags. (although I have a program that can work in every app that will trap <? and replace it with <?php everytime I type it. I could utilize that. (I love Macs... and Spell Catcher.) On 1/17/01 2:48 PM this was written: > Ye 2001-01-17 13:54 -0500, Toby Butzon skribis: > >>>> Is PHP the implied script, so that it is okay to begin PHP code like >> this <? >>>> vs. like this <?php >>>> When is it not implied? >>> >>> You should use <?php. In future versions the open short tag would be >>> dropped or your administrator can disable the open short tag. >> >> Are there in fact plans to drop the short tags? > > Short open tags won't work with xml. Therefore they won't work with > xhtml. They conflict with where the Web is going. > > Thus, they have already been dropped. You don't _need_ them. Stay > away from them. -- Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/
> You know, this means that ALL of my hundreds of pages over multiple sites > would break. That's really sad. It won't happen. -Rasmus
I'm trying to store an array into a MySQL table, what datatype should the column be, Varchar? second this is the code I use to store it. mysql_connect("$DBHost","$DBUser","$DBPass"); $name = implode(",", $name); mysql("$DBName","INSERT INTO CartItems VALUES ('$UID','$ItemID','$ItemQuantity','$all_toppings','$Date','$CartItemsID')"); this works fine, it stores the comma delimited info into the table. however when I extract it and try to count($name) it comes back as 1 and if I try to implode it it says Warning bad argument to implode() and if I do this echo "<font size=-2>".$name."</font>"; $name_test = explode("," $name); echo $name_test; the names item1,item2,item3 is returned, but I get a parse error on the explode, what am I missing...? Jerry Lake
Never mind, I caught my syntax error it works fine now. Jerry Lake - [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -----Original Message----- From: Jerry Lake [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 10:43 AM To: [EMAIL PROTECTED] Subject: [PHP] MySQL and Array Problem I'm trying to store an array into a MySQL table, what datatype should the column be, Varchar? second this is the code I use to store it. mysql_connect("$DBHost","$DBUser","$DBPass"); $name = implode(",", $name); mysql("$DBName","INSERT INTO CartItems VALUES ('$UID','$ItemID','$ItemQuantity','$all_toppings','$Date','$CartItemsID')"); this works fine, it stores the comma delimited info into the table. however when I extract it and try to count($name) it comes back as 1 and if I try to implode it it says Warning bad argument to implode() and if I do this echo "<font size=-2>".$name."</font>"; $name_test = explode("," $name); echo $name_test; the names item1,item2,item3 is returned, but I get a parse error on the explode, what am I missing...? Jerry Lake -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>, "Joel Dossey" <[EMAIL PROTECTED]> wrote: One way to fool browsers when making an image request is to append a random string to the query string of the img src. In these situations, adding 'rand=<?php print(time()); ?>' can do the trick. Jeff > Greetings, I have a php script that generates a random image. All images > are kept in a mysql table. It works fine when viewed by IE, but > Netscape, and Lynx, always show the same image. The database > information, however, is changed as it should be (correctly incrementing > the times seen column for the image), and on refresh all information > goes as it should, except for randomly selecting an image. > This may be an apache caching problem, but I was > wondering if anyone has run into this working with php in general, and > what solutions I need to explore. > > Thanks much, Joel Dossey > > > __________________________________________________ > Do You Yahoo!? Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > >
Is it possible to find out how much disk space a particular number of rows in a table takes up?? If you have an answer, please email me directly. Thank you!!!!!!
I think that these are your answer: Memory use explanation in MYSQL DB: http://www.mysql.com/doc/m/y/myisamchk_memory.html Memory used by MYSQL DB: http://www.mysql.com/doc/M/e/Memory_use.html MYSQL DB Status: http://www.mysql.com/doc/S/H/SHOW_STATUS.html Problems with HARD DISKS and MYSQL DB: http://www.mysql.com/doc/D/i/Disk_issues.html Have fun, Rom ----- Original Message ----- From: [ rswfire ] <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 2:09 PM Subject: [PHP] MySQL Disk Space Usage Is it possible to find out how much disk space a particular number of rows in a table takes up?? If you have an answer, please email me directly. Thank you!!!!!!
Thank you for the reply, however, I do not believe this will solve my problem. So please let me explain what I am trying to do. I'll use an example. Let's say I have a guestbook application. And let's say that several different people have their own guestbooks. I would create a guestbook table with, let's say: rowid person_id (...other fields...) What I want to do is something like a SELECT query, where I select all of the rows by person_id. Then, I want to find out how much DISK SPACE is being used by these particular rows. I am doing this to determine how much disk space is being used by any particular client. Each client is allocated a certain amount of disk space usage on my server and I need to determine how much space they are using in the database. Any ideas on how to do this in PHP??? Please email me directly with a response. Thank you!!!!!!!! ----- Original Message ----- From: Romulo Roberto Pereira <[EMAIL PROTECTED]> To: [ rswfire ] <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 2:29 PM Subject: Re: [PHP] MySQL Disk Space Usage > I think that these are your answer: > > Memory use explanation in MYSQL DB: > http://www.mysql.com/doc/m/y/myisamchk_memory.html > > Memory used by MYSQL DB: > http://www.mysql.com/doc/M/e/Memory_use.html > > MYSQL DB Status: > http://www.mysql.com/doc/S/H/SHOW_STATUS.html > > Problems with HARD DISKS and MYSQL DB: > http://www.mysql.com/doc/D/i/Disk_issues.html > > Have fun, > > Rom > ----- Original Message ----- > From: [ rswfire ] <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, January 17, 2001 2:09 PM > Subject: [PHP] MySQL Disk Space Usage > > > Is it possible to find out how much disk space a particular number of rows > in a table takes up?? If you have an answer, please email me directly. > Thank you!!!!!! > > >
Thankz Larry... I actually thought of that as a solution, but I don't know I would determine the disk space usage of blob types, which I do use quite frequently and I need the results to be extremely accurate. I was hopeful that there was a function available to do this, but apparently not. Thanks again.. ----- Original Message ----- From: Larry Hotchkiss <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 2:42 PM Subject: RE: [PHP] MySQL Disk Space Usage > I believe you are going to need to take a look at the mysql manual a bit > closer to do this. How much space a user in a table takes up is based on > the type of field (ie varchar, int etc etc). If you know what each column > in a row is the manual outlines the space consumption of various data types > and then you can count rows and do the math per user. > > Larry H. > > On Wednesday, January 17, 2001 1:43 PM, wrote: > > Thank you for the reply, however, I do not believe this will solve my > > problem. So please let me explain what I am trying to do. > > > > I'll use an example. Let's say I have a guestbook application. And > let's > > say that several different people have their own guestbooks. I would > create > > a guestbook table with, let's say: > > > > rowid > > person_id > > (...other fields...) > > > > What I want to do is something like a SELECT query, where I select all of > > the rows by person_id. Then, I want to find out how much DISK SPACE is > > being used by these particular rows. > > > > I am doing this to determine how much disk space is being used by any > > particular client. Each client is allocated a certain amount of disk > space > > usage on my server and I need to determine how much space they are using > in > > the database. > > > > Any ideas on how to do this in PHP??? > > > > Please email me directly with a response. Thank you!!!!!!!! > > > > > > ----- Original Message ----- > > From: Romulo Roberto Pereira <[EMAIL PROTECTED]> > > To: [ rswfire ] <[EMAIL PROTECTED]>; <> > > Sent: Wednesday, January 17, 2001 2:29 PM > > Subject: Re: [PHP] MySQL Disk Space Usage > > > > > > > I think that these are your answer: > > > > > > Memory use explanation in MYSQL DB: > > > http://www.mysql.com/doc/m/y/myisamchk_memory.html > > > > > > Memory used by MYSQL DB: > > > http://www.mysql.com/doc/M/e/Memory_use.html > > > > > > MYSQL DB Status: > > > http://www.mysql.com/doc/S/H/SHOW_STATUS.html > > > > > > Problems with HARD DISKS and MYSQL DB: > > > http://www.mysql.com/doc/D/i/Disk_issues.html > > > > > > Have fun, > > > > > > Rom > > > ----- Original Message ----- > > > From: [ rswfire ] <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Wednesday, January 17, 2001 2:09 PM > > > Subject: [PHP] MySQL Disk Space Usage > > > > > > > > > Is it possible to find out how much disk space a particular number of > rows > > > in a table takes up?? If you have an answer, please email me directly. > > > Thank you!!!!!! > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > >
this page sho you in how to retriev table info (like space used) from a mysql table using myisamchk... Give it a look! http://www.mysql.com/doc/T/a/Table-info.html The trick would be create a virtual table by join and use this command to mesure the amount of memory beeing used by each user.. What do you think? Rom ----- Original Message ----- From: [ rswfire ] <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 2:42 PM Subject: Re: [PHP] MySQL Disk Space Usage Thank you for the reply, however, I do not believe this will solve my problem. So please let me explain what I am trying to do. I'll use an example. Let's say I have a guestbook application. And let's say that several different people have their own guestbooks. I would create a guestbook table with, let's say: rowid person_id (...other fields...) What I want to do is something like a SELECT query, where I select all of the rows by person_id. Then, I want to find out how much DISK SPACE is being used by these particular rows. I am doing this to determine how much disk space is being used by any particular client. Each client is allocated a certain amount of disk space usage on my server and I need to determine how much space they are using in the database. Any ideas on how to do this in PHP??? Please email me directly with a response. Thank you!!!!!!!! ----- Original Message ----- From: Romulo Roberto Pereira <[EMAIL PROTECTED]> To: [ rswfire ] <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 2:29 PM Subject: Re: [PHP] MySQL Disk Space Usage > I think that these are your answer: > > Memory use explanation in MYSQL DB: > http://www.mysql.com/doc/m/y/myisamchk_memory.html > > Memory used by MYSQL DB: > http://www.mysql.com/doc/M/e/Memory_use.html > > MYSQL DB Status: > http://www.mysql.com/doc/S/H/SHOW_STATUS.html > > Problems with HARD DISKS and MYSQL DB: > http://www.mysql.com/doc/D/i/Disk_issues.html > > Have fun, > > Rom > ----- Original Message ----- > From: [ rswfire ] <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, January 17, 2001 2:09 PM > Subject: [PHP] MySQL Disk Space Usage > > > Is it possible to find out how much disk space a particular number of rows > in a table takes up?? If you have an answer, please email me directly. > Thank you!!!!!! > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
I switched from Netscape to Openldap and it now compiles fine. Unfortunately Apache bombs when I try to start it with the following error: Syntax error on line 237 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/local/apache/libexec/libphp4.so: undefined symbol: ldap_value_free Any ideas as to why this would happen would be much appreciated, BEH
On Wed, 17 Jan 2001 [EMAIL PROTECTED] wrote: > I switched from Netscape to Openldap and it now compiles fine. >Unfortunately Apache bombs when I try to start it with the following error: > >Syntax error on line 237 of /usr/local/apache/conf/httpd.conf: >Cannot load /usr/local/apache/libexec/libphp4.so into server: >/usr/local/apache/libexec/libphp4.so: undefined symbol: ldap_value_free You're probably using some 2.x.x version of OpenLDAP? You should then upgrade PHP to 4.0.4pl1. And then the Netscape LDAP SDK should work ok too. --Jani
Just a quick note to all. My old address, [EMAIL PROTECTED], will no longer be in service. You can reach me at [EMAIL PROTECTED] or [EMAIL PROTECTED] Please make the necessary changes to your address books. Thanks, Tom >>.>>.>>>.>>>>>.>>>>>>>>> Tom Beidler Orbit Tech Services 805.682.8972 (phone) 805.682.5833 (fax) [EMAIL PROTECTED] >>.>>.>>>.>>>>>.>>>>>>>>>
I had 4.0.3pl1 running on a Windows98 system. After I upgraded to 4.0.4pl1, calling phpinfo() still reports the version as being 4.0.3pl1. I deleted the original c:/php/ directory completely before installing the newer version, so I don't *think* i left behind any old files. The php4ts.dll file is dated 1/12/01. Has anyone else noticed this same problem?
>I had 4.0.3pl1 running on a Windows98 system. After I upgraded to >4.0.4pl1, calling phpinfo() still reports the version as being >4.0.3pl1. I deleted the original c:/php/ directory completely before >installing the newer version, so I don't *think* i left behind any old >files. The php4ts.dll file is dated 1/12/01. Has anyone else noticed >this same problem? No - 4.0.4pl1 definitely reports itself as such. You must have a stale php4ts.dll somewhere in your windows path. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have a website where each new page access connects to a Postgres database to load information. Each DB connect uses a $dblink=pg_connect() to connect to the database. I'd like to avoid the overhead with opening a new connection with every page. So, can I change all of the pg_connect calls to pg_pconnect call and have the pages use persistent connections, or is there something more that needs to be done? - --Wade -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE6ZfSfX5y4ZKLK2pMRAkVBAKCznNSkCNX7CCZtnWSVKKMqmf7tSwCgiBez q4vzBEFouHJ2ZvaLXvJGvdo= =nNgn -----END PGP SIGNATURE-----
When I get a list of items from a database I would like to display them with alternating colors. Does anyone know how or where I can get some code that will show me how to do that? The other question is what is the code to get the ip of the client that is accessing your site? I know that one is easy but I forget how to do it. thanks Phil Labonte Systems Administrator Atreus Systems (p) 613-233-1741 x243 (c) 613-277-1697 [EMAIL PROTECTED]
> When I get a list of items from a database I would like to display them with > alternating colors. Does anyone know how or where I can get some code that > will show me how to do that? $col = 0; $colors = array('#ffffff','#000000'); while($row=mysql_fetchrow($result)) { echo "<td bgcolor=".$colors[$i++%2].">".$row[0]."</td>\n"; } > The other question is what is the code to get the ip of the client that is > accessing your site? I know that one is easy but I forget how to do it. $REMOTE_ADDR -Rasmus
Did you mean this? <?php $i = 0 $colors = array('#ffffff','#00000'); ?> -Ben -----Original Message----- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 11:52 AM To: Phil Labonte Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Two things > When I get a list of items from a database I would like to display them with > alternating colors. Does anyone know how or where I can get some code that > will show me how to do that? $col = 0; $colors = array('#ffffff','#000000'); while($row=mysql_fetchrow($result)) { echo "<td bgcolor=".$colors[$i++%2].">".$row[0]."</td>\n"; } > The other question is what is the code to get the ip of the client that is > accessing your site? I know that one is easy but I forget how to do it. $REMOTE_ADDR -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]
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?? > > <Files *.inc> > Order allow,deny > Deny from all > </Files> > > 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: >> >> <p>This page is copyright blah blah blah</p> >> <p><a href="mailto:[EMAIL PROTECTED]">E-mail the webmaster</a></p> >> >> 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] >
I could be mistaken here, but last I checked you could include files outside of the document root. Can't get much more secure then that and you don't have to mess with the Apache rewrite engine, which is known for slowing things down. --Jon At 02:02 PM 1/17/01 +0000, Matt Williams wrote: ><Files *.inc> > Order allow,deny > Deny from all ></Files> > >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: > > > > <p>This page is copyright blah blah blah</p> > > <p><a href="mailto:[EMAIL PROTECTED]">E-mail the webmaster</a></p> > > > > 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]
Appologies in advance for any duplication, but I wasn't sure which list would be best to use for this question. I'm having a problem with PHP 4.04pl1 and Sybase/FreeTDS, but before I open a bug report I thought I'd check if anyone else is having the same problem. Server Details: Digital Unix 4.0F, FreeTDS 0.51, Apache 1.3.12 and PHP/4.0.4pl1 (installed as an Apache module). Database server is SQl 7.0 on an NT machine. In my test PHP script, my connection to the database server seems to get dropped after an INSERT, UPDATE, or DELETE. The INSERT/UPDATE/DELETE does work (the table is modified) but any subsequent queries (SELECT etc) will fail. I can't reproduce this problem with sqsh or perl (using DBD::Sybase), so I'm thinking it's a PHP issue. I've tried compiling FreeTDS with --with-tdsver=4.2 and --with-tdsver=7.0; same result. Is anyone else having this problem? I'd appreciate any help or suggestions. I've included my sample PHP script below (The first SELECT works, the INSERT works, but the second SELECT fails). If I do file this in the bugs database, should I list it as Sybase-CT related or MSSQL server related? Thanx, - Darryl <?php $dbh = mssql_connect("server","username","password"); $query = mssql_query("SELECT * FROM Subjects", $dbh); if ($query) { print "First SELECT successful<BR>\n"; } else { print "First SELECT failed<BR>\n"; } $query = mssql_query("INSERT INTO Subjects (Code,Subject) VALUES ('test1', 'TEST 1')", $dbh); $query = mssql_query("SELECT * FROM Subjects", $dbh); if ($query) { print "Second SELECT successful<BR>\n"; } else { print "Second SELECT failed<BR>\n"; } ?> ---------------------------------------------------------------------- Darryl Friesen, B.Sc., Programmer/Analyst [EMAIL PROTECTED] Education & Research Technology Services, http://gollum.usask.ca/ Department of Computing Services, University of Saskatchewan ---------------------------------------------------------------------- "Go not to the Elves for counsel, for they will say both no and yes"
The subject pretty much explains it all. I have 2 dates (YYYYMMDDHHSS format) and want to determine the number of days, hours, minutes and seconds left from the later date to the earlier date. I figure I could do all this using date arithmatic, divide by 60 seconds in a minute, 60 minutes in an hour, 24 hours in a day and so forth, but was wondering if there a better (or easier way) to do this before I start coding away.? _______________________________________________________ Send a cool gift with your E-Card http://www.bluemountain.com/giftcenter/
I'm trying to use the clasic CGI environment varable PATH_TRANSLATED via Apache's Action directive (directing all requests through a script). But PHP messes PATH_TRANSLATED up and all i get is a copy of SCRIPT_FILENAME ! I'm using these directives in httpd.conf: Options +MultiViews Action text/html /script.php A resuest for "/index" should result in: PATH_TRANSLATED = /path/to/index.html PATH_TRANSLATED = /path/to/index.en.html (for the English version) PATH_TRANSLATED = /path/to/index.X.html (for the X version) BUT what I get is: PATH_TRANSLATED = /path/to/script.php (no matter what i request !) Can anyone help me getting the real Apache PATH_TRANSLATED (which is actualy shown in phpinfo() under "Apache Environment" but not under "PHP Variables") Yours faithfully Heino H. Gehlsen
BTW I using PHP 4.0.3pl1 on a standard Debian 2.2r2 box with Apache httpd 1.3.9. ----- Original Message ----- From: "Heino H. Gehlsen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 9:28 PM Subject: Apache's PATH_TRANSLATED > I'm trying to use the clasic CGI environment varable PATH_TRANSLATED via > Apache's Action directive (directing all requests through a script). > > But PHP messes PATH_TRANSLATED up and all i get is a copy of SCRIPT_FILENAME > ! > > I'm using these directives in httpd.conf: > Options +MultiViews > Action text/html /script.php > > A resuest for "/index" should result in: > PATH_TRANSLATED = /path/to/index.html > PATH_TRANSLATED = /path/to/index.en.html (for the English version) > PATH_TRANSLATED = /path/to/index.X.html (for the X version) > > BUT what I get is: > PATH_TRANSLATED = /path/to/script.php (no matter what i request !) > > Can anyone help me getting the real Apache PATH_TRANSLATED (which is actualy > shown in phpinfo() under "Apache Environment" but not under "PHP Variables") > > > > Yours faithfully > Heino H. Gehlsen > > >
PHP 4.0.5.dev I installed it on my Windows 2000 Pro machine with IIS and MySQL and it works like a champ I installed it on my Windows NT Server with IIS and MSSQL and it will not read the php.ini file I put it in the following folders to try to get it to work C:\winnt C:\ C:\winnt\system32 C:\windows <-------created just to see if it would work I used the same archive for both and even copied the php.ini from the 2000 machine to the NT machine. I have tried editing it and then restarting IIS ( net stop iisadmin ... net start w3svc ) and no changes show up. GRRR!!! What's up here? Thanks
i am getting this message on top of one of my pages. i have read up on it and everyone says its a warning message but from the things ive seen online no one seems to know how to get rid of it. any help is appreciated. php3/red hat 6.2/sybase-11.9.2 is my basic config. thanks, ss ----------------------------------------------------------------------- Q: Backstreet Boys or N'Sync? A: Both of them. In a house, on fire, surrounded by trick fire extinguishers filled with gasoline. -----------------------------------------------------------------------
I have a site that uses PHP extensively. Each page has PHP, so of course each page ends in the .php extension. Does anyone know if this affects the way a search engine crawls a site? I have several sites that are very successful, but this site does not even show up on the search engines. All design criteria and submission techniques were the same, except I used PHP on this particular site on every page. Thanks for your help... Shane
On 01/17, Shane McBride rearranged the electrons to read: > Does anyone know if this affects the way a search engine crawls a site? > I have several sites that are very successful, but this site does not even > show up on the search engines. It shouldn't. I have a few sites that use .php files exclusively and they all show up in search engines at some point. The spiders should just see plain html returned to them anyhow, since the server is doing the parsing. Have you checked to make sure you don't have a robots.txt file that's blocking the spiders' access to the server(s)? That's the only thing I can think of that may be causing you problems. - Jamie -- Village Idiot <[EMAIL PROTECTED]> (Single purpose Email address)
hi.. i have a client who runs a windows 2000 IIS server. now they want me to write them some server side code that must run under this system. i need to know: - does PHP/MySQL perform reliably under windows 2000? - will PHP/MySQL be reasonably fast under windows 2000? - which is the best implementation method - mysql as NT service, php as IIS module? anyone have any real life experiences they could share? thanks for your thoughts. i really dont want to have to dig my ASP book out. jamie. ps. i run FreeBSD 4 with PHP/MySQL myself and this is my preferred choice of server setup ;)
I run W2K with Apache as my webserver, MySQL as a service, and PHP as a CGI (I think...far from an expert in these matters) as a testing platform before I upload my code to a live Linux Apache webserver. The W2K box is my workstation and runs MS Office, Eudora Pro, PhotoShop, and other "normal" user apps and it's rock solid. Can't really comment on performance because I'm the only person hitting the "web site". John Guynn This email brought to you by RFCs 821 and 1225. -----Original Message----- From: Jamie Burns [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 2:52 PM To: [EMAIL PROTECTED] Subject: [PHP] how reliable is Windows2000 / php ? hi.. i have a client who runs a windows 2000 IIS server. now they want me to write them some server side code that must run under this system. i need to know: - does PHP/MySQL perform reliably under windows 2000? - will PHP/MySQL be reasonably fast under windows 2000? - which is the best implementation method - mysql as NT service, php as IIS module? anyone have any real life experiences they could share? thanks for your thoughts. i really dont want to have to dig my ASP book out.
Is there a difference in the way PHP parses scripts in various operating systems? I've gotten opinions that say PHP under Linux parses more/different code than does under Windows NT. Thanks -Marc
Marc Clerc wrote: > > Is there a difference in the way PHP parses scripts in various operating > systems? I've gotten opinions that say PHP under Linux parses > more/different code than does under Windows NT. It's mostly the same. But there are a few things that won't work on Windows, like crypt(), certain filesystem functions and other stuff. Not that much. Wagner -- One maniac alone can do what 20 together cannot
> Try looking at register_shutdown_function at > http://www.php.net/manual/en/function.register-shutdown-function.php >From the documentation: "int register_shutdown_function (string func) Registers the function named by func to be executed when script processing is complete." What qualifies as "complete"? After each page is parsed and served to the client? After a certain amount of time when the requesting browser hasn't made another request? Chris
Dear everyone Can someone tell me how to use Session Object because when the user login the page I want to store the login,pass,and type_login so that I can pass this throughout the process. I found that i can store that by using cookies ,but the problem ,some computer can't store cookies,and it caused redirect to main page. So,that i was asked to use Session Object By ASP people,and i wonder how to do that in PHP? thank you very much Sincerely Yours Hendry Sumilo [EMAIL PROTECTED] http://members.tripodasia.com.my/hsumilo _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
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 ('<b>unable to connect to the database.</b>'); mysql_select_db ('usertest') or die ('<b>unable to select the database.</b>'); 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 "<a href=next.php>Go to next page</a>"; /* 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 "<script language=\"javascript\">"; echo "alert(\"You can choose the rating only once\");"; echo "</script>"; } } Thanks Chakravarthy K Sannedhi __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
ANyone heard anything about these guys? They seem like a godsend, but anyone had any experience with them? Matt "Trollboy" Wiseman www.shoggoth.net/trollboy/trollboy.jpg [EMAIL PROTECTED] "I wish the world had one throat!!" -Al Bundy
IF (notice the CAPITAL IF) they have fixed their system stability problems AND their customer service (or lack thereof) they would be a great service. At one time I was web master for two domains hosted by them (performanceamstyle.com and felineguide.com...performanceamstyle.com is still hosted there by the choice of the domain owner). The service would go away for a few minutes occasionally which wasn't too bad until one day it went away for over 24 hours!!! No replies to email requesting system status, I finally found a phone number to call them (it's not on their site BTW), got an answering machine so I left a message demanding a return phone call to my cell phone and NEVER got a return call. After more than 24 hours the system came back up with no real explanation as to what failed...I found out through a little investigating that some changes I had made to felineguide.com just before the crash were gone and replaced with old code. In other words they had a SERIOUS server crash and had to restore from backups, but they didn't bother to tell me that. About 2 weeks after the disaster the owner of performanceamstyle.com got an email from the new director of customer relations (or something like that). Basically that person said the customer service department was going through a major restructuring and any response time over 24 hours was unacceptable. Since that time I don't think phpwebhosting.com has gone down so maybe they have solved their problems. The owner of felineguide.com asked that I move their site to below10host.com. I have never had a problem with below10host.com (I own teamkaos.org and have it hosted there, felineguide.com is hosted there, and I webmaster kaospetproducts.com there also). Their customer service is excellent, they always respond quickly to requests and in the rare even of a server failure they tell you what happened if you ask. John Guynn This email brought to you by RFCs 821 and 1225. -----Original Message----- From: Matt "TrollBoy" Wiseman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 3:15 PM To: PHP (E-mail) Subject: [PHP] phpwebhosting.com ANyone heard anything about these guys? They seem like a godsend, but anyone had any experience with them?
I was curious so I looked at their site. They shout "unlimited" as loud as they can, for every service you can imagine. But their FAQ says: > Though we do not have any pre-set limits, you will not be allowed > to and/or over five GB of bandwidth/month. "Yes there is NO limit. Read our lips. There is really NO limit. But even though there is NO limit, you still can't have more than 5GB per month for our competition killing price of $9.95" "Anyone should be able to understand that, right?" They also claim they will limit each server to a max of 125 users. So let's do a little math ... 125 users at $10 per month, is a maximum revenue of $1,250 per month per server. From that meager revenue, they are able to provide their customers with an OC-12. I would like to meet the genius who is able to pull that financial rabbit out of a hat! Egan
"Sites hosting illegal files, porn, warez, file archives or other "download-only" sites are not accepted. " Pretty much every site I've ever done or gone to is primarily a 'download-only' site. Yahoo - I rarely upload anything to them. Google? I download tons of data from them. giga-commerce sites? Each page I go to I'm downloading 100k of graphics. I know what they mean, but they should definitely reword that. Egan wrote: > I was curious so I looked at their site. > > They shout "unlimited" as loud as they can, for every service you can > imagine. But their FAQ says: > > > Though we do not have any pre-set limits, you will not be allowed > > to and/or over five GB of bandwidth/month. > > "Yes there is NO limit. Read our lips. There is really NO limit. But > even though there is NO limit, you still can't have more than 5GB per > month for our competition killing price of $9.95" > > "Anyone should be able to understand that, right?" > > They also claim they will limit each server to a max of 125 users. So > let's do a little math ... > > 125 users at $10 per month, is a maximum revenue of $1,250 per month > per server. From that meager revenue, they are able to provide their > customers with an OC-12. I would like to meet the genius who is able > to pull that financial rabbit out of a hat! > > Egan >
On Wed, 17 Jan 2001 16:46:45 -0500, Egan <[EMAIL PROTECTED]> wrote: >"Yes there is NO limit. Read our lips. There is really NO limit. But >even though there is NO limit, you still can't have more than 5GB per >month for our competition killing price of $9.95" And that reminds me of a joke ... A man sees a restaurant and the sign says: "All you can eat for $7.95" He is very hungry, so he goes in and pays his money. Then he gets his first plate of food, and eats it quickly. When he goes to get his second plate, the manager comes over and asks him to leave. The man says "What? The sign says all you can eat." The manager replies "That *IS* all you can eat for $7.95!" :-)
> 125 users at $10 per month, is a maximum revenue of $1,250 per month > per server. From that meager revenue, they are able to provide their > customers with an OC-12. I would like to meet the genius who is able > to pull that financial rabbit out of a hat! ...and one machine is chewing up a whole OC-12? Who says they don't have multiple machines on the same OC-12? Just thought I'd throw in a comment; sounds to me like a wise choice would be to pick another host. I've personally had a good experience with Abhost.net, and their hosting pricing is similarly affordable but not quite as unbelievable. --Toby ----- Original Message ----- From: "Egan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 4:46 PM Subject: Re: [PHP] phpwebhosting.com > I was curious so I looked at their site. > > They shout "unlimited" as loud as they can, for every service you can > imagine. But their FAQ says: > > > Though we do not have any pre-set limits, you will not be allowed > > to and/or over five GB of bandwidth/month. > > > "Yes there is NO limit. Read our lips. There is really NO limit. But > even though there is NO limit, you still can't have more than 5GB per > month for our competition killing price of $9.95" > > "Anyone should be able to understand that, right?" > > They also claim they will limit each server to a max of 125 users. So > let's do a little math ... > > 125 users at $10 per month, is a maximum revenue of $1,250 per month > per server. From that meager revenue, they are able to provide their > customers with an OC-12. I would like to meet the genius who is able > to pull that financial rabbit out of a hat! > > > Egan > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
On Wed, 17 Jan 2001 18:04:16 -0500, "Toby Butzon" <[EMAIL PROTECTED]> wrote: >> 125 users at $10 per month, is a maximum revenue of $1,250 per month >> per server. From that meager revenue, they are able to provide their >> customers with an OC-12. I would like to meet the genius who is able >> to pull that financial rabbit out of a hat! > >...and one machine is chewing up a whole OC-12? > >Who says they don't have multiple machines on the same OC-12? I didn't. But even if they had 100 servers, have you priced an OC-12 lately? And if they actually have a server farm large enough to justify an OC-12, then how many people would be required to maintain a server farm that large? What about the cost of those salaries? What about the cost of the co-location space. What about the cost of ... etc, etc? When you add up all the costs, and compare that to the maximum revenue they could possibly generate with a price of $9.95 per month, I am not convinced they put much value on truth in advertising. Egan
>From my experience with them they only have one host serving their customers. John Guynn This email brought to you by RFCs 821 and 1225. -----Original Message----- From: Toby Butzon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 5:04 PM To: Egan; [EMAIL PROTECTED] Subject: Re: [PHP] phpwebhosting.com > 125 users at $10 per month, is a maximum revenue of $1,250 per month > per server. From that meager revenue, they are able to provide their > customers with an OC-12. I would like to meet the genius who is able > to pull that financial rabbit out of a hat! ...and one machine is chewing up a whole OC-12? Who says they don't have multiple machines on the same OC-12?
:) Ok you and John win ;) Probably shoulda kept my yap shut... --Toby ----- Original Message ----- From: "Egan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 6:16 PM Subject: Re: [PHP] phpwebhosting.com > On Wed, 17 Jan 2001 18:04:16 -0500, "Toby Butzon" > <[EMAIL PROTECTED]> wrote: > > >> 125 users at $10 per month, is a maximum revenue of $1,250 per month > >> per server. From that meager revenue, they are able to provide their > >> customers with an OC-12. I would like to meet the genius who is able > >> to pull that financial rabbit out of a hat! > > > >...and one machine is chewing up a whole OC-12? > > > >Who says they don't have multiple machines on the same OC-12? > > I didn't. > > But even if they had 100 servers, have you priced an OC-12 lately? > And if they actually have a server farm large enough to justify an > OC-12, then how many people would be required to maintain a server > farm that large? What about the cost of those salaries? What about > the cost of the co-location space. What about the cost of ... etc, > etc? > > When you add up all the costs, and compare that to the maximum revenue > they could possibly generate with a price of $9.95 per month, I am not > convinced they put much value on truth in advertising. > > Egan > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >
> But even if they had 100 servers, have you priced an OC-12 lately? No I haven't. Can you enlighten me?
On Wed, 17 Jan 2001 18:24:28 -0500, "Leonard T. Harris" <[EMAIL PROTECTED]> wrote: > But even if they had 100 servers, have you priced an OC-12 lately? > >No I haven't. Can you enlighten me? We're on an OC-12 too. But we don't imply that we have it all to ourselves. Very few hosting providers, if any, do. Offering value to customers means provisioning bandwidth which meets your current and short term expected load. As long as that condition is met, advertising OC-whatever is just a marketing gimmick. Egan
> But even if they had 100 servers, have you priced an OC-12 lately? Actually, isn't it possible / more likely that they're running one server cohosted at an ISP with an OC-12 link? Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair!
On Thu, 18 Jan 2001 10:50:24 +1100, Jason Murray <[EMAIL PROTECTED]> wrote: >> But even if they had 100 servers, have you priced an OC-12 lately? > >Actually, isn't it possible / more likely that they're running one >server cohosted at an ISP with an OC-12 link? Yes. But the few ISPs who actually have OC-12 links charge accordingly for their co-location service. They are not the cheapest you will find. Egan
>> have you priced an OC-12 lately? > No I haven't. Can you enlighten me? I was curious :) http://gometanet.com/connect/fiber.htm OC12 622 Mb Monthly Fee $550,000 Setup Fee call (prolly between 10k and 20k) I'll have to ask my wife first... _Ken At 06:24 PM 1/17/01 -0500, you wrote: >> But even if they had 100 servers, have you priced an OC-12 lately? > >No I haven't. Can you enlighten me? > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED]
Strewth! that's 4g/second at full strength! I'd say that's a fair bit more than all the links out of my whole bloody country! Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. ----- Original Message ----- From: "Ken" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 18, 2001 11:13 AM Subject: Re: [PHP] phpwebhosting.com > >> have you priced an OC-12 lately? > > No I haven't. Can you enlighten me? > > I was curious :) > > http://gometanet.com/connect/fiber.htm > > OC12 > 622 Mb > > Monthly Fee > $550,000 > > Setup Fee > call (prolly between 10k and 20k) > > I'll have to ask my wife first... > _Ken > > > > At 06:24 PM 1/17/01 -0500, you wrote: > >> But even if they had 100 servers, have you priced an OC-12 lately? > > > >No I haven't. Can you enlighten me? > > > > > >-- > >PHP General Mailing List (http://www.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] >
On Wed, 17 Jan 2001 16:13:26 -0800, Ken <[EMAIL PROTECTED]> wrote: >http://gometanet.com/connect/fiber.htm > >OC12 >622 Mb > >Monthly Fee >$550,000 > >Setup Fee >call (prolly between 10k and 20k) And if you walk in off the street and place an order, expect a much larger deposit than 10k or 20k, to cover your first month's service charge. :-) Egan
Addressed to: Jason Murray <[EMAIL PROTECTED]> [EMAIL PROTECTED] ** Reply to note from Jason Murray <[EMAIL PROTECTED]> Thu, 18 Jan 2001 10:50:24 +1100 > > > But even if they had 100 servers, have you priced an OC-12 lately? > > Actually, isn't it possible / more likely that they're running one > server cohosted at an ISP with an OC-12 link? > I'd be suprised if it was anything else. At HostPro in Boise Idaho, Moses Lake Washington and Boca Raton Florida you can get room for one PC for about $250/month, 3 PCs for $500, and bigger cabinets that I don't know about. This includes a refrigerator sized UPS, and a diesel generator with about 5 days of fuel outside. The room is always 75 degrees F. I have less than 6 feet of copper wire before a switch. From there it is fiber all the way. The last I heard we had 4 oc48's into the building with more already planned. I have two 100Mb/Sec Ethernet cables available to me. If you need the bandwidth colocation or managed hosting at a facility like this is hard to beat. Even for a big company that already has a T1 or more for office needs, put the server in colocate and manage it from your office. I just downloaded the PHP4.0.4pl1 tarball in about 10 seconds. Php.net must be on a fairly slow link, :) I've seen similar sized files transfer in under three seconds. I never expected to see files come in from the Internet at network card speeds, but it has happened. My original business plan was to bring in a T1 and have the servers at my office. That T1 was ordered in March 1999. We just cancelled the order last month. Still no T1, but after seeing the connection speeds we get there is no way I want to step down to a T1 any more. Rick Widmer Internet Marketing Specialists http://www.developersdesk.com
I am trying to run PHP in Windows '95 with Apache server. I followed all the instructions in the installation doc, including editting the Apache and PHP configuration files, and putting the PHP.INI file in my Windows directory, and when I try to run a PHP file, I just see everything from the file as plain text in the browser. What might I be doing wrong? -Phil
In my attempt to simulate array_intersect in PHP3, I tried nesting while statements. While traversing one array to display checkboxes, I wanted to loop through another array, testing to see if any of the values in it match the current value in the outer while loop. What I'm getting is that the inner while loop executes on the first execution of the outer while, and then not at all. How would I get it to execute each time? Here's the code: $childquery = "select * from flavors order by flavor"; $childtype = "flavor"; $childresult = mysql_query($childquery) or die(mysql_error()); $relationsquery = "select * from relations where childtype='$childtype' and parenttype='$parenttype' and parentsku='$parentsku'"; $relationsresult = mysql_query($relationsquery) or die(mysql_error()); ?> <form action="<?php echo $PHP_SELF?>" method="post"> ...various form variables... <h3>Parent: <?php echo $parent ?></h3> <?php while ($row = mysql_fetch_array($childresult)) { $thevalue = $row["flavorsku"]; $thedisplay = $row["flavor"]; printf("<input type=\"checkbox\" name=\"childsku[]\" value=\"%s\"", $thevalue); while ($relationsrow = mysql_fetch_array($relationsresult)) { $thischild = $relationsrow["childsku"]; if ($thevalue == $thischild) { echo " checked"; } } // end while relations loop printf(">%s<br>\n", $thedisplay); } //end the child results while loop Thanks for any suggestions! -- Maurice Rickard http://mauricerickard.com/
> What I'm getting is that the inner while loop executes on the first > execution of the outer while, and then not at all. How would I get > it to execute each time? Coming from a perl background, I got stuck there too when I started using PHP. PHP has this odd notion of an array pointer. After the first time you loop through the array, the pointer is at the end, so the second loop won't really do anything. Use the reset frunction to reset the array pointer to the first element. - Darryl ---------------------------------------------------------------------- Darryl Friesen, B.Sc., Programmer/Analyst [EMAIL PROTECTED] Education & Research Technology Services, http://gollum.usask.ca/ Department of Computing Services, University of Saskatchewan ---------------------------------------------------------------------- "Go not to the Elves for counsel, for they will say both no and yes"
> > What I'm getting is that the inner while loop executes on the first > > execution of the outer while, and then not at all. How would I get > > it to execute each time? > > Coming from a perl background, I got stuck there too when I started using > PHP. PHP has this odd notion of an array pointer. After the first time you > loop through the array, the pointer is at the end, so the second loop won't > really do anything. Use the reset frunction to reset the array pointer to > the first element. The array pointer can be pretty useful. ie. give me the second last element of an array: end($arr); echo prev($arr); Or have it tell you what the index is at the second last element: end($arr); prev($arr); echo key($arr); and the index before that one: prev($arr); echo key($arr); Perl has these too, they just aren't user accessible. -Rasmus
Thanks! This is starting to make sense...although when I try to reset what I thought was my array, I get the "Variable passed to reset() is not an array or object" error message. Here's the relevant code: $relationsquery = "select * from relations where childtype='$childtype' and parenttype='$parenttype' and parentsku='$parentsku'"; $relationsresult = mysql_query($relationsquery) or die(mysql_error()); while ($relationsrow = mysql_fetch_array($relationsresult)) { $thischild = $relationsrow["childsku"]; if ($thevalue == $thischild) { echo " checked"; } } // end while for relations loop reset($relationsresult); Thanks again for your help so far! Maurice At 2:00 PM -0800 1/17/01, Rasmus Lerdorf wrote: >> > What I'm getting is that the inner while loop executes on the first >> > execution of the outer while, and then not at all. How would I get >> > it to execute each time? >> >> Coming from a perl background, I got stuck there too when I started using >> PHP. PHP has this odd notion of an array pointer. After the first time you >> loop through the array, the pointer is at the end, so the second loop won't >> really do anything. Use the reset frunction to reset the array pointer to >> the first element. > >The array pointer can be pretty useful. ie. give me the second last >element of an array: > > end($arr); > echo prev($arr); > >Or have it tell you what the index is at the second last element: > > end($arr); > prev($arr); > echo key($arr); > >and the index before that one: > > prev($arr); > echo key($arr); > >Perl has these too, they just aren't user accessible. > >-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] -- Maurice Rickard http://mauricerickard.com/
> $relationsresult = mysql_query($relationsquery) or die(mysql_error()); > > while ($relationsrow = mysql_fetch_array($relationsresult)) { > > $thischild = $relationsrow["childsku"]; > if ($thevalue == $thischild) { > echo " checked"; > } > > } // end while for relations loop > > reset($relationsresult); Nope. The array is $relationsrow (an array of the columns for the current row returned by mysql_fetch_array). $relationresult is just that; a result 'flag' for the query indicating whether or not the query was successful. - Darryl ---------------------------------------------------------------------- Darryl Friesen, B.Sc., Programmer/Analyst [EMAIL PROTECTED] Education & Research Technology Services, http://gollum.usask.ca/ Department of Computing Services, University of Saskatchewan ---------------------------------------------------------------------- "Go not to the Elves for counsel, for they will say both no and yes"
On Wed, 17 Jan 2001, Maurice Rickard wrote: > Thanks! This is starting to make sense...although when I try to > reset what I thought was my array, I get the "Variable passed to > reset() is not an array or object" error message. Here's the > relevant code: > > $relationsquery = "select * from relations where > childtype='$childtype' and parenttype='$parenttype' and > parentsku='$parentsku'"; > > $relationsresult = mysql_query($relationsquery) or die(mysql_error()); > > while ($relationsrow = mysql_fetch_array($relationsresult)) { > > $thischild = $relationsrow["childsku"]; > if ($thevalue == $thischild) { > echo " checked"; > } > > } // end while for relations loop > > reset($relationsresult); Um, no. $relationsresult isn't an array, it's a MySQL result resource. Use mysql_data_seek() instead. > Thanks again for your help so far! > Maurice > -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
At 4:22 PM -0600 1/17/01, Darryl Friesen wrote: >> $relationsresult = mysql_query($relationsquery) or die(mysql_error()); >> >> while ($relationsrow = mysql_fetch_array($relationsresult)) { >> >> $thischild = $relationsrow["childsku"]; >> if ($thevalue == $thischild) { >> echo " checked"; >> } >> >> } // end while for relations loop >> >> reset($relationsresult); > >Nope. The array is $relationsrow (an array of the columns for the current >row returned by mysql_fetch_array). $relationresult is just that; a result >'flag' for the query indicating whether or not the query was successful. Hmm. I get the same error for $relationsrow there. At 5:22 PM -0500 1/17/01, Ignacio Vazquez-Abrams wrote: > >Um, no. $relationsresult isn't an array, it's a MySQL result resource. Use >mysql_data_seek() instead. OK, could this be why I'm getting the same error message for $relationsrow? Thanks for the help, btw! -Maurice -- Maurice Rickard http://mauricerickard.com/
Getting off topic maybe so I'll keep it short. > The array pointer can be pretty useful. True, but unexpected for the perl programmer/novice PHP geek. > ie. give me the second last element of an array: This can be done in perl ("standard" arrays) with $array[@array-2] > Or have it tell you what the index is at the second last element: > and the index before that one: Not sure of a way (if any) to do that with perl's associative arrays. Chalk one up for PHP. Once I got a handle on the differences between perl and php arrays (perl has two types; php just has one that works like a combination of both of perl's) I was OK. - Darryl ---------------------------------------------------------------------- Darryl Friesen, B.Sc., Programmer/Analyst [EMAIL PROTECTED] Education & Research Technology Services, http://gollum.usask.ca/ Department of Computing Services, University of Saskatchewan ---------------------------------------------------------------------- "Go not to the Elves for counsel, for they will say both no and yes"
At 5:22 PM -0500 1/17/01, Ignacio Vazquez-Abrams wrote: > >Um, no. $relationsresult isn't an array, it's a MySQL result resource. Use >mysql_data_seek() instead. > Ah! I get it! mysql_data_seek($relationsresult,0); does what I need it to do. Thanks, everyone! -Maurice -- Maurice Rickard http://mauricerickard.com/
Hello, I am doing a math function where I divide one number by another. I want it to give me a whole number though, and if it is anything above a number I want it to go to the next one up. Example: 4.0001 would equal 5 3.98 would equal 4 11.023 would equal 12 I hope you understand what I am trying to say. Thank you, -------------------------------------------- Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com --------------------------------------------
On Mon, 17 Jan 2000, Brandon Orther wrote: > Hello, > > I am doing a math function where I divide one number by another. I want it > to give me a whole number though, and if it is anything above a number I > want it to go to the next one up. > > Example: > > 4.0001 would equal 5 > > 3.98 would equal 4 > > 11.023 would equal 12 > > > I hope you understand what I am trying to say. > > > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.com > -------------------------------------------- > ceil() -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
Hi, I have a non PHP questions which probably doesn't fit in this mailling lists, but I have a feeling that someone can help me because it is very HTML related. I was busy making a small piece of PHP echo code which generates a link which enables you to click this and startup your email software with a basic message in it.. The URL is basically the following: mailto:$email?body=Dear $name, We would like to inform you.... With kind regards, $sender&subject=Message send on $date about $subject &bcc=$bccopy When clicked you will get the $email text as email address, the Dear $name... etc as body of the email etc etc.. Now here the non-PHP questions.. I searched everywhere, but how can I get line breaks inserted IN the email program..?? After the 'Dear $name,' part I would like to have 2 line breaks.. Then after the We would like to inform you... another 2 breaks.. I tried \n, I tried <BR> (<BR> you simply see this as email text.).. Is this possible.. Hope someone understande the problem.. (I am not trying to get breaks in my source, or what you see on the screen, but line breaks in the email text.. Thanks. Bye Bye David
On 01/17, David Bouw rearranged the electrons to read: > Now here the non-PHP questions.. I searched everywhere, but how can I get > line breaks inserted IN the email program..?? > After the 'Dear $name,' part I would like to have 2 line breaks.. Then after > the We would like to inform you... another 2 breaks.. > > I tried \n, I tried <BR> (<BR> you simply see this as email text.).. You might try using \r\n instead of just \n. That is how I have parsed out line breaks in textarea fields on html forms in the past. It may work for what you're describing, as well? Hope this helps... - Jamie -- #include <caffeine.h> <[EMAIL PROTECTED]> (Single purpose Email address)
On Wed, 17 Jan 2001, David Bouw wrote: > Hi, > > I have a non PHP questions which probably doesn't fit in this mailling > lists, but I have a feeling that someone can help me because it is very HTML > related. > > I was busy making a small piece of PHP echo code which generates a link > which enables you to click this and startup your email software with a basic > message in it.. > > The URL is basically the following: > mailto:$email?body=Dear $name, We would like to inform you.... With kind > regards, $sender&subject=Message send on $date about $subject &bcc=$bccopy > > When clicked you will get the $email text as email address, the Dear > $name... etc as body of the email etc etc.. > > Now here the non-PHP questions.. I searched everywhere, but how can I get > line breaks inserted IN the email program..?? > After the 'Dear $name,' part I would like to have 2 line breaks.. Then after > the We would like to inform you... another 2 breaks.. > > I tried \n, I tried <BR> (<BR> you simply see this as email text.).. > > Is this possible.. Hope someone understande the problem.. (I am not trying > to get breaks in my source, or what you see on the screen, but line breaks > in the email text.. > > Thanks. > Bye Bye > David > RFC 2368 says that you use "%0D%0A" for newlines and "%20" for spaces (Section 5: Encoding). Remember: the RFCs are your friends :) -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
On 01/13, jeremy brand rearranged the electrons to read: > Hello 10,000 Screaming Monkeys, > (Sorry, I couldn't resist!) 's alright. That's what it's there for. ;) > You should test the return value of flock(), not just run it. It is > designed to tell you whether or not something is safe to do, and since > you are not testing the result, you are simply ignoring what it is > trying to tell you. > > I have a small script that uses flock(): > http://www.nirvani.net/software/dr-fun/ Thanks! That's a good, basic example to help get me started. I am intentionally not using a database for the logging, because it doesn't make much sense to add the overhead just to increment a number on a single line of a file whenever something's downloaded. Thanks, also, to Mukul Sabharwal for your suggestion. I'll give them both a try and see what works best in my environment. Regards, Jamie -- Nurse! I spy gypsies! Run! <[EMAIL PROTECTED]> (Single purpose Email address)
Just a small (and hopefully easy) question. Is there a PHP equivalent of index.html? I want to be able to go straight to a PHP script without the user specifying the filename. Thanks, Steve.
S Bey wrote: > Just a small (and hopefully easy) question. > > Is there a PHP equivalent of index.html? I want to be able to go straight > to a PHP script without the user specifying the filename. This is not a PHP-issue, its just a matter of how your webserver is configured. With apache, you just have to add index.php as DirectoryIndex. Wagner -- One maniac alone can do what 20 together cannot
On 01/17, S Bey rearranged the electrons to read: > Just a small (and hopefully easy) question. > > Is there a PHP equivalent of index.html? I want to be able to go straight > to a PHP script without the user specifying the filename. It's up to the server to decide what it will look for instead of index.html, but the equivilent would be index.php, index.php3, or index.phtml, depending on the version of PHP you have installed. (The first-listed is PHP4, followed by 3, then 2.x) If you're using Apache as your web server, look for a line in your httpd.conf (or apache.conf) that looks like this: DirectoryIndex index.html Modify it to look like this: DirectoryIndex index.html index.php index.shtml index.php3 index.phtml index.htm (if you want to be extremely thorough) If you're using another web server, sorry, I can't help. :) - Jamie -- Call me insane one more time and I'll eat your other eye <[EMAIL PROTECTED]> (Single purpose Email address)
Actually, You need to set this up in your httpd.conf file (if you're using apache). look for this line in your httpd.conf -----[cut]--------- DirectoryIndex index.html index.php ------[/cut]-------- and if index.php isn't listed there, then add it. --jeremy -- Jeremy Kelley <[EMAIL PROTECTED]> pgp keyid 0xAECBA355 Phil 1:21 www.ganooz.com Car pour moi, la vie c'est le Christ, et la mort est un gain. > -----Original Message----- > From: S Bey [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 17, 2001 22:35 > To: [EMAIL PROTECTED] > Subject: [PHP] Homepage > > > Just a small (and hopefully easy) question. > > Is there a PHP equivalent of index.html? I want to be able to > go straight > to a PHP script without the user specifying the filename. > > Thanks, Steve. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] >
At 04:35 PM 1/17/2001, S Bey wrote: you need to set that in you apache configuration. open it in pico the press <ctrl>+w and type DocumentIndex add index.php to the line that you get....mine looks like this DirectoryIndex index.html index.htm index.shtml index.php3 index.php index.phtml default.html default.htm not hard :-) ~kurth >Just a small (and hopefully easy) question. > >Is there a PHP equivalent of index.html? I want to be able to go straight >to a PHP script without the user specifying the filename. > >Thanks, Steve. > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED]
what you can do also is using a HTTP header to redirect the user automatically to the index.php: the head of index.html could look like this: <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="refresh" content="0;URL=index.php"> </head> By this way you don;t need to change anything on apache... Rom ----- Original Message ----- From: S Bey <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 4:35 PM Subject: [PHP] Homepage Just a small (and hopefully easy) question. Is there a PHP equivalent of index.html? I want to be able to go straight to a PHP script without the user specifying the filename. Thanks, Steve. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Are includes supported in ver 3.0? I'm having troubles with my includes. Here is the include (after this evening we will ver 4.0): include ($DOCUMENT_ROOT . "/gophp/Main.php"); Thanks
Hi all, Could anyone tell me how to show a hyperlink without underline, just regular text which contains link. Thanks. regards Calvin Chua Systems Analyst InterClean Equipment, Inc. 734-975-2967
At 04:42 PM 1/17/2001, Wee Chua wrote: their defined in style sheets. Point your browser to www.w3c.org for more information ~kurth >Hi all, >Could anyone tell me how to show a hyperlink without underline, just regular >text which contains link. Thanks. > >regards >Calvin Chua >Systems Analyst >InterClean Equipment, Inc. >734-975-2967 > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED]
Make yourself a style sheet file with something like this in the content: ""text-decoration: none "" will say to the html not to show the inderscore bellow the link. A.LinkMain { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; text-transform: none; color: #FF0000; text-decoration: none } Then declare this in the beginning of your html or php: <link rel="stylesheet" href="css_file_name"> Then add the class declaration in your href: <a href="DnD/Arlos.htm" class="LinkMain">something</a> >>>-----Original Message----- >>>From: Wee Chua [mailto:[EMAIL PROTECTED]] >>>Sent: Wednesday, January 17, 2001 4:42 PM >>>To: PHP (E-mail) >>>Subject: [PHP] Hyperlink? >>> >>> >>>Hi all, >>>Could anyone tell me how to show a hyperlink without >>>underline, just regular >>>text which contains link. Thanks. >>> >>>regards >>>Calvin Chua >>>Systems Analyst >>>InterClean Equipment, Inc. >>>734-975-2967 >>> >>> >>>-- >>>PHP General Mailing List (http://www.php.net/) >>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>For additional commands, e-mail: [EMAIL PROTECTED] >>>To contact the list administrators, e-mail: >>>[EMAIL PROTECTED] >>> >>>
do this INSIDE the head tags: <style type="text/css"> <!-- a { text-decoration: none } a:hover { text-decoration:underline } --> </style> this create the famous effect of when you mouse over appears the underline you can also set colors by: color: #XXXXXX, like the following: <style type="text/css"> <!-- a { text-decoration: none; color:#000000 } a:hover { text-decoration:none; color:#FF00FF } --> </style> Have Fun! Rom ----- Original Message ----- From: Wee Chua <[EMAIL PROTECTED]> To: PHP (E-mail) <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 4:42 PM Subject: [PHP] Hyperlink? Hi all, Could anyone tell me how to show a hyperlink without underline, just regular text which contains link. Thanks. regards Calvin Chua Systems Analyst InterClean Equipment, Inc. 734-975-2967 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
I get this error: <br> <b>Fatal error</b>: Internal pdflib error: Wrong order of function calls (PDF_open_mem) in <b>/home/httpd/html/test/test.pdftest2.php</b> on line <b>5</b><br> when I run this code <?php header ("Content-type: application/pdf"); $pdf = pdf_open(); pdf_set_info($pdf, "Subject", "Testing"); pdf_begin_page($pdf, 550, 800); pdf_add_outline($pdf, "Page 1"); pdf_set_font($pdf, "Times-Roman", 30, "host"); pdf_set_value($pdf, "textrendering", 1); pdf_show_xy($pdf, "This text should be Times Roman outlined", 50, 750); pdf_moveto($pdf, 50, 740); pdf_lineto($pdf, 330, 740); pdf_stroke($pdf); pdf_end_page($pdf); pdf_close($pdf); ?> What I'm trying to do is create a .pdf on the fly and send it to the browser. I want to do in all in memory and not have any pdfs cluttering up my server. Thanks!
On Wed, 17 Jan 2001, Leonard T. Harris wrote: >I get this error: > ><br> ><b>Fatal error</b>: Internal pdflib error: Wrong order of function calls >(PDF_open_mem) in <b>/home/httpd/html/test/test.pdftest2.php</b> on line ><b>5</b><br> There was a bug in PDFLIB 3.03. You can find the patch for this from http://www.pdflib.com/ --Jani
Is there a way to programatically enable the register_globals option for a php-script? For certain reasons I have the register_globals option set to "Off". However, phpMyAdmin will not work unless it is set to "On" therefore, I thought of making a check in the "config.inc.php" if the option is set, and if not, set it. Is there a function that I can call? - Carsten
On Wed, 17 Jan 2001, Carsten Gehling wrote: > Is there a way to programatically enable the register_globals option for a > php-script? > > For certain reasons I have the register_globals option set to "Off". > However, phpMyAdmin will not work unless it is set to "On" therefore, I > thought of making a check in the "config.inc.php" if the option is set, and > if not, set it. > > Is there a function that I can call? > > - Carsten > Ugh. Don't do it that way. Instead use <Directory>, <Location>, or .htaccess to turn it on for phpMyAdmin. -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
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.? I hope that makes sense. Thanks
On Wed, 17 Jan 2001, Abe 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.? > > I hope that makes sense. > > Thanks > Instead of having individual users specified at certain points, why don't you say that a user has to be a member of a certain group? That way in order to open an access lock for a user, all you have to do is add them to the group. You could even make the security levels groups themselves. -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
> Is there a sensible standard that is used to have levels of access but > special people can access certain higher level functions.? I've seen a (rather good, I might add) permissions structure that followed a pattern like a unix filesystem. /general /users /products /sales /marketing /admin And then added specific permissions as required under that. So, if you wanted one person to be able to access the Admin Delete tool, you could specifically add "/admin/delete" to their permission list, while someone with "/admin" permission would be able to access "/admin/delete" by default. I'll see if I can grab some MySQL table definitions and the like if you'd like them... Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair!
Sounds good, I for one would like to see it. Can it revoke permissions? Can I have access to all of /admin but no access to /admin/delete ?? Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. ----- Original Message ----- From: "Jason Murray" <[EMAIL PROTECTED]> To: "'Abe'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 18, 2001 9:42 AM Subject: RE: [PHP] < 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.? > > I've seen a (rather good, I might add) permissions structure that followed > a pattern like a unix filesystem. > > /general > /users > /products > /sales > /marketing > /admin > > And then added specific permissions as required under that. > > So, if you wanted one person to be able to access the Admin Delete > tool, you could specifically add "/admin/delete" to their permission > list, while someone with "/admin" permission would be able to access > "/admin/delete" by default. > > I'll see if I can grab some MySQL table definitions and the like > if you'd like them... > > 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] >
Just a side note: A very nice way to do this is using bitwise operators to store all your access information into one int This is handy for saving space in databases, and bitwise operations should be incredibly fast compared to string comparisons. Cheers, Javier -----Original Message----- From: Ignacio Vazquez-Abrams [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 2:43 PM To: Abe Cc: [EMAIL PROTECTED] Subject: Re: [PHP] < Levels of Access > On Wed, 17 Jan 2001, Abe 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.? > > I hope that makes sense. > > Thanks > Instead of having individual users specified at certain points, why don't you say that a user has to be a member of a certain group? That way in order to open an access lock for a user, all you have to do is add them to the group. You could even make the security levels groups themselves. -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
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
Hello, I am trying to get information from an exchange server and LDAP looks like my best choice. I have never used LDAP before but it appeared to be fairly straitforward. I installed the OpenLDAP software on a Linux system running PHP 4.0.4 and apache 1.3.14. It appears to let me create a connection and bind to a directory but then I get an error about an object not being present: Got linkID of 1Got bindID of 1 Warning: LDAP: Unable to perform the search: No such object in /pathtofile/ldapTest.php on line 23 Here is the code (sanitized) $linkID = ldap_connect("exchangeserver"); print("Got linkID of ".$linkID); $bindID = ldap_bind($linkID,"cn=mylogin,cn=mycompany","mypassword"); print("Got bindID of ".$bindID); $dn = "o=mycompany,ou=exchangeservername"; $filter="(|(cn=joe smith))"; $justthese = array( "ou", "sn", "givenname", "mail"); $result = ldap_search($linkID,$dn,$filter); <<<<<<<<WARNING SHOWS AT THIS LINE <rest deleted> As I said, I am new to LDAP but I was assuming I could perform some kind of search to determine the schema and then access information based on that. Is this true, or do I need to know the layout to get to the data? Any help will be appreciated. Regards, Jonathan coker
On Wed, 17 Jan 2001, Jonathan Coker wrote: > Hello, > I am trying to get information from an exchange server and LDAP looks > like my best choice. I have never used LDAP before but it appeared to be > fairly straitforward. I installed the OpenLDAP software on a Linux system > running PHP 4.0.4 and apache 1.3.14. It appears to let me create a > connection and bind to a directory but then I get an error about an object > not being present: > > > Got linkID of 1Got bindID of 1 > Warning: LDAP: Unable to perform the search: No such object in > /pathtofile/ldapTest.php on line 23 > > Here is the code (sanitized) > $linkID = ldap_connect("exchangeserver"); > > print("Got linkID of ".$linkID); > > $bindID = ldap_bind($linkID,"cn=mylogin,cn=mycompany","mypassword"); > > print("Got bindID of ".$bindID); > > > > $dn = "o=mycompany,ou=exchangeservername"; > $filter="(|(cn=joe smith))"; > $justthese = array( "ou", "sn", "givenname", "mail"); > > $result = ldap_search($linkID,$dn,$filter); <<<<<<<<WARNING SHOWS > AT THIS LINE > > <rest deleted> > > As I said, I am new to LDAP but I was assuming I could perform some kind of > search to determine the schema and then access information based on that. > Is this true, or do I need to know the layout to get to the data? > > Any help will be appreciated. > > Regards, > > Jonathan coker > Your filter is definitely wrong. Take the or operator ("|") out of it. -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
Previously, Jonathan Coker said: > > $dn = "o=mycompany,ou=exchangeservername"; I think you're looking at this backward - LDAP heirarchies are such that the root or top level is farthest-right, like DNS... so I think you may just need to do this instead: $dn = 'ou=exchangeservername, o=mycompany'; Assuming that branch actually exists, that is. HTH, -dan -- Dan Lowe <[EMAIL PROTECTED]> http://tangledhelix.com/ Before they invented drawing boards, what did they go back to? -George Carlin
I have installed PHP 4.0 with Apache 1.3 under Windows '95. When I run a PHP script, even the simplest script, the browser just sits there and never displays any data. Is there anything I might be doing wrong? I'm sure the scripts are valid, because I got them off sample code sites (although you can't be too confident of that, I'm 99% sure the code is OK.) Static pages load fine from my web server. -Phil
try a blank page with <?PHP echo(phpinfo()); ?> as the only line. Does that work? Cal http://www.calevans.com -----Original Message----- From: Phil Scopes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 5:01 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP locking up I have installed PHP 4.0 with Apache 1.3 under Windows '95. When I run a PHP script, even the simplest script, the browser just sits there and never displays any data. Is there anything I might be doing wrong? I'm sure the scripts are valid, because I got them off sample code sites (although you can't be too confident of that, I'm 99% sure the code is OK.) Static pages load fine from my web server. -Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Yo! I am wondering what the difference is between mysql_fetch_array and mysql_fetch_row. I tried using this code: $result = query("SELECT * FROM index1"); while ($row = mysql_fetch_row($result)) {... but $row[] does not contain any data, but when I changed it to: $row = mysql_fetch_array($result) ... it worked just fine. So what is the difference? /Jimmy
On Thu, 18 Jan 2001, Jimmy Bäckström wrote: > Yo! > I am wondering what the difference is between mysql_fetch_array and mysql_fetch_row. >I tried using this code: > $result = query("SELECT * FROM index1"); > > while ($row = mysql_fetch_row($result)) {... > but $row[] does not contain any data, but when I changed it to: > $row = mysql_fetch_array($result) ... it worked just fine. > > So what is the difference? > /Jimmy > mysql_fetch_row() uses numeric indices, whereas mysql_fetch_array() can also provide string indices. -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
Hi, We have installed PHP pretty much to do one thing, which is to get data from our head office website and place it on our club site. We need to have a message saying something like "The Results are not available until after the event". I can supress the error messages by adding @ before the functions but that's the best this dork can manage at this early stage in his PHP Programming career :-) I know this must use if and else or something and I'd appreciate someone untangling my newbie brain. This is the code we are using now. <? $file = fopen("http://www.ourheadoffice.co.nz/results/race01.html", "r"); $rf = fread($file, 200000); $grab = eregi("<tr bgcolor=\"#CCFF99\">(.*)</html>", $rf, $printing); fclose($file); echo "<table><tr>"; echo $printing[1]; ?> Thanks in advance. Dave Stewart
Take a look at the changes I made to your original post; this assumes that the file isn't there until results are posted - hope that's the case ;) --Toby > <? if ($file = fopen("http://www.ourheadoffice.co.nz/results/race01.html", "r")) { > $rf = fread($file, 200000); > $grab = eregi("<tr bgcolor=\"#CCFF99\">(.*)</html>", $rf, $printing); > fclose($file); > echo "<table><tr>"; > echo $printing[1]; } else { echo "Results will be available after the event."; } > ?>
I think that the file is always there...It would not be easy to sabe the current message in a text file and compare it with the new one that fopen is bringing?? Rom ----- Original Message ----- From: Toby Butzon <[EMAIL PROTECTED]> To: Dave Stewart <[EMAIL PROTECTED]>; PHP (General) <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 6:36 PM Subject: Re: [PHP] Sub Newbie Question On Error Message Take a look at the changes I made to your original post; this assumes that the file isn't there until results are posted - hope that's the case ;) --Toby > <? if ($file = fopen("http://www.ourheadoffice.co.nz/results/race01.html", "r")) { > $rf = fread($file, 200000); > $grab = eregi("<tr bgcolor=\"#CCFF99\">(.*)</html>", $rf, $printing); > fclose($file); > echo "<table><tr>"; > echo $printing[1]; } else { echo "Results will be available after the event."; } > ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Yep, that worked a treat thanks. All those danged those brackets are what keep tripping me up. The fog is lifting :-) I'll now go back to lurking and see what else I can learn. Regards, Dave ----- Original Message ----- From: Toby Butzon <[EMAIL PROTECTED]> To: Dave Stewart <[EMAIL PROTECTED]>; PHP (General) <[EMAIL PROTECTED]> Sent: Thursday, January 18, 2001 12:36 PM Subject: Re: [PHP] Sub Newbie Question On Error Message > Take a look at the changes I made to your original post; this assumes that > the file isn't there until results are posted - hope that's the case ;) > > --Toby > > > <? > if ($file = fopen("http://www.ourheadoffice.co.nz/results/race01.html", > "r")) { > > $rf = fread($file, 200000); > > $grab = eregi("<tr bgcolor=\"#CCFF99\">(.*)</html>", $rf, $printing); > > fclose($file); > > echo "<table><tr>"; > > echo $printing[1]; > } else { > echo "Results will be available after the event."; > } > > ?> > > >
I think that the file is always there...It would not be easier to save the current message in a text file and compare it with the new one that fopen is bringing?? Rom ----- Original Message ----- From: Toby Butzon <[EMAIL PROTECTED]> To: Dave Stewart <[EMAIL PROTECTED]>; PHP (General) <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 6:36 PM Subject: Re: [PHP] Sub Newbie Question On Error Message Take a look at the changes I made to your original post; this assumes that the file isn't there until results are posted - hope that's the case ;) --Toby > <? if ($file = fopen("http://www.ourheadoffice.co.nz/results/race01.html", "r")) { > $rf = fread($file, 200000); > $grab = eregi("<tr bgcolor=\"#CCFF99\">(.*)</html>", $rf, $printing); > fclose($file); > echo "<table><tr>"; > echo $printing[1]; } else { echo "Results will be available after the event."; } > ?> -- PHP General Mailing List (http://www.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]
Fixes this time around: * class hierarchies more than two levels deep should work now :) * should compile cleanly under PHP 4.0.2 through 4.0.4pl1 Dan
It started showing up at the end of my page after I switched from 4.0.5-dev back to 4.0.4pl1 when 4.0.5-dev wouldn't read the php.ini on my NT Server. Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none) Thanks -Bob-
Hello all, I am trying to build an IRR calculator using PHP. The number of cash flow streams I will have at any time will vary, so I am using a loop to build the formula. Then I am iterating to solve the equation and output the solution. As most of you know, I am solving the following for r: 0=SUM SERIES(CF(i)/{(1+r)^n)) I can build my formula sucessfully with the following; $form=""; while ($row=mysql_fetch_array($result)){ $form.="$CF/pow((1+'$r'),$N)"; } But it recognizes $form as a string, so when I put it in my "solution for r" loop: for($r=-1.00; $r<=1.00; $r=$r+.0001){ if($form>-.001 && $form < .001){ $IRR=round($r*100, 2); } } echo "$IRR%<br>"; BTW, I have also tried building the $form as a variable, but since I don't have a value for $r it just puts in zero and sets $form equal to the right side of the equation. Therfore, instead of inserting a formula into my "solution for r" loop, it inserts a constant for $form. I think my solution is to build the formula as a string and then insert it into my "solution for r" loop, convert it back to a real formula and then iterate for the solution. Is this possible? If not, any suggestions?
On Wed, 17 Jan 2001, Paul Cohen wrote: > Hello all, > > I am trying to build an IRR calculator using PHP. The number of cash flow > streams I will have at any time will vary, so I am using a loop to build the > formula. Then I am iterating to solve the equation and output the solution. > > As most of you know, I am solving the following for r: > > 0=SUM SERIES(CF(i)/{(1+r)^n)) > > I can build my formula sucessfully with the following; > > $form=""; > while ($row=mysql_fetch_array($result)){ > $form.="$CF/pow((1+'$r'),$N)"; > } > > But it recognizes $form as a string, so when I put it in my "solution for r" > loop: > > for($r=-1.00; $r<=1.00; $r=$r+.0001){ > if($form>-.001 && $form < .001){ > $IRR=round($r*100, 2); > } > } > echo "$IRR%<br>"; > > > BTW, I have also tried building the $form as a variable, but since I don't > have a value for $r it just puts in zero and sets $form equal to the right > side of the equation. Therfore, instead of inserting a formula into my > "solution for r" loop, it inserts a constant for $form. > > I think my solution is to build the formula as a string and then insert it > into my "solution for r" loop, convert it back to a real formula and then > iterate for the solution. Is this possible? If not, any suggestions? > Your best bet is to write a function to do that. Look in the PHP manual for details. -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
try: http://www.zend.com/manual/function.eval.php Cal http://www.calevans.com -----Original Message----- From: Paul Cohen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 6:14 PM To: [EMAIL PROTECTED] Subject: [PHP] String to Variable converstion Hello all, I am trying to build an IRR calculator using PHP. The number of cash flow streams I will have at any time will vary, so I am using a loop to build the formula. Then I am iterating to solve the equation and output the solution. As most of you know, I am solving the following for r: 0=SUM SERIES(CF(i)/{(1+r)^n)) I can build my formula sucessfully with the following; $form=""; while ($row=mysql_fetch_array($result)){ $form.="$CF/pow((1+'$r'),$N)"; } But it recognizes $form as a string, so when I put it in my "solution for r" loop: for($r=-1.00; $r<=1.00; $r=$r+.0001){ if($form>-.001 && $form < .001){ $IRR=round($r*100, 2); } } echo "$IRR%<br>"; BTW, I have also tried building the $form as a variable, but since I don't have a value for $r it just puts in zero and sets $form equal to the right side of the equation. Therfore, instead of inserting a formula into my "solution for r" loop, it inserts a constant for $form. I think my solution is to build the formula as a string and then insert it into my "solution for r" loop, convert it back to a real formula and then iterate for the solution. Is this possible? If not, any suggestions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
IIS I'm not familiar with, and Apache has a native scheme involving .htaccess. If you want a portable authentication method, I'd recommend authenticating against a list of users/passwords contained in a database. Using MySQL, PostgreSQL or Interbase would keep your database platform neutral, and low cost. Here's code picked up from a Rasmus Lerdorf article which authenticates against a MySQL database, there are variations on this everywhere. I put this in a file called auth.inc, and then the top of every page which requires authentication simply includes "auth.inc". ------------cut------------ <? require( "dbname.inc" ); function authenticate() { Header("WWW-authenticate: basic realm=\"Auction Maintenance\""); Header("HTTP/1.0 401 Unauthorized"); $title="Invalid Login"; include( 'header.inc' ); ?> In order to proceed you will need a valid username/password. <?include ("footer.inc"); exit; } if(!isset($PHP_AUTH_USER)) { authenticate(); } else { mysql_pconnect("localhost","root") or die("Unable to connect to SQL server"); mysql_select_db( "$auction" ) or die("Unable to select database"); $login_id=strtolower($PHP_AUTH_USER); $query = mysql_query("select * from admin where cAdminId='$login_id'". " and cPassword='$PHP_AUTH_PW'"); if(!mysql_num_rows($query)) { authenticate(); } else { include( 'header.inc' ); } } ?> ---------------------- cut --------------------------- Hope this is useful. If you use PostgreSQL the calls will be different, and it may be best to use ODBC, then you will truly have portability. Regards - Miles Thompson At 11:27 PM 01/16/2001 -0500, Romulo Roberto Pereira wrote: >hello! > >What is the best user authentication methd for linux (apache)? and for >windows (IIS)?
Opps - Forgot -- dbname.inc just contains the name of the database.<? $auction = "auction" ?> In production it also contains the name of the user and the password. Miles At 08:44 PM 01/17/2001 -0400, Miles Thompson wrote: >IIS I'm not familiar with, and Apache has a native scheme involving .htaccess. > >If you want a portable authentication method, I'd recommend authenticating >against a list of users/passwords contained in a database. Using MySQL, >PostgreSQL or Interbase would keep your database platform neutral, and low >cost. > >Here's code picked up from a Rasmus Lerdorf article which authenticates >against a MySQL database, there are variations on this everywhere. I put >this in a file called auth.inc, and then the top of every page which >requires authentication simply includes "auth.inc". > >------------cut------------ ><? require( "dbname.inc" ); > function authenticate() { > Header("WWW-authenticate: basic realm=\"Auction Maintenance\""); > Header("HTTP/1.0 401 Unauthorized"); > $title="Invalid Login"; > include( 'header.inc' ); ?> > In order to proceed you will need a valid username/password. > <?include ("footer.inc"); > exit; > } > > if(!isset($PHP_AUTH_USER)) { > authenticate(); > } else { > mysql_pconnect("localhost","root") > or die("Unable to connect to SQL server"); > mysql_select_db( "$auction" ) or die("Unable to select database"); > $login_id=strtolower($PHP_AUTH_USER); > $query = mysql_query("select * from admin where > cAdminId='$login_id'". > " and cPassword='$PHP_AUTH_PW'"); > if(!mysql_num_rows($query)) > { > authenticate(); > } > else > { > include( 'header.inc' ); > } > } >?> >---------------------- cut --------------------------- > >Hope this is useful. If you use PostgreSQL the calls will be different, >and it may be best to use ODBC, then you will truly have portability. > >Regards - Miles Thompson > > > >At 11:27 PM 01/16/2001 -0500, Romulo Roberto Pereira wrote: >>hello! >> >>What is the best user authentication methd for linux (apache)? and for >>windows (IIS)? > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED]
I have a bit of a question which ive tried to look into, but I cant seem to find the right commands to check into or what the best method of attack it. Basically, I want to grab a URLs data, make the data a string (which im doing with fopen and fread). But now I have the entire html as a string, Im confused as to how I best attack stripping just the data I need out of it. There is alot of stuff at the top of this particular page before the actual content starts. Is there anyone who has some examples of how they have attacked this type of task, or even just point me in the direction of how to start ? I have tried to utilise strstr() but because there is no real comon thread starting off the data I need, I cant really use it properly. There is always a common word in the data (its a local weather output). For example, today it was - ...size=4 color=white>Todays weather will be 28 degrees in Sydney</font>...... with a whole bunch of other site crap up the top. What im trying to do is simple extract everything between the > and the < wherever the word weather appears (its the common word) and its totally baffling me. Any help would be great. Chers Chris
// get a web page into an array and remove html // file() returns an array, which you can then loop through $fcontents = file ('http://www.php.net'); while (list ($line_num, $line) = each ($fcontents)) { // if preg_match the weather text you are looking for // preg_replace any html markup with empty string here } http://www.php.net/manual/en/function.file.php http://www.php.net/manual/en/function.preg-replace.php -Ben -----Original Message----- From: Chris Aitken [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 2:51 PM To: [EMAIL PROTECTED] Subject: [PHP] Extracting Data from a URL output I have a bit of a question which ive tried to look into, but I cant seem to find the right commands to check into or what the best method of attack it. Basically, I want to grab a URLs data, make the data a string (which im doing with fopen and fread). But now I have the entire html as a string, Im confused as to how I best attack stripping just the data I need out of it. There is alot of stuff at the top of this particular page before the actual content starts. Is there anyone who has some examples of how they have attacked this type of task, or even just point me in the direction of how to start ? I have tried to utilise strstr() but because there is no real comon thread starting off the data I need, I cant really use it properly. There is always a common word in the data (its a local weather output). For example, today it was - ...size=4 color=white>Todays weather will be 28 degrees in Sydney</font>...... with a whole bunch of other site crap up the top. What im trying to do is simple extract everything between the > and the < wherever the word weather appears (its the common word) and its totally baffling me. Any help would be great. Chers 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]
Ok, I need either a tutorial or someone who has done so in the past to tell me how to do this.... I want to log and reference the key words used to find my site from referring search engines... like so: AltaVista: 211 3d studio max tutorials 81 body jewelry 43 body jewlery 32 3d studio max 21 bodyjewelry 11 3d studio tutorials I cannot relay on any log file, I have to create it myself.... (Long story here, don't ask...). I am very interested in learning this.... if anyone knows of a tutorial then please pass that on as well... Thanks much. Dallas K (Note: I know about using $HTTP_REFERER But how can I take that info and strip it, if that is what I need to do?)
Thanks very much.^^ ""Zenith"" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó 942grb$ted$[EMAIL PROTECTED]">news:942grb$ted$[EMAIL PROTECTED]... > ... may be I have use a wrong subject, but I can't think a more suitable one > sorry first! > > say, I have a function like this > function foo() > { > babababa... > /*at this point, I want to output a lot of html, can I use a ':' to escape > from there?*/ > /*I know I can do this is a if construct or for... construct, but I can't do > this at this point*/ > /*is there any way for me to do the similar thing?*/ > } > > > And I have one more question, what is the meaning of 'or'? > e.g. > $db=mysql_connect("localhost","root","password") or die ("could not > connect"); > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I have spent a lot of time working on a specific E-Commerce (shopping-cart) to fill a need for a customer. Now that the project is complete, I would like to market the product, which is entirely PHP and MySQL. My question is: Is it ethical to sell a product ( at a relatively low-cost) written in PHP, especially since this group made it possible? If that's ok to do, does anyone have any ideas how I can put a time limit on a demo that isn't easily defeated? TIA, Shane
There are no restrictions on that. In fact the license on PHP is explicitly not the GPL for this very purpose. As for restricting the demo. I would suggest restricting it via a license. Any serious customer is not going to violate a license in order to save a couple of hundred bucks. -Rasmus > My question is: Is it ethical to sell a product ( at a relatively > low-cost) written in PHP, especially since this group made it > possible? > > If that's ok to do, does anyone have any ideas how I can put a time > limit on a demo that isn't easily defeated?
> There are no restrictions on that. In fact the license on PHP is > explicitly not the GPL for this very purpose. How does the license of PHP have anything to do whith the code that Shane has written (unless he is distributing his software with PHP, much as like an embeded system)? This hits back to a point that I raised that never got much attention from this list. http://marc.theaimsgroup.com/?l=php-general&m=97803110406749&w=2 (emphasis on the last 4 paragraphs) Shane, you should license your code how you feel fit. However, since PHP isn't a compiled language (yet) you will have to find a license that fits your needs while keeping in mind that your code has no choice but to be opensource. I forsee (hope), eventually (as happened with C and Java) other companies and groups (other than php/zend) to have interperters and compilers for PHP as a language. I would love to see this happen. I would love for it to be legal to free distribute machine code that was originally written in a language of my choice (PHP) and not be bound to Zend's licensing agreement. C eventually became open. Even (to some extent) Java has become open because there are enough choices of virtual machines -- not just Sun's any more. I would love to see openness (other than in source -- but yet a restrictive license) in PHP. My main point that I'm trying to make is that PHP is wonderful language. It is an okay technology. I say okay because it is bound under a restrictive license completely controlled by a single party. I want to see the language grow and flourish and the interpreters be many and great. > As for restricting the demo. I would suggest restricting it via a > license. Any serious customer is not going to violate a license in order > to save a couple of hundred bucks. I agree. 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://www.JEEP-FOR-SALE.com/ -- I need a buyer
a customer like Microsoft, Morgan-Stanley, Amazon.com.. yes, but a new start-up that thinks: "when we'll grow we'll buy something cooler" will crack your soft down (or will ignore your license) ... I've seen it happening so many times... Cheers, Maxim Maletsky -----Original Message----- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 18, 2001 11:33 AM To: Shane McBride Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Ethics question... There are no restrictions on that. In fact the license on PHP is explicitly not the GPL for this very purpose. As for restricting the demo. I would suggest restricting it via a license. Any serious customer is not going to violate a license in order to save a couple of hundred bucks. -Rasmus > My question is: Is it ethical to sell a product ( at a relatively > low-cost) written in PHP, especially since this group made it > possible? > > If that's ok to do, does anyone have any ideas how I can put a time > limit on a demo that isn't easily defeated? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > There are no restrictions on that. In fact the license on PHP is > > explicitly not the GPL for this very purpose. > > How does the license of PHP have anything to do whith the code that > Shane has written (unless he is distributing his software with PHP, > much as like an embeded system)? I have no idea whether he is distributing PHP along with it or not. The simple point I was making is that he can. He can put Apache and PHP on a CD along with his code and give it to a customer as a nice integrated bundle without license hassles. -Rasmus
> a customer like Microsoft, Morgan-Stanley, Amazon.com.. yes, but a new > start-up that thinks: "when we'll grow we'll buy something cooler" will > crack your soft down (or will ignore your license) ... I've seen it > happening so many times... > Soooooo true. But why would Microsoft be using PHP? =D - Kath
Shane, This is highly off-topic but interesting and important enough to answer. It really boils down to who owns the product (intellectual copyright) and what sort of agreement you have with your client (ownership, confidentiality etc.). If your client paid you to develop the E-Commerce system they would typically own all rights to it unless otherwise agreed upon. It wouldn't really be fair to your client if they invested time and $$$ to build the E-commerce system and you turn around and sell it to one of their "potential" competitors for a dime. The issue isn't necessarily your monetary gain but the fact that you may be undermining your clients competitive advantage, something they invested in. In other words, why should another client get it for less? My suggestion would be to talk to your client and come to some sort of agreement on copyright and restrictions (if, when, and how much you can sell it for). Who knows, your client may tell you to "run with it and make whatever $$$ you can" or they may say "that is exclusively ours and you can't sell anything remotely similar for 5 years without our permission". Be up front and honest with your clien. My background: I am registered Professional Geoscientist in Saskatchewan, Canada (similar to professional engineer), which means I am required to abide by certain ethics and rules of professional conduct, so I know little bit on the subject. This means that everything I do, as a professional, must be conducted in the best interests of the public and my clients. I must put these issues at the top of my list: - Safety and well being of the public is #1. - Diligent and responsible. - Fair and honest Hope this clears things up a bit ___________________________________ Scott A. Gerhardt P.Geo. Gerhardt Information Technologies [EMAIL PROTECTED] ___________________________________ > -----Original Message----- > From: Shane McBride [mailto:[EMAIL PROTECTED]] > Sent: January 17, 2001 8:24 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Ethics question... > > > I have spent a lot of time working on a specific E-Commerce > (shopping-cart) to fill a need for a customer. Now that the > project is complete, I would like to market the product, which is > entirely PHP and MySQL. > > My question is: Is it ethical to sell a product ( at a relatively > low-cost) written in PHP, especially since this group made it possible? > > If that's ok to do, does anyone have any ideas how I can put a > time limit on a demo that isn't easily defeated? > > > TIA, > Shane >
> Soooooo true. > > But why would Microsoft be using PHP? =D Why would Microsoft be using Solaris, or Linux even? (hint, the same reason -- their stuff works less good). :) 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://www.JEEP-FOR-SALE.com/ -- I need a buyer
> a customer like Microsoft, Morgan-Stanley, Amazon.com.. yes, but a new > start-up that thinks: "when we'll grow we'll buy something cooler" will > crack your soft down (or will ignore your license) ... I've seen it > happening so many times... So what? They'll do that anyway unless you spend a significant amount of energy coming up with weird protection schemes. And even then they are likely to hack it. Add a sane license, forget about the people who hack it, chances are these will turn into sales eventually in some way anyway. -Rasmus
hey, hey ... I wrote "Microsoft" just to tell you how _big_ a customer could be... a simple comparison... no politics here ... :-)) Cheers, Maxim Maletsky -----Original Message----- From: jeremy brand [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 18, 2001 12:02 PM To: Kath Cc: Maxim Maletsky; 'Rasmus Lerdorf'; Shane McBride; [EMAIL PROTECTED] Subject: Re: [PHP] Ethics question... > Soooooo true. > > But why would Microsoft be using PHP? =D Why would Microsoft be using Solaris, or Linux even? (hint, the same reason -- their stuff works less good). :) 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/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://www.JEEP-FOR-SALE.com/ -- I need a buyer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Well, I can agree with that too.. but something you will always have to give them, something like support/update of the software, allow them to do something they wouldn't like to do without the license etc... It is a VERY HARD thing writing a RIGHT license... we (maybe except you, Rasmus) are just more likely not good enough to write a good license, the one which will totally satisfy a customer and will encourage him to purchase it. my point is: licenses aren't codes - if you are a programmer you'll have some hard time writing it well. Cheers, Maxim Maletsky. -----Original Message----- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 18, 2001 12:09 PM To: Maxim Maletsky Cc: Shane McBride; [EMAIL PROTECTED] Subject: RE: [PHP] Ethics question... > a customer like Microsoft, Morgan-Stanley, Amazon.com.. yes, but a new > start-up that thinks: "when we'll grow we'll buy something cooler" will > crack your soft down (or will ignore your license) ... I've seen it > happening so many times... So what? They'll do that anyway unless you spend a significant amount of energy coming up with weird protection schemes. And even then they are likely to hack it. Add a sane license, forget about the people who hack it, chances are these will turn into sales eventually in some way anyway. -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]
Wow, I caused quite a debate. And I thought I would get slammed :) BTW - PHP / Apache is going to be up to the client at this point. :) - Shane ----- Original Message ----- From: "Maxim Maletsky" <[EMAIL PROTECTED]> To: "'jeremy brand'" <[EMAIL PROTECTED]>; "Kath" <[EMAIL PROTECTED]> Cc: "'Rasmus Lerdorf'" <[EMAIL PROTECTED]>; "Shane McBride" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 17, 2001 10:03 PM Subject: RE: [PHP] Ethics question... > hey, hey ... I wrote "Microsoft" just to tell you how _big_ a customer could > be... > a simple comparison... no politics here ... :-)) > > Cheers, > Maxim Maletsky > > > > -----Original Message----- > From: jeremy brand [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 18, 2001 12:02 PM > To: Kath > Cc: Maxim Maletsky; 'Rasmus Lerdorf'; Shane McBride; > [EMAIL PROTECTED] > Subject: Re: [PHP] Ethics question... > > > > Soooooo true. > > > > But why would Microsoft be using PHP? =D > > Why would Microsoft be using Solaris, or Linux even? (hint, the same > reason -- their stuff works less good). > > :) > > 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/ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > http://www.JEEP-FOR-SALE.com/ -- I need a buyer > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
Dear All, Lately I've noticed that my Apache error logs were filled up with HTML sources. Logs grow rapidly and I have to clean it every once a while. Is that caused by any particular PHP error? Normally I should have just one line per error, shouldn't I? Is there a way to trace or turn it off (stop dumping HTML sources to error log)? Thanks for any comments! Chien-pin
> Lately I've noticed that my Apache error logs were filled up with HTML > sources. Logs grow rapidly and I have to clean it every once a while. Is > that caused by any particular PHP error? Well, find the page on your server with the HTML that matches what's in the error logs and you should be on your way to finding out what's doing it... Jason
Hello everyone, I just download apache v 2.0a9 and PHP 4.0.4p11. When I tried to follow instructions on installation, it didn't work. I ran cd ../apache_2.0a9 ./configure cd ../php-4.04p11 ./configure --with-mysql --with_apache=../apache_2.0a9 I got the following error Invalid Apache Directory ... I looked in the configure script and realized that it is trying to find httpd.h in the directory apache, NOT INCLUDE! so, I just did a ln -s include apache in the apache directory and it worked. Have Fun! Assem Salama
How can I pass an anchor tag attribute to a page? e.g. If I want to echo "1" on page_two: page_one.php contains: <a href="page_two.php" > <? $id="1"?>click</a> page_two.php contains: <? echo($id); ?> but page_two is coming up blank after a delay... what I am doing wrong? thanks, andrew