[PHP] Calculate # of minutes during working hours between two dates
Hi all, I want to calculate the number of minutes between two dates, but only those minutes on monday through friday between 08.00 and 17.30. I could evaluate every minute in the interval against all known minutes during working hours, but that's a bit much :-) Any suggestions for a better, more efficient algorithm? Tia. -- Greetinx, Wim Koorenneef [EMAIL PROTECTED] Boxtel, the Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] bad form...
i agree. for small forms with not-a-lot-of-data to be processed, keeping it all together is generally a lot easier to maintain and upgrade. (it also makes it easier for others to understand your code - since the data input *and* processing code is all in the same place) -Original Message- From: Tom Carter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 6:40 AM To: motorpsychkill Cc: [EMAIL PROTECTED] Subject: Re: [PHP] bad form... generally. no its not.. IMHO its a good thing it can help make data validation easier, as in people can't fake variables by passing them in the URL to the processing script. It also helps keeps thing tidy... so providing that the processing isn't fantastically complex (in which case the complexity of the processing may make the physical file cumbersome) HTH, Tom hello everyone, is it 'bad form' (no pun intended) to have a form point to itself for processing, rather than forward the form variables to another page? Anybody have any input on this? I try to have 1 page that is the form and handles all the processing as well in order to keep the page count on my site low and for easier editing, blah blah blah thank you for you help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Forum script
Hi Can someone recommend me some good script for forums ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] list of included file names
On Tuesday 19 June 2001 17:42, Tim McGuire wrote: For debugging purposes, I want to see a list of the included files on a page in HTML comments. http://php.net/get_included_files -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Very funny, Scotty! Now beam up my clothes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Uploading a file into a database....ideas please.
Title: Uploading a file into a databaseideas please. put a TEXTAREA on a form -cut-paste the textonto the form, submit the form, and have the form put your infointo the database if your server supports PHP, there are many many MySQL admin scripts out there that you could use to add stuff to your DB. -Original Message-From: Sam [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 20, 2001 5:06 AMTo: 'php'Subject: [PHP] Uploading a file into a databaseideas please. Hi all, I have several text files that need to be uploaded each week to a mySQL db. At the moment I'm deleting the tables via telnet then exporting them via ODBC. I have tried uploading in the following ways. 1. Using the copy command, but there are insufficient privileges on the server (security reasons). 2. FTPing the text files in the php script but the version of PHP doesn't allow this. (Updating it not an option). 3. Opening the file remotely (but the file is on my local pc). I'm stuck myself, please help. Thanks in advance. Sam Rose (Also could you reply to my email address as I don't seem to get anymore emails from the list come through)
Re: [PHP] List of included file names.
On Tuesday 19 June 2001 20:30, Tim McGuire wrote: I searched the archives for this. For debugging purposes, I want to see a list of the included files on a page in HTML comments. Little note not only to you: Getting no answer after ~3 hours does *not* mean you have to resubmit the question. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Very funny, Scotty! Now beam up my clothes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP + Oracle + OCIPLogon
I understand that OCIPLogon creates a persitant connection to the Oracle DB, to improve performance... And I must say it does ! However, since OCILogoff is best not used with a persitant logon (and in the latest versions, it doesn't do anything anyway)... How will PHP decide when to cut that connection loose ? We are working on a relatively small website, with 4 users... Within no time, the session limit in Oracle (which is 60) is reached, and the site doesn't work anymore... The website should be able to handle thousands of customers in the future, so it would only take a second to crash... What are we doing wrong? Why aren't the sessions automatically killed by PHP ? Thank you! Gunther -- PHP General Mailing List (http://www.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] OT - filtering problems
Sorry for this OT post. Since the lists have come back up I've been having a problem getting my email client, Eudora 5.0.2 sponsored mode for Win95 to filter them correctly. I've tried several times and combinations and still everything goes into my inbox. I've got several dozen filters, and a couple others are giving me trouble too. I'm a bit stymied; could there be something weird and wonderful about the headers for this list's (and a couple others) that confuse Eudora? Anyone else having this same problem, or have any advice on how I might debug this? Offlist replies are totally fine. Thanks in advance, Marty Face 2 Interface Web Solutions Website Creation Made SIMPL(tm) Online Demo Available http://face2interface.com/Home/Demo.shtml -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] SetCookie weirdness
along with domains, cookies respect directories. for example: i'd have a script in '/somewhere' and another script in '/another' and when they'd try to use the same cookies, it wouldnt work... i had to actually specify a path of '/' for both of them to be able to use the same cookies. -Original Message- From: Ray Hilton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 3:26 AM To: 'Tomaz Kovacic'; [EMAIL PROTECTED] Subject: RE: [PHP] SetCookie weirdness This is actually a security feature of cookies, so that domains that dont match your cookie cannot read personal details set by another site. Don't worry, its all in order ;) Ray Hilton - [EMAIL PROTECTED] http://rayh.co.uk -Original Message- From: Tomaz Kovacic [mailto:[EMAIL PROTECTED]] Sent: 19 June 2001 12:36 To: [EMAIL PROTECTED] Subject: [PHP] SetCookie weirdness Hi! Last night I've found some interesting cookie behavior. I was testing some script on my local server, so I used short version of domain ( http://www ) to reach local webserver. My script stopped working, so I started to investigate a little bit what's goin on.. I've managed to get my script working only when i user SetCookie command with only 3 parameters: SetCookie (mycookie, $cookie, time()+1200); My usual form of setting cookie is with all 6 arguments like: SetCookie(mycookie, $cookie, time()+1200, /, .domain.com, 0); But if I use longer form if domain: www.local (same as www.somedomaing.com) my longer form of setting cookie started to work again. Weird. Anyone experianced similar problems? Tomaz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Include Speed
include() is not magical. it's all PHP code, whether or not you put it into your main file, or pull it in with an include() if it's slow - it's slow, regardless of *how* it was brought into the script. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 4:11 AM To: php-general Subject: [PHP] Include Speed Hi everybody, How much the include() can slow down the execution of the scripts; if I call one file let say for the db connection it's clearly ok but is it a limite of numbers of include in one script from where that slow the process? Marc -- /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/* /* Marc Fourny /* /* Multimedia Development for the web /* /* /* /*CD-ROM/* /* Fourny ElectronicEDiting /* /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
AW: [PHP] .htaccess logout sequence
the key to logout is the realmname. the browser will always send password etc again to the same realm as long as you don't close it. extend the realmname by a random number or timestamp and store it in a session or wherever. to logout change that realmname... sebastian -Ursprungliche Nachricht- Von: Chris Aitken [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 20. Juni 2001 05:53 An: [EMAIL PROTECTED] Betreff: [PHP] .htaccess logout sequence Hi All. I have a query which has confused me a bit. I have a database setup where I use htaccess (using apache/php/mysql on a freebsd 3.4 box) to grant access, then it grabs the users info from the database, sets a cookie and pretty much lets the system know whos doing what on the db. What I do want to do however is have the facility to have a logout option where it ditches all info about the current logged in user, fires them back to the start of the system and re-requests the htaccess login window. My past attempts have failed miserably so I thought I would ask around and see if anyone else has had any success (without changing to a different method of auth :) Cheers Chris Chris Aitken - Webmaster/Database Designer - IDEAL Internet email: [EMAIL PROTECTED] phone: +61 2 4628 fax: +61 2 4628 8890 If the foo shits, call your sysadmin
RE: [PHP] inserting a variable into a variable
you so totally could use an assoc. array right now: $cat_adt = x; $rm = y; $a[ $cat_adt ] = whatever; $a[ $rm.$cat_adt ] = Yeah; print $a['yx']; save yourself a lot of trouble and dont bother with variables-of-variables and trying to get $rm_$cat_adt == $rm_x just use a hash... that's what it's there for ;) -Original Message- From: Tom Carter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 5:24 AM To: Hasan Niyaz; [EMAIL PROTECTED] Subject: Re: [PHP] inserting a variable into a variable I have come to a situation where i am having a variable inside another variable. for example. $rm_$cat_adt PHP would read this as trying to prepend the variable $cat_adt to the variable $rm_ You seem to be trying to insert the variable $cat into the middle of a variable.. possible, but probably better to slightly rethink your naming strategy HTH, Tom The above is a variable and $cat is again another variable This does not work.. Need some help! Thanks, Hasan -- PHP General Mailing List (http://www.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] Template Engine
Since so many of you are asking for help w/ a template engine of some sort I have included the one I use for my mail program. I have not tested it with large amounts of text, but it is able to handle some very large strings. It has its own documentation, and if anyone needs any help setting it up I'd be willing to help. Chris "TunkeyMicket" Watford TunkeyMicket Productions www.tunkeymicket.com Attached: mp_template_engine.php mp_template_engine.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: Re[2]: [PHP] variables in a e-mail
Hiho, Richard Kurth wrote: Hello Alexander, This is pretty much what I want to do. I want to have a e-mail script in my application and have it so the user can customize the e-mail that is sent out in a configure file. Say he wants to send a recurring bill to his customers and he wants it to look a certain way. He would design the e-mail using placeholders and the it would be processed and the data would be filled in. Do you know of any examples of this in any program that is out there. I do better when I can see complete examples to be able to get the full picture I, personally, know only one, which you won't be able to look at, unless you pay the rather high price, and even then, you'd be buggered by german source-comments. Well, I think what you have to do is clear: Get a template with the placeholders in, this is what the user has to provide. Find out who shall recieve this mail, and get data about them (name, how much they paid or whatever you use those bills for). Then do the replacements once and present the user a preview of the mail, so he can be sure hi didn't mispell any placeholders. If he still wants to send the mails, send each reciever a mail, and do the replacements every time. That should do it. regards Wagner -- Isn't it strange? The same people who laugh at gypsy fortune tellers take economists seriously. - Cincinnati Enquirer
RE: [PHP] parent and grandparent member functions
it looks like your solution *is* elegant... i tried out your code, becuase i was astonished that such a simple thing allegedly wasn't working... and it did work. below is the exact code i had in my text editor, and it executed perfectly. when i called $c-make(), it printed A:: MAKE. ..am i misunderstanding your problem? ? class a { function make() { // some code print A:: MAKE; } } class b extends a { function make() { // some code parent::make(); } } class c extends b { function make() { // some code parent::make(); } } $c = new c(); $c-make(); ? -Original Message- From: Lenar Lõhmus [mailto:[EMAIL PROTECTED]] Sent: 20 June 2001 09:01 To: [EMAIL PROTECTED] Subject: [PHP] parent and grandparent member functions Hello, I hit a wall. No offense, but this OO stuff in PHP is somehat weird, but skip to the problem. I have for example three classes: class a { function make() { // some code } } class b extends a { function make() { // some code parent::make(); } } class c extends b { function make() { // some code parent::make(); } } now the class 'c' is instantiated and the member function 'make' is called. All works up to the point where 'b'::make calls parent::make(). It seems to call itself :(. I can understand this is logical behaviour since it's still an instance of class c, so parent:: is still b::, but how should I call that grandparent's make()??? This doesn't seem like a good OOP. For example delphi's 'inherited' works relative to the class it's used in and it is way more useful than php's way. is there any elegant soultion(s) to my problem? Lenar Lõhmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] List of included file names.
yeah. at the beginning of each include file, put: print '!-- my.file.name.php --'; ...or were you looking for something a little harder and more convoluted? :) -Original Message- From: Tim McGuire [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 19, 2001 2:30 PM To: [EMAIL PROTECTED] Subject: [PHP] List of included file names. Hi, I searched the archives for this. For debugging purposes, I want to see a list of the included files on a page in HTML comments. PHP_SELF and HTTP_SERVER_VARS[SCRIPT FILENAME] only returns the name + path of the file calling the included files. I want each included file to contribute its name to the page. Is there any way to do that so that the HTML source looks like this: !-- These files contribute to this page - - !-- species_inc.php - - !-- db_connect_inc.php - - !-- constants_inc.php - - Thanks Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] validate phone numbers
i agree. there's NOTHING more annoying than a broken validation script when you're trying to enter valid, but weird, data. perhaps separate the form up into one box for the country code, one box for the number, and one box for any add'l information (extensions, automated prompt numbers, etc...), so that you'd only have to work at validating the actual number (and not any extraneous and oddly formatted info) -Original Message- From: Steve Werby [mailto:[EMAIL PROTECTED]] Subject: Re: [PHP] validate phone numbers people enter #s in many different formats and sometimes it's necessary to enter a # like 011-817-972-1086 x103 or 817-972-1086, 1, 3, 12 if you're dealing with business numbers with extensions or automated systems that have to be traversed. So you may be better off not validating the phone #. YMMV. -- PHP General Mailing List (http://www.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] Code check please
I've tried to get this working for over an hour now, and it still won't. I don't even get an error message to help me find the problem so I was hoping that someone could check my code for me. I'm fooling around with a basic form that is supposed to send one's name, surname and e-mail address to receive.php. receive.php is then supposed to take the information and add it to a table called tabell in a database called databas, but it doesn't work. I think there might be something wrong with my MySQL query. - - - - - - - - - - - FORM - - - - - - - - - - - - - - form action=receive.php method=post PFouml;rnamn:br input type=text name=fornamn size=25/p pEfternamn:br input type=text name=efternamn size=25/p pE-mailadress:br input type=text name=email size=25/p input type=submit name=submit value=Log in /form - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RECEIVE.PHP - - - - - - - - - - - ?php // connection to MySQL $connection = mysql_connect(localhost, username, password); if (!$connection) { echo (PUnable to connect to the database server at this time./P ); exit(); } //select database if (! @mysql_select_db(databas) ) { echo (PUnable to locate the database at this time./P); exit(); } // MySQL query $sql = INSERT INTO tabell SET . fornamn ='$fornamn', . efternamn='$efternamn', . email='$email';; ? - - - - - - - - - - - - - - - - - - - - - - - - - - - - Thanks in advance! // Andreas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] image code
I wrote thumbnailing script that did exactly what you said below, but to eliminate the needless regeneration of existing thumbnails I just did a check to see if the thumbnail already exists: if(!file_exists(/path/to/thumbnail.jpg)){ //Create the thumbnail here } If the thumbnail already exists, the script skips over it, but if it doesn't it creates it as needed. -Andy -Original Message- From: Hugh Bothwell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 19, 2001 1:02 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] image code Seems pretty straightforward, actually; I would write a script that takes as parameters the name and desired size of a graphic, resizes it, and returns the thumbnail ( look at ImageJPEG() ). Then I would write a script that iterates through the files in the directory and, for each, gets a thumbnail. The only problem is that this is a fair bit of work; if it's called at all frequently, you might be better to create a static version. But that of course does away with the 'self-updating' bit. A possible fix would be to write master page: check how long since the page has been updated; if necessary, create and save an updated version of the imagelist. Then forward the user to the saved static version. This would let you have the page update itself on a delayed basis, ie hourly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: bad form...
As long as your code is well-formatted and well-commented, I don't think it's a problem, especially for simple forms for quick DB inserts or sending e-mail. You can do nice error handling without annoying Javascript alerts, too; when the form is submitted you can check for missing/invalid field values - if anything is wrong, just output the form again, but this time prepopulate the valid fields and highlight the missing ones with red text or a red outline. -Andy -Original Message- From: motorpsychkill [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 12:13 AM To: Php General List Subject: bad form... hello everyone, is it 'bad form' (no pun intended) to have a form point to itself for processing, rather than forward the form variables to another page? Anybody have any input on this? I try to have 1 page that is the form and handles all the processing as well in order to keep the page count on my site low and for easier editing, blah blah blah thank you for you help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] General Coding Question
Does it have any effect on performance in either case if a file is completely done in PHP(1) or interspersed with PHP(2). (1) ?php echo html; ... ? (2) html ... ?php echo $forminput; ? ... Also, and this is personal preference, which is easier to read/debug? James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SMTP-access with PHP...
At 20.06.2001 14:16, you wrote: Hello! Why do I get this error (Relaying denied ) from my SMTP-server and how do I make it work? 220 mail.server.com ESMTP Sendmail 8.9.3/8.9.3; Wed, 20 Jun 2001 15:09:06 +0200 (CEST) 250 mail.server.com Hello localhost [127.0.0.1], pleased to meet you 250 [EMAIL PROTECTED] Sender ok 550 [EMAIL PROTECTED] Relaying denied 503 Need RCPT (recipient) snip-code It's not anything wrong with your code, it's the fact that your mailserver doesn't allow relay from the IP you're connecting with. If you are connecting on loopback there's something serious strange with your mailserver config (but we're talking sendmail here, what d'ya expect?). Contact your mailserver admin and get him/her to open for relay from the IP of your webserver. -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Search engine php/mysql
Hello list, I am coding a search engine that allow indexing and searching internet sites based on php/mysql. My problm is: How can i index a given site, I mean: input: URL, like http://www.blabla.com/ Output: meta, body content, description that will be stored in a tables. Regular expressions and string functions: http://php.net/manual/en/ref.regex.php http://php.net/manual/en/ref.strings.php Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem starting session
I am getting the following on a Windows 2000 Professional installation when I try to start a session: Warning: open(/tmp\sess_9ab091b811c5675d90fabf4392b3c110, O_RDWR) failed: m (2) in e:\inetpub\wwwroot\cd\common.inc on line 27 Any help would be much appreciated. Regards, Ben *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards [EMAIL PROTECTED]+44 (0)7970 269 522 * * Campaign Against proper English, Dyslexia division * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] how to install pws on win2k
hi everyone, I have recently shifted from win98 to win2k. the pws i'm using is not installing on win2k. Is there any remedy 4 this? thanks for all u guys who help here with this mailing list. bye sagar
RE: [PHP] time
well, if its a server side script, the only clock available to it is the one on the server... Ray -Original Message- From: Jon Yaggie [mailto:[EMAIL PROTECTED]] Sent: 20 May 2001 15:51 To: [EMAIL PROTECTED] Subject: [PHP] time quickly can some one tell me if time() return server or usersystem time? Thank You, Jon Yaggie www.design-monster.com And they were singing . . . '100 little bugs in the code 100 bugs in the code fix one bug, compile it again 101 little bugs in the code 101 little bugs in the code . . .' And it continued until they reached 0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mailform loop
You might try something like this. while(list($key,$val) = each($HTTP_POST_VARS)) { $$key = addslashes($val); } Data Driven Design P.O. Box 1084 Holly Hill, Florida 32125-1084 http://www.datadrivendesign.com http://www.rossidesigns.net - Original Message - From: Wilbert Enserink [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 4:51 AM Subject: [PHP] mailform loop Hi all, does anybody know if it is possible to loop through all the fields in a mailform. I want to perform the addslashes function and htmlspecialchars function to each entered value so i can put it in my db. Or should I make use of a standard good mailform script? and if so, does anyone know such a good script? wilbert - Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl [EMAIL PROTECTED] - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] time
I would guess server-time because the PHP is server-based and is processed before the user gets it :) SED -Original Message- From: Jon Yaggie [mailto:[EMAIL PROTECTED]] Sent: 20. maí 2001 13:51 To: [EMAIL PROTECTED] Subject: [PHP] time quickly can some one tell me if time() return server or usersystem time? Thank You, Jon Yaggie www.design-monster.com And they were singing . . . '100 little bugs in the code 100 bugs in the code fix one bug, compile it again 101 little bugs in the code 101 little bugs in the code . . .' And it continued until they reached 0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] time
Jon Yaggie wrote: quickly can some one tell me if time() return server or usersystem time? Server time. -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] newbie algorithm help!!!!!
hi i have a mysql table with approx. 30 entries. I wanna get them(i know how to do that) and list them in a 2-column table. I have been trying to use a loop to do it. But it will only produce a 1-column table. it's like entry 1 entey 2 entry 3 entry 4 etc Please help me so that i can get this : entry1 entry2 entry3 entry4 Thanks in advanced. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Need recommendation: good user management system (PHP/MySQL)
Andreas Skarin wrote: I'm just starting to learn PHP and it's going to take a while before I can create a really good script to password protect a section of my site, with a good admin control center to manage my user's accounts. Therefore I'm asking for recommendations on a good retail script that can handle this for me until I'm skilled enough to create my own. I'm a little desperate since I'm using a poorly written CGI script at the moment. I'm looking for a customizable PHP/MySQL script to password protect an area of my site and add/edit user's accounts. You know the usual member management script. Thanks in advance! // Andreas Maybe this link helps a little: http://freshmeat.net/search/?q=php+user+management -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ***Get a piece of the #1 CASH MACHINE on the net***
SEX SELLS!!! Enjoy the riches of the most lucrative business in the world without being in the business. If you are in need of money quickly, This is for you. You don't have to access the website if you do not wish, just take the money it will generate for you. Believe me it will be a short time until you will receive hundreds, then thousands each month. Would you like to be earning $10,000 a month within 6 months. It costs nothing to check it out but it could change your life forever, as it did mine. For full details e-mail me: mailto:[EMAIL PROTECTED] For further details reply with 'MORE DETAILS' in the subject line. If you want to be removed from my email database please reply with 'REMOVE' in the subject line -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] logout
if your login system is cookie-based vs querystring. just send a blank cookie to the user to replace whatever you had set. if your login system has the query string for a session id or something, just stop sending the querystring ;) On Wednesday 20 June 2001 07:02, Richard Heyes wrote: Is there anyway I can do the logout that will completely get rid of all login detail without having user to close browser? Depends on how your login system works. -- Richard Heyes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] logout
This is how i did it. 1. Create a session variable after someone logs in properly (upon verification) // Set the session variable for clientId $session_clientId = $row['clientId']; 2. All the other pages wont allow you to view them unless the session var is set. and if you try to change the url parameter of another variable, you are denied too. session_register (session_clientId); if($session_clientId == ){ die('Sorry, but you do not have permission to view this page - please a href=client_login.phplogin/a');} if($clientId != $session_clientId){ die('Sorry, this is not one of your projects.br Please use the back button of your browser to return or a href=client_login.phplogin/a');} //clientId was set from a previous query. 3. When you click on logout, you are sent back to the login page. 4. If the session was set, then session is destroyed. // Clears the user session for logging out. session_register (session_clientId); if ($session_clientId 0 ){ session_destroy (); } 5. Voila.. when you use the back button, you are prevented from seeing the page. hth, q. -Original Message- From: Richard Heyes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 8:02 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] logout Is there anyway I can do the logout that will completely get rid of all login detail without having user to close browser? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SMTP-access with PHP...
The SMTP server that you are using is more then likely configured to deny sending if the e-mail does not originate from the domain the SMTP server is used for. This is done mainly to keep spammers from using the server as an open relay and spewing junk mail all over the internet Sometimes system admins will also exclude localhost because they believe that no e-mail should be originating from the mail server itselfIf the e-mail destination is in the domain that this server receives e-mail for it will usually be accepted, otherwise depending upon it's ruleset, it will be denied. Your options are this... 1. Your SMTP server may require authentication before it will allow you to relay. If so then you will need to authenticate yourself as a user, and then it should allow you to relay. 2.If you do not have control of the SMTP server configuration, contact your system admin and see if you can work out a method for you to get the configuration modified to allow you to relay, or if there are other options for relaying. 3. If you have control of the SMTP server, and it is on a RedHat 7.1 machine, read the release notes. In 7.1 RedHat made the sendmail daemon work more or less in receive-only mode (it can be reconfigured to work correctly). If it is not a RedHat box, you will need to reconfigure it to allow relaying... Directions on how to do this can be obtained from www.sendmail.org, or by watching the comp.mail.sendmail newsgroup. ( NOTE: I highly recommend reading the manual and the FAQ before posting a question to the newsgroup, typically you will get flamed if you do not. ) Ed Brady [EMAIL PROTECTED] To reply, you know what to remove - Original Message - From: Magnus Hammar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 9:16 AM Subject: [PHP] SMTP-access with PHP... Hello! Why do I get this error (Relaying denied ) from my SMTP-server and how do I make it work? 220 mail.server.com ESMTP Sendmail 8.9.3/8.9.3; Wed, 20 Jun 2001 15:09:06 +0200 (CEST) 250 mail.server.com Hello localhost [127.0.0.1], pleased to meet you 250 [EMAIL PROTECTED] Sender ok 550 [EMAIL PROTECTED] Relaying denied 503 Need RCPT (recipient) Is there something else I can do to make it work? I use this code: - $smtp_server = localhost; $port_number= 25; $smtp_connection= fsockopen($smtp_server, $port_number); if(!$smtp_connection){ $smtp_connection= fopen($smtp_server.:$port_number,w); } if(!$smtp_connection){ $return_value = SMTP-server not responding!; return 0; }else{ fputs($smtp_connection, ); $return_value = $return_value.fgets($smtp_connection,128).br; fputs($smtp_connection, HELO $smtp_server\n); $return_value = $return_value.fgets($smtp_connection,128).br; fputs($smtp_connection, ); fputs($smtp_connection, MAIL FROM: $from\n); $return_value = $return_value.fgets($smtp_connection,128).br; fputs($smtp_connection, ); fputs($smtp_connection, RCPT TO: $till\n); $return_value = $return_value.fgets($smtp_connection,128).br; fputs($smtp_connection, ); fputs($smtp_connection, DATA\n); $return_value = $return_value.fgets($smtp_connection,128).br; fputs($smtp_connection, Subject: $subjekt\n); fputs($smtp_connection, Reply-To: $from\n); fputs($smtp_connection, MIME-Version: 1.0\n); fputs($smtp_connection, Content-Type: text/plain; charset=iso-8859-1\n); fputs($smtp_connection, Content-Transfer-Encoding: 8bit\n); fputs($smtp_connection, X-mailer: Magnus Mail); fputs($smtp_connection, \n\n); fputs($smtp_connection, $bodyn\n\r); fputs($smtp_connection, ); $return_value = $return_value.fgets($smtp_connection,128).br; fputs($smtp_connection, ); fputs($smtp_connection, QUIT\n\r); $return_value = $return_value.fgets($smtp_connection,128).br; fclose($smtp_connection); return $return_value; /Magnus Hammar -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem sending mail with php
Hi, I have being using php for almost twelve months for sending mail to all my members. But now that i got a database which continue on growing (2500 member actually), so i found that php cann't deliver all the mail and it even make time out. Could any one help me in how i could control the sending with the mail function? Thanks Lindsey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] newbie algorithm help!!!!!
?php $array[0] = 0; $array[1] = 0; $array[2] = 0; $array[3] = 0; $array[4] = 0; $array[5] = 0; echo table tr ; foreach($array as $pos = $val) if ( !(@$row++ % 2) AND $row != 1) echo /trtr td$val /td ; else echo td$val /td ; echo /tr /table ; ? -- Chris Lee [EMAIL PROTECTED] McShen [EMAIL PROTECTED] wrote in message 9gqm6o$g6n$[EMAIL PROTECTED]">news:9gqm6o$g6n$[EMAIL PROTECTED]... hi i have a mysql table with approx. 30 entries. I wanna get them(i know how to do that) and list them in a 2-column table. I have been trying to use a loop to do it. But it will only produce a 1-column table. it's like entry 1 entey 2 entry 3 entry 4 etc Please help me so that i can get this : entry1 entry2 entry3 entry4 Thanks in advanced. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] parent and grandparent member functions
yes, you were right it works (when you said it works i tested your code out and it definetly works). but this made me more confused than i was before. i commented in the lines in my code that earlier didn't work (replaced them sometime with class names hard coded solution) and it still did _not_ work. ok, made copies of files in action and started to strip them down. First, my stripped down code that works: ? class a { function make($params) { } } class b extends a { function make() { echo WORKS OK; } } class c extends b { function make($params) { parent::make(); } } class d extends c { function make($params) { parent::make($params); } } $d = new d(); $d-make(whatever); ? now, when i remove the definition of class 'a' to another file and include the file like this: file1.php: ? class a { function make($params) { } } ? file2.php: ? include ./file1.php; // or require - no difference class b extends a { function make() { echo WORKS OK; } } class c extends b { function make($params) { // this gets called forever and generating warnings parent::make(); } } class d extends c { function make($params) { parent::make($params); } } $d = new d(); $d-make(whatever); ? then i get message 'Warning: Missing argument 1 for make()' ... the code is same ... but working differently.at least with my php 4.0.5. so i think this is a bug. that include in our system is neccessary so to the point it works correctly, i have to hardcode class names. and thank you scott pointing me out (and getting me confused :) ). lenar. scott [gts] [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... it looks like your solution *is* elegant... i tried out your code, becuase i was astonished that such a simple thing allegedly wasn't working... and it did work. below is the exact code i had in my text editor, and it executed perfectly. when i called $c-make(), it printed A:: MAKE. ..am i misunderstanding your problem? ? class a { function make() { // some code print A:: MAKE; } } class b extends a { function make() { // some code parent::make(); } } class c extends b { function make() { // some code parent::make(); } } $c = new c(); $c-make(); ? -Original Message- From: Lenar Lõhmus [mailto:[EMAIL PROTECTED]] Sent: 20 June 2001 09:01 To: [EMAIL PROTECTED] Subject: [PHP] parent and grandparent member functions Hello, I hit a wall. No offense, but this OO stuff in PHP is somehat weird, but skip to the problem. I have for example three classes: class a { function make() { // some code } } class b extends a { function make() { // some code parent::make(); } } class c extends b { function make() { // some code parent::make(); } } now the class 'c' is instantiated and the member function 'make' is called. All works up to the point where 'b'::make calls parent::make(). It seems to call itself :(. I can understand this is logical behaviour since it's still an instance of class c, so parent:: is still b::, but how should I call that grandparent's make()??? This doesn't seem like a good OOP. For example delphi's 'inherited' works relative to the class it's used in and it is way more useful than php's way. is there any elegant soultion(s) to my problem? Lenar Lõhmus -- PHP General Mailing List (http://www.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] Printingt Variables in Included Text
Hey, I have a website where I use header and footer files in a includes director to establish the header and footer of each page. They are pretty simple, mostly straight up html. The website is kind of an online magazine and what I want to do is print pull quotes out of each story. So in my file lests say index.phtml I have: ? include(/path/to/file/header.inc) ? ? pullquote1='Test for pull quote'; pullquote2='pullquote2 text'; keywords='shdjkashd kasdj d kjdjdjasd'; title='Title of Page'; ? ? include(path/to/file/footer.inc) ? --- In the header file I have ? print($pullquote1) ? It doesn't work!!! My problem is that I cannot get the variables to print in the included text. Isn't the include text run through the pre-processor? What am I doing wrong here? I want one pullquote to print in the header fil and one in the footer. I am going nuts trying to figure out what the problem is! Thanks, Jeremy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP class
I havent used them in php/pear but here is some more info http://www.php.net/manual/en/class.pear.php -- Chris Lee [EMAIL PROTECTED] Martín Marqués [EMAIL PROTECTED] wrote in message 01062015390800.12018@bugs">news:01062015390800.12018@bugs... Can we dream of having destructors in class definition some day when programing in PHP? Saludos... ;-) -- Cualquiera administra un NT. Ese es el problema, que cualquiera administre. - Martin Marques |[EMAIL PROTECTED] Programador, Administrador | Centro de Telematica Universidad Nacional del Litoral - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Printingt Variables in Included Text
hehe. ok i'll explain, half way through you will see what you were doing wrong :) // valid $test = 'chris lee'; echo $test; // in-valid echo $test; $test = 'chris lee'; // valid $pullquote1 = 'test for pull quote'; include('header.inc'); // in-valid include('header.inc'); $pullquote1 = 'test for pull quote'; see where im going ? your echoing the data, then assigning it a value. it needs to be the other way around -- Chris Lee [EMAIL PROTECTED] Jeremy Bowen [EMAIL PROTECTED] wrote in message 01062010405501.03370@pegasus">news:01062010405501.03370@pegasus... Hey, I have a website where I use header and footer files in a includes director to establish the header and footer of each page. They are pretty simple, mostly straight up html. The website is kind of an online magazine and what I want to do is print pull quotes out of each story. So in my file lests say index.phtml I have: ? include(/path/to/file/header.inc) ? ? pullquote1='Test for pull quote'; pullquote2='pullquote2 text'; keywords='shdjkashd kasdj d kjdjdjasd'; title='Title of Page'; ? ? include(path/to/file/footer.inc) ? --- In the header file I have ? print($pullquote1) ? It doesn't work!!! My problem is that I cannot get the variables to print in the included text. Isn't the include text run through the pre-processor? What am I doing wrong here? I want one pullquote to print in the header fil and one in the footer. I am going nuts trying to figure out what the problem is! Thanks, Jeremy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problem starting session
does the dir exist ? I dont use win2k for php so im guessing. win2k also has some sort of permissions doesnt it ? does the dir have to have the same perms that the server does ? linux needs this to be true. -- Chris Lee [EMAIL PROTECTED] Ben Edwards [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am getting the following on a Windows 2000 Professional installation when I try to start a session: Warning: open(/tmp\sess_9ab091b811c5675d90fabf4392b3c110, O_RDWR) failed: m (2) in e:\inetpub\wwwroot\cd\common.inc on line 27 Any help would be much appreciated. Regards, Ben *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards [EMAIL PROTECTED]+44 (0)7970 269 522 * * Campaign Against proper English, Dyslexia division * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] protect source code
To Any Kind Soul, I am on a project and the issue that struck me is how to protect my source codes which is in human readable form. There isn't any way for me to protect my database and the only way that I had found out is to use the PHP encoder provided by Zend.com to encode the source code. However, the price of a commercial license for each machine (since it use host ID or hostname as the key) is too costy and I am trying to find an alternative or a cheaper packages available. Please help. Best Regards, Jason See -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] General Coding Question
this whole bench thing really needs someone to sit down and go i bet i could write some code to see in less time then it would take to post ? dont get mad, people are allways posting this. is this aster then that ? write some code and see. its very hardware/os dependant. your system may be very diff then someone else. more likley then not. ?php function debug_time() { $debug_time = microtime(); $debug_time = str_replace('.', '', $debug_time); $debug_time = explode(' ', $debug_time); $debug_time = $debug_time[1] . $debug_time[0]; return($debug_time); } class debug { function debug() { $this-start = debug_time(); } function reset() { $all_vars = get_object_vars($this); foreach($all_vars as $pos = $val) if ($pos != 'error') unset($this-$pos); } function time($text = '') { $this-break = debug_time(); $time = ($this-break - $this-start) / 10; error_log(number_format($time, 4) . : $text \n, 3, '/var/log/php_err.log'); $this-start = $this-break; } } $debug = new debug; $debug-time('a'); for($c = 0; $c 10; $c++) echo test; $debug-time('b'); for($c = 0; $c 10; $c++) ?test?php $debug-time('a'); ? 0.0002 : a 2.0003 : b 1.9478 : a therefore on *my* system it is very very slightly faster to exit out of php and echo. i find it ugly. imho. -- Chris Lee [EMAIL PROTECTED] James Stevens [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Does it have any effect on performance in either case if a file is completely done in PHP(1) or interspersed with PHP(2). (1) ?php echo html; ... ? (2) html ... ?php echo $forminput; ? ... Also, and this is personal preference, which is easier to read/debug? James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] bad form...
Dallas K. wrote: On a previous shopping cart, some of our fantastically complex scripts got so big that WE couldn't follow the logic too many conditional test, things started to conflict it was hell... so we found that it was better to break the processing code apart from the html. but build one file that includes all needed files into one to simulate the One-file-one-form approach. this made all our lives easier. JMT. But you don't have to split the code up into several files. Seperation of code and design is a nice thing, good code structure is another, but they don't require the code to be split up into several files (the Design is often put into a seperate template, but this is not the topic). It can be done this way, but there are other ways, some of them using a single file. regards Wagner -- Little Boy: Mr. President, how did you become a war hero? President Kennedy: It was absolutely involuntary. They sank my boat. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] validate phone numbers
There are so many combinations of European phone numbers, along with the possible combinations of area codes, and hyphens or spaces may be used as well, I wouldn't bother. If the phone number is critical, and important to the person using your site, then treatitlike a password and have them enter it twice. Although in that case they are likely to enter it correctly anyway. One can only do so much. Miles Thompson At 07:24 PM 6/19/01 -0700, Richard Kurth wrote: I am using this script to validate for phone numbers and it work just perfect for US phone numbers. But it rejects some European and Australian numbers what do I need to do to make it validate all phone numbers if (($WPHONE_NO) || ($wphone_no)) { $wphone_no = trim($wphone_no); if ($WPHONE_NO) $phone_no = trim($WPHONE_NO); if (!ereg((^(.*)[0-9]{3})(.*)([0-9]{3})(.*)([0-9]{4}$), $wphone_no)) { print_error(your bphone number/b is invalid); } } Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Calculate # of minutes during working hours between two dates
sloppy psuedocode:(but you get the idea) numdays = date2 - date1 minperday = 60 * 9.5(hrs) totalminutes for interval = numdays * minperday - Original Message - From: Wim Koorenneef [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 11:25 AM Subject: [PHP] Calculate # of minutes during working hours between two dates Hi all, I want to calculate the number of minutes between two dates, but only those minutes on monday through friday between 08.00 and 17.30. I could evaluate every minute in the interval against all known minutes during working hours, but that's a bit much :-) Any suggestions for a better, more efficient algorithm? Tia. -- Greetinx, Wim Koorenneef [EMAIL PROTECTED] Boxtel, the Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Forum script
www.phorum.org Best regards, Andrew -Original Message- From: Rosen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 11:23 AM To: [EMAIL PROTECTED] Subject: [PHP] Forum script Hi Can someone recommend me some good script for forums ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Forum script
www.phorum.org Jerry Lake Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -Original Message- From: Rosen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 8:23 AM To: [EMAIL PROTECTED] Subject: [PHP] Forum script Hi Can someone recommend me some good script for forums ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Code check please
Your code is [mostly] fine, except for two things: 1. Although you connected to your database with mysql_connect() and mysql_select_db(), you didn't do anything with connection. Try using mysql_query() to send a query to the db, i.e. mysql_query($sql). 2. Your SQL is a bit out of whack. The SET clause is used for UPDATEs, not INSERTs. Instead, try: $sql = INSERT INTO tabell (fornamn, efternamn, email) VALUES ( . '$fornamn', '$efternamn', '$email');; Hope that works. J Andreas Skarin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I've tried to get this working for over an hour now, and it still won't. I don't even get an error message to help me find the problem so I was hoping that someone could check my code for me. I'm fooling around with a basic form that is supposed to send one's name, surname and e-mail address to receive.php. receive.php is then supposed to take the information and add it to a table called tabell in a database called databas, but it doesn't work. I think there might be something wrong with my MySQL query. - - - - - - - - - - - FORM - - - - - - - - - - - - - - form action=receive.php method=post PFouml;rnamn:br input type=text name=fornamn size=25/p pEfternamn:br input type=text name=efternamn size=25/p pE-mailadress:br input type=text name=email size=25/p input type=submit name=submit value=Log in /form - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RECEIVE.PHP - - - - - - - - - - - ?php // connection to MySQL $connection = mysql_connect(localhost, username, password); if (!$connection) { echo (PUnable to connect to the database server at this time./P ); exit(); } //select database if (! @mysql_select_db(databas) ) { echo (PUnable to locate the database at this time./P); exit(); } // MySQL query $sql = INSERT INTO tabell SET . fornamn ='$fornamn', . efternamn='$efternamn', . email='$email';; ? - - - - - - - - - - - - - - - - - - - - - - - - - - - - Thanks in advance! // Andreas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Calculate # of minutes during working hours between two dates
Try to find unix-time in seconds: (endtime - starttime) / 60 = total minutes SED -Original Message- From: Wim Koorenneef [mailto:[EMAIL PROTECTED]] Sent: 20. júní 2001 15:26 To: [EMAIL PROTECTED] Subject: [PHP] Calculate # of minutes during working hours between two dates Hi all, I want to calculate the number of minutes between two dates, but only those minutes on monday through friday between 08.00 and 17.30. I could evaluate every minute in the interval against all known minutes during working hours, but that's a bit much :-) Any suggestions for a better, more efficient algorithm? Tia. -- Greetinx, Wim Koorenneef [EMAIL PROTECTED] Boxtel, the Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] email templates and str_replace
Richard, The problem is with the str_replace()s. Consider the following: ?php $myvar = 'this is a var.'; $mytext = str_replace('is', 'is not', $myvar); ? At this point $myvar still equals 'this is a var.' but $mytext is 'this is not a var.' $myvar hasn't been modfified by the str_replace so any additional str_replace()s after it will not have a cumlative effect. Actually, wouldn't the string then be equal to 'this not is not a var.' ?? - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Calculate # of minutes during working hours between two dates
figure out how many minutes per day, put that as a constant in your script, then just multiply that by the number of days between the two dates. ... or would you prefer something more convoluted? ;) -Original Message- From: Wim Koorenneef [mailto:[EMAIL PROTECTED]] Subject: [PHP] Calculate # of minutes during working hours between two dates Hi all, I want to calculate the number of minutes between two dates, but only those minutes on monday through friday between 08.00 and 17.30. I could evaluate every minute in the interval against all known minutes during working hours, but that's a bit much :-) Any suggestions for a better, more efficient algorithm? Tia. -- Greetinx, Wim Koorenneef [EMAIL PROTECTED] Boxtel, the Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] a DOT or a BLANK SPACE
Hi. We HAVE TO use names like Num. or Home Address in for our input tags in the forms. That is: input type=text name=Num. input type=text name=Home Address When I receive the info in my PHP file, after the form has been posted, the variable name I get is: 'Num '. So, the dots are being replaced for a blank space. I can't take for granted that any blank space is a dot since my inputs names are using them. How can I identify between this two variable names? Thanks for your help! Regards, Jaime -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] OT - filtering problems
i use the full version of outlook 2000, and it didnt even blink when the lists came back up... my php folder just started filling up as usual ;) i've noticed other people mentioning broken eudora on this list... i dont mean to sound arrogant, but perhaps it's time to upgrade, or get a better email program that properly filters mail. -Original Message- From: Marty Landman [mailto:[EMAIL PROTECTED]] Subject: [PHP] OT - filtering problems Sorry for this OT post. Since the lists have come back up I've been having a problem getting my email client, Eudora 5.0.2 sponsored mode for Win95 to filter them correctly. I've tried several times and combinations and still everything goes into my inbox. I've got several dozen filters, and a couple others are giving me trouble too. I'm a bit stymied; could there be something weird and wonderful about the headers for this list's (and a couple others) that confuse Eudora? Anyone else having this same problem, or have any advice on how I might debug this? Offlist replies are totally fine. Thanks in advance, Marty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: [PHP-DB] Date field
-mm-dd in DATE format you can pull it back out however you like with the DATE_FORMAT command SELECT sometext,DATE_FORMAT(somedate,'%m/%d/%Y') AS date FROM tablename then you have two variables: sometext and date see documentation on www.mysql.com for more info on DATE_FORMAT -Original Message- From: Rosen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 10:28 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Date field Hi, Can someone tell me how do stote date field in MySQL DB ? Thanks, Rosen M. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Include Speed
Isn't it fair to say that having the server open the extra file will add to the total execution time of the page? scott [gts] scott@graphiTo: php [EMAIL PROTECTED] ctype.com cc: Subject: RE: [PHP] Include Speed 06/20/2001 04:33 PM include() is not magical. it's all PHP code, whether or not you put it into your main file, or pull it in with an include() if it's slow - it's slow, regardless of *how* it was brought into the script. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 4:11 AM To: php-general Subject: [PHP] Include Speed Hi everybody, How much the include() can slow down the execution of the scripts; if I call one file let say for the db connection it's clearly ok but is it a limite of numbers of include in one script from where that slow the process? Marc -- /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/* /* Marc Fourny/* /* Multimedia Development for the web /* /* /* /* CD-ROM /* /*Fourny ElectronicEDiting /* /*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's rights, including breach of confidence, privacy or other rights. If you have received this e-mail message in error, please notify me immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message is strictly prohibited. Trinity Mirror plc is the holding company for the Trinity Mirror group of companies and is registered in England No. 82548, with its address at Kingsfield Court, Chester Business Park, Chester CH4 9RE. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Calculate # of minutes during working hours between two dates
Hi See http://www.php.net/manual/en/function.jddayofweek.php For each date returning 1 through 5, add the appropriate amounts of minutes to the total HTH Wim Koorenneef wrote: Hi all, I want to calculate the number of minutes between two dates, but only those minutes on monday through friday between 08.00 and 17.30. I could evaluate every minute in the interval against all known minutes during working hours, but that's a bit much :-) Any suggestions for a better, more efficient algorithm? Tia. -- Greetinx, Wim Koorenneef [EMAIL PROTECTED] Boxtel, the Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] a DOT or a BLANK SPACE
as I remeber, dots should be replaced by underscores not spaces .. at least if your input type is image and it's name is img then you would get two variables: img_x and img_y instead of what html4 spec specifies: img.x and img.y. Evevn if they get replaced then does it happen with $HTTP_POST_VARS[] array? I see now purpose of those names being replaced for this array only when they are populated as global variables. And still .. are you sure your webbrowser doesn't do that before t even makes to php? Lenar Jaime Torres [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi. We HAVE TO use names like Num. or Home Address in for our input tags in the forms. That is: input type=text name=Num. input type=text name=Home Address When I receive the info in my PHP file, after the form has been posted, the variable name I get is: 'Num '. So, the dots are being replaced for a blank space. I can't take for granted that any blank space is a dot since my inputs names are using them. How can I identify between this two variable names? Thanks for your help! Regards, Jaime -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Forum script
try phorum - http://phorum.org -- awesome... HTH, Nicole Rosen wrote: Hi Can someone recommend me some good script for forums ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Nicole Lallande [EMAIL PROTECTED] 760.753.6766 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem starting session
I am getting the following on a Windows 2000 Professional installation when I try to start a session: Warning: open(/tmp\sess_9ab091b811c5675d90fabf4392b3c110, O_RDWR) failed: m (2) in e:\inetpub\wwwroot\cd\common.inc on line 27 Any help would be much appreciated. Regards, Ben *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards [EMAIL PROTECTED]+44 (0)7970 269 522 * * Campaign Against proper English, Dyslexia division * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] inserting a variable into a variable
Or, you could do... $cat = 'butch'; ${rm_{$cat}_adt} = 'is cool'; // This would set the variable $rm_butch_adt equal to 'is cool' -js - Original Message - From: scott [gts] [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 8:37 AM Subject: RE: [PHP] inserting a variable into a variable you so totally could use an assoc. array right now: $cat_adt = x; $rm = y; $a[ $cat_adt ] = whatever; $a[ $rm.$cat_adt ] = Yeah; print $a['yx']; save yourself a lot of trouble and dont bother with variables-of-variables and trying to get $rm_$cat_adt == $rm_x just use a hash... that's what it's there for ;) -Original Message- From: Tom Carter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 5:24 AM To: Hasan Niyaz; [EMAIL PROTECTED] Subject: Re: [PHP] inserting a variable into a variable I have come to a situation where i am having a variable inside another variable. for example. $rm_$cat_adt PHP would read this as trying to prepend the variable $cat_adt to the variable $rm_ You seem to be trying to insert the variable $cat into the middle of a variable.. possible, but probably better to slightly rethink your naming strategy HTH, Tom The above is a variable and $cat is again another variable This does not work.. Need some help! Thanks, Hasan -- PHP General Mailing List (http://www.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] mnoGoSearch PHP udm_ functions
I am looking at using mnoGoSearch on one of my sites and compiling with support for MySQL. Then I noticed that PHP has introduced some udm functions for use with mnoGoSearch. Can someone explain to me why we need mnoGoSearch Functions in PHP? Also, can anyone explain what the categories option is is mnoGoSearch? Regards, Matthew Delmarter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] exec, backtics and co.
you must have permission to execute/read the binary, and you must give the full location of that binary. -Original Message- From: Paindavoine, Matthieu (MPAINDAV) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 7:26 AM To: '[EMAIL PROTECTED]' Subject: [PHP] exec, backtics and co. Hello, I have a problem with a php script which contains an exec (identical problem with backtics and similar operators) some programs are simply not executed for example, having a simple 'hello world' program in c++ will work fine, but having a program that writes 'hello world' to a file won't work. My question is 'What are the requirements a binary must match to be correctly executed'? I assume there are some stuff about -permissions... -location in the directory tree... - ??... I don't know where to find this information, so if anyone has suggestions or pointers, I would really appreciate the help. Thank you. Matthieu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP / gd problems / compiling
my configure line: ./configure' '--with-mysql' '--with-apache=../apache_1.3.12' '--enable-track-vars' '--enable-ftp' '--with-jpeg-dir=/usr/local/bin' '--with-gd-dir=/usr/local/bin' gd version 1.8.1 .. Then whenever I try to create an image of any kind, be it gif, jpg, or png, I get: br bWarning/b: ImageTtfText: No TTF support in this PHP build in b/data/www/apache/htdocs/airforce/quote/image.php/b on line b7/bbr br bWarning/b: ImageGif: No GIF support in this PHP build in b/data/www/apache/htdocs/airforce/quote/image.php/b on line b8/bbr (It would give me the same warnings for JPG .. No JPG support, no PNG support, etc.) What did I do wrong? I thought I built it in correctly, that configure line appears when I do the phpinfo() stuff .. Hi Chad! You should compile PHP with TTF-Support, if you want to use TrueTypeFonts (ImageTTFText does this) for this you would need the freetype package (http://freetype.sourceforge.net) and add this to your configure line for freetype 1.x: --with-ttf='/path/to/ttf' -- or -- for freetype 2.x: --with-freetype-dir='/path/to/freetype' you should also make sure you built gd with freetype support, i'm not sure if gd 1.8.1 supports freetype 2.x and I would recommend that you upgrade your gd_lib to 2.0.1 it's a beta, but it's quite stable! Best, Sebastian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Calculate # of minutes during working hours between two dates
this is just the way I would do it: generate timestamps for 8.00 and 17.30 for the days you want as long as the timestamps are between the two original timestamps. after that it's all subtraction and dividing by 60. That's about as efficient as I can think of. Rich Cavanaugh -Original Message- From: Wim Koorenneef [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 11:26 AM To: [EMAIL PROTECTED] Subject: [PHP] Calculate # of minutes during working hours between two dates Hi all, I want to calculate the number of minutes between two dates, but only those minutes on monday through friday between 08.00 and 17.30. I could evaluate every minute in the interval against all known minutes during working hours, but that's a bit much :-) Any suggestions for a better, more efficient algorithm? Tia. -- Greetinx, Wim Koorenneef [EMAIL PROTECTED] Boxtel, the Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Code check please
You're using UPDATE syntax for your INSERT try: $sql = INSERT INTO tabell (fornamn, efternamn, email) values ('{$fornamn}', '{$efternamn}', '{$email}'); Rich Cavanaugh -Original Message- From: Andreas Skarin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 12:00 PM To: PHP General Subject: [PHP] Code check please I've tried to get this working for over an hour now, and it still won't. I don't even get an error message to help me find the problem so I was hoping that someone could check my code for me. I'm fooling around with a basic form that is supposed to send one's name, surname and e-mail address to receive.php. receive.php is then supposed to take the information and add it to a table called tabell in a database called databas, but it doesn't work. I think there might be something wrong with my MySQL query. - - - - - - - - - - - FORM - - - - - - - - - - - - - - form action=receive.php method=post PFouml;rnamn:br input type=text name=fornamn size=25/p pEfternamn:br input type=text name=efternamn size=25/p pE-mailadress:br input type=text name=email size=25/p input type=submit name=submit value=Log in /form - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RECEIVE.PHP - - - - - - - - - - - ?php // connection to MySQL $connection = mysql_connect(localhost, username, password); if (!$connection) { echo (PUnable to connect to the database server at this time./P ); exit(); } //select database if (! @mysql_select_db(databas) ) { echo (PUnable to locate the database at this time./P); exit(); } // MySQL query $sql = INSERT INTO tabell SET . fornamn ='$fornamn', . efternamn='$efternamn', . email='$email';; ? - - - - - - - - - - - - - - - - - - - - - - - - - - - - Thanks in advance! // Andreas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Code check please
At 18:00 Uhr +0200 20.06.2001, Andreas Skarin wrote: I've tried to get this working for over an hour now, and it still won't. I don't even get an error message to help me find the problem so I was hoping that someone could check my code for me. [snip] $sql = INSERT INTO tabell SET . fornamn ='$fornamn', . efternamn='$efternamn', . email='$email';; Hi Andreas I'd use this SQL-query: $sql = INSERT INTO tabell \ (fornamn,efternamn,email) \ VALUES(.$fornamn., \ .$efternamn., .$email.); Hope it works for you! Best, Sebastian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Code check please
UPDATE syntax for INSERT is allowed in MySQL, so that should not be the problem as far as you include all fields not having default value, timestamp type or auto_increment attribute in your statement. What's the error message if there is any? lenar Rich Cavanaugh [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You're using UPDATE syntax for your INSERT try: $sql = INSERT INTO tabell (fornamn, efternamn, email) values ('{$fornamn}', '{$efternamn}', '{$email}'); Rich Cavanaugh -Original Message- From: Andreas Skarin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 12:00 PM To: PHP General Subject: [PHP] Code check please I've tried to get this working for over an hour now, and it still won't. I don't even get an error message to help me find the problem so I was hoping that someone could check my code for me. I'm fooling around with a basic form that is supposed to send one's name, surname and e-mail address to receive.php. receive.php is then supposed to take the information and add it to a table called tabell in a database called databas, but it doesn't work. I think there might be something wrong with my MySQL query. - - - - - - - - - - - FORM - - - - - - - - - - - - - - form action=receive.php method=post PFouml;rnamn:br input type=text name=fornamn size=25/p pEfternamn:br input type=text name=efternamn size=25/p pE-mailadress:br input type=text name=email size=25/p input type=submit name=submit value=Log in /form - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RECEIVE.PHP - - - - - - - - - - - ?php // connection to MySQL $connection = mysql_connect(localhost, username, password); if (!$connection) { echo (PUnable to connect to the database server at this time./P ); exit(); } //select database if (! @mysql_select_db(databas) ) { echo (PUnable to locate the database at this time./P); exit(); } // MySQL query $sql = INSERT INTO tabell SET . fornamn ='$fornamn', . efternamn='$efternamn', . email='$email';; ? - - - - - - - - - - - - - - - - - - - - - - - - - - - - Thanks in advance! // Andreas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4.0.5 CVS + Apache 2 CVS
Anyone trying this at all? Anyone find a fix for the apr_save_brigade failure? -- Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-796-9023 email: [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] Another Template Engine (code)
i wrote a simple classified andhash-enabled template engine as a sort-of proof of concept placeholders in the template are denoted by %{name}% and they're filled with data by the "regvar()" func. $temp-regvar('name', 'value'); 1) class the engine so that you cay have multiple instances of different templates and not worry about them colliding or corrupting each other. example: $temp1 = new template("filename") $temp1-regvar('THIS', 'Some text'); $temp1-tprint(); 2) put support for hashes of values so you dont have to call regvar() for each and every var, you can simply submit a hash to the template and it'll traverse through it example: $assoc_array('name'='scott', 'age'='99'); $temp1-hash($assoc_array); will properly replace %{name}% and %{age}% with "scott" and "99" Attached files to this email are: template.php - the template class test.template.php - the calling php script test.template.html - a test template put them all in the same dir and call 'test.template.php' to see the test script. -Original Message-From: TunkeyMicket [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 20, 2001 11:47 AMTo: [EMAIL PROTECTED]Subject: [PHP] Template Engine Since so many of you are asking for help w/ a template engine of some sort I have included the one I use for my mail program. I have not tested it with large amounts of text, but it is able to handle some very large strings. It has its own documentation, and if anyone needs any help setting it up I'd be willing to help. Chris "TunkeyMicket" Watford TunkeyMicket Productions www.tunkeymicket.com Attached: mp_template_engine.php template.php test.template.php Sample template file. Hello, my name is %{name}% and i am %{age}% years old And %{another}% thing! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] General Coding Question
on pages with mostly HTML code, the second style is much prefereable, but on pages with mostly PHP code, the first style is usually OK. overall, i tend towards the second, becuase it's a pain in the ass to esape all the double-quotes in my HTML, my echo statements usulaly end up looking like thi (which, to me, is terrible form) echo INPUT TYPE=\TEXT\ VALUE=\. $hash['var'] .\.. so i usually use this format, which to my eyes is much prettier :) ? INPUT TYPE=TEXT VALUE=?= $hash['var'] ? ? -Original Message- From: James Stevens [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 12:23 PM To: [EMAIL PROTECTED] Subject: [PHP] General Coding Question Does it have any effect on performance in either case if a file is completely done in PHP(1) or interspersed with PHP(2). (1) ?php echo html; ... ? (2) html ... ?php echo $forminput; ? ... Also, and this is personal preference, which is easier to read/debug? James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] General Coding Question
im here to start a flamewar. dont use then. why not use ' ? echo input type=\text\ name=\name\ value=\$name\ echo input type='text' name='name' value='$name' I like the second. it is proper html check it with w3.org. -- Chris Lee [EMAIL PROTECTED] scott [gts] [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on pages with mostly HTML code, the second style is much prefereable, but on pages with mostly PHP code, the first style is usually OK. overall, i tend towards the second, becuase it's a pain in the ass to esape all the double-quotes in my HTML, my echo statements usulaly end up looking like thi (which, to me, is terrible form) echo INPUT TYPE=\TEXT\ VALUE=\. $hash['var'] .\.. so i usually use this format, which to my eyes is much prettier :) ? INPUT TYPE=TEXT VALUE=?= $hash['var'] ? ? -Original Message- From: James Stevens [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 12:23 PM To: [EMAIL PROTECTED] Subject: [PHP] General Coding Question Does it have any effect on performance in either case if a file is completely done in PHP(1) or interspersed with PHP(2). (1) ?php echo html; ... ? (2) html ... ?php echo $forminput; ? ... Also, and this is personal preference, which is easier to read/debug? James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SMTP-access with PHP...
Den 01-06-20 18.28, skrev Andreas D. Landmark [EMAIL PROTECTED]: Contact your mailserver admin and get him/her to open for relay from the IP of your webserver. Thanks, I'll try that and see what will happen. Sincerely, /Magnus Hammar -- -- PHP General Mailing List (http://www.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] Trimming Array value
I have a multi-dimensional array. I want to trim every values so that none of them have trailing space. What is the most efficient way to do that ? I don't necessaryly know the dimension of the array ahead of time, so the function need to be able to handle it recursively. Thanks Reuben D. Budiardja -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Parse PHP inside a variable
Hello I'm having a variable that contains HTML with embedded PHP code. When I echo it then the PHP code does not get executed. Is there a way I can parse/print the content of my variable? Thanks Claus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] General Coding Question
You don't use a lot of javascript, do you? Chris Lee [EMAIL PROTECTED] wrote in message 9gr5f9$v2$[EMAIL PROTECTED]">news:9gr5f9$v2$[EMAIL PROTECTED]... im here to start a flamewar. dont use then. why not use ' ? echo input type=\text\ name=\name\ value=\$name\ echo input type='text' name='name' value='$name' I like the second. it is proper html check it with w3.org. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Parse PHP inside a variable
maybe function eval()? lenar. Claus Heiko Niesen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello I'm having a variable that contains HTML with embedded PHP code. When I echo it then the PHP code does not get executed. Is there a way I can parse/print the content of my variable? Thanks Claus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Parse PHP inside a variable
Try eval(): http://www.php.net/manual/en/function.eval.php i.e. ?php $a = 1; $b = 2; $str = echo $a + $b;; eval($str); ? J Claus Heiko Niesen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello I'm having a variable that contains HTML with embedded PHP code. When I echo it then the PHP code does not get executed. Is there a way I can parse/print the content of my variable? Thanks Claus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Trimming Array value
something like this: ? function recursive_rtrim($ar) { foreach($ar as $key = $val) $ar[$key] = is_array($val) ? recursive_rtrim($val) : rtrim($val); return $ar; } ? lenar. Reuben D Budiardja [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a multi-dimensional array. I want to trim every values so that none of them have trailing space. What is the most efficient way to do that ? I don't necessaryly know the dimension of the array ahead of time, so the function need to be able to handle it recursively. Thanks Reuben D. Budiardja -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Problem starting session
Ben, In your php.ini you should have the following: session.save_path = c:\winnt\temp Currently you have it set to: session.save_path = /tmp -- Rich Cavanaugh -Original Message- From: Ben Edwards [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 23, 2001 12:48 PM To: [EMAIL PROTECTED] Subject: [PHP] Problem starting session I am getting the following on a Windows 2000 Professional installation when I try to start a session: Warning: open(/tmp\sess_9ab091b811c5675d90fabf4392b3c110, O_RDWR) failed: m (2) in e:\inetpub\wwwroot\cd\common.inc on line 27 Any help would be much appreciated. Regards, Ben *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards [EMAIL PROTECTED]+44 (0)7970 269 522 * * Campaign Against proper English, Dyslexia division * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] file upload
Hi, I have tried everything and still having problem uploading. Actually, my problem is with IE, I got a unable to read file or file not found message from IE. But uploading is fine with NS. Does anyone has this experience? Any pointers? My file is only 20K word document and I have set the max file size to 5M. And with full permission on temp and upload directory in IIS. php.ini max file size to 10M. Thanks, Dave __ Do You Yahoo!? Get personalized email addresses from 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]
Re: [PHP] PHP with JAVA support
Robert, Please include the php code you're using to instantiate the class. That will give me a better idea of what to suggest. I'm using PHP 4.05 Java 1.3.1 on Redhat 6.2 with good results. -Jim Kirkpatrick Robert Vetter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I'm trying to run PHP with Java support and don't get it to work. First I compiled PHP '--with-java=/usr/local/jdk1.2.2/'. Then I added this to the PHP.ini file: [Java] java.home=/usr/local/jdk1.2.2 java.class.path=/usr/local/lib/php/extensions/php_java.jar:/usr/local/jdk1.2 .2/src.jar java.library.path=/usr/local/lib:/usr/local/jdk1.2.2/jre/lib/i386:/usr/local /jdk1.2.2/jre/lib/i386/classic:/usr/local /jdk1.2.2/jre/lib/i386/native_threads java.library=/usr/local/jdk1.2.2/jre/lib/i386/libjava.so java.extension=/usr/local/lib/php/extensions/libphp_java.so Now, when I try to instantiate a JAVA class I get this error: Fatal error: Cannot instantiate non-existent class: java in /usr/local/apache/htdocs/index.php on line 3. Does anybody have expirience with running JAVA with PHP? I don't know why it doesn't work. I use PHP 4.05 on a Debian Linux machine. Thanks. Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] how to install pws on win2k
Sagar, Open your "Add/Remove Programs" control panel. Click on "Add/Remove Windows Components". Click the check box next to "Internet Information Server". Click OK. You'll need your Win2k CD. This will install a limited version of IIS. --Rich Cavanaugh -Original Message-From: sagar chand [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 20, 2001 12:58 PMTo: [EMAIL PROTECTED]Subject: [PHP] how to install pws on win2k hi everyone, I have recently shifted from win98 to win2k. the pws i'm using is not installing on win2k. Is there any remedy 4 this? thanks for all u guys who help here with this mailing list. bye sagar
RE: [PHP] how to install pws on win2k
You need IIS on win2k Jerry LakeInterface Engineering TechnicianEuropa Communications - http://www.europa.comPacifier Online - http://www.pacifier.com -Original Message-From: sagar chand [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 20, 2001 9:58 AMTo: [EMAIL PROTECTED]Subject: [PHP] how to install pws on win2k hi everyone, I have recently shifted from win98 to win2k. the pws i'm using is not installing on win2k. Is there any remedy 4 this? thanks for all u guys who help here with this mailing list. bye sagar
[PHP] re: time
actually i believe if you date() it gives you users system time it is the problem i have run into in the script i am trying to modify. the original person used date() and it clear shows my time. As much as i admit the possibility of their server being in Siberia but I doubt it. Thank You,Jon Yaggiewww.design-monster.comAnd they were singing . . . '100 little bugs in the code100 bugs in the codefix one bug, compile it again101 little bugs in the code101 little bugs in the code . . .'And it continued until they reached 0
[PHP] PHP Java: Apache processes
I have what appears to be a successful implementation of Java support compiled into PHP running on an Apache server. Specifics: PHP: 4.0.5 Java: 1.3.1 (Sun) Apache: 1.3.19 OS: Redhat 6.2 The problem I'm experiencing has to do with finding multiple Apache child processes spawned but never closed for each call to Java. They show up with ' rt_sigsuspend ' in a PS listing. My guess, based on looking for that term on the net, is that it may have to do with the Java RunTime not being able to exit and hanging. Over a day or two, three developers can crank the Apache processes up near 300. I'd appreciate any help with this. I'm currently cleaning up with a cron script, but I'd like to solve the problem if at all possible. -Jim Kirkpatrick -- PHP General Mailing List (http://www.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] Announcement: Smarty 1.4.3 now available
Smarty now has a built in debugging console, and security features for third party template editing, and many numerous fixes and enhancements. Let me know if there are any problems. Monte http://www.phpinsider.com/php/code/Smarty/ Version 1.4.3 - - added regex_replace modifier, documented. (Monte) - added debugging console feature and custom function assign_debug_info, documented. (Monte) - added 'scope' attribute for {config_load}, 'global' is now deprecated but is still supported. (Andrei) - reduced template symbol table pollution by moving config array into the class itself. (Andrei) - fixed a bug with passing quoted arguments to modifiers inside {if} statements. (Andrei, Sam Beckwith) - added security features for third party template editing, documented (Monte) - added assign custom function, documented. (Monte) - fixed bug with template header using version instead of _version. (Monte) - fixed a problem with putting $ followed by numbers inside {strip} and {/strip} tags. (Andrei) - fixed Config_File class to allow empty config paths (defaults to current directory). (Andrei) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php and flash 5 books?
Yeah the flash 5 dynamic content studio by friends of ed is one of the books I have found.. but it seems to me that most of the books I've seen / browsed through only have a small chapter about php and flash.. but the FOE book has the most about it.. a short intro to php (which I skipped all together b/c it assumes that you have never seen PHP or code in your life).. and then it just talks about getting variables by calling a php script from within flash to get the info you need from a database or just where ever you want to get it.. anyway it was interesting to say the least but that one chapter wasn't worth the $80 or so for the book.. would just rather go to barnes and noble get a cup of coffee and read that one chapter while I'm there :) Jay Paulson Internet Program Director LBJS [EMAIL PROTECTED] p.s. anyone going to the O'Reilly Open Source Convention in San Diego? - Original Message - From: Henry [EMAIL PROTECTED] To: Jay Paulson [EMAIL PROTECTED] Sent: Wednesday, June 20, 2001 8:26 AM Subject: Re: [PHP] php and flash 5 books? Anyone know of any good books that actually deal with php interfacing with flash 5? I've found one book but just curious if there are others out there... check out flash 5 dynamic content studio by friends of ed. - http://www.friendsofed.com/books.html - some php, more asp, generator, etc. Cheers Henry [EMAIL PROTECTED] http://www.bigjolt.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Maestro and PHP
does anyone know if php can talk to maestro? btw maestro is a catalogging system / software that a lot of radio stations use to play songs etc on the radio.. if you want to know more about it you can visit: http://www.ccc-dcs.com/1-1-1.html Thanks, Jay Paulson Internet Program Director LBJS [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Code check please
I'm sorry guys, neither of the snippets work. I must have screwed something else up too. Is there any way I can provoke an error message from your code examples below? If anyone manages to find out what's wrong, please tell me. I'm not giving up until I smash this bug :-) // Andreas Rich Cavanaugh wrote: try: $sql = INSERT INTO tabell (fornamn, efternamn, email) values ('{$fornamn}', '{$efternamn}', '{$email}'); Sebastian Wenleder wrote: I'd use this SQL-query: $sql = INSERT INTO tabell \ (fornamn,efternamn,email) \ VALUES(.$fornamn., \ .$efternamn., .$email.); -- Andreas Skarin Svenska Dream Theater-Sällskapet http://www.sdts.nu - mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php/mysql CTO needed
Small, profitable online travel company in Alexandria, VA needs a hands-on CTO with experience in php/mysql who will: - manage our IT team - structure to our development process/document/outline workflow - plan out and implement infrastructure needs for our continued growth - design/develop new software modules You need to have a proven track record in managing and programming. We offer a very competitive salary and benefits. For more info, please email your resume to [EMAIL PROTECTED] Please no recruiters nor third parties. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php/mysql DBA/Sys Admin needed
Alexandria, VA online travel company needs a dba/sys admin. for more info about us please see http://www.hotelscentral.com We have one server running redhat with php/mysql database and we need somebody to maintain the smooth operation, optimize performance, help create robust infrastructure for our continued growth. If you are interested, please email your resume to [EMAIL PROTECTED] No recruiters nor third parties, please. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ***Get a piece of the #1 CASH MACHINE on the net***
Hmmm.. a porn site writen with PHP ? On Wed, 20 Jun 2001, [EMAIL PROTECTED] wrote: SEX SELLS!!! Enjoy the riches of the most lucrative business in the world without being in the business. If you are in need of money quickly, This is for you. You don't have to access the website if you do not wish, just take the money it will generate for you. Believe me it will be a short time until you will receive hundreds, then thousands each month. Would you like to be earning $10,000 a month within 6 months. It costs nothing to check it out but it could change your life forever, as it did mine. For full details e-mail me: mailto:[EMAIL PROTECTED] For further details reply with 'MORE DETAILS' in the subject line. If you want to be removed from my email database please reply with 'REMOVE' in the subject line -- PHP General Mailing List (http://www.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] Slick Time Zone Coversions
Hey, I wanted to see if anybody has a some ideas or code for a good time zone coversion function. Basically, I would like something where the user can input their timezone (or if php doesn't recognize timezones, maybe just the current time for them, and it can caluculate the difference, but timezones would be preferred). They then enter a time (hh:mm am/pm) which is not local to them, and the function will output a time that has been converted to their timezone. Basically i just want users to be able to take a non-local time and get the local time in their timezone with it. This will be for US times only also. Thanks a bunch!
[PHP] Nuke
Hey, Is anyone here using Nuke? I have a couple of q's, perhaps you can answer them :-) 1. On the Banner Administration: How do I include html banners with javascript in them and not just and image url and click url? 2. My language (english) file is missing a whole bunch of variables for the Banner admin page, does anyone have an update/better english language file? 3. Does anyone know how to incliude a themesidebox monthly view of the calendar? If you answer all these for me, I'll name my firstborn after you ;-) TIA!!! Clayton Dukes -- PHP General Mailing List (http://www.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] setcookie() woes
Hi all, I have a login script that works on one of my machines but not another, and I've determined the problem has to do with setcookie(). One machine is using IE 5.50 and another is using 5.00, and I assume therein lies the problem. I've tried to plow through the dozens (hundreds?) of followups on the manual page for setcookie(). Most of the interesting ones seem to involve using header(SetCookie . . .) instead of the setcookie() function. I tried a few, including the pass-every-parameter-to-setcookie-even-if-you're-not-really-using-them workaround, to no avail. Is this a well known problem, with a well known solution? Thanks, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem starting session
I am getting the following on a Windows 2000 Professional installation when I try to start a session: Warning: open(/tmp\sess_9ab091b811c5675d90fabf4392b3c110, O_RDWR) failed: m (2) in e:\inetpub\wwwroot\cd\common.inc on line 27 Any help would be much appreciated. Regards, Ben *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards [EMAIL PROTECTED]+44 (0)7970 269 522 * * Campaign Against proper English, Dyslexia division * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem starting session
I am getting the following on a Windows 2000 Professional installation when I try to start a session: Warning: open(/tmp\sess_9ab091b811c5675d90fabf4392b3c110, O_RDWR) failed: m (2) in e:\inetpub\wwwroot\cd\common.inc on line 27 Any help would be much appreciated. Regards, Ben *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards [EMAIL PROTECTED]+44 (0)7970 269 522 * * Campaign Against proper English, Dyslexia division * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] will PHP-3 scripts work using PHP-4 ?
Hi all I'm getting back into PHP after doing some scripts a couple of years age in PHP-3. since I am installing PHP on a server now I am wondering if I can install PHP-4 and trust that the old PHP-3 scripts will generally work Ok. Could someone advise me on thie? Thanks in advance. _ Get your FREE download of MSN Explorer at http://explorer.msn.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]