php-general Digest 1 May 2009 13:29:28 -0000 Issue 6097

2009-05-01 Thread php-general-digest-help
php-general Digest 1 May 2009 13:29:28 - Issue 6097 Topics (messages 292168 through 292178): Re: Two very useful PHP functions 292168 by: Raymond Irving 292172 by: Darren ImageMagick 292169 by: Michael A. Peters 292170 by: Ashley Sheridan 292171 by:

php-general Digest 2 May 2009 02:09:48 -0000 Issue 6098

2009-05-01 Thread php-general-digest-help
php-general Digest 2 May 2009 02:09:48 - Issue 6098 Topics (messages 292179 through 292204): how to enable ttf support in php 5.2.9 292179 by: PJ 292182 by: Michael A. Peters 292183 by: Michael A. Peters Re: Upload file name not file 292180 by: MikeP

[PHP] ImageMagick

2009-05-01 Thread Michael A. Peters
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 export to jpeg, resize for thumb and export to jpeg again. Admin

Re: [PHP] ImageMagick

2009-05-01 Thread Ashley Sheridan
On Thu, 2009-04-30 at 23:35 -0700, 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] 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

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] 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] 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 not great, but

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 export

[PHP] Upload file name not file

2009-05-01 Thread MikeP
Hello, Id like to use the popup file system box(input name=userfile type=file /) 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] 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). --

Re: [PHP] Upload file name not file

2009-05-01 Thread Simon
Id like to use the popup file system box(input name=userfile type=file /) 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

[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 : img src=button.php?s=36text=PHP+is+Cool / In file2 (button.php)-

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 turne...@gmail.com wrote in message

Re: [PHP] Two very useful PHP functions

2009-05-01 Thread Andrew Ballard
On Fri, May 1, 2009 at 4:05 AM, Darren dar...@sirdaz.com 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

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

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

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

Re: [PHP] output buffer with Chrome issue.

2009-05-01 Thread Dan Joseph
On Fri, May 1, 2009 at 10:29 AM, Robert Cummings rob...@interjinn.comwrote: 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

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

Re: [PHP] output buffer with Chrome issue.

2009-05-01 Thread Dan Joseph
On Fri, May 1, 2009 at 10:40 AM, Robert Cummings rob...@interjinn.comwrote: 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

[PHP] how to write /textarea 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 /textarea element. Any suggestions how can I fix this? Thanks in

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

2009-05-01 Thread Andrew Ballard
On Fri, May 1, 2009 at 10:44 AM, Grega Leskovsek mavri...@gmail.com 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

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 rob...@interjinn.comwrote: 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

Re: [PHP] output buffer with Chrome issue.

2009-05-01 Thread Dan Joseph
On Fri, May 1, 2009 at 10:55 AM, Robert Cummings rob...@interjinn.comwrote: 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

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:

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_decode ;-) You made an

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;

[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 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 create a

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] Upload file name not file

2009-05-01 Thread Simon
On Fri, May 1, 2009 at 9:34 AM, MikeP mpel...@princeton.edu 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

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

Re: [PHP] graphical integrated development environment recommendations?

2009-05-01 Thread listmail
On Fri, 01 May 2009 12:57:25 -0400 Al n...@ridersite.org 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

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

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

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