Re: [PHP] php.ini

2013-10-09 Thread Simon Schick
Hi, Jim I suggest to read this page of the tutorial. It seems, that it solves the questions, you posted here: http://www.php.net/manual/en/configuration.file.per-user.php Please be aware, that the ini-file is not re-read on every request, but after a defined time. Neither are all settings

[PHP] Which function returns a correct ISO8601 date?

2013-09-07 Thread Simon Schick
Hi, all Some days ago, I needed a date, formatted as date(c) ... To be a bit more object-oriented, I worked with an instance of DateTime. My first thought was: As the documenting for date() defines 'c' as ISO8601, I can take the constant provided in the DateTime object ... right? ... and that

Re: [PHP] Re: Which function returns a correct ISO8601 date?

2013-09-07 Thread Simon Schick
[('.' | ',') SSS]]]) Is there a format, you know of, that makes this difference (colon or not) bullet-prove? Bye, Simon On Sat, Sep 7, 2013 at 5:29 PM, Alessandro Pellizzari a...@amiran.it wrote: On Sat, 07 Sep 2013 14:47:00 +0200, Simon Schick wrote: The method date(c) actually formats a date

Re: [PHP] How to delete 3 months old records in my database?

2013-08-02 Thread Simon Schick
On Fri, Aug 2, 2013 at 2:02 PM, Karl-Arne Gjersøyen karlar...@gmail.com wrote: 2013/8/2 Dušan Novaković ndu...@gmail.com $query = DELECT FROM `__table_name__` WHERE `__date__` BETWEEN NOW() - INTERVAL 3 MONTH AND NOW() This delete everything from now and 3months backwards. I want to

Re: [PHP] Holding datetimes in a DB.

2013-03-01 Thread Simon Schick
Hi, Richard I, too, tought about switching to UTC times in my database. The only reason for me was to get prepared for globalisation. A good article about this consideration is written at PHP Gangsta (sorry, German only): http://www.phpgangsta.de/die-lieben-zeitzonen The reason, why I did not

Re: [PHP] templeting

2012-09-04 Thread Simon Schick
On Tue, Sep 4, 2012 at 8:16 AM, Louis Huppenbauer louis.huppenba...@gmail.com wrote: I'm mostly working with twig, a symfony2 framework component. I especially like it's template inheritance and the (in my opinion) very clear syntax. http://twig.sensiolabs.org/ Hi, all I most like to use

[PHP] Separate apc-caches for each fpm-pool

2012-08-28 Thread Simon Schick
Hi, all Not to get the bugfix https://bugs.php.net/bug.php?id=57825 too much off-topic, I write this question in the mailinglist here: Taking the case I have two fpm-pools on different sockets - the first pool is responsible for www.example1.com and the second one for www.example2.com. If

[PHP] Re: [PHP-DEV] Separate apc-caches for each fpm-pool

2012-08-28 Thread Simon Schick
Sorry, I first posted it with the wrong subject ([PHP-DEV] instead of [PHP]) http://news.php.net/php.general/318898 On Mon, Aug 20, 2012 at 11:44 AM, Simon Schick simonsimc...@gmail.com wrote: Hi, all Not to get the bugfix https://bugs.php.net/bug.php?id=57825 too much off-topic, I write

[PHP] Who is responsible for NFD or NFC formated UTF8 text? PHP, my application or the system-administrator?

2012-08-28 Thread Simon Schick
Hi, all Yesterday I ran into a big issue I didn't know about before: There are many ways in UTF8 to save the same character. This applies to all characters that can be combined of other characters. An example for that is the German umlaut ö. In theory it can be saved simply as ö or it can be

Re: [PHP] OT (maybe not): Drupal vs WordPress

2012-08-20 Thread Simon Schick
Hi, all +1 for that Joomla sucks ... worked with it for a while and just got more and more disappointed of the way they write stuff. Just look at how complicate it is to write an extension ... Just a bit off-toppic (since you're talking about WP vs Drupal), but I use Wordpress for small blogs

[PHP] [PHP-DEV] Separate apc-caches for each fpm-pool

2012-08-20 Thread Simon Schick
Hi, all Not to get the bugfix https://bugs.php.net/bug.php?id=57825 too much off-topic, I write this question in the mailinglist here: Taking the case I have two fpm-pools on different sockets - the first pool is responsible for www.example1.com and the second one for www.example2.com. If

Re: [PHP] Crash course

2012-08-20 Thread Simon Schick
Hi, Lester Just try to connect to your mysqlserver using a simple php script first. Example for MySqli: http://www.php.net/manual/en/mysqli.construct.php#example-1625 Example for MySql: http://www.php.net/manual/en/function.mysql-connect.php#refsect1-function.mysql-connect-examples If you

Re: [PHP] Crash course

2012-08-20 Thread Simon Schick
gave up because the developer won't fix those and I don't want to support my own fork of those extensions. Bye Simon On Mon, Aug 20, 2012 at 1:40 PM, Lester Caine les...@lsces.co.uk wrote: Simon Schick wrote: Just try to connect to your mysqlserver using a simple php script first. Actually

Re: [PHP] [PHP-DEV] SQLite - Unwanted values using group-by

2012-07-10 Thread Simon Schick
On Sun, Jul 8, 2012 at 12:33 AM, Matijn Woudt tijn...@gmail.com wrote: Both of the results are valid outcomes. I think you don't understand the GROUP BY clause well enough. The parameters in the SELECT clause, should be either 1) an aggregate function (like the max function you're using) 2)

[PHP] [PHP-DEV] SQLite - Unwanted values using group-by

2012-07-07 Thread Simon Schick
Hi, All May you have an idea ... Here's the full code-example: http://viper-7.com/M5mldG I have the following SQL command: SELECT max(r.month+r.year*100), r.year, r.month FROM base b LEFT JOIN remote r ON b.id = r.remote_id GROUP BY r.remote_id Now I expect that the first column in the

Re: [PHP] reload page without use header

2012-06-17 Thread Simon Schick
Hi, Farzan Redirecting is something you can do in a way the user doesn't see anything (I call them server-side redirects) and in a way the user get's informed that the url has changed (I call them client-side redirects). What I mean with server-side (mostly called internal redirects) is if the

Re: [PHP] Searching IDE.

2012-06-13 Thread Simon Schick
Hi, There was a discussion about that on Google+ ... IDEs mentioned there: __Free * Eclipse PDT (5x) * Aptana - based on Eclipse but not using PDT for PHP (2x) * Netbeans (12x) * VIM (6x) * KDevelop (1x) * gedit (3x) __NonFree * Sublime Text 2 (6x) - USD $59 * PhpStorm (7x) - €94 personal,

Re: [PHP] Which workstation????

2012-06-11 Thread Simon Schick
Simon On Tue, Jun 5, 2012 at 2:22 PM, Simon Schick simonsimc...@googlemail.comwrote: Hi, Farzan I do not really get your point of confusion ... What you've posted here are tools/frameworks that do not to the same stuff at all, yes you could even use all without missing something ... cakephp

Re: [PHP] Which workstation????

2012-06-05 Thread Simon Schick
Hi, Farzan I do not really get your point of confusion ... What you've posted here are tools/frameworks that do not to the same stuff at all, yes you could even use all without missing something ... cakephp .. is a full-stack PHP-Framework. Yes, I have to say that there's quite a bunch of

Re: [PHP] requesting comments on rajmvServiceLog (access + error logging through PHP and JS to MySQL)

2012-05-21 Thread Simon Schick
Hi, Rene I took a quick look over your code ... I kind-of like the idea having all logging at one place, but the code is a bit too messy if you ask me :) If you would have put it on github and I would fork it - the first thing I'd do is trying to get rid of the hm-lib and rewriting all in a bit

Re: [PHP] [missing] images .htaccess

2012-05-21 Thread Simon Schick
Hi, Muad I guess that you have a cms (would be nice to name it if it's not a custom one) that handles all requests coming into the system. Think now of How you know if the requested uri is a missing-image and write it down as mod_rewrite rule. Is this the only line you have in your

Re: [PHP] IDE

2012-05-07 Thread Simon Schick
On Mon, May 7, 2012 at 3:10 AM, Ethan Rosenberg eth...@earthlink.net wrote: === Simon - Thanks. I don't think you're talking about auto-form-fill and stuff like that, are you? No, I am not. Please send me your xdebug-config file. Thanks Ethan Hi, Ethan I forgot to

Re: [PHP] IDE

2012-05-06 Thread Simon Schick
On Mon, May 7, 2012 at 12:33 AM, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - Is there any IDE which will let me step thru my code AND give the opportunity to enter data; eg, when a form should be displayed allow me to enter data into the form and then proceed?  I realize the

Re: [PHP] function

2012-05-04 Thread Simon Schick
On Fri, May 4, 2012 at 4:29 AM, Dan Joseph dmjos...@gmail.com wrote: Are these inside classes or anything?  If they're just functions, they should work fine together, example of 2 working functions together: ?php hellotwo(); function helloone() {        echo hi 1; } function

Re: [PHP] Best PHP Template System

2012-04-26 Thread Simon Schick
On Thu, Apr 26, 2012 at 12:07 AM, Yared Hufkens y4...@yahoo.de wrote: Why use an external engine which slows your scripts down to do something which can easily be done by PHP itself? PHP is imho the best template engine for PHP. With PHP 5.4, it became even easier because ?=$do-somestuff()?

Re: [PHP] Should I check imput for bad chars in this case?

2012-04-26 Thread Simon Schick
On Thu, Apr 26, 2012 at 2:15 PM, mirrys.net mirrys@gmail.com wrote: Hi all, this is more question than real problem (I hope :)). I include this script into my pages to log IPs of visitors (they are saved info txt file and send to e-mail later): function getIPadress() {    if

Re: [PHP] Should I check imput for bad chars in this case?

2012-04-26 Thread Simon Schick
On Thu, Apr 26, 2012 at 3:59 PM, mirrys.net mirrys@gmail.com wrote: Thank you for your help Marco Simon. No doubt, your code is much cleaner and better. One more question, without any filter or something could be my original code somehow compromised (mean some security bug)? Or rather

Re: [PHP] PHP: a fractal of bad design

2012-04-12 Thread Simon Schick
2012/4/12 Daevid Vincent dae...@daevid.com: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ Can't say he doesn't have some good points, but he sure goes about it in a dickish way. Hi, Daevid I think this discussion is incomplete without mentioning the feedback from Anthony

Re: [PHP] Could apc_fetch return a pointer to data in shared memory ?

2012-04-02 Thread Simon Schick
2012/4/1 Simon slg...@gmail.com Another thing that's possible in .NET is the Singleton design pattern. (Application variables are an implementation of this pattern) This makes it possible to instantiate a static class so that a single instance of the object is available to all threads (ie

Re: [PHP] Watch out for automatic type casting

2012-03-29 Thread Simon Schick
Hi, Arno I don't know if this is written somewhere in the php-manual, but I really like this table: http://en.wikipedia.org/wiki/Order_of_operations#Programming_languages I do not really understand why this has some special stuff to do with typecasting ... This is just an order like the

Re: [PHP] Watch out for automatic type casting

2012-03-29 Thread Simon Schick
Hi, Arno FYI: I found a page in the php-manual that's exactly for that: http://www.php.net/manual/en/language.operators.precedence.php p.s. some of them were also new to me Thanks for getting me to read it. Bye Simon 2012/3/29 Simon Schick simonsimc...@googlemail.com: Hi, Arno I don't

Re: [PHP] including PHP code from another server..

2012-03-26 Thread Simon Schick
Hi, Rene I just want to say the same ... whatever you're trying to do here - it will end up in a major security-isse that (I think) you won't fix that soon as someone has hacked your server. That sounds like you don't wanna pay 10$ per month for a good multiple-domain-hosting solution. If you're

Re: [PHP] foreach weirdness

2012-03-25 Thread Simon Schick
2012/3/25 Arno Kuhl a...@dotcontent.net: will not only give the wrong result, it will corrupt the array for *any* further use of that array. I still think it’s a bug according to the definition of foreach in the php manual. Maybe php needs to do an implicit unset at the closing brace of

Re: [PHP] foreach weirdness

2012-03-23 Thread Simon Schick
2012/3/23 Robert Cummings rob...@interjinn.com On 12-03-23 11:16 AM, Arno Kuhl wrote: it still does not produce the correct result: 0 1 3 6 10 15 21 0 1 3 6 10 15 15 This looks like a bug... the last row should be the same. What version of PHP are you using? Have you checked the online

Re: [PHP] Bug zlib.output_compression not normal work in IIS7.5

2012-03-21 Thread Simon Schick
2012/3/19 小鱼虾 i...@xiaoyu.org How I do fix it ? https://bugs.php.net/bug.php?id=61434 Hi, I got a rough overview of the conversation in the bug-tracker ... You were always talking about a tool you used to test the gzip-compression ... but why not test it natively? Using Firefox (with the

Re: [PHP] Have little enough hair as it is ...

2012-03-12 Thread Simon Schick
2012/3/12 Lester Caine les...@lsces.co.uk: More irritating is 'Notice: Array to string conversion' which are coming up all over the place. I can understand what the problem is ... but trying to remove the notices is more challenging ... $secondsGap[] = array($gap[0] * 60, $gap[1] * 60); if(

Re: [PHP] Have little enough hair as it is ...

2012-03-11 Thread Simon Schick
with Apache2.4.1 and PHP5.4.0 and moved back to what should be the same versions as the working machines but without success. Simon Schick wrote: Can you give us some more information? I've been working on this for some days and tried various combinations of Apache and PHP, but my starting point

Re: [PHP] file url access funniness

2012-03-10 Thread Simon Schick
Hi, TR Shaw I would next try curl as php-extension. If that is working well, and you need it definitely with file() I'd use Wireshark to check which request is sent to the remote machine. Bye Simon 2012/3/10 TR Shaw ts...@oitc.com This is weird. This statement fails: $tlds =

Re: [PHP] Have little enough hair as it is ...

2012-03-10 Thread Simon Schick
Hi, Lester Can you give us some more information? How is php called in your apache-configuration? (f)cgi, module or somehow else? You said that the configuration should be the same ... can you double-check that? Reload the services etc ... What about the logs? There must be more info in there

Re: [PHP] Function mktime() documentation question

2012-03-07 Thread Simon Schick
Hi, All To bring a work-around into this discussion I myself would not see it as a good way to do it like that - even if the documentation provides some information around that. Here's what I have done in all new projects I worked with time-calculation: @Tedd: Lets pick up your first example and

Re: [PHP] SESSION var and Objects problem

2012-03-02 Thread Simon Schick
Hi, Jim To avoid this kind of problem it would also help to provide an autoloader-function as PHP then tries to load the class-definition by this autoloader ;) Using that you'd bind yourself to have a pretty good system for php-classes and you'd avoid having problems like that. I'd in fact have

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

2012-02-29 Thread Simon Schick
Hi, Daevid What you could do to have it quick is to install the plugin xdebug. Here you can (as described in the documentation linked here) enable to get some extra information for a E_* message from php. http://xdebug.org/docs/stack_trace I would not do that on a live-system where you have 30k

Re: [PHP] Website preview script

2012-02-29 Thread Simon Schick
Hi, Nibin I wonder what you'd call a website preview ... Do you mean a screenshot or the HTML-response from the server, specially prepared (sounds like you want to create a proxy ;))? Bye Simon 2012/2/29 Nibin V M nibi...@gmail.com No..what I am trying to write a website preview plugin

Re: [PHP] Website preview script

2012-02-29 Thread Simon Schick
: http://www.phpgangsta.de/screenshots-von-webseiten-erstellen-mit-php Bye Simon 2012/2/29 Ashley Sheridan a...@ashleysheridan.co.uk ** On Wed, 2012-02-29 at 19:54 +0100, Simon Schick wrote: Hi, Nibin I wonder what you'd call a website preview ... Do you mean a screenshot or the HTML

Re: [PHP] SimpleXML and the Single String (SOLVED)

2012-02-21 Thread Simon Schick
Hi, Jay If you're not using the variable *$xmlCompany* somewhere else I'd try to skip the array and just do it with this single line: *$arrayLead[0]-Company = (string) $xml-SignonRq-SignonTransport-CustId-SPName;* The result should not differ from what you have now. Bye Simon 2012/2/21 Jay

Re: [PHP] pathinfo or other

2012-02-17 Thread Simon Schick
Hi, All I do not remember where I found the list of variables that are provided if you load PHP using Apache, nginx, IIS ... Fact is that there's a list of variables in the CGI 1.1 definition that should be given to a cgi script: http://tools.ietf.org/html/rfc3875#section-4 PATH_INFO is on the

Re: [PHP] pathinfo or other

2012-02-17 Thread Simon Schick
Hi, Just to also add the discussion why mod_rewrite or PATH_INFO :) http://stackoverflow.com/questions/1565292/mod-rewrite-or-path-info-for-clean-urls Bye Simon 2012/2/17 Simon Schick simonsimc...@googlemail.com Hi, All I do not remember where I found the list of variables that are provided

Re: [PHP] basic captcha

2012-02-17 Thread Simon Schick
filtering the 99% spam and get all user-mails through. Nothing is more annoying as when you (as user) get the feedback *Go away! You're a bot.* ;) Bye Simon 2012/2/17 Ashley Sheridan a...@ashleysheridan.co.uk Simon Schick simonsimc...@googlemail.com wrote: Hi, all When you ask for a captcha

Re: [PHP] basic captcha

2012-02-16 Thread Simon Schick
Hi, all When you ask for a captcha, I'd first ask what do you want to use it for. If you read the first lines of Wikipedia it has been developed to differ between a real user and a bot. If you'd now say that you want to use it to protect spam in a formula I'd give you the same explanation that

Re: [PHP] Swiftlet is quite possibly the smallest MVC framework you'll ever use.

2012-02-13 Thread Simon Schick
Hi, Paul I personally pretty much like the idea of auto-loaders, but that's a personal point of view. If you have always develop with scripts having autoloaders you'll hate to write a *require_once* command at the beginning of all files. And what would a dependency-injection-container be without

Re: [PHP] Swiftlet is quite possibly the smallest MVC framework you'll ever use.

2012-02-13 Thread Simon Schick
/ and ToroPHPhttp://toroweb.org/). However, I like the fact that Swiftlet requires no configuration. Just drop in your class and it works. The file structure and classes already do a good job describing themselves. Excellent feedback, thanks! Elbert On Sun, Feb 12, 2012 at 10:53 PM, Simon Schick

Re: [PHP] Swiftlet is quite possibly the smallest MVC framework you'll ever use.

2012-02-12 Thread Simon Schick
Hi, Elbert I've looked through the code and found it quite tiny. I like that. Until now I found some things that I'd like to discuss with you: In the class App you're doing all the stuff (routing, calling the constructor aso) in the constructor. Would it not be better to have separate functions