[PHP] Re: php-general Digest 20 Sep 2013 17:33:26 -0000 Issue 8369

2013-09-20 Thread Bill Guion

On Sep 20, 2013, at 1:33 PM, php-general-digest-h...@lists.php.net wrote:

 Friday's Question
   322111 by: Tedd Sperling
 --
 
 From: Tedd Sperling t...@sperling.com
 Subject: Friday's Question
 Date: September 20, 2013 12:51:49 PM EDT
 To: php-general@lists.php.net
 
 
 Hi gang:
 
 Do you use a Mousepad?
 
 My reason for asking is that I've used a Mousepad ever since mice first came 
 out (back when they had one ball).
 
 Now that mice are optical (no balls), Mousepads are not really needed -- or 
 so I'll told by the college -- you see, they don't provide Mousepads for 
 their student's computers.
 
 As such, I wondered what's the percentage of programmers still using a 
 Mousepad?
 
 Secondly, are Mousepads used primarily by older programmers (like me) while 
 younger programmers don't use Mousepads, or what?
 
 So -- please respond with:
 
 Age: *
 Mousepad: Yes/No
 
 Thank you,
 
 tedd
 
 PS: * If you don't want to provide your actual age, then indicate your age by 
 stating young, middle-age, old-age, ancient, or whatever term 
 describes your age.
 
 Alternate -- I claim that you can tell a man's age by ten-times the number of 
 personal products he routinely uses, for example:
 
 Years Old - Personal Products
 10Toothpaste
 20Toothpaste, Deodorant
 30Toothpaste, Deodorant, Aftershave
 40Toothpaste, Deodorant, Aftershave, Minoxidil
 50Toothpaste, Deodorant, Aftershave, Minoxidil, Preparation-H
 60Toothpaste, Deodorant, Aftershave, Minoxidil, Preparation-H, Bag Bomb
 70Toothpaste, Deodorant, Aftershave, Minoxidil, Preparation-H, Bag Bomb, 
 Fixodent
 
 So, you could indicate age by stating Bag Bomb like me.
 
 ___
 tedd sperling
 t...@sperling.com


Age: 72 years, 7 days  toothpaste, deodorant, aftershave. Don't need the rest, 
yet.
Mousepad: Yes. I find it easier to clean the mousepad than to try to clean the 
keyboard tray/desktop/whatever.


 -= Bill =-
-- 

A day without sunshine is like a day in Seattle.



[PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik

2013-09-06 Thread Jan Ehrhardt
Grant in php.general (Thu, 5 Sep 2013 03:47:55 -0700):
 I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
 opcache is disabled.  Someone filed a piwik bug but was told it's a
 php bug:

 http://dev.piwik.org/trac/ticket/4093

 Is this a known issue?

Is there anything I can do?

Could you test if your problems are solved when you use the latest
opcache from github?
https://github.com/zendtech/ZendOptimizerPlus

Jan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik

2013-09-05 Thread Grant
 I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
 opcache is disabled.  Someone filed a piwik bug but was told it's a
 php bug:

 http://dev.piwik.org/trac/ticket/4093

 - Grant

 Is this a known issue?

 - Grant

Is there anything I can do?

- Grant

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik

2013-09-03 Thread Daniel
Just so that you know, I've posted in the forum topic as well:
http://forum.piwik.org/read.php?2,105879
Regards,
Daniel Fenn






On Tue, Sep 3, 2013 at 12:42 AM, Lester Caine les...@lsces.co.uk wrote:
 Jan Ehrhardt wrote:

 Could you try to add a function_exists check to
 libs/upgradephp/upgrade.php?
 
 This at the function declaration of _json_encode:
 if (!function_exists('_json_encode')) { function _json_encode($var, ...
 
 And a extra } at the end.

 This patch, together with upgrading to the latest OPcache from github
 solved my segfaults and fatal errors.


 Jan  - could you post the solution on http://dev.piwik.org/trac/ticket/4093
 - better that you get the credit than one of us pinch it ;)


 --
 Lester Caine - G8HFL
 -
 Contact - http://lsces.co.uk/wiki/?page=contact
 L.S.Caine Electronic Services - http://lsces.co.uk
 EnquirySolve - http://enquirysolve.com/
 Model Engineers Digital Workshop - http://medw.co.uk
 Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik

2013-09-02 Thread Jan Ehrhardt
Grant in php.general (Sun, 25 Aug 2013 02:31:29 -0700):
I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
opcache is disabled.  Someone filed a piwik bug but was told it's a
php bug:

http://dev.piwik.org/trac/ticket/4093

Could you try to add a function_exists check to
libs/upgradephp/upgrade.php?

This at the function declaration of _json_encode:
if (!function_exists('_json_encode')) { function _json_encode($var, ...

And a extra } at the end.

This seemed to correct this fatal error on my side:

[02-Sep-2013 10:35:40 Europe/Paris] PHP Fatal error:  Cannot redeclare
_json_encode() (previously declared in
/usr/local/lib/php/share/piwik/libs/upgradephp/upgrade.php:109) in
/usr/local/lib/php/share/piwik/libs/upgradephp/upgrade.php on line 109

I do not know what opcache has to do with it, although I suspect that
Piwik is calling itself a lot of times and that opcache is trailing
behind (or something like that).

Jan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik

2013-09-02 Thread Jan Ehrhardt
Jan Ehrhardt in php.general (Mon, 02 Sep 2013 10:57:14 +0200):
Could you try to add a function_exists check to
libs/upgradephp/upgrade.php?

This at the function declaration of _json_encode:
if (!function_exists('_json_encode')) { function _json_encode($var, ...

And a extra } at the end.

This patch, together with upgrading to the latest OPcache from github
solved my segfaults and fatal errors.

Jan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik

2013-09-02 Thread Lester Caine

Jan Ehrhardt wrote:

Could you try to add a function_exists check to
libs/upgradephp/upgrade.php?

This at the function declaration of _json_encode:
if (!function_exists('_json_encode')) { function _json_encode($var, ...

And a extra } at the end.

This patch, together with upgrading to the latest OPcache from github
solved my segfaults and fatal errors.


Jan  - could you post the solution on http://dev.piwik.org/trac/ticket/4093 - 
better that you get the credit than one of us pinch it ;)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik

2013-09-01 Thread Grant
 I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
 opcache is disabled.  Someone filed a piwik bug but was told it's a
 php bug:

 http://dev.piwik.org/trac/ticket/4093

 - Grant

Is this a known issue?

- Grant

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik

2013-09-01 Thread Lester Caine

Grant wrote:

I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
opcache is disabled.  Someone filed a piwik bug but was told it's a
php bug:

http://dev.piwik.org/trac/ticket/4093



Is this a known issue?


I'm running my own port of piwik in production with eaccelerator on 5.4 but I've 
made the decision not to move any of the machines to 5.5 until all of the legacy 
5.2 machines have been brought up to 5.4. Not an answer, but explains perhaps 
why the problem is not being seen by others.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik

2013-09-01 Thread Jan Ehrhardt
Lester Caine in php.general (Sun, 01 Sep 2013 12:59:18 +0100):
Grant wrote:
 I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
 opcache is disabled.  Someone filed a piwik bug but was told it's a
 php bug:
 
 http://dev.piwik.org/trac/ticket/4093

 Is this a known issue?

 (...) Not an answer, but explains perhaps  why the problem is not being
seen by others.

It is more likely that users do not notice it. I have Piwik running with
PHP 5.3 and php_opcache.dll (Centos 5) and it segfaults:

[Sun Sep 01 17:06:53.131410 2013] [core:notice] [pid 25411] AH00052:
child pid 25451 exit signal Segmentation fault (11)
[Sun Sep 01 17:08:18.561917 2013] [core:notice] [pid 25411] AH00052:
child pid 25453 exit signal Segmentation fault (11)
[Sun Sep 01 17:08:19.569714 2013] [core:notice] [pid 25411] AH00052:
child pid 25450 exit signal Segmentation fault (11)

However, nothing special is displaying on the page. You have to grep
your Apache error_log to know that it happens. How did you notice?

Jan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik

2013-09-01 Thread Jan Ehrhardt
Grant in php.general (Sun, 1 Sep 2013 02:13:54 -0700):
 I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
 opcache is disabled.  Someone filed a piwik bug but was told it's a
 php bug:

 http://dev.piwik.org/trac/ticket/4093

Is this a known issue?

I changed the PHP on my (dev) Centos5 server to PHP 5.5.3, pulled the
latest OPcache from Github and tried to get a segfault. That was clearly
visible when I tried to access the Goals tab in the dashboard of one of
my websites. The page never got further than 'Loading data...' and my
Apache log showed a segfault.

So, if it was no known issue it is confirmed now.

Jan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] RE: php seg faults on creation pdf

2013-08-28 Thread KAs Coenen
Hi, 

Some more info. I ran gdb on the core file (after reinstalling with debug mode):

# /usr/local/gdb/bin/gdb /usr/local/php5/bin/php-cgi 
/opt/apache/htdocs/wachtlijst/core
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i386-pc-solaris2.10.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/local/php5/bin/php-cgi...done.
[New LWP 1]
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
Core was generated by `/usr/local/php5/bin/php-cgi 
/opt/apache/htdocs/wachtlijst/test.php'.
Program terminated with signal 11, Segmentation fault.
#0  0x0093baa4 in _object_and_properties_init (arg=error reading 
variable: Cannot access memory at address 0xffd8,
    arg@entry=error reading variable: Cannot access memory at address 0x8, 
class_type=error reading variable: Cannot access memory at address 
0xffd0,
    class_type@entry=error reading variable: Cannot access memory at address 
0x8, properties=error reading variable: Cannot access memory at address 
0xffc8,
    properties@entry=error reading variable: Cannot access memory at address 
0x8) at /export/home/coenenka/php-5.5.1/Zend/zend_API.c:1200
1200    Z_OBJVAL_P(arg) = class_type-create_object(class_type 
TSRMLS_CC);

Does anyone see anything in this? The dir /export/home/coenenka is not the 
install dir (but my home drive) and I have no clue why it is referencing to 
that dir (it is the location of the source). 

Greetings,

Kas



 From: kascoe...@hotmail.com
 To: php-general@lists.php.net
 Subject: php seg faults on creation pdf
 Date: Wed, 28 Aug 2013 10:00:29 +0200

 Hi,

 When surfing to a website that generates a pdf the apache server segfaults. 
 This made me run the script (that generates the pdf) with the php cli 
 command. The php also segfaults with the same error:

 # /usr/local/php5/bin/php-cgi test.php
 Segmentation Fault (core dumped)

 Pstack output:

 # pstack core
 core 'core' of 726: /usr/local/php5/bin/php-cgi test.php
  00960af5 _object_and_properties_init () + 111

 I attached the truss output to the mail. I am running this on a solaris 
 server:

 # uname -a
 SunOS zone-eu4 5.10 Generic_142910-17 i86pc i386 i86pc
 # cat /etc/release
 Oracle Solaris 10 9/10 s10x_u9wos_14a X86
  Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 Assembled 11 August 2010

 pdflib module is 2.1.10. PDFlib lite is version 7.0.5. I tried to compile 
 everything in 64 bit. I suspect the problem is that somewhere a 32bit lib or 
 executable is being used instead of a 64bit.


 Can anyone help me out on this?

 Kind regards,

 Kas 
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP vs JAVA

2013-08-22 Thread Sebastian Krebs
2013/8/22 David Harkness davi...@highgearmedia.com

 On Wed, Aug 21, 2013 at 7:56 PM, Curtis Maurand cur...@maurand.comwrote:

 Sebastian Krebs wrote:

  Actually the problem is, that the dot . is already in use. With

   $foo.bar() you cannot tell, if you want to call the method bar() on
 the
  object $foo, or if you want to concatenate the value of $foo to the
  result of the function bar(). There is no other way around this than a
  different operator for method calls.

 I didn't think
 of that.  It seems to me there could be an easier operator than -
 which sometimes will make me stop and look at what keys I'm trying to
 hit.  Just a thought.  I forgot about the concatenation operator
 which is + in Java/C#


 The PHP language developers were pretty stuck. Because of automatic
 string-to-numeric-conversion, they couldn't use + for string concatenation.
 Sadly, they chose . rather than .. which I believe one or two other
 languages use. If they had, . would have been available once objects
 rolled around in PHP 4/5. I suspect they chose - since that's used in C
 and C++ to dereference a pointer.


Actually I think .. is quite error-prone, because it is hard to
distinguish from . or _ on the _first_ glance, which makes the get
quickly through the code. [1]
So . is maybe not the best choice, but also remember when it was
introduced: That was decades ago. That time it was (probably ;)) the best
choice and nowadays I don't think it is too bad at all, beside that _other_
languages use it for other purposes now ;)


[1] Yes, I know, that _ is not an operator, but mixed with strings and
variables names it is there ;)




  Ever tried the jetbrains products? :D (No, they don't pay me)

 I have not, but it looks interesting.
 I'll have to try it.


 Those are very good products which have had a strong following for a
 decade. The free IDE NetBeans also has quite good support for both Java and
 PHP, and the latest beta version provides a web project that provides
 front- and back-end debugging of PHP + JavaScript. You can be stepping
 through JS code and hit an AJAX call and then seamlessly step through the
 PHP code that handles it.

 I use NetBeans for PHP/HTML/JS (though I am evaluating JetBrains' PHPStorm
 now) and Eclipse for Java. You can't beat Eclipse's refactoring support in
 a free tool, though I think NetBeans is close to catching up. I would bet
 IntelliJ IDEA for Java by JetBrains is on par at least.


Eclipse' code-completion and debugger never worked for me well (and most of
the time: at all). It became slower and less responsive with every release.
That was the reason I decided to leave it and I don't regret it :)



 Peace,
 David




-- 
github.com/KingCrunch


Re: [PHP] Re: PHP vs JAVA

2013-08-22 Thread David Harkness
On Thu, Aug 22, 2013 at 12:29 AM, Sebastian Krebs krebs@gmail.comwrote:

 Actually I think .. is quite error-prone, because it is hard to
 distinguish from . or _ on the _first_ glance, which makes the get
 quickly through the code. [1]


I surround all operators except member access (. and -) with spaces,
so that wouldn't be a problem for me. I thought there was an older language
that used .., but all I can find now is Lua which was developed in the
early nineties.

So . is maybe not the best choice, but also remember when it was
 introduced: That was decades ago. That time it was (probably ;)) the best
 choice and nowadays I don't think it is too bad at all, beside that _other_
 languages use it for other purposes now ;)


C introduced . as the field access operator for structs in the early
seventies, C++ kept it for object access, and Java adopted it in the early
nineties. C's use of pointers required a way to access members through a
pointer, and I suppose KR thought - looked like following a pointer (I
agree).

Since PHP was modeled on Perl and wouldn't implement objects or structs for
another decade, it adopted . for string concatenation. It works fine, and
I don't have too much trouble bouncing back-and-forth. I honestly would
have preferred . to be overloaded when the left hand side was an object.
In the rare cases that you want to convert an object to a string to be
concatenated with the RHS, you can always cast it to string, use strval(),
or call __toString() manually. But I'm not staging any protests over the
use of -. :)


 Eclipse' code-completion and debugger never worked for me well (and most
 of the time: at all). It became slower and less responsive with every
 release. That was the reason I decided to leave it and I don't regret it :)


I agree about the slowness, and until this latest release I've always left
autocompletion manual (ctrl + space). They did something with Kepler to
speed it up drastically, so much so I have it turned on with every
keypress. However, it's a little too aggressive in providing choices.
Typing null which is a Java keyword as in PHP, it will insert
nullValue() which is a method from Hamcrest. :( After a couple weeks of
this, I think I'll be switching it back to manual activation. I can type
quickly enough that I only need it when I'm not sure of a method name.

NetBeans, while not as good with refactoring and plugin support, is still
zippier than Eclipse. And my short time with the JetBrains products found
them to be fast as well. Eclipse's PHP support via PDT is not nearly as
good as NetBeans, and no doubt PHPStorm beats them both.

Peace,
David


[PHP] Re: PHP vs JAVA

2013-08-21 Thread Tim Streater
On 20 Aug 2013 at 23:59, PHP List phpl...@arashidigital.com wrote: 

 While I don't have any references to back it up - my guess would be that
 Java may be seen as more versatile in general programming terms.  A
 staggering number of enterprise level web applications are built with
 Java, add to that the possibility of writing Android apps with the same
 knowledge.

To me the salient point is, does java has as extensive a library or set of 
interfaces to other packages (such as SQLite, mysql, etc)?

 I would say that, in general, the other teacher is incorrect speaking
 strictly in terms of web development.  PHP has already won that crown
 many times over.  That said, when I was in University, it was difficult
 to find a programming class that taught anything but Java - and that was
 10yrs ago now.  I chalked it up to the education bubble not being able
 to see what the rest of the world is actually doing.

Was PHP OOP-capable at the time? Perhaps the edu-bubble was simply looking down 
its nose at PHP. There being lots of courses proves nothing in and of itself. 
20 years ago, there were lots of PC mags you could buy, which caused some folks 
to say look how much better the PC is supported than other platforms. Truth 
was, at the time, such support was needed given the mess of 640k limits, DOS, 
IRQs and the like, most of which issues have ceased to be relevant.

Anyway, why should one need a course to learn PHP, assuming you already know 
other languages. It's simple enough.

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP vs JAVA

2013-08-21 Thread georg chambert

Hi,

my I shake the subject a little; Ive been doing some PHP and found it ok 
to work with

not so much fuss, but that was PHP4, what about PHP5 ?
Dont really checked the difference but made a short-scan and found that it 
had be

screwed around with ?

Any think, should I change to 5 ?

BR georg

- Original Message - 
From: Tim Streater t...@clothears.org.uk

To: PHP List phpl...@arashidigital.com; php-general@lists.php.net
Sent: Wednesday, August 21, 2013 1:59 PM
Subject: [PHP] Re: PHP vs JAVA


On 20 Aug 2013 at 23:59, PHP List phpl...@arashidigital.com wrote:


While I don't have any references to back it up - my guess would be that
Java may be seen as more versatile in general programming terms.  A
staggering number of enterprise level web applications are built with
Java, add to that the possibility of writing Android apps with the same
knowledge.


To me the salient point is, does java has as extensive a library or set of 
interfaces to other packages (such as SQLite, mysql, etc)?



I would say that, in general, the other teacher is incorrect speaking
strictly in terms of web development.  PHP has already won that crown
many times over.  That said, when I was in University, it was difficult
to find a programming class that taught anything but Java - and that was
10yrs ago now.  I chalked it up to the education bubble not being able
to see what the rest of the world is actually doing.


Was PHP OOP-capable at the time? Perhaps the edu-bubble was simply looking 
down its nose at PHP. There being lots of courses proves nothing in and of 
itself. 20 years ago, there were lots of PC mags you could buy, which caused 
some folks to say look how much better the PC is supported than other 
platforms. Truth was, at the time, such support was needed given the mess 
of 640k limits, DOS, IRQs and the like, most of which issues have ceased to 
be relevant.


Anyway, why should one need a course to learn PHP, assuming you already know 
other languages. It's simple enough.


--
Cheers  --  Tim








--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP vs JAVA

2013-08-21 Thread Sebastian Krebs
2013/8/21 georg chambert georg.chamb...@telia.com

 Hi,

 my I shake the subject a little; Ive been doing some PHP and found it ok
 to work with
 not so much fuss, but that was PHP4, what about PHP5 ?
 Dont really checked the difference but made a short-scan and found that it
 had be
 screwed around with ?

 Any think, should I change to 5 ?


ehm ... serious?
http://php.net/eol.php



 BR georg

 - Original Message - From: Tim Streater t...@clothears.org.uk
 To: PHP List phpl...@arashidigital.com; php-general@lists.php.net
 Sent: Wednesday, August 21, 2013 1:59 PM
 Subject: [PHP] Re: PHP vs JAVA



 On 20 Aug 2013 at 23:59, PHP List phpl...@arashidigital.com wrote:

  While I don't have any references to back it up - my guess would be that
 Java may be seen as more versatile in general programming terms.  A
 staggering number of enterprise level web applications are built with
 Java, add to that the possibility of writing Android apps with the same
 knowledge.


 To me the salient point is, does java has as extensive a library or set of
 interfaces to other packages (such as SQLite, mysql, etc)?

  I would say that, in general, the other teacher is incorrect speaking
 strictly in terms of web development.  PHP has already won that crown
 many times over.  That said, when I was in University, it was difficult
 to find a programming class that taught anything but Java - and that was
 10yrs ago now.  I chalked it up to the education bubble not being able
 to see what the rest of the world is actually doing.


 Was PHP OOP-capable at the time? Perhaps the edu-bubble was simply looking
 down its nose at PHP. There being lots of courses proves nothing in and of
 itself. 20 years ago, there were lots of PC mags you could buy, which
 caused some folks to say look how much better the PC is supported than
 other platforms. Truth was, at the time, such support was needed given the
 mess of 640k limits, DOS, IRQs and the like, most of which issues have
 ceased to be relevant.

 Anyway, why should one need a course to learn PHP, assuming you already
 know other languages. It's simple enough.

 --
 Cheers  --  Tim




 --**--**
 



  --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
github.com/KingCrunch


Re: [PHP] Re: PHP vs JAVA

2013-08-21 Thread Stuart Dallas
On 21 Aug 2013, at 15:01, georg chambert georg.chamb...@telia.com wrote:

 my I shake the subject a little; Ive been doing some PHP and found it ok to 
 work with
 not so much fuss, but that was PHP4, what about PHP5 ?
 Dont really checked the difference but made a short-scan and found that it 
 had be
 screwed around with ?
 
 Any think, should I change to 5 ?

Yes, even if it's only because PHP4 hasn't been supported in any way, including 
security fixes, since August 7th, 2008! This fact alone makes it pretty 
dangerous to be using it on a public site, and that's without getting into all 
of the improvements that PHP5 has introduced over the past five years!

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP vs JAVA

2013-08-21 Thread Curtis Maurand



Sorry in advance for the top post.

Use the right tool for
the Job.  I've use Java, C# and PHP.

1.  I hate the
Perl-like object calls in PHP.  I'd rather use . notation
in C# and Java.  It saves a lot of wear and tear on my left pinky
finger.
2.  Java and C# are both typed languages.  Say what
you want, but I have working with a string like 02 and have
PHP convert that to an integer.  sometimes I want that zero in
front.  If I want that to be an integer in Java it's int
myInteger = Integer.parseInt(02);

3. 
Java development environments (Eclipses, NetBeans, IBM RAD) are pretty
horrible.  Visual Studio is hands down a better envrionment, even the
older versions of it. I've hooked Visual Studio into SVN in the past and
it works well.

4 PHP development environments are many and
varied and all of them suck at web debugging.  I've used PHPEdit,
Zend, Bluefish, Eclipse and a couple others.  Bluefish works better
on Linux than it does on Windows.

Use the tool for the job at
hand.  

Just my $0.02 worth.

cheers,
Curtis

Tim Streater wrote:
 On 20 Aug 2013 at 23:59,
PHP List phpl...@arashidigital.com wrote:
 

While I don't have any references to back it up - my guess would be
 that
 Java may be seen as more versatile in
general programming terms.  A
 staggering number of
enterprise level web applications are built with
 Java, add
to that the possibility of writing Android apps with the same
 knowledge.
 
 To me the salient point is,
does java has as extensive a library or set of
 interfaces to
other packages (such as SQLite, mysql, etc)?
 
 I
would say that, in general, the other teacher is incorrect speaking
 strictly in terms of web development.  PHP has already won that
crown
 many times over.  That said, when I was in University,
it was difficult
 to find a programming class that taught
anything but Java - and that
 was
 10yrs ago
now.  I chalked it up to the education bubble not being able

to see what the rest of the world is actually doing.
 

Was PHP OOP-capable at the time? Perhaps the edu-bubble was simply
looking
 down its nose at PHP. There being lots of courses proves
nothing in and of
 itself. 20 years ago, there were lots of PC
mags you could buy, which
 caused some folks to say look
how much better the PC is supported than
 other platforms.
Truth was, at the time, such support was needed given
 the mess
of 640k limits, DOS, IRQs and the like, most of which issues have
 ceased to be relevant.
 
 Anyway, why should one
need a course to learn PHP, assuming you already
 know other
languages. It's simple enough.
 
 --
 Cheers 
--  Tim
 
 --
 PHP General Mailing List
(http://www.php.net/)
 To unsubscribe, visit:
http://www.php.net/unsub.php


Re: [PHP] Re: PHP vs JAVA

2013-08-21 Thread Sebastian Krebs
2013/8/21 Curtis Maurand cur...@maurand.com




 Sorry in advance for the top post.

 Use the right tool for
 the Job.  I've use Java, C# and PHP.

 1.  I hate the
 Perl-like object calls in PHP.  I'd rather use . notation
 in C# and Java.  It saves a lot of wear and tear on my left pinky
 finger.


Actually the problem is, that the dot . is already in use. With
$foo.bar() you cannot tell, if you want to call the method bar() on the
object $foo, or if you want to concatenate the value of $foo to the
result of the function bar(). There is no other way around this than a
different operator for method calls.


 2.  Java and C# are both typed languages.  Say what
 you want, but I have working with a string like 02 and have
 PHP convert that to an integer.  sometimes I want that zero in
 front.  If I want that to be an integer in Java it's int
 myInteger = Integer.parseInt(02);

 3.
 Java development environments (Eclipses, NetBeans, IBM RAD) are pretty
 horrible.  Visual Studio is hands down a better envrionment, even the
 older versions of it. I've hooked Visual Studio into SVN in the past and
 it works well.


Ever tried the jetbrains products? :D (No, they  don't pay me)



 4 PHP development environments are many and
 varied and all of them suck at web debugging.  I've used PHPEdit,
 Zend, Bluefish, Eclipse and a couple others.  Bluefish works better
 on Linux than it does on Windows.


I use PhpStorm and it works quite fine.



 Use the tool for the job at
 hand.

 Just my $0.02 worth.

 cheers,
 Curtis

 Tim Streater wrote:
  On 20 Aug 2013 at 23:59,
 PHP List phpl...@arashidigital.com wrote:
 
 
 While I don't have any references to back it up - my guess would be
  that
  Java may be seen as more versatile in
 general programming terms.  A
  staggering number of
 enterprise level web applications are built with
  Java, add
 to that the possibility of writing Android apps with the same
  knowledge.
 
  To me the salient point is,
 does java has as extensive a library or set of
  interfaces to
 other packages (such as SQLite, mysql, etc)?
 
  I
 would say that, in general, the other teacher is incorrect speaking
  strictly in terms of web development.  PHP has already won that
 crown
  many times over.  That said, when I was in University,
 it was difficult
  to find a programming class that taught
 anything but Java - and that
  was
  10yrs ago
 now.  I chalked it up to the education bubble not being able
 
 to see what the rest of the world is actually doing.
 
 
 Was PHP OOP-capable at the time? Perhaps the edu-bubble was simply
 looking
  down its nose at PHP. There being lots of courses proves
 nothing in and of
  itself. 20 years ago, there were lots of PC
 mags you could buy, which
  caused some folks to say look
 how much better the PC is supported than
  other platforms.
 Truth was, at the time, such support was needed given
  the mess
 of 640k limits, DOS, IRQs and the like, most of which issues have
  ceased to be relevant.
 
  Anyway, why should one
 need a course to learn PHP, assuming you already
  know other
 languages. It's simple enough.
 
  --
  Cheers
 --  Tim
 
  --
  PHP General Mailing List
 (http://www.php.net/)
  To unsubscribe, visit:
 http://www.php.net/unsub.php




-- 
github.com/KingCrunch


Re: [PHP] Re: PHP vs JAVA

2013-08-21 Thread Curtis Maurand


Sebastian Krebs wrote:
 2013/8/21 Curtis Maurand
cur...@maurand.com
 



 Sorry in advance for the top post.

 Use the right tool for
 the Job. 
I've use Java, C# and PHP.

 1.  I hate the
 Perl-like object calls in PHP.  I'd rather use .
notation
 in C# and Java.  It saves a lot of wear and tear on
my left pinky
 finger.

 

Actually the problem is, that the dot . is already in use.
With
 $foo.bar() you cannot tell, if you want to call the method
bar() on the
 object $foo, or if you want
to concatenate the value of $foo to the
 result of
the function bar(). There is no other way around this than
a
 different operator for method calls.

I didn't think
of that.  It seems to me there could be an easier operator than -
which sometimes will make me stop and look at what keys I'm trying to
hit.  Just a thought.  I forgot about the concatenation operator
which is + in Java/C#
 
 
 2. 
Java and C# are both typed languages.  Say what
 you want,
but I have working with a string like 02 and have
 PHP convert that to an integer.  sometimes I want that zero
in
 front.  If I want that to be an integer in Java it's
int
 myInteger =
Integer.parseInt(02);

 3.
 Java development environments (Eclipses, NetBeans, IBM RAD) are
pretty
 horrible.  Visual Studio is hands down a better
envrionment, even the
 older versions of it. I've hooked
Visual Studio into SVN in the past and
 it works well.

 
 Ever tried the jetbrains products? :D (No,
they  don't pay me)

I have not, but it looks interesting. 
I'll have to try it.

 
 

 4 PHP development environments are many and

varied and all of them suck at web debugging.  I've used PHPEdit,
 Zend, Bluefish, Eclipse and a couple others.  Bluefish works
better
 on Linux than it does on Windows.

 
 I use PhpStorm and it works quite fine.
 
 

 Use the tool for the job at
 hand.

 Just my $0.02 worth.

 cheers,
 Curtis

 Tim Streater wrote:
  On 20 Aug 2013 at
23:59,
 PHP List phpl...@arashidigital.com wrote:
 
 
 While I don't have
any references to back it up - my guess would be
 
that
  Java may be seen as more versatile in
 general programming terms.  A
  staggering
number of
 enterprise level web applications are built
with
  Java, add
 to that the
possibility of writing Android apps with the same
 
knowledge.
 
  To me the salient point
is,
 does java has as extensive a library or set of
  interfaces to
 other packages (such as
SQLite, mysql, etc)?
 
  I
 would say that, in general, the other teacher is incorrect
speaking
  strictly in terms of web development.  PHP
has already won that
 crown
  many times
over.  That said, when I was in University,
 it was
difficult
  to find a programming class that
taught
 anything but Java - and that
 
was
  10yrs ago
 now.  I chalked it up
to the education bubble not being able
 
 to see what the rest of the world is actually doing.
 
 
 Was PHP OOP-capable at
the time? Perhaps the edu-bubble was simply
 looking
  down its nose at PHP. There being lots of courses
proves
 nothing in and of
  itself. 20 years
ago, there were lots of PC
 mags you could buy, which
  caused some folks to say look
 how much
better the PC is supported than
  other
platforms.
 Truth was, at the time, such support was
needed given
  the mess
 of 640k limits,
DOS, IRQs and the like, most of which issues have
 
ceased to be relevant.
 
  Anyway, why
should one
 need a course to learn PHP, assuming you
already
  know other
 languages. It's simple
enough.
 
  --
 
Cheers
 --  Tim
 
  --
  PHP General Mailing List

(http://www.php.net/)
  To unsubscribe, visit:
 http://www.php.net/unsub.php

 


 
 --
 github.com/KingCrunch



Re: [PHP] Re: PHP vs JAVA

2013-08-21 Thread David Harkness
On Wed, Aug 21, 2013 at 7:56 PM, Curtis Maurand cur...@maurand.com wrote:

 Sebastian Krebs wrote:

 Actually the problem is, that the dot . is already in use. With

 $foo.bar() you cannot tell, if you want to call the method bar() on the
  object $foo, or if you want to concatenate the value of $foo to the
  result of the function bar(). There is no other way around this than a
  different operator for method calls.

 I didn't think
 of that.  It seems to me there could be an easier operator than -
 which sometimes will make me stop and look at what keys I'm trying to
 hit.  Just a thought.  I forgot about the concatenation operator
 which is + in Java/C#


The PHP language developers were pretty stuck. Because of automatic
string-to-numeric-conversion, they couldn't use + for string concatenation.
Sadly, they chose . rather than .. which I believe one or two other
languages use. If they had, . would have been available once objects
rolled around in PHP 4/5. I suspect they chose - since that's used in C
and C++ to dereference a pointer.


  Ever tried the jetbrains products? :D (No, they don't pay me)

 I have not, but it looks interesting.
 I'll have to try it.


Those are very good products which have had a strong following for a
decade. The free IDE NetBeans also has quite good support for both Java and
PHP, and the latest beta version provides a web project that provides
front- and back-end debugging of PHP + JavaScript. You can be stepping
through JS code and hit an AJAX call and then seamlessly step through the
PHP code that handles it.

I use NetBeans for PHP/HTML/JS (though I am evaluating JetBrains' PHPStorm
now) and Eclipse for Java. You can't beat Eclipse's refactoring support in
a free tool, though I think NetBeans is close to catching up. I would bet
IntelliJ IDEA for Java by JetBrains is on par at least.

Peace,
David


Re: [PHP] Re: [PHP-DEV] PHP 5.5.0 final has been released!

2013-06-21 Thread Ravi Gehlot
Awesome!


On Thu, Jun 20, 2013 at 11:14 PM, Marco Pivetta ocram...@gmail.com wrote:

 Well done! Congratulations!
 On 20 Jun 2013 23:23, Julien Pauli jpa...@php.net wrote:

  Hello!
 
  The PHP Development Team would like to announce the immediate release of
  PHP 5.5.0. This release includes a large number of new features and bug
  fixes.
 
  A separate release announcement is also available. For changes in PHP
  5.5.0 since PHP 5.4, please consult the PHP 5 ChangeLog.
 
  Release Announcement: http://www.php.net/release_5_5_0.php
  Downloads:http://www.php.net/downloads.php#v5.5
  Changelog:http://www.php.net/ChangeLog-5.php#5.5.0
 
  Thanks to all contributors that made this new version available.
 
  regards,
 
  David Soria Parra  Julien Pauli
 



[PHP] Re: [PHP-DEV] [PHP] PHP 5.5.0 final has been released!

2013-06-21 Thread Martin Amps
I second this - great to see both finally available. Fantastic release!

Martin Amps | CIO
www.iCracked.com
iCracked | Redwood City, CA

On Jun 21, 2013, at 2:01 PM, Julian jswprog.mailingli...@gmx.at wrote:

 Awesome work and the new design for the php.net website is also nice ;)
 
 Am 20.06.2013, 23:22 Uhr, schrieb Julien Pauli jpa...@php.net:
 
 Hello!
 
 The PHP Development Team would like to announce the immediate release of
 PHP 5.5.0. This release includes a large number of new features and bug
 fixes.
 
 A separate release announcement is also available. For changes in PHP
 5.5.0 since PHP 5.4, please consult the PHP 5 ChangeLog.
 
 Release Announcement: http://www.php.net/release_5_5_0.php
 Downloads:http://www.php.net/downloads.php#v5.5
 Changelog:http://www.php.net/ChangeLog-5.php#5.5.0
 
 Thanks to all contributors that made this new version available.
 
 regards,
 
 David Soria Parra  Julien Pauli
 
 -- 
 PHP Internals - PHP Runtime Development Mailing List
 To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [PHP-DEV] [PHP] PHP 5.5.0 final has been released!

2013-06-21 Thread Daniel
I hope this will get people like WordPress to get up and support
mysqli out of the box. going to cause big issues if they don't.






On Sat, Jun 22, 2013 at 8:59 AM, Martin Amps ph...@rtin.so wrote:
 I second this - great to see both finally available. Fantastic release!

 Martin Amps | CIO
 www.iCracked.com
 iCracked | Redwood City, CA

 On Jun 21, 2013, at 2:01 PM, Julian jswprog.mailingli...@gmx.at wrote:

 Awesome work and the new design for the php.net website is also nice ;)

 Am 20.06.2013, 23:22 Uhr, schrieb Julien Pauli jpa...@php.net:

 Hello!

 The PHP Development Team would like to announce the immediate release of
 PHP 5.5.0. This release includes a large number of new features and bug
 fixes.

 A separate release announcement is also available. For changes in PHP
 5.5.0 since PHP 5.4, please consult the PHP 5 ChangeLog.

 Release Announcement: http://www.php.net/release_5_5_0.php
 Downloads:http://www.php.net/downloads.php#v5.5
 Changelog:http://www.php.net/ChangeLog-5.php#5.5.0

 Thanks to all contributors that made this new version available.

 regards,

 David Soria Parra  Julien Pauli

 --
 PHP Internals - PHP Runtime Development Mailing List
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DEV] PHP 5.5.0 final has been released!

2013-06-20 Thread Marco Pivetta
Well done! Congratulations!
On 20 Jun 2013 23:23, Julien Pauli jpa...@php.net wrote:

 Hello!

 The PHP Development Team would like to announce the immediate release of
 PHP 5.5.0. This release includes a large number of new features and bug
 fixes.

 A separate release announcement is also available. For changes in PHP
 5.5.0 since PHP 5.4, please consult the PHP 5 ChangeLog.

 Release Announcement: http://www.php.net/release_5_5_0.php
 Downloads:http://www.php.net/downloads.php#v5.5
 Changelog:http://www.php.net/ChangeLog-5.php#5.5.0

 Thanks to all contributors that made this new version available.

 regards,

 David Soria Parra  Julien Pauli



[PHP] Re: [PHP-DEV] PHP 5.4.16 and PHP 5.3.26 released!

2013-06-06 Thread Pierre Schmitz
Am 07.06.2013 01:58, schrieb Stas Malyshev:
 Hello!
 
 The PHP development team announces the immediate availability of PHP
 5.4.16 and PHP 5.3.26. These releases fix about 15 bugs, including
 CVE-2013-2110. All users of PHP are encouraged to upgrade to PHP 5.4.16.
 PHP 5.3.26 is recommended for those wishing to remain on the 5.3 series.

Is there a way to access the content of the relevant bug report here?
https://bugs.php.net/bug.php?id=64879 Who is allowed to see these
private reports?

Greetings,

Pierre

-- 
Pierre Schmitz, https://pierre-schmitz.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [PHP-DEV] feature request : easy shared memory

2013-03-18 Thread Matijn Woudt
On Mon, Mar 18, 2013 at 3:46 AM, Larry Garfield la...@garfieldtech.comwrote:

 On 03/14/2013 01:21 PM, Bob Weinand wrote:

 Sharing active memory between processes goes against the shared nothing
 design of PHP.  The lack of the feature you're describing is itself a
 feature. :-)

 If you had real shared memory, then you're now writing a multi-threaded
 app.  Even if you aren't using threads per se it's the same level of
 potential for spooky action at a distance.  If your problem space really
 requires that (and there certainly are those that do), Java or NodeJs will
 suit you better because those are built specifically for a
 persistent-server model, rather than PHP's shared-nothing design. However,
 in practice most PHP/web applications don't need that, because HTTP is a
 stateless request/response system.  Shared-nothing more closely models what
 the actual environment is doing, and can still be very performant as long
 as you don't do anything naive.

 If you're doing something stateful like Web Sockets, then you can run
 PHP as a cli application that is its own persistent server rather than as
 an Apache add-on.  For that, look at Ratchet: http://socketo.me/

 --Larry Garfield

 If PHP should be so restrictive against sharing, why are there extensions
 like memcached, ...? Someone must have missed this possibility to share
 rapidly...

 If I need something like websockets, I use the pthreads extension:
 perfectly suited for stateful applications.

 For example: I want to have the database in memory (no, no mysql
 Memory-tables; this is too slow...) and only do the updates into the
 database for faster access when most contents are read-only. What are these
 good reasons against such a feature except it violates the shares-nothing
 superlative of PHP. (Even if this feature would exist, you can still write
 PHP without sharing)

 Bo Weinand


 Memcache is out of process.  There are possible race conditions there, but
 FAR fewer and FAR more contained than true multi-threaded environments.

 This list has debated the merits of shared-nothing many times before; it
 was a deliberate design decision in the interest of simplifying development
 for the overwhelming majority of users.  If your app is so performance
 sensitive that a memcache lookup is going to bring it to its knees, then
 either you're misusing PHP or you're better off using something other than
 PHP.  (PHP is not the tool for every use case.)

 In any event, adding true shared memory to PHP would be nearly impossible
 without completely redesigning the way it interacts with web servers.  The
 alternative is to write your own PHP CLI application that connects to
 sockets itself and runs as a daemon (possibly using the pthreads extention
 as you mention), and cut apache/nginx out of the picture entirely.  If your
 use case calls for that, knock yourself out.  But the good reasons
 against adding such a feature is that it would require rewriting everything
 and rearchitecting the entire Apache SAPI, which is not happening any time
 soon.

 --Larry Garfield


I don't see why you would need to cut out apache/nginx. I would set up the
server just like you (Larry) describe, with socket  pthreads, but it would
be far more easier to just create a simple php file inside your
apache/nginx directory. Use something like mod_rewrite to redirect all urls
to this php file. In this file, connect to the application server, send the
request data ($_GET, $_POST, etc) to the application server, and pass all
data retrieved from the application server back to the user.
And there you go, you have an application server.

- Matijn


[PHP] Re: [PHP-DEV] feature request : easy shared memory

2013-03-17 Thread Larry Garfield

On 03/14/2013 01:21 PM, Bob Weinand wrote:

Sharing active memory between processes goes against the shared nothing 
design of PHP.  The lack of the feature you're describing is itself a feature. :-)

If you had real shared memory, then you're now writing a multi-threaded app.  
Even if you aren't using threads per se it's the same level of potential for 
spooky action at a distance.  If your problem space really requires that (and 
there certainly are those that do), Java or NodeJs will suit you better because 
those are built specifically for a persistent-server model, rather than PHP's 
shared-nothing design. However, in practice most PHP/web applications don't 
need that, because HTTP is a stateless request/response system.  Shared-nothing 
more closely models what the actual environment is doing, and can still be very 
performant as long as you don't do anything naive.

If you're doing something stateful like Web Sockets, then you can run PHP as a 
cli application that is its own persistent server rather than as an Apache 
add-on.  For that, look at Ratchet: http://socketo.me/

--Larry Garfield

If PHP should be so restrictive against sharing, why are there extensions like 
memcached, ...? Someone must have missed this possibility to share rapidly...

If I need something like websockets, I use the pthreads extension: perfectly 
suited for stateful applications.

For example: I want to have the database in memory (no, no mysql Memory-tables; 
this is too slow...) and only do the updates into the database for faster 
access when most contents are read-only. What are these good reasons against 
such a feature except it violates the shares-nothing superlative of PHP. (Even 
if this feature would exist, you can still write PHP without sharing)

Bo Weinand


Memcache is out of process.  There are possible race conditions there, 
but FAR fewer and FAR more contained than true multi-threaded environments.


This list has debated the merits of shared-nothing many times before; it 
was a deliberate design decision in the interest of simplifying 
development for the overwhelming majority of users.  If your app is so 
performance sensitive that a memcache lookup is going to bring it to its 
knees, then either you're misusing PHP or you're better off using 
something other than PHP.  (PHP is not the tool for every use case.)


In any event, adding true shared memory to PHP would be nearly 
impossible without completely redesigning the way it interacts with web 
servers.  The alternative is to write your own PHP CLI application that 
connects to sockets itself and runs as a daemon (possibly using the 
pthreads extention as you mention), and cut apache/nginx out of the 
picture entirely.  If your use case calls for that, knock yourself out.  
But the good reasons against adding such a feature is that it would 
require rewriting everything and rearchitecting the entire Apache SAPI, 
which is not happening any time soon.


--Larry Garfield

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP 5.4 Help

2013-03-06 Thread Alessandro Pellizzari
Il Wed, 06 Mar 2013 08:41:43 -0800, Great Recordings, LLC ha scritto:

 Will someone tell me if the small module included on the bottom of this
 note will function properly under PHP 5.4? (Register_Globals turned
 off).  If it does not function properly with Register_Globals turned
 off, is there a way to make changes  to the module so it does function
 properly with Register-Globals turned off?

It is impossible to answer without knowing what is in prepend.inc (and in 
all the files included o required by it.
It is also impossible to know what is in the process identified by 
$processName (it is an external executable).

Per se, this small script doesn't need register_globals, but it calls 
external resources that could require it.

Your best bet is to find a relly good developer who can try to adapt the 
software to PHP 5.4.

IF the software is open source (or at least you have the sources).

I suppose he will not be able to do it in less than 20 days, so you 
should find a new hosting company that will allow you to keep 
register_globals on until the conversion (or the complete rewrite) is 
finished.

Bye.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DEV] PHP 5.3.22RC1 and 5.4.12RC1 Released for Testing!

2013-02-19 Thread Jan Ehrhardt
Johannes Schlüter in php.internals (Thu, 31 Jan 2013 16:00:17 +0100):
If no critical issues is found in this RC, the final version will be
released in two weeks.

Just curious: what is keeping 5.3.22 and 5.4.12 from being released?
Are there any issues?

Jan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DEV] PHP 5.3.22RC1 and 5.4.12RC1 Released for Testing!

2013-02-19 Thread Johannes Schlüter
On Wed, 2013-02-20 at 00:13 +0100, Jan Ehrhardt wrote:
 Johannes Schlüter in php.internals (Thu, 31 Jan 2013 16:00:17 +0100):
 If no critical issues is found in this RC, the final version will be
 released in two weeks.
 
 Just curious: what is keeping 5.3.22 and 5.4.12 from being released?
 Are there any issues?

As a look on qa.php.net or the box on the top right of php.net tells we
have RC2 for both out, you can also see in the repo that the release is
being prepared:

http://git.php.net/?p=php-src.git;a=blobdiff;f=NEWS;h=d3a3e9fa0f344d9b736ea17ce408df6b02e8b561;hp=c4262020de69b7a93b8fcf4923e85194756435a7;hb=0183c29cb3921926855ed6f5e7cea7851fb8a5a1;hpb=904d2202eaecb7c300c36f37ebc5503513220c09

Please test the RCs and provide test feedback. Thanks.

johannes



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DEV] PHP 5.3.22RC1 and 5.4.12RC1 Released for Testing!

2013-02-19 Thread Stas Malyshev
Hi!

 Johannes Schlüter in php.internals (Thu, 31 Jan 2013 16:00:17 +0100):
 If no critical issues is found in this RC, the final version will be
 released in two weeks.
 
 Just curious: what is keeping 5.3.22 and 5.4.12 from being released?
 Are there any issues?

We had 5.4.12 RC2 last week, due to recent SOAP fixes we had to pull in,
and will have 5.4.12 GA this week.


-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DEV] PHP 5.3.22RC1 and 5.4.12RC1 Released for Testing!

2013-02-19 Thread Jan Ehrhardt
Stas Malyshev in php.internals (Tue, 19 Feb 2013 15:35:54 -0800):
 Johannes Schlüter in php.internals (Thu, 31 Jan 2013 16:00:17 +0100):
 If no critical issues is found in this RC, the final version will be
 released in two weeks.
 
 Just curious: what is keeping 5.3.22 and 5.4.12 from being released?
 Are there any issues?

We had 5.4.12 RC2 last week, due to recent SOAP fixes we had to pull in,
and will have 5.4.12 GA this week.

OK. Johannes' reply made me think I mistook the final RC for the
release, but you seem to indicate there was indeed a little delay.

For Johannes: building 5.3.22 and 5.4.12 (both NTS, Windows) right now.
I will report back if I run into something.

Jan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DEV] new FTP function

2013-01-18 Thread Daniel Brown
On Fri, Jan 18, 2013 at 10:33 AM, KISE wowk...@gmail.com wrote:
 Paul Dragoonis,

 Actually it wont work i did tried it before, if the dir end with / it will
 list the directories inside the path you gave it and if it doesn't have any
 directories it will return false since there is no directories to return.

 you have to take out the last / and then remove the directory in question
 and list the files in the parent directory and check if the dir exists
 otherwise it will return false, i spent 3hrs yesterday thinking why its
 returning false even though the directory exists.

The discussion is now getting more into the general coding realm
than internals, so let's move it over there in case anyone wants to
mention something like:

function ftp_dir_exists($conn, $currentDir) {
$currentDir = (substr($currentDir,-1,1) == '/') ?
substr($currentDir,0,-1) : $currentDir;
$list  = ftp_nlist($conn, '-dF '. $currentDir);
return in_array($currentDir, $list);
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [PHP-DEV] new FTP function

2013-01-18 Thread tamouse mailing lists
On Fri, Jan 18, 2013 at 9:43 AM, Daniel Brown danbr...@php.net wrote:
 On Fri, Jan 18, 2013 at 10:33 AM, KISE wowk...@gmail.com wrote:
 Paul Dragoonis,

 Actually it wont work i did tried it before, if the dir end with / it will
 list the directories inside the path you gave it and if it doesn't have any
 directories it will return false since there is no directories to return.

 you have to take out the last / and then remove the directory in question
 and list the files in the parent directory and check if the dir exists
 otherwise it will return false, i spent 3hrs yesterday thinking why its
 returning false even though the directory exists.

 The discussion is now getting more into the general coding realm
 than internals, so let's move it over there in case anyone wants to
 mention something like:

 function ftp_dir_exists($conn, $currentDir) {
 $currentDir = (substr($currentDir,-1,1) == '/') ?
 substr($currentDir,0,-1) : $currentDir;
 $list  = ftp_nlist($conn, '-dF '. $currentDir);
 return in_array($currentDir, $list);
 }


Haven't played with ftp functions at all, but wondering what if you
gave it dirname($currentDir) instead of $currentDir? (Still have to do
the trailing '/'-ectomy)

   $list = ftp_nlist($conn, dirname($currentDir));

untested, just a thought.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [PHP-DEV] new FTP function

2013-01-18 Thread tamouse mailing lists
On Fri, Jan 18, 2013 at 9:26 PM, tamouse mailing lists
tamouse.li...@gmail.com wrote:
 On Fri, Jan 18, 2013 at 9:43 AM, Daniel Brown danbr...@php.net wrote:
 On Fri, Jan 18, 2013 at 10:33 AM, KISE wowk...@gmail.com wrote:
 Paul Dragoonis,

 Actually it wont work i did tried it before, if the dir end with / it will
 list the directories inside the path you gave it and if it doesn't have any
 directories it will return false since there is no directories to return.

 you have to take out the last / and then remove the directory in question
 and list the files in the parent directory and check if the dir exists
 otherwise it will return false, i spent 3hrs yesterday thinking why its
 returning false even though the directory exists.

 The discussion is now getting more into the general coding realm
 than internals, so let's move it over there in case anyone wants to
 mention something like:

 function ftp_dir_exists($conn, $currentDir) {
 $currentDir = (substr($currentDir,-1,1) == '/') ?
 substr($currentDir,0,-1) : $currentDir;
 $list  = ftp_nlist($conn, '-dF '. $currentDir);
 return in_array($currentDir, $list);
 }


 Haven't played with ftp functions at all, but wondering what if you
 gave it dirname($currentDir) instead of $currentDir? (Still have to do
 the trailing '/'-ectomy)

$list = ftp_nlist($conn, dirname($currentDir));

 untested, just a thought.

Although on further thought, if $currentDir actually points to a
non-directory, that will still pass, won't it. Might have to go with
ftp_rawlist and parse it out to ensure it is a directory... Check the
first character of each line to see if it's 'd', then the file name
will be the last field in the line.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DB] Re: [PHP] Shopping Cart Discount System

2012-12-31 Thread Karl DeSaulniers


On Dec 31, 2012, at 3:36 AM, Ashley Sheridan wrote:




Karl DeSaulniers k...@designdrumm.com wrote:


Hello Everyone,
Hope all are well. Quick and hopefully painless question.
Is there any examples on how to build a discount system
into your shopping cart out there that anyone knows of?
I am using MySQL and PHP. I have built one of my own so far,
but am having trouble making sense of what goes where.

For example. If a product has miscellaneous charges,
lets say.. glitter is extra on your shirt.
How is discounts applied? I mean, as far as discounts go,
lets say its 20% a shirt and this shirt has glitter.
Is it best practice to apply the discount to just the shirt
or the shirt and glitter as a combo discount.
I know this is somewhat dependent on the owners choice
of what he/she wants to give the discount on,
but my question is of the programing of it.
Do I build conditions for the shirt to get a discount applied
then the miscellaneous charges, or combine the totals of the two,
then apply the discount to the sum?

Then lets say there is a cart discount also being applied.
Is it best practice to apply this to the total of items then
add the shipping, rush charges and tax, or to the total of the whole
cart
including shipping, rush charges then add the tax after applying the
discount?

Sorry for the run-on question, hope this makes sense enough to merit
help.

HNY,

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com

PS: Because this question could be answered by either database or
general, is the only reason for the double post.
Wont be making a habit of it.. :)


I would apply the discounts where they made sense from a customer  
POV. Would you expect a t-shirt discount to be applied to only the  
base item or the product as a whole? I'd say tge whole thing. You  
could have various areas in your code that apply discounts at  
different levels: per item, per group of items (bogof, etc), and per  
basket.



Thanks,
Ash
http://www.ashleysheridan.co.uk

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




That does make more sense now that you say.
I guess I would want or expect the discount to apply to the whole thing.
Thanks Ash.

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Jim Giner

On 10/14/2012 1:10 AM, tamouse mailing lists wrote:

This just dropped in my inbox the other day from Smashing #69:


2. PHP The Right Way

If you are developing for the Web, the chances are high that you have
to deal with PHP on a regular basis. However, once you've stumbled
upon a problem that you have to solve, finding a good solution among
thousands and thousands of (partly outdated) PHP tutorials out there
can be quite a nightmare — especially if you are relatively new to
PHP. Where would you go to learn about the current best practices in
PHP?

PHP The Right Way

Perhaps PHP The Right Way. The site is an easy-to-read, quick
reference for the best practices in PHP, accepted coding standards,
and links to authoritative tutorials around the Web. Josh Lockhart has
worked together with a dozen of well-respected members of the PHP
community to create a useful, up-to-date resource for everybody to
use.



I've just been perusing it, and it offers some good advice. Anyone
here work on it / read it? Thoughts?

Sounds like a good idea, but as for me - if I was a newbie I'd have a 
problem with their very first instructions.  It says right off the start 
to type in the following:

php -5 localhost:8000

which when I do (from a dos prompt) gives me a nice description of the 
command, but fails to do anything else for me.  So how does this (as it 
says) help me learn with the hassle of configureing and installing a 
full-fledged web server?




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread tamouse mailing lists
On Sun, Oct 14, 2012 at 10:48 AM, Jim Giner
jim.gi...@albanyhandball.com wrote:
 On 10/14/2012 1:10 AM, tamouse mailing lists wrote:

 This just dropped in my inbox the other day from Smashing #69:

 2. PHP The Right Way

 If you are developing for the Web, the chances are high that you have
 to deal with PHP on a regular basis. However, once you've stumbled
 upon a problem that you have to solve, finding a good solution among
 thousands and thousands of (partly outdated) PHP tutorials out there
 can be quite a nightmare — especially if you are relatively new to
 PHP. Where would you go to learn about the current best practices in
 PHP?

 PHP The Right Way

 Perhaps PHP The Right Way. The site is an easy-to-read, quick
 reference for the best practices in PHP, accepted coding standards,
 and links to authoritative tutorials around the Web. Josh Lockhart has
 worked together with a dozen of well-respected members of the PHP
 community to create a useful, up-to-date resource for everybody to
 use.


 I've just been perusing it, and it offers some good advice. Anyone
 here work on it / read it? Thoughts?

 Sounds like a good idea, but as for me - if I was a newbie I'd have a
 problem with their very first instructions.  It says right off the start to
 type in the following:
 php -5 localhost:8000

 which when I do (from a dos prompt) gives me a nice description of the
 command, but fails to do anything else for me.  So how does this (as it
 says) help me learn with the hassle of configureing and installing a
 full-fledged web server?

Are you running 5.4+? First thing it says is Use the current stable
version (5.4). The PHP server (-S) is not available in anything
earlier.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Daniel Brown
On Sun, Oct 14, 2012 at 11:48 AM, Jim Giner
jim.gi...@albanyhandball.com wrote:

 Sounds like a good idea, but as for me - if I was a newbie I'd have a
 problem with their very first instructions.  It says right off the start to
 type in the following:
 php -5 localhost:8000

That should be a capital S, not a five.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Jim Giner

On 10/14/2012 12:06 PM, tamouse mailing lists wrote:

On Sun, Oct 14, 2012 at 10:48 AM, Jim Giner
jim.gi...@albanyhandball.com wrote:

On 10/14/2012 1:10 AM, tamouse mailing lists wrote:


This just dropped in my inbox the other day from Smashing #69:


2. PHP The Right Way

If you are developing for the Web, the chances are high that you have
to deal with PHP on a regular basis. However, once you've stumbled
upon a problem that you have to solve, finding a good solution among
thousands and thousands of (partly outdated) PHP tutorials out there
can be quite a nightmare — especially if you are relatively new to
PHP. Where would you go to learn about the current best practices in
PHP?

PHP The Right Way

Perhaps PHP The Right Way. The site is an easy-to-read, quick
reference for the best practices in PHP, accepted coding standards,
and links to authoritative tutorials around the Web. Josh Lockhart has
worked together with a dozen of well-respected members of the PHP
community to create a useful, up-to-date resource for everybody to
use.



I've just been perusing it, and it offers some good advice. Anyone
here work on it / read it? Thoughts?


Sounds like a good idea, but as for me - if I was a newbie I'd have a
problem with their very first instructions.  It says right off the start to
type in the following:
php -5 localhost:8000

which when I do (from a dos prompt) gives me a nice description of the
command, but fails to do anything else for me.  So how does this (as it
says) help me learn with the hassle of configureing and installing a
full-fledged web server?


Are you running 5.4+? First thing it says is Use the current stable
version (5.4). The PHP server (-S) is not available in anything
earlier.

I'm not running anything.  It says to type a command and I did.  That's 
my point - it's kind of misleading in it's introduction.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Jim Giner

On 10/14/2012 12:12 PM, Daniel Brown wrote:

On Sun, Oct 14, 2012 at 11:48 AM, Jim Giner
jim.gi...@albanyhandball.com wrote:



Sounds like a good idea, but as for me - if I was a newbie I'd have a
problem with their very first instructions.  It says right off the start to
type in the following:
php -5 localhost:8000


 That should be a capital S, not a five.


hmmm,  that does make a difference.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php can't insert data mysql table

2012-10-01 Thread Jim Giner

On 10/1/2012 12:32 AM, Tim Dunphy wrote:

Hello list,

  I'm trying to learn and get comfortable with HTML forms in PHP. In one
example I am trying to include a file upload in one of the forms. I can
connect to the database but for some reason the MySQL query string is bad.
I've been over this for a while now and I think the problem is with the
form. I was hoping to get the esteemed opinion of the list in where I may
be going wrong.

This code:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
head
   meta http-equiv=Content-Type content=text/html; charset=utf-8 /
   titleGuitar Wars - Add Your High Score/title
   link rel=stylesheet type=text/css href=style.css /
/head
body
   h2Guitar Wars - Add Your High Score/h2

?php
   if (isset($_POST['submit'])) {
 // Grab the score data from the POST
 $name = $_POST['name'];
 $score = $_POST['score'];
 $screenshot = $_FILES['screenshot']['name'];

 if (!empty($name)  !empty($score)) {
   // Connect to the database
   $dbc = mysqli_connect('localhost', 'admin', 'secretsauce', 'gwdb')
   or die('Cannot connect to database');

   // Write the data to the database
   $query = INSERT INTO guitarwars VALUES (0, NOW(), '$name', '$score',
'$screenshot');
   mysqli_query($dbc, $query)
  or die('Cannot insert query');

   // Confirm success with the user
   echo 'pThanks for adding your new high score!/p';
   echo 'pstrongName:/strong ' . $name . 'br /';
   echo 'strongScore:/strong ' . $score . '/p';
   echo 'pa href=index.phplt;lt; Back to high scores/a/p';

   // Clear the score data to clear the form
   $name = ;
   $score = ;

   mysqli_close($dbc);
 }
 else {
   echo 'p class=errorPlease enter all of the information to add
your high score./p';
 }
   }
?

   hr /
   form enctype=multipart/form-data method=post action=?php echo
$_SERVER['PHP_SELF']; ?
 input type=hidden name=MAX_FILE_SIZE value=32768 /
 label for=nameName:/label
 input type=text id=name name=name value=?php if
(!empty($name)) echo $name; ? /br /
 label for=scoreScore:/label
 input type=text id=score name=score value=?php if
(!empty($score)) echo $score; ? /
 br /
 label for=screenshotScreenshot:/label
 input type=file id=screenshot name=screenshot /
 hr /
 input type=submit value=Add name=submit /
   /form
/body
/html

Results in this output:

Guitar Wars - Add Your High Score Cannot insert query

Thanks again for your help. This is an awesome list!


Tim


You should have your error settings set to show everything.
I include these three lines in all my development work:

error_reporting(E_ALL);
ini_set('display_errors', '1');
set_time_limit(2);

In this case, I do think that your insert statement is incorrect - I 
could be wrong.  I think the VALUES clause s/b just 'VALUE'.  Also if 
you added MYSQLI_ERROR to your error handling you should get a very 
helpful message.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php can't insert data mysql table

2012-10-01 Thread Tommy Pham
On Mon, Oct 1, 2012 at 6:03 AM, Jim Giner jim.gi...@albanyhandball.com wrote:

 In this case, I do think that your insert statement is incorrect - I could
 be wrong.  I think the VALUES clause s/b just 'VALUE'.  Also if you added
 MYSQLI_ERROR to your error handling you should get a very helpful message.


VALUES also work.  See http://dev.mysql.com/doc/refman/5.5/en/insert.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php can't insert data mysql table

2012-10-01 Thread Jim Giner

On 10/1/2012 9:12 AM, Tommy Pham wrote:

On Mon, Oct 1, 2012 at 6:03 AM, Jim Giner jim.gi...@albanyhandball.com wrote:


In this case, I do think that your insert statement is incorrect - I could
be wrong.  I think the VALUES clause s/b just 'VALUE'.  Also if you added
MYSQLI_ERROR to your error handling you should get a very helpful message.



VALUES also work.  See http://dev.mysql.com/doc/refman/5.5/en/insert.html


Yeah - I just saw it in one of my scripts.

So - adding the error handling and the call to mysqli_error should help 
the OP diagnose his problem.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php can't insert data mysql table

2012-10-01 Thread Jim Giner

On 10/1/2012 12:32 AM, Tim Dunphy wrote:

Hello list,

  I'm trying to learn and get comfortable with HTML forms in PHP. In one
example I am trying to include a file upload in one of the forms. I can
connect to the database but for some reason the MySQL query string is bad.
I've been over this for a while now and I think the problem is with the
form. I was hoping to get the esteemed opinion of the list in where I may
be going wrong.

This code:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
head
   meta http-equiv=Content-Type content=text/html; charset=utf-8 /
   titleGuitar Wars - Add Your High Score/title
   link rel=stylesheet type=text/css href=style.css /
/head
body
   h2Guitar Wars - Add Your High Score/h2

?php
   if (isset($_POST['submit'])) {
 // Grab the score data from the POST
 $name = $_POST['name'];
 $score = $_POST['score'];
 $screenshot = $_FILES['screenshot']['name'];

 if (!empty($name)  !empty($score)) {
   // Connect to the database
   $dbc = mysqli_connect('localhost', 'admin', 'secretsauce', 'gwdb')
   or die('Cannot connect to database');

   // Write the data to the database
   $query = INSERT INTO guitarwars VALUES (0, NOW(), '$name', '$score',
'$screenshot');
   mysqli_query($dbc, $query)
  or die('Cannot insert query');

   // Confirm success with the user
   echo 'pThanks for adding your new high score!/p';
   echo 'pstrongName:/strong ' . $name . 'br /';
   echo 'strongScore:/strong ' . $score . '/p';
   echo 'pa href=index.phplt;lt; Back to high scores/a/p';

   // Clear the score data to clear the form
   $name = ;
   $score = ;

   mysqli_close($dbc);
 }
 else {
   echo 'p class=errorPlease enter all of the information to add
your high score./p';
 }
   }
?

   hr /
   form enctype=multipart/form-data method=post action=?php echo
$_SERVER['PHP_SELF']; ?
 input type=hidden name=MAX_FILE_SIZE value=32768 /
 label for=nameName:/label
 input type=text id=name name=name value=?php if
(!empty($name)) echo $name; ? /br /
 label for=scoreScore:/label
 input type=text id=score name=score value=?php if
(!empty($score)) echo $score; ? /
 br /
 label for=screenshotScreenshot:/label
 input type=file id=screenshot name=screenshot /
 hr /
 input type=submit value=Add name=submit /
   /form
/body
/html

Results in this output:

Guitar Wars - Add Your High Score Cannot insert query

Thanks again for your help. This is an awesome list!


Tim

ON second glance - your table seems to have 4 fields: 
id,date,id,name,screenshot.


Your insert has 5 values: VALUES (0, NOW(), '$name', '$score', 
'$screenshot')


That right there is going to throw an error.

BTW - You're saving the name of the screen shot file but are you 
actually saving the uploaded file somewhere else in your code?  Didn't 
see it here and just wondered.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php can't insert data mysql table

2012-10-01 Thread Jim Giner
oops - I added a an extra id field.  There were only 4 in OP's 
DESCRIBE email.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php can't insert data mysql table

2012-10-01 Thread Tim Dunphy
hey thanks guys adding debugging info worked.

Actually it was mysqli_error() providing me with a specific error of where
the problem was.

Cannot insert query:Duplicate entry '0' for key 'PRIMARY'

This is the data in the table

mysql select * from guitarwars;
++-+---+---+---+
| id | date| name  | score | screenshot|
++-+---+---+---+
|  0 | 2012-10-01 11:55:45 | Tommy Tutone  |  2442 | bg_titlestrip.jpg |
|  1 | 2012-10-01 08:34:18 | Dunphy| 2 | proof.jpg |
|  2 | 2012-10-01 00:25:53 | ray davies|  NULL | 2241  |
|  3 | 2008-04-22 14:37:34 | Paco Jastorius|  NULL | NULL  |
|  4 | 2008-04-22 21:27:54 | Nevil Johansson   |  NULL | NULL  |
|  5 | 2008-04-23 09:12:53 | Belita Chevy  |  NULL | NULL  |
|  6 | 2008-04-23 14:09:50 | Kenny Lavitz  |  NULL | NULL  |
|  7 | 2008-04-24 08:13:52 | Phiz Lairston |  NULL | NULL  |
|  8 | 2008-04-25 07:22:19 | Jean Paul Jones   |  NULL | NULL  |
|  9 | 2008-04-25 11:49:23 | Jacob Scorcherson |  NULL | NULL  |
++-+---+---+---+


This was the query I was using:

$query = INSERT INTO guitarwars  (date, name, score, screenshot) VALUES
(NOW(), '$name', '$score', '$screenshot');

It seems to be inserting a default value of 0 since the id is not being
specified and that's when I realized that I had failed to auto_increment
the id column. D'oh! So once I did that everything worked like a charm.

@Ken
First -- NEVER post code with your database username/password. Since you
did, change your db password immediately.

Well actually I did not. Did you really think 'secretsauce' was my
password? :) But I guess you're right in that this may be a little
ambiguous when seeking advice in lists so from now on I will take your
advice on making login information unambiguously fake in the form of
user='' and password='xxx'.

@Stuart
But take note of what everyone else is saying. You should be getting the
error message when this happens which will tell you exactly what the
problem is, above and beyond Cannot insert query (which, btw, makes no
sense at all :)).

Ok well I'm using an 'insert' query so I'm not sure why you say that this
makes no sense at all. :)) If you don't mind giving this n00b advice what
would be a better/more accurate error message?

They take away from this for me was.. don't skimp on the error messages!
The one I got was so clear that fixing the problem was easy at that point.

But thanks again guys.. this list has been an indispensable source source
of wisdom on my journey in learning PHP.

Tim


Thanks again guys,
Tim



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


Re: [PHP] Re: php can't insert data mysql table

2012-10-01 Thread Jim Giner

On 10/1/2012 12:20 PM, Tim Dunphy wrote:

hey thanks guys adding debugging info worked.

Actually it was mysqli_error() providing me with a specific error of where
the problem was.

Cannot insert query:Duplicate entry '0' for key 'PRIMARY'

This is the data in the table

mysql select * from guitarwars;
++-+---+---+---+
| id | date| name  | score | screenshot|
++-+---+---+---+
|  0 | 2012-10-01 11:55:45 | Tommy Tutone  |  2442 | bg_titlestrip.jpg |
|  1 | 2012-10-01 08:34:18 | Dunphy| 2 | proof.jpg |
|  2 | 2012-10-01 00:25:53 | ray davies|  NULL | 2241  |
|  3 | 2008-04-22 14:37:34 | Paco Jastorius|  NULL | NULL  |
|  4 | 2008-04-22 21:27:54 | Nevil Johansson   |  NULL | NULL  |
|  5 | 2008-04-23 09:12:53 | Belita Chevy  |  NULL | NULL  |
|  6 | 2008-04-23 14:09:50 | Kenny Lavitz  |  NULL | NULL  |
|  7 | 2008-04-24 08:13:52 | Phiz Lairston |  NULL | NULL  |
|  8 | 2008-04-25 07:22:19 | Jean Paul Jones   |  NULL | NULL  |
|  9 | 2008-04-25 11:49:23 | Jacob Scorcherson |  NULL | NULL  |
++-+---+---+---+


This was the query I was using:

$query = INSERT INTO guitarwars  (date, name, score, screenshot) VALUES
(NOW(), '$name', '$score', '$screenshot');

It seems to be inserting a default value of 0 since the id is not being
specified and that's when I realized that I had failed to auto_increment
the id column. D'oh! So once I did that everything worked like a charm.

@Ken

First -- NEVER post code with your database username/password. Since you

did, change your db password immediately.

Well actually I did not. Did you really think 'secretsauce' was my
password? :) But I guess you're right in that this may be a little
ambiguous when seeking advice in lists so from now on I will take your
advice on making login information unambiguously fake in the form of
user='' and password='xxx'.

@Stuart
But take note of what everyone else is saying. You should be getting the
error message when this happens which will tell you exactly what the
problem is, above and beyond Cannot insert query (which, btw, makes no
sense at all :)).

Ok well I'm using an 'insert' query so I'm not sure why you say that this
makes no sense at all. :)) If you don't mind giving this n00b advice what
would be a better/more accurate error message?

They take away from this for me was.. don't skimp on the error messages!
The one I got was so clear that fixing the problem was easy at that point.

But thanks again guys.. this list has been an indispensable source source
of wisdom on my journey in learning PHP.

Tim


Thanks again guys,
Tim



I think the comment about your cannot insert query was because it 
really did not make sense.  Once truly cannot insert a query.  Since 
you ask tho, a more approp message might be
Insert query failed to execute.brError returned was  . 
mysqli_error() . brQuery was $q


As for your index issue - you are using an autoincrement(?) field as the 
primary key.  Is this related to another record in your db?  If not, why 
even have the primary key?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php can't insert data mysql table

2012-10-01 Thread Tim Dunphy

 I think the comment about your cannot insert query was because it really
 did not make sense.  Once truly cannot insert a query.  Since you ask
 tho, a more approp message might be
 Insert query failed to execute.brError returned was  . mysqli_error()
 . brQuery was $q

 As for your index issue - you are using an autoincrement(?) field as the
 primary key.  Is this related to another record in your db?  If not, why
 even have the primary key?

 Hey! I really like your error message. Borrowing it! :) Yes I am now using
auto_increment, and that's what seemed to solve my issue. Looks like a
simple omission in forgetting to use auto_increment and using primary key.
I usually know better. I'll blame this one on the clonopin. lol

thank you
tim

On Mon, Oct 1, 2012 at 12:30 PM, Jim Giner jim.gi...@albanyhandball.comwrote:

 On 10/1/2012 12:20 PM, Tim Dunphy wrote:

 hey thanks guys adding debugging info worked.

 Actually it was mysqli_error() providing me with a specific error of where
 the problem was.

 Cannot insert query:Duplicate entry '0' for key 'PRIMARY'

 This is the data in the table

 mysql select * from guitarwars;
 ++-+--**-+---+**
 ---+
 | id | date| name  | score | screenshot
  |
 ++-+--**-+---+**
 ---+
 |  0 | 2012-10-01 11:55:45 | Tommy Tutone  |  2442 |
 bg_titlestrip.jpg |
 |  1 | 2012-10-01 08:34:18 | Dunphy| 2 | proof.jpg
   |
 |  2 | 2012-10-01 00:25:53 | ray davies|  NULL | 2241
  |
 |  3 | 2008-04-22 14:37:34 | Paco Jastorius|  NULL | NULL
  |
 |  4 | 2008-04-22 21:27:54 | Nevil Johansson   |  NULL | NULL
  |
 |  5 | 2008-04-23 09:12:53 | Belita Chevy  |  NULL | NULL
  |
 |  6 | 2008-04-23 14:09:50 | Kenny Lavitz  |  NULL | NULL
  |
 |  7 | 2008-04-24 08:13:52 | Phiz Lairston |  NULL | NULL
  |
 |  8 | 2008-04-25 07:22:19 | Jean Paul Jones   |  NULL | NULL
  |
 |  9 | 2008-04-25 11:49:23 | Jacob Scorcherson |  NULL | NULL
  |
 ++-+--**-+---+**
 ---+


 This was the query I was using:

 $query = INSERT INTO guitarwars  (date, name, score, screenshot) VALUES
 (NOW(), '$name', '$score', '$screenshot');

 It seems to be inserting a default value of 0 since the id is not being
 specified and that's when I realized that I had failed to auto_increment
 the id column. D'oh! So once I did that everything worked like a charm.

 @Ken

 First -- NEVER post code with your database username/password. Since you

 did, change your db password immediately.

 Well actually I did not. Did you really think 'secretsauce' was my
 password? :) But I guess you're right in that this may be a little
 ambiguous when seeking advice in lists so from now on I will take your
 advice on making login information unambiguously fake in the form of
 user='' and password='xxx'.

 @Stuart
 But take note of what everyone else is saying. You should be getting the
 error message when this happens which will tell you exactly what the
 problem is, above and beyond Cannot insert query (which, btw, makes no
 sense at all :)).

 Ok well I'm using an 'insert' query so I'm not sure why you say that this
 makes no sense at all. :)) If you don't mind giving this n00b advice what
 would be a better/more accurate error message?

 They take away from this for me was.. don't skimp on the error messages!
 The one I got was so clear that fixing the problem was easy at that point.

 But thanks again guys.. this list has been an indispensable source source
 of wisdom on my journey in learning PHP.

 Tim


 Thanks again guys,
 Tim



  I think the comment about your cannot insert query was because it
 really did not make sense.  Once truly cannot insert a query.  Since you
 ask tho, a more approp message might be
 Insert query failed to execute.brError returned was  . mysqli_error()
 . brQuery was $q

 As for your index issue - you are using an autoincrement(?) field as the
 primary key.  Is this related to another record in your db?  If not, why
 even have the primary key?



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


Re: [PHP] Re: PHP as Application Server

2012-09-27 Thread Maciej Liżewski
to Matijn Woudt: you are right there should be something like: public
void synchronized increment(), but that is not the point. Sure there
are disadvantages and other problems but what Alessando is saying is
I would not use cure for cancer even if it existed because it can
introduce other problems like overpopulation. There are cases when
application server adds much overhead that is not needed and there
are cases when it simplifies your tasks a lot. So from his mail the
only problem I can see is memory leaks, and I am not talking about
leaks in application because they can be caught in tests and fixed,
but mostly leaks in poorly wriiten PHP core and modules. Other like
session hijacking are not real problems (other languages somehow
managed it to work) or not so big in face of some other advantages
(like restarting application after change).

Robert Williams points that the main problem is with PHP programmers
who tend to ignore many aspects of multithreaded programming and PHP
helps them in that by hiding all threading aspects. There are still
people who can understand that and take profit from this knowlege.

The memory is also not such problem. I did some quite large PHP
projects and whole source code event if it were loaded in memory use
only few megabytes (event 100mb is not a problem). And am talking
about holding parsed structures in memory not the source files.
Applications I am talking about are mostly targeted to maximize
throughput and they are the only ones on server. In such cases *any*
speed improvement is worth attention.


I am not forcing anybody to use application server approach, but
rather like Robert said - good to have choice and decide on my own if
I want to write simple scripts or stateful application. The only
problem is that I do not have that choice not considering changing
language... at least I do not have such choice for now :)


2012/9/26 Robert Williams rewilli...@thesba.com:
 On 9/26/12 10:18, Matijn Woudt tijn...@gmail.com wrote:


Writing scripts for an application server requires a much deeper
understanding of threads and computer internals,so as a result it
probably increases error rate.

 Well... yes and no. PHP's architecture pretty much keeps you from having
 to mess with thread management, but it does so by shifting the burden to a
 higher level, either process management of multiple PHP processes or
 thread management within the context of the HTTP server. If your
 application is sufficiently simple, that shift may be enough to keep you
 from having to worry about the problem. For most applications, however,
 it's still a concern. In some ways, this can make things worse, simply
 because PHP programmers tend to be oblivious of the potential problems,
 whereas the typical C# or Java programmer has at least some awareness of
 the various traps that await them.

 As an example, I see PHP code *all the time* that is wide open to
 concurrency issues with the database. Most code just assumes it's the only
 code doing updates, but unless the server is set up to serialize requests,
 that's an invalid assumption. Recently, more folks have started to address
 this by using database transactions, but this is often done in ignorance
 of what isolation level is being used and what the impact of that is upon
 the code - which can just make things worse. Even when there is that
 awareness, there are database concurrency issues with which transactions
 can't help. (Of course, people who are aware of isolation levels also tend
 to be aware of other concurrency issues.) The point is, if you have
 multiple things running in parallel, whether that be threads within your
 application or entirely separate physical servers running multiple copies
 of your application, you have to deal with concurrency issues. It's a
 necessary evil of parallel programming, and no mere technological solution
 (language, database, whatever), now or in the future, can fully overcome
 it. Well, maybe an AI engine somewhere in the chain, but that's about it,
 and that's not coming anytime soon.

 Incidentally, another advantage of PHP's share-nothing approach that
 hasn't been mentioned is relatively easy scalability. In a shared pool
 architecture, the easiest way to scale is typically vertically, that is,
 adding RAM, faster drives, etc. This is fine, but you can only scale
 vertically to a certain point, which you can usually hit pretty quickly.
 With PHP's share-nothing approach, you can still scale vertically, but you
 can almost as easily scale horizontally by adding more servers that each
 run merrily in their own worlds, with the primary added coordination logic
 being in the areas of communicating with the database and the data cache,
 something the application should be designed with, anyway. In contrast,
 the shared approach requires added logic, somewhere, to coordinate the
 sharing amongst the pools of all that data that the application takes for
 granted is always available at low cost.

 

[PHP] Re: PHP as Application Server

2012-09-27 Thread Alessandro Pellizzari
Il Thu, 27 Sep 2012 12:28:00 +0200, Maciej Liżewski ha scritto:

 Sure there are
 disadvantages and other problems but what Alessando is saying is I
 would not use cure for cancer even if it existed because it can
 introduce other problems like overpopulation.

Uhm, no.

I see it as I would not use chemio if I could remove the cancer with 
laser therapy.

They are two ways to solve the same problem, and I think the non-
application-server way is the best.
It is similar to the Unix way: many small pieces tied together to reach a 
goal.
The application server is more like the Windows way: one big piece to 
reach a goal.

I understand sometimes the application server can be easier or fit 
better, but I think most of the times it is the wrong solution, 
expecially 
in PHP, but not exclusively.

Bye.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP as Application Server

2012-09-27 Thread Sebastian Krebs
Hi,

Once again I didn't read it completely (maybe I will do so), but my 2ct:

I recently played with Ruby and Python and of course with their application
server (at least a little bit). My experience was, that it is less fun as
it sounds in the first place compared to a well designed
webserver-interpreter-stack (and of course common OS-specific stuff for
CLI). In my eyes it is good the way it is: Let PHP do it's job and let
more intelligent tools do the other things, like spawning
request-handling processes.

Not saying, that I'm against an application, but I currently don't miss it
:) On the other side someone must maintain it and someone must make sure,
that it is secure and efficient. This resources should not taken from the
core-team.

Regards,
Sebastian

2012/9/27 Alessandro Pellizzari a...@amiran.it

 Il Thu, 27 Sep 2012 12:28:00 +0200, Maciej Liżewski ha scritto:

  Sure there are
  disadvantages and other problems but what Alessando is saying is I
  would not use cure for cancer even if it existed because it can
  introduce other problems like overpopulation.

 Uhm, no.

 I see it as I would not use chemio if I could remove the cancer with
 laser therapy.

 They are two ways to solve the same problem, and I think the non-
 application-server way is the best.
 It is similar to the Unix way: many small pieces tied together to reach a
 goal.
 The application server is more like the Windows way: one big piece to
 reach a goal.

 I understand sometimes the application server can be easier or fit
 better, but I think most of the times it is the wrong solution,
 expecially
 in PHP, but not exclusively.

 Bye.



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
github.com/KingCrunch


[PHP] Re: PHP as Application Server

2012-09-26 Thread Jim Giner

On 9/26/2012 5:58 AM, Maciej Liżewski wrote:

Hi,

Maybe this topic have been already on board, but I could not find nothing
in google, so my question to PHP maintaneers (and other users too) is:

Why there is no possibility to run PHP in application server way among
other SAPI modules and other possibilities to run PHP? PHP would encounter
great performance boost and became more enterprise :) Just look at Ruby
which is slow as hell compared even with PHP.

By application server I mean scenario when there is statefull application
on server side not only by session mechanizms but all classes definitions
maintained in memory (no need to load class definition on every request),
static class members (and their changes) persistent, background threads,
etc. This way any op-code cachers won't be necessary...

sounds great, huh? others have it already, so why doesn't PHP? are there
any cons? problems too hard to solve (one can be memory leaks, thread safe
coding, etc)? I mean it - I am realy curious why there is no such
possibility and is there any hope we could get it?

TIA for any answers on this topic.

Thirty+ years as a professional application designer, developer and 
manager and I don't have a clue about what you are proposing.  I must 
have been in a different world.  :)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP as Application Server

2012-09-26 Thread Maciej Liżewski
Well.. many things changed during last 30 years. Cobol is not
mainstream, we have got OOP, Java, Python, Ruby, Google and other
great things :)

I am talking about stateful application server. There are plenty
examples in other programming languages: Java has Jetty, Tomcat, Ruby
On Rails, Python and Passenger WSGI.
All of them have one common thing: application persist in memory
between requests. Even for interpreted languages (such Ruby) - this
has advantage of loading sources only once, parse it only once and
initialize memory structures for those definitions only once. On the
opposite - PHP loads EVERY single resource on every request. This is
why it needs op-code cachers, accelerators etc.
Another advantage of using stateful application servers is that you
can simply keep gloabal state of your application (global variables,
static object properties) in memory. It simplifies many tasks which in
PHP require sessions, writing files with serialized data and
deserialize them on every request...

Just imagine such scenarios:
now PHP acts like this on every request:
 1. locate resources (source files in this case), parse and load them
(possibly with op-code cache)
 2. initialize global context ($_SERVER, $GLOBALS, $_POST, $_GET, etc)
 3. run code
 4. destroy all resource and free memory for next request

persistent application servers load resources only on startup (or when
needed) and keep them in memory until programatically freed or until
end of application (server shutdown). So every request looks like
this:
 1. initialize global context
 2. run already parsed code

is that makes whole thing clear?

Another nice example - simple counter. In PHP you have to:
1. read file with counter
2. increment value
3. write serialized value to file
...on every request.

in Java (for example) you just write class:
class Counter {
  static private counter = 0;

  public void increment() {
this.counter++;
  }
}

and because class definition persists in application server - static
member is maintained between requests and whole things works as
expected...

2012/9/26 Jim Giner jim.gi...@albanyhandball.com:
 On 9/26/2012 5:58 AM, Maciej Liżewski wrote:

 Hi,

 Maybe this topic have been already on board, but I could not find nothing
 in google, so my question to PHP maintaneers (and other users too) is:

 Why there is no possibility to run PHP in application server way among
 other SAPI modules and other possibilities to run PHP? PHP would encounter
 great performance boost and became more enterprise :) Just look at Ruby
 which is slow as hell compared even with PHP.

 By application server I mean scenario when there is statefull
 application
 on server side not only by session mechanizms but all classes definitions
 maintained in memory (no need to load class definition on every request),
 static class members (and their changes) persistent, background threads,
 etc. This way any op-code cachers won't be necessary...

 sounds great, huh? others have it already, so why doesn't PHP? are there
 any cons? problems too hard to solve (one can be memory leaks, thread safe
 coding, etc)? I mean it - I am realy curious why there is no such
 possibility and is there any hope we could get it?

 TIA for any answers on this topic.

 Thirty+ years as a professional application designer, developer and manager
 and I don't have a clue about what you are proposing.  I must have been in a
 different world.  :)

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP as Application Server

2012-09-26 Thread Alessandro Pellizzari
Il Wed, 26 Sep 2012 17:23:35 +0200, Maciej Liżewski ha scritto:

 persistent application servers load resources only on startup (or when
 needed) and keep them in memory until programatically freed or until end
 of application (server shutdown). 

You don't mention the downsides:

- every application must be structured to not overwrite session data (you 
risk saving one user's data in another user's space)

- when changing even a single line in your code, you must restart 
(shutdown and start up) the whole app, closing all user connections and 
possibly losing all session data, forcing users to relogin.

- memory leaks are much more problematic

- you must manage threads, somehow, sometime.

Application servers have (IMHO) very little advantages (counters, and?) 
and a lot of disadvantages.

All (or nearly all) the advantages of application server have been 
superseded in PHP (precompiled caches, memcache, gearman, ... nodephp :) 
without losing its advantages (you can change a single file in the app 
and the precompiled cache auto-updates. You risk less with memory leaks, 
etc.)

Yes, some things are easier in Java (threading, syncronizing, etc.) but 
you can always write abstraction classes to do that for you.

I don't think I would use a PHP application server, even if it existed.

Bye.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP as Application Server

2012-09-26 Thread Jim Giner

On 9/26/2012 11:23 AM, Maciej Liżewski wrote:

Well.. many things changed during last 30 years. Cobol is not
mainstream, we have got OOP, Java, Python, Ruby, Google and other
great things :)

I am talking about stateful application server. There are plenty
examples in other programming languages: Java has Jetty, Tomcat, Ruby
On Rails, Python and Passenger WSGI.
All of them have one common thing: application persist in memory
between requests. Even for interpreted languages (such Ruby) - this
has advantage of loading sources only once, parse it only once and
initialize memory structures for those definitions only once. On the
opposite - PHP loads EVERY single resource on every request. This is
why it needs op-code cachers, accelerators etc.
Another advantage of using stateful application servers is that you
can simply keep gloabal state of your application (global variables,
static object properties) in memory. It simplifies many tasks which in
PHP require sessions, writing files with serialized data and
deserialize them on every request...

Just imagine such scenarios:
now PHP acts like this on every request:
  1. locate resources (source files in this case), parse and load them
(possibly with op-code cache)
  2. initialize global context ($_SERVER, $GLOBALS, $_POST, $_GET, etc)
  3. run code
  4. destroy all resource and free memory for next request

persistent application servers load resources only on startup (or when
needed) and keep them in memory until programatically freed or until
end of application (server shutdown). So every request looks like
this:
  1. initialize global context
  2. run already parsed code

is that makes whole thing clear?

Another nice example - simple counter. In PHP you have to:
1. read file with counter
2. increment value
3. write serialized value to file
...on every request.

in Java (for example) you just write class:
class Counter {
   static private counter = 0;

   public void increment() {
 this.counter++;
   }
}

and because class definition persists in application server - static
member is maintained between requests and whole things works as
expected...

2012/9/26 Jim Giner jim.gi...@albanyhandball.com:

On 9/26/2012 5:58 AM, Maciej Liżewski wrote:


Hi,

Maybe this topic have been already on board, but I could not find nothing
in google, so my question to PHP maintaneers (and other users too) is:

Why there is no possibility to run PHP in application server way among
other SAPI modules and other possibilities to run PHP? PHP would encounter
great performance boost and became more enterprise :) Just look at Ruby
which is slow as hell compared even with PHP.

By application server I mean scenario when there is statefull
application
on server side not only by session mechanizms but all classes definitions
maintained in memory (no need to load class definition on every request),
static class members (and their changes) persistent, background threads,
etc. This way any op-code cachers won't be necessary...

sounds great, huh? others have it already, so why doesn't PHP? are there
any cons? problems too hard to solve (one can be memory leaks, thread safe
coding, etc)? I mean it - I am realy curious why there is no such
possibility and is there any hope we could get it?

TIA for any answers on this topic.


Thirty+ years as a professional application designer, developer and manager
and I don't have a clue about what you are proposing.  I must have been in a
different world.  :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Sounds to me like you'd need more hardware to support such a concept.  I 
realize that memory can be mapped to disk to avoid the need to have HUGE 
amounts of ram in your server(S!) but with ever-increasing processor 
speed, is it really necessary to go this route?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP as Application Server

2012-09-26 Thread Matijn Woudt
On Wed, Sep 26, 2012 at 5:23 PM, Maciej Liżewski
maciej.lizew...@gmail.com wrote:
 in Java (for example) you just write class:
 class Counter {
   static private counter = 0;

   public void increment() {
 this.counter++;
   }
 }


And here's where things go wrong.. You assume ++ is an atomic
operation, but in Java that's not true for static variables (it is for
local, but what does it matter?)
So you might end up with a race condition here where the counter will
only be incremented once when there are two or more threads. You need
a mutex or semaphore to make sure there's only one thread
reading/writing the counter at the same time (though volatile would
work here too probably).

Writing scripts for an application server requires a much deeper
understanding of threads and computer internals,so as a result it
probably increases error rate.

I think Alessandro explained the rest of the downsides pretty clearly.

- Matijn

Ps. Please bottom-post on this mailing list

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP as Application Server

2012-09-26 Thread Robert Williams
On 9/26/12 10:18, Matijn Woudt tijn...@gmail.com wrote:


Writing scripts for an application server requires a much deeper
understanding of threads and computer internals,so as a result it
probably increases error rate.

Well... yes and no. PHP's architecture pretty much keeps you from having
to mess with thread management, but it does so by shifting the burden to a
higher level, either process management of multiple PHP processes or
thread management within the context of the HTTP server. If your
application is sufficiently simple, that shift may be enough to keep you
from having to worry about the problem. For most applications, however,
it's still a concern. In some ways, this can make things worse, simply
because PHP programmers tend to be oblivious of the potential problems,
whereas the typical C# or Java programmer has at least some awareness of
the various traps that await them.

As an example, I see PHP code *all the time* that is wide open to
concurrency issues with the database. Most code just assumes it's the only
code doing updates, but unless the server is set up to serialize requests,
that's an invalid assumption. Recently, more folks have started to address
this by using database transactions, but this is often done in ignorance
of what isolation level is being used and what the impact of that is upon
the code - which can just make things worse. Even when there is that
awareness, there are database concurrency issues with which transactions
can't help. (Of course, people who are aware of isolation levels also tend
to be aware of other concurrency issues.) The point is, if you have
multiple things running in parallel, whether that be threads within your
application or entirely separate physical servers running multiple copies
of your application, you have to deal with concurrency issues. It's a
necessary evil of parallel programming, and no mere technological solution
(language, database, whatever), now or in the future, can fully overcome
it. Well, maybe an AI engine somewhere in the chain, but that's about it,
and that's not coming anytime soon.

Incidentally, another advantage of PHP's share-nothing approach that
hasn't been mentioned is relatively easy scalability. In a shared pool
architecture, the easiest way to scale is typically vertically, that is,
adding RAM, faster drives, etc. This is fine, but you can only scale
vertically to a certain point, which you can usually hit pretty quickly.
With PHP's share-nothing approach, you can still scale vertically, but you
can almost as easily scale horizontally by adding more servers that each
run merrily in their own worlds, with the primary added coordination logic
being in the areas of communicating with the database and the data cache,
something the application should be designed with, anyway. In contrast,
the shared approach requires added logic, somewhere, to coordinate the
sharing amongst the pools of all that data that the application takes for
granted is always available at low cost.

Having said all that, there are many advantages and disadvantages to both
approaches. And honestly, I would love to have the option of a shared
approach with PHP, since that architecture simply works better as a
solution to certain problems. Assuming the shared-nothing model continues
on, it would make PHP that much more well-rounded. In that respect, the
added option isn't that different from the addition of OOP: we now have
the great ability to use procedural code where it makes sense, and to use
OOP code where it makes sense. Where neither is a perfect fit, you can
choose the one that creates the least personal pain. It's a wonderful
choice to have.


Regards,
Bob
--
Robert E. Williams, Jr.
Associate Vice President of Software Development
Newtek Businesss Services, Inc. -- The Small Business Authority
https://www.newtekreferrals.com/rewjr
http://www.thesba.com/







Notice: This communication, including attachments, may contain information that 
is confidential. It constitutes non-public information intended to be conveyed 
only to the designated recipient(s). If the reader or recipient of this 
communication is not the intended recipient, an employee or agent of the 
intended recipient who is responsible for delivering it to the intended 
recipient, or if you believe that you have received this communication in 
error, please notify the sender immediately by return e-mail and promptly 
delete this e-mail, including attachments without reading or saving them in any 
manner. The unauthorized use, dissemination, distribution, or reproduction of 
this e-mail, including attachments, is prohibited and may be unlawful. If you 
have received this email in error, please notify us immediately by e-mail or 
telephone and delete the e-mail and the attachments (if any).

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP Bounce messages

2012-09-21 Thread Tim Streater
On 21 Sep 2012 at 08:40, Lester Caine les...@lsces.co.uk wrote: 

 I know that the php list are one of the 'reply to sender' email handling camp
 rather than reply to list.

I don't understand this. I reply (not that I mail that often) just to the list, 
if possible. Why would I do anything else?

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Bounce messages

2012-09-21 Thread tamouse mailing lists
On Fri, Sep 21, 2012 at 4:17 AM, Tim Streater t...@clothears.org.uk wrote:
 On 21 Sep 2012 at 08:40, Lester Caine les...@lsces.co.uk wrote:

 I know that the php list are one of the 'reply to sender' email handling camp
 rather than reply to list.

 I don't understand this. I reply (not that I mail that often) just to the 
 list, if possible. Why would I do anything else?

I believe Lester is referring to the behaviour of the Reply-To: field
sent by the list serv, which is the sender's address. Some other
listservs put the list reply address in Reply-To:

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP Re: PHP Bounce messages

2012-09-21 Thread Tim Streater
On 21 Sep 2012 at 20:56, tamouse mailing lists tamouse.li...@gmail.com wrote: 

 On Fri, Sep 21, 2012 at 4:17 AM, Tim Streater t...@clothears.org.uk wrote:
 On 21 Sep 2012 at 08:40, Lester Caine les...@lsces.co.uk wrote:

 I know that the php list are one of the 'reply to sender' email handling
 camp rather than reply to list.

 I don't understand this. I reply (not that I mail that often) just to the
 list, if possible. Why would I do anything else?

 I believe Lester is referring to the behaviour of the Reply-To: field
 sent by the list serv, which is the sender's address. Some other
 listservs put the list reply address in Reply-To:

Thanks, I'm with you now. And I also do the To: cc: musical chairs.

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP Re: Programmers and developers needed

2012-09-19 Thread Tim Streater
On 19 Sep 2012 at 16:32, Matijn Woudt tijn...@gmail.com wrote: 

 unless they were a majority is the thing that bothers me. Getting a
 majority is hard, take for example the Dutch Politics [1]. Our country
 is now led by a parliament of 10 different political parties. Getting
 things done now is really hard, because each party has their own goals
 and finding a majority is for almost impossible. If all the parties
 were strictly following their own will, there would probably only a
 handful things done. The only way to get things done now is by making
 compromises.

And so Dutch governments only last short periods of time, and it takes a long 
time to create a coalition. This is why Proportional Representation is such a 
bad idea. Better to have strong government with a clear mandate, and if you 
don't like it, vote it out next time.

By the way what does any of this have to do with PHP? Nothing, I think.

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP from ASP using AJAX?

2012-09-18 Thread Ross McKay
On Mon, 17 Sep 2012 23:03:55 -0700, Girish Talluru wrote:

Can we able to call PHP script from ASP using AJAX?

Yup.

If you're talking about Classic ASP (VBScript) then here's a few
examples. They talk about WordPress, but really any PHP service will
work the same.

http://snippets.webaware.com.au/snippets/integrating-classic-asp-with-wordpress-using-ajax/
( http://goo.gl/rHlgF )
-- 
Ross McKay, Toronto, NSW Australia
Let the laddie play wi the knife - he'll learn
- The Wee Book of Calvin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 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 www.example1.com has 4 workers, they're all using the same
 apc-cache. That's absolutely as expected. But also the workers of
 www.example2.com are using this cache. In my opinion it would be nice
 if the pools would have a separate cache.

 I now found a solution for this: Just use more than one fpm-master
 that is controlling the pools. (http://groups.drupal.org/node/198168)

 Is this the way to go, or do you know of another way?
 Should this be added to the APC- or fpm-documentation or is it enough
 that you can find f.e. it using Google, if you need it?

 Bye
 Simon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DB] echo into variable or the like

2012-08-21 Thread Daniel Brown
On Tue, Aug 21, 2012 at 12:01 AM,  s@optusnet.com.au wrote:
 Hi, this is my first post so forgive me if I missed a rule and do something 
 wrong.

 I have this code,

 echo $_SERVER['PHP_SELF'].?;
 foreach ($_GET as $urlvar=$urlval)
 echo $urlvar.=.$urlval.;

 It works by it’s self.
 I want to insert the output in a table.  Is there a way to ‘echo’ into a 
 variable(i.e. make the output of this echo the value of a variable) or am I 
 on the wrong track all together?

This question actually belongs on the PHP General mailing list.

As for echoing into a variable, the only way that's really
possible is with output buffering (ob_start(), ob_get_contents(),
ob_end_clean(), et al).  However, you don't need (and shouldn't want)
to do this here.  Instead, as your snippet really won't do much of
anything useful, you should (entirely) rewrite your code to look
something like this, for an HTML table:

?php
echo $_SERVER['PHP_SELF'].'?'.PHP_EOL;
echo 'table'.PHP_EOL;
foreach ($_GET as $key = $value) {
echo ' tr'.PHP_EOL;
echo '  td'.$key.'/td'.PHP_EOL;
echo '  td'.$value.'/td'.PHP_EOL;
echo ' /tr'.PHP_EOL;
}
echo '/table';
?

However, since it looks almost as if you're trying to build a
query string based upon the supplied GET variables, you may want to
try looking into http_build_query().

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-WEBMASTER] php error

2012-08-13 Thread Daniel Brown
On Mon, Aug 13, 2012 at 2:32 PM, tomas lagro tomas.la...@hotmail.com wrote:

 Hello, my name is tomas, i'm having a problem and i've checked a lot of times 
 the script and it is not that, because in my local xampp server it works 
 correctly, the issue is that i have a form on my webpage and when you submitt 
 it, the post values are not being requested, so the query array has no values 
 and has no result because of this. Is this a php.ini mistake? what can it be 
 because its driving me crazy. Thanks for ypur time

This email belongs on the PHP General mailing list (CC'd), Tomas,
and you should subscribe to that list at
php-general-subscr...@lists.php.net to follow the discussion and get
help with your questions.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [PHP-WEBMASTER] php error

2012-08-13 Thread As'ad Djamalilleil
can we see the code of the form ?

On Mon, Aug 13, 2012 at 11:09 AM, Daniel Brown danbr...@php.net wrote:

 On Mon, Aug 13, 2012 at 2:32 PM, tomas lagro tomas.la...@hotmail.com
 wrote:
 
  Hello, my name is tomas, i'm having a problem and i've checked a lot of
 times the script and it is not that, because in my local xampp server it
 works correctly, the issue is that i have a form on my webpage and when you
 submitt it, the post values are not being requested, so the query array has
 no values and has no result because of this. Is this a php.ini mistake?
 what can it be because its driving me crazy. Thanks for ypur time

 This email belongs on the PHP General mailing list (CC'd), Tomas,
 and you should subscribe to that list at
 php-general-subscr...@lists.php.net to follow the discussion and get
 help with your questions.

 --
 /Daniel P. Brown
 Network Infrastructure Manager
 http://www.php.net/

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: PHP session variables

2012-08-08 Thread Jim Giner

On 8/8/2012 11:24 AM, Ansry User 01 wrote:

I am setting the _SESSION variables in one of my file, but whenever I leave the 
php page session variables are not accessible. Not sure what I need to do 
additionally other then defining _SESSION[].
Any pointer.




You must make it a habit to start each script with

session_start();

so that any thing you did in the last script is returned for use in the 
new script.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re:[PHP] PHP 5.4.6RC1 Released for Testing!

2012-08-03 Thread ??????
when your do php x64 version? or tell me how i do it. 


-- Original --
From:  Stas Malyshevsmalys...@sugarcrm.com;
Date:  Fri, Aug 3, 2012 11:48 AM
To:  PHP Internalsintern...@lists.php.net; 
php-general@lists.php.netphp-general@lists.php.net; 

Subject:  [PHP] PHP 5.4.6RC1 Released for Testing!



Hi!

I've released PHP 5.4.6RC1 which can be found here:
http://downloads.php.net/stas/
Windows binaries as always are at:
http://windows.php.net/qa/

This is a regular bugfix release, the full list of issues fixed can be
found in the NEWS files. Please test and report if anything is broken.

If no critical issues is found in this RC, the final version will be
released in two weeks.

Regards,
Stas Malyshev and David Soria Parra

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-23 Thread Larry Garfield
Sales tax isn't the point with SOPA/PIPA.  Thinks like the government 
being able to force any site off the Internet at the ISP / DNS level on 
the say-so of a private corporation are the point.  And no, that's not a 
defensible or acceptable position.  Breaking the Internet to prop up 
industries that don't like being disrupted is not a proper use of 
governmental power.


I'm quite happy to see PHP.net joining in with other defense-of-freedom 
voices.


--Larry Garfield

On 7/21/12 1:56 PM, With No Name wrote:

On Fri, July 20, 2012 10:04, Lester Caine wrote:

In Europe VAT is applied even on on-line sales. It is the likes of Amazon
  shipping bulk stock from overseas 'clients' into European warehouses and
then supplying them without VAT added directly in Europe that is the
problem! How can I compete with someone who is also giving next day
delivery, but 20% cheaper ... American sellers are one of the problems
here.


It depends, because in Europe (I live in Germany), VAT is only added if
the value + shiping exceeds 25 Euro and customs are only added, if the
value exceeds 150 Euro

It does NOT discriminate American sellers, because German sellers have to
bill the VAT too

Also I buy regulary in the USA and even with heavy USPS costs plus Import-VAT
I am mostly lesser expensive as if I buy in Germany...

Greetings



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-23 Thread Ashley Sheridan
On Mon, 2012-07-23 at 13:31 -0500, Larry Garfield wrote:

 Sales tax isn't the point with SOPA/PIPA.  Thinks like the government 
 being able to force any site off the Internet at the ISP / DNS level on 
 the say-so of a private corporation are the point.  And no, that's not a 
 defensible or acceptable position.  Breaking the Internet to prop up 
 industries that don't like being disrupted is not a proper use of 
 governmental power.
 
 I'm quite happy to see PHP.net joining in with other defense-of-freedom 
 voices.
 
 --Larry Garfield
 
 On 7/21/12 1:56 PM, With No Name wrote:
  On Fri, July 20, 2012 10:04, Lester Caine wrote:
  In Europe VAT is applied even on on-line sales. It is the likes of Amazon
shipping bulk stock from overseas 'clients' into European warehouses and
  then supplying them without VAT added directly in Europe that is the
  problem! How can I compete with someone who is also giving next day
  delivery, but 20% cheaper ... American sellers are one of the problems
  here.
 
  It depends, because in Europe (I live in Germany), VAT is only added if
  the value + shiping exceeds 25 Euro and customs are only added, if the
  value exceeds 150 Euro
 
  It does NOT discriminate American sellers, because German sellers have to
  bill the VAT too
 
  Also I buy regulary in the USA and even with heavy USPS costs plus 
  Import-VAT
  I am mostly lesser expensive as if I buy in Germany...
 
  Greetings
 
 


From what I can gather is that it will break DNSSEC, which has been
designed to establish trusted connections with DNS calls. Essentially,
browsers will accept only signed responses from web servers, and SOPA
(and PROTECT IP) would be redirecting DNS requests for US citizens,
which is precisely the sort of thing DNSSEC is meant to prevent; silent
redirection of DNS requests.

I'm not normally very vocal about these sorts of things, but it will
have ripple effects that can't be predicted in the very industry we all
have our livelihoods in, so I'm glad there's resistance against it.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-21 Thread With No Name
On Fri, July 20, 2012 10:04, Lester Caine wrote:
 In Europe VAT is applied even on on-line sales. It is the likes of Amazon
  shipping bulk stock from overseas 'clients' into European warehouses and
 then supplying them without VAT added directly in Europe that is the
 problem! How can I compete with someone who is also giving next day
 delivery, but 20% cheaper ... American sellers are one of the problems
 here.

It depends, because in Europe (I live in Germany), VAT is only added if
the value + shiping exceeds 25 Euro and customs are only added, if the
value exceeds 150 Euro

It does NOT discriminate American sellers, because German sellers have to
bill the VAT too

Also I buy regulary in the USA and even with heavy USPS costs plus Import-VAT
I am mostly lesser expensive as if I buy in Germany...

Greetings

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-20 Thread Lester Caine

Paul M Foster wrote:

Here's another one: There are currently discussions in the U.S. Congress
in favor of forcing internet vendors to charge sales tax on*all*  sales,
regardless of whether the vendor has a presence in that state or not.
Imagine having to file state sales tax returns in 50 states. This effort
has rather significant bipartisan support. Now ask yourself what large
corporation with brick and mortar stores *wouldn't* sign on to support
this one? That's what you're up against. You've got Amazon.com on your
side. Yay. You might want to get busy on that one.


In Europe VAT is applied even on on-line sales. It is the likes of Amazon 
shipping bulk stock from overseas 'clients' into European warehouses and then 
supplying them without VAT added directly in Europe that is the problem! How can 
I compete with someone who is also giving next day delivery, but 20% cheaper ... 
American sellers are one of the problems here.


There are two sides to every problem and simply fighting for one side is as bad. 
What is needed is a reasoned debate rather than things like 'The Cat Signal' 
which personally I find as objectionable as the laws it's complaining about!


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-20 Thread Paul M Foster
On Fri, Jul 20, 2012 at 09:04:30AM +0100, Lester Caine wrote:

 Paul M Foster wrote:
 Here's another one: There are currently discussions in the U.S. Congress
 in favor of forcing internet vendors to charge sales tax on*all*  sales,
 regardless of whether the vendor has a presence in that state or not.
 Imagine having to file state sales tax returns in 50 states. This effort
 has rather significant bipartisan support. Now ask yourself what large
 corporation with brick and mortar stores *wouldn't* sign on to support
 this one? That's what you're up against. You've got Amazon.com on your
 side. Yay. You might want to get busy on that one.
 
 In Europe VAT is applied even on on-line sales. It is the likes of
 Amazon shipping bulk stock from overseas 'clients' into European
 warehouses and then supplying them without VAT added directly in
 Europe that is the problem! How can I compete with someone who is
 also giving next day delivery, but 20% cheaper ... American sellers
 are one of the problems here.
 
 There are two sides to every problem and simply fighting for one
 side is as bad. What is needed is a reasoned debate rather than
 things like 'The Cat Signal' which personally I find as
 objectionable as the laws it's complaining about!

The real problem is the VAT tax itself. In my opinion, VAT is worse than
direct income tax. The only good thing about VAT is that you
(presumably) don't have to file returns with every state/province
involved.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-20 Thread Jeff Burcher
 -Original Message-
 From: Lester Caine [mailto:les...@lsces.co.uk]
 Sent: Friday, July 20, 2012 4:05 AM
 To: php-general@lists.php.net
 Subject: Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal
 
 Paul M Foster wrote:
  Here's another one: There are currently discussions in the U.S.
  Congress in favor of forcing internet vendors to charge sales tax
  on*all*  sales, regardless of whether the vendor has a presence in that
 state or not.
  Imagine having to file state sales tax returns in 50 states. This
  effort has rather significant bipartisan support. Now ask yourself
  what large corporation with brick and mortar stores *wouldn't* sign on
  to support this one? That's what you're up against. You've got
  Amazon.com on your side. Yay. You might want to get busy on that one.
 
 In Europe VAT is applied even on on-line sales. It is the likes of Amazon
 shipping bulk stock from overseas 'clients' into European warehouses and
 then supplying them without VAT added directly in Europe that is the
 problem! How can I compete with someone who is also giving next day
 delivery, but 20% cheaper ...
 American sellers are one of the problems here.
 
 There are two sides to every problem and simply fighting for one side is
as
 bad.
 What is needed is a reasoned debate rather than things like 'The Cat
Signal'
 which personally I find as objectionable as the laws it's complaining
about!
 
 --
 Lester Caine - G8HFL
 -
 Contact - http://lsces.co.uk/wiki/?page=contact
 L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve -
 http://enquirysolve.com/ Model Engineers Digital Workshop -
 http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

This sounds more like a business annoyance than an internet freedom problem,
but okay. Technically, in the US, I thought it is the end-consumer that
needs to pay a sales tax to the state where they live. Consumer retail
businesses are required to tack them on at the point of sale as a
convenience for both the consumer and the government, then pass the money
on. The seller only pays taxes, to the municipality(s) where their business
is physically located, based on their net profit. So the sales tax itself
does not come out of the company's pocket. The company bears the cost of
tracking, processing, and forwarding the taxes to the government(s)
involved, but that is a deductible expense. Sales taxes are a tedious, but
not costly, normal business expense.

Really, how hard is it for computer savvy people to sort their sales
transactions by customer's state and sum up the sales tax amounts paid so
they can write a check every quarter. Many businesses would be happy to have
to mail 50 checks every quarter, one to each state. That means they are
making sales in every state!  That sounds like a profitable business to me.
And as far as filling out 50 sales and use tax forms each quarter, they have
these things called computers now that make pulling in data and printing
forms happen at the touch of a button. Maybe some enterprising programmer
could write software to do just that and sell it on the internet.

We need to stop playing idealistic revolutionary and help shape real
solutions. The fact that you are allowed to run a business on the internet
is the internet freedom you are looking for. You have won the revolution!
Now, deal with the realities of running a business. Putting your business on
the internet should not be a magic pass to avoid the costs of doing
business. We need to admit we are part of the system and figure out a
streamlined way for internet businesses to pay their fair share. The Free
in free economy does not mean it doesn't cost money, time, effort, etc. to
do business.

The internet is not a magic cloud run by fairy dust. The internet was
created by military and higher educational systems, both tax supported
entities. Corporations and governments maintain the infrastructure that
keeps the internet working. Without governments and corporations there would
be no internet. They are the internet. The alternative is to go back to ham
radios. Sorry for the rant, this is a hot button topic for me.


Jeff Burcher - IT Dept
Allred Metal Stamping
PO Box 2566
High Point, NC 27261
(336)886-5221 x229
j...@allredmetal.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-20 Thread Lester Caine

Paul M Foster wrote:

There are two sides to every problem and simply fighting for one
side is as bad. What is needed is a reasoned debate rather than
things like 'The Cat Signal' which personally I find as
objectionable as the laws it's complaining about!



The real problem is the VAT tax itself. In my opinion, VAT is worse than
direct income tax. The only good thing about VAT is that you
(presumably) don't have to file returns with every state/province
involved.


The EU does have VAT sorted nicely across all the states of Europe, and I simply 
fill in a VAT return each quarter in the UK. For VAT registered European 
customers we simply bill them 0% rated, so there is no need for cross border 
paperwork at all. But European customers who are not VAT registered pay the rate 
of of the country the supplier is based in, which gives some small plus and 
minus advantages. Anything that comes into Europe through proper channels will 
also have VAT added as part of 'customs charges' and businesses simply claim it 
back, hence the irritation at supply channels bypassing the normal trade routes 
:( In theory those goods should have had VAT paid when they came into a European 
warehouse, so it would be nice to know what loophole they use to avoid it ;)


And at least VAT only applies when I spend money, higher income tax would hit 
everything I earn ... but this is getting very much off topic for the list, as 
'The Cat Signal' is anyway in my book.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Ferenc Kovacs
2012.07.19. 20:21, Daniel Brown danbr...@php.net ezt írta:

 Forwarding to php-webmas...@lists.php.net, as it's not a general
 user issue where it pertains to php.net.

 On Thu, Jul 19, 2012 at 2:02 PM, Kris Craig kris.cr...@gmail.com wrote:
  Hey guys,
 
  I just became aware of this:
 
  http://internetdefenseleague.org/
 
 
  It's a site setup by Mozilla, Reddit, and others to defend internet
freedom
  in the wake of recent legislative events in the U.S. and elsewhere (full
  members list here:  http://www.internetdefenseleague.org/members).
 
  They've setup what they're calling the cat signal, an invisible bit of
  embeddable code you can put in your website that will activate (and
display
  the afore-mentioned signal/link/etc) if/when the next SOPA/PIPA/etc
comes
  along that threatens the open internet.
 
  I'd like to propose that we integrate this into the PHP website.  This
  issue directly affects our community and we already staked a claim in
this
  fight when we participated in the last great blackout.
 
  In addition, I'd also l ike to propose that we officially join this
group
  as a member.  I'm not sure if we'd do this by vote or something similar
to
  the RFC process  etc, but if you'll grant me permission, I'd be happy
to
  do the legwork on this myself (make the HTML edits, contact the
  organization on PHP's behalf, etc).
 
 
  Thoughts?
 
  --Kris



 --
 /Daniel P. Brown
 Network Infrastructure Manager
 http://www.php.net/

 --
 PHP Webmaster List Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


Btw. we were asked by the to join the league as we were a big traffic
source on the black out day.
I don't know if Rasmus is on the webmaster list or not, but we should cc
him, as he was the driving force behind us joining the anti SOPA movement.


[PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Kris Craig
On Thu, Jul 19, 2012 at 12:36 PM, Ferenc Kovacs tyr...@gmail.com wrote:


 2012.07.19. 20:21, Daniel Brown danbr...@php.net ezt írta:

 
  Forwarding to php-webmas...@lists.php.net, as it's not a general
  user issue where it pertains to php.net.
 
  On Thu, Jul 19, 2012 at 2:02 PM, Kris Craig kris.cr...@gmail.com
 wrote:
   Hey guys,
  
   I just became aware of this:
  
   http://internetdefenseleague.org/
  
  
   It's a site setup by Mozilla, Reddit, and others to defend internet
 freedom
   in the wake of recent legislative events in the U.S. and elsewhere
 (full
   members list here:  http://www.internetdefenseleague.org/members).
  
   They've setup what they're calling the cat signal, an invisible bit
 of
   embeddable code you can put in your website that will activate (and
 display
   the afore-mentioned signal/link/etc) if/when the next SOPA/PIPA/etc
 comes
   along that threatens the open internet.
  
   I'd like to propose that we integrate this into the PHP website.  This
   issue directly affects our community and we already staked a claim in
 this
   fight when we participated in the last great blackout.
  
   In addition, I'd also l ike to propose that we officially join this
 group
   as a member.  I'm not sure if we'd do this by vote or something
 similar to
   the RFC process  etc, but if you'll grant me permission, I'd be happy
 to
   do the legwork on this myself (make the HTML edits, contact the
   organization on PHP's behalf, etc).
  
  
   Thoughts?
  
   --Kris
 
 
 
  --
  /Daniel P. Brown
  Network Infrastructure Manager
  http://www.php.net/
 
  --
  PHP Webmaster List Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

  Btw. we were asked by the to join the league as we were a big traffic
 source on the black out day.
 I don't know if Rasmus is on the webmaster list or not, but we should cc
 him, as he was the driving force behind us joining the anti SOPA movement.

I heard back from the webmaster saying that we're already participating
with the cat signal on our website.  Given this and no objections, I went
ahead and contacted them and asked that they list us on their participating
members page.

--Kris


[PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Hannes Magnusson
On Thu, Jul 19, 2012 at 8:36 PM, Ferenc Kovacs tyr...@gmail.com wrote:
 2012.07.19. 20:21, Daniel Brown danbr...@php.net ezt írta:

 Forwarding to php-webmas...@lists.php.net, as it's not a general
 user issue where it pertains to php.net.

 On Thu, Jul 19, 2012 at 2:02 PM, Kris Craig kris.cr...@gmail.com wrote:
  Hey guys,
 
  I just became aware of this:
 
  http://internetdefenseleague.org/
 
 
  It's a site setup by Mozilla, Reddit, and others to defend internet
 freedom
  in the wake of recent legislative events in the U.S. and elsewhere (full
  members list here:  http://www.internetdefenseleague.org/members).
 
  They've setup what they're calling the cat signal, an invisible bit of
  embeddable code you can put in your website that will activate (and
 display
  the afore-mentioned signal/link/etc) if/when the next SOPA/PIPA/etc
 comes
  along that threatens the open internet.
 
  I'd like to propose that we integrate this into the PHP website.  This
  issue directly affects our community and we already staked a claim in
 this
  fight when we participated in the last great blackout.
 
  In addition, I'd also l ike to propose that we officially join this
 group
  as a member.  I'm not sure if we'd do this by vote or something similar
 to
  the RFC process  etc, but if you'll grant me permission, I'd be happy
 to
  do the legwork on this myself (make the HTML edits, contact the
  organization on PHP's behalf, etc).
 
 
  Thoughts?
 
  --Kris



 --
 /Daniel P. Brown
 Network Infrastructure Manager
 http://www.php.net/

 --
 PHP Webmaster List Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 Btw. we were asked by the to join the league as we were a big traffic
 source on the black out day.
 I don't know if Rasmus is on the webmaster list or not, but we should cc
 him, as he was the driving force behind us joining the anti SOPA movement.

He is everywhere.

But I thought we were already 'members'?
See also http://php.markmail.org/message/7e4uqo73fmtlgjeo

-Hannes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Jeff Burcher
Hi,

I have been out of the loop and just did some quick skimming of SOPA/PIPA to
see what all the fuss was about. PIPA seems a little vague, but SOPA seems
pretty straight forward, stop piracy of copyrighted materials. I don't
understand what is wrong with that?

Thanks,

Jeff Burcher - IT Dept
Allred Metal Stamping
PO Box 2566
High Point, NC 27261
(336)886-5221 x229
j...@allredmetal.com


 -Original Message-
 From: Kris Craig [mailto:kris.cr...@gmail.com]
 Sent: Thursday, July 19, 2012 3:40 PM
 To: Ferenc Kovacs
 Cc: Daniel Brown; php-webmas...@lists.php.net; php-general@lists.php.net
 Subject: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal
 
 On Thu, Jul 19, 2012 at 12:36 PM, Ferenc Kovacs tyr...@gmail.com wrote:
 
 
  2012.07.19. 20:21, Daniel Brown danbr...@php.net ezt írta:
 
  
   Forwarding to php-webmas...@lists.php.net, as it's not a
   general user issue where it pertains to php.net.
  
   On Thu, Jul 19, 2012 at 2:02 PM, Kris Craig kris.cr...@gmail.com
  wrote:
Hey guys,
   
I just became aware of this:
   
http://internetdefenseleague.org/
   
   
It's a site setup by Mozilla, Reddit, and others to defend
internet
  freedom
in the wake of recent legislative events in the U.S. and elsewhere
  (full
members list here:
 http://www.internetdefenseleague.org/members).
   
They've setup what they're calling the cat signal, an invisible
bit
  of
embeddable code you can put in your website that will activate
(and
  display
the afore-mentioned signal/link/etc) if/when the next
SOPA/PIPA/etc
  comes
along that threatens the open internet.
   
I'd like to propose that we integrate this into the PHP website.
This issue directly affects our community and we already staked a
claim in
  this
fight when we participated in the last great blackout.
   
In addition, I'd also l ike to propose that we officially join
this
  group
as a member.  I'm not sure if we'd do this by vote or something
  similar to
the RFC process  etc, but if you'll grant me permission, I'd be
happy
  to
do the legwork on this myself (make the HTML edits, contact the
organization on PHP's behalf, etc).
   
   
Thoughts?
   
--Kris
  
  
  
   --
   /Daniel P. Brown
   Network Infrastructure Manager
   http://www.php.net/
  
   --
   PHP Webmaster List Mailing List (http://www.php.net/) To
   unsubscribe, visit: http://www.php.net/unsub.php
  
 
   Btw. we were asked by the to join the league as we were a big traffic
  source on the black out day.
  I don't know if Rasmus is on the webmaster list or not, but we should
  cc him, as he was the driving force behind us joining the anti SOPA
 movement.
 
 I heard back from the webmaster saying that we're already participating
with
 the cat signal on our website.  Given this and no objections, I went ahead
and
 contacted them and asked that they list us on their participating members
 page.
 
 --Kris



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Lester Caine

Jeff Burcher wrote:

I have been out of the loop and just did some quick skimming of SOPA/PIPA to
see what all the fuss was about. PIPA seems a little vague, but SOPA seems
pretty straight forward, stop piracy of copyrighted materials. I don't
understand what is wrong with that?


It depends on how heavy handed the solution is ... Currently I can't get torrent 
downloads of Linux distribution DVD's because torrent is blocked. Just because 
some people abuse a technology is no reason to kill that technology for 
legitimate uses?


Action groups that just target one country are a little irritating to the rest 
of us ... a world wide solution is needed.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Jeff Burcher
Hi,

I agree. My wife is from China and both copyright issues and government
enforcement of things have a whole new meaning there, so I understand the
concerns on both sides.

Thanks,

Jeff Burcher - IT Dept
Allred Metal Stamping
PO Box 2566
High Point, NC 27261
(336)886-5221 x229
j...@allredmetal.com


 -Original Message-
 From: Lester Caine [mailto:les...@lsces.co.uk]
 Sent: Thursday, July 19, 2012 4:10 PM
 To: php-general@lists.php.net
 Subject: Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal
 
 Jeff Burcher wrote:
  I have been out of the loop and just did some quick skimming of
  SOPA/PIPA to see what all the fuss was about. PIPA seems a little
  vague, but SOPA seems pretty straight forward, stop piracy of
  copyrighted materials. I don't understand what is wrong with that?
 
 It depends on how heavy handed the solution is ... Currently I can't get
 torrent downloads of Linux distribution DVD's because torrent is blocked.
 Just because some people abuse a technology is no reason to kill that
 technology for legitimate uses?
 
 Action groups that just target one country are a little irritating to the
rest of
 us ... a world wide solution is needed.
 
 --
 Lester Caine - G8HFL
 -
 Contact - http://lsces.co.uk/wiki/?page=contact
 L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve -
 http://enquirysolve.com/ Model Engineers Digital Workshop -
 http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Ferenc Kovacs


  Btw. we were asked by the to join the league as we were a big traffic
  source on the black out day.
  I don't know if Rasmus is on the webmaster list or not, but we should cc
  him, as he was the driving force behind us joining the anti SOPA
 movement.

 He is everywhere.

 But I thought we were already 'members'?
 See also http://php.markmail.org/message/7e4uqo73fmtlgjeo

 -Hannes


Thanks, that was the mail that I was referring to.
I didn't see anybody reply on that thread, so except we replied in private
(why would we do that?) I guess we never officially accepted that
invitation.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu


[PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Kris Craig
On Thu, Jul 19, 2012 at 1:52 PM, Ferenc Kovacs tyr...@gmail.com wrote:


  Btw. we were asked by the to join the league as we were a big traffic
  source on the black out day.
  I don't know if Rasmus is on the webmaster list or not, but we should cc
  him, as he was the driving force behind us joining the anti SOPA
 movement.

 He is everywhere.

 But I thought we were already 'members'?
 See also http://php.markmail.org/message/7e4uqo73fmtlgjeo

 -Hannes


 Thanks, that was the mail that I was referring to.
 I didn't see anybody reply on that thread, so except we replied in private
 (why would we do that?) I guess we never officially accepted that
 invitation.

 --
 Ferenc Kovács
 @Tyr43l - http://tyrael.hu


Can we officially accept it now?  It sounds like everyone is all for
this.  We're already technically a member anyway with the cat signal code
implemented, plus I've already reached out to them based on this thread and
the response I got from our webmaster.  Do we have any procedure or secret
handshake or whatever for this, or can we just say, Yep we're down with
this and be done with it?  =)

--Kris


[PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Hannes Magnusson
On Thu, Jul 19, 2012 at 10:01 PM, Kris Craig kris.cr...@gmail.com wrote:


 On Thu, Jul 19, 2012 at 1:52 PM, Ferenc Kovacs tyr...@gmail.com wrote:


  Btw. we were asked by the to join the league as we were a big traffic
  source on the black out day.
  I don't know if Rasmus is on the webmaster list or not, but we should
  cc
  him, as he was the driving force behind us joining the anti SOPA
  movement.

 He is everywhere.

 But I thought we were already 'members'?
 See also http://php.markmail.org/message/7e4uqo73fmtlgjeo

 -Hannes


 Thanks, that was the mail that I was referring to.
 I didn't see anybody reply on that thread, so except we replied in private
 (why would we do that?) I guess we never officially accepted that
 invitation.

 --
 Ferenc Kovács
 @Tyr43l - http://tyrael.hu


 Can we officially accept it now?  It sounds like everyone is all for this.
 We're already technically a member anyway with the cat signal code
 implemented, plus I've already reached out to them based on this thread and
 the response I got from our webmaster.  Do we have any procedure or secret
 handshake or whatever for this, or can we just say, Yep we're down with
 this and be done with it?  =)

You need to write an RFC, run one round around a church, submit a call
for open discussion for the request for comment, run backwards around
a church, spit on the grave of your first born, then vote.

Or in other words; What exactly are you looking to do here?
If we are already pencilled down as members, great!
Is there anything else left then?

-Hannes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Kris Craig
On Thu, Jul 19, 2012 at 2:11 PM, Hannes Magnusson 
hannes.magnus...@gmail.com wrote:

 On Thu, Jul 19, 2012 at 10:01 PM, Kris Craig kris.cr...@gmail.com wrote:
 
 
  On Thu, Jul 19, 2012 at 1:52 PM, Ferenc Kovacs tyr...@gmail.com wrote:
 
 
   Btw. we were asked by the to join the league as we were a big traffic
   source on the black out day.
   I don't know if Rasmus is on the webmaster list or not, but we should
   cc
   him, as he was the driving force behind us joining the anti SOPA
   movement.
 
  He is everywhere.
 
  But I thought we were already 'members'?
  See also http://php.markmail.org/message/7e4uqo73fmtlgjeo
 
  -Hannes
 
 
  Thanks, that was the mail that I was referring to.
  I didn't see anybody reply on that thread, so except we replied in
 private
  (why would we do that?) I guess we never officially accepted that
  invitation.
 
  --
  Ferenc Kovács
  @Tyr43l - http://tyrael.hu
 
 
  Can we officially accept it now?  It sounds like everyone is all for
 this.
  We're already technically a member anyway with the cat signal code
  implemented, plus I've already reached out to them based on this thread
 and
  the response I got from our webmaster.  Do we have any procedure or
 secret
  handshake or whatever for this, or can we just say, Yep we're down with
  this and be done with it?  =)

 You need to write an RFC, run one round around a church, submit a call
 for open discussion for the request for comment, run backwards around
 a church, spit on the grave of your first born, then vote.

 Or in other words; What exactly are you looking to do here?
 If we are already pencilled down as members, great!
 Is there anything else left then?

 -Hannes


I don't think so, no.  I just wanted to double-check and make sure I'm
being kosher in asking them to list us and our logo on their top members
page.  =)

--Kris

P.S. I don't have any dead kids yet, so can I substitute someone else's
dead kid to spit on?


[PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Hannes Magnusson
On Thu, Jul 19, 2012 at 10:16 PM, Kris Craig kris.cr...@gmail.com wrote:


 On Thu, Jul 19, 2012 at 2:11 PM, Hannes Magnusson
 hannes.magnus...@gmail.com wrote:

 On Thu, Jul 19, 2012 at 10:01 PM, Kris Craig kris.cr...@gmail.com wrote:
 
 
  On Thu, Jul 19, 2012 at 1:52 PM, Ferenc Kovacs tyr...@gmail.com wrote:
 
 
   Btw. we were asked by the to join the league as we were a big
   traffic
   source on the black out day.
   I don't know if Rasmus is on the webmaster list or not, but we
   should
   cc
   him, as he was the driving force behind us joining the anti SOPA
   movement.
 
  He is everywhere.
 
  But I thought we were already 'members'?
  See also http://php.markmail.org/message/7e4uqo73fmtlgjeo
 
  -Hannes
 
 
  Thanks, that was the mail that I was referring to.
  I didn't see anybody reply on that thread, so except we replied in
  private
  (why would we do that?) I guess we never officially accepted that
  invitation.
 
  --
  Ferenc Kovács
  @Tyr43l - http://tyrael.hu
 
 
  Can we officially accept it now?  It sounds like everyone is all for
  this.
  We're already technically a member anyway with the cat signal code
  implemented, plus I've already reached out to them based on this thread
  and
  the response I got from our webmaster.  Do we have any procedure or
  secret
  handshake or whatever for this, or can we just say, Yep we're down with
  this and be done with it?  =)

 You need to write an RFC, run one round around a church, submit a call
 for open discussion for the request for comment, run backwards around
 a church, spit on the grave of your first born, then vote.

 Or in other words; What exactly are you looking to do here?
 If we are already pencilled down as members, great!
 Is there anything else left then?

 -Hannes


 I don't think so, no.  I just wanted to double-check and make sure I'm being
 kosher in asking them to list us and our logo on their top members page.  =)

Great. let us know how it goes.

-Hannes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [PHP-WEBMASTER] Re: [PHP] The Cat Signal

2012-07-19 Thread Paul M Foster
On Thu, Jul 19, 2012 at 03:45:46PM -0400, Jeff Burcher wrote:

 Hi,
 
 I have been out of the loop and just did some quick skimming of SOPA/PIPA to
 see what all the fuss was about. PIPA seems a little vague, but SOPA seems
 pretty straight forward, stop piracy of copyrighted materials. I don't
 understand what is wrong with that?

Here's another one: There are currently discussions in the U.S. Congress
in favor of forcing internet vendors to charge sales tax on *all* sales,
regardless of whether the vendor has a presence in that state or not.
Imagine having to file state sales tax returns in 50 states. This effort
has rather significant bipartisan support. Now ask yourself what large
corporation with brick and mortar stores *wouldn't* sign on to support
this one? That's what you're up against. You've got Amazon.com on your
side. Yay. You might want to get busy on that one.

Governments and large corporations are about power and *control*. The
internet is the antithesis of this. So expect their efforts to control
some or all of the internet to continue until they succeed.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: php form action breaks script

2012-07-02 Thread Ford, Mike
 -Original Message-
 From: Tim Dunphy [mailto:bluethu...@gmail.com]
 Sent: 28 June 2012 01:18
 
 Hey guys,
 
 It's been a little while since I've toyed with this, and I hope you
 don't mind my coming back to you for some more advice. But I've
 enjoyed some limited success with David R's advice regarding adding
 some strong quoting to the mix. Here is what I last tried -
 
  form method=post action=' . $_SERVER['[PHP_SELF'] .'

Wow! That's completely wacko! (OK, just looked at the full code and
seen it's in the middle of a single-quoted echo, so it's not that bad
after all :). You've got a spare [ in there -- the notice saying
Undefined index: [PHP_SELF should have alerted you to this, as the
index you want is just plain PHP_SELF.

   form method=post action=' . $_SERVER['PHP_SELF'] .'

 The pages do work, and the form checking code does its job (empty
 text
 displays what information is missing). Except that there is an
 annoying message that appears on screen and in the logs -
 
 Notice: Undefined index: subject in
 /Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendema
 il.php
 on line 23 Notice: Undefined index: elvismail in
 /Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendema
 il.php
 on line 24 Notice: Undefined index: [PHP_SELF in
 /Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendema
 il.php
 on line 62

Looking at the relevant bit of your script (assume this is line 23
onward):

   $subject = $_POST['subject'];
   $text = $_POST['elvismail'];
   $output_form = false;
 
 
   if (isset($_POST['Submit'])) {

You're accessing $_POST['subject'] and $_POST['elvismail'] *before* the
check to see if this is a from a form submission - on the initial access,
to just display the form, these $_POST indexes will not be set so
causing the notices.

You either need to put the assignments inside the

  if (isset($POST['Submit']))

branch, or conditionalise them in some way, such as:

$subject = isset($_POST['subject']) ? $_POST['subject'] : NULL;
$text = isset($_POST['elvismail']) ? $_POST['elvismail'] : NULL;


Another oddity in your script is that you're using the string values
true and false instead of the Boolean true and false. Because of
the way PHP typecasts, both true and false are actually regarded
as Boolean true, which could get a little confusing -- so it's much
better (and probably more efficient) to use the proper Boolean values.
Also, it enables your later test to be written, with confidence, as
just

if ($output_form) {


Also, also, with a little bit of rearrangement of the tests, you can
reduce the amount of code a bit:

if (!empty($subject)  !empty($text)) {
// Both inputs supplied -- good to go.
$output_form = false;
} else {
// At least one input missing -- need to redisplay form
$output_form = true;

if (empty($subject)) {
if (empty($text)) {
echo 'You forgot the email subject and body.br /';
} else {
echo 'You forgot the email subject.br /';
}
} else {
echo 'You forgot the email body text.br /';
}
}

Actually, I think my inclination would be to assign $output_form
first, and then do the rest of the tests:

$output_form = empty($subject) || empty($text);

if ($output_form) {
// At least one input missing -- work out which one
if (empty($subject))
if (empty($text)) {
echo 'You forgot the email subject and body.br /';
} else {
echo 'You forgot the email subject.br /';
}
} else {
echo 'You forgot the email body text.br /';
}
}

That said, there are lots of personal preferences involved here, and
I'm sure others would offer different possibilities. (Me personally,
I also prefer the alternative block syntax with initial : and end...
tags -- but then, the forests of curly braces others seem to find
acceptable make my eyes go fuzzy, so go figure)

Cheers!

Mike

-- 
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,  
Portland PD507, City Campus, Leeds Metropolitan University,
Portland Way, LEEDS,  LS1 3HE,  United Kingdom 
E: m.f...@leedsmet.ac.uk T: +44 113 812 4730






To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php batch/queue framwork

2012-07-01 Thread Robert Williams
Zend Server includes a job queue.

http://www.zend.com/en/products/server/zend-server-job-queue

It supports queuing up jobs directly in the UI or via a PHP API, and it 
includes a variety of scheduling and load management options.

--
Bob Williams

Notice: This communication, including attachments, may contain information that 
is confidential. It constitutes non-public information intended to be conveyed 
only to the designated recipient(s). If the reader or recipient of this 
communication is not the intended recipient, an employee or agent of the 
intended recipient who is responsible for delivering it to the intended 
recipient, or if you believe that you have received this communication in 
error, please notify the sender immediately by return e-mail and promptly 
delete this e-mail, including attachments without reading or saving them in any 
manner. The unauthorized use, dissemination, distribution, or reproduction of 
this e-mail, including attachments, is prohibited and may be unlawful. If you 
have received this email in error, please notify us immediately by e-mail or 
telephone and delete the e-mail and the attachments (if any).

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php batch/queue framwork

2012-06-30 Thread Larry Garfield

On 06/29/2012 05:18 AM, Tom Sparks wrote:

Forwarded Message: php-general_318334.ezm
Re: php batch/queue framwork
Friday, 29 June, 2012 6:30 AM
From:
Shailesh N. Humbad humb...@alum.mit.edu
To:
php-general@lists.php.net
On 6/28/2012 11:58 AM, Tom Sparks wrote:
I am looking for a batch/queue framework that is database-centric?
I could write my own, but I want one that is mature

tom_a_sparks
It's a nerdy thing I like to do


You could try Amazon Simple Queue Service: http://aws.amazon.com/sqs/
Use the PHP SDK: http://aws.amazon.com/sdkforphp/

I was hoping for something that I could run local on my host

tom


Have a look at Beanstalk and Gearman.  They're the most common 
run-yourself queues I've seen, and both have PHP libraries available.


ZeroMQ is also the darling of the queuing world these days, but I don't 
know off hand how good the PHP support is.


You won't find a GOOD database-centric queue framework, rather by 
definition.  A queuing server may use a DB of some kind as a backend 
itself, but a queue server by definition pushes tasks to workers that 
are waiting for it.  That's simply not how an SQL DB is designed.  You 
would have to do a polling worker that polls a database for new tasks.  
You could write such a system -- Drupal comes with one as a default 
implementation since then you don't need a separate queueing program, 
for instance -- but it will always be greatly inferior to a real 
daemonized queue server.


--Larry Garfield

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php batch/queue framwork

2012-06-29 Thread Tom Sparks
Forwarded Message: php-general_318334.ezm
Re: php batch/queue framwork
Friday, 29 June, 2012 6:30 AM
From:
Shailesh N. Humbad humb...@alum.mit.edu
To:
php-general@lists.php.net
On 6/28/2012 11:58 AM, Tom Sparks wrote:
 I am looking for a batch/queue framework that is database-centric?
 I could write my own, but I want one that is mature

 tom_a_sparks
 It's a nerdy thing I like to do


You could try Amazon Simple Queue Service: http://aws.amazon.com/sqs/
Use the PHP SDK: http://aws.amazon.com/sdkforphp/

I was hoping for something that I could run local on my host

tom

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php batch/queue framwork

2012-06-28 Thread Shailesh N. Humbad

On 6/28/2012 11:58 AM, Tom Sparks wrote:

I am looking for a batch/queue framework that is database-centric?
I could write my own, but I want one that is mature

tom_a_sparks
It's a nerdy thing I like to do




You could try Amazon Simple Queue Service: http://aws.amazon.com/sqs/
Use the PHP SDK: http://aws.amazon.com/sdkforphp/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php form action breaks script

2012-06-27 Thread Matijn Woudt
On Thu, Jun 28, 2012 at 2:17 AM, Tim Dunphy bluethu...@gmail.com wrote:
 Hey guys,

 It's been a little while since I've toyed with this, and I hope you
 don't mind my coming back to you for some more advice. But I've
 enjoyed some limited success with David R's advice regarding adding
 some strong quoting to the mix. Here is what I last tried -

Please bottom post on this (and probably any) mailing list.


  form method=post action=' . $_SERVER['[PHP_SELF'] .'

This must be some typo, it should read
form method=post action=' . $_SERVER['PHP_SELF'] .'




  $from = 'bluethu...@jokefire.com';
  $subject = $_POST['subject'];
  $text = $_POST['elvismail'];
  $output_form = false;


Try using
$subject = isset($_POST['subject']) ? $_POST['subject'] : ;
$subject = isset($_POST['elvismail']) ? $_POST['elvismail'] : ;

Cheers,

Matijn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php form action breaks script

2012-06-27 Thread tamouse mailing lists
On Wed, Jun 27, 2012 at 7:17 PM, Tim Dunphy bluethu...@gmail.com wrote:
 Hey guys,

 It's been a little while since I've toyed with this, and I hope you
 don't mind my coming back to you for some more advice. But I've
 enjoyed some limited success with David R's advice regarding adding
 some strong quoting to the mix. Here is what I last tried -

  form method=post action=' . $_SERVER['[PHP_SELF'] .'

Just a wee typo here: You've quoted '[PHP_SELF' -- the extra bracket
at the beginning what's wrong there. Should just be 'PHP_SELF'.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php form action breaks script

2012-06-27 Thread tamouse mailing lists
On Wed, Jun 27, 2012 at 7:17 PM, Tim Dunphy bluethu...@gmail.com wrote:


One more little thing:

These notices:

 Notice: Undefined index: subject in
 /Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendemail.php
 on line 23 Notice: Undefined index: elvismail in
 /Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendemail.php

show up because you are processing form fields in $_POST when there
might not be any yet.

These lines:

  $from = 'bluethu...@jokefire.com';
  $subject = $_POST['subject'];
  $text = $_POST['elvismail'];
  $output_form = false;


Should appear *after* this line:

  if (isset($_POST['Submit'])) {


You should also check the $_POST entries for 'subject' and 'elvismail'
to make sure they are set to avoid the notices, even if you do move
them after the submit check. You never know!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php form action breaks script

2012-06-27 Thread Jim Giner


Tim Dunphy bluethu...@gmail.com wrote in message 
news:caozy0em5duhby-qv+y1u-e+c5yd7g5utauhomoyu3z7jma-...@mail.gmail.com...

Notice: Undefined index: subject in
/Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendemail.php
on line 23 Notice: Undefined index: elvismail in
/Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendemail.php
on line 24 Notice: Undefined index: [PHP_SELF in
/Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendemail.php
on line 62

[Wed Jun 27 20:13:42 2012] [error] [client 127.0.0.1] PHP Notice:
Undefined index: [PHP_SELF in
/Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendemail.php
on line 62, referer: http://localhost/elvis/


You're missing an input (POST) for the field named 'subject'.  Something 
change in your html?  As in you no longer have a 'subject' input field? 
Same for the other field named.  As for the missing PHP_SELF - did you start 
a session?  I could be way off on this.  The errors are even giving you the 
line number so it shouldn't be hard to find!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php script can't self reference

2012-06-20 Thread Maciek Sokolewicz

On 20-06-2012 15:55, Tim Dunphy wrote:

Hello list,

  I just wanted to bounce a slight issue that I'm having off you
regarding self referencing a php script. Moving from the
'sendemail.htm' page where a form is used to the 'sendemail.php' page
that is in the form action works fine! But if you reload the page, the
php part of the equation loses track of it's $_POST[] variables, and
you see the following errors in the output of the php page:

Notice: Undefined index: subject in
/Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendemail.php
on line 19
Notice: Undefined index: elvismail in
/Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendemail.php

  This is the original form from the sendemail.html page:

   form method=post action=sendemail.php
 label for=subjectSubject of email:/labelbr /
 input id=subject name=subject type=text size=30 /br /
 label for=elvismailBody of email:/labelbr /
 textarea id=elvismail name=elvismail rows=8
cols=40/textareabr /
 input type=submit name=Submit value=Submit /
   /form



The reason you're seeing this behaviour is actually quite simple. POST 
data is only available when a POST action has been performed. Most 
actions are not post, but usually GETs.


Due to you specifying 'method=post'in your HTML form, pressing the 
submit button sends a POST request to your PHP script. When you refresh 
the page, your browser sends a GET request, without any data whatsoever 
(because it doesn't submit the form in any way). Some browsers are smart 
and actually ask you if you want to resubmit the page, but you shouldn't 
count on it.


So... how to resolve your problem? Well, you can prefill a form with the 
data submitted. That way, the user can resubmit the form without having 
to fully refill it him (or her)self. This is done by passing the data 
for each element in the value-attribute (for input), a 
selected-attribute (for select) or as the content (for textarea):


input type=text name=a / will just give an empty input element. 
But input type=text name=a value=?php echo (isset($_POST['a']) ? 
$a : '');? / will show the value of the previously posted request, if 
any. Otherwise, it will just be empty.


input name=something type=whatever value=data
select name=something
   option value=something selected=selected
   option value=something not selected
/select
textarea name=somethingdata goes here/textarea

Hope this helps.
- Tul


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   3   4   5   6   7   8   9   10   >