Re: [PHP] preg_replace

2013-11-01 Thread Adam Szewczyk
Hi, On Fri, Nov 01, 2013 at 11:06:29AM -0400, leam hall wrote: > Despite my best efforts to ignore preg_replace... Why? :) > PHP Warning: preg_replace(): Delimiter must not be alphanumeric or > backslash > > Thoughts? You are just using it wrong. http://us2.php.net/manual/en/regexp.reference.de

Re: [PHP] COM - Assigning to method.

2013-07-15 Thread Adam Nicholls
y project, so I'm beginning to think that using this COM API for this project is a no-go, which is unfortunate. I'm also guessing even if we did implement this API, exposing it as a Web Service is going to be tricky for performance sake (given that I've read that COM doesn't

Re: [PHP] COM - Assigning to method.

2013-07-14 Thread Adam Nicholls
Richard - I've tried that I get an error about it not being defined as property of the object. Andrew - do you mean try using the method Richard has shown? Cheers Adam. On 13 July 2013 17:11, Richard Quadling wrote: > > > > On 13 July 2013 01:24, Andrew Ballard wrote: >&g

[PHP] COM - Assigning to method.

2013-07-12 Thread Adam Nicholls
#x27;t work - I've also tried (below) but the API says wrong number of parameters $Record->Fields('BANK_fld_ACCOUNT_NAME', 'Test Account'); I've also tried something crazy like th

Re: [PHP] php links doest work when im using mod rewrite

2013-06-01 Thread Adam Szewczyk
This is more of an apache question. You can try below url. http://lmgtfy.com/?q=mod_rewrite+exclude+css On 1 June 2013 21:39, Farzan Dalaee wrote: > i starting to use mod rewrite but all my images or js links doest work > my current query string is: > index.php?r=blog&page=2 > i want to change

Re: [PHP] How to enable cURL php extension on Debian Wheezy?

2013-06-01 Thread Adam Szewczyk
On Sat, Jun 01, 2013 at 09:41:33PM +0200, Csanyi Pal wrote: > Hi, > > I just upgraded Squeeze to Wheezy, and have difficulties with cURL PHP > extension: I can't enable it. > > I have installed following packages related to this issue: > curl, libcurl3, libcurl3-gnutls, php5-curl. > > I have in

Re: [PHP] How to enable cURL php extension on Debian Wheezy?

2013-06-01 Thread Adam Szewczyk
On Sat, Jun 01, 2013 at 09:41:33PM +0200, Csanyi Pal wrote: > Hi, > > I just upgraded Squeeze to Wheezy, and have difficulties with cURL PHP > extension: I can't enable it. > > I have installed following packages related to this issue: > curl, libcurl3, libcurl3-gnutls, php5-curl. > > I have in

Re: [PHP] Load testing an app

2013-04-22 Thread Adam Richardson
to a DHCP server on a separate Windows server, and the database is SQL > Server 2008 (previously 2000). > PHP 5.4 offers performance improvements. I don't suspect the migration from SQL Server 2003 to 2008 caused any of these issues. > So, any ideas we can try? We'd probably

Re: [PHP] Compiler for the PHP code

2013-03-19 Thread Adam Nicholls
Checkout HipHop by the Facebook guys, it turns PHP into C code and compiles down to binary. ...although I don't think it's for the faint hearted. Have you tried other optimisation techniques first - eg Caching, and Profiling?? If this is a production environment you might wanna think about in

Re: [PHP] webDAV/CalDAV client class experience ?

2013-03-01 Thread Adam Tauno Williams
Does PHP provide some kind of XML building library? String building XML is *always* dicey and it is *VERY* easy to introduce encoding problems. Something at least with an codepage codec would be good. [although it *should* work, I manipulate WebDAV servers via curl CLI all the time]. In Python a combination of ElementFlow and the codecs module is perfection. I assume there is a PHP equivalent. -- Adam Tauno Williams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] webDAV/CalDAV client class experience ?

2013-03-01 Thread Adam Tauno Williams
On Sun, 2013-02-17 at 21:26 -0600, tamouse mailing lists wrote: > On Sat, Feb 16, 2013 at 2:30 PM, B. Aerts wrote: > > - the biggest mistake: apparently I commented the fwrite() call to the > > stream, which explains why he went in time-out ... (in this case, please DO > > shoot the pianist) > Nah

Re: [PHP] Close enough to Friday...

2013-02-28 Thread Adam Richardson
ring showers can do much more to save water, when I see simple ways I can consistently save cycles, I try to implement them :) Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Close enough to Friday...

2013-02-28 Thread Adam Richardson
ys, I just whipped this up so I could ditch Dreamweaver Templates (which I used so the templating happened prior to runtime, too), as I'm trying to save some money and I don't want to upgrade to the next version :) Happy Friday! Adam -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] Arrays

2013-02-25 Thread Adam Richardson
rray couldn't contain multiple items with the specialservice key (I'm assuming the second key 'secialservice' is just a typo), as any subsequent assignments would overwrite the previous value. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP fra

Re: [PHP] if (empty versus if (isset

2013-02-19 Thread Adam Richardson
ould return true because an empty string is one of the values that evaluates to false: - "" (an empty string) - 0 (0 as an integer) - 0.0 (0 as a float) - "0" (0 as a string) - NULL - FALSE - array() (an empty array) - $var; (a variable declared, but without a value) Adam -- Nephtal

Re: [PHP] Affordable low-fee e-commerce - DIY?

2013-02-18 Thread Adam Richardson
ough to code to some other API for free > (or at least cheaper)? > Thanks. > Not really a PHP question, but just FYI, Paypal and other providers provide micropayments options: https://www.paypalobjects.com/IntegrationCenter/ic_micropayments.html Adam -- Nephtali: A simple, flexibl

Re: [PHP] fopen and load balancing

2013-02-11 Thread Adam Tong
, 2013 at 4:26 AM, ma...@behnke.biz wrote: > > > Adam Tong hat am 10. Februar 2013 um 23:41 geschrieben: >> Hi, >> >> We had an issue with the code of a junior php developer that used >> fopen to load images using the url of the companies website that is >>

Re: [PHP] fopen and load balancing

2013-02-10 Thread Adam Richardson
On Sun, Feb 10, 2013 at 5:41 PM, Adam Tong wrote: > Hi, > > We had an issue with the code of a junior php developer that used > fopen to load images using the url of the companies website that is > load balanced. > > We could not the detect the problem in dev and test becau

[PHP] fopen and load balancing

2013-02-10 Thread Adam Tong
Hi, We had an issue with the code of a junior php developer that used fopen to load images using the url of the companies website that is load balanced. We could not the detect the problem in dev and test because the dev and test servers are not load balanced. I know that he could load the image

Re: [PHP] newbie with imap_mail_move

2013-02-09 Thread Adam Richardson
implode (",",$msg_no); > imap_mail_move($mbox,$messageset,$newmbox_name); > imap_expunge($mbox); > } > Where is the variable $msg_no coming from? Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] Integer

2013-02-01 Thread Adam Richardson
en scanning the second string for the first non-zero and storing the subsequent characters. Working with floats at that precision level would likely lead to tragic results: "10.0 times .1 is hardly ever 1.0" http://www.eg.bucknell.edu/~xmeng/Course/CS2330/Handout/StyleKP.html Adam -- Neph

Re: [PHP] seg fault with pecl ps extension

2012-11-28 Thread Adam Richardson
-time pass-by-reference: http://www.php.net/manual/en/language.references.pass.php Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] seg fault with pecl ps extension

2012-11-28 Thread Adam Richardson
compatible changes in PHP (e.g., http://www.php.net/manual/en/migration54.incompatible.php, http://php.net/manual/en/migration53.incompatible.php), you could try to avoid the PHP bindings Uwe developed and merely use PHP to call a C program that directly deals with his project pslib: http://pslib.sourceforg

Re: [PHP] globbed includes?

2012-11-18 Thread Adam Richardson
On Sun, Nov 18, 2012 at 3:29 PM, tamouse mailing lists < tamouse.li...@gmail.com> wrote: > There are certain times I'd like to include all files in a given > directory (such as configuration stuff that is split out by type, a la > apache conf.d). Anyone have something handy that implements that? >

Re: [PHP] serialize() casts numeric string keys to integers

2012-11-12 Thread Adam Richardson
onsistent with the standard key casts for arrays: http://php.net/manual/en/language.types.array.php Try dumping the array before the serialize operations. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-31 Thread Adam Richardson
Others have spoken on the topic of DI in functional languages, but I tend to use other approaches, such as passing in first-class functions (PHP's Closure objects create the appearance of this.) Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

Re: Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-31 Thread Adam Richardson
has said he leans procedurally: http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com

[PHP] Rest

2012-10-27 Thread Adam Tong
Hi, I need to develop a rest API.I want your feedback on how you develop rest apis. I don't want to use a heavy framework just for that, and I find url rewriting time consuming. Any suggestions? Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

Re: [PHP] PDO

2012-10-22 Thread Adam Richardson
012 21:15:00 UTC] PHP Fatal error: Call to a member function > prepare() on a non-object in html/index.html on line 23 > Can you show the code in db.php (just remember to remove any login credentials)? It looks like there's an issue creating the $db object you're using. Adam -- Nep

Re: [PHP] PHP to decode AES

2012-10-18 Thread Adam Richardson
hex format, but after > converting to hex and resubmitting, I still unprintable characters. > > Any info is appreciated. Can you post the Java code you're using? There are things such as the padding specification that could cause some issues. 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] Wrong time being displayed by PHP!

2012-10-16 Thread Adam Richardson
hours ahead of the real time. > > Why is this? What's going on? The server's time could be wrong. Or, code somewhere could be (re)setting the timezone. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com -- PHP General

Re: [PHP] stream_read function for registered wrapper class.

2012-09-19 Thread Adam Richardson
at a time, but I keep running into issues with the stream wrapper and > fread, stream_get_content functions. You could just use the XML Parser (SAX) as it doesn't require loading the entire document into memory: http://php.net/manual/en/book.xml.php Adam -- Nephtali: A simple, flexible,

Re: [PHP] PHP Threading on Windows

2012-09-14 Thread Adam Richardson
On Fri, Sep 14, 2012 at 9:40 PM, Joe Watkins wrote: > https://github.com/krakjoe/pthreads > > Windows Download on downloads page, it's a couple of days behind. Keep > watching ... enough to get you started ... That's pretty slick, Joe. Nice work! Adam -- Nephtali: A

Re: [PHP] PHP array unions

2012-09-14 Thread Adam Richardson
// can use the union operator without any additional calls and the performance is stellar $a3 = $a1 + $a2 // can use the values of the array using the convention that the value is what you expect to handle/manipulate foreach ($a3 as $val) { echo $val } Here, the clunkiness is the redundancy in t

Re: [PHP] PHP array unions

2012-09-13 Thread Adam Richardson
get cute, I could store the value in the key (e.g., array('value 1' => 0, 'value 2' => 0, ...)), and that allows me to use the '+' operator. In spite of the nice performance benefits of this approach (leveraging the hashes benefits), the code that utilizes th

Re: [PHP] The end of "mysql"

2012-09-07 Thread Adam Richardson
, I'm told I'm s... outta luck. What about PDO? Is that available? 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] templeting

2012-09-04 Thread Adam Richardson
, it's really a templating framework with input validation capabilities. 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] OT (maybe not): Drupal vs WordPress

2012-08-28 Thread Adam Richardson
r semi-joking line :) If build a blog using Wordpress, build Wordpress using Drupal, build a Drupal using Symfony2, I'd feel the same way I feel after drinking several beers, eating a pizza, snacking on some hot wings, and polishing it all off with a banana split: bloated :) Adam -- Nepht

Re: [PHP] include selectively or globally?

2012-08-28 Thread Adam Richardson
On Tue, Aug 28, 2012 at 3:28 PM, Matijn Woudt wrote: > On Tue, Aug 28, 2012 at 7:18 PM, Adam Richardson wrote: > > Finally, you're the first one that actually has measured something. > You should redo your test with real world files, because in real world > functions aren

Re: [PHP] include selectively or globally?

2012-08-28 Thread Adam Richardson
On Tue, Aug 28, 2012 at 7:39 AM, Matijn Woudt wrote: > On Tue, Aug 28, 2012 at 3:49 AM, Adam Richardson wrote: >> On Mon, Aug 27, 2012 at 6:54 PM, Matijn Woudt wrote: >>> On Mon, Aug 27, 2012 at 10:56 PM, Haluk Karamete >>> wrote: > > First of all, I believe PH

Re: [PHP] include selectively or globally?

2012-08-27 Thread Adam Richardson
-defined classes and functions per request, even if they're unused), is certainly going to perform more slowly than selectively including the library on only the pages that need the library. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject

Re: [PHP] multiple forms one page

2012-08-26 Thread Adam Richardson
shed some light on some of the code you're seeing: http://www.ibm.com/developerworks/opensource/library/os-php-secure-apps/index.html Happy learning! 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] syntax error breaking in and out of php into html code

2012-08-25 Thread Adam Richardson
a config setting that would cause a syntax error for this type of example. 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] redefine a define ...

2012-08-25 Thread Adam Richardson
SOME_NAME_PATTERN"); Not too bad in terms of work, as PHP's parsing capabilities are really nice. Hope this gives you ideas :) 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] Is PHP unsuitable for HTML5 WebSockets?

2012-08-13 Thread Adam Richardson
other languages for this particular aspect of an application, as the resource management should be much easier to manage. I don't think there's a "right" tool for the job, but I do believe some language environments may better facilitate this specific type of development.

RE: [PHP] What do you call the end-user?

2012-07-20 Thread Adam Nicholls
all them Stakeholders or the Product Owner. Personally if I'm feeling a bit cheeky I'll go with "Muggle" - (thanks to J K Rowling!) - people just don't appreciate the magic involved behind the scenes in usability, infrastructure, application logic etc. Thanks Adam. ==

RE: [PHP] Entry point of an MVC framework

2012-07-13 Thread Adam Nicholls
all requests to your bootstrap (often named index.php) Building frameworks and going through the motions are a great way to build up experience and play with areas of the language you might not normally use, you might want to get inventi

RE: [PHP] database hell

2012-07-12 Thread Adam Nicholls
es with $DB1 $result = mysql_query("delete from userprefs where clientr=".mysql_real_escape_string($user,$db1)."", $db1); // do your queries again with $DB1 mysql_close($db1);//close db1 mysql_close($db2);//close db2 Cheers Adam. ==

Re: [PHP] Re: show info from mysql db

2012-06-10 Thread Adam Richardson
27;admin','Duk30fZh0u','trek_db') >     or die ('Could not connect to database'); You had been keeping the password secret, but it looks like you accidentally leaked it, so a replacement might be in order :) Glad you got it fixed. Typos can be littl

Re: [PHP] SQL Injection

2012-06-08 Thread Adam Richardson
On Fri, Jun 8, 2012 at 12:37 PM, Ethan Rosenberg wrote: > Is it possible to have a "meeting of the minds" to come up with (an) > appropriate method(s)? Minds, meet prepared statements :) Adam -- Nephtali:  A simple, flexible, fast, and security-focused PHP framework http://nep

Re: [PHP] Too many arrays! My head is exploding!

2012-05-29 Thread Adam Richardson
ke he's after is the power set of set ABC (minus the empty set): http://en.wikipedia.org/wiki/Power_set 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] Variables via url

2012-05-12 Thread Adam Richardson
this configuration in your server configuration file will result in less of a performance hit, as the configuration is loaded once when httpd starts, rather than every time a file is requested." Adam -- Nephtali:  A simple, flexible, fast, and security-focused PHP framework http://nephtaliproj

Re: [PHP] session lost problem

2012-04-23 Thread Adam Richardson
sion_commit(), which is actually an alias for session_write_close(). This function actually stops the current session. So, when you hit the line $_SESSION['test'] = 'test', your session has already terminated. Try removing the session_commit() calls (or at least permanently re

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

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] 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] $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] 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] 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

[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] Race Condition In PHP Session Handler

2012-02-20 Thread Adam Tauno Williams
On Mon, 2012-02-20 at 20:02 +0100, Matijn Woudt wrote: > On Mon, Feb 20, 2012 at 7:21 PM, Adam Tauno Williams > wrote: > > php-5.3.3-3.el6_2.6.x86_64 > > 2.6.32-220.4.2.el6.x86_64 > > The PHP session file. Originally I had a tmpfs mounted for the session > > files

[PHP] Race Condition In PHP Session Handler

2012-02-20 Thread Adam Tauno Williams
007fa177531767 in ?? () #16 0x7fa177531a7a in ?? () #17 0x7fa177531dab in ap_mpm_run () #18 0x7fa177509900 in main () -- System & Network Administrator [ LPI & NCLA ] <http://www.whitemiceconsulting.com> OpenGroupware Developer <http://www.opengroupware.us> Adam

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

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

[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] 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

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

[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] 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

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] 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] 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] 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
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] 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] 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] 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] 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] 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] array problem

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

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

[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; -

[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

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

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

  1   2   3   4   5   6   7   8   9   10   >