Re: [PHP] Re: hello

2009-01-09 Thread Jason Pruim
On Jan 9, 2009, at 1:55 AM, Robert Cummings wrote: On Thu, 2009-01-08 at 22:38 +, Nathan Rixham wrote: Skip Evans wrote: Nathan Rixham wrote: yup.. all OS's are equally insecure; each OS is as insecure as the next; no one OS is more insecure than any other Wrong, and there is experi

Re: [PHP] Re: hello - thread on topic or not?

2009-01-09 Thread Jason Pruim
On Jan 9, 2009, at 2:06 AM, Robert Cummings wrote: On Thu, 2009-01-08 at 16:21 -0800, Mattias Thorslund wrote: I thought this was the PHP list, not the OS vs. OS list? Is this type of discussion now considered OK here? I recall people getting flamed for borderline off-topic posts even, just a

Re: [PHP] First steps towards unix and php

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 02:12, Robert Cummings wrote: > > I'll take apt over yum ANY day. But as yum system go... CentOS isn't > bad :) I'd take SMART or urpmi over yum as well, for the record. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.

Re: [PHP] First steps towards unix and php

2009-01-09 Thread Paul Scott
On Fri, 2009-01-09 at 07:50 -0500, Daniel Brown wrote: > I'd take SMART or urpmi over yum as well, for the record. First choice is ./configure && make && make install, second choice is apt -- Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/po

Re: [PHP] Re: hello - thread on topic or not?

2009-01-09 Thread Nathan Rixham
Daniel Brown wrote: On Thu, Jan 8, 2009 at 19:21, Mattias Thorslund wrote: I thought this was the PHP list, not the OS vs. OS list? Is this type of discussion now considered OK here? I recall people getting flamed for borderline off-topic posts even, just a few years ago. You're right, M

Re: [PHP] First steps towards unix and php

2009-01-09 Thread Paul Scott
On Fri, 2009-01-09 at 14:53 +0200, Paul Scott wrote: > First choice is ./configure && make && make install, second choice is > apt > Even better, of course, is the: "Yo sysadmin intern! Install for me please and don't screw it up" -- Paul All Email originating from UWC is covered by disclaim

Re: [PHP] Re: hello - thread on topic or not?

2009-01-09 Thread Eric Butera
On Thu, Jan 8, 2009 at 7:21 PM, Mattias Thorslund wrote: > I thought this was the PHP list, not the OS vs. OS list? > > Is this type of discussion now considered OK here? I recall people getting > flamed for borderline off-topic posts even, just a few years ago. > > Mattias :( -- PHP General Ma

[PHP] Enabling tls negotiation in a socket

2009-01-09 Thread Jehan Pagès
Hi, I have a question about opening a normal socket, then negotiating a TLS layer in PHP (through another protocol, which is XMPP in my case, in plain text at the beginning). I am currently using a socket created by "socket_create ()". But there seems not to be any way of switching to TLS negotiat

Re: [PHP] Re: First steps towards unix and php

2009-01-09 Thread Eric Butera
On Thu, Jan 8, 2009 at 6:14 PM, Ross McKay wrote: > On Thu, 8 Jan 2009 11:44:48 -0500, Frank Stanovcak wrote: > >>I've been a microshaft punk for some time now, and am just getting ready to >>try to step over to unix on one of my own boxes. >> >>Does anyone have any suggestions on which flavor wou

[PHP] Editing in a text area field

2009-01-09 Thread Stephen
I have a form to accept free text in a textarea field. The entry is stored in a database. If the user enters: abc def ghi I want it to finally display like that. If they enter abc def ghi I want it to display with the line gaps. I use CSS so in the first case I would store as abcdefghi

Re: [PHP] Editing in a text area field

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 08:12, Stephen wrote: > I have a form to accept free text in a textarea field. The entry is stored > in a database. > > If the user enters: > > abc > def > ghi > > I want it to finally display like that. > > If they enter > > abc > > def > > ghi > > I want it to display with

Re: [PHP] Re: hello - thread on topic or not?

2009-01-09 Thread Daniel Brown
On Thu, Jan 8, 2009 at 19:21, Mattias Thorslund wrote: > I thought this was the PHP list, not the OS vs. OS list? > > Is this type of discussion now considered OK here? I recall people getting > flamed for borderline off-topic posts even, just a few years ago. You're right, Mattias. Not only

[PHP] Re: Enabling tls negotiation in a socket

2009-01-09 Thread Nathan Rixham
Jehan Pagès wrote: Hi, I have a question about opening a normal socket, then negotiating a TLS layer in PHP (through another protocol, which is XMPP in my case, in plain text at the beginning). I am currently using a socket created by "socket_create ()". But there seems not to be any way of swit

Re: [PHP] Re: redoing website after 7 years

2009-01-09 Thread Andrew Ballard
On Fri, Jan 9, 2009 at 2:09 AM, Robert Cummings wrote: > On Fri, 2009-01-09 at 15:17 +1100, Chris wrote: >> > I know many people will grin at me for this solution but may be faster way >> > to overcome this problem to do a find for $ and replace with $_REQUEST. >> > even >> > this will help you i

[PHP] Re: Editing in a text area field

2009-01-09 Thread Nathan Rixham
Stephen wrote: I have a form to accept free text in a textarea field. The entry is stored in a database. If the user enters: abc def ghi I want it to finally display like that. If they enter abc def ghi I want it to display with the line gaps. I use CSS so in the first case I would stor

Re: [PHP] Re: hello - thread on topic or not?

2009-01-09 Thread Robert Cummings
On Fri, 2009-01-09 at 12:59 +, Nathan Rixham wrote: > Daniel Brown wrote: > > On Thu, Jan 8, 2009 at 19:21, Mattias Thorslund > > wrote: > >> I thought this was the PHP list, not the OS vs. OS list? > >> > >> Is this type of discussion now considered OK here? I recall people getting > >> flam

Re: [PHP] Re: redoing website after 7 years

2009-01-09 Thread Robert Cummings
On Fri, 2009-01-09 at 08:56 -0500, Andrew Ballard wrote: > On Fri, Jan 9, 2009 at 2:09 AM, Robert Cummings wrote: > > On Fri, 2009-01-09 at 15:17 +1100, Chris wrote: > >> > I know many people will grin at me for this solution but may be faster > >> > way > >> > to overcome this problem to do a fi

Re: [PHP] Editing in a text area field

2009-01-09 Thread tedd
At 8:12 AM -0500 1/9/09, Stephen wrote: I have a form to accept free text in a textarea field. The entry is stored in a database. If the user enters: abc def ghi I want it to finally display like that. If they enter abc def ghi I want it to display with the line gaps. I use CSS so in th

[PHP] Re: Enabling tls negotiation in a socket

2009-01-09 Thread Jehan Pagès
Hi, first off; great to see somebody else using XMPP with php :D (there's a > great xmpp lib for AS3 from ignite realitime that makes openfire) but no > nice ones for php yet as far as I know - was always one of those projects I > really wanted to do but couldn't justify without getting a client t

Re: [PHP] Re: hello

2009-01-09 Thread tedd
At 1:39 PM -0500 1/8/09, Robert Cummings wrote: On Thu, 2009-01-08 at 13:13 -0500, tedd wrote: > It's always a safe bet to move towards the center of the herd. Bah, sheeple! I like to stay away from the herd. Cheers, Rob. I'm sure the feeling is mutual. A better mouthwash perhaps. :-)

Re: [PHP] Re: hello

2009-01-09 Thread tedd
At 1:03 PM -0600 1/8/09, Skip Evans wrote: Incidentally, I think building their OS on FreeBSD was about the smartest thing the Apple/Mac people ever did. Skip There are bright people at Apple, like Jobs -- exceptional individual. Compare Job's presentations to Gates' and you have examples of

Re: [PHP] Re: redoing website after 7 years

2009-01-09 Thread Lamp Lists
From: Al To: php-general@lists.php.net Sent: Thursday, January 8, 2009 11:50:26 AM Subject: [PHP] Re: redoing website after 7 years Lamp Lists wrote: > hi guys, > I did php/mysql based website for one my client 7 years ago, in time when > register_globals was

Re: [PHP] Re: hello

2009-01-09 Thread tedd
At 7:18 PM + 1/8/09, Nathan Rixham wrote: if it's a computer thats on, with an os, a keyboard and a network card connected to the internet it's insecure. It doesn't even have to be connected to the Internet to be insecure. Cheers, tedd -- --- http://sperling.com http://ancientstones

Re: [PHP] redoing website after 7 years

2009-01-09 Thread Lamp Lists
I think I did code well (everybody can say the code is 100% proof - until get hacked ;-)) and never, for these 7 years had problems. And I'm sure the site will be just ok if I switch register_globals back to On through .htaccess. Actually, I offered the client 3 options: 1. redo the website (aft

Re: [PHP] redoing website after 7 years

2009-01-09 Thread Lamp Lists
From: Jim Lucas To: Robert Cummings Cc: Nathan Rixham ; Richard Heyes ; lamp.li...@yahoo.com; "php-general@lists.php.net" Sent: Thursday, January 8, 2009 10:51:32 AM Subject: Re: [PHP] redoing website after 7 years Robert Cummings wrote: > On Wed, 2009-01-07

Re: [PHP] Re: hello

2009-01-09 Thread Andrew Ballard
On Fri, Jan 9, 2009 at 9:54 AM, tedd wrote: > At 7:18 PM + 1/8/09, Nathan Rixham wrote: >> >> if it's a computer thats on, with an os, a keyboard and a network card >> connected to the internet it's insecure. > > It doesn't even have to be connected to the Internet to be insecure. > > Cheers,

[PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Brian Dunning
I have one server that's pretty busy and runs into "Too many connections" from MySQL from time to time, and needs to have MySQL restarted to clear it up. I've tried everything I can think of to have PHP take note of this error but continue executing with other stuff, but no matter what I

[PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread Brian Dunning
I'm trying a stripped down test just to try to get this work. I have a valid jpeg on disk: 3.jpg<- 3316x2220, 3.6 MB And am trying either of the following: // This does nothing at all imagejpeg('3.jpg'); // This displays "failed" $im = imagecreatefromjpeg('3.jpg'); if(!$im) echo 'failed'

Re: [PHP] Re: hello - thread on topic or not?

2009-01-09 Thread Robert Cummings
On Fri, 2009-01-09 at 07:29 -0800, Mattias Thorslund wrote: > Daniel Brown wrote: > >> You're right, Mattias. Not only should every one of those folks > >> be ashamed of themselves for being involved in that thread - they are > >> also going to hell for it. > >> > >> By comparison, sending

Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread Zechim
try, header('Content-type: image/jpeg'); $image = imagecreatefromjpeg($your_file); imagejpeg($image,"", 100); imagedestroy($image); zechim Brian Dunning escreveu: I'm trying a stripped down test just to try to get this work. I have a valid jpeg on disk: 3.jpg<- 3316x2220, 3

Re: [PHP] First steps towards unix and php

2009-01-09 Thread Frank Stanovcak
*bangs head on wall* Great...just what I need. More acronyms. :P Frank "Paul Scott" wrote in message news:1231506224.7389.7.ca...@paul-laptop... > > On Fri, 2009-01-09 at 14:53 +0200, Paul Scott wrote: >> First choice is ./configure && make && make install, second choice is >> apt >> > > Eve

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Marc Steinert
Brian Dunning schrieb: I have one server that's pretty busy and runs into "Too many connections" from MySQL from time to time, and needs to have MySQL restarted to clear it up. I've tried everything I can think of to have PHP take note of this error but continue executing with other stuff, bu

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Per Jessen
Brian Dunning wrote: > I have one server that's pretty busy and runs into "Too many > connections" from MySQL from time to time, and needs to have MySQL > restarted to clear it up. You need to restart MySQL just because of too many connections?? > I've tried everything I can think of to have P

Re: [PHP] Editing in a text area field

2009-01-09 Thread Stephen
Daniel Brown wrote: I want it to display with the line gaps. Why not store it as plain text in the database, then run it through nl2br() when you SELECT it from the database for display? Thank you! That is the way I will do this. I may want to change to but that should be easy.

Re: [PHP] Re: hello

2009-01-09 Thread Nathan Rixham
tedd wrote: At 7:18 PM + 1/8/09, Nathan Rixham wrote: if it's a computer thats on, with an os, a keyboard and a network card connected to the internet it's insecure. It doesn't even have to be connected to the Internet to be insecure. Cheers, tedd hence the mention of a keyboard :p -

[PHP] Re: How can a script tell if there's a MySQL problem?

2009-01-09 Thread Nathan Rixham
Brian Dunning wrote: I have one server that's pretty busy and runs into "Too many connections" from MySQL from time to time, and needs to have MySQL restarted to clear it up. I've tried everything I can think of to have PHP take note of this error but continue executing with other stuff, but

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Bastien Koert
On Fri, Jan 9, 2009 at 11:07 AM, Per Jessen wrote: > Brian Dunning wrote: > > > I have one server that's pretty busy and runs into "Too many > > connections" from MySQL from time to time, and needs to have MySQL > > restarted to clear it up. > > You need to restart MySQL just because of too many

[PHP] Create image from HTML

2009-01-09 Thread Christoph Boget
Does anyone know if it's possible, using PHP, to take HTML (either as an input or from a URL) and generate an image (essentially, create a screenshot) of that HTML/page? I've looked around but was unable to find anything and I'm just not sure if it's that there really is nothing like this out ther

Re: [PHP] Re: hello

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 11:17, Nathan Rixham wrote: > tedd wrote: >> >> At 7:18 PM + 1/8/09, Nathan Rixham wrote: >>> >>> if it's a computer thats on, with an os, a keyboard and a network card >>> connected to the internet it's insecure. >> >> It doesn't even have to be connected to the Interne

[PHP] Re: Create image from HTML

2009-01-09 Thread Nathan Rixham
Christoph Boget wrote: Does anyone know if it's possible, using PHP, to take HTML (either as an input or from a URL) and generate an image (essentially, create a screenshot) of that HTML/page? I've looked around but was unable to find anything and I'm just not sure if it's that there really is n

Re: [PHP] Re: hello

2009-01-09 Thread Nathan Rixham
Daniel Brown wrote: On Fri, Jan 9, 2009 at 11:17, Nathan Rixham wrote: tedd wrote: At 7:18 PM + 1/8/09, Nathan Rixham wrote: if it's a computer thats on, with an os, a keyboard and a network card connected to the internet it's insecure. It doesn't even have to be connected to the Interne

Re: [PHP] Editing in a text area field

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 11:15, Stephen wrote: > > Thank you! That is the way I will do this. > > I may want to change to but that should be easy. (\r)?(\n)?/Ui","$1$2",$str); return $str; } $str = "This is an example of the use of this function.It should replace only double tags."; e

Re: [PHP] Re: hello

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 11:56, Nathan Rixham wrote: > > a few years ago when I first met my rach (we met online), we'd have random > conversations stretching several pages on various forums and social site > profiles we had - i'd find it massively amusing to then go in and delete all > of my replie

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Nathan Rixham
Bastien Koert wrote: 1. Make sure you are freeing up all resources as soon as you can -> mysql_close(); little thing I've done for some time that's stuck with; (php5+ only) on all of my database connection classes, I have the db close function in the destructor just to make sure dbHandle))

Re: [PHP] Re: hello - thread on topic or not?

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 10:40, Robert Cummings wrote: > > Lol, I didn't realize it was off-list or I would have posted it back so > that others could throw in their opinions or speak their mind if they > disagreed. Indeed. I think, especially with the "regulars" that have been here for years,

Re: [PHP] Re: hello

2009-01-09 Thread Nathan Rixham
Daniel Brown wrote: On Fri, Jan 9, 2009 at 11:56, Nathan Rixham wrote: a few years ago when I first met my rach (we met online), we'd have random conversations stretching several pages on various forums and social site profiles we had - i'd find it massively amusing to then go in and delete

[PHP] Adding extension to an existing PHP install

2009-01-09 Thread Tim Donnelly
Hello list, I have a PHP (5.2.1) installation on an openSUSE 10.1 server. PHP was initially compiled from source and I have the original config.nice file, so I know what options were used. l need to add an extension to this running installation, specifically I need to add LDAP support. Ho

[PHP] Couple of beginner questions

2009-01-09 Thread Gary
I've done a number of sites in html and am now venturing into php. Can I create a page in html and insert php code that will work? (for example, take an existing page and insert a date command) Can I create a page with the php extension that contains only contains html and no php? If so are th

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Wolf
Gary wrote: > I've done a number of sites in html and am now venturing into php. > > Can I create a page in html and insert php code that will work? (for > example, take an existing page and insert a date command) Yup > Can I create a page with the php extension that contains only cont

Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread Brian Dunning
Same thing, no output at all. I can access the image directly in my browser and it's fine. On Jan 9, 2009, at 7:52 AM, Zechim wrote: try, header('Content-type: image/jpeg'); $image = imagecreatefromjpeg($your_file); imagejpeg($image,"", 100); imagedestroy($image); zechim -- PHP

[PHP] Re: Adding extension to an existing PHP install

2009-01-09 Thread Nathan Rixham
Tim Donnelly wrote: Hello list, I have a PHP (5.2.1) installation on an openSUSE 10.1 server. PHP was initially compiled from source and I have the original config.nice file, so I know what options were used. l need to add an extension to this running installation, specifically I need to a

Re: [PHP] Re: hello

2009-01-09 Thread Andrew Ballard
On Fri, Jan 9, 2009 at 12:08 PM, Nathan Rixham wrote: > Daniel Brown wrote: >> >> On Fri, Jan 9, 2009 at 11:56, Nathan Rixham wrote: >> >>> >>> a few years ago when I first met my rach (we met online), we'd have >>> random >>> conversations stretching several pages on various forums and social si

Re: [PHP] Re: hello

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 12:08, Nathan Rixham wrote: > > turns out the official word from php itself is that this list doesn't exist > *oh nos* > > Warning: unlink(php-general@lists.php.net) [ href='function.unlink'>function.unlink]: No such file or directory > > (or did i run it twice by accident

Re: [PHP] Re: hello

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 12:34, Andrew Ballard wrote: > > Now... you'd have really freaked out if that had actually worked! LOL Hey, good point, Andrew. Nate, you do know that was only pseudo-code, right? Don't run that in production! -- daniel.br...@parasane.net || danbr...@php.net h

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Gary
Thanks for your input wolf, so would I be correct that the only advantage to having a page with a php extension is that you can use a testing server? Thanks again. gary "Wolf" wrote in message news:20090109172254.7y5r1.75233.r...@cdptpa-web07-z01... > > Gary wrote: >> I've done a number

Re: [PHP] Re: hello

2009-01-09 Thread Andrew Ballard
On Fri, Jan 9, 2009 at 12:35 PM, Daniel Brown wrote: > On Fri, Jan 9, 2009 at 12:34, Andrew Ballard wrote: >> >> Now... you'd have really freaked out if that had actually worked! LOL > >Hey, good point, Andrew. > >Nate, you do know that was only pseudo-code, right? Don't run > that in p

[PHP] Re: Couple of beginner questions

2009-01-09 Thread Nathan Rixham
Gary wrote: I've done a number of sites in html and am now venturing into php. Can I create a page in html and insert php code that will work? (for example, take an existing page and insert a date command) if it has the file extension .php then it will be passed through php and compiled; oth

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Eric Butera
On Fri, Jan 9, 2009 at 12:22 PM, Wolf wrote: > > Gary wrote: >> I've done a number of sites in html and am now venturing into php. >> >> Can I create a page in html and insert php code that will work? (for >> example, take an existing page and insert a date command) > Yup Um... if the file

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Andrew Ballard
On Fri, Jan 9, 2009 at 12:18 PM, Gary wrote: > I've done a number of sites in html and am now venturing into php. > > Can I create a page in html and insert php code that will work? (for > example, take an existing page and insert a date command) Not unless you configure your web server to parse

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Wolf
Eric Butera wrote: > On Fri, Jan 9, 2009 at 12:22 PM, Wolf wrote: > > > > Gary wrote: > >> I've done a number of sites in html and am now venturing into php. > >> > >> Can I create a page in html and insert php code that will work? (for > >> example, take an existing page and insert

Re: [PHP] Re: hello

2009-01-09 Thread Nathan Rixham
Andrew Ballard wrote: On Fri, Jan 9, 2009 at 12:35 PM, Daniel Brown wrote: On Fri, Jan 9, 2009 at 12:34, Andrew Ballard wrote: Now... you'd have really freaked out if that had actually worked! LOL Hey, good point, Andrew. Nate, you do know that was only pseudo-code, right? Don't run

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Per Jessen
Nathan Rixham wrote: > Bastien Koert wrote: >> 1. Make sure you are freeing up all resources as soon as you can -> >> mysql_close(); >> > > little thing I've done for some time that's stuck with; (php5+ only) > > on all of my database connection classes, I have the db close function > in the de

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Jason Pruim
On Jan 9, 2009, at 12:18 PM, Gary wrote: I've done a number of sites in html and am now venturing into php. Can I create a page in html and insert php code that will work? (for example, take an existing page and insert a date command) Yes you can Can I create a page with the php extensio

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Eric Butera
On Fri, Jan 9, 2009 at 12:18 PM, Gary wrote: > Can I create a page with the php extension that contains only contains html > and no php? If so are there advantages/disadvantages? > > Can I mix and match file formats (php/html) in a single site? If it were me, I'd make sure all the files were .ph

Re: [PHP] Re: hello

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 12:43, Nathan Rixham wrote: > > actually i ran it in a debugger, in an ide, in a virtual machine :p in Siberia. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to

Re: [PHP] Re: hello

2009-01-09 Thread Nathan Rixham
Daniel Brown wrote: On Fri, Jan 9, 2009 at 12:43, Nathan Rixham wrote: actually i ran it in a debugger, in an ide, in a virtual machine :p in Siberia. scotland in winter; same thing really -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Per Jessen
Per Jessen wrote: > Nathan Rixham wrote: > >> Bastien Koert wrote: >>> 1. Make sure you are freeing up all resources as soon as you can -> >>> mysql_close(); >>> >> >> little thing I've done for some time that's stuck with; (php5+ only) >> >> on all of my database connection classes, I have th

Re: [PHP] Re: Create image from HTML

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 11:51, Nathan Rixham wrote: > > only way would be if you had php running on a server with a GUI, a program > for grabbing screenshots, and some form of API to control from php (and > recieve output) That's not entirely correct (though it's the most widely-accepted solut

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Dan Shirah
> "so would I be correct that the only advantage to > having a page with a php extension is that you can use a testing server?" There are FAR more benefits! 1) PHP is FREE! So you save money from the get go 2) PHP is open source! So it is constantly being updated and improved by users/devs. 3)

Re: [PHP] First steps towards unix and php

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 10:59, Frank Stanovcak wrote: > *bangs head on wall* > > Great...just what I need. More acronyms. :P Acronyms? You mean the package managers we were discussing? yum Yellowdog Updater Modified - an automated RPM management utility (works on all RH-based

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Gary
Dan I think you misunderstood the question. The question was not is there an advantage of php over html, but the advantage of having a file with the extension of php over an extension of html. ""Dan Shirah"" wrote in message news:a16da1ff0901091019m3d513ebeyf341b2d39c669...@mail.gmail.com...

[PHP] Been staring at the code for too long...

2009-01-09 Thread Jason Pruim
Okay... So I know this is a stupid question... But I've been staring at my code for far too long and now it's still not working so I thought I would show it to all of you and see if you can tell me where I'm being stupid :) this is dbmysqliconnect.php: function dbmysqliconnect($serv

[PHP] Re: Been staring at the code for too long...

2009-01-09 Thread Jay Moore
Jason Pruim wrote: Okay... So I know this is a stupid question... But I've been staring at my code for far too long and now it's still not working so I thought I would show it to all of you and see if you can tell me where I'm being stupid :) this is dbmysqliconnect.php: function dbmy

[PHP] Re: Been staring at the code for too long...

2009-01-09 Thread Nathan Rixham
Jason Pruim wrote: mysqli_stmt_prepare($stmt, "UPDATE database.table ( UPDATE database.table SET ( think that should fix it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Been staring at the code for too long...

2009-01-09 Thread Dan Shirah
> >mysqli_stmt_prepare($stmt, "UPDATE database.table ( >FName, LName, email, phone, > url, record, >subscribed, date, > IPAddress, Business, >Ad

Re: [PHP] Re: Been staring at the code for too long...

2009-01-09 Thread Kyle Terry
On Fri, Jan 9, 2009 at 11:05 AM, Nathan Rixham wrote: > Jason Pruim wrote: > >>mysqli_stmt_prepare($stmt, "UPDATE database.table ( >> > > UPDATE database.table SET ( > > think that should fix it > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.

Re: [PHP] Adressing XML Objects

2009-01-09 Thread ceo
Try it with just one "/" at the start of the xpath. "/anbieter/immobilie/..." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] on Mapserver and php5_MapScript

2009-01-09 Thread Eduardo Arévalo
As I write this line is highlighted in black php5_MapScript code in mapfile LAYER NAMEPeru_dep DATA"departamentos.shp" STATUS ON TYPEPOLYGON CLASSITEM NOMB_DEP CLASS NAME"LIMA" *EXPRESSION /LIMA/*

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Andrew Ballard
On Fri, Jan 9, 2009 at 12:47 PM, Jason Pruim wrote: > > On Jan 9, 2009, at 12:18 PM, Gary wrote: > >> Can I create a page with the php extension that contains only contains >> html >> and no php? If so are there advantages/disadvantages? > > Yes, Look at heredoc syntax on the php.net site. Works

Re: [PHP] on Mapserver and php5_MapScript

2009-01-09 Thread Paul Scott
On Fri, 2009-01-09 at 14:15 -0500, Eduardo Arévalo wrote: > As I write this line is highlighted in black php5_MapScript > You should probably ask this on the UMN Mapserver lists at mapserver-us...@lists.osgeo.org but... > ; > $jStyle->outlinecolor->setRGB(200, 200, 200); You are setting an out

Re: [PHP] Couple of beginner questions

2009-01-09 Thread VamVan
Hey Gary, I've done a number of sites in html and am now venturing into php. Can I create a page in html and insert php code that will work? (for example, take an existing page and insert a date command) --- Of course you can do that. But it is not advised. Becoming better in PHP in few months y

Re: [PHP] Editing in a text area field

2009-01-09 Thread ceo
Rule #1. Never, ever, ever, alter the user's input, EXCEPT for sanitizing/filtering. Specifically, do NOT add tags in place of newlines. Store the newlines. Upon OUTPUT, you can use nl2br() to get tags. Or str_replace if you want instead. This is crucial as a habit, down the road, whe

Re: [PHP] Editing in a text area field

2009-01-09 Thread Eric Butera
On Fri, Jan 9, 2009 at 2:38 PM, wrote: > Rule #1. > Never, ever, ever, alter the user's input, EXCEPT for sanitizing/filtering. Probably shouldn't recommend sanitizing then. Only validate & reject. :P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread ceo
Do other images work? Open and re-save the image. Strip out comments and EXIF data while you are at it -- Some versions of GD had problems with EXIF/comments as I recall. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Create image from HTML

2009-01-09 Thread ceo
I know there was an OSS package that took any URL and made a screenshot of it... Thumbnailer or somesuch?... Commercial folks do it. http://browsercam.com/ Compare cost to dev costs for roll your own... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

Re: [PHP] Editing in a text area field

2009-01-09 Thread VamVan
Rule #1. Never, ever, ever, alter the user's input, EXCEPT for sanitizing/filtering. Specifically, do NOT add tags in place of newlines. Store the newlines. 100% I agree. Thats called the act of defensive programming. We have no right over altering user input but yes we have right to display wha

Re: [PHP] Couple of beginner questions

2009-01-09 Thread ceo
The slowdown of just running raw HTML through PHP was once benchmarked as about 5 to 10 %. You could, in theory, use .htaccess and to ForceType specific .html files as PHP, while leaving the rest of your .html files as static. I am not recommending this, just being pedantic. :-) Defini

Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread ceo
The browser cheerfully rendering a badly-broken JPEG is quite common, if it can figure out what the JPEG was supposed to have been. (Think bad HTML and quirks mode.) So you really want to validate it with something more strict than a browser. -- PHP General Mailing List (http://www.php.ne

Re: [PHP] Editing in a text area field

2009-01-09 Thread ceo
>> Rule #1. >> Never, ever, ever, alter the user's input, EXCEPT for >> sanitizing/filtering. > >Probably shouldn't recommend sanitizing then. Only validate & reject. :P mea culpa I meant ESCAPING, of course. If it doesn't pass sanitizing/filtering, it's probably better to just "reje

Re: [PHP] Re: hello

2009-01-09 Thread Robert Cummings
On Fri, 2009-01-09 at 18:09 +, Nathan Rixham wrote: > Daniel Brown wrote: > > On Fri, Jan 9, 2009 at 12:43, Nathan Rixham wrote: > >> actually i ran it in a debugger, in an ide, in a virtual machine :p > > > > in Siberia. > > > > scotland in winter; same thing really I lived in Sc

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Eric Butera
On Fri, Jan 9, 2009 at 3:22 PM, wrote: > > The slowdown of just running raw HTML through PHP was once benchmarked as > about 5 to 10 %. > > You could, in theory, use .htaccess and to ForceType specific .html > files as PHP, while leaving the rest of your .html files as static. > > I am not rec

Re: [PHP] Editing in a text area field

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 14:43, VamVan wrote: > > 100% I agree. Thats called the act of defensive programming. We have no > right over altering user input but yes we have right to display what we want > user see on the site. Well, of course you have the _right_ to do it --- as long as it's lega

Re: [PHP] Re: hello

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 15:31, Robert Cummings wrote: > > I lived in Scotland for many years... Scottish winters pale in > comparison to northern Canadian winters, and these in turn pale in > comparison to Siberian winters. Yeah, and from the sounds of it, Rob, you guys are about to have a hel

[PHP] Re: Create image from HTML

2009-01-09 Thread Al
Christoph Boget wrote: Does anyone know if it's possible, using PHP, to take HTML (either as an input or from a URL) and generate an image (essentially, create a screenshot) of that HTML/page? I've looked around but was unable to find anything and I'm just not sure if it's that there really is

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 15:36, Eric Butera wrote: > > I was just talking myself. I use objects and such so I'm really not > as worried about performance either. But it was a "downside" that I > knew about from some css/js stuff I'd done a while ago. I still had 2 > files on my box from some fram

Re: [PHP] Re: hello

2009-01-09 Thread Robert Cummings
On Fri, 2009-01-09 at 15:47 -0500, Daniel Brown wrote: > On Fri, Jan 9, 2009 at 15:31, Robert Cummings wrote: > > > > I lived in Scotland for many years... Scottish winters pale in > > comparison to northern Canadian winters, and these in turn pale in > > comparison to Siberian winters. > > Y

Re: [PHP] Re: hello

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 16:16, Robert Cummings wrote: > > We're at -13C right now without windchill and this is in Ottawa which is > a lot further south than I've lived in the past (Timmins, Sudbury). Yeah, no offense, my friend, but you can keep it. We're a balmy 22F (-5C) right now in Scran

Re: [PHP] Been staring at the code for too long...

2009-01-09 Thread Daniel Brown
On Fri, Jan 9, 2009 at 13:38, Jason Pruim wrote: > Okay... So I know this is a stupid question... It sure is. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out!

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Frank Stanovcak
"VamVan" wrote in message news:12eb8b030901091135u4e17f1f3p24698dbc8f5a2...@mail.gmail.com... > -- Remember as you re still a beginner try to avoid using ?> at the end of > complete PHP code page. or else if you have empty lines at the end of the > file "then you wont see blank page of death in

Re: [PHP] Couple of beginner questions

2009-01-09 Thread ceo
With all due respect, Eric, you're not testing what we're discussing. A "real" CLI test would be more like: time cat foo.html time php -q foo.html I.E., how long does PHP take to read/write foo.html without breaking into PHP "mode" for static HTML. Of course, it's still a lousy bench

  1   2   >