Re: [PHP] Netbeans IDE 6.5

2009-10-29 Thread John Black
James McLean wrote: I myself and I'm sure many others will agree that sticking to 'around' 80 chars is best-practice, it's handy for those times when you need to fix code in an emergency in an 80 col terminal, among other reasons. Personally the 80 col marker (I set it to 78 cols actually) is one

Re: [PHP] Textarea to road a text file

2009-10-29 Thread John Black
Jean Lee wrote: Could you explain what was my fault concerned about this case? " . $contents . ""; ?> As Andrew pointed out, you need to use htmlspecialchars() echo "" .htmlspecialchars($contents). ""; The reason for that is because the text may contain html control characters like <>&'" w

Re: [PHP] Netbeans IDE 6.5

2009-10-29 Thread John Black
Skip Evans wrote: Now, if I can just get rid of that red line at the 80 column mark. I haven't bothered with 80 columns since I wrote assembly on a terminal connected to a PDP-11 in college. Sorry forgot to include this. Tools=>Options=>Formatting Set Right Margin to 200 (200 is the largest n

Re: [PHP] Re: Converting tables into forms

2009-10-29 Thread Tom Barrett
Apologies for semi-hijacking, but I am confused. What are aiming to do that something like PHPMyAdmin doesn't do? 2009/10/28 ben...@gmail.com > Jay, > > What function do you have? Thanks to everyone for their feedback. > > Best, > > Ben > > On Wed, Oct 28, 2009 at 9:17 AM, Jay Blanchard >wrot

Re: [PHP] Netbeans IDE 6.5

2009-10-29 Thread James McLean
On Thu, Oct 29, 2009 at 8:13 PM, John Black wrote: > James McLean wrote: >> >> I myself and I'm sure many others will agree that sticking to 'around' >> 80 chars is best-practice, it's handy for those times when you need to >> fix code in an emergency in an 80 col terminal, among other reasons. >>

RE: [PHP] Textarea to road a text file

2009-10-29 Thread Jay Blanchard
[snip] . .. " . $contents . ""; ?> [/snip] Try http://us3.php.net/manual/en/function.file-get-contents.php " . $contents . ""; ?> I am unsure what you want to do here, display the menu in the textarea? Or do you want to be able to edit menu.php in the textarea? -- PHP Gene

RE: [PHP] Re: Converting tables into forms

2009-10-29 Thread Jay Blanchard
[snip]What are aiming to do that something like PHPMyAdmin doesn't do?[/snip] The OP never really answered this, but I don't think you can use PHPMyAdmin to automate the generation of forms from every table in a database. You could use the function I supplied in a loop to read each table and spit

Re: [PHP] Re: Converting tables into forms

2009-10-29 Thread richard
Hi, > What are aiming to do that something like PHPMyAdmin doesn't do? Perhaps the forms are for users. And users being able to drop databases isn't my idea of a good time. And setting up and maintaining multiple database users is far too much work - I prefer not to provide the interface in the f

RE: [PHP] Re: Create a screenshot of a website

2009-10-29 Thread Bob McConnell
From: Paul M Foster > On Wed, Oct 28, 2009 at 05:49:43PM -0200, Manuel Lemos wrote: >> on 10/28/2009 05:24 PM Robert Cummings said the following: >> > >> > It hurts my eyes to go on the phpclasses website. It's like someone >> > vomited tabs and links :| >> >> I have no clue why you felt the need

Re: [PHP] Re: Create a screenshot of a website

2009-10-29 Thread Robert Cummings
Bob McConnell wrote: By the way, HTML Validator, another FF add-on I recommend every developer install, shows a number of warnings on that site, similar to 'line 115 column 1 - Warning: attribute "width" has invalid value "49.5%"'. (NOTE: If you are on Linux, the FF add-on site incorrectly state

[PHP] Assignment in Conditional - How are they evaluated?

2009-10-29 Thread Mark Skilbeck
How is the following evaluated: [code] if ($data = somefunc()) ... [/code] Ignoring the 'assignment inside condition' arguments, is the return value of somefunc() assigned to $data, and then $data's value is evaluated (to true or false), or is the actual assignment tested (does the assignment

Re: [PHP] Assignment in Conditional - How are they evaluated?

2009-10-29 Thread Ashley Sheridan
On Thu, 2009-10-29 at 13:58 +, Mark Skilbeck wrote: > How is the following evaluated: > > [code] > if ($data = somefunc()) ... > [/code] > > Ignoring the 'assignment inside condition' arguments, is the return > value of somefunc() assigned to $data, and then $data's value is > evaluated (t

Re: [PHP] Assignment in Conditional - How are they evaluated?

2009-10-29 Thread Martin Scotta
On Thu, Oct 29, 2009 at 10:58 AM, Mark Skilbeck wrote: > How is the following evaluated: > > [code] > if ($data = somefunc()) ... > [/code] > > Ignoring the 'assignment inside condition' arguments, is the return value > of somefunc() assigned to $data, and then $data's value is evaluated (to > tru

Re: [PHP] Assignment in Conditional - How are they evaluated?

2009-10-29 Thread Robert Cummings
Ashley Sheridan wrote: On Thu, 2009-10-29 at 13:58 +, Mark Skilbeck wrote: How is the following evaluated: [code] if ($data = somefunc()) ... [/code] Ignoring the 'assignment inside condition' arguments, is the return value of somefunc() assigned to $data, and then $data's value is eval

[PHP] opposite of quotemeta ?

2009-10-29 Thread Matthew Croud
Hi, In my script I want the user to enter some html which is saved to a file, I've noticed that php rather cleverly escapes the speech marks, so: Google becomes: Google Is there some function which prevents or reverts this ? something similar to html_entities maybe? Many thanks! Matt

Fwd: [PHP] Assignment in Conditional - How are they evaluated?

2009-10-29 Thread Martin Scotta
On Thu, Oct 29, 2009 at 11:11 AM, Robert Cummings wrote: > Ashley Sheridan wrote: > >> On Thu, 2009-10-29 at 13:58 +, Mark Skilbeck wrote: >> >> How is the following evaluated: >>> >>> [code] >>> if ($data = somefunc()) ... >>> [/code] >>> >>> Ignoring the 'assignment inside condition' argume

Re: [PHP] opposite of quotemeta ?

2009-10-29 Thread Marc Steinert
Hi Matthew, you might have magic quotes enabled in your PHP installation. Have a look at http://php.net/manual/de/security.magicquotes.php about that topic. If you want to unescape the string, use the stripslashes-function (http://php.net/stripslashes). Greetings from Germany Marc Matthew

Re: [PHP] Assignment in Conditional - How are they evaluated?

2009-10-29 Thread Eddie Drapkin
On Thu, Oct 29, 2009 at 10:23 AM, Martin Scotta wrote: > On Thu, Oct 29, 2009 at 11:11 AM, Robert Cummings wrote: > >> Ashley Sheridan wrote: >> >>> On Thu, 2009-10-29 at 13:58 +, Mark Skilbeck wrote: >>> >>>  How is the following evaluated: [code] if ($data = somefunc()) ... >>

[PHP] Re: UrlRewrite htaccess confusion

2009-10-29 Thread Shawn McKenzie
Rob Gould wrote: > I feel like I'm really close to a solution for the clean-url method in > htaccess. I've successfully got it now so that: > > http://benchwarmersports.com/packages/basketball/2010/nba-all-star-game > > maps to: > > http://benchwarmersports.com/packages.php?category=basketball&

Re: [PHP] ... stop header("Location...) from working? [SOLVED]

2009-10-29 Thread tedd
At 7:31 PM -0400 10/27/09, tedd wrote: Hi gang: I just had a script stop following this statement: header("Location:users.php"); It *was* working, but now instead of running "users.php", it defaults to the parent script. When I place exit() after it, such as: header("Location:users.p

[PHP] What PHP version are you using?

2009-10-29 Thread Israel Ekpo
Hi Guys, I just want to conduct a quick survey to find out what version of PHP people are using in their production environments. I have a PHP extension for Solr that I have set the minimum required version as 5.2.11. http://pecl.php.net/package/solr/ However, most of the PHP users that want to

[PHP] Catalog APP

2009-10-29 Thread Jack
Hello All, Has anyone used a good catalog app ? ( sort of like a shopping cart, but to show off products and not sell them ) Hopefully something with templates so we can tweak the look easily. Thanks! Jack -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

[PHP] Catalog APP

2009-10-29 Thread Joey
Hello All, Has anyone used a good catalog app ? ( sort of like a shopping cart, but to show off products and not sell them ) Hopefully something with templates so we can tweak the look easily. Thanks! Jack Thanks! Jack -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] What PHP version are you using?

2009-10-29 Thread Fernando Castillo Aparicio
5.2.8, but testing 5.3 in local environment.

Re: [PHP] What PHP version are you using?

2009-10-29 Thread Israel Ekpo
On Thu, Oct 29, 2009 at 11:15 AM, Fernando Castillo Aparicio < f_c_a_1...@yahoo.es> wrote: > 5.2.8, but testing 5.3 in local environment. > > Thanks Fernando. -- "Good Enough" is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut On

[PHP] Re: UrlRewrite htaccess confusion

2009-10-29 Thread Rob Gould
You are indeed correct! Absolute URLs for everything, images, css, javascript, and links fixed the issue. Took me forever to change every link in the whole site, but it's happy now. Seems like there ought to be an easier way. On Oct 29, 2009, at 10:52 AM, Shawn McKenzie wrote: Rob Gou

Re: [PHP] What PHP version are you using?

2009-10-29 Thread Robert Cummings
Israel Ekpo wrote: I would really appreciate some feedback as it will be useful in helping me determine which PHP version numbers to do my regression tests against. 5.2.0 to 5.2.11 depending on server. I'm not yet ready to move to 5.3.0 due to lack of stable support from the accelerators thus

Re: [PHP] Re: Create a screenshot of a website

2009-10-29 Thread tedd
At 9:24 AM -0400 10/29/09, Robert Cummings wrote: Bob McConnell wrote: By the way, HTML Validator, another FF add-on I recommend every developer install, shows a number of warnings on that site, similar to 'line 115 column 1 - Warning: attribute "width" has invalid value "49.5%"'. (NOTE: If you

Re: [PHP] Re: UrlRewrite htaccess confusion

2009-10-29 Thread Ashley Sheridan
On Thu, 2009-10-29 at 11:26 -0400, Rob Gould wrote: > You are indeed correct! Absolute URLs for everything, images, css, > javascript, and links fixed the issue. Took me forever to change > every link in the whole site, but it's happy now. Seems like there > ought to be an easier way. >

RE: [PHP] Re: Create a screenshot of a website

2009-10-29 Thread Bob McConnell
From: tedd > At 9:24 AM -0400 10/29/09, Robert Cummings wrote: >>Bob McConnell wrote: >>>By the way, HTML Validator, another FF add-on I recommend every >>>developer install, shows a number of warnings on that site, similar to >>>'line 115 column 1 - Warning: attribute "width" has invalid value >

Re: [PHP] Re: Create a screenshot of a website

2009-10-29 Thread Robert Cummings
tedd wrote: At 9:24 AM -0400 10/29/09, Robert Cummings wrote: Bob McConnell wrote: By the way, HTML Validator, another FF add-on I recommend every developer install, shows a number of warnings on that site, similar to 'line 115 column 1 - Warning: attribute "width" has invalid value "49.5%"'

Re: [PHP] What PHP version are you using?

2009-10-29 Thread tedd
At 11:10 AM -0400 10/29/09, Israel Ekpo wrote: Hi Guys, I just want to conduct a quick survey to find out what version of PHP people are using in their production environments. My version depends upon the client. I have one client who is still in version 4.3.1.0. Cheers, tedd -- --- ht

Re: [PHP] Re: Create a screenshot of a website

2009-10-29 Thread tedd
At 11:40 AM -0400 10/29/09, Robert Cummings wrote: tedd wrote: At 9:24 AM -0400 10/29/09, Robert Cummings wrote: Bob McConnell wrote: By the way, HTML Validator, another FF add-on I recommend every developer install, shows a number of warnings on that site, similar to 'line 115 column 1 - Warn

Re: [PHP] What PHP version are you using?

2009-10-29 Thread Israel Ekpo
On Thu, Oct 29, 2009 at 11:47 AM, tedd wrote: > At 11:10 AM -0400 10/29/09, Israel Ekpo wrote: > >> Hi Guys, >> >> I just want to conduct a quick survey to find out what version of PHP >> people >> are using in their production environments. >> > > My version depends upon the client. I have one c

Re: [PHP] What PHP version are you using?

2009-10-29 Thread mrfroasty
5.2.11 here... Gr mrfroasty Israel Ekpo wrote: On Thu, Oct 29, 2009 at 11:47 AM, tedd wrote: At 11:10 AM -0400 10/29/09, Israel Ekpo wrote: Hi Guys, I just want to conduct a quick survey to find out what version of PHP people are using in their production environments.

Re: [PHP] What PHP version are you using?

2009-10-29 Thread Tom Barrett
2009/10/29 Israel Ekpo > Hi Guys, > > I just want to conduct a quick survey to find out what version of PHP > people > are using in their production environments. > > I have a PHP extension for Solr that I have set the minimum required > version > as 5.2.11. > [snip] > I cannot go below 5.2.0 th

Re: [PHP] What PHP version are you using?

2009-10-29 Thread Dan McCullough
Like Israel it depends on the client I am doing several projects for a client now that the hosting company is still using 4.0.6 - and its been a headache. Most of the personal projects and many of my other clients are on 5.1 or higher. On Thu, Oct 29, 2009 at 12:22 PM, Tom Barrett wrote: > 2009

Re: [PHP] What PHP version are you using?

2009-10-29 Thread Israel Ekpo
On Thu, Oct 29, 2009 at 12:30 PM, Dan McCullough wrote: > Like Israel it depends on the client I am doing several projects for a > client now that the hosting company is still using 4.0.6 - and its been a > headache. Most of the personal projects and many of my other clients are > on > 5.1 or hig

Re: [PHP] What PHP version are you using?

2009-10-29 Thread Robert Cummings
Tom Barrett wrote: 2009/10/29 Israel Ekpo Hi Guys, I just want to conduct a quick survey to find out what version of PHP people are using in their production environments. I have a PHP extension for Solr that I have set the minimum required version as 5.2.11. [snip] I cannot go below 5.2

Re: [PHP] What PHP version are you using?

2009-10-29 Thread John Black
Israel Ekpo wrote: I would really appreciate some feedback as it will be useful in helping me determine which PHP version numbers to do my regression tests against. I used to write software for 4.1 and above but I am now dropping PHP 4 and will only write for PHP 5 and above. I would still wri

[PHP] Re: UrlRewrite htaccess confusion

2009-10-29 Thread Shawn McKenzie
Rob Gould wrote: > You are indeed correct! Absolute URLs for everything, images, css, > javascript, and links fixed the issue. Took me forever to change every > link in the whole site, but it's happy now. Seems like there ought to > be an easier way. > There is an easier way. The logic depend

[PHP] Re: What PHP version are you using?

2009-10-29 Thread Shawn McKenzie
Israel Ekpo wrote: > Hi Guys, > > I just want to conduct a quick survey to find out what version of PHP people > are using in their production environments. > > I have a PHP extension for Solr that I have set the minimum required version > as 5.2.11. > > http://pecl.php.net/package/solr/ > > Ho

[PHP] Re: UrlRewrite htaccess confusion

2009-10-29 Thread Shawn McKenzie
Shawn McKenzie wrote: > Rob Gould wrote: >> You are indeed correct! Absolute URLs for everything, images, css, >> javascript, and links fixed the issue. Took me forever to change every >> link in the whole site, but it's happy now. Seems like there ought to >> be an easier way. >> > > There is

[PHP] Re: What PHP version are you using?

2009-10-29 Thread Shawn McKenzie
Shawn McKenzie wrote: >> > Home/Dev: 5.2.15 > Web: 5.1.6 (probably should update) > O.K. so 5.2.15 doesn't exist :-( That is the Zend debugger version I have. I actually have Home/Dev: 5.2.4. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] Re: UrlRewrite htaccess confusion

2009-10-29 Thread Martin Scotta
You can use a regexp for search and replace in your files. packages.php?category=([^&]+)&year=([^&]+)&title=([^&]+) The problem is those values are variables on the code. As Shawn said, it is easier to provide some function to create links.If you need to change all links you only change the func

Re: [PHP] Re: UrlRewrite htaccess confusion

2009-10-29 Thread Paul M Foster
On Thu, Oct 29, 2009 at 12:26:10PM -0500, Shawn McKenzie wrote: > Rob Gould wrote: > > You are indeed correct! Absolute URLs for everything, images, css, > > javascript, and links fixed the issue. Took me forever to change every > > link in the whole site, but it's happy now. Seems like there o

[PHP] please help with regular expression in preg_replace

2009-10-29 Thread Red
hello, im not a php developer, i just need to rewrite one php file but having problem with understanding syntax of regexp in php. i need to get domain name from fqdn (for example from $_SERVER['HTTP_HOST'] ) in sed its working well with "s/[^.]*\.//" , but preg_replace behaves weird. http_hos

Re: [PHP] please help with regular expression in preg_replace

2009-10-29 Thread Andy Shellam (Mailing Lists)
Hi Rene, This looks suspiciously like regex's "greedy" behaviour - it will gobble up everything that matches until you tell it otherwise. For example, your regex is matching "any character that isn't a dot, followed by a dot." In host.domain.com, both "host." and "domain." match this rege

Re: [PHP] please help with regular expression in preg_replace

2009-10-29 Thread Jim Lucas
Red wrote: > hello, im not a php developer, i just need to rewrite one php file but having > problem with understanding syntax of regexp in php. > > i need to get domain name from fqdn (for example from $_SERVER['HTTP_HOST'] ) > > in sed its working well with "s/[^.]*\.//" , but preg_replace beh