[PHP] PHP6 return by reference deprecation

2009-05-01 Thread Paul M Foster
In another thread (which I mercifully declined to highjack), someone cited: > Taken from http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html And I read this: Both '$foo =& new StdClass()' and 'function &foo' will now raise an E_STRICT error. I don't use this much, but where I do, it's v

[PHP] SOAP and Exception Handling

2009-05-01 Thread VamVan
Hello Guys, I use SOAP calls to make web service requests.I have a class that does webservice calls to various wsdls. So my question is about try catch blocks. so my method looks like this: private function method($cookie){ //Define Client try{ // Check if WSDL exists

[PHP] Re: graphical integrated development environment recommendations?

2009-05-01 Thread Shawn McKenzie
Adam Williams wrote: > With the wide range of users on the list, I'm sure there are plenty of > opinions on what are good graphical IDE's and which ones to avoid. I'd > like to get away from using notepad.exe to code with due to its > limitations. Something that supports syntax/code highlighting

Re: [PHP] graphical integrated development environment recommendations?

2009-05-01 Thread Andrew Hucks
http://notepad-plus.sourceforge.net/uk/site.htm Try out N++. It's very good, supports a whole bunch of languages by default, has folding, and you can tweak the syntax highlight if you want. (You don't need to though.) Takes two minutes to install, and 45 seconds to uninstall it if you don't like

Re: [PHP] graphical integrated development environment recommendations?

2009-05-01 Thread listmail
On Fri, 01 May 2009 12:57:25 -0400 Al wrote: > > > Michael A. Peters wrote: > > Adam Williams wrote: > >> With the wide range of users on the list, I'm sure there are > >> plenty of opinions on what are good graphical IDE's and which ones > >> to avoid. I'd like to get away from using notepad.e

Re: [PHP] graphical integrated development environment recommendations?

2009-05-01 Thread Al
Michael A. Peters wrote: Adam Williams wrote: With the wide range of users on the list, I'm sure there are plenty of opinions on what are good graphical IDE's and which ones to avoid. I'd like to get away from using notepad.exe to code with due to its limitations. Something that supports s

Re: [PHP] Upload file name not file

2009-05-01 Thread Simon
On Fri, May 1, 2009 at 9:34 AM, MikeP wrote: > I'm not trying to get the path, just the filename and size, I know how to > get these, but that would include the file using $_Files, but I dont want to > upload anything just use the filename and size.(without the path) to insert > into a DB. Those

Re: [PHP] graphical integrated development environment recommendations?

2009-05-01 Thread Michael A. Peters
Adam Williams wrote: With the wide range of users on the list, I'm sure there are plenty of opinions on what are good graphical IDE's and which ones to avoid. I'd like to get away from using notepad.exe to code with due to its limitations. Something that supports syntax/code highlighting and

RE: [PHP] object literals

2009-05-01 Thread Robert Cummings
On Fri, 2009-05-01 at 17:52 +0200, Andrea Giammarchi wrote: > you are in PHP, not in JavaScript. > > In PHP arrays are like collections or hash tables. > if you strictly need object cause > > $o->stuff > is better than > $o['stuff'] > > having exactly the same number of characters, you can creat

[PHP] graphical integrated development environment recommendations?

2009-05-01 Thread Adam Williams
With the wide range of users on the list, I'm sure there are plenty of opinions on what are good graphical IDE's and which ones to avoid. I'd like to get away from using notepad.exe to code with due to its limitations. Something that supports syntax/code highlighting and has browser previews

RE: [PHP] object literals

2009-05-01 Thread Andrea Giammarchi
ooops sorry, two more ;-) > having exactly the same number of characterss.aspx _ Windows Live™: Keep your life in sync. Check it out! http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009

RE: [PHP] object literals

2009-05-01 Thread Andrea Giammarchi
you are in PHP, not in JavaScript. In PHP arrays are like collections or hash tables. if you strictly need object cause $o->stuff is better than $o['stuff'] having exactly the same number of characters, you can create a function like function o(array $a){ $o = new stdClass; foreach($

RE: [PHP] object literals

2009-05-01 Thread Robert Cummings
On Fri, 2009-05-01 at 17:36 +0200, Andrea Giammarchi wrote: > var o = { > "a" : "b", > "c" : "d" > }; > > $o = array( > 'a' => "b", > 'c' => "d" > ); > > so I guess the problem is a couple of quotes, isn't it? > > > otherwise define object statically and externally and use json_

RE: [PHP] object literals

2009-05-01 Thread Andrea Giammarchi
var o = { "a" : "b", "c" : "d" }; $o = array( 'a' => "b", 'c' => "d" ); so I guess the problem is a couple of quotes, isn't it? otherwise define object statically and externally and use json_decode ;-) > Date: Thu, 30 Apr 2009 16:56:21 -0400 > From: f...@thefsb.org > To: ph

Re: [PHP] object literals

2009-05-01 Thread Tom Worster
On 5/1/09 4:54 AM, "Richard Heyes" wrote: > Hi, > >>    $x = (object) array('a'=>1, 'b'=>3, ...); >> >> which works but isn't very lovely. it's neater in, for example, javascript. > > Well, you could wrap it up in a function to make it a bit lovelier. Eg: > > $foo = createObject(array('key' =

Re: [PHP] output buffer with Chrome issue.

2009-05-01 Thread Dan Joseph
On Fri, May 1, 2009 at 10:55 AM, Robert Cummings wrote: > > I presume your backend script is running something that passes the data > to the browser un-interrupted... maybe a shell script? You can wrap this > in popen() or proc_open() and read the output as you would a file. This > can then be que

Re: [PHP] output buffer with Chrome issue.

2009-05-01 Thread Robert Cummings
On Fri, 2009-05-01 at 10:42 -0400, Dan Joseph wrote: > On Fri, May 1, 2009 at 10:40 AM, Robert Cummings wrote: > > > On Fri, 2009-05-01 at 10:34 -0400, Dan Joseph wrote: > > > > > > Ajax unfortunately isn't an option in this particular case. > > > > Why? Maybe you're thinking about it wrong. > > >

Re: [PHP] how to write element in textarea?

2009-05-01 Thread Andrew Ballard
On Fri, May 1, 2009 at 10:44 AM, Grega Leskovsek wrote: > I am writing CMS, that will be able to edit files. > For editing I put file inside textarea, but when I open file that has > textarea element inside it I lose (read: don't show data in the > textarea element.) the data after the inside ele

[PHP] how to write element in textarea?

2009-05-01 Thread Grega Leskovsek
I am writing CMS, that will be able to edit files. For editing I put file inside textarea, but when I open file that has textarea element inside it I lose (read: don't show data in the textarea element.) the data after the inside element. Any suggestions how can I fix this? Thanks in advance, --

Re: [PHP] output buffer with Chrome issue.

2009-05-01 Thread Dan Joseph
On Fri, May 1, 2009 at 10:40 AM, Robert Cummings wrote: > On Fri, 2009-05-01 at 10:34 -0400, Dan Joseph wrote: > > > > Ajax unfortunately isn't an option in this particular case. > > Why? Maybe you're thinking about it wrong. > > Maybe, I'm open to suggestions: Here's the basic way the applicatio

Re: [PHP] output buffer with Chrome issue.

2009-05-01 Thread Robert Cummings
On Fri, 2009-05-01 at 10:34 -0400, Dan Joseph wrote: > > Ajax unfortunately isn't an option in this particular case. Why? Maybe you're thinking about it wrong. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net

Re: [PHP] output buffer with Chrome issue.

2009-05-01 Thread Dan Joseph
On Fri, May 1, 2009 at 10:29 AM, Robert Cummings wrote: > > Have you tried a bigger pad? Try... oh I dunno... 40096. if that works > then you can chop back until you find the threshold. Seems to be though > that it might be better done as AJAX. > > Hi, I tried that, didn't work at all even up to

Re: [PHP] output buffer with Chrome issue.

2009-05-01 Thread Robert Cummings
On Fri, 2009-05-01 at 10:24 -0400, Dan Joseph wrote: > Hi Everyone, > > I'm trying to get Chrome to output html information as it comes thru. We > have an iframe running a php script, and when the php script receives > information, it outputs it. FF, IE, and Safari all work just fine, displays >

[PHP] output buffer with Chrome issue.

2009-05-01 Thread Dan Joseph
Hi Everyone, I'm trying to get Chrome to output html information as it comes thru. We have an iframe running a php script, and when the php script receives information, it outputs it. FF, IE, and Safari all work just fine, displays the info as it comes in. However, Chrome is not. It will only

Re: [PHP] how to enable ttf support in php 5.2.9

2009-05-01 Thread Michael A. Peters
PJ wrote: Is there a module to be activated or what has to be installed to have ttf support in php? addendum to my earlier reply - make sure your gd library is built with freetype as well, and make sure it is freetype 2. I'm guessing your gd library already is, but ... -- PHP General Maili

Re: [PHP] how to enable ttf support in php 5.2.9

2009-05-01 Thread Michael A. Peters
PJ wrote: Is there a module to be activated or what has to be installed to have ttf support in php? on unix systems, ttf support should be there with freetype - which supports both ttf and postscript type 1 fonts (and probably also supports .otf though I haven't tried) enable freetype and u

Re: [PHP] Two very useful PHP functions

2009-05-01 Thread Andrew Ballard
On Fri, May 1, 2009 at 4:05 AM, Darren wrote: > This was discussed for PHP6, but eventually decided not to have such a > function. Instead, we now have the following:    $var = $_GET['var'] ?: 5; > > Taken from http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html > > 'you'd be able to do so

Re: [PHP] Upload file name not file

2009-05-01 Thread MikeP
I'm not trying to get the path, just the filename and size, I know how to get these, but that would include the file using $_Files, but I dont want to upload anything just use the filename and size.(without the path) to insert into a DB. "Simon" wrote in message news:5f14cf5e0905010629s2253cc3

[PHP] how to enable ttf support in php 5.2.9

2009-05-01 Thread PJ
Is there a module to be activated or what has to be installed to have ttf support in php? My port on FreeBSD does not have an option for ttf support under make config . I'm trying to learn & understand the following: In file1 : In file2 (button.php)- originally php3 : ONLY the above & nothing els

Re: [PHP] Upload file name not file

2009-05-01 Thread Simon
> Id like to use the popup file system box( />) to choose a file name , but I only want to upload the filename , not the > file. Can I do that? You're not supposed to have any access to the remote visitor's computer, and the path to the file being uploaded could contain sensitive information (ie.

Re: [PHP] object literals

2009-05-01 Thread Richard Heyes
Hi, > You could use JSON, > > $foo = json_decode('{"a":1,"b":3}'); > > but I guess that's not much better than Richard's suggestion. Didn't think of that (well... it's new). That's actually much better I think, since you get the added boon of ease of portability to JS (if that's even a factor).

[PHP] Upload file name not file

2009-05-01 Thread MikeP
Hello, Id like to use the popup file system box() to choose a file name , but I only want to upload the filename , not the file. Can I do that? Thanks Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ImageMagick

2009-05-01 Thread Kevin Waterson
This one time, at band camp, Michael A. Peters wrote: > Here's the scenario - > > Website has some demonstrative images. > > I create these images with the gimp - starting with a jpeg, adding a few > text layers and straight lines. > > I then save as xcf in case I ever need to edit. > > Then I

Re: [PHP] object literals

2009-05-01 Thread Peter Ford
Richard Heyes wrote: > Hi, > >>$x = (object) array('a'=>1, 'b'=>3, ...); >> >> which works but isn't very lovely. it's neater in, for example, javascript. > > Well, you could wrap it up in a function to make it a bit lovelier. Eg: > > $foo = createObject(array('key' => 'value')); > > It's n

Re: [PHP] object literals

2009-05-01 Thread Richard Heyes
Hi, >    $x = (object) array('a'=>1, 'b'=>3, ...); > > which works but isn't very lovely. it's neater in, for example, javascript. Well, you could wrap it up in a function to make it a bit lovelier. Eg: $foo = createObject(array('key' => 'value')); It's not great, but PHP doesn't have a object

Re: [PHP] Two very useful PHP functions

2009-05-01 Thread Darren
This was discussed for PHP6, but eventually decided not to have such a function. Instead, we now have the following:$var = $_GET['var'] ?: 5; Taken from http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html 'you'd be able to do something like this: "$foo = $_GET['foo'] ?: 42;" (i.e. if

Re: [PHP] ImageMagick

2009-05-01 Thread Michael A. Peters
Ashley Sheridan wrote: Do the text layers have to go beneath something on the original xcf, or have special effects applied to them? If not, you can add t existing images with GD, by using a source image, adding text layers, etc, and then exporting it as a new graphic. Yeah - I know I can do