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: >>

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 ke

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&q

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

[PHP] imap_setflags_full Seen

2008-03-03 Thread Richard Lynch
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" It does not seem to have any effect on the return values in imap_fetch_overview. Nor does it appear as "read" when I view it with my email client.

Re: [PHP] Making sure an include file works

2008-03-03 Thread Richard Lynch
On Thu, February 28, 2008 10:25 pm, Robert Cummings wrote: > Doh! Time for me to start trawling the PHP site again to acquaint > myself > with all the new functions :) I probably would have found it though if > searching the site's functions for syntax didn't take me directly to > the > documentati

Re: [PHP] Weird Zend IDE Issue

2008-03-03 Thread Richard Lynch
On Sun, March 2, 2008 11:07 pm, Steve Finkelstein wrote: > Hi all, > > I know this isn't a forum for Zend IDE, but since there's probably a > decent population here using it, I figured I'd ask away. > > I'm using 5.5.1 Professional on Mac OSX 10.5.2. My issue here is that > all left brackets, (eg:

Re: [PHP] Can PHP do this? -- w/o using event handler

2008-03-03 Thread Richard Lynch
On Mon, March 3, 2008 1:57 am, Louie Miranda wrote: > Could PHP do.. > > 1. Connect and send a parameter to a remote host > 2. Wait for the host to reply -- not using event handler > 3. Send XML data to the host You'll need about 3X as much code for proper error checking, but that's about it, re

Re: [PHP] php with modified version of sqlite

2008-03-03 Thread Richard Lynch
On Fri, February 29, 2008 2:58 pm, Jean-Christophe Roux wrote: > Hello, > > I am running php 5.1.6 on a Centos 5.0 box (installed with yum). My > php app uses pdo_sqlite. The issue is that I am going to have to use a > special version of sqlite with some custom functions. How do I control > which

Re: [PHP] Weird Results from Curl

2008-03-03 Thread Richard Lynch
On Fri, February 29, 2008 3:20 pm, Wolf wrote: > I'm curling a site to process some data, all well and good but the > results are baffling... > > $result = curl_exec($ch); > curl_close($ch); > echo "".gettype ($result); > > Of course that's not all the code, but the results contain: > - > 0

Re: [PHP] Importing and exporting from MySQL, escape slash problem

2008-03-02 Thread Richard Lynch
It's possible that there is an .htaccess file in phpMyAdmin that has Magic Quotes on that is messing you up... Other than that, it's specific to phpMyAdmin, so maybe ask those guys what they did... On Sat, March 1, 2008 7:38 pm, Dave M G wrote: > PHP List, MySQL List > > In my PHP environment, I

Re: [PHP] while

2008-02-23 Thread Richard Lynch
On Sat, February 23, 2008 10:16 am, Emiliano Boragina wrote: > > $buscar = $_REQUEST['buscar']; > > $base = "inscripcion"; > > $conexion = mysql_connect ( 'localhost' , 'root' , 'root' ); > > mysql_select_db ( $base , $conexion ); > > echo ""; > >

Re: [PHP] validate + if

2008-02-23 Thread Richard Lynch
If your "onClick" handler returns true (or is it false?) in JS, the action won't happen. Or something like that. Google for it. And you still need to validate server-side, as JS is easily bypassed. On Sat, February 23, 2008 1:01 pm, Emiliano Boragina wrote: > Hi list! > > > > I have a form. > >

Re: [PHP] unable to unset reference

2008-02-21 Thread Richard Lynch
On Wed, February 20, 2008 9:23 am, Sylvain R. wrote: > I would like to implement it in order to delete automaticly from > memory > useless objects. > It can be really useful for example to make schedulers in PHP in order > to > avoid "max memory usage exceeded" errors. If you really don't need it

Re: [PHP] System errno in PHP

2008-02-21 Thread Richard Lynch
On Wed, February 20, 2008 2:56 am, Michal Maras wrote: > I have read http://php.net/fopen from top to bottom, but I could not > find > how to get system error number. > With set_error_handler I can get string for example > > fopen(hmc_configuration.cfg) > [function.fopen

Re: [PHP] Php warning message

2008-02-21 Thread Richard Lynch
On Wed, February 20, 2008 3:29 pm, Yuval Schwartz wrote: > Hello and thank you, > > Another question, I get a message: > > *Warning*: feof(): supplied argument is not a valid stream resource in > * > /home/content/t/h/e/theyuv/html/MessageBoard.php* on line *52* > ** > And I've tried troubleshootin

Re: [PHP] fail on preg_match_all

2008-02-21 Thread Richard Lynch
On Wed, February 20, 2008 11:34 pm, Hamilton Turner wrote: > Does anyone know why a server would simply fail on this line? > > $num = preg_match_all($regex, $theData, $match, PREG_SET_ORDER); > > if i know the file handle is valid (i grabbed it using 'or die'), and > the regex is valid Define "fai

Re: [PHP] All Survey leading to PHP

2008-02-21 Thread Richard Lynch
On Thu, February 21, 2008 6:29 am, Allan Fernandes wrote: > 1) Is there any method to protect source code of my applications even > when > deployed at the clients Server. Have a good, clear contract and relationship with the client. You can also attempt to "encode" them with any number of PHP enc

Re: [PHP] APC & __autoload & webclusters

2008-02-21 Thread Richard Lynch
On Thu, February 21, 2008 9:27 am, Jochem Maas wrote: > 1. __autoload & APC > > I have been STW to try and find a definitive answer as to whether > using __autoload with APC > is a bad idea ... and if so why? ... I can't find that definitive > answer, can anyone here > state whether this it's an ab

Re: [PHP] Converting tab delimited file to CSV

2008-02-19 Thread Richard Lynch
On Mon, February 18, 2008 12:08 pm, Graham Cossey wrote: > proceed accordingly... My biggest gripe with tab delimited files is > that they are quite a bit bigger than comma delimited files so I may > have to split the large files I receive into smaller 'chunks' to allow > them to be uploaded. This

Re: [PHP] Protected ZIP file with password

2008-02-19 Thread Richard Lynch
Use exec() and get any output that may be happening. I also suspect that the PATH you are using isn't a TRUE path, but some hacked up thing from your webhost. Look at the output of in biblioteca and see what PHP thinks is the current working directory. I had one webhost where some kind of chroo

Re: [PHP] Protected ZIP file with password

2008-02-19 Thread Richard Lynch
On Mon, February 18, 2008 4:16 pm, Shawn McKenzie wrote: > In your php code you'll need the full path to biblioteca.php and to > t.zip and the web user will need write permissions to the dir where > you > create t.zip. nitpik: The user needs write permission to just t.zip Unless zip does someth

Re: [PHP] Protected ZIP file with password

2008-02-19 Thread Richard Lynch
; Petrus Bastos wrote: >> > Richard, >> > >> > Unfortunately, I can't get out of the zip password rut >> because the >> > destination system read only this file format. I can't change the >> > destination system. >> > >&g

Re: [PHP] Re: open a secondary window/tab in the browser from php

2008-02-19 Thread Richard Lynch
On Mon, February 18, 2008 1:04 pm, Shawn McKenzie wrote: > julian wrote: >> >> >> Hi, >> >> I have an application that along filling in some forms, it produces >> a >> pdf file, as confirmation of all entered data. >> >> I want to send this pdf file to a different window/tab of the >> browser, >>

Re: [PHP] classes

2008-02-19 Thread Richard Lynch
On Mon, February 18, 2008 2:25 pm, nihilism machine wrote: > if i declare an instance of a class in the top of my php file, then > have html, then later on user $myClassInstance->myMethod(); -- > myMethod() does not execute, only when i have the instantiation of the > class right before the call to

Re: [PHP] Re: fopen never ends?

2008-02-19 Thread Richard Lynch
On Tue, February 19, 2008 5:49 pm, Chris wrote: > >>> Perhaps concider moving to fsockopen or stream_socket_client with >>> timeout parameters to solve your issue. >> >> fsockopen has no context > > Maybe I'm missing something but it returns a resource just like fopen. > > http://php.net/fsockopen

RE: [PHP] mysql input

2008-02-19 Thread Richard Lynch
On Mon, February 18, 2008 10:19 pm, Bastien Koert wrote: > mysql_real_escape_string() Yes. > addslashes() No, not right for different charsets. See above. > htmlentities() Completely and wildly inappropriate. Might as well use a cannon to slice a tomato. -- Some people have a "gift" link he

Re: [PHP] mysql input

2008-02-19 Thread Richard Lynch
On Mon, February 18, 2008 10:05 pm, nihilism machine wrote: > I have a user saving a VARCHAR(255) field in a mysql db which has > single quotes in the text, how can i replace them so that they dont > fuck up my mysql command? http://php.net/mysql_real_escape_string Google for "SQL injection" for

Re: [PHP] www. not working

2008-02-19 Thread Richard Lynch
On Tue, February 19, 2008 3:43 am, Christoph wrote: >> Don't do that. >> Some sites may or may not use www. for whatever reason... >> Usually screwed-up A-name records by incompetent sysadmins, but >> there >> it is... > > Really? So > > games.yahoo.com > blogreport.salon.com > mirror1.downloads

Re: [PHP] System errno in PHP

2008-02-19 Thread Richard Lynch
PHP catches all thsoe and prints nifty error message. I presume the error number is in the guts somewhere, and could be exposed easily enough if you worked at it... But I don't think there is any kind of variable today with it in there. php_errmsg used to have the error message in it, but that d

Re: [PHP] System errno in PHP

2008-02-19 Thread Richard Lynch
On Tue, February 19, 2008 7:13 am, Michal Maras wrote: > Coud somebody tell me if it is possible to get integer value of > variable > which name in C is errno end in perl $!. > I am PHP beginner so I am sorry if question is 'stupid'. If you use exec() you can get that as a returned value for the

Re: [PHP] Hiding all browser toolbars - how?

2008-02-19 Thread Richard Lynch
With target and JS, yes. It's not PHP. It's not even ASP. It's just HTML and JavaScript. On Tue, February 19, 2008 8:10 am, Matty Sarro wrote: > Greetings everyone! I am currently working on a web application > (aren't we > all?). The main page which users will look at is simply a login > promp

Re: [PHP] Re: Call PHP script from MySQL

2008-02-19 Thread Richard Lynch
On Tue, February 19, 2008 5:58 pm, Mário Gamito wrote: > >> Is it possible to call from within MySQL an external PHP script ? > >> I've read "MySQL Stored Procedure Programming" from O'Reilly but > >> found nothing :( > > I'd really like to see an example of why you need this > functionality, >

Re: [PHP] separating strings from extensions

2008-02-18 Thread Richard Lynch
Since you provide the suffice (extension) to basename, it's not basename that's broken... It's not knowing what extension you wanted to provide in the first place... On Mon, February 18, 2008 11:56 am, Nick Stinemates wrote: > Richard Lynch wrote: >> On Sun, February 17

Re: [PHP] question about database field-types and special characters

2008-02-18 Thread Richard Lynch
On Thu, February 14, 2008 8:47 pm, Rob Gould wrote: > Should I have used utf-8 instead? Yes. And you need to convince not only the MySQL server to use UTF-8, but also the MySQL client compiled into your PHP to use UTF-8. -- Some people have a "gift" link here. Know what I want? I want you to bu

Re: [PHP] XSLTProcessor without validation

2008-02-18 Thread Richard Lynch
On Fri, February 15, 2008 12:54 am, Siegfried Gipp wrote: > Am Donnerstag, 14. Februar 2008 21:01:42 schrieb Richard Lynch: > >> You could also consider filing a "Feature Request" in >> http://bugs.php.net/ > Well, the bug reporting page has a bug. A graphical capt

Re: [PHP] Fwrite Function

2008-02-18 Thread Richard Lynch
On Sat, February 16, 2008 6:03 am, Yuval Schwartz wrote: > Hello, > > Can you please help me, I am writing code where I create a file and > write to > it from a form on a webpage and then read and display this file on the > webpage. > I want to change the color of the text that is written to the

Re: [PHP] Sending XML to MSIE7

2008-02-18 Thread Richard Lynch
On Fri, February 15, 2008 10:03 am, Shawn McKenzie wrote: > Brian Dunning wrote: >>> Isn't it enough to send it with Content-Type: >>> application/octet-stream ? > > Do you want the user to download the file? Try using: > 'Content-Disposition: attachment; filename="..."' Apologies in advance to o

Re: [PHP] Sending XML to MSIE7

2008-02-18 Thread Richard Lynch
If IE does anything other than a file download with application/octet-stream, it's very broken indeed... Does your URL end in .xml? Often IE "assumes" the Content-type is not correct, and runs with the idea that the end of the URL in 8.3 notation is what the file REALLY is. On Fri, February 15,

Re: [PHP] Gzipped output

2008-02-18 Thread Richard Lynch
On Fri, February 15, 2008 8:54 am, Eric Butera wrote: > On Thu, Feb 14, 2008 at 3:52 PM, Richard Lynch <[EMAIL PROTECTED]> wrote: >> >> >> On Mon, February 11, 2008 9:59 am, Eric Butera wrote: >> > On Feb 11, 2008 10:44 AM, Per Jessen <[EMAIL PROT

Re: [PHP] Semaphores without sysvmsg?

2008-02-18 Thread Richard Lynch
On Fri, February 15, 2008 6:42 pm, Michael McGlothlin wrote: > Does anyone have a good method of supporting semaphores when PHP's > System V IPC functions can't be enabled? I'm trying to implement > locking > for using shmop (actually modifying someone elses code) and it > requires > sysvmsg but my

Re: [PHP] www. not working

2008-02-18 Thread Richard Lynch
On Fri, February 15, 2008 2:46 pm, nihilism machine wrote: > this still does not work, if a domain has no preceeding www. it > redirects to http://www.www.site.com, if it has a www. it goes to > www.www.mydomain.com > , any ideas? Don't do that. Some sites may or may not use www. for whatever rea

Re: [PHP] Session destruction problem

2008-02-18 Thread Richard Lynch
On Sat, February 16, 2008 2:31 pm, Adil Drissi wrote: > I need help with sessions. > I have a simple authentification relying only on > sessions (i don't use cookies). Do you mean that you are also using the "no_cookie" setting in PHP and using the URL to pass around the session ID? Or jut that y

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Richard Lynch
On Mon, February 18, 2008 5:59 am, Petrus Bastos wrote: > Thanks again for your worry. So, let's go, here goes my situation. > I'm > exporting data to another system. That system have an option to be > feed by a > password protected zip file. The export activity will be occur in this > way: > t

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Richard Lynch
On Sun, February 17, 2008 1:57 pm, Nick Stinemates wrote: > Petrus Bastos wrote: >> Hi Nick, >> >> Sorry, but I forgot to tell you that I can't use this exec >> neither >> system commands because they are disabled for security precautions. >> So, Do >> you have any other ideas on how can I do t

Re: [PHP] PHP/mySQL dropping zeros after inserting number into record

2008-02-18 Thread Richard Lynch
On Sat, February 16, 2008 5:22 pm, Rob Gould wrote: > I've got a PHP script that inserts "00012345678" into a record in a > mySQL database (it's a barcode). Things work ok unless the number has > preceding zeros, and then the zeros get cut off and all I get is > "12345678". > > I have the mySQL da

Re: [PHP] Check time in between times

2008-02-18 Thread Richard Lynch
On Sat, February 16, 2008 11:53 pm, Johny Burns wrote: > I am having fields in my table where I put times like 4:30pm in string > format This is your first mistake... Use time fields for time, so you can do time operations on time fields. Otherwise, you are just re-inventing the wheel and re-wri

Re: [PHP] regex usage

2008-02-18 Thread Richard Lynch
On Sun, February 17, 2008 9:34 am, Valedol wrote: > Is there a mothod to check string`s length with regex or the only way > is > using strlen? > > I want string consisting of 4 digits > and check string with this code: > > if (preg_match("/\d{4}/",$_POST[id])) > { echo $_POST[id]; } > > but preg_

Re: [PHP] separating strings from extensions

2008-02-18 Thread Richard Lynch
On Sun, February 17, 2008 4:37 pm, nihilism machine wrote: > i am using this code to get the extension of a filename: > > $extension = strtolower(strrchr($fileName,".")); > > how can i get the text BEFORE the . (period) http://php.net/basename -- Some people have a "gift" link here. Know what I

Re: [PHP] open a secondary window/tab in the browser from php

2008-02-18 Thread Richard Lynch
On Mon, February 18, 2008 6:59 am, julian wrote: > I have an application that along filling in some forms, it produces a > pdf file, as confirmation of all entered data. > > I want to send this pdf file to a different window/tab of the browser, > so it is displayed and can latter be printed. > > I

RE: [PHP] Converting tab delimited file to CSV

2008-02-18 Thread Richard Lynch
On Mon, February 18, 2008 10:36 am, Jay Blanchard wrote: > [snip] > That's funny... MS defaults to tabs for a file whose extension is .csv > which is an acronym for (C)omma (S)eparated (V)alues. > [/snip] > > Welcome to Microsoftwhere do we want you to go today? I think it defaults to whatever

Re: [PHP] Converting tab delimited file to CSV

2008-02-18 Thread Richard Lynch
On Mon, February 18, 2008 7:11 am, Graham Cossey wrote: > I was wondering if someone could offer some advice please. > > I'm being sent data in tab delimited files which I'm trying to split > into smaller files and convert to comma delimited using PHP. > > Now, I can replace the tabs with commas

Re: [PHP] Static variable in a class method

2008-02-14 Thread Richard Lynch
On Thu, February 14, 2008 5:14 pm, Stut wrote: > I'm only guessing, but instead of classes I would expect you to have a > fair few files that contain lots of functions, correct? No, just one file with a handful to a dozen functions, really... If the site is designed correctly, each page is doing

Re: [PHP] date() and wrong timezone (or time)

2008-02-14 Thread Richard Lynch
On Wed, February 6, 2008 11:13 am, Martin Marques wrote: > Nathan Nobbe escribió: >> On Feb 6, 2008 6:13 AM, Martin Marques <[EMAIL PROTECTED]> >> wrote: >> >>> I got an update from tzdata on a Debian server due to a daylight >>> saving >>> change here in Argentina. >>> >>> The problem is that, ev

RE: [PHP] PHP Source code protection

2008-02-14 Thread Richard Lynch
On Thu, February 7, 2008 8:35 pm, Andrés Robinet wrote: > 1 - I believe the fact that we don't "encode" (read "compile") our > scripts is > tightly related to the fact that we don't have a bytecode interpreter > (say JIT > compiler or something?) bundled into PHP. Er. PHP has a bytecode inter

Re: [PHP] Static variable in a class method

2008-02-14 Thread Richard Lynch
On Thu, February 14, 2008 4:28 pm, Stut wrote: > Richard Lynch wrote: >> If a website is complicated enough to need a class hierarchy, then >> something is wrong in your Design. :-) :-) :-) > > I don't think anything ever *needs* a class heirarchy, but I wouldn't >

Re: [PHP] fgets???

2008-02-14 Thread Richard Lynch
On Fri, February 8, 2008 11:54 am, Zoltán Németh wrote: > 2008. 02. 8, péntek keltezéssel 12.46-kor Daniel Brown ezt írta: >> On Feb 8, 2008 12:35 PM, Richard Lynch <[EMAIL PROTECTED]> wrote: >> >> I knew it. After silence, Lynch comes back with a vengeanc

Re: [PHP] Order directory output

2008-02-14 Thread Richard Lynch
opendir/readdir does not promise to deliver the files in any particular order, no matter what it seems to do on any given day... Put them in an array and sort() if it's a small list of files. Or use exec and "ls -als" or somesuch for a large list of files. Or... glob *might* be documented to do

Re: [PHP] Better DB Class MySQL

2008-02-14 Thread Richard Lynch
On Sun, February 10, 2008 9:31 am, Jochem Maas wrote: > Larry Garfield schreef: >> http://www.php.net/pdo >> >> All the cool kids are doing it. > > not true - some of them use firebird ;-) And some have figured out that PDO does not quite live up to its promise (yet) and needs some more work... P

Re: [PHP] strtotime

2008-02-14 Thread Richard Lynch
I would use date and mktime, personally, as strtotime often does things I consider "strange" On Sun, February 10, 2008 5:46 am, Ron Piggott wrote: > > I am trying to calculate what was the date 18 months ago. When I give > the command: > > $18_months_ago = strtotime("-18 months"); > > It comes ba

Re: [PHP] Gzipped output

2008-02-14 Thread Richard Lynch
On Mon, February 11, 2008 9:59 am, Eric Butera wrote: > On Feb 11, 2008 10:44 AM, Per Jessen <[EMAIL PROTECTED]> wrote: >> Eric Butera wrote: >> >> >> I like it from a coding point of view (it's neat and elegant), >> but I >> >> don't think it achieves anything else than my initial suggestion >>

Re: [PHP] Gzipped output

2008-02-14 Thread Richard Lynch
On Sun, February 10, 2008 7:45 am, Jakub wrote: > is it possible to make something like "gzipped echo"?. > My idea was: > $gzOut = gzopen('php://output','w'); > but it fails with an error: Warning: gzopen(php://output) [ href='function.gzopen'>function.gzopen]: could not make seekable - > php://ou

Re: [PHP] mysql question

2008-02-14 Thread Richard Lynch
On Sun, February 10, 2008 11:52 am, Per Jessen wrote: > nihilism machine wrote: > >> $ret = mysql_result($r, 0); >> mysql_free_result($r); >> if ($this->auto_slashes) return stripslashes($ret); >> else return $ret; >> } >> >> >> what is $ret, an array? > > No, it's a mysql result object. No, it'

Re: [PHP] mysql question #2

2008-02-14 Thread Richard Lynch
On Sun, February 10, 2008 12:12 pm, nihilism machine wrote: > public function select_one($sql) { > if ($this->auto_slashes) { > return stripslashes($ret); If you have to call stripslashes() on data coming FROM MySQL, then you have really messed up... You

Re: [PHP] open source PHP/MySQL image viewing application

2008-02-14 Thread Richard Lynch
Did you Google for "PHP MySQL photo album" or "PHP MySQL slideshow"??? On Thu, February 14, 2008 2:12 pm, Bruce Gilbert wrote: > can anyone reccomend an open source PHP/MySQL based image viewing > application. I am looking to store the images in MySQL and have a > viewer on the page with the optio

Re: [PHP] Trouble with PHP server script

2008-02-14 Thread Richard Lynch
On Sun, February 10, 2008 9:09 pm, Robert Cox wrote: > Is it possible to use the "$_SERVER['PHP_AUTH_USER'];" construct in a > URL > forwarded site? I am trying to find the authorised user id so that I > can > access an SQL database with it. Anyone got some ideas? If you do a Location: with a

Re: [PHP] \n problems when creating an email

2008-02-14 Thread Richard Lynch
If the recipient is gmail, then you need to use \r\n because Gmail is following in the Windows way of ignoring standards... :-( On Mon, February 11, 2008 6:10 am, Angelo Zanetti wrote: > Hi guys, > > I am making email text based on some fields the user fills in and then > email > the admin the det

Re: [PHP] Exception handling with file()

2008-02-14 Thread Richard Lynch
On Mon, February 11, 2008 6:34 am, John Papas wrote: > I need to open a remote file with file() and I would like to put it > inside a try-catch but as far as I can tell file() does not raise an > exception if it fails. The following code: > > try { > $data = file('http://myserver.com

Re: [PHP] Security scanner

2008-02-14 Thread Richard Lynch
On Mon, February 11, 2008 9:27 am, Emil Edeholt wrote: > Thanks. Sure, I know how to escape and filter the input.. But since > not > all my sites use PDO yet, and I use some external code it would be a > good idea to also use an sql injection scanner. Scanning for SQL injection is like a "blacklis

Re: [PHP] php+mail+TLS/SSL

2008-02-14 Thread Richard Lynch
On Thu, February 14, 2008 8:34 am, julian wrote: > I am using phpmailer currently to send email from my applications. My > ISP is restricting the usage of email without SSL/TLS and my SMTP > connections have started to fail... > > Any hints on the best approach to send email from php appplciations

Re: [PHP] Session and Multi Server Architecture

2008-02-14 Thread Richard Lynch
On Mon, February 11, 2008 3:07 pm, mike wrote: > actually right now i have an issue on my system i'm working on > resolving - and it does create some poor experience for users. when > one of my webservers is taken out of the pool (softly due to a > healthcheck failure, not via reboot) those clients

Re: [PHP] Session and Multi Server Architecture

2008-02-14 Thread Richard Lynch
On Mon, February 11, 2008 1:30 pm, mike wrote: > On 2/11/08, Per Jessen <[EMAIL PROTECTED]> wrote: >> Make sure all requests from the same client go to the same server. >> This >> is often done by IP-address. > > isn't that an archaic piece of advice? It can "help" reduce the amount of cross-serve

Re: [PHP] Static variable in a class method

2008-02-14 Thread Richard Lynch
On Thu, February 14, 2008 11:10 am, Eric Butera wrote: > Just FYI the static keyword was quite popular in PHP4 for the > singleton pattern. You could do something like: I have used and will continue to use the static keyword in functions, and will most likely never use a class in PHP... If a web

Re: [PHP] Curl doesn't handle memory stream

2008-02-14 Thread Richard Lynch
On Wed, February 13, 2008 8:19 pm, Nathan Nobbe wrote: > On Feb 13, 2008 6:52 PM, Richard Lynch <[EMAIL PROTECTED]> wrote: > >> On Wed, February 13, 2008 4:11 pm, Nathan Nobbe wrote: >> >> You may or may not want to file a bug report with curl itself, >> d

Re: [PHP] XSLTProcessor without validation

2008-02-14 Thread Richard Lynch
On Thu, February 14, 2008 4:24 am, Siegfried Gipp wrote: > i still got no answer. Maybe i did not see it, altough i'm trying to > read any > single post. But may be i overlooked it due to high traffic. So now i > have > set up a filter (hopefully) copying answers to another folder. > > Here is the

Re: [PHP] Session and Multi Server Architecture

2008-02-14 Thread Richard Lynch
On Mon, February 11, 2008 1:53 pm, Per Jessen wrote: > Paul Scott wrote: > >> Either that or in a db, but if you are already in clustering, you >> probably have a memcached instance already right? > > Am I right in thinking that memcached will replicate session > information > across a cluster, and

Re: [PHP] Session and Multi Server Architecture

2008-02-13 Thread Richard Lynch
On Mon, February 11, 2008 11:33 am, chetan rane wrote: > Can any one tell me what will be the best way to maintain session > information on a Multi Server Architecture i.e a Web Cluster. Write a custom session handler which: a) binhex the session data, and if it is less then 4K, put the actual s

Re: [PHP] Run Process in back ground

2008-02-13 Thread Richard Lynch
On Mon, February 11, 2008 1:23 pm, Richard Kurth wrote: > Is there a way that I can call a function that will send an email and > then move on redirecting to another website without having to what for > the email to send? > SendEmail($memberemail,$MailFrom,$MailHost); > header("Location:http://doma

Re: [PHP] DOMXML Warning

2008-02-13 Thread Richard Lynch
On Wed, February 13, 2008 1:51 am, Miguel J. Jiménez wrote: > Hi, after enabling error reporting with E_ALL I am having this strange > warning while loading a XML: > > Warning: DOMDocument::load() [function.DOMDocument-load]: Extra > content > at the end of the document in [...] > > The code I use

Re: [PHP] Copying 1000s files and showing the progress

2008-02-13 Thread Richard Lynch
On Wed, February 13, 2008 4:28 am, Ritesh Nadhani wrote: > I have a situation where I have to copy something like 1000 files one > by one to a temporary folder. Tar it using the system tar command and > let the user download the tar file. > > Now while the copy is going on at server, I want to show

Re: [PHP] help me out with form details converted into pdf file save it one place as well as send mail attactment

2008-02-13 Thread Richard Lynch
On Wed, February 13, 2008 6:26 am, pretty wrote: > hi any one help me out, im using cronofirm, i need to field form > details will > converted into pdf as well as it will go maill attachment doing this > in > joomla, atleast i need this only php with out joomla. To make a PDF, you can use: http:/

Re: [PHP] Curl doesn't handle memory stream

2008-02-13 Thread Richard Lynch
On Wed, February 13, 2008 4:11 pm, Nathan Nobbe wrote: > On Feb 13, 2008 5:07 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: > >> I see on the http://us.php.net/wrappers.php page that only php 5.1.0 >> and >> newer >> have this feature. What version of PHP are you using? > > > thanks for your time jim

Re: [PHP] Re: Question about development

2008-02-12 Thread Richard Lynch
On Tue, February 12, 2008 3:32 pm, Jason Pruim wrote: > > On Feb 12, 2008, at 4:24 PM, Daniel Brown wrote: > >> On Feb 12, 2008 2:53 PM, Nathan Rixham <[EMAIL PROTECTED]> wrote: >>> Browsers generally send the the HTTP_ACCEPT_LANGUAGE header in a >>> request. >>> >>> $_SERVER[HTTP_ACCEPT_LANGUAGE]

Re: [PHP] Passing object reference to session

2008-02-08 Thread Richard Lynch
On Thu, February 7, 2008 1:15 am, Michael Moyle wrote: > I am new to the list and have a question that inspired me to join the > list as I can not find any answer online. > > When a object reference is passed to the $_SESSION array what happens > to > the object? Is the object serialized and saved

Re: [PHP] problem with imagefontwidth function, It looks to be unavailable...

2008-02-08 Thread Richard Lynch
You probably do not have GD installed... Does list "GD" as one of your extensions? If not, install it. On Thu, February 7, 2008 6:57 am, Legolas wood wrote: > Hi > Thank you for reading my post > I am trying to run a php based application using php5 and apache. > but I receive an error like: >

Re: [PHP] shopping carts

2008-02-08 Thread Richard Lynch
On Thu, February 7, 2008 9:51 am, Eric Butera wrote: > On Feb 7, 2008 9:59 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: >> On Feb 7, 2008 9:24 AM, Eric Butera <[EMAIL PROTECTED]> wrote: >> > If you look at plugin architectures of projects such as drupal, > phorum, or serendipity you can see there ar

Re: [PHP] Directory

2008-02-08 Thread Richard Lynch
On Thu, February 7, 2008 12:30 pm, Steve Marquez wrote: > Greetings, > > Could someone please point me in the right direction? I am trying to > have > PHP find out if a directory has files in it and then if it does, > display and > include, if it does not, then not display the include. > > I have

Re: [PHP] re: php file extension

2008-02-08 Thread Richard Lynch
On Thu, February 7, 2008 1:49 pm, MaryAnn Woodall wrote: > Just starting to use php on my webpages. If I save a file as .php > or .php4 are they the same file. For example is index.php the same as > index.php4? They are not the same file at all, unless you use really old Windows that only let you

Re: [PHP] Name of variable to string

2008-02-08 Thread Richard Lynch
On Fri, February 8, 2008 9:14 am, tedd wrote: > From a variable with the name of $this_variable -- how do I get a > string 'this_variable' ? You don't... Consider this: function foo($bar){ //what would your function output? } $baz = 3; foo($baz); -- Some people have a "gift" link here. Kno

Re: [PHP] fgets???

2008-02-08 Thread Richard Lynch
The first possible issue is that the "newline" character[s] is different for Mac, Windows, and Linux... So if your file is one format, and fgets is expecting the other, it won't do what you want. The next is that if your code is wrong, and is showing it all as one line, it PROBABLY means you are

Re: [PHP] PHP Source code protection

2008-02-06 Thread Richard Lynch
On Wed, February 6, 2008 5:28 am, Zoran Bogdanov wrote: > I'm building a C# application that connects to a server that has PHP > scripts > on it. > > We need to deliver the complete solution to a firm, the C# is no > problem > because it is compiled... > > But PHP is a problem bacause it is interpr

Re: [PHP] how dod you get to do multiple mysql queries concurrently?

2008-02-05 Thread Richard Lynch
On Sun, February 3, 2008 6:08 pm, Jochem Maas wrote: > of paginated data combined with user defined filters (e.g. a product > list sorted by price, etc and filter on type/category/keyword/etc) If you want GIS to be useful for that, you'd have to pretend that something like "type" was, say, longitu

Re: [PHP] how dod you get to do multiple mysql queries concurrently?

2008-02-05 Thread Richard Lynch
On Fri, February 1, 2008 3:55 am, Paul Scott wrote: > > Did anyone actually get this mail? > > More concrete example? What would you like to see? > > I suspect that some of my mail is getting dropped :( I got the email below, and it made perfect sense... Though I am not sure it would make sense

Re: [PHP] text messages

2008-02-05 Thread Richard Lynch
On Mon, February 4, 2008 9:15 pm, blackwater dev wrote: > I know this isn't specific to php but I need to add some code to my > php > pages to start sending out text messages. If anyone does this, how do > you > do it? Do you simply use a free service like teleflip or do you use a > paid > aggreg

Re: [PHP] How to download a file (with browser) using fsockopen() ?

2008-02-05 Thread Richard Lynch
On Mon, February 4, 2008 9:28 pm, szalinski wrote: > Hi > > I have been working on this download script for quite a while, and I > just > can't find how to download a remote file via a user's browser using > fsockopen. > > Basically I am wondering if anyone can just give me a simple working > examp

Re: [PHP] Pass Variable Names to a Function

2008-02-04 Thread Richard Lynch
function silly($var){ return isset($_SESSION[$var]) ? $_SESSION[$var] : ''; } silly('foo'); On Fri, February 1, 2008 10:49 am, Bill Guion wrote: > I would like to use a function to check to see if a session variable > is set and return the session variable if it is set, and return blank > if no

Re: [PHP] Timeout while waiting for a server->client transfer to start (large files)

2008-02-04 Thread Richard Lynch
On Fri, February 1, 2008 7:45 pm, szalinski wrote: > On Thu, 31 Jan 2008 07:13:55 -, Per Jessen <[EMAIL PROTECTED]> > wrote: > Well I got it to work, much thanks to Richard Lynch, but now everytime > I > download a file, it is corrupt. For example, when I download small &

Re: [PHP] php competion

2008-02-04 Thread Richard Lynch
On Mon, February 4, 2008 2:36 am, Jochem Maas wrote: > Richard Lynch schreef: >> >> On Sun, February 3, 2008 11:51 am, Robert Cummings wrote: >>> On Sun, 2008-02-03 at 18:15 +0200, Paul Scott wrote: >>>> On Sun, 2008-02-03 at 20:10 +1100, doc wrote: &g

Re: [PHP] Effecient mass mailings

2008-02-04 Thread Richard Lynch
On Mon, February 4, 2008 10:22 am, Robert Fitzpatrick wrote: > Can someone give some pointers at how I may want to approach such mass > mailings? Thanks in advance! Get rid of the attachments? :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie ar

Re: [PHP] Schedule tasks from server

2008-02-04 Thread Richard Lynch
On Mon, February 4, 2008 8:30 am, Pieter du Toit wrote: > Is there a way that i can schedule tasks on my webserver that will > automatically fire on a certain time and date, without anyone visiting > the > website? > > This domain is hosted by a ISP and not by me. There is a low-level utility in W

<    1   2   3   4   5   6   7   8   9   10   >