Re: [PHP] Friday's Question

2013-09-20 Thread Simon J Welsh
On 21/09/2013, at 4:51, Tedd Sperling wrote: > Hi gang: > > Do you use a Mousepad? > > My reason for asking is that I've used a Mousepad ever since mice first came > out (back when they had one ball). > > Now that mice are optical (no balls), Mousepads are not really needed -- or > so I'll t

Re: [PHP] htaccess

2013-07-07 Thread Simon J Welsh
On 8/07/2013, at 8:06, Tedd Sperling wrote: > Hi gang: > > I have a client who has an account with GoDaddy (I know). > > GoDaddy says they have PHP v 5.3 installed on the client's account, but > phpinfo() says different, namely it reports 5.2.17. > > After calling GoDaddy, they said the clien

Re: [PHP] Nested loopa

2012-12-25 Thread Simon J Welsh
On 26/12/2012, at 1:21 PM, Ken Arck wrote: > So I cannot do nested do loops in php? > > $a = 0 ; > $b = 0 ; > do { > echo "$a\n" ; > do { > echo "$b\n" ; >$b++ > }while($b <=10) ; >$a++; > }while($a <= 20) ; > ?> You can, though you're never resetting the value

Re: [PHP] preg_replace question

2012-12-12 Thread Simon J Welsh
On 13/12/2012, at 10:08 AM, Curtis Maurand wrote: > On 12/12/2012 3:47 PM, Maciek Sokolewicz wrote: >> On 12-12-2012 21:10, Curtis Maurand wrote: >>> On 12/12/2012 12:00 PM, Maciek Sokolewicz wrote: On 12-12-2012 17:11, Curtis Maurand wrote: First of all, why do you want to use pre

Re: [PHP] A string question

2012-09-28 Thread Simon J Welsh
On 29/09/2012, at 1:29 AM, Chris Payne wrote: > Hi there everyone, > > I basically have the following code, which grabs the 3 numbers to the right: > > $input = "250705023"; > > $resta = substr($input, -3, 3); > > Then I manipulate them a little, but my question is - how, once i've used > the

Re: [PHP] Here's my rounding

2012-09-27 Thread Simon J Welsh
On 28/09/2012, at 6:08 PM, Chris Payne wrote: > $test2 = '253177'; > echo $tes2 . " rounded to: "; > $rounded_number = round($test2,-3); > echo $rounded_number; > > Is it SUPPOSED to happy a number is sent to this little system and it's > SUPPOSED to round the number up. So if the number was 14

Re: [PHP] Expected behaviour or bug?

2012-09-17 Thread Simon J Welsh
On 17/09/2012, at 8:50 PM, Camilo Sperberg wrote: > Hello list, I have a little question with PHP's internal working. I've > managed to reduce the test to the following lines: > > $globalVariable = 'i am a global variable'; > function testFunction() { > global $globalVariable; > un

Re: [PHP] Mac 10.7 Install/Copy fresh PHP over Pre-Installed PHP

2012-07-31 Thread Simon J Welsh
On 31/07/2012, at 10:54 PM, Jason Pruim wrote: > On Jul 30, 2012, at 12:01 PM, "JeffPGMT" wrote: > >> Thanks All, now I have to tell the business owner to let the IT guy update >> to 10.8 if he likes, which will buy me time to sort out all of what you >> folks contributed. >> >> I wasn't awar

Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Simon J Welsh
On 27/06/2012, at 9:45 AM, Daniel Brown wrote: > On Tue, Jun 26, 2012 at 5:42 PM, Matijn Woudt wrote: >> >> Isn't everyday friday in summer? ;) > >If it is, then it could be argued that every day is a Monday in > winter --- and right now, those poor folks in the southern hemisphere > (I'm

Re: [PHP] errors not showing

2012-05-19 Thread Simon J Welsh
On 20/05/2012, at 3:55 PM, Tim Dunphy wrote: > hello, list! > > I have 'error_reporting = E_ALL' set in my php.ini file. However when > I run a php script that has errors in it all that happens is that the > page WSODs. I am running Mac OS X 10.6. Any thoughts on why errors > don't show up in the

Re: [PHP] date() confustion

2012-04-25 Thread Simon J Welsh
On 26/04/2012, at 4:40 PM, Nathan Nobbe wrote: > Hi everyone, > > Does anybody know what might influence the output of the date() function > besides date.timezone setting? > > Running through some code in an app I'm working on, I have this code: > > $timestamp = time(); > $mysqlDatetime = date(

Re: [PHP] Parse errors

2012-03-18 Thread Simon J Welsh
On 19/03/2012, at 6:32 AM, Tim Streater wrote: > After recently omitting a semicolon from the end of a statement, and having > the result be a JavaScript error in an odd place, I'm trying to pin down just > what PHP does with such errors. I made a small test script to run at CLI, > which does s

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Simon J Welsh
On 7/02/2012, at 9:44 AM, Marco Behnke wrote: > Am 06.02.12 17:23, schrieb Alain Williams: >> However: a few GOTOs can make things clearer. Think of a function that >> can fail in several different places (eg data validation, ...). But it >> is reading a file which needs to be closed before the f

Re: [PHP] Time zone in date function

2012-01-30 Thread Simon J Welsh
On 31/01/2012, at 2:55 PM, Ron Piggott wrote: > > On my clients account when I use “echo date(‘D, d M Y H:i:s');” the output is > 5 hours ahead of us. How do I change it to my local time? Is there a way to > specify “Eastern” time zone? > > I expect this would work: > > echo date(‘D, d M Y

Re: [PHP] Numeric help needed

2012-01-15 Thread Simon J Welsh
On 16/01/2012, at 2:48 PM, Chris Payne wrote: > Hi Jason, > > I've tried lots of different things, including: > > echo "" . round(68500, 1000) . " ROUNDED"; > > thinking that might be it, but i'm stumped > > This is the example I was given (And have to go by): > > "If the loan amount is $6850

[PHP] Numeric help needed

2012-01-15 Thread Christopher J Payne
Hi everyone, I am having a hard time with a numerical problem. I need to round some numbers up and I've tried $round($number) and it doesn't work so I'm misunderstanding something. For example, if a user inputs 685000 I need it to round up to 69 or if they input 149560 I need it to

Re: [PHP] Non required argument

2012-01-06 Thread Simon J Welsh
On 7/01/2012, at 2:13 PM, Donovan Brooke wrote: > Hello, > > I have a simple function that contains an argument that is not required, ie: > > function list_formvars($pmatch) {... > > > However, if I call the function without the argument, I get a warning (I'm > having the app show all warning

Re: [PHP] Howto detect the hostname of the server?

2011-11-25 Thread Simon J Welsh
On 26/11/2011, at 1:14 PM, Andreas wrote: > Hi, > how could I identify the server the script runs on? > > I've got a testserver on Windows and a remote system on Linux that need a > couple of different settings like IP and port of db-server or folder to store > logfiles. > > I'd like to do som

Re: [PHP] checking dates not working

2011-11-10 Thread Simon J Welsh
On 11/11/2011, at 11:35 AM, Marc Fromm wrote: > I have this bit of code to see if a date is greater or equal to a set date. > > echo(date("m/d/Y",strtotime($jobs_effective_start)));// displays entered date > of 01/03/2012 > echo(date("m/d/Y",strtotime(WSOFFBEGIN))); // displays set date of 09/16

Re: [PHP] Passing arguments to an internal function via array_map

2011-11-10 Thread Simon J Welsh
On 11/11/2011, at 5:10 AM, Marc Guay wrote: > Hi folks, > > I'm trying to convert the contents of an array from utf8 to utf16 > (thanks for the headache MS Excel!). I originally created a "user > function" that just ran the text through > mb_convert_encoding($text,'utf-16','utf-8') but now I'm w

Re: [PHP] PHP syntax - novice question

2011-10-29 Thread Simon J Welsh
On 30/10/2011, at 1:15 PM, Phil Dobbin wrote: > Hi, all. > > I’m new to the list & PHP in general & have a syntax question. > > I have a script that calls both DB & MDB2. This is the part of the script > where the error occurs: > > ##

Re: [PHP] junk from my forms output

2011-10-19 Thread Simon J Welsh
On 20/10/2011, at 10:24 AM, hanson zhou wrote: > I have the following in a file called "hello.php" in my htdocs directory > (Apache webroot). > > > Your name: > Your age: > > > > as well as the following in a file "action.php", also in the same directory. > > > Hi . > You are years old.

Re: [PHP] move_uploaded_file() does not return any value or warning

2011-10-14 Thread Simon J Welsh
On 15/10/2011, at 4:01 PM, Partha Chowdhury wrote: > Then i set a check for the return value of move-uploaded_file. >> if(isset ($move_uploaded_file)): >> echo ""success; >> else: >> echo "error in uploading"; >> endif; > But it does not print anythi

Re: [PHP] Compile PHP with MySQL support

2011-10-13 Thread Simon J Welsh
On 14/10/2011, at 1:27 AM, Nick Khamis wrote: > Hello Everyone, > > I am trying to compile php from source using the following config: > > ./configure --prefix=/usr/local/php > --with-apxs2=/usr/local/apache/bin/apxs > --with-config-file-path=/usr/local/php > --with-mcrypt=/usr/local/bin/mcrypt

Re: [PHP] Decoding Barcode Images

2011-10-10 Thread Shaun J. Farrell
zxing has a java commandline app that you can run.. simple to use great results. http://code.google.com/p/zxing/ Shaun www.brewerydb.com On Oct 10, 2011, at 2:47 PM, Matthew Pounsett wrote: > > On 2011-10-10, at 14:42, Floyd Resler wrote: > >> I've been trying to find a solution for decoding

Re: [PHP] Bug #51739 tricky string to float conversion

2011-09-01 Thread Simon J Welsh
On 1/09/2011, at 8:43 PM, magic-...@damage.devloop.de wrote: > Simon J Welsh writes: >> On 1/09/2011, at 9:53 AM, magic-...@damage.devloop.de wrote: >>> Am Mittwoch, 31. August 2011, 20:48:37 schrieb Shawn McKenzie: >>>> On 08/31/2011 09:03 AM, magic-...@damage.de

Re: [PHP] Bug #51739 tricky string to float conversion

2011-09-01 Thread Simon J Welsh
On 1/09/2011, at 9:53 AM, magic-...@damage.devloop.de wrote: > Am Mittwoch, 31. August 2011, 20:48:37 schrieb Shawn McKenzie: >> On 08/31/2011 09:03 AM, magic-...@damage.devloop.de wrote: >>> Hi, >>> I have opend Bug #51739 in 2010. It was closed as bogus before my last >>> question was answered.

Re: [PHP] how catch a warning by file_put_contents() ?

2011-08-19 Thread Simon J Welsh
On 20/08/2011, at 4:51 PM, Andreas wrote: > Hi, > I wrote stuff with file_put_contents() in a try{} catch{} and it worked. > > Then I'd like to check what happens when some error occurs so I > writeprotected the targetfile. > Instead of getting my own message by the catch{} block I got a standar

Re: [PHP] Using function prototypes in code

2011-08-10 Thread Simon J Welsh
On 10/08/2011, at 1:10 PM, Frank Thynne wrote: > To confuse me a bit further, I can't find a definitive list of the > basic type names. For example, is it "integer" or "int"? Both. http://php.net/manual/en/language.types.type-juggling.php#language.types.typecasting --- Simon Welsh Admin of http:

Re: [PHP] A php bug or?..

2011-08-08 Thread Simon J Welsh
On 9/08/2011, at 8:20 AM, Andre Polykanine wrote: > Hi everyone, > >As we all know, count() returns 1 if the variable > is not an array. > Question is: why in the world does it this? If a variable is *notA* an array, > it contains *zero* array elements. > You can ans

Re: [PHP] put code into a function then the code dead,very strange.

2011-08-02 Thread Simon J Welsh
On 2/08/2011, at 10:24 PM, Sharl.Jimh.Tsin wrote: > hi,everyone > it is a very strange problem,At first,i put my code into the method > inner,it works.see below: > > [snip] > > As you can see,it seems to be impossible.Can someone tell me WHY? > > -- > Best regards, > Sharl.Jimh.Tsin (Fro

Re: [PHP] is_null() and is_string() reversed when using in switch case statements...

2011-07-14 Thread Simon J Welsh
On 15/07/2011, at 1:58 PM, Daevid Vincent wrote: > function test($v) > { > var_dump($v); > > if (is_string($v)) echo "FOUND A STRING.\n"; > if (is_null($v)) echo "FOUND A NULL.\n"; > > switch ($v) > { > case is_string($v): > echo

Re: [PHP] Spam filtering (was Top Posting)

2011-07-06 Thread Simon J Welsh
On 7/07/2011, at 5:50 AM, Jim Lucas wrote: > On 7/5/2011 7:52 PM, Jim Giner wrote: >> And what do you use to cut down on spam in your in-box? > > This is completely off topic, but here it goes... > > When I received an email the other day from your mail server, I had created > this > crazy ass

Re: [PHP] Create a hierarchical hash from flat source

2011-06-22 Thread Simon J Welsh
On 23/06/2011, at 10:14 AM, Scott Baker wrote: > On 06/22/2011 03:06 PM, Simon J Welsh wrote: >> On further inspection, that's not the problem at all. The problem's around >> assign_children($pid,$list,&$new); >> >> The previous line you defined $ne

Re: [PHP] Create a hierarchical hash from flat source

2011-06-22 Thread Simon J Welsh
On 23/06/2011, at 9:57 AM, Simon J Welsh wrote: > On 23/06/2011, at 9:53 AM, Scott Baker wrote: > >> I have a bunch of records in a DB that look like >> >> id | parent_id >> -- >> 1 | 4 >> 2 | 4 >> 3 | 2 >> 4 | 0 >> 5

Re: [PHP] Create a hierarchical hash from flat source

2011-06-22 Thread Simon J Welsh
On 23/06/2011, at 9:53 AM, Scott Baker wrote: > I have a bunch of records in a DB that look like > > id | parent_id > -- > 1 | 4 > 2 | 4 > 3 | 2 > 4 | 0 > 5 | 2 > 6 | 1 > 7 | 3 > 8 | 7 > 9 | 7 > > I want to build a big has that looks like: > > 4 -> 1 -> 6 > -> 2 -> 3 -> 7

Re: [PHP] PHP 5.3.3 operator & problem

2011-06-01 Thread Simon J Welsh
On 2/06/2011, at 2:44 PM, 李白|字一日 wrote: > hi, all > > i currently have a project which using & operator on creating a new object. > > like: > $class =& new Class(); > > it works properly in php 5.1.6, > but not in php 5.3.3 > and it gives offset errors to me. > > is there anyone knows why an

Re: [PHP] displaying a pdf

2011-05-29 Thread Simon J Welsh
On 30/05/2011, at 9:02 AM, Jim Giner wrote: > Perhaps someone can tell me what I'm doing wrong. I did some ( a lot) > looking around for hints on this and here is what I have compiled. It > doesn't work - just goes to a white, blank page and sits. I don't know if I > need all the html parts

Re: [PHP] iPhone sadness

2011-05-29 Thread Simon J Welsh
On 29/05/2011, at 9:48 PM, Richard Quadling wrote: > On 29 May 2011 01:36, TR Shaw wrote: >> (sorry for the top posting) >> >> Sent from my iPad >> > > Are you telling me that you can't scroll down the page on an iPad? > > I refer back to my comment that the "Sent from my iPad/iPhone" is > in

Re: [PHP] dynamic copyright in page footer?

2011-04-30 Thread Simon J Welsh
On 30/04/2011, at 11:06 PM, David Mehler wrote: > Hello, > > I am trying to use php to put a copyright notice in a page footer. I'm > using the date function with the "Y" value for the year. Here's the > code: > > echo date ('Y'); > ?> > > This works great for a site done in 2011 but next year

Re: [PHP] pick a card, any card...

2011-04-09 Thread Simon J Welsh
On 9/04/2011, at 3:39 PM, Scotty Logan wrote: > On Apr 8, 2011, at 8:20 PM, Kirk Bailey wrote: >> in otherwords, the entire idea of picking one of N objects, whatever they >> are- strings, numbers, gummybears, lined up in a listing, and return the one >> item selected. This seems a common enough

Re: [PHP] DateTime using DateTimeZone Timestamp problem

2011-04-05 Thread Simon J Welsh
On 5/04/2011, at 3:35 AM, Ian wrote: > Hi, > > I have a problem using the php built in classes DateTime and DateTimeZone. > > The idea behind the following code is to return the timestamp for the > current time in Singapore (or other places). What it actually returns > is the timestamp for the

Re: [PHP] Looking for Tool to read JSON format

2011-04-01 Thread Simon J Welsh
On 2/04/2011, at 10:19 AM, Michelle Konzack wrote: > Hello *, > > curently I am coding on my new Intranet Interface, but some teleguided > servers return only JSON or YAML files. > > Can someone tell me, how to import JSON files in PHP 5/6? > > Thanks, Greetings and nice Day/Evening >Mich

Re: [PHP] String eval assistance

2011-03-15 Thread Simon J Welsh
On 16/03/2011, at 10:34 AM, Jack wrote: > Hello All, > > > > I got some help on this yesterday, but somehow it's not consistant > > > > > > > $results = "3434approd34"; > > > > if(strpos($results['response'], 'APPROVED') !== false) { > > > > print "declined"; > > > > } else {

Re: [PHP] php or juvascript convert IETF format to ISO08601

2011-03-15 Thread Simon J Welsh
On 15/03/2011, at 9:18 PM, Joce Jovanov wrote: > On Tue, Mar 15, 2011 at 12:44 AM, Simon J Welsh wrote: > >> On 15/03/2011, at 12:32 PM, Jordan wrote: >> >>> Hello Evrybody, >>> >>> Can i convert IETF format (ex: "Wed, 18 Oct 2009 13:00:00

Re: [PHP] problem with if and exact match

2011-03-14 Thread Simon J Welsh
On 15/03/2011, at 6:02 PM, Jack wrote: > I want to be able to match if a string is contained within the string I am > evaluating. > > > > I know that if ( $name == "xxjacksonxx"); based on the below would be true. > > But I want to be able to say if "jackson" is contained within $name that >

Re: [PHP] php or juvascript convert IETF format to ISO08601

2011-03-14 Thread Simon J Welsh
On 15/03/2011, at 12:32 PM, Jordan wrote: > Hello Evrybody, > > Can i convert IETF format (ex: "Wed, 18 Oct 2009 13:00:00 EST") in ISO8601 > format (ex: "2009-11-05T13:15:30Z") > > Does somebody know some php scripte or similar? > > Thanks... strtotime() (http://php.net/strtotime) and date()

Re: [PHP] Re: Regex for extracting quoted strings

2011-03-05 Thread Simon J Welsh
On 6/03/2011, at 11:08 AM, Shawn McKenzie wrote: > On 03/05/2011 09:26 AM, Mark Kelly wrote: >> Hi. >> >> I'm hoping someone can help me extract text between double quotes from a >> string. >> >> $regex = 'some magic'; >> $r = preg_match($regex, $sentence, $phrases); >> >> So, if >> >> $sen

Re: [PHP] PHP5.3.5: error message for date()

2011-03-04 Thread Simon J Welsh
On 5/03/2011, at 8:29 PM, clanc...@cybec.com.au wrote: > After a long battle to get my system back on air after a hard disk crash, I > got PHP 5.3.5 > running under Apache 2.2.3. I now get a diagnostic every time I call date(), > complaining > about a missing parameter. The manual states that th

Re: [PHP] Sorting an array

2011-02-28 Thread Simon J Welsh
On 1/03/2011, at 4:52 PM, Ron Piggott wrote: > > I need help to know how to sort the words / phrases in my array. > > Variable name: $words_used > print_r( $words_used ); Current output: Array ( [187] => Sin [249] => > Punished [98] => Sanctuary [596] => Sing [362] => Anointing Oil ) > Desired

Re: [PHP] Regex pattern for preg_match_all

2011-02-18 Thread Simon J Welsh
As far as I can tell, your problem lies in [^href]*. That will match any characters other than h, r, e or f, not anything other than the string href. Consider replacing it with [^>]*?. The ? makes it non-greedy so it will stop as soon as it can (when it matches the first href) rather than as lat

Re: [PHP] Custom function

2011-02-15 Thread Simon J Welsh
On 16/02/2011, at 1:21 PM, Mark Kelly wrote: > In this way almost any value in $z will trigger the conditional code, > including 0 or an empty string. The exceptions are FALSE and NULL. If you > explicitly need to react to a NULL value, use is_null() to detect it. http://nz.php.net/boolean#lan

Re: [PHP] Finding split points in an article for inserting ads

2011-02-15 Thread Simon J Welsh
On 16/02/2011, at 10:03 AM, Brian Dunning wrote: > Hey all - > > I've got long articles, the HTML for which comes out of MySQL. Works great. I > want to split it up so that I can insert ad blocks at various points within > it. The articles are all pretty long but they're of variable length. I w

Re: [PHP] Simplifying MySql queries

2011-02-12 Thread Simon J Welsh
On 13/02/2011, at 9:40 AM, Andre Polykanine wrote: > Hi all, > I'm using in my PHP script the following four MySql queries: > $q1=mysql_query("SELECT *FROM`CandidateQuestions`WHERE > `Category`='1' ORDER BY RAND() LIMIT 1"); > $q2=mysql_query("SELECT *FROM`CandidateQues

Re: [PHP] 2nd Pair of eyes

2011-01-18 Thread Simon J Welsh
On 19/01/2011, at 6:49 AM, Donovan Brooke wrote: > Hello, > > I warned the list that I may have questions! ;-) > > ...building a simple cookie-based log-in system, and have > narrowed an error to this below: (sorry for email line breaks, if any) > > ---Start--- >$query = "SELECT u_id FROM c

Re: [PHP] Regex for telephone numbers

2010-12-29 Thread Simon J Welsh
On 30/12/2010, at 1:12 PM, Ethan Rosenberg wrote: > Dear List - > > Thank you for all your help in the past. > > Here is another one > > I would like to have a regex which would validate that a telephone number is > in the format xxx-xxx-. > > Thanks. > > Ethan > > MySQL 5.1 PHP 5

Re: [PHP] How to define a data range for graphing?

2010-12-17 Thread Simon J Welsh
On 18/12/2010, at 8:45 AM, Brian Dunning wrote: > Hey all - > > I'm trying to provide reporting to users of our widget. Some may get 0 to 5 > hits a day; others may get up to 10,000 hits a day. I need to define the > range of the graph (using one of Google's). If their max day is 7, I'd like >

Re: [PHP] PHP loop to issue sql insert

2010-11-14 Thread Simon J Welsh
On 15/11/2010, at 12:47 PM, Rick Dwyer wrote: > Hello List. > > I have a sql command that counts, groups and sorts data from a table. I need > to insert the results of that sql command into different table. > > My sql SELECT looks like this: > > select count(*) as count, searchkeywords from

Re: [PHP] Application settings, configuration, and preferences.

2010-10-27 Thread J Ravi Menon
On Wed, Oct 27, 2010 at 11:39 AM, J Ravi Menon wrote: > I am partial to the filesystem but I can see scenarios where the db > approach might be useful (single point of control) with good caching > strategy using apc or other mechanisms. > > One approach I have followed is tha

Re: [PHP] Application settings, configuration, and preferences.

2010-10-27 Thread J Ravi Menon
I am partial to the filesystem but I can see scenarios where the db approach might be useful (single point of control) with good caching strategy using apc or other mechanisms. One approach I have followed is that if the config. field and values are simple key-value pairs, you could store them in

Re: [PHP] Model View Concepts

2010-10-25 Thread J Ravi Menon
On Fri, Oct 22, 2010 at 3:03 AM, Ashley Sheridan wrote: > On Fri, 2010-10-22 at 10:16 +0200, Sebastian Detert wrote: > >> Hi all, >> >> I'm currently searching for any code snippets, tutorials, howtos, >> concepts which explain different ways to collect all type of data/input >> (i.e. inside a cla

Re: [PHP] Zip files: generate text file in archive on the fly

2010-10-17 Thread Simon J Welsh
Have you considered writing to a temporary file? On 18/10/2010, at 11:55 AM, Dotan Cohen wrote: > I need to provide a download of a zip archive containing three files. > This is fairly straightforward in PHP so long as one is working with > files that already exist. However, I need to customise on

Re: [PHP] odd while behavior...

2010-10-16 Thread Simon J Welsh
This is because of your mktime() call. You're trying to get the zeroth day of the month, which is the last day of the preceding month. Using mktime(0, 0, 0, $i, 1) instead should give you the desired results, assuming you do start at 1, and not 0 as you have in your code. --- Simon Welsh On 17/

Re: RES: [PHP] Class mysqli not found

2010-10-06 Thread Simon J Welsh
http://php.net/manual/en/class.mysqli.php definitely says MySQLi is a class. It looks like PHP was complied without MySQLi support. Does running a phpinfo() show the MySQLi module? On 7/10/2010, at 9:33 AM, Alejandro Michelin Salomon wrote: > Sueandant : > > mysqli is set of functions not a cla

Re: [PHP] PHP Email Question

2010-09-30 Thread J Ravi Menon
On Wed, Sep 29, 2010 at 1:37 PM, Joe Jackson wrote: > Hi > > I am trying the following snippet as Bostjan  suggested, and an email is > getting sent when I submit the form however in the body of the email I am > getting none of the form data in the body of the email.  All I am getting is > the let

Re: [PHP] PHP Email Question

2010-09-21 Thread J Ravi Menon
Just on this topic, I found swiftmailer library to be really useful esp. in dealing with 'template' emails with custom variables per recipient: http://swiftmailer.org/ The e.g. on email template processing: http://swiftmailer.org/docs/decorator-plugin-howto There are batchSend() functionalities

Re: [PHP] Removing empty paragraphs from HTML file using simple_html_dom.php

2010-09-18 Thread Simon J Welsh
On 18/09/2010, at 6:21 PM, Geoffrey van Wyk wrote: > Hi All, > > I want to remove empty paragraphs from an HTML document using > simple_html_dom.php. I know how to do it using the DOMDocument class, but, > because the HTML files I work with are prepared in MS Word, the DOMDocument's > loadHTM

Re: [PHP] php cli question

2010-09-15 Thread J Ravi Menon
t frees discarded memory resources on your request or timer or > sth else. Not sure if it is possible like that but this is just a > suggestion, don't quote me on that :) > Also, for such questions I recommend you to join php-internals mailing list, > it seems more appropriate. &

Re: [PHP] php cli question

2010-09-14 Thread J Ravi Menon
On Tue, Sep 14, 2010 at 1:15 PM, Per Jessen wrote: > J Ravi Menon wrote: > >> On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen wrote: >>> J Ravi Menon wrote: >>> >>>> Few questions: >>>> >>>> 1) Does opcode cache really matter in su

Re: [PHP] php cli question

2010-09-14 Thread J Ravi Menon
On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen wrote: > J Ravi Menon wrote: > >> Few questions: >> >> 1) Does opcode cache really matter in such cli-based daemons? As >> 'SomeClass' is instantiated at every loop, I am assuming it is only >> compil

[PHP] Re: php cli question

2010-09-13 Thread J Ravi Menon
On Sat, Sep 11, 2010 at 8:50 PM, Shawn McKenzie wrote: > On 09/10/2010 11:13 AM, J Ravi Menon wrote: >> Hi, >> >> I have some basic questions on running php  (5.2.x series on Linux >> 2.6) as a standalone daemon using posix methods (fork() etc..): >> >&

[PHP] php cli question

2010-09-10 Thread J Ravi Menon
Hi, I have some basic questions on running php (5.2.x series on Linux 2.6) as a standalone daemon using posix methods (fork() etc..): #!/usr/bin/php doSomething() } // shutdown logic. The 'someclass.php' in turn will include other files (via require_once). The above file will be executed dir

Re: [PHP] Backtrace in fatal error?

2010-09-01 Thread Simon J Welsh
I think you need a PHP extension to do this. XDebug works rather nicely for this. On 31/08/2010, at 8:49 PM, Paul Freeman wrote: > When fatal error occurs is it possible to output also the backtrace in the > error log? The simple error message with file line > only is quite useless... > > --

Re: [PHP] It's Friday (a MySQL Question)

2010-08-13 Thread Simon J Welsh
On 14/08/2010, at 9:59 AM, Ashley Sheridan wrote: > I've only ever done something like this via the command line. Having > said that, could you maybe pass a command line string to exec(). > Something like (untested): > > echo 'password' | mysql -u root -p < query > > I believe that is the right

Re: [PHP] $_SERVER['REMOTE_ADDR'] and sql injection

2010-06-23 Thread Simon J Welsh
There's a vulnerability in using anything from the user in SQL queries. Escape it :) On 23/06/2010, at 6:53 PM, Tanel Tammik wrote: > Hi, > > is there a vulnerability with using $_SERVER['REMOTE_ADDR'] in sql queries? > > Br > Tanel > > > > -- > PHP General Mailing List (http://www.php.net

Re: [PHP] last modified on a page

2010-06-13 Thread Simon J Welsh
On 14/06/2010, at 4:11 PM, David Mehler wrote: > Hello, > I've got what is probably a simple question. I've got a site with a > footer include file. I want to have a section that displays the last > time the page was modified. So for example say the index.php was last > modified today and another

Re: [PHP] is

2010-06-11 Thread Simon J Welsh
On 12/06/2010, at 8:43 AM, Daevid Vincent wrote: >> -Original Message- >> From: tedd [mailto:tedd.sperl...@gmail.com] >> >> I believe, just because it can be done doesn't mean that it >> should be done. >> >> My practice is *never* to use > >> In fact, my practice is to not only use

Re: [PHP] PHP -r, -a and .php return different results based upon " or ' marks !? [BUG]

2010-06-10 Thread Simon J Welsh
On 11/06/2010, at 12:49 PM, Daevid Vincent wrote: > Chew on this... > > develo...@mypse:~$ cat ./md5test.php > #!/usr/bin/php > $password = '12345678'; > echo md5(strtoupper($password)); > echo "\n"; > echo md5(strtoupper('12345678')); > echo "\n"; > > $password = '$12345678'; > echo md5(strto

[PHP] any major benefit in larger fread() blocks when reading STDIN?

2010-05-06 Thread Robert P. J. Day
i'm looking at some existing code that (obviously) reads from stdin: $fd = fopen("php://stdin", "r"); $source = ""; while (!feof($fd)) { $source .= fread($fd, 1024); } fclose($fd); it works fine, but is there any reason the original author would have chosen 1024 as the individual read

Re: [PHP] how to check for bandwidth limitations when uploading files?

2010-05-05 Thread Robert P. J. Day
Quoting Jochen Schultz : OS? Robert P. J. Day schrieb: probably not really a PHP question but i'll take a chance, anyway. i want to examine the network throughput i can get when continually uploading files from a PHP script via a POST request using the HTTP_Request2 class. i

[PHP] how to check for bandwidth limitations when uploading files?

2010-05-05 Thread Robert P. J. Day
probably not really a PHP question but i'll take a chance, anyway. i want to examine the network throughput i can get when continually uploading files from a PHP script via a POST request using the HTTP_Request2 class. i have a client-side script that simply takes files, creates a sh

[PHP] creating a PHP wrapper script?

2010-04-23 Thread Robert P. J. Day
n a regular basis, no? rday -- ==== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter:

Re: [PHP] Top vs. Bottom Posting.

2010-03-25 Thread Robert P. J. Day
same bullshit battles over and over again. rday -- ==== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page:

Re: [PHP] another question on setting include paths for a project

2010-03-23 Thread Robert P. J. Day
a different way, which is fine and might be what i'm after. rday -- ==== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: ht

Re: [PHP] another question on setting include paths for a project

2010-03-23 Thread Robert P. J. Day
point, if i want as much flexibility as possible, a developer who checks out one or more of these projects has to identify what directories he wants to work with, and all subsequent includes will work off of that. thoughts? sorry for rambling on so long. rday --

Re: [PHP] another question on setting include paths for a project

2010-03-22 Thread Robert P. J. Day
an environment variable to be consulted on the "server" side. rday -- ==== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page:

[PHP] another question on setting include paths for a project

2010-03-22 Thread Robert P. J. Day
rver-side" PHP scripts are also part of the entire SVN checkout just so i can keep everything in the same place for testing.) so how can i have those "server-side" scripts extend their search path based on, perhaps, the same environment variable? thoughts? rday --

Re: [PHP] no svn checkout of the current PHP development repo?

2010-03-20 Thread Robert P. J. Day
f this general list. rday -- ==== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://

[PHP] no svn checkout of the current PHP development repo?

2010-03-20 Thread Robert P. J. Day
mention it explicitly, not just the 5.x branches. rday -- ==== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter:

Re: [PHP] Re: where to make observations about current PHP manual?

2010-03-20 Thread Robert P. J. Day
On Fri, 19 Mar 2010, Daniel Brown wrote: > On Fri, Mar 19, 2010 at 20:57, Robert P. J. Day wrote: > > > >  i'm not sure that addresses my post -- it doesn't make grammatical > > sense to state that something is unavailable "since" something that is >

Re: [PHP] where to make observations about current PHP manual?

2010-03-20 Thread Robert P. J. Day
On Fri, 19 Mar 2010, Daniel Brown wrote: > On Fri, Mar 19, 2010 at 16:59, Robert P. J. Day wrote: > > > >  i don't see a separate mailing list for documentation so is this > > where i would point at oddities in the manual?  as in, here: > >

Re: [PHP] php compile / configure options

2010-03-19 Thread Simon J Welsh
On 20/03/2010, at 10:46 AM, Gregory Machin wrote: > Hi > I'm setting up a development environment that runs multiple versions of php. > I'm looking a list of the compile option options for each php release > other than "./configure --help" with more detail on what each option > does. > Any suggest

[PHP] Re: where to make observations about current PHP manual?

2010-03-19 Thread Robert P. J. Day
On Fri, 19 Mar 2010, Shawn McKenzie wrote: > Robert P. J. Day wrote: > > i don't see a separate mailing list for documentation so is this > > where i would point at oddities in the manual? as in, here: > > > > http://www.php.net/manual/en/language.variab

[PHP] where to make observations about current PHP manual?

2010-03-19 Thread Robert P. J. Day
eird, no? rday -- ==== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashco

Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Robert P. J. Day
On Fri, 19 Mar 2010, Mattias Thorslund wrote: > Robert P. J. Day wrote: > > (just a warning -- as a relative newbie to PHP, i'll probably have > > the occasional dumb question. just humour me.) > > > > i'm looking at some existing PHP code that access

[PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Robert P. J. Day
or or against? rday -- ==== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://cr

RE: [PHP] best way to set up an include path for a multi-level project?

2010-03-17 Thread Robert P. J. Day
standing you? rday -- ==== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://cra

RE: [PHP] best way to set up an include path for a multi-level project?

2010-03-17 Thread Robert P. J. Day
ROJ_DIR depending on which one they want to pick up for their code. does that more clearly explain what i think the right approach is? rday -- ==== Robert P. J. Day Waterloo, Ontario, CANADA

Re: [PHP] best way to set up an include path for a multi-level project?

2010-03-17 Thread Robert P. J. Day
On Tue, 16 Mar 2010, John Black wrote: > On 03/16/2010 06:57 PM, Robert P. J. Day wrote: > >i have a project (let's call it "proj") which lives in the "proj" > > directory and which contains several subdirs, some of which might > > contain their

[PHP] best way to set up an include path for a multi-level project?

2010-03-16 Thread Robert P. J. Day
g users to simply set a single env var has always worked for me. is that what others do to solve this? thanks. rday -- Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, T

  1   2   3   4   5   6   7   8   9   10   >