php-general Digest 2 Oct 2011 08:52:00 -0000 Issue 7501

2011-10-02 Thread php-general-digest-help

php-general Digest 2 Oct 2011 08:52:00 - Issue 7501

Topics (messages 315097 through 315110):

Re: php.ini setting
315097 by: Stephen
315098 by: Jim Giner
315099 by: Ashley Sheridan
315101 by: Mike Mackintosh
315103 by: Jim Giner
315108 by: Jim Giner
315110 by: Ashley Sheridan

Variable question
315100 by: Ron Piggott
315102 by: Mike Mackintosh
315104 by: David Harkness
315105 by: Robert Cummings
315106 by: Tim Streater
315109 by: Geoff Shang

Re: Getting meta data (of any type) for an XML file being from it's URL.
315107 by: Tommy Pham

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---

On 11-10-01 11:57 AM, Jim Giner wrote:

I'm trying to set magic quotes Off as my reading tells me that it's not good
to have it defaulted to On.



http://php.net/manual/en/security.magicquotes.disabling.php

Stephen
---End Message---
---BeginMessage---

Stephen stephe...@rogers.com wrote in message 
news:4e874606.2030...@rogers.com...

 http://php.net/manual/en/security.magicquotes.disabling.php

 Stephen

That tells me nothing new. 


---End Message---
---BeginMessage---
On Sat, 2011-10-01 at 12:55 -0400, Stephen wrote:

 On 11-10-01 11:57 AM, Jim Giner wrote:
  I'm trying to set magic quotes Off as my reading tells me that it's not good
  to have it defaulted to On.
 
 
 http://php.net/manual/en/security.magicquotes.disabling.php
 
 Stephen
 


Stephen, that page specifies the exact same line for the .htaccess that
he said he used. I'm not sure why it would cause an internal server
error, but I've seen some Apache configurations completely flake over
lines in the .htaccess that were fine elsewhere.

The only thing I can find online where this line will cause a server
error is where the server is set up to allow custom php.ini files which
override the defaults. To test this, try adding a php.ini file into the
directory your script is (this is completely untested, I just saw it on
a forum (http://www.bluehostforum.com/archive/index.php/t-15975.html ))
and enter the regular php.ini line to turn it off.

If that fails, I'd try and contact your hosting provider and see what
they say, as they probably have more information specific to this
problem, as it's most likely a setting of theirs that is causing it.

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


---End Message---
---BeginMessage---

On Oct 1, 2011, at 2:04 PM, Ashley Sheridan wrote:

 On Sat, 2011-10-01 at 12:55 -0400, Stephen wrote:
 
 On 11-10-01 11:57 AM, Jim Giner wrote:
 I'm trying to set magic quotes Off as my reading tells me that it's not good
 to have it defaulted to On.
 
 
 http://php.net/manual/en/security.magicquotes.disabling.php
 
 Stephen
 
 
 
 Stephen, that page specifies the exact same line for the .htaccess that
 he said he used. I'm not sure why it would cause an internal server
 error, but I've seen some Apache configurations completely flake over
 lines in the .htaccess that were fine elsewhere.
 
 The only thing I can find online where this line will cause a server
 error is where the server is set up to allow custom php.ini files which
 override the defaults. To test this, try adding a php.ini file into the
 directory your script is (this is completely untested, I just saw it on
 a forum (http://www.bluehostforum.com/archive/index.php/t-15975.html ))
 and enter the regular php.ini line to turn it off.
 
 If that fails, I'd try and contact your hosting provider and see what
 they say, as they probably have more information specific to this
 problem, as it's most likely a setting of theirs that is causing it.
 
 -- 
 Thanks,
 Ash
 http://www.ashleysheridan.co.uk
 
 


Have you tried:

ini_set('magic_quotes_gpc', false);---End Message---
---BeginMessage---

Mike Mackintosh mike.mackint...@angrystatic.com wrote in message 
news:52ea6b9e-ef12-44d3-bd31-72984e5e5...@angrystatic.com...

Have you tried:
ini_set('magic_quotes_gpc', false);=

I'm trying to set it directly and not have to incl in every script I write. 


---End Message---
---BeginMessage---
Solved.

Had to have my host provider put a copy of php.ini in my public_html and 
then I made the magic quotes setting change.

Interesting - running a phpinfo command still shows the setting as On 
becuase it returns the server's settigns, NOT my individual folder setting.


---End Message---
---BeginMessage---
On Sat, 2011-10-01 at 14:01 -0400, Mike Mackintosh wrote:

 On Oct 1, 2011, at 2:04 PM, Ashley Sheridan wrote:
 
  On Sat, 2011-10-01 at 12:55 -0400, Stephen wrote:
  
  On 11-10-01 11:57 AM, Jim Giner wrote:
  I'm trying to set magic quotes Off as my reading tells me that 

Re: [PHP] php.ini setting

2011-10-02 Thread Ashley Sheridan
On Sat, 2011-10-01 at 14:01 -0400, Mike Mackintosh wrote:

 On Oct 1, 2011, at 2:04 PM, Ashley Sheridan wrote:
 
  On Sat, 2011-10-01 at 12:55 -0400, Stephen wrote:
  
  On 11-10-01 11:57 AM, Jim Giner wrote:
  I'm trying to set magic quotes Off as my reading tells me that it's not 
  good
  to have it defaulted to On.
  
  
  http://php.net/manual/en/security.magicquotes.disabling.php
  
  Stephen
  
  
  
  Stephen, that page specifies the exact same line for the .htaccess that
  he said he used. I'm not sure why it would cause an internal server
  error, but I've seen some Apache configurations completely flake over
  lines in the .htaccess that were fine elsewhere.
  
  The only thing I can find online where this line will cause a server
  error is where the server is set up to allow custom php.ini files which
  override the defaults. To test this, try adding a php.ini file into the
  directory your script is (this is completely untested, I just saw it on
  a forum (http://www.bluehostforum.com/archive/index.php/t-15975.html ))
  and enter the regular php.ini line to turn it off.
  
  If that fails, I'd try and contact your hosting provider and see what
  they say, as they probably have more information specific to this
  problem, as it's most likely a setting of theirs that is causing it.
  
  -- 
  Thanks,
  Ash
  http://www.ashleysheridan.co.uk
  
  
 
 
 Have you tried:
 
 ini_set('magic_quotes_gpc', false);


That won't work, because by the time the server comes to process the
script, the data has already been processed. In effect, that line will
do nothing.

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




[PHP] EBNF-Grammar of PHP

2011-10-02 Thread Anonym
Hi

i´m looking for an EBNF-Grammar of PHP. is there an official (or
complete) grammar available?

thanks for your help

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



Re: [PHP] php.ini setting

2011-10-02 Thread Jim Giner
Spoke to quickly - still having issues.  While the .ini file in each of my 
appl. folders has magic quotes set to Off, my scripts are still escaping my 
input - obviously following the server's .ini file settings.  Waiting for my 
hosters to get back to me. 



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



[PHP] Re: php.ini setting

2011-10-02 Thread Stephen

On 11-10-02 12:12 PM, Jim Giner wrote:

Spoke to quickly - still having issues.  While the .ini file in each of my
appl. folders has magic quotes set to Off, my scripts are still escaping my
input - obviously following the server's .ini file settings.  Waiting for my
hosters to get back to me.

You could refer them to:

http://php.net/manual/en/security.magicquotes.php

Indicate that magic quotes have deprecated, and ask them to turn them off.

But they will say no, because of all the other users on the server 
that you use.


In the end, you will be left with stripping the slashes on your own:


?php
if (get_magic_quotes_gpc()) {
$process = array($_GET, $_POST, $_COOKIE, $_REQUEST);
while (list($key, $val) = each($process)) {
foreach ($val as $k = $v) {
unset($process[$key][$k]);
if (is_array($v)) {
$process[$key][stripslashes($k)] = $v;
$process[] = $process[$key][stripslashes($k)];
} else {
$process[$key][stripslashes($k)] = stripslashes($v);
}
}
}
unset($process);
}
?

I know it is not the answer you are looking for, but it does work, and 
used by thousands of coders.


Stephen


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