Re: [PHP] Permission Denied - Help Requested

2011-03-29 Thread Adam Richardson
ge the permissions on the directory so the group has write permissions: sudo chmod -R 2775 /home/username/path/to/uploads 4. Then try the script again. See if that works. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Permission Denied - Help Requested

2011-03-29 Thread Adam Richardson
On Tue, Mar 29, 2011 at 8:21 PM, Ethan Rosenberg wrote: > At 05:33 PM 3/29/2011, Adam Richardson wrote: > >> > >> > Thanks. >> > >> > What do you see if you run this? "Can't open or create file!" >> > >> > Ethan >&g

Re: [PHP] the best 1 book for php

2011-04-06 Thread Adam Richardson
th PHP.net. And, on the rare occasion you would need more speed than your PHP script is providing, you'll be able to write you're own extension to PHP using it's older brother, C. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Security Question

2011-04-08 Thread Adam Richardson
sed or custom), all requests should run over https instead of http. - Escape output according to context (html, attribute, or url.) If you google the above topics, you'll find some great sites/blogs that address these topics in detail. Adam P.S. - Or, you can just use my one-file

Re: [PHP] $_POST vars

2011-04-13 Thread Adam Richardson
/) > To unsubscribe, visit: http://www.php.net/unsub.php > > I'm not sure what you're asking, but you can set the values of the POST array directly within a script, for instance: $_POST['new_key'] = 'new_value'; Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] email w/attachments

2011-04-17 Thread Adam Richardson
ork for managing the flow of the application, and I just include the specific Zend files needed in a particular page. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] str_replace

2011-04-24 Thread Adam Richardson
$puzzle[$i] = $puzzle_filler[mt_rand(0, ($puzzle_filler_length - 1))]; } } return $puzzle; } echo fill_puzzle($puzzle = "%ECARBME%TIPLUP%%%E%%", $puzzle_filler = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); Happy Easter :) Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] make links

2011-05-02 Thread Adam Preece
hi, then use this. > if (current_user_can('level_10')) : ?> > http://www.google.com\"; target=\"_self\">My Link"; > ?> > > > > > hope this helps Adam On 2 May 2011, at 17:49, Michael Simiyu wrote: > hello, > > i wa

[PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-02 Thread Adam Preece
Hi, im building a cms and im currently thinking of a way to build an add page function. any one got some ideas on the best way to achieve this? cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-02 Thread Adam Preece
ope this is a better explanation for you guys. cheers On 2 May 2011, at 18:12, Ashley Sheridan wrote: > On Mon, 2011-05-02 at 17:59 +0100, Adam Preece wrote: >> >> Hi, >> >> im building a cms and im currently thinking of a way to build an add page >> function. >

Re: [PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-02 Thread Adam Preece
ystem. if you have the time could you please tell me more how i could achieve a modular template system? cheers On 2 May 2011, at 18:52, Ashley Sheridan wrote: > On Mon, 2011-05-02 at 18:43 +0100, Adam Preece wrote: >> >> Hi, >> >> sure i will try to be more s

Re: [PHP] what would be the best way to build a 'add page function' to my cms?

2011-05-04 Thread Adam Preece
gt; At 7:19 PM +0100 5/2/11, Adam Preece wrote: >> the reason, why i don't want to use word press and any other open source >> solution, is that i want to learn how it is all done. im sure i can figure >> it out myself but i would like to ask others and see how they would

[PHP] accessing data from an array within an array.

2011-05-07 Thread Adam Preece
-07 06:49:39 [image] => [user_access_id] => 1 ) How do i access each array within the array and throw out the data for each one. im pretty confused on this one. any help would be appreciated. Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] accessing data from an array within an array.

2011-05-07 Thread Adam Preece
rray['row'] > > Foreach($array['row'] as $key=>$values) > { > Echo $values.PHP_EOL; > } > > > > > Richard L. Buskirk > > -Original Message- > From: Adam Preece [mailto:a...@blueyonder.co.uk] &g

Re: [PHP] Bold links

2011-05-07 Thread Adam Preece
Hi, > get_currentuserinfo(); > > echo 'Welcome  ' . "".$current_user->user_firstname . "."\n"; > echo '' ". $current_user->user_lastname . "".\n"; > ?> On 7 May 2011, at 18:42, Michael Simiyu wrote: > hey, > > some php 101 here guys :) > > i want to bold the first name and la

Re: [PHP] Bold links

2011-05-09 Thread Adam Richardson
se nuanced differences will eventually enhance the experience of those who are using screen readers. So, while I don't necessarily recommend using a lot of and tags now, it's likely that in the near future their use will again be encouraged as HTML5 becomes better supported. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Bold links

2011-05-10 Thread Adam Richardson
e learned much from your posts, and this discussion does not detract from that. However, I want to make sure the developers subscribing to the list will consider the use of the and tags as recommended by the W3C in (X)HTML5. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Bold links

2011-05-10 Thread Adam Richardson
Hi Ash, I want to clarify a couple points. On Tue, May 10, 2011 at 2:27 PM, Ashley Sheridan wrote: > On Tue, 2011-05-10 at 13:46 -0400, Adam Richardson wrote: > > Hi Tedd, > > How's it going? I'm very pleased with the emphasis on accessibility you > bring to th

Re: [PHP] Bold links

2011-05-15 Thread Adam Richardson
> > On Sun, May 15, 2011 at 7:48 PM, tedd wrote: At 1:46 PM -0400 5/10/11, Adam Richardson wrote: > >> The rest of the list does show you've read a fair amount in the past month >> (just as others on this list, including me), but what does it do to >> sp

Re: [PHP] [SPAM] Re: Explode Question

2011-05-18 Thread Adam Richardson
On Wed, May 18, 2011 at 6:42 PM, Michelle Konzack < linux4miche...@tamay-dogan.net> wrote: > Hello ad...@buskirkgraphics.com, > > since YOU ARE an ADMIN, you should real know abut, > HOW TO WRITE A NEW MESSAGE and not to hijack a SPAM thread... > What? -- Nephtali: A simple, flexible, fast, an

Re: [PHP] Filtering data not with mysql...

2011-05-18 Thread Adam Richardson
l:* Don't rush. Carefully deliberate on the context, both in terms of the expectations for input AND the nature of output. If you do this, you eventually will get the level of security you're after (that, and fuzz the heck out of something before you send it to Rasmus :) Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Filtering data not with mysql...

2011-05-18 Thread Adam Richardson
On Wed, May 18, 2011 at 10:46 PM, Adam Richardson wrote: > > I'm a security expert by any means, as I've made mistakes in the past that > have provided education the hard way! > Just to be very clear, this is a mistake (as the rest of the sentence implies), and it should h

Re: [PHP] A Review Request

2011-05-19 Thread Adam Richardson
chieve higher levels of security. That said, you made some really nice points, and I'm hopeful Tedd considers them carefully. His site is a nice resource for many PHP developers already (especially those just starting out), and these changes can only make it better. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] A Review Request

2011-05-19 Thread Adam Richardson
On Thu, May 19, 2011 at 8:51 PM, Alex Nikitin wrote: > Hey Adam :) > > I devoted entire 3 minutes to glimpsing over the code and showing simple > ways to fix them, you make excellent points, i simply didnt even look into > them. You are absolutely correct in saying that sha1 a

Re: [PHP] problem in onclick

2011-05-20 Thread Adam Richardson
cking it in >> JavaScript. You need AJAX for that, don't you? >> > > AJAX = JavaScript. > > Well, no, Ajax is the combination of multiple technologies: http://www.w3schools.com/ajax/default.asp <http://www.w3schools.com/ajax/default.asp>Adam -- Nephta

Re: [PHP] a Debate here - How can you check a if a file is a UTF-8 without the BOM using PHP ?

2011-05-21 Thread Adam Richardson
TF-8 and look for improper encodings. As far as a PHP function that already does this, I'm not aware of it, but you could make a system call to "file" if your on Linux, as it tries to automatically determine the encoding: http://linux.die.net/man/1/file Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Script ID?

2011-05-21 Thread Adam Richardson
PHP_SELF (dangerous) $_SERVER['SCRIPT_FILENAME'] $_SERVER['REQUEST_URI'] (dangerous) __FILE__ basename(__FILE__) basename($_SERVER['SCRIPT_NAME']) Try to enter the attack vector and you'll see PHP_SELF could be terrible, but the basename option for script_filename and __FILE__ are immune. Again, sorry for the confusion. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

[PHP] building a key value pair dynamically

2011-06-01 Thread Adam Preece
hi all, is it possible to dynamically build a key value pair array in php from a database result? if so how? kind regards Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] building a key value pair dynamically

2011-06-01 Thread Adam Preece
=>category 1 [1] => 3=>category 2 [2] => 4=>category 3 [3] => 5=>category 4 [4] => 6=>category 5 [5] => 7=>category 6 [6] => 8=>category 7 [7] => 9=>category 8 [8] => 10=>category 9 [9] => 11=>category 10 hope this makes sense? kind rega

Re: [PHP] notices nightmare - looking for a regex solution

2011-06-01 Thread Adam Richardson
ns, $replacement = $re_replaces, $subject = $php)) !== null) ? $temp_php: $php; I'm confident you can easily use PHP to do this, and hopefully this info is enough to get you started. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Re: about php comet

2011-06-02 Thread Adam Richardson
d, if you wanted to write an extension to facilitate long polling, you could, but given the natural latencies for these requests, I'm not sure you'd find a significant benefit. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Re: about php comet

2011-06-03 Thread Adam Richardson
On Fri, Jun 3, 2011 at 2:20 AM, 李白|字一日 wrote: > is there an efficient way to hold the requests while loop is an expensive > way in most cases. You can call sleep(number_of_seconds_to_sleep) within the while loop to lower the cost, so to speak. > and i don't know how to notify the holding conn

Re: [PHP] Re: about php comet

2011-06-03 Thread Adam Richardson
On Fri, Jun 3, 2011 at 3:43 AM, 李白|字一日 wrote: > > > 2011/6/3 Adam Richardson > >> On Fri, Jun 3, 2011 at 2:20 AM, 李白|字一日 wrote: >> >>> is there an efficient way to hold the requests while loop is an expensive >>> way in most cases. >> >> &g

[PHP] Best authentication system

2011-06-04 Thread Adam Tong
Hi, I'm running a site for which I need an authentication system. I have already my own (that is too simplistic and not very secure). I want some advice here. I checked PEAR, but as there are several options there, I was not sure which one to choose. Here are my needs: - Some sections of the site

[PHP] Help needed with php.ini

2011-06-05 Thread Adam Tong
Hi, I can't set correctly the error display and reporting properties. I don't know what i'm doing wrong. Here is the section that i modified in php.ini: - display_errors = On ; Default Value: On ; Development Value: On ; Production Value: Off display_startup_errors = On ; Default V

[PHP] Can't use class "'DOMDocument"

2011-06-06 Thread Adam Tong
Hi, When I try using DOMDocument I get the following error: Fatal error: Class 'DOMDocument' not found in ... I guess something has to be fixed in my php.ini? Here is my php version: # php -version PHP 5.3.6 (cli) (built: Mar 17 2011 20:58:15) Copyright (c) 1997-2011 The PHP Group Zend Engine v2

[PHP] advice on how to build this array from an array.

2011-06-07 Thread Adam Preece
d] => 10 [main_nav] => true [cat_name] => material range ) is it possible to build an array and use the [cat_name] as the key and assign all the pages to that cat_name? what im trying to achieve is a category of pages but i want the cat_name as the key to all the pages associated to it h

Re: [PHP] advice on how to build this array from an array.

2011-06-07 Thread Adam Preece
e_cat_id] => 9 [main_nav] => true ) [1] => Array ( [name] => metric iso threads [id] => 29 [page_cat_id] => 9 [main_nav] => true )] ? hope this makes sense Adam On 7 Jun 2011, at 22:25, Jasper Mulder wrote: > > >> From:

Re: [PHP] Can't use class "'DOMDocument"

2011-06-08 Thread Adam Tong
ard L. Buskirk > > -Original Message- > From: Adam Tong [mailto:adam.to...@gmail.com] > Sent: Monday, June 06, 2011 9:49 PM > To: php-general@lists.php.net > Subject: [PHP] Can't use class "'DOMDocument" > > Hi, > > When I try using DOMDocument I get the

Re: [PHP] newbie date time question

2011-06-22 Thread Adam Balogh
, David Nicholls wrote: > On 23/06/11 12:23 AM, Adam Balogh wrote: > >> hi, >> >> you have a PM(/AM) in your date ($d[0]), so put an "A" (Uppercase Ante >> meridiem and Post meridiem) format char to your $format variable. >> >> b3ha >> &g

[PHP] help with an array if its possible!

2011-06-22 Thread Adam Preece
. CAT NAME PAGE NAME ASSOCIATED TO THE CAT NAME and i cannot think of how i can structure an array to pass in to achieve this and/or is it even possible :-/. i hope this makes sense. i'm truly stuck! kind regards

[PHP] Php filter validate url

2011-06-26 Thread Adam Tong
Hi, I wanted tu use php filters for validation to avoid regular expresions. Is it possible that FILTER_VALIDATE_URL only checks if the string has http:// and do not check for the format domain.something? $url = 'http://wwwtestcom'; $url = filter_var($url,FILTER_VALIDATE_URL); echo $url; -

Re: [PHP] ApiGen - a tool for generating source code documentation

2011-06-29 Thread Adam Richardson
I'll try it on my PHP 5.3 web framework later today. Thanks for working on this project! Adam 2011/6/29 Ondřej Nešpor > Hi everybody! > > We'd like to introduce you our documentation generator - ApiGen 2. We use > it as a replacement for PhpDocumentor (that is not be

Re: [PHP] Linking A C Program Example to PHP

2011-07-10 Thread Adam Richardson
ut the example will NOT work via the web browser on my Apache 2 > (2.2.17) / PHP (5.3.5) Web Server! > > Did you reload or restart apache after making the edits to php.ini? For example: $ /etc/init.d/apache2 restart Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] How to sum monetary variables

2011-07-18 Thread Adam Richardson
e. That said, when you need more precision than PHP's standard handling of floating points (http://php.net/manual/en/language.types.float.php), you can use PHP's BC Math functions to enforce arbitrary precision: http://www.php.net/manual/en/ref.bc.php <http://www.php.net/manual/en/ref.bc

Re: [PHP] How to sum monetary variables

2011-07-18 Thread Adam Richardson
es.postgresql.org/pgsql-general/2008-05/msg00979.php>Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

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

2011-08-19 Thread Adam Richardson
de like that below: function error_handler($errno, $errstr, $errfile, $errline) { // must take into account error suppressor (@) and not do anything with them (they equal 0) // http://framework.zend.com/issues/browse/ZF-3829 // check against current error_reporting bitmasks if (!(\error_reporting

Re: [PHP] array problem

2011-09-09 Thread Adam Balogh
hi, try to use print_r or var_dump to echo compound data type

Re: [PHP] Sequential access of XML nodes.

2011-09-26 Thread Adam Richardson
/manual/en/intro.xmlreader.php In terms of dealing with various forms of compression, I believe you con use the compression streams to handle this: http://stackoverflow.com/questions/1190906/php-open-gzipped-xml http://us3.php.net/manual/en/wrappers.compression.php Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Friday Distraction

2011-10-28 Thread Adam Richardson
ool though. > > Well, Daniel, I'll bet you never thought that your "Friday Distraction" would elicit such a broad range of responses AND keep the commentary coming right through to the next Friday. Nice :) Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Re: Writing out errors to a file

2011-11-03 Thread Adam Richardson
ombination of set_error_handler() and within the handler using error_log() works very well. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] delete and recreate

2011-11-09 Thread Adam Richardson
think > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Make sure PHP has the permissions needed to delete and create files in the directory. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] PHPExcel

2011-11-29 Thread Adam Balogh
Hi, *Heres the documentation:* http://phpexcel.codeplex.com/releases/view/45412#DownloadId=212183 In user doc: *4.2 Reading Only Named WorkSheets from a File* * * and you can get all the sheet names: http://www.auditbureau.org.au/a/Documentation/API/PHPExcel/PHPExcel.html#methodgetSheetNames

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Adam Richardson
reverse order of operations using a decrypt function, I'd just like to double check it before commenting.) By the way, I wouldn't recommend using ECB mode unless you have a special circumstance: http://www.quora.com/Is-AES-ECB-mode-useful-for-anything Adam (Sorry for the duplicate, Rick, I forgot to reply all the first time.) -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Adam Richardson
> > Can you post your decrypt function too? > > You create a random IV here, don't you need that IV to decrypt too? > > You're normally right, Matijn, However, ECB mode doesn't use an IV, so even though he's generating an IV, it's not being used (and, the b

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Adam Richardson
On Wed, Nov 30, 2011 at 4:25 PM, Matijn Woudt wrote: > On Wed, Nov 30, 2011 at 10:18 PM, Adam Richardson > wrote: > > On Wed, Nov 30, 2011 at 4:14 PM, Matijn Woudt wrote: > > > >> On Wed, Nov 30, 2011 at 9:57 PM, Rick Dwyer > wrote: > >> > Hello a

Re: [PHP] Preferred Syntax

2011-12-14 Thread Adam Richardson
on't change code that uses another convention, as I think it's most beneficial to stay with the established conventions in any codebase (unless you're establishing a new convention and refactoring the entire code base.) This is just my general preference, and I don't believe there is consensus as to the most appropriate. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Re: Preferred Syntax

2011-12-16 Thread Adam Richardson
ly handles output escaping, input validation: http://nephtaliproject.com/documentation/examples/contact.php - And lots of other features that coincide with the general focus of your words. Given that work, I think it's fair to say that I do agree with several of your general points f

Re: [PHP] Date function kill lots time !

2012-01-04 Thread Adam Richardson
ttps://bugs.php.net/bug.php?id=39968 Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

[PHP] php://input

2012-01-14 Thread Adam Tong
Hi, I am trying to read variables from input method. I am using this tuorial: http://www.lornajane.net/posts/2008/Accessing-Incoming-PUT-Data-from-PHP. Here is my code: I am using the firefox extension "poster" to run this example. GET works fine but when using PUT, file_get_contents("php://inp

Re: [PHP] differences in between these env. variables

2012-01-27 Thread Adam Richardson
> Yep, can be different: http://stackoverflow.com/questions/279966/php-self-vs-path-info-vs-script-name-vs-request-uri Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] differences in between these env. variables

2012-01-29 Thread Adam Richardson
On Sun, Jan 29, 2012 at 11:38 AM, Tedd Sperling wrote: > On Jan 27, 2012, at 12:45 PM, Adam Richardson wrote: > > > On Fri, Jan 27, 2012 at 12:09 PM, Tedd Sperling > wrote: > > On Jan 11, 2012, at 9:24 PM, tamouse mailing lists wrote: > > > > > Is there ev

[PHP] Long Live GOTO

2012-02-05 Thread Adam Richardson
Hi, While not purely focused on PHP, I toss this out to the group because I believe there are some novel, interesting points regarding the potential benefits of using the goto construct as implemented in PHP: http://adamjonrichardson.com/2012/02/06/long-live-the-goto-statement/ Adam

Re: [PHP] Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater wrote: > On 06 Feb 2012 at 07:47, Adam Richardson wrote: > > > While not purely focused on PHP, I toss this out to the group because I > > believe there are some novel, interesting points regarding the potential > > be

Re: [PHP] Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 4:25 AM, Adam Richardson wrote: > On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater wrote: > >> On 06 Feb 2012 at 07:47, Adam Richardson wrote: >> >> > While not purely focused on PHP, I toss this out to the group because I >> > believe ther

Re: [PHP] Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 10:05 AM, Robert Cummings wrote: > On 12-02-06 04:07 AM, Tim Streater wrote: > >> On 06 Feb 2012 at 07:47, Adam >> Richardson> >> wrote: >> >> While not purely focused on PHP, I toss this out to the group because I >>>

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
tc.) and what restrictions the language places on the construct. Again, the PHP version of the construct is beneficially quite restrictive. For instance, some people don't like giving programmers access to pointers just because you can get into so much trouble with them, but I wonder if they'd be concerned about Go's pointers, which don't allow pointer arithmetic, limiting one are of potential trouble: http://golang.org/doc/go_for_cpp_programmers.html#Conceptual_Differences Interesting. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
at was probably a lot of work! Interesting that C++ was not allowed. Thanks for the background information, Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: Re: [PHP] Long Live GOTO

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 11:58 AM, Tim Streater wrote: > On 06 Feb 2012 at 09:48, Adam Richardson wrote: > > > On Mon, Feb 6, 2012 at 4:25 AM, Adam Richardson >wrote: > > > >> On Mon, Feb 6, 2012 at 4:07 AM, Tim Streater > wrote: > > >> I disagr

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Adam Richardson
of the time creating designs that adapt accordingly.) All this to say, I don't use PHP to handle this aspect of the development. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Adam Richardson
n > > Good code uses Exceptions and try catch for that kind of scenarios. > Marco, Do you know of any research (Human Factors, Bug Analysis, etc.) that supports this? I'm certainly not saying that your assertion is incorrect. However, I'm starting to compile relevant research

Re: [PHP] Headers on smart phone browsers

2012-02-06 Thread Adam Richardson
On Mon, Feb 6, 2012 at 3:50 PM, Adam Richardson wrote: > On Mon, Feb 6, 2012 at 12:58 AM, Paul M Foster wrote: > >> This is sort of obliquely related to PHP. >> >> I don't have a smart phone, but I need to know a couple of things: >> >> 1) Do smart phones

Re: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread Adam Richardson
c, hmvc, > factory, commander etc.. Higher-order functions: http://programmers.stackexchange.com/questions/72557/how-do-you-design-programs-in-haskell-or-other-functional-programming-languages Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Help! Having trouble getting one XML field from this feed reliably

2012-02-08 Thread Adam Richardson
r checks to see what issues curl may be having: $str = curl_exec($ch); $error_no = curl_errno($ch); curl_close ($ch); if ($error_no != 0) throw new Exception('There was an error retrieving the string contents of the url \''.$url.'\'. CURL error number:'.$error

Re: [PHP] Help! Having trouble getting one XML field from this feed reliably

2012-02-09 Thread Adam Richardson
/simplexmlelement.construct.php It is pretty convenient that SimpleXMLElement allows you to grab URL's, but curl allows me to manually set a timeout limit (along with many other things, although they're not necessarily needed in Rob's example), so I tend to use curl in this type si

[PHP] Great video by Bret Victor: Inventing on Principle

2012-02-25 Thread Adam Richardson
Saw this on the Clojure list and thought it was worth sharing here, too: http://vimeo.com/36579366 Worth the hour of time to watch it, as it has some great ideas for improving the experience of developers. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http

Re: [PHP] Insert new array after specific key in multidimensional array

2012-02-28 Thread Adam Richardson
t I can't seem to find the > perfect solution. :( > > Many thanks in advance for the help! > > Cheers, > Micky > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Out of curiosity, why are yo

Re: [PHP] How do I enable more useful PHP error logging?

2012-02-28 Thread Adam Richardson
p > > I tend to set up a custom error handler that throws exceptions (set_error_handler()), then set up an exception handler (set_exception_handler()) that logs the backtrace (or saves it to a db) available using debug_backtrace(). Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] $POST and $_SESSION

2012-03-15 Thread Adam Richardson
ESSION[$key] : null; } else { return $_SESSION[$key] = $val; } } Then, you can just write: $first_name = s('first_name', p('first_name')); Adam -- Nephtali:  A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Thinking out loud - a continuation...

2012-03-21 Thread Adam Richardson
ot;pass","description":{"hair":"brunette","eyes":"hazel","build":"petite"}}} > > jslint.com verifies this as good JSON (although I thought there had to be > square brackets around child arrays). Speaking to your belief

Re: [PHP] PHP: "superior code quality"

2012-03-28 Thread Adam Richardson
es of .62, .20, and .21 respectively. > " > > http://www.coverity.com/html/press/open-source-code-quality-on-par-with-proprietary-code-in-2011-coverity-scan-report.html Very nice! Thanks for sharing, Kirk. Adam -- Nephtali:  A simple, flexible, fast, and security-focused PHP framewo

Re: [PHP] Variable representation

2012-04-01 Thread Adam Randall
foreach( $images as $k => $v ) { $k++; // increment k since it starts at 0, instead of 1 if ( strlen( trim( $v ) ) ) { echo "http://www.theverseoftheday.info/store-images/"; . $v . "\" title=\"Image " . $k . "\">Image " . $k . "\r

[PHP] Redirection after login with security

2005-04-10 Thread Adam Hubscher
Synopsis: I am writing a management system for a MSSql database driven game, and I've run into an issue. The community site is located on a remote webserver, to protect the actual server from any possible vulnerabilities in the community application/forum application (as we all have seen the re

Re: [PHP] PHP Web Hosting

2004-04-19 Thread Adam Voigt
r web hosting company before my site just goes away. > > Stanley G. Martin > System Administrator > Sprint - EAS Business Intelligence > [EMAIL PROTECTED] -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] adding -'s to a numeric string

2004-04-21 Thread Adam Williams
Hi, I have a form where I have a user entering in the date in a numeric string. For today they would enter 04212004 and so on...I'm working on this date within mysql server, and mssql server handles dates as 04-21-2004 when you use convert(varchar,field,110). So how in PHP can I change a vari

Re: [PHP] system command?

2004-05-10 Thread Adam Voigt
defined at http://us2.php.net/manual/en/ref.exec.php and none > seem to have the desired effect. > > $tailed = shell_exec('tail -f /path/to/log'); > //$tailed = exec('tail -f /path/to/log'); > //$tailed = system('tail -f /path/to/log'); > print

RE: [PHP] system command?

2004-05-10 Thread Adam Voigt
> > P.S. Stop top posting too. -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] rounding average to one decimal point

2004-05-10 Thread Adam Williams
Hi, I have a randon group of numbers I need the average of. When I add them up and divide by how many there are and print the result, I get a lot of decimal places. The number comes out to look like 29.3529411765, but I don't need that many decimal places. rounding to one decimal place will

Re: [PHP] rounding average to one decimal point

2004-05-10 Thread Adam Williams
On Mon, 10 May 2004, Richard Davey wrote: > Hello Adam, > > Monday, May 10, 2004, 7:03:36 PM, you wrote: > > AW> Hi, I have a randon group of numbers I need the average of. When I add > AW> them up and divide by how many there are and print the result, I get a > AW&g

Re: [PHP] PHP graphing tool?

2004-05-10 Thread Adam Voigt
Any recommendations? > > Thanks! > Amanda -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] List() help

2004-05-09 Thread Adam Bregenzer
d a copy: $d = $MyArray; If you only want $d to be an array when there is more than one entry left do this instead: if (count($MyArray) == 1) { $d = array_shift($MyArray); } else { $d = $MyArray; } [1] http://www.php.net/array_shift -- Adam Bregenzer [EMAIL PROTECTED] http://adam.bregenzer.net/

RE: [PHP] LAMP

2004-05-07 Thread Adam Voigt
I've also heard the Perl Zealots claim the P could or does stand for Perl, but ignore there Jedi mind tricks. On Fri, 2004-05-07 at 11:00, Jay Blanchard wrote: > [snip] > Anyone know what LAMP stand for > [/snip] > > > All of us but you. > > Linux Apache MyS

Re: [PHP] Re: form submission logic

2004-05-07 Thread Adam Voigt
ames for the buttons, for example: -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Class variable unexpected behavior

2004-05-15 Thread Adam Bregenzer
"; > } > } $this->$a should be $this->a same with '$b': $this->$b should be $this->b -- Adam Bregenzer [EMAIL PROTECTED] http://adam.bregenzer.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Self Testing PHP Code... Is it possible or practical??

2004-05-27 Thread Adam Reiswig
there. Thanks for any pointers, ideas, advice or help you may have. -Adam R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] row colours

2004-06-05 Thread Adam Bregenzer
lternatively you could do: print "$item_1$item_2$item_4$item_5\n"; if ($i % 8 == 7) { print "\n"; } which would keep them the same color and add a blank row after every eighth; again adjust $i as necessary to fit. -- Adam Bregenzer [EMAIL PROTECTED] http://adam.bregenze

Re: [PHP] getting the line number

2004-06-07 Thread Adam Bregenzer
call was made from > the parent script to the subroutine. > > I know that I can get the line number of the current script, but that > doesn't tell me where the function was called from... debug_backtrace[1] should get you everything you want and then some. [1] http://ww

Re: [PHP] Can someone explain this?

2004-06-08 Thread Adam Voigt
g about signed versus unsigned integers? What I really > would like to do is convert that negative number (-71788), which I > suppose is unsigned to a signed integer (3961595508) without having to > convert it to hex, then back to decimal. > > Rene -- Adam Voigt [EMAI

[PHP] converting a char variable to an int?

2004-06-14 Thread Adam Williams
Hi, I have a variable that is created using the date command: $date = date("Ymd"); but its not working in my database this way (when I explicity enter 20040614 in my database, it works though). so I think PHP is making $date a character variable, so how can I force or change the caste of $date

Re: [PHP] converting a char variable to an int?

2004-06-14 Thread Adam Williams
eh nevermind, I found settype(); :) thanks On Mon, 14 Jun 2004, Adam Williams wrote: > Hi, I have a variable that is created using the date command: > > $date = date("Ymd"); > > but its not working in my database this way (when I explicity enter > 20040614 in

<    5   6   7   8   9   10   11   12   13   14   >