[PHP] ldap_search filter filter?

2010-07-16 Thread Richard Lynch
Any Best Practice suggestions for potentially hostile user input being sent to ldap_search($ldap, (username=$_POST[username])); Something like an ldap_escape? Please cc me on replies. Thanks. -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself:

[PHP] mysql_real_escape_string(0xffffffff) yields -1

2010-01-15 Thread Richard Lynch
The subject line says it all: mysql_real_escape_string(0x) yields -1 What's up with that? Is there some way to convince mysql_real_escape_string to use BIGINT? I guess I'll just PCRE for digits and then pass it in and... But what if somebody passes in some BC Math number?... -- Some

[PHP] imagerotate bug?

2009-12-25 Thread Richard Lynch
Can anybody email me off-list to comment on whether the bug demonstrated here for imagerotate is fixed in current PHP? http://6112northwolcott.com/dogfight/rotate.htm All the backgrounds should be white, not black. I can't easily test on a newer version of PHP at the moment. -- Some people

[PHP] mysql_real_escape_string paranoid enough?

2009-03-20 Thread Richard Lynch
I typically do something like this: $data_sql = mysql_real_escape_string($data, $connection); $query = insert into data(data) values('$data_sql'); $insert = mysql_query($query, $connection); if (!$insert){ trigger_error(mysql_error($connection), E_USER_ERROR); } My custom error handler logs

[PHP] stdin, stdout, stderr, 3

2009-03-08 Thread Richard Lynch
I have a program sending/receiving data to/from my CLI script using: 0 stdin 1 stdout 2 stderr 3 ?? 0, 1, and 2 are trivial. How do I access 3? I tried /dev/fd/3 and failed to open it... Got no error messages about why it failed to open, it just failed. Am I missing something? -- Some

[PHP] Audio stream piping minimal overhead

2009-03-07 Thread Richard Lynch
I'm interfacing PHP with an Asterisk server, and would like to pipe audio into PHP, through sox, and back out, in real-time, thus with *minimal* overhead in PHP. Any suggestions on what would be the best architecture? -- Some people ask for gifts here. I just want you to buy an Indie CD for

[PHP] Seeking PHP Work in Chicago or Telecommute

2009-02-07 Thread Richard Lynch
I figure if job postings are okay, then so are job requests, right? :-) I'm looking for PHP work in Chicago or telecommuting. My resume is here: http://l-i-e.com/resume.htm -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch

Re: [PHP] New PHP User with a simple question

2009-01-25 Thread Richard Lynch
You may or may not find this worth reading: http://richardlynch.blogspot.com/2007/07/php-in-html.html Bottom line is that what you are trying to do can't be done in PHP. You'll have to resort to Javascript and DIV tags with display: none; switching to display: block; -- Some people ask for

Re: [PHP] Captha Image Matching the Session Value.

2009-01-25 Thread Richard Lynch
Configure your browser to prompt you for cookies. That will make sure you are doing the session bit the way you think you are. Then add some error_log statements when you set or read the secret word. You'll soon figure out exactly how/why your session has the OLD secret word in it. -- Some

Re: [PHP] best practice wrt multi-lingual websites, gettext() etc.

2009-01-25 Thread Richard Lynch
I can't help with the bits you are asking about, but I can give this advice: Don't rely solely on the Apache/browser content-negotiation, please. This one time... I was in Paris. I was at an Internet Cafe. I couldn't change browser settings. Some sites that I knew were available in English

Re: [PHP] Multiple queries in PHP

2009-01-25 Thread Richard Lynch
PHP/MySQL and the various functionality such as @var are all per-connection expressly so that you CAN do this type of stuff. I'd be pretty shocked if you had any problems. -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch

[PHP] PEAR ExcelWriter corrupt / Bug Report CAPTCHA borked

2008-11-28 Thread Richard Lynch
The PEAR tarball for ExcelWriter is corrupt for 0.9.1, 0.9.0 and 0.8.0 The PEAR bug-reporting system CAPTHCA won't accept the correct answers. In desparation, I'm reporting this here, hoping somebody from PEAR reads this and can do something... $ tar -xvf Spreadsheet_Excel_Writer-0.9.1.tar

RE: [PHP] How to submit form via PHP

2008-09-30 Thread Richard Lynch
Yes, any GET parameters you had will not be added in. I believe a fragment (#anchor) will be included however. Read the specs for base to see for sure. It's all spelled out, if you can follow the paper trail and have enough time to read it :-) -Original Message- From: Waynn Lue

RE: [PHP] How to submit form via PHP

2008-09-29 Thread Richard Lynch
-Original Message- No it doesn't... without an action statement... Sorry to drag up an old thread, but I just saw this. Is that true of all browsers? I'm wondering because I just coded a site to use this behavior, then I saw that the html specification says the action attribute is

RE: [PHP] error warning while connecting to posgreSQL

2008-09-29 Thread Richard Lynch
-Original Message- i try to understand the error_reporting statement and to avoid all warning or error messages. for example i stop the postgresql service and i try to connect to it. when error_reporting is set to E_ALL, i get the following warning : *Warning*: pg_connect()

RE: [PHP] How to submit form via PHP

2008-09-29 Thread Richard Lynch
Actually, I believe action= submitting to the same URL is *documented* HTTP spec behavior. I welcome correction/confirmation if somebody wants to wade through the docs again... -Original Message- From: Dotan Cohen [mailto:[EMAIL PROTECTED] Sent: Sunday, September 28, 2008 4:13 AM

RE: [PHP] PHP + Cron jobs

2008-09-29 Thread Richard Lynch
If you are running PHP as CGI, replacing the CGI with CLI could be problematic down the road... From: Waynn Lue [mailto:[EMAIL PROTECTED] Sent: Sunday, September 28, 2008 6:12 AM To: Richard Lynch Cc: Per Jessen; php-general@lists.php.net Subject: Re: [PHP] PHP + Cron jobs Yup, you're

RE: [PHP] can't get output of exec ('nice -n 19 ffmpeg -i file')

2008-09-29 Thread Richard Lynch
I think nice may play games with fork etc and may be confusing php. Try putting the nice -n 19 ffmpeg -I bit into a mini shell script of its own, and call that. -Original Message- From: Rene Veerman [mailto:[EMAIL PROTECTED] Sent: Monday, September 29, 2008 1:54 PM To:

RE: [PHP] How to submit form via PHP

2008-09-29 Thread Richard Lynch
2008 11:33:41 -0500, Richard Lynch wrote: Actually, I believe action= submitting to the same URL is *documented* HTTP spec behavior. I welcome correction/confirmation if somebody wants to wade through the docs again... HTML 4.01 says: action = uri [CT] This attribute specifies

RE: [PHP] event feeder

2008-09-27 Thread Richard Lynch
i would like to display on my web application, the latest 3 events added to my web DB. something like latest 3 event which happen to company. what is the best way knowing that each event is translated in several languages and stored into DB ? should i

RE: [PHP] Prevent execution bad commands

2008-09-27 Thread Richard Lynch
I am developing a web page where i have to display the files list based on some search criteria and of certain duration. My web server is on linux operating system. The command i am using for this peropse is: find /home/test -mtime -$duration | sort |

RE: [PHP] PHP + Cron jobs

2008-09-27 Thread Richard Lynch
You are using the old school PHP CGI as if it were PHP CLI. Upgrade and use PHP CLI. Or just add -q to the args: 12 6 * * * php -q /home/foo/temp.php php -h will show you the version and nature (CLI/CGI) of PHP you are running, as well as the args and what they do, in rather terse format.

RE: [PHP] PHP + Cron jobs

2008-09-27 Thread Richard Lynch
From: Waynn Lue [EMAIL PROTECTED] Sent: Saturday, September 27, 2008 6:04 AM To: Per Jessen Cc: php-general@lists.php.net Subject: Re: [PHP] PHP + Cron jobs This is something that I've noticed for awhile, but last post to this mailing list reminded me

RE: [PHP] PHP + Cron jobs

2008-09-27 Thread Richard Lynch
___ O/H Waynn Lue ??: Perhaps this would do the job much better. 12 6 * * * php -f /home/foo/temp.php Probably no different, unless the new-fangled -f implies -q, and he's running the new version of PHP, which I doubt. Also consider an alternative

RE: [PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-27 Thread Richard Lynch
memory_limit and time_limit are implemented down in the guts of the PHP interpreter; They are not magic. They can't do diddly when PHP is running some other binary... From: Thodoris [EMAIL PROTECTED] Sent: Saturday, September 27, 2008 8:24 AM To: [EMAIL

RE: [PHP] Regular Expression Backreference in subpattern.

2008-09-27 Thread Richard Lynch
Not sure what you think the (?P is doing, but it looks very suspicious to me... I'm no PCRE expert though... Try this: '|td\\s*charge\\s*/td\\s*td\\s*([0-9]*)\\s*/td|' \\s allows for whitespace If you only want ones that HAVE to have numbers, and no blanks, change * after the 0-9] bit into +

RE: [PHP] Filters and sanitizing a regexp

2008-09-26 Thread Richard Lynch
-Original Message- hate to say this but why not cater for all eventualities and just use strtotime( $whatever ); Well it just doesn't have enough geek factor... Plus, strtotime() does non-intuitive things with some inputs... I'd insist on at least some kind of confirmation page if

RE: [PHP] Passing Variables to an iframe

2008-09-26 Thread Richard Lynch
Anybody can see it and change it. All user input, which always includes GET/POST/COOKIE data is always untrustworthy. -Original Message- From: Waynn Lue [mailto:[EMAIL PROTECTED] Sent: Friday, September 26, 2008 6:17 AM To: PHP General list Subject: [PHP] Passing Variables to an

RE: [PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-25 Thread Richard Lynch
-Original Message- Is there a way to limit the memory consumption and / or the CPU consumption of processes launched by the php functions system, exec, passthru, proc_open and shell_exec? I suspect... PHP pretty much releases control to the shell or whatever, and just waits around

RE: [PHP] Math problems (No not high school math!)

2008-09-25 Thread Richard Lynch
Run another query and let MySQL add it up. -Original Message- From: Jason Pruim [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2008 10:05 AM To: PHP General List Subject: [PHP] Math problems (No not high school math!) So I'm trying to figure out how to do a little math in

RE: [PHP] Re: class const versus define

2008-09-24 Thread Richard Lynch
Richard Lynch schrieb: Is there any reason why the logic behind define() couldn't be pushed down to class const? Code like this is kinda fugly: //It's okay here, but not in a class? define('CACHE_DIR_LONG', CONFIG_ROOT_PATH . '/cache/'); class Cache { const CACHE_DIR = '/dev

RE: [PHP] Re: Browser could not get mp3 files from http site

2008-09-24 Thread Richard Lynch
On Wed, Sep 24, 2008 at 9:56 AM, Richard Lynch [EMAIL PROTECTED] wrote: As a general rule, check what happens when you do wget -S on the URL and see what the browser sees. Thanks Richard and all responses. That was the best PHP and HTML debug I've learned so far. I always find

RE: [PHP] How to detect the host (window or Linux)?

2008-09-24 Thread Richard Lynch
Thanks Thodoris and Anderson. Sorry for not clear about the question. I mean to detect the OS in Host system where the browser is located, not the SERVER OS. It's really none of your business what OS I'm running :-v You may be able to make an educated guess from the HTTP headers in $_SERVER.

RE: [PHP] spreadsheets are opened read only

2008-09-24 Thread Richard Lynch
Hi guys. I am having a problem with opening xls files from a link generated from php script. Let me analyze this: I have two linux servers with apache (php,mysql etc) that are running the same project. There is a part in this project that reads all the files from a directory and generates

RE: [PHP] Re: class const versus define

2008-09-24 Thread Richard Lynch
24, 2008 11:14 AM To: Richard Lynch Cc: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Re: class const versus define On Wed, Sep 24, 2008 at 7:35 AM, Richard Lynch [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] wrote: I need the PATH to differ in development, staging, and production

RE: [PHP] calling functions from one or multiple files

2008-09-24 Thread Richard Lynch
-Original Message- Right now I use one file, usually called functions.php, with all functions I'm going to use most likely on every page. Then, I create each function I'm going to use once in a while as separate file. Pro: I would include a function when I'm going to use. Con: I

RE: [PHP] Don't understand what is this $arr['N']['#']

2008-09-24 Thread Richard Lynch
-Original Message- I am working on the code of a former employee and I don't understand what this $arr['N']['#'] refers to. I know it is a multidimensional associative array but the # i don't what this means. '#' is just a string value. It has no special meaning whatsoever.

RE: [PHP] Problem with install lybrary GD

2008-09-24 Thread Richard Lynch
Did you change php.ini to load in the php_gd.so file? Is this in Apache, and did you restart apache, which only reads php.ini on startup? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2008 3:35 PM To: php-general@lists.php.net

RE: [PHP] Re: Browser could not get mp3 files from http site

2008-09-23 Thread Richard Lynch
when the file isn't in a streaming server you have buffering to contend with; odds are it won't play the file till it's completely downloaded [regardless of autoplay/autostart] I am not sure if it is a buffering problem or not. I am baffled as I can play from opening a file

RE: [PHP] Using Static Class Variables to Access Globally

2008-09-23 Thread Richard Lynch
-Original Message- From: Ryan Panning [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 8:03 PM To: php-general@lists.php.net Subject: [PHP] Using Static Class Variables to Access Globally The typical way to access a variable or instance from inside a function/method is

[PHP] class const versus define

2008-09-23 Thread Richard Lynch
says Don't Bother... -- Richard Lynch ___ The information in this email or in any file attached hereto is intended only for the personal and confiden- tial use of the individual or entity to which it is addressed and may contain information

Re: [PHP] PHP Script/Thread ID thingie

2008-08-15 Thread Richard Lynch
On Fri, August 15, 2008 10:52 am, Stut wrote: On 15 Aug 2008, at 16:37, [EMAIL PROTECTED] wrote: I'm logging things with error_log, and would like to be able to sort out one script run from another. So I'm looking for some kind of script id or thread id or PHP script run execution ID type of

Re: [PHP] Kill Magic Quotes

2008-08-07 Thread Richard Lynch
If you can't change php.ini, and if it's Apache, you maybe can just turn it off in .htaccess, far faster and easier than a PHP function. You are calling the removeSlashes, right? And, really, there is no reason for the restoreSlashes function to exist. If you ever think you need it, you're

Re: [PHP] Re: Windows date(Y/m/d H:i:s) performance

2008-07-31 Thread Richard Lynch
PHP 5.2.6 with Xdebug 2.0.3 here... Aha! Turning off Xdebug fixes it... Weird. Or maybe normal for Xdebug? I'll take this up with Derick and co on Xdebug list next, if anybody wants to follow... On Wed, July 30, 2008 11:36 am, Andrew Ballard wrote: On Wed, Jul 30, 2008 at 12:19 PM, Richard

[PHP] Windows date(Y/m/d H:i:s) performance

2008-07-30 Thread Richard Lynch
I was profiling some code on my local dev box, and in Windows, the biggest time sink for the home page is... a call to date(Y/m/d H:i:s)?! 917 ms??? Here is what I get in a cygwin shell: php -r '$c = 100; $s = microtime(true); for($i = 0; $i $c; $i++){ $d = date(Y/m/d H:i:s); } echo

[PHP] Re: Windows date(Y/m/d H:i:s) performance

2008-07-30 Thread Richard Lynch
I suppose to be complete, I should point out that in Linux a call to date finishes in 1.2271404266357E-5 seconds on average. For those unfamiliar with scientific notation, that would be: 0.12271404266357 seconds, or rougly 1/10,000th of the time Doze takes. -- Some people ask for gifts

Re: [PHP] SOAP and nested input

2008-04-28 Thread Richard Lynch
On Mon, April 28, 2008 4:52 am, Emil Edeholt wrote: If I need to pass nested input to a SOAP function; For example a function that requires these parameters: foobar/foo foonest barnestfoobar/barnest /foonest Should I simply nest two arrays to the php soap function, i.e:

Re: [PHP] OS need anything for mail() to work?

2008-04-28 Thread Richard Lynch
On Fri, April 25, 2008 3:44 pm, Brian Dunning wrote: Is there any way for PHP to know that this email is not going through? You could, perhaps, hack your MTA to notify something somewhere that PHP can check... But it's really out of PHP's hands at this point. If you put a letter in a mailbox,

Re: [PHP] Making an array from delimited data

2008-04-28 Thread Richard Lynch
On Mon, April 28, 2008 2:44 pm, Joe Harman wrote: I have some data that I pull from a database that is in the following format: - Gauge Style: Auto Meter Pro-Comp Tachometer Usage: Standard Gauge Series: Analog Gauge Range:

Re: [PHP] SMS Cellular Text Messaging

2008-04-28 Thread Richard Lynch
On Mon, April 28, 2008 2:39 pm, Al wrote: I didn't word my question well. I know about the following, etc. And, I know they charge their customers. Cingular: [EMAIL PROTECTED] Sprint: [EMAIL PROTECTED] Verizon: [EMAIL PROTECTED] Nextel: [EMAIL PROTECTED] If you send more than a few

Re: [PHP] OS need anything for mail() to work?

2008-04-28 Thread Richard Lynch
On Mon, April 28, 2008 3:09 pm, Jason Pruim wrote: On Apr 28, 2008, at 3:47 PM, Richard Lynch wrote: On Fri, April 25, 2008 3:44 pm, Brian Dunning wrote: Is there any way for PHP to know that this email is not going through? You could, perhaps, hack your MTA to notify something somewhere

[PHP] PHP_OUTPUT_HANDLER_START et al

2008-04-16 Thread Richard Lynch
Can anybody tell me what is the purpose of PHP_OUTPUT_HANDLER_START (et al) so I can add a Note to the manual? They aren't really explained anywhere I can find, and the source... Well, it seems to be just |= PHP_OUTPUT_HANDLER_START when the first handler starts and then I kinda get lost as to

Re: [PHP] Reporting mail as spam

2008-04-01 Thread Richard Lynch
On Mon, March 31, 2008 11:01 am, Sándor Tamás (HostWare Kft.) wrote: I wrote a little registration routine, which will send a confirmation letter to the user with a random number in the message body (my site is on a host, so I can't write in the subject, and ask the user to reply), which can

Re: [PHP] auto generated PDF

2008-04-01 Thread Richard Lynch
On Sun, March 30, 2008 4:27 am, Alain Roger wrote: i want to implement on my web portal electronic invoicing system. basically data will be stored into PostgreSQL DB. I would like to know if someone already have experiences with such feature or where could i find some tutorials or help about

Re: [PHP] PHP 5 file_get_contents() problems

2008-04-01 Thread Richard Lynch
On Sun, March 30, 2008 5:03 pm, php wrote: Thanks Greg...I am aware of the allow_url_fopen/allow_url_include relationship. Your suggestion to look into curl was implemented and there still seems to be something else afoot. I created a simple set of curl functions which just printed a

Re: [PHP] restricting filesystem access

2008-04-01 Thread Richard Lynch
On Mon, March 31, 2008 3:21 am, Hamar Gábor wrote: I am a new php user and I have a question, for which I couldn't find any answer. I'd like to restrict php code to access the filesystem. I'd like to have only one directory where the php code can write, create or read files, and an other

Re: [PHP] extract escaped quoted strings

2008-04-01 Thread Richard Lynch
Extract them from what? Without more context, we can't really help... So far a GREEDY pcre with quote on each end fits all the inputs. And *WHY* do you have so many backslashes? Whatever is causing that (MagicQuotes, cough, cough) is your REAL problem. Fix the problem, not the symptom. On

Re: [PHP] Date Issue

2008-04-01 Thread Richard Lynch
I generally use 1 hour after midnight with mktime() to avoid the edge cases of daylight savings etc... mktime(1, 0, 0, date('m') - 1, date('d'), date('Y')); You also have to consider that you *COULD* call this right on the cusp of midnight, and the call to date('d') could happen one day, and the

Re: [PHP] LDAP in php

2008-04-01 Thread Richard Lynch
On Sun, March 30, 2008 8:15 pm, [EMAIL PROTECTED] wrote: As LDAP can have SQL back-end (I saw an example with PostgreSQL) - is it a very wild idea to implement (a simple) LDAP server in php? We have all the address data already in PostgreSQL and a php application managing all of it. I am

Re: [PHP] new lines in textareas?

2008-04-01 Thread Richard Lynch
On Sat, March 29, 2008 11:26 pm, Mary Anderson wrote: I have a php script which produces text which is to be displayed in a textarea. I have the wrap for the text area set to 'hard'. I need Do NOT set the wrap to hard It will only cause you grief in the long run. It's going to insert

Re: [PHP] Date Issue

2008-04-01 Thread Richard Lynch
If you want the DAY before, you can use the -1 for the day, and get what you want. mktime() will wrap the month as needed. But, yeah, if you try to hit a MONTH before by putting in a month before AND the day, it will slingshot back and forth to get what you don't want. If you want the MONTH

Re: [PHP] new lines in textareas?

2008-04-01 Thread Richard Lynch
On Sun, March 30, 2008 7:20 am, jeffry s wrote: my client ask me about this problem 2 weeks ago. he want the text to automatically go to new line after user type until the end of the line. The only possible solutions so far is using wrap='hard' or wrap='soft' eg: textarea cols=10 rows=10

Re: [PHP] April Fools Easter Egg

2008-04-01 Thread Richard Lynch
On Tue, April 1, 2008 9:38 am, Christoph Boget wrote: You got me. Wobbly PHP logo on mine (PHP-5.2.5 debian) That's all I see for PHP-5.2.1. Should there be something more? Probably not, but check the source. :-) I like the bunny of version 4 better, personally... -- Some people have

Re: [PHP] April Fools Easter Egg

2008-04-01 Thread Richard Lynch
On Tue, April 1, 2008 9:39 am, tedd wrote: At 4:33 PM +0200 4/1/08, Paul Scott wrote: On Tue, 2008-04-01 at 10:28 -0400, tedd wrote: You got me. Wobbly PHP logo on mine (PHP-5.2.5 debian) --Paul Ahhh, now I see it. The one I was checking was 4 something. And apparently, I can't tell

Re: [PHP] Date Issue

2008-03-31 Thread Richard Lynch
You need apostrophes (or quotes) around your args to date() in the parameters... date('m') As it stands now, PHP assumes you mean the constant m (http://php.net/define) and that's not defined, so they are all 0. So you are passing in 0 to ALL the args. You also should use E_ALL for your

Re: [PHP] loosing session in new window (IE only)

2008-03-26 Thread Richard Lynch
On Tue, March 25, 2008 4:07 pm, Lamp Lists wrote: - Original Message From: Andrew Ballard [EMAIL PROTECTED] To: PHP General list php-general@lists.php.net Sent: Tuesday, March 25, 2008 3:41:35 PM Subject: Re: [PHP] loosing session in new window (IE only) On Tue, Mar 25, 2008 at

Re: [PHP] session var not changed if file not found error

2008-03-26 Thread Richard Lynch
On Tue, March 25, 2008 8:29 pm, Eric Wood wrote: This has baffled me all day on my FC6 php-5.1.6 based server. On a normal working page, I set a session variable at the top and another session variable in the middle of the page/script. This page has no errors nor missing links. So

Re: [PHP] Cookie Trouble: getting the information back out...

2008-03-26 Thread Richard Lynch
On Tue, March 25, 2008 8:11 pm, Mark Weaver wrote: I suspect I already know part of the answer to this, but I'm not sure which way to go with it. I've got a project I'm working on and one of the things it's got to do is set cookies and then read them later. When the app was first written I

Re: [PHP] optimilize web page loading

2008-03-26 Thread Richard Lynch
You can use onload and XmlHttpRequest to send back the desktop client computer date/time and compare that with your start time. Note that you'll need to test on [a] computer[s] where you know the date/time is set correctly, which is not true of the general visitor. On Wed, March 26, 2008 3:25

Re: [PHP] Date math

2008-03-26 Thread Richard Lynch
On Sun, March 23, 2008 11:17 pm, Ron Piggott wrote: I have this math equation this list helped me generate a few weeks ago. The purpose is to calculate how many days have passed between 2 dates. Right now my output ($difference) is 93.958333 days. I am finding this a little weird. Does

Re: [PHP] Quick email address check

2008-03-26 Thread Richard Lynch
On Wed, March 26, 2008 12:28 pm, Al wrote: Is there a better way than simply sending a test email to see if it bounces? Yes. Force the user to click on a link to prove that they actually CHECK that email address. Just because it doesn't bounce doesn't mean it's a valid email address. --

Re: [PHP] date CDT CST UTC

2008-03-26 Thread Richard Lynch
On Wed, March 26, 2008 12:50 pm, Dee Ayy wrote: Today, we are in Central Daylight Time CDT in Dallas, Texas, USA -- yes? date on: mail server: Wed Mar 26 11:45:00 CDT 2008 (CORRECT) web server: Wed Mar 26 11:45:00 CST 2008 Note CDT versus CST. date -u mail server: Wed Mar 26 16:45:00 UTC

Re: [PHP] Transferring files between computers using php

2008-03-07 Thread Richard Lynch
On Thu, March 6, 2008 7:58 pm, Rahul wrote: I have a small file to be transferred between two computers every few seconds. Use rsync -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? --

Re: [PHP] Re: Transferring files between computers using php

2008-03-07 Thread Richard Lynch
On Thu, March 6, 2008 11:10 pm, Chris wrote: If ssh keys are installed on the remote hosts then scp works transparently and you just stick the scp in a cron job. Am I missing something? Yeh - looks like you have to log in to A and then it uses key-forwarding to let you log in to B and

Re: [PHP] How to measure memory leakage/usage in PHP?

2008-03-07 Thread Richard Lynch
On Wed, March 5, 2008 9:57 pm, Zareef Ahmed wrote: I am looking into the concepts behind memory management in PHP. Which kind of approach will be best to measure memory leakage or usage in a PHP script? I can measure my apache process but is there any way by which I can know which

Re: [PHP] Universaly Accepted Naming Conventions..?

2008-03-07 Thread Richard Lynch
On Wed, March 5, 2008 1:06 pm, John Papas wrote Are there any in PHP? It seems like there are those that draw upon the C/unix naming conventions and those that follow the Java/OO style. There are several popular standards out there. The PEAR coding standard and the Zend one tend to get

Re: [PHP] Pear Installation Problem - Ubuntu

2008-03-07 Thread Richard Lynch
SPM decided to move stuff to a different place, namely inside of a /usr/share/php/PEAR directory, instead of just /usr/share/PEAR. So change your include path and be done with it. On Wed, March 5, 2008 11:59 am, Stephen wrote: My LAMP is on Ubuntu 7.10 I am trying to use PEAR, for the first

Re: [PHP] Preserving URL after redirect?

2008-03-07 Thread Richard Lynch
On Wed, March 5, 2008 11:18 am, Skip Evans wrote: shortname, in this case madison, and then sets a session variables for school ID that allows the user to access this school's data. Then it redirects back to http://prepcube.com/ Don't redirect to this. Your session data has wi/madison

Re: [PHP] Re: Preserving URL after redirect?

2008-03-07 Thread Richard Lynch
On Thu, March 6, 2008 6:42 am, Jochem Maas wrote: big boys use mod_rewrite, go grab a kilt :-) If mod_rewrite gives you the willies... You don't really NEED it here... Just don't create /wi/* directories, and use $_SERVER['PATH_INFO'] instead. Store all the school data somewhere else, and let

Re: [PHP] imagerotate

2008-03-07 Thread Richard Lynch
On Wed, March 5, 2008 11:17 am, Zeshan Uddin wrote: * Code for rotate.php ?php // File and rotation $filename = 'image.png'; $degrees = 18; // Content type header('Content-type: image/png'); // Load $source = imagecreatefrompng($filename); // Rotate $rotate

Re: [PHP] Array questions...

2008-03-07 Thread Richard Lynch
On Wed, March 5, 2008 9:35 am, Robert Cummings wrote: No textbook, but here's some advice... Think of a variable like a house address for an actual house. 123 Maple Street An array is just an apartment building: 125 Maple Street, Unit 1 125 Maple Street, Unit 2 125 Maple Street, Unit 3 . . .

Re: [PHP] Re: Variable post as array

2008-03-07 Thread Richard Lynch
Are you really using temp_name when you want tmp_name? On Wed, March 5, 2008 4:37 am, Pieter du Toit wrote: Just to add, if i try to echo the $_FILES['txtPhoto']['temp_name'] it tells me that temp_name is also an array, but when i echo $_FILES['txtPhoto']['name'] it gives me the correct name.

Re: [PHP] Logging session timeout in DB

2008-03-07 Thread Richard Lynch
On Wed, March 5, 2008 2:08 am, Angelo Zanetti wrote: I am implementing a system where when a user is logged in and out that a date time is set in a database for each action for each used. We can then trace who logged in a and when. No what I would like to know is how can I record when a

Re: [PHP] validating mysql bound date

2008-03-07 Thread Richard Lynch
Something like this, perhaps: preg_match('/^((19|20)[0-9]{2})-([0-1]?[0-9])-([0-3]?[0-9])$/', $input, $date_parts); var_dump($date_parts); This doesn't completely rule out bogus dates such as 2008-02-30 however. I think MySQL would just convert that to MAR 1, 2008 anyway... But if you want

Re: [PHP] regular expressions question

2008-03-07 Thread Richard Lynch
it. I tried the code you posted, for now it is blocking blank fields. Thank you - Original Message From: Richard Lynch [EMAIL PROTECTED] To: Adil Drissi [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, March 4, 2008 3:09:09 PM Subject: Re: [PHP] regular expressions

Re: [PHP] Hot job opportunity - Sr. Software Developer/Architect

2008-03-07 Thread Richard Lynch
On Thu, February 28, 2008 10:39 am, Nick Gasparro wrote: I have an immediate need for a Sr. Developer/Architect; with one of Denver's Best employers. They are a Web 2.0 company, rapidly growing and very profitable. They will pay top compensation and provide relocation assistance for the

RE: [PHP] CVS Scripts

2008-03-06 Thread Richard Lynch
On Thu, March 6, 2008 10:02 am, Wolf wrote: I am using Zend Studio Server and I haven't upgraded to Zend Studio for Eclipse as yet. It also has some CVS capability not its not what I am after. Google was my first stop but it didn't turn up anything which appeared to be in a stable enough

Re: [PHP] imap_setflags_full Seen

2008-03-04 Thread Richard Lynch
On Tue, March 4, 2008 4:26 am, Jochem Maas wrote: Richard Lynch schreef: I am trying to use this: imap_setflag_full($imap, $uid, Seen, FT_UID) or die(Unable to mark message as \\Seen); 3 things: 1. shouldn't it be ST_UID iso FT_UID? Yes, it should... Fixed that, but no better

Re: [PHP] imap_setflags_full Seen

2008-03-04 Thread Richard Lynch
On Tue, March 4, 2008 11:15 am, Jochem Maas wrote: Richard Lynch schreef: On Tue, March 4, 2008 4:26 am, Jochem Maas wrote: Richard Lynch schreef: I am trying to use this: imap_setflag_full($imap, $uid, Seen, FT_UID) or die(Unable to mark message as \\Seen); 2. the imap bos

Re: [PHP] GPS Locator

2008-03-04 Thread Richard Lynch
Almost for sure, browser security will not let you do this in a web browser. You'll probably have to write a custom desktop C application, or get the user to install some kind of glue widget... PEAR|PECL *might* have some USB stuff in a library you could use to write the PHP desktop widget and

Re: [PHP] imap_setflags_full Seen

2008-03-04 Thread Richard Lynch
On Tue, March 4, 2008 11:39 am, Richard Lynch wrote: On Tue, March 4, 2008 11:15 am, Jochem Maas wrote: Richard Lynch schreef: On Tue, March 4, 2008 4:26 am, Jochem Maas wrote: Richard Lynch schreef: I am trying to use this: imap_setflag_full($imap, $uid, Seen, FT_UID) or die(Unable

Re: [PHP] imap_setflags_full Seen [SOLVED]

2008-03-04 Thread Richard Lynch
On Mon, March 3, 2008 7:04 pm, Richard Lynch wrote: I am trying to use this: imap_setflag_full($imap, $uid, Seen, FT_UID) or die(Unable to mark message as \\Seen); to mark a message as read Ah-ha!!! The docs specify for Flags that the values are: \\Seen \\Answered... But the actual

Re: [PHP] regular expressions question

2008-03-04 Thread Richard Lynch
On Tue, March 4, 2008 1:19 pm, Adil Drissi wrote: Is there any way to limit the user to a set of characters for example say i want my user to enter any character between a and z (case insensitive). And if the user enters just one letter not belonging to [a-z], this will not be accepted. I

Re: [PHP] maintaining [user] state without a session ...

2008-03-04 Thread Richard Lynch
On Tue, March 4, 2008 8:22 am, Bojan Tesanovic wrote: Hi, It depends what do you need to track, if you need to track small amount of variables you can do it by cookie I often use it eg here is the state for one user $state = array{ 'logedin'=true, 'n'='Peter', 'id'='5', //anything else

Re: [PHP] maintaining [user] state without a session ...

2008-03-04 Thread Richard Lynch
On Tue, March 4, 2008 10:22 am, Jason Pruim wrote: On Mar 4, 2008, at 11:11 AM, Daniel Brown wrote: On Tue, Mar 4, 2008 at 11:09 AM, Stut [EMAIL PROTECTED] wrote: On 4 Mar 2008, at 15:52, Daniel Brown wrote: On Tue, Mar 4, 2008 at 9:10 AM, Stut [EMAIL PROTECTED] wrote: I'm working on an

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Richard Lynch
On Tue, March 4, 2008 6:16 am, Svevo Romano wrote: Hello, I got this e-mail address from the ŒAdd note¹ page within the php.net website. I was going to post something that was a question and I realised I was in the wrong place :) I have 2 basic questions and I¹m sorry if they may seem too

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Richard Lynch
On Tue, March 4, 2008 10:12 am, Svevo Romano wrote: Still, I jusy wonder how Jochem knew that the line is only executed the first time a function is called while this info is not available on the online manual. It's maybe all about how close you are to the community and how many degrees are

Re: [PHP] Fatal error: Call to a member function web_order_change() on a non-object

2008-03-04 Thread Richard Lynch
register_globals got turned off. All your $_SESSION variables (in your case, $_SESSION['SESSION']) need to be reference explicitly now. Add this at the top: $SESSION = $_SESSION['SESSION']; right after session_start(); On Mon, March 3, 2008 5:48 pm, Chris wrote: Ben Edwards wrote: Our server

Re: [PHP] Crop part of existing pdf

2008-03-04 Thread Richard Lynch
On Mon, March 3, 2008 8:14 pm, gary liang wrote: Is there any command line tool, which is able to crop part of pdf file? I ask for command line tool, because it can be used in php code. Any hint? The commercial version of phpLib might do that. -- Some people have a gift link here. Know what

Re: [PHP] Making an interactive RGB color picker

2008-03-04 Thread Richard Lynch
for ($red = 0; $red 256; $red++){ for ($green = 0; $green 256; $green++){ for ($blue = 0; $blue 256; $blue++){ $output = EOC \$drawrect(\$get... EOC; } } } On Mon, March 3, 2008 2:13 pm, Keikonium wrote: This may not be exactly what you think, but I didn't know how else to

  1   2   3   4   5   6   7   8   9   10   >