[PHP] PHP 5.4.20 released!

2013-09-19 Thread Stas Malyshev
Hello! The PHP development team announces the immediate availability of PHP 5.4.20. About 30 bugs were fixed. All users of PHP 5.4 are encouraged to upgrade to this release. For source downloads of PHP 5.4.20 please visit our downloads page: http://www.php.net/downloads.php Windows binaries can

RE: [PHP] Apache's PHP handlers

2013-09-19 Thread Ashley Sheridan
On Thu, 2013-09-19 at 16:14 +0200, Arno Kuhl wrote: > Arno: If you can request that file using a web browser, and it gets executed > as PHP on your server then there is an error in the Apache configuration. > > Easy test: create a file in a text editor containing some PHP ( phpinfo(); ?> would be

Re: [PHP] Static methods vs. plain functions

2013-09-19 Thread Sebastian Krebs
2013/9/19 Aziz Saleh > I think that it would be more elegant if you are already in a OOP to keep > the flow and stick to OOP. It just doesn't make sense to me in an > environment that uses OOP to have functions laying around. > buzzword: multi-paradigm. Thats why it could make sense ;) > > Per

Re: [PHP] Static methods vs. plain functions

2013-09-19 Thread Paul M Foster
On Thu, Sep 19, 2013 at 06:28:32PM +0200, Simon Dániel wrote: > Hi, > > I am working on an OOP project, and cannot decide which way to follow when > I have to write a simple function. > > For example, I want to write a function which generates a random string. In > an OOP environtment, it is a m

Re: [PHP] Static methods vs. plain functions

2013-09-19 Thread Aziz Saleh
I think that it would be more elegant if you are already in a OOP to keep the flow and stick to OOP. It just doesn't make sense to me in an environment that uses OOP to have functions laying around. Personally I like to group similar functionality together in their own objects, this way I can reus

Re: [PHP] Static methods vs. plain functions

2013-09-19 Thread Sebastian Krebs
2013/9/19 Simon Dániel > Hi, > > I am working on an OOP project, and cannot decide which way to follow when > I have to write a simple function. > > For example, I want to write a function which generates a random string. In > an OOP environtment, it is a matter of course to create a static class

Re: [PHP] high traffic websites

2013-09-19 Thread Negin Nickparsa
it may be helpful for someone. I liked GTmetrix kinda helpful and magic. Sincerely Negin Nickparsa On Wed, Sep 18, 2013 at 4:42 PM, Sebastian Krebs wrote: > 2013/9/18 Camilo Sperberg > > > > > On Sep 18, 2013, at 14:26, Haluk Karamete > wrote: > > > > >> I recommend

[PHP] Static methods vs. plain functions

2013-09-19 Thread Simon Dániel
Hi, I am working on an OOP project, and cannot decide which way to follow when I have to write a simple function. For example, I want to write a function which generates a random string. In an OOP environtment, it is a matter of course to create a static class and a static method for that. But wh

RE: [PHP] Apache's PHP handlers

2013-09-19 Thread Arno Kuhl
Arno: If you can request that file using a web browser, and it gets executed as PHP on your server then there is an error in the Apache configuration. Easy test: create a file in a text editor containing some PHP ( would be enough) and upload it to the www root of your site and name it test.pgif.

[PHP] PHP 5.5.4 has been released

2013-09-19 Thread Julien Pauli
Hi! The PHP development team announces the immediate availability of PHP 5.5.4. This release fixes several bugs against PHP 5.5.3. All PHP users are encouraged to upgrade to this new version. For source downloads of PHP 5.5.4 please visit our downloads page: http://www.php.net/downloads.php Wi

Re: [PHP] Apache's PHP handlers

2013-09-19 Thread Bastien Koert
On Thursday, September 19, 2013, Stuart Dallas wrote: > On 19 Sep 2013, at 14:39, Aziz Saleh > > wrote: > > > The best way to handle file uploads is to: > > > > 1) Store the filename somewhere in the DB, rename the file to a random > string without extension and store the mapping in the DB as well

Re: [PHP] Apache's PHP handlers

2013-09-19 Thread Stuart Dallas
On 19 Sep 2013, at 14:39, Aziz Saleh wrote: > The best way to handle file uploads is to: > > 1) Store the filename somewhere in the DB, rename the file to a random string > without extension and store the mapping in the DB as well. > 2) When sending the file, set the header content to the filen

Re: [PHP] Apache's PHP handlers

2013-09-19 Thread Aziz Saleh
The best way to handle file uploads is to: 1) Store the filename somewhere in the DB, rename the file to a random string without extension and store the mapping in the DB as well. 2) When sending the file, set the header content to the filename and output the content of the file via PHP (ex: by re

Re: [PHP] Apache's PHP handlers

2013-09-19 Thread Stuart Dallas
On 19 Sep 2013, at 13:58, "Design in Motion Webdesign" wrote: > it has nothing to do with ".php" in the file name. What the hacker did, was > uploading a .gif file with some malicious php code included to your > webserver. Then he called the .gif file from his own website by using a php > scr

Re: [PHP] Apache's PHP handlers

2013-09-19 Thread Design in Motion Webdesign
Hi Arno, it has nothing to do with ".php" in the file name. What the hacker did, was uploading a .gif file with some malicious php code included to your webserver. Then he called the .gif file from his own website by using a php script containing some code like require_once('http://www.yoursi

RE: [PHP] Apache's PHP handlers

2013-09-19 Thread Arno Kuhl
> For the past week I've been trying to get to the bottom of an exploit, but > googling hasn't been much help so far, nor has my service provider. > Basically a file was uploaded with the filename xxx.php.pgif which contained > nasty php code, and then the file was run directly from a browser. The

RE: [PHP] Apache's PHP handlers

2013-09-19 Thread Arno Kuhl
-Original Message- From: Ken Robinson [mailto:kenrb...@rbnsn.com] Sent: 19 September 2013 01:52 PM To: Cc: Subject: Re: [PHP] Apache's PHP handlers Check you .htaccess file. The hackers could have modified it to allow that type of file to be executed. I had some that modified my .htacc

Re: [PHP] Apache's PHP handlers

2013-09-19 Thread Design in Motion Webdesign
- Original Message - From: "Arno Kuhl" To: Sent: Thursday, September 19, 2013 1:35 PM Subject: [PHP] Apache's PHP handlers For the past week I've been trying to get to the bottom of an exploit, but googling hasn't been much help so far, nor has my service provider. Basically a file w

[PHP] Apache's PHP handlers

2013-09-19 Thread Arno Kuhl
For the past week I've been trying to get to the bottom of an exploit, but googling hasn't been much help so far, nor has my service provider. Basically a file was uploaded with the filename xxx.php.pgif which contained nasty php code, and then the file was run directly from a browser. The upload s