php-general Digest 13 Aug 2006 18:32:55 -0000 Issue 4291
php-general Digest 13 Aug 2006 18:32:55 - Issue 4291 Topics (messages 240596 through 240600): Re: SETCOOKIE 240596 by: Peter Lauri Re: New Large Scale Project. 240597 by: Wesley Acheson Re: OT? Verifying mail was received 240598 by: tedd PHP 4.4.4RC1 released 240599 by: Derick Rethans Re: Internet Explorer doesn't display UTF-8 page using UTF-8 encoding 240600 by: tedd Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: php-general@lists.php.net -- ---BeginMessage--- [snip] On Sat, August 12, 2006 8:00 am, Peter Lauri wrote: When you just use time() you tell the cookie to just live until now, so it dies directly. You have to add some seconds to determine how long the cookie will live. Unfortunately, no... The above solution relies on the USER computer clock being set correctly. [/snip] This is interesting. Because you set the time as the Server time, it will then just assume that the time is the same. However, is the system not that smart that it do translate the time when being sent (timestamp and expire time sent the same way, or just the number of seconds that the cookie will be alive from. If this is correct, what will happen if the server is in a different time zone? Best regards, Peter ---End Message--- ---BeginMessage--- Its not actually a dating site. :) However it does look like the site that you have given has some intresting resources. Thanks for your time. Regards, Wes On 8/13/06, tedd [EMAIL PROTECTED] wrote: I'm looking to do a fairly large scale project. The problem is I don't know how much of it to write myself how much I could get away with using existing components (modified as necessary). Basically the different areas I would need are authentication, galleries (for images), permission levels. Internal messaging (not real time), forums (hopefully I can just plugin an existing one but intregrated with my new so that registering users for the site registers for the forum and vice versa, also I would like each new gallery entry to create a new forum entry for that image). Comments, ratings and such like. Sales (This would have to be a script written elsewhere, I am in no way confident when it comes to dealing with sensitve info like credit card details.) etc. etc. My other problem is even though I'm confident coding I find design very difficult I've a good idea of how the website would work but only in general terms. Out of the box mambo or drupal doesn't seem to do what I want really (obviously) but maybe they would give a good foundation in which to plugin my own building blocks, has anyone tried this? Regards, Wes Wes: I don't know if you would consider this or not, but it's an idea. Please don't hammer me if I'm off-base. It sounds like you may be writing a dating script, if so check out: http://tufat.com/ The osDateSkins -- if nothing else, the designs are interesting. hth's tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com ---End Message--- ---BeginMessage--- At 4:24 PM -0500 8/12/06, Richard Lynch wrote: On Thu, August 10, 2006 9:59 pm, tedd wrote: Not a php solution, but send them all a buck via PayPal. For $90 you'll learn if their email addresses are correct. This assumes a much higher market penetration for PayPal than it has, I think... I don't think penetration is at issue here. The point was to have PayPal send the emails with a buck enticement -- similar to sending first class mail -- if the address is wrong, you'll get your mail back saying so. I know I definitely would not get the email from PayPal, much less the $1, because I gave up on PayPal ages and ages ago. Not because of any inherent problem with PayPal itself, but because the sheer volume of phishing/spam claiming to be PayPal made it impossible to find the legitimate PayPal traffic, which made PayPal useless to me. Different strokes for different folks. I've had very good experience with PayPal personally and with selling things via several sites world wide -- it works for me. And while phishing is a problem with almost all banking, inspection of the sending url and knowing what PayPal *would and would not do* makes is easy for me to separate legitimate correspondence from spam. Furthermore, it appears that PayPal (unlike most online-banking) has a spam reporting process that is pretty effective in combating that sort of thing. I'm not sure what I would do without PayPal. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com ---End Message--- ---BeginMessage--- Hello! PHP 4.4.4RC1 has been packaged and can be found here: - http://downloads.php.net/derick/php-4.4.4RC1.tar.bz2 MD5 (php-4.4.4RC1.tar.bz2) =
RE: [PHP] SETCOOKIE
[snip] On Sat, August 12, 2006 8:00 am, Peter Lauri wrote: When you just use time() you tell the cookie to just live until now, so it dies directly. You have to add some seconds to determine how long the cookie will live. Unfortunately, no... The above solution relies on the USER computer clock being set correctly. [/snip] This is interesting. Because you set the time as the Server time, it will then just assume that the time is the same. However, is the system not that smart that it do translate the time when being sent (timestamp and expire time sent the same way, or just the number of seconds that the cookie will be alive from. If this is correct, what will happen if the server is in a different time zone? Best regards, Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New Large Scale Project.
Its not actually a dating site. :) However it does look like the site that you have given has some intresting resources. Thanks for your time. Regards, Wes On 8/13/06, tedd [EMAIL PROTECTED] wrote: I'm looking to do a fairly large scale project. The problem is I don't know how much of it to write myself how much I could get away with using existing components (modified as necessary). Basically the different areas I would need are authentication, galleries (for images), permission levels. Internal messaging (not real time), forums (hopefully I can just plugin an existing one but intregrated with my new so that registering users for the site registers for the forum and vice versa, also I would like each new gallery entry to create a new forum entry for that image). Comments, ratings and such like. Sales (This would have to be a script written elsewhere, I am in no way confident when it comes to dealing with sensitve info like credit card details.) etc. etc. My other problem is even though I'm confident coding I find design very difficult I've a good idea of how the website would work but only in general terms. Out of the box mambo or drupal doesn't seem to do what I want really (obviously) but maybe they would give a good foundation in which to plugin my own building blocks, has anyone tried this? Regards, Wes Wes: I don't know if you would consider this or not, but it's an idea. Please don't hammer me if I'm off-base. It sounds like you may be writing a dating script, if so check out: http://tufat.com/ The osDateSkins -- if nothing else, the designs are interesting. hth's tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT? Verifying mail was received
At 4:24 PM -0500 8/12/06, Richard Lynch wrote: On Thu, August 10, 2006 9:59 pm, tedd wrote: Not a php solution, but send them all a buck via PayPal. For $90 you'll learn if their email addresses are correct. This assumes a much higher market penetration for PayPal than it has, I think... I don't think penetration is at issue here. The point was to have PayPal send the emails with a buck enticement -- similar to sending first class mail -- if the address is wrong, you'll get your mail back saying so. I know I definitely would not get the email from PayPal, much less the $1, because I gave up on PayPal ages and ages ago. Not because of any inherent problem with PayPal itself, but because the sheer volume of phishing/spam claiming to be PayPal made it impossible to find the legitimate PayPal traffic, which made PayPal useless to me. Different strokes for different folks. I've had very good experience with PayPal personally and with selling things via several sites world wide -- it works for me. And while phishing is a problem with almost all banking, inspection of the sending url and knowing what PayPal *would and would not do* makes is easy for me to separate legitimate correspondence from spam. Furthermore, it appears that PayPal (unlike most online-banking) has a spam reporting process that is pretty effective in combating that sort of thing. I'm not sure what I would do without PayPal. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 4.4.4RC1 released
Hello! PHP 4.4.4RC1 has been packaged and can be found here: - http://downloads.php.net/derick/php-4.4.4RC1.tar.bz2 MD5 (php-4.4.4RC1.tar.bz2) = bb89d67c3a011229adea6c31aae6751b - http://downloads.php.net/derick/php-4.4.4RC1.tar.gz MD5 (php-4.4.4RC1.tar.gz) = 13d41fcc56bb5e164c488575a0b96e59 - http://downloads.php.net/edink/php-4.4.4RC1-Win32.zip This release is intended to address a series of security issues. Aside from security fixes there are virtually no other changes in this release compared to PHP 4.4.43. Please give this version a try to see if everything is still working properly. If all is well, final will be released within a week (next Thursday), most likely along with PHP 5.1.5. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Internet Explorer doesn't display UTF-8 page using UTF-8 encoding
At 6:48 PM -0700 8/12/06, Rasmus Lerdorf wrote: By the way, everyone should be setting a charset. If you don't set it, IE will look at the first 4k of the body of the page and take a wild guess. -Rasmus -Rasmus: Ok, but why doesn't w3c use it? http://validator.w3.org/ (check source) I'm not sure what to do re charset. I've been told by credible sources to always use it and never use it -- which is correct? Or, is this one of those it depends things? tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Internet Explorer doesn't display UTF-8 page using UTF-8 encoding
tedd wrote: At 6:48 PM -0700 8/12/06, Rasmus Lerdorf wrote: By the way, everyone should be setting a charset. If you don't set it, IE will look at the first 4k of the body of the page and take a wild guess. -Rasmus -Rasmus: Ok, but why doesn't w3c use it? http://validator.w3.org (check source) I'm not sure what to do re charset. I've been told by credible sources to always use it and never use it -- which is correct? Or, is this one of those it depends things? W3C is all about standards. IE is all about not following standards. If you want your site to work in the real world you should always set a charset. If you set it in your response header there is no need to set it in each page, and if you look closely, you will see that this is what w3.org is doing: 9:55am shiny:~ telnet validator.w3.org 80 Trying 133.27.228.132... Connected to validator.w3.org. Escape character is '^]'. HEAD / HTTP/1.0 HTTP/1.1 200 OK Date: Sun, 13 Aug 2006 18:42:15 GMT Server: Apache/2.0.54 (Debian GNU/Linux) mod_perl/1.999.21 Perl/v5.8.4 Accept-Ranges: bytes Connection: close Content-Type: text/html; charset=utf-8 -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to run one php app from another?
I don't know if you solved this already, but I use it to redirect to different pages depending on whther the user is logged in or not. Something like header(location:/page/?p=login); works fine. You were on the right track. Gerry On 6/15/06, tedd [EMAIL PROTECTED] wrote: Hi gang: This seems like so obvious a question, I am reluctant to ask. In any event, I simply want my php application to run another, like so: switch (option) { case a: run a.php; exit; break; case b: run b.php; exit; break; case c: run c.php; exit; break; } I know that from within an application I can run another php application via a user click (.e., button), or from javascript event (onclick), or even from cron. But, what if you want to run another application from the results of a calculation inside your main application without a user trigger. How do you do that? I have tried header(Location: http://www.example.com/;); ob_start(), ob_flush() and such, but I can't get anything to work. Is there a way? Thanks. tedd -- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New Large Scale Project.
[snip] My other problem is even though I'm confident coding I find design very difficult I've a good idea of how the website would work but only in general terms. [/snip] Have you ever sat down wit paper and pencil (or Excel or any number of other tools) and attempted to flowchart a project? It will provide truckloads of insight, you'd be amazed at how you can break down a project into discrete modules that will make things easier to swallow. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Chicago PHP Conference
[snip] I'm in the pre-planning phase of organizing a PHP Conference in Chicago. [/snip] Capital idea Richard, thanks for making this more formal. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I am receiving multiple same emails!!!
Team, I unsubscribe and subscribe later on. I am still receiving multiple emails from the same user. How do I stop this madness. I do not want to unsubscribe from This mailing list. Karl James (TheSaint) mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] www.theufl.com
Re: [PHP] Re: How to run one php app from another? RECAP
On 6/16/06, tedd [EMAIL PROTECTED] wrote: At 2:35 PM +0200 6/16/06, Barry wrote: But once output is made. You can't remove it. That isn't possible with PHP. I think I get it now. PHP does everything before the user see's anything. Any links (direct or via a form) are objects that the browser can act upon per the user through html or js, but not php. Interesting. Perfectly doable in PHP. Just have the form action go to a new php script and do your logic, then use header(location:...) to redirect. Gerry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] page redirecting
On 6/28/06, Richard Lynch [EMAIL PROTECTED] wrote: On Wed, June 28, 2006 5:17 am, kristianto adi widiatmoko wrote: i need to redirecting page, it could be done by using header function like this header(Location : page2.php?var1=foo); Then, the URL should be a full, complete URL, and not just a local reference. Sure you can use a local page, I do it all the time. You could just use session_start() at the top of both pages, and slam the data into $_SESSION, and then your Location: redirect would work Yep. Gerry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Preventing double-clicks
Jay, I use a technique to prevent hitting the back button and resubmitting data. I use a 2-script process, one with the form and submit button (I set a session var here), and a second form (the action script). The action script makes sure the session variable is set, processes the info, then clears the session var. If the session var is not set, an error is displayed. Gerry On 6/26/06, Jay Blanchard [EMAIL PROTECTED] wrote: I am going to do some thinking (typing) out loud here because I need to come up with a solution to double-clicking on a form button issue. The steps are; 1. Fill out form 2. Click 'Submit' 3. Data gets stored (including unique data and time stamp data in this casewhich should work out well) If the process sees the unique data and a timestamp sometime within the last minute it should ignore the subsequent attempt. 4. A reply is returned to the user based on the first click. The data returned to the user would be different for each click, that is why this is so important. The first data returned is the correct data. My confusion is in this (as I have mentioned in the past couple of weeks, most of the confusion is as a result of a lack of rest, which leads to not thinking clearly, which leads to me feeling ignorant); upon the second click, where I check to see if the data has been entered and find that it has how do I get it to return the data back to the user. I think I see it now..let's see.if I; Select * from foo where data is what it is and time is within last interval that I decide upon; if(1 == mysql_num_rows(that query up there)){ get that data for return to the user; } else { Insert data, do calcs, return data back to user; } Does that look reasonable, or am I missing something? Thanks for any insight! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I am receiving multiple same emails!!!
Karl James wrote: Team, I unsubscribe and subscribe later on. I am still receiving multiple emails from the same user. From this mailing list or from a particular subscriber? -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unicode
tedd wrote: At 7:08 PM -0700 6/4/06, Rasmus Lerdorf wrote: Larry Garfield wrote: In C or C++, yes. In PHP, do not assume the same string-number mapping. Numeric definition is irrelevant. Right, and now bring Unicode into the picture and this becomes even more true. -Rasmus I know there's always RTFM, but if you would care to discuss it, I would like to know why. How does php handle Unicode code-points and char-sets? Thanks. tedd From what little I understand (and I could be wrong - been a while)- it doesn't. PHP 6 works in bytes unless you have the mb extension going and then it fakes it. it doesn't look for code points or charsets. -- life is a game... so have fun. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I am receiving multiple same emails!!!
Karl James wrote: Chris, I am not sure. How do I find out? I am looking in the header and I see this. - From: [EMAIL PROTECTED] To Karl James CC [EMAIL PROTECTED] Subject Re:[PHP] I am receiving multiple same emails. - Firstly always cc the list. You're receiving the email once from me and once from the mailing list by the sounds of it. Email list-help: mailto:[EMAIL PROTECTED] and there should be an option to turn that off. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Functions
On 6/30/06, Richard Lynch [EMAIL PROTECTED] wrote: #2. Don't alter the case of the input data, if at all possible. Accept what the user has given, and take it as it is. You can make your application not care about case, and you can format the case on ouput (maybe even with fancy CSS stuff) but don't mess with their input. Why not clean up crappy input right at the source, Richard? Gerry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem Creating a New SSL Cert in Apache2
Mike wrote: Windows Server Apache2 OpenSSL I am new to working with SSL Certs so I am sure I did something wrong somewhere. Where I have no idea! We needed an SSL Cert for our website. I created the CSR using openssl req -new -out uwm.csr answered all of the questions, went to GoDaddy and did a copy and paste into their text area, and created a certificate. I took the output of the certificate key, created a notepad file, copied the text into the file, and named it uwm.crt. I restarted apache and it would not start. Using the expired cert, apache worked. Check the apache error logs, it should contain information about what's wrong. It could be as simple as different permissions on the different certificate files. TBH though you're better off jumping on an apache list and asking there, they will be able to help you a lot more. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Compiling and iconv
Ray Hauge wrote: I use Slackware linux, and XMLRPC is not compiled in by default with my distro, so I'm compiling PHP myself. It's always been a simple enough task. First I get and install the required xmlrpc-epi libraries, and then I compile PHP telling it where I just installed them. Now I get this error message: undefined reference to `libiconv' when compiling PHP. I did some searching, and the only thing I've found in reference to this error was a bug in version 4.3.10. Has anyone run into this issue, or have some suggestions? I have checked that /usr/include/iconv.h is there, and it defines all the iconv_* and iconv compiler flags etc. I can also vouch that using iconv on the command line works just fine. Try explicitly telling php where iconv is by adding this option to your configure command: --with-iconv-dir=/usr -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: non-text data
Gd, BTW, came into this late, have we gotten the old store your images in the filesystem and save the file name in the database argument yet? -Original Message- From: Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem [mailto:[EMAIL PROTECTED] Sent: Sunday, August 13, 2006 10:21 PM To: Chris Cc: mysql@lists.mysql.com Subject: Re: non-text data On Mon, Aug 14, 2006 at 10:42:50AM +1000, Chris wrote: Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem wrote: I use SELECT all from * ... and one row is a gif. How do I get that gif to appear as a gif and not text? In your connecting programming language. Mysql doesn't know or care whether it's a gif, pdf, word doc or anything else. Whatever programming language you are using to connect to mysql and fetch the data will be able to convert that binary data and display an image. PHP? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: non-text data
John Meyer wrote: Gd, BTW, came into this late, have we gotten the old store your images in the filesystem and save the file name in the database argument yet? Nope, haven't done that one yet, do you want to start it off or shall I? ;) -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: non-text data
Depends on how pugnacious I'm feeling, awscrewit, you go for it. -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Sunday, August 13, 2006 10:41 PM To: John Meyer Cc: 'Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem'; '[php] PHP General List' Subject: Re: [PHP] RE: non-text data John Meyer wrote: Gd, BTW, came into this late, have we gotten the old store your images in the filesystem and save the file name in the database argument yet? Nope, haven't done that one yet, do you want to start it off or shall I? ;) -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php