Re: [PHP] php.ini

2013-10-09 Thread Jim Giner

On 10/9/2013 3:14 AM, Simon Schick wrote:

On Tue, Oct 8, 2013 at 9:50 PM, Jim Giner wrote:


On 10/8/2013 2:42 PM, Simon Schick wrote:


On Tue, Oct 8, 2013 at 5:25 PM, Jim Giner *
*wrote:

  re: changing ini settings.


If my running script modifies an ini setting I currently believe that
that
changed setting will apply to that specific process and any others that
run
after that from that same folder (since i have an ini file in each folder
currently).  Correct?

And if I do make a setting change as above, it only affects the ini file
and processes in that folder, thus leaving the setting unchanged in any
and
all other folders above that one.  Correct?

And from the article pointed out to me, I get the impression that the
search for ini files bubbles up from the executing folder.  If that is
so,
then am I correct in assuming that settings in the lowest ini file take
precedence over any found in 'bubbled-up' ini files?


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


  Hi, Jim


Never mind my last paragraph ... I was thinking the wrong way of what you
wrote earlier.

I haven't tested it properly in every detail, but from the perspective of
what I know it's like you wrote.

The file that's mentioned as "php.ini" is the main configuration file of
your php-installation. It may be, that the user-ini file was renamed to
"php.ini" as well, but if you read about "php.ini", they always mean the
configuration-file that you see listed in the output of phpinfo() as
"Configuration File (php.ini) Path".

* You can rename the user-ini file by changing the user_ini.filename
setting in the php.ini file (as written on the page I linked you to)

* The php-settings are restored after/before each script-execution

* The manual doesn't catch if a user-ini file was found ... just that it
bubbles up to the document_root. Maybe the configuration found in user-ini
files is merged, or just the first file is taken.

* I don't know what happens to configuration you apply f.e. in nginx ... I
know neither when settings in php-fpm are applied ... that's something
left
for testing, or until somebody finds the documentation explaining it (I
know there is one ...), but I guess they're applied after the php.ini and
before the user-ini files.
Examples are listed here:
http://php.net/manual/en/**install.fpm.configuration.php#**example-60

* What you set using set_ini() is just applied for the rest of the
currently running script.

Bye
Simon

  I understand most of what you wrote and agree all except for one thing.

  You keep using the name "user.ini" and I asked for clarification on this
earlier.  Do I have to create files named EXACTLY that way, or are
"php.ini" files correctly named?


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



Hi, Jim

You can define the name for this file your configuration (php basic
configuration file or in the webserver, calling the cgi/fcgi script).

The configuration is called "user_ini.filename", and it's default value is
set to ".user.ini". Of course, your provider (or you, if you're the
administrator of the php-instance) may changed this setting to something
like "php.ini". Then the php-process will search for a "php.ini" file in
the directories a user-ini file is searched in.
When talking about configuration files, this may be misleading, as the
basic configuration file is refered as "php.ini" over all in the
documentation.

I don't believe, that the PHP process would search for a file called
"php.ini", if the value is set to something like ".user.ini" - if that's
what you mean.

It may be, that you can change the setting later on, but it will have no
effect (f.e. if you change it using set_ini() ... if it doesn't trigger a
E_WARNING or something the like).

Hope this answers the remaining question. If not, I kindly ask you to write
some examples.

Bye,
Simon

Ok - here is what I see happening now.  PHPINFO shows a setting named 
'user_ini.filename' set to '.user.ini'  At the same time the setting 
"loaded configuration file" shows that a "php.ini" file was loaded from 
the current sub folder that this call to phpinfo was running in (as I 
expect!).  So apparently my host has set php to look for "user.ini" 
files, but "php.ini" files are still accepted and loaded.


I'm guessing that despite the user_ini filename setting, a PHP.ini file 
will still be read, which suits me just fine.


Thanks for all the help Simon!

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



Re: [PHP] php.ini

2013-10-09 Thread Simon Schick
Hi, Jim

I suggest to read this page of the tutorial. It seems, that it solves the
questions, you posted here:
http://www.php.net/manual/en/configuration.file.per-user.php

Please be aware, that the ini-file is not re-read on every request, but
after a defined time.
Neither are all settings changeable in those per-user ini-files.

Read also the other pages in this chapter, they're good to keep in mind ;)

If you're now calling the script from a webserver, you called by requesting
a page on a subdomain or a top-level-domain, doesn't matter.

Bye,
Simon


On Tue, Oct 8, 2013 at 4:48 PM, Jim Giner wrote:

> Can someone give me an understanding of how the .ini settings are located
> and combined?  I am under the impression that there is a full settings .ini
> file somewhere up high in my host's server tree and that any settings I
> create in .ini files in each of my domain folders are appended/updated
> against the 'main' ini settings to give me a 'current' group of php.ini
> settings.
>
> What I'm looking to find out is does an ini setting established in a test
> subdomain of my site affect those ini settings outside of my test subdomain?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] php.ini

2013-10-09 Thread Jim Giner

re: changing ini settings.

If my running script modifies an ini setting I currently believe that 
that changed setting will apply to that specific process and any others 
that run after that from that same folder (since i have an ini file in 
each folder currently).  Correct?


And if I do make a setting change as above, it only affects the ini file 
and processes in that folder, thus leaving the setting unchanged in any 
and all other folders above that one.  Correct?


And from the article pointed out to me, I get the impression that the 
search for ini files bubbles up from the executing folder.  If that is 
so, then am I correct in assuming that settings in the lowest ini file 
take precedence over any found in 'bubbled-up' ini files?


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



Re: [PHP] php.ini

2013-10-09 Thread Jim Giner

On 10/8/2013 11:13 AM, Simon Schick wrote:

Hi, Jim

I suggest to read this page of the tutorial. It seems, that it solves the
questions, you posted here:
http://www.php.net/manual/en/configuration.file.per-user.php

Please be aware, that the ini-file is not re-read on every request, but
after a defined time.
Neither are all settings changeable in those per-user ini-files.

Read also the other pages in this chapter, they're good to keep in mind ;)

If you're now calling the script from a webserver, you called by requesting
a page on a subdomain or a top-level-domain, doesn't matter.

Bye,
Simon


On Tue, Oct 8, 2013 at 4:48 PM, Jim Giner wrote:


Can someone give me an understanding of how the .ini settings are located
and combined?  I am under the impression that there is a full settings .ini
file somewhere up high in my host's server tree and that any settings I
create in .ini files in each of my domain folders are appended/updated
against the 'main' ini settings to give me a 'current' group of php.ini
settings.

What I'm looking to find out is does an ini setting established in a test
subdomain of my site affect those ini settings outside of my test subdomain?

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





I need more!
1 - the doc you mentioned refers to 'user.ini'.  Does that literally 
mean the file is called 'USER.ini'?  I have been placing my .ini 
overrides/settings in each of my folders under the name 'php.ini'.  Do I 
have to change them all because it seems that they are working fine.


2 - I didn't understand your last paragraph.

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



[PHP] php.ini

2013-10-08 Thread Jim Giner
Can someone give me an understanding of how the .ini settings are 
located and combined?  I am under the impression that there is a full 
settings .ini file somewhere up high in my host's server tree and that 
any settings I create in .ini files in each of my domain folders are 
appended/updated against the 'main' ini settings to give me a 'current' 
group of php.ini settings.


What I'm looking to find out is does an ini setting established in a 
test subdomain of my site affect those ini settings outside of my test 
subdomain?


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



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




Re: [PHP] php.ini setting

2011-10-01 Thread Jim Giner
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.



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



Re: [PHP] php.ini setting

2011-10-01 Thread Jim Giner

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

http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php.ini setting

2011-10-01 Thread Mike Mackintosh

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);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php.ini setting

2011-10-01 Thread Ashley Sheridan
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




Re: [PHP] php.ini setting

2011-10-01 Thread Jim Giner

"Stephen"  wrote in message 
news:4e874606.2030...@rogers.com...
>>
> http://php.net/manual/en/security.magicquotes.disabling.php
>
> Stephen

That tells me nothing new. 



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



Re: [PHP] php.ini setting

2011-10-01 Thread Stephen

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

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



[PHP] php.ini setting

2011-10-01 Thread Jim Giner
I'm trying to set magic quotes Off as my reading tells me that it's not good 
to have it defaulted to On.

My ISP has this setting (from PHPINFO call):

magic_quotes_gpc on

>From reading the php.net manual I found this line

php_flag magic_quotes_gpc on

which it says to place in the .htaccess file.

I downloaded that file from my server's public_html folder, edited it to put 
in the above line (which now says "Off") and re-uploaded it.  Boom! My 
server no longer works - I get "Internal Server Error" "The server 
encountered an internal error or misconfiguration."

If I re-edit my .htaccess, remove the line and re-upload, everything works 
fine.

So - what am I mis-interpreting about how to accomplish this task? 



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



[PHP] php.ini session_auto.start = 1

2009-12-04 Thread scotdiddle
Hello All,

In my previous LAMP position, I developed an intranet system from
scratch, and chose to use session_auto.start = 1 for sessions.

My new employer has auto-start turned off, and I have been tasked with
re-writing the entire system.  I would like to use auto-start, but
during testing I found a couple of system calls that don't work if the
session has " already been started ".

I there a resource somewhere out in google-land which will show me a
list of system functions don't play nice session_auto.start = 1 ?

Also, what are the thoughts of the folks on this list about using the
auto-start setting ?

Any advice / direction will be appreciated.

Scot L. Diddle, Richmond VA








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



[PHP] php.ini session_auto.start = 1

2009-12-04 Thread scotdiddle
Hello All,

In my previous LAMP position, I developed an intranet system from
scratch, and chose to use session_auto.start = 1 for sessions.

My new employer has auto-start turned off, and I have been tasked with
re-writing the entire system.  I would like to use auto-start, but
during testing I found a couple of system calls that don't work if the
session has " already been started ".

I there a resource somewhere out in google-land which will show me a
list of system functions don't play nice session_auto.start = 1 ?

Also, what are the thoughts of the folks on this list about using the
auto-start setting ?

Any advice / direction will be appreciated.

Scot L. Diddle, Richmond VA








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



[PHP] php.ini session_auto.start = 1

2009-12-04 Thread scotdiddle
Hello All,

In my previous LAMP position, I developed an intranet system from
scratch, and chose to use session_auto.start = 1 for sessions.

My new employer has auto-start turned off, and I have been tasked with
re-writing the entire system.  I would like to use auto-start, but
during testing I found a couple of system calls that don't work if the
session has " already been started ".

I there a resource somewhere out in google-land which will show me a
list of system functions don't play nice session_auto.start = 1 ?

Also, what are the thoughts of the folks on this list about using the
auto-start setting ?

Any advice / direction will be appreciated.

Scot L. Diddle, Richmonc VA








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



Re: [PHP] php.ini in cgi vs php.ini in cli

2009-09-15 Thread Lars Torben Wilson
On Tue, 15 Sep 2009 10:11:56 -0400
Andres Gonzalez  wrote:

> Lars,
> 
> Thank you for your response. The function that raised this error is
> from my own
> extension module. I was not aware of phpinfo() and your suggestion to 
> run it helped
> me resolve this issue. Turns out my CGI version is NOT using
> cgi/php.ini but is using
> apache2/php.ini instead.
> 
> Thanks again for your help--you deserve a raise. :-)
> 
> -Andres

Hi Andres,

Glad it worked! 


Regards,

Torben

> Lars Torben Wilson wrote:
> > On Mon, 14 Sep 2009 18:21:11 -0400
> > Andres Gonzalez  wrote:
> >
> >   
> >> In the php configurations directories /etc/php5, there are 2 
> >> subdirectories, one for
> >> cgi and one for cli.  There is a php.ini file in each of these
> >> directories.
> >>
> >> What would cause a difference of behavior in these 2 environments
> >> with the php.ini
> >> exactly the same in each directory??
> >>
> >> I have a command line script that consequently uses the cli
> >> version. This script works
> >> just fine in that it can access API function in modules that are
> >> loaded via cli/php.ini
> >>
> >> However, when executing in the cgi environment, I get a "call to 
> >> undefined function" error
> >> even though my 2 php.ini files are exactly the same.
> >>
> >> Any idea what is causing this?
> >>
> >> thanks,
> >>
> >> -Andres
> >>
> >> 
> >
> > Hi Andres,
> >
> > When asking this kind of question, it would be very helpful if you
> > would tell us *which* function raised this error.
> >
> > My first thought is that you tried to call a function which was
> > compiled in to the CLI version but not the CGI. What does phpinfo()
> > show when run under each?
> >
> >
> > Torben
> >
> >   


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



Re: [PHP] php.ini in cgi vs php.ini in cli

2009-09-15 Thread Andres Gonzalez

Lars,

Thank you for your response. The function that raised this error is from 
my own
extension module. I was not aware of phpinfo() and your suggestion to 
run it helped
me resolve this issue. Turns out my CGI version is NOT using cgi/php.ini 
but is using

apache2/php.ini instead.

Thanks again for your help--you deserve a raise. :-)

-Andres





Lars Torben Wilson wrote:

On Mon, 14 Sep 2009 18:21:11 -0400
Andres Gonzalez  wrote:

  
In the php configurations directories /etc/php5, there are 2 
subdirectories, one for

cgi and one for cli.  There is a php.ini file in each of these
directories.

What would cause a difference of behavior in these 2 environments
with the php.ini
exactly the same in each directory??

I have a command line script that consequently uses the cli version. 
This script works

just fine in that it can access API function in modules that are
loaded via cli/php.ini

However, when executing in the cgi environment, I get a "call to 
undefined function" error

even though my 2 php.ini files are exactly the same.

Any idea what is causing this?

thanks,

-Andres




Hi Andres,

When asking this kind of question, it would be very helpful if you
would tell us *which* function raised this error.

My first thought is that you tried to call a function which was
compiled in to the CLI version but not the CGI. What does phpinfo()
show when run under each?


Torben

  


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



Re: [PHP] php.ini in cgi vs php.ini in cli

2009-09-14 Thread Lars Torben Wilson
On Mon, 14 Sep 2009 18:21:11 -0400
Andres Gonzalez  wrote:

> In the php configurations directories /etc/php5, there are 2 
> subdirectories, one for
> cgi and one for cli.  There is a php.ini file in each of these
> directories.
> 
> What would cause a difference of behavior in these 2 environments
> with the php.ini
> exactly the same in each directory??
> 
> I have a command line script that consequently uses the cli version. 
> This script works
> just fine in that it can access API function in modules that are
> loaded via cli/php.ini
> 
> However, when executing in the cgi environment, I get a "call to 
> undefined function" error
> even though my 2 php.ini files are exactly the same.
> 
> Any idea what is causing this?
> 
> thanks,
> 
> -Andres
> 

Hi Andres,

When asking this kind of question, it would be very helpful if you
would tell us *which* function raised this error.

My first thought is that you tried to call a function which was
compiled in to the CLI version but not the CGI. What does phpinfo()
show when run under each?


Torben

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



[PHP] php.ini in cgi vs php.ini in cli

2009-09-14 Thread Andres Gonzalez
In the php configurations directories /etc/php5, there are 2 
subdirectories, one for

cgi and one for cli.  There is a php.ini file in each of these directories.

What would cause a difference of behavior in these 2 environments with 
the php.ini

exactly the same in each directory??

I have a command line script that consequently uses the cli version. 
This script works
just fine in that it can access API function in modules that are loaded 
via cli/php.ini


However, when executing in the cgi environment, I get a "call to 
undefined function" error

even though my 2 php.ini files are exactly the same.

Any idea what is causing this?

thanks,

-Andres

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



Re: [PHP] php.ini and cli

2009-07-13 Thread Ashley Sheridan
On Monday 13 July 2009 10:07:24 Stuart wrote:
> 2009/7/13 Ashley Sheridan :
> > Just a quick question. When I make changes in the php.ini, to take
> > effect, I need to restart the Apache (or other web server) service. What
> > happens with PHP CLI? Is the php.ini parsed each time the script is
> > called, or is there something specific which needs resetting? The machine
> > that the PHP CLI is running on is a Windows machine with no web server.
>
> The php.ini file is read whenever a PHP process is started, so in the
> case of the CLI binary that's whenever it's run from the command line.
> Long-running scripts will need to be restarted for them to see any
> changes.
>
> -Stuart
>
> --
> http://stut.net/

Cool. The script I'm running is just scanning a directory structure for new 
files, so it's not a long-running one. I just needed to add some email 
functionality to it, and had to make some SMTP changes in the php.ini.

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

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



Re: [PHP] php.ini and cli

2009-07-13 Thread Stuart
2009/7/13 Ashley Sheridan :
> Just a quick question. When I make changes in the php.ini, to take effect, I
> need to restart the Apache (or other web server) service. What happens with
> PHP CLI? Is the php.ini parsed each time the script is called, or is there
> something specific which needs resetting? The machine that the PHP CLI is
> running on is a Windows machine with no web server.

The php.ini file is read whenever a PHP process is started, so in the
case of the CLI binary that's whenever it's run from the command line.
Long-running scripts will need to be restarted for them to see any
changes.

-Stuart

-- 
http://stut.net/

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



Re: [PHP] php.ini and cli

2009-07-13 Thread Eddie Drapkin
On Mon, Jul 13, 2009 at 4:48 AM, Ashley
Sheridan wrote:
> Hi All,
>
> Just a quick question. When I make changes in the php.ini, to take effect, I
> need to restart the Apache (or other web server) service. What happens with
> PHP CLI? Is the php.ini parsed each time the script is called, or is there
> something specific which needs resetting? The machine that the PHP CLI is
> running on is a Windows machine with no web server.
> --
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


The CLI binary reads and parses php.ini on every initialization.

Try something like


And then set error_reporting (in php.ini) to E_ALL and see your
warning, then set it to 0 and see nothing.

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



[PHP] php.ini and cli

2009-07-13 Thread Ashley Sheridan
Hi All,

Just a quick question. When I make changes in the php.ini, to take effect, I 
need to restart the Apache (or other web server) service. What happens with 
PHP CLI? Is the php.ini parsed each time the script is called, or is there 
something specific which needs resetting? The machine that the PHP CLI is 
running on is a Windows machine with no web server.
-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk

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



Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread J.P. Trosclair

Govinda wrote:

[PHP] best way to properly build an include path*regardless*


Thanks, appreciated.

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



Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 17:28, Govinda wrote:
>
> yes, look for posts with this subject line:
> Re: [PHP] best way to properly build an include path *regardless*  from
> where I am calling the include?
>
> (just don't ask me to explain everything that those good souls were trying
> to teach me in those posts..   I assimilated some of it.  ;-)

Found here, with previous posts in the thread being linked from
that page as "References":

http://news.php.net/php.general/294985

Politeness should be rewarded, at the very least, with a link.  ;-P

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig

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



Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread Govinda

On Jul 10, 2009, at 3:16 PM, Daniel Brown wrote:


On Fri, Jul 10, 2009 at 16:56, J.P.
Trosclair wrote:
I'm wondering if there is a way to dynamically set the absolute  
path of an
include directory based on the document root of the site via  
htaccess or
some other method other than in the scripts themselves within the  
site.


   Please check the archives and Google before posting here.  This
exact question was just discussed and answered within the last seven
days.  I don't recall the name of the thread (perhaps someone else
could name it for me), but I believe the original poster was Govinda.


yes, look for posts with this subject line:
Re: [PHP] best way to properly build an include path *regardless*   
from where I am calling the include?


(just don't ask me to explain everything that those good souls were  
trying to teach me in those posts..   I assimilated some of it.  ;-)


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



Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 17:24, J.P.
Trosclair wrote:
>
> I've spent the better part of this afternoon looking through google and the
> archives for different variations on terminology before resorting to
> subscribing and posting to this list. Will go back to digging based on your
> suggestion. Thanks for your time and sorry if I've caused any problems.

No problem at all, J.P., and my apologies if I came across with a
"tone" (in writing) to make you think it was.

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig

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



Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread J.P. Trosclair

Daniel Brown wrote:

 Please check the archives and Google before posting here.  This
exact question was just discussed and answered within the last seven
days.  I don't recall the name of the thread (perhaps someone else
could name it for me), but I believe the original poster was Govinda.



I've spent the better part of this afternoon looking through google and 
the archives for different variations on terminology before resorting to 
subscribing and posting to this list. Will go back to digging based on 
your suggestion. Thanks for your time and sorry if I've caused any problems.



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



Re: [PHP] php.ini directive include_path variables

2009-07-10 Thread Daniel Brown
On Fri, Jul 10, 2009 at 16:56, J.P.
Trosclair wrote:
> I'm wondering if there is a way to dynamically set the absolute path of an
> include directory based on the document root of the site via htaccess or
> some other method other than in the scripts themselves within the site.

Please check the archives and Google before posting here.  This
exact question was just discussed and answered within the last seven
days.  I don't recall the name of the thread (perhaps someone else
could name it for me), but I believe the original poster was Govinda.

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig

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



[PHP] php.ini directive include_path variables

2009-07-10 Thread J.P. Trosclair
I'm wondering if there is a way to dynamically set the absolute path of 
an include directory based on the document root of the site via htaccess 
or some other method other than in the scripts themselves within the site.


Example of what I'm looking for:

$doc_root/.htaccess:
php_value include_path "$_SERVER['DOCUMENT_ROOT']/include"

I have a live site and a development site both hosted on 2 entirely 
different systems. The issue stems because the path to the code base for 
each site is not the same. The problem I'm trying to solve is to not 
have to modify the include path settings when pushing revisions from the 
development system to upstream, in other words, I'd like for the code 
base to be a drop in replacement which is why I'm defining php settings 
via htaccess rather than php.ini to begin with.


I'm not setting include paths in scripts because the vast majority of 
the classes in the include directory depend on other classes and include 
said classes directly in their code. This breaks scripts deep in the 
directory tree without using an absolute path. I suppose one option 
(that I'm trying to avoid) is to modify the scripts to use:


require_once($_SERVER['DOCUMENT_ROOT']."include/foobar.inc.php");

Thanks

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



Re: [PHP] php.ini not loaded?

2009-02-12 Thread Jan G.B.
2009/2/11 brian :
>
> hi nathan thanks for the response...
>
> looks like the rx is where it should be.


That doesn't sound like you're cocksure - check it again:

ls -ld /apps /apps/local /apps/local/php5 /apps/local/php5/lib
/apps/local/php5/lib/php.ini

Everything readable (r-x) *for the www-daemon-user*?

Regards, Jan


>> you may also need to check the perms on /apps/local/php5 to ensure the
>> webserver user has rx on that dir as well.
>>
>> -nathan
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] php.ini not loaded?

2009-02-11 Thread brian

hi nathan thanks for the response...

it's webserver.  so the phpinfo() result in the browser should be accurate.

looks like the rx is where it should be.



Nathan Nobbe wrote:
> On Wed, Feb 11, 2009 at 9:54 AM, brian  > wrote:
>
>
> with php.ini in /apps/local/php5/lib, readable by all:
>
> phpinfo says : "configuration file path /apps/local/php5/lib"
> phpinfo also says: "loaded configuration file: (none)"
>
>  so i'm not getting anything from php.ini.
>
> can someone point me at the fix for this problem?
>
>
> webserver or cli?  if cli, take a peak at
>
> php --ini
>
> also, /apps/local/php5/lib should have rx for the webserver user.
>
> you may also need to check the perms on /apps/local/php5 to ensure the
> webserver user has rx on that dir as well.
>
> -nathan
>


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



Re: [PHP] php.ini not loaded?

2009-02-11 Thread Nathan Nobbe
On Wed, Feb 11, 2009 at 9:54 AM, brian  wrote:

>
> with php.ini in /apps/local/php5/lib, readable by all:
>
> phpinfo says : "configuration file path /apps/local/php5/lib"
> phpinfo also says: "loaded configuration file: (none)"
>
>  so i'm not getting anything from php.ini.
>
> can someone point me at the fix for this problem?


webserver or cli?  if cli, take a peak at

php --ini

also, /apps/local/php5/lib should have rx for the webserver user.

you may also need to check the perms on /apps/local/php5 to ensure the
webserver user has rx on that dir as well.

-nathan


[PHP] php.ini not loaded?

2009-02-11 Thread brian

with php.ini in /apps/local/php5/lib, readable by all:

phpinfo says : "configuration file path /apps/local/php5/lib"
phpinfo also says: "loaded configuration file: (none)"

 so i'm not getting anything from php.ini.  

can someone point me at the fix for this problem?

thanks in advance
b


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



Re: [PHP] php.ini

2009-01-14 Thread Stuart
2009/1/14 Thodoris :
>
>> hi php lovers,
>>
>> I have a debian lamp stack and I want to use php to send a form to my
>> email server
>
> Do you mean that you need to send a mail directly from a web form?
>
> If that is the case check this out:
>
> http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_mail
>
> Doesn't even need php.

But it does require the user to have an email client set up which is
not necessarily the case.

>> that is on the same network. Someone suggested to me why don't i use
>> php.ini mail function.
>> But it says in the php.ini file for  win 32 only.
>
> What did you find in php.ini that works only for windowz?

The SMTP host only works on Windows.

>> Does anyone know how I  can get php to direct my forms request across the
>> network
>> to  the email server?
>
> I am not sure what you mean by that...

They mean not using sendmail but instead talking SMTP with a remote mail server.

I believe PHPMailer supports this - check it out...
http://phpmailer.codeworxtech.com/

-Stuart

-- 
http://stut.net/

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



Re: [PHP] php.ini

2009-01-14 Thread Thodoris



hi php lovers,

I have a debian lamp stack and I want to use php to send a form to my 
email server


Do you mean that you need to send a mail directly from a web form?

If that is the case check this out:

http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_mail

Doesn't even need php.

that is on the same network. Someone suggested to me why don't i use 
php.ini mail function.

But it says in the php.ini file for  win 32 only.


What did you find in php.ini that works only for windowz?



Does anyone know how I  can get php to direct my forms request across 
the network

to  the email server?


I am not sure what you mean by that...



gishaust



--
Thodoris


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



[PHP] php.ini

2009-01-13 Thread gishaust

hi php lovers,

I have a debian lamp stack and I want to use php to send a form to my 
email server
that is on the same network. Someone suggested to me why don't i use 
php.ini mail function.

But it says in the php.ini file for  win 32 only.

Does anyone know how I  can get php to direct my forms request across 
the network

to  the email server?

gishaust

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



Re: [PHP] php.ini and pgsql extension issue

2008-08-07 Thread emassip

Got same problem exactly today w/ 5.2.6 with zip archive.

Note that there has been many changes w/ pgsql extension in 5.2.6.

It seems that extension file is corrupted, or that my piece of software
(izarc) don't deal correctly with it. Looks also like daily snapshots of
5.2.6 are corrupted too.

5.3 php_pgsql.dll is abaut 102k.

Etienne Massip


Alain Roger wrote:
> 
> Hi,
> 
> i found and solved an interesting issue under PHP 5.2.6.
> 
> when i use the standard installation file under windows XP
> (php-5.2.6-win32-installer.msi), i get several error message in apache
> error.log file, something like :
> PHP Warning:  PHP Startup: Unable to load dynamic library
> 'D:\\webserver\\PHP\\ext\\php_mssql.dll' - The specified module could not
> be
> found.\r\n in Unknown on line 0
> 
> and this for several extensions even if the files are correctly installed
> in
> the right folder.
> I took a previous version of PHP 5.2.3 extension (dll) and i compare the
> size:
> in PHP 5.2.6, php_pgsql.dll is 96 kb whereas it is 164 kb under PHP 5.2.3.
> 
> so i just replace the 96 kb file by the 164 kb and restart apache 2.2.8.
> now
> it works perfectly.
> i reproduced the same thing for all dynamic extensions which were
> generating
> the same issue and all works.
> 
> it could be interesting that developers of PHP take an eye on it.
> 
> -- 
> Alain
> 
> Windows XP SP2
> PostgreSQL 8.2.4 / MS SQL server 2005
> Apache 2.2.4
> PHP 5.2.4
> C# 2005-2008
> 
> 

-- 
View this message in context: 
http://www.nabble.com/php.ini-and-pgsql-extension-issue-tp18799813p18869371.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



[PHP] php.ini and pgsql extension issue

2008-08-03 Thread Alain Roger
Hi,

i found and solved an interesting issue under PHP 5.2.6.

when i use the standard installation file under windows XP
(php-5.2.6-win32-installer.msi), i get several error message in apache
error.log file, something like :
PHP Warning:  PHP Startup: Unable to load dynamic library
'D:\\webserver\\PHP\\ext\\php_mssql.dll' - The specified module could not be
found.\r\n in Unknown on line 0

and this for several extensions even if the files are correctly installed in
the right folder.
I took a previous version of PHP 5.2.3 extension (dll) and i compare the
size:
in PHP 5.2.6, php_pgsql.dll is 96 kb whereas it is 164 kb under PHP 5.2.3.

so i just replace the 96 kb file by the 164 kb and restart apache 2.2.8. now
it works perfectly.
i reproduced the same thing for all dynamic extensions which were generating
the same issue and all works.

it could be interesting that developers of PHP take an eye on it.

-- 
Alain

Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Re: [PHP] php.ini and command line

2008-06-23 Thread Wolf

 Marten Lehmann <[EMAIL PROTECTED]> wrote: 
> Hello,
> 
> within a CGI-wrapped hosting environment, we are calling PHP as command 
> line interpreter (not cli). This works fine, except one thing: Settings 
> from parent php.inis are not inherited. This is very annoying. Lets say, 
> there is a script /user/123/index.php and some libraries in 
> /user/123/include/*.php, then settings from /user/123/php.ini are not 
> available for /user/123/include/*.php, even if the environment-variable 
> DOCUMENT_ROOT is set to /user, so PHP would be able to look for settings 
> in php.ini beginning in /user and ending in the current directory 
> /user/123 or /user/123/include.
> 
> Why does PHP work different here in the command line mode as in the 
> Apache-Module mode?
> 
> Is there a way to enable php.ini-inheritance for command line PHP?
> 
> Regards
> Marten
> 

Also, if you do use Google and search, the first answer it comes back with is 
this link:
http://bugs.php.net/bug.php?id=44526&edit=1

So, just wondering here, what searches did you run?  
http://www.google.com/search?hl=en&client=firefox-a&rls=com.ubuntu%3Aen-US%3Aunofficial&hs=jaC&q=PHP%3A+php.ini+inheritance++cli&btnG=Search

Wolf

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



Re: [PHP] php.ini and command line

2008-06-23 Thread Wolf

 Marten Lehmann <[EMAIL PROTECTED]> wrote: 
> Hello,
> 
> within a CGI-wrapped hosting environment, we are calling PHP as command 
> line interpreter (not cli). This works fine, except one thing: Settings 
> from parent php.inis are not inherited. This is very annoying. Lets say, 
> there is a script /user/123/index.php and some libraries in 
> /user/123/include/*.php, then settings from /user/123/php.ini are not 
> available for /user/123/include/*.php, even if the environment-variable 
> DOCUMENT_ROOT is set to /user, so PHP would be able to look for settings 
> in php.ini beginning in /user and ending in the current directory 
> /user/123 or /user/123/include.
> 
> Why does PHP work different here in the command line mode as in the 
> Apache-Module mode?
> 
> Is there a way to enable php.ini-inheritance for command line PHP?
> 
> Regards
> Marten

Have you tried modifying your command line php calls with a -c as some of the 
documentation states?

What have you tried (direct calls) and what has the output been?

What do your error logs say?

HTH,
Wolf

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



[PHP] php.ini and command line

2008-06-23 Thread Marten Lehmann

Hello,

within a CGI-wrapped hosting environment, we are calling PHP as command 
line interpreter (not cli). This works fine, except one thing: Settings 
from parent php.inis are not inherited. This is very annoying. Lets say, 
there is a script /user/123/index.php and some libraries in 
/user/123/include/*.php, then settings from /user/123/php.ini are not 
available for /user/123/include/*.php, even if the environment-variable 
DOCUMENT_ROOT is set to /user, so PHP would be able to look for settings 
in php.ini beginning in /user and ending in the current directory 
/user/123 or /user/123/include.


Why does PHP work different here in the command line mode as in the 
Apache-Module mode?


Is there a way to enable php.ini-inheritance for command line PHP?

Regards
Marten

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



Fwd: [PHP] php.ini

2008-05-09 Thread Nathan Nobbe
bouncing back to the list..

-- Forwarded message --
From: Michael Satterwhite <[EMAIL PROTECTED]>
Date: Fri, May 9, 2008 at 3:09 PM
Subject: Re: [PHP] php.ini
To: Nathan Nobbe <[EMAIL PROTECTED]>


On Friday 09 May 2008 13:43:27 you wrote:
> On Fri, May 9, 2008 at 12:02 PM, Michael Satterwhite <[EMAIL PROTECTED]>
>
> wrote:
> > I do know that on bluehost, they actually encourage people to use their
> > own php.ini file in their web directory ... and users certainly don't
> > have the authority to restart apache.
> >
> > That said - just for grins, I *DID* restart apache2. It made no
> > difference.
>
> (from before) /etc/php5/apache2 is a centralized directory; i surprised
you
> even have access to it on a shared host.  do you have your own instance of
> linux?  either way i sincerely doubt thats the web directory.  i would try
> putting a .htaccess file in your web root.

I never said it was the web directory ... I said that's where php.ini is
being
loaded from. The web directory is /var/www ... that's where the php.ini I
*WANT* loaded is. ...and, yes, I have my own Linux machine that I use for
testing.
> php_flag magic_quotes_gpc = Off
>
> when you look at the output of phpinfo() there will be 2 columns.  one has
> the heading 'master value'  the other has the heading 'local value'  is
the
> local value different than the master value?  it should be if the
.htaccess
> file is working correctly (though you many not have permission to use them
> [but it is typical to allow php configuration via .htaccess on shared
> hosts]).

I've tried that now, and it does work. I was trying to do it through a local
php.ini because I know that's the way bluehost makes us do it, and there are
several websites that document it as a working manner.

I do thank everyone for their help with this.


Re: [PHP] php.ini

2008-05-09 Thread Janet Valade

Nathan Nobbe wrote:

On Fri, May 9, 2008 at 12:02 PM, Michael Satterwhite <[EMAIL PROTECTED]>
wrote:

  

I do know that on bluehost, they actually encourage people to use their own
php.ini file in their web directory ... and users certainly don't have the
authority to restart apache.

That said - just for grins, I *DID* restart apache2. It made no difference.

Some web hosts allow you have have your own local php.ini. You just 
create an empty php.ini file in your main web directory. After you do 
that, the loaded configuration file shown in the output from phpinfo() 
will show the path to the local php.ini file. Then, just put the 
specific directive in there, such as:


magic_quotes_gpc = Off

This works on some hosts.

Janet

--

janet.valade.com


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



Re: [PHP] php.ini

2008-05-09 Thread Nathan Nobbe
On Fri, May 9, 2008 at 12:02 PM, Michael Satterwhite <[EMAIL PROTECTED]>
wrote:

> I do know that on bluehost, they actually encourage people to use their own
> php.ini file in their web directory ... and users certainly don't have the
> authority to restart apache.
>
> That said - just for grins, I *DID* restart apache2. It made no difference.


(from before) /etc/php5/apache2 is a centralized directory; i surprised you
even have access to it on a shared host.  do you have your own instance of
linux?  either way i sincerely doubt thats the web directory.  i would try
putting a .htaccess file in your web root.

php_flag magic_quotes_gpc = Off

when you look at the output of phpinfo() there will be 2 columns.  one has
the heading 'master value'  the other has the heading 'local value'  is the
local value different than the master value?  it should be if the .htaccess
file is working correctly (though you many not have permission to use them
[but it is typical to allow php configuration via .htaccess on shared
hosts]).

-nathan


Re: [PHP] php.ini

2008-05-09 Thread Michael Satterwhite
On Friday 09 May 2008 11:59:25 Wolf wrote:

> When making changes to Apache configuration read files, you have to RESTART
> APACHE before those changes take effect.
>
> However you can use php's ini_set () function to set a number of settings
> on the fly that can be changed per page change.

As this is (should be) being read from the user directory containing the 
application instead of the global configuration file, I'd expect it to behave 
more like the .htaccess file. The use of .htaccess to override apache 
configurations doesn't require an apache restart.

I do know that on bluehost, they actually encourage people to use their own 
php.ini file in their web directory ... and users certainly don't have the 
authority to restart apache.

That said - just for grins, I *DID* restart apache2. It made no difference.

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



Re: RES: [PHP] php.ini

2008-05-09 Thread Michael Satterwhite
On Friday 09 May 2008 11:56:32 Thiago Pojda wrote:
> phpinfo() should also tell you what php.ini is loaded.
>
> Did you check that?

I hadn't thought to, but I just did. As expected, it's reading it 
from /etc/php5/apache2.


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



Re: [PHP] php.ini

2008-05-09 Thread Adam Richardson
And, at some hosts you have to change the settings in htaccess as opposed to
php.ini.

On Fri, May 9, 2008 at 12:53 PM, André Medeiros <[EMAIL PROTECTED]>
wrote:

> I'm not sure PHP5 would read php.ini from that directory.
>
> You should take in account that your hosting company may _NOT_ allow
> you to change certain parameters. That said, try visiting
> http://us2.php.net/configuration.changes and see how that works for
> you.
>
> Good luck
>
> On Fri, May 9, 2008 at 4:47 PM, Michael Satterwhite <[EMAIL PROTECTED]>
> wrote:
> > I'm trying to turn off magic quotes for a site. I've copied the php.ini
> > from /etc/php5/apache2 to the web site directory. In this file, I've
> changed
> > magic_quotes_gpc to read
> >magic_quotes.gpc = Off
> >
> > When I run phpinfo() from this directory, it still shows magic quotes as
> being
> > on. I'm guessing there is another configuration parameter (either in the
> > Apache configuration or for php) that allows this to be processed. Would
> > someone be so kind as to help me here; I admit ignorance.
> >
> > ---Michael
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] php.ini

2008-05-09 Thread Wolf

 Michael Satterwhite <[EMAIL PROTECTED]> wrote: 
> I'm trying to turn off magic quotes for a site. I've copied the php.ini 
> from /etc/php5/apache2 to the web site directory. In this file, I've changed 
> magic_quotes_gpc to read
>   magic_quotes.gpc = Off
> 
> When I run phpinfo() from this directory, it still shows magic quotes as 
> being 
> on. I'm guessing there is another configuration parameter (either in the 
> Apache configuration or for php) that allows this to be processed. Would 
> someone be so kind as to help me here; I admit ignorance. 
> 
> ---Michael
'

When making changes to Apache configuration read files, you have to RESTART 
APACHE before those changes take effect.

However you can use php's ini_set () function to set a number of settings on 
the fly that can be changed per page change.

HTH,
Wolf

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



Re: [PHP] php.ini (typo in previous)

2008-05-09 Thread Michael Satterwhite
There was a typo in my previous message asking the question. I typed a "." 
instead of "_". It's corrected below:

On Friday 09 May 2008 11:47:29 Michael Satterwhite wrote:
> I'm trying to turn off magic quotes for a site. I've copied the php.ini
> from /etc/php5/apache2 to the web site directory. In this file, I've
> changed magic_quotes_gpc to read
>   magic_quotes_gpc = Off
>
> When I run phpinfo() from this directory, it still shows magic quotes as
> being on. I'm guessing there is another configuration parameter (either in
> the Apache configuration or for php) that allows this to be processed.
> Would someone be so kind as to help me here; I admit ignorance.
>
> ---Michael



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



Re: [PHP] php.ini

2008-05-09 Thread André Medeiros
I'm not sure PHP5 would read php.ini from that directory.

You should take in account that your hosting company may _NOT_ allow
you to change certain parameters. That said, try visiting
http://us2.php.net/configuration.changes and see how that works for
you.

Good luck

On Fri, May 9, 2008 at 4:47 PM, Michael Satterwhite <[EMAIL PROTECTED]> wrote:
> I'm trying to turn off magic quotes for a site. I've copied the php.ini
> from /etc/php5/apache2 to the web site directory. In this file, I've changed
> magic_quotes_gpc to read
>magic_quotes.gpc = Off
>
> When I run phpinfo() from this directory, it still shows magic quotes as being
> on. I'm guessing there is another configuration parameter (either in the
> Apache configuration or for php) that allows this to be processed. Would
> someone be so kind as to help me here; I admit ignorance.
>
> ---Michael
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RES: [PHP] php.ini

2008-05-09 Thread Thiago Pojda
phpinfo() should also tell you what php.ini is loaded. 

Did you check that?


Atenciosamente,

www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Michael Satterwhite [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 9 de maio de 2008 13:47
Para: php-general@lists.php.net
Assunto: [PHP] php.ini

I'm trying to turn off magic quotes for a site. I've copied the php.ini 
from /etc/php5/apache2 to the web site directory. In this file, I've changed

magic_quotes_gpc to read
magic_quotes.gpc = Off

When I run phpinfo() from this directory, it still shows magic quotes as
being 
on. I'm guessing there is another configuration parameter (either in the 
Apache configuration or for php) that allows this to be processed. Would 
someone be so kind as to help me here; I admit ignorance. 

---Michael

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





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



[PHP] php.ini

2008-05-09 Thread Michael Satterwhite
I'm trying to turn off magic quotes for a site. I've copied the php.ini 
from /etc/php5/apache2 to the web site directory. In this file, I've changed 
magic_quotes_gpc to read
magic_quotes.gpc = Off

When I run phpinfo() from this directory, it still shows magic quotes as being 
on. I'm guessing there is another configuration parameter (either in the 
Apache configuration or for php) that allows this to be processed. Would 
someone be so kind as to help me here; I admit ignorance. 

---Michael

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



Re: [PHP] php.ini in php5.2.1

2007-12-30 Thread Richard Lynch
make install should install one, but may be putting it in some place
that it's not expected.

If you are using some kind of package manager like apt-get or RedHat
rpms or whatever, you are in duck soup for where some package-maker
THINKS they should put the php.ini file, and where their binary
actually looks for it...

You can always just COPY the php.ini-dist file to where phpinfo() says
it should be and then edit it.

If PHP cannot find the file, it just uses all the defaults, so it's no
real shock that there's nothing there.

On Sat, December 29, 2007 12:23 am, jekillen wrote:
> Hello;
> I have not had the necessity to deal with php.ini files for some time.
> Now, because I switch from Sendmail to Postfix on one system I
> need to adjust the sendmail path variable. I cannot find a php.ini
> file
> in the specified location. That is not a problem because I can use
> ini_set(). What is puzzling is that my system,
> I built and installed from source on a number of different systems and
> seem to remember that the process creates a php.ini file. Maybe I have
> it wrong but in the past I seem to remember being able to find one to
> make sure register variables was set to off. (or maybe I ignored it
> because
> that is the default now). So, is the fact that this file is missing
> something
> I should be concerned about?
> PS; I have subscribed to the php-install list and get not responses to
> my posts, or e-mails my ISP says contain viruses, possibly from a user
> who requested I contact him (of her) off list.
> Thanks
> Jeff K
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php.ini in php5.2.1

2007-12-29 Thread jekillen


On Dec 28, 2007, at 10:40 PM, Jochem Maas wrote:


jekillen schreef:

Hello;
I have not had the necessity to deal with php.ini files for some time.
Now, because I switch from Sendmail to Postfix on one system I
need to adjust the sendmail path variable.


are you sure you need to change it? doesn't postfix come with some 
kind of
compatibility wrapper [script] that takes the place of sendmail itself 
...

IIRC most MTAs are sendmail compatible in that way.


I cannot find a php.ini file
in the specified location. That is not a problem because I can use
ini_set(). What is puzzling is that my system,
I built and installed from source on a number of different systems and
seem to remember that the process creates a php.ini file. Maybe I have
it wrong but in the past I seem to remember being able to find one to
make sure register variables was set to off. (or maybe I ignored it 
because

that is the default now). So, is the fact that this file is missing
something
I should be concerned about?


php uses it's defaults if it can't load an .ini file - the only concern
is whether this bothers you.

note that you can also set .ini settings via webserver configurations 
files

(e.g. in apache's httpd.conf or .htaccess files)



No, it does not bother me accept if I should have had a file created by 
the install.
I can create on with all the values I want to change, right? I have 
been looking
at my copy of the manual. Postfix sendmail path is different than 
default sendmail
path in php (at least on my system) and does not use options to invoke 
it.
This is to send a confirmation message to an address entered into a 
registration from.

Thanks for your reply.
Jeff K

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



Re: [PHP] php.ini in php5.2.1

2007-12-28 Thread Jochem Maas
jekillen schreef:
> Hello;
> I have not had the necessity to deal with php.ini files for some time.
> Now, because I switch from Sendmail to Postfix on one system I
> need to adjust the sendmail path variable. 

are you sure you need to change it? doesn't postfix come with some kind of
compatibility wrapper [script] that takes the place of sendmail itself ...
IIRC most MTAs are sendmail compatible in that way.

> I cannot find a php.ini file
> in the specified location. That is not a problem because I can use
> ini_set(). What is puzzling is that my system,
> I built and installed from source on a number of different systems and
> seem to remember that the process creates a php.ini file. Maybe I have
> it wrong but in the past I seem to remember being able to find one to
> make sure register variables was set to off. (or maybe I ignored it because
> that is the default now). So, is the fact that this file is missing
> something
> I should be concerned about?

php uses it's defaults if it can't load an .ini file - the only concern
is whether this bothers you.

note that you can also set .ini settings via webserver configurations files
(e.g. in apache's httpd.conf or .htaccess files)

> PS; I have subscribed to the php-install list and get not responses to
> my posts, or e-mails my ISP says contain viruses, possibly from a user
> who requested I contact him (of her) off list.
> Thanks
> Jeff K
> 

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



[PHP] php.ini in php5.2.1

2007-12-28 Thread jekillen

Hello;
I have not had the necessity to deal with php.ini files for some time.
Now, because I switch from Sendmail to Postfix on one system I
need to adjust the sendmail path variable. I cannot find a php.ini file
in the specified location. That is not a problem because I can use
ini_set(). What is puzzling is that my system,
I built and installed from source on a number of different systems and
seem to remember that the process creates a php.ini file. Maybe I have
it wrong but in the past I seem to remember being able to find one to
make sure register variables was set to off. (or maybe I ignored it 
because
that is the default now). So, is the fact that this file is missing 
something

I should be concerned about?
PS; I have subscribed to the php-install list and get not responses to
my posts, or e-mails my ISP says contain viruses, possibly from a user
who requested I contact him (of her) off list.
Thanks
Jeff K

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



Re: [PHP] php.ini include_path and symlinks

2007-11-07 Thread Ravi Menon
>
> Are you using a compile cache like eaccelerator or APC etc? Sometimes
> it's the cache that doesn't realize things have changed. I use a symlink
> switcher for version releases also and I always flush the eaccelerator
> directory when I do that.
Yes we use APC ( with apc.stat on ). This was the case even before we introduced
include_path, but earlier, all the symlinks were to a relative path (
e.g. libraries ---> ../libs/.. ).

Thanks for the pointer - I will look into this.

Ravi




>
> Cheers,
> Rob.
> --
> ...
> SwarmBuy.com - http://www.swarmbuy.com
>
> Leveraging the buying power of the masses!
> ...
>

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



Re: [PHP] php.ini include_path and symlinks

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 18:35 -0800, Ravi Menon wrote:
> Hi,
> 
> We run php 5.2.0 + apache 2.2. with apc turned on ( apc.stat also on
> ). Earlier we did not use the php.ini include_path setting. We relied
> on some symlinks for our common code
> so that require_once works correctly.
> 
> This worked fine and during code releases we flipped the main
> 'release' symlink atomically, without restarting apache.
> 
> Later we decided to use php.ini include path to refactor common code
> more cleanly and it looks like:
> 
> include_path=.:/some/dir/current:..
> 
> Now 'current' above is a symlink.
> 
> When we push out a new release the current is updated atomically and
> apache is not restarted.
> 
> This seems to pick the new changes and I ran some manual tests to
> confirm. However occasionally I see weird
> errors where it seems php could be resolving the symlink to the actual
> dir. at apache startup, and it assumes
> that old dir. When a new release goes out, we see 'fatal redeclare errors' 
> etc..
> 
> Restarting apache (TERM and not USR1) seems to fix it.
> 
> We could update our install scripts to restart apache, but I am just
> curious, is this really necessary?
> 
> Is there anyway to prevent php from not resolving symlinks but use
> them as it is in the include_path?

Are you using a compile cache like eaccelerator or APC etc? Sometimes
it's the cache that doesn't realize things have changed. I use a symlink
switcher for version releases also and I always flush the eaccelerator
directory when I do that.

Cheers,
Rob.
-- 
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...

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



[PHP] php.ini include_path and symlinks

2007-11-06 Thread Ravi Menon
Hi,

We run php 5.2.0 + apache 2.2. with apc turned on ( apc.stat also on
). Earlier we did not use the php.ini include_path setting. We relied
on some symlinks for our common code
so that require_once works correctly.

This worked fine and during code releases we flipped the main
'release' symlink atomically, without restarting apache.

Later we decided to use php.ini include path to refactor common code
more cleanly and it looks like:

include_path=.:/some/dir/current:..

Now 'current' above is a symlink.

When we push out a new release the current is updated atomically and
apache is not restarted.

This seems to pick the new changes and I ran some manual tests to
confirm. However occasionally I see weird
errors where it seems php could be resolving the symlink to the actual
dir. at apache startup, and it assumes
that old dir. When a new release goes out, we see 'fatal redeclare errors' etc..

Restarting apache (TERM and not USR1) seems to fix it.

We could update our install scripts to restart apache, but I am just
curious, is this really necessary?

Is there anyway to prevent php from not resolving symlinks but use
them as it is in the include_path?

Thanks,
Ravi

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



Re: [PHP] php.ini of PHP 5.2.3

2007-08-14 Thread Richard Lynch
*IF* this is the actual problem, then find the libeay.ddl thingie and
put it next to the openssl.dll thingie.

On Tue, August 14, 2007 11:42 am, Alain Roger wrote:
> So what should i do ?
>
> On 8/13/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>>
>> OpenSSL has a secondary dependency on libeay or whatever it is.
>>
>> PHP might *think* it has OpenSSL, but until OpenSSL can also load in
>> the libeay thingie, it ain't gonna work.
>>
>> It can be confusing, especially when the error log shows something
>> about openssl but doesn't say what openssl is missing, and folks
>> think
>> it's still missing openssl itself, when it's really missing libeay.
>>
>> On Sat, August 11, 2007 6:02 am, Alain Roger wrote:
>> > I've discovered that when i type "php -m", openssl is already
>> loaded
>> > as
>> > module.
>> > It seems that PHP 5.2.3 was compiled with "--with-openssl"
>> command.
>> >
>> > So, why modules with which ones PHP has been compiled do not
>> appear in
>> > the
>> > phpinfo() report ?
>> >
>> > thanks a lot,
>> >
>> > Al.
>> >
>> > On 8/11/07, Stut <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Alain Roger wrote:
>> >> > I have a stupid problem.
>> >> > At work i installed the PHP 5.2.1 and it works fine.
>> >> > i uncomment extension = php_opensll and i see that extension is
>> >> activated
>> >> > because phpinfo show me information about such extension.
>> >> >
>> >> > However, at homw i've just installed PHP 5.2.3 and i did the
>> same
>> >> as at
>> >> work
>> >> > but i'm not able to get any table information about openssl via
>> >> phpinfo();
>> >> > function.
>> >> >
>> >> > could you help me please ?
>> >>
>> >> OpenSSL requires a DLL file to be in the path on Windows. From
>> the
>> >> manual page (http://php.net/openssl)...
>> >>
>> >> "Note to Win32 Users:  In order for this extension to work, there
>> >> are
>> >> DLL files that must be available to the Windows system PATH. See
>> the
>> >> FAQ
>> >> titled "How do I add my PHP directory to the PATH on Windows" for
>> >> information on how to do this. Although copying DLL files from
>> the
>> >> PHP
>> >> folder into the Windows system directory also works (because the
>> >> system
>> >> directory is by default in the systems PATH), it is not
>> recommended.
>> >> This extension requires the following files to be in the PATH:
>> >> libeay32.dll"
>> >>
>> >> -Stut
>> >>
>> >> --
>> >> http://stut.net/
>> >>
>> >
>> >
>> >
>> > --
>> > Alain
>> > 
>> > Windows XP SP2
>> > PostgreSQL 8.2.3
>> > Apache 2.2.4
>> > PHP 5.2.3
>> >
>>
>>
>> --
>> Some people have a "gift" link here.
>> Know what I want?
>> I want you to buy a CD from some indie artist.
>> http://cdbaby.com/browse/from/lynch
>> Yeah, I get a buck. So?
>>
>>
>
>
> --
> Alain
> 
> Windows XP SP2
> PostgreSQL 8.2.3
> Apache 2.2.4
> PHP 5.2.3
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php.ini of PHP 5.2.3

2007-08-14 Thread Alain Roger
So what should i do ?

On 8/13/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>
> OpenSSL has a secondary dependency on libeay or whatever it is.
>
> PHP might *think* it has OpenSSL, but until OpenSSL can also load in
> the libeay thingie, it ain't gonna work.
>
> It can be confusing, especially when the error log shows something
> about openssl but doesn't say what openssl is missing, and folks think
> it's still missing openssl itself, when it's really missing libeay.
>
> On Sat, August 11, 2007 6:02 am, Alain Roger wrote:
> > I've discovered that when i type "php -m", openssl is already loaded
> > as
> > module.
> > It seems that PHP 5.2.3 was compiled with "--with-openssl" command.
> >
> > So, why modules with which ones PHP has been compiled do not appear in
> > the
> > phpinfo() report ?
> >
> > thanks a lot,
> >
> > Al.
> >
> > On 8/11/07, Stut <[EMAIL PROTECTED]> wrote:
> >>
> >> Alain Roger wrote:
> >> > I have a stupid problem.
> >> > At work i installed the PHP 5.2.1 and it works fine.
> >> > i uncomment extension = php_opensll and i see that extension is
> >> activated
> >> > because phpinfo show me information about such extension.
> >> >
> >> > However, at homw i've just installed PHP 5.2.3 and i did the same
> >> as at
> >> work
> >> > but i'm not able to get any table information about openssl via
> >> phpinfo();
> >> > function.
> >> >
> >> > could you help me please ?
> >>
> >> OpenSSL requires a DLL file to be in the path on Windows. From the
> >> manual page (http://php.net/openssl)...
> >>
> >> "Note to Win32 Users:  In order for this extension to work, there
> >> are
> >> DLL files that must be available to the Windows system PATH. See the
> >> FAQ
> >> titled "How do I add my PHP directory to the PATH on Windows" for
> >> information on how to do this. Although copying DLL files from the
> >> PHP
> >> folder into the Windows system directory also works (because the
> >> system
> >> directory is by default in the systems PATH), it is not recommended.
> >> This extension requires the following files to be in the PATH:
> >> libeay32.dll"
> >>
> >> -Stut
> >>
> >> --
> >> http://stut.net/
> >>
> >
> >
> >
> > --
> > Alain
> > 
> > Windows XP SP2
> > PostgreSQL 8.2.3
> > Apache 2.2.4
> > PHP 5.2.3
> >
>
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/browse/from/lynch
> Yeah, I get a buck. So?
>
>


-- 
Alain

Windows XP SP2
PostgreSQL 8.2.3
Apache 2.2.4
PHP 5.2.3


Re: [PHP] php.ini of PHP 5.2.3

2007-08-13 Thread Richard Lynch
OpenSSL has a secondary dependency on libeay or whatever it is.

PHP might *think* it has OpenSSL, but until OpenSSL can also load in
the libeay thingie, it ain't gonna work.

It can be confusing, especially when the error log shows something
about openssl but doesn't say what openssl is missing, and folks think
it's still missing openssl itself, when it's really missing libeay.

On Sat, August 11, 2007 6:02 am, Alain Roger wrote:
> I've discovered that when i type "php -m", openssl is already loaded
> as
> module.
> It seems that PHP 5.2.3 was compiled with "--with-openssl" command.
>
> So, why modules with which ones PHP has been compiled do not appear in
> the
> phpinfo() report ?
>
> thanks a lot,
>
> Al.
>
> On 8/11/07, Stut <[EMAIL PROTECTED]> wrote:
>>
>> Alain Roger wrote:
>> > I have a stupid problem.
>> > At work i installed the PHP 5.2.1 and it works fine.
>> > i uncomment extension = php_opensll and i see that extension is
>> activated
>> > because phpinfo show me information about such extension.
>> >
>> > However, at homw i've just installed PHP 5.2.3 and i did the same
>> as at
>> work
>> > but i'm not able to get any table information about openssl via
>> phpinfo();
>> > function.
>> >
>> > could you help me please ?
>>
>> OpenSSL requires a DLL file to be in the path on Windows. From the
>> manual page (http://php.net/openssl)...
>>
>> "Note to Win32 Users:  In order for this extension to work, there
>> are
>> DLL files that must be available to the Windows system PATH. See the
>> FAQ
>> titled "How do I add my PHP directory to the PATH on Windows" for
>> information on how to do this. Although copying DLL files from the
>> PHP
>> folder into the Windows system directory also works (because the
>> system
>> directory is by default in the systems PATH), it is not recommended.
>> This extension requires the following files to be in the PATH:
>> libeay32.dll"
>>
>> -Stut
>>
>> --
>> http://stut.net/
>>
>
>
>
> --
> Alain
> 
> Windows XP SP2
> PostgreSQL 8.2.3
> Apache 2.2.4
> PHP 5.2.3
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php.ini of PHP 5.2.3

2007-08-11 Thread Alain Roger
I've discovered that when i type "php -m", openssl is already loaded as
module.
It seems that PHP 5.2.3 was compiled with "--with-openssl" command.

So, why modules with which ones PHP has been compiled do not appear in the
phpinfo() report ?

thanks a lot,

Al.

On 8/11/07, Stut <[EMAIL PROTECTED]> wrote:
>
> Alain Roger wrote:
> > I have a stupid problem.
> > At work i installed the PHP 5.2.1 and it works fine.
> > i uncomment extension = php_opensll and i see that extension is
> activated
> > because phpinfo show me information about such extension.
> >
> > However, at homw i've just installed PHP 5.2.3 and i did the same as at
> work
> > but i'm not able to get any table information about openssl via
> phpinfo();
> > function.
> >
> > could you help me please ?
>
> OpenSSL requires a DLL file to be in the path on Windows. From the
> manual page (http://php.net/openssl)...
>
> "Note to Win32 Users:  In order for this extension to work, there are
> DLL files that must be available to the Windows system PATH. See the FAQ
> titled "How do I add my PHP directory to the PATH on Windows" for
> information on how to do this. Although copying DLL files from the PHP
> folder into the Windows system directory also works (because the system
> directory is by default in the systems PATH), it is not recommended.
> This extension requires the following files to be in the PATH:
> libeay32.dll"
>
> -Stut
>
> --
> http://stut.net/
>



-- 
Alain

Windows XP SP2
PostgreSQL 8.2.3
Apache 2.2.4
PHP 5.2.3


Re: [PHP] php.ini of PHP 5.2.3

2007-08-11 Thread Stut

Alain Roger wrote:

I have a stupid problem.
At work i installed the PHP 5.2.1 and it works fine.
i uncomment extension = php_opensll and i see that extension is activated
because phpinfo show me information about such extension.

However, at homw i've just installed PHP 5.2.3 and i did the same as at work
but i'm not able to get any table information about openssl via phpinfo();
function.

could you help me please ?


OpenSSL requires a DLL file to be in the path on Windows. From the 
manual page (http://php.net/openssl)...


"Note to Win32 Users:  In order for this extension to work, there are 
DLL files that must be available to the Windows system PATH. See the FAQ 
titled "How do I add my PHP directory to the PATH on Windows" for 
information on how to do this. Although copying DLL files from the PHP 
folder into the Windows system directory also works (because the system 
directory is by default in the systems PATH), it is not recommended. 
This extension requires the following files to be in the PATH: libeay32.dll"


-Stut

--
http://stut.net/

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



[PHP] php.ini of PHP 5.2.3

2007-08-11 Thread Alain Roger
Hi,

I have a stupid problem.
At work i installed the PHP 5.2.1 and it works fine.
i uncomment extension = php_opensll and i see that extension is activated
because phpinfo show me information about such extension.

However, at homw i've just installed PHP 5.2.3 and i did the same as at work
but i'm not able to get any table information about openssl via phpinfo();
function.

could you help me please ?

thanks a lot.

-- 
Alain

Windows XP SP2
PostgreSQL 8.2.3
Apache 2.2.4
PHP 5.2.3


Re: [PHP] php.ini

2006-11-09 Thread Jürgen Wind

PHP is not supposed to look for php.ini in PATH.
(from http://bugs.php.net/bug.php?id=39432)


zerof wrote:
> 
> Alain Roger escreveu:
>> Hi,
>> 
>> everytime i install PHP, my "php.ini" must be installed in "C:\windows\"
>> folder.
>> 
>> How can i do to force system to read "php.ini" file from "C:\PHP\" folder
>> only ?
>> thanks.
>> 
>> Alain
>> 
> 
> You need to put the c:\php folder in the path of the system.
> 
> Control Panel >
> 
> OPEN System >
> 
> > Tab Advanced > Environment Variables >
> 
> > Select the variable Path > Click Edit >
> 
> > Add at the end, the term: ;C:\php;
> 
> + Click OK, OK, . . . to conclude.
> 
> ex-corde,
> zerof
> http://www.educar.pro.br/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/php.ini-tf2603259.html#a7268994
Sent from the PHP - General mailing list archive at Nabble.com.

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



[PHP] php.ini

2006-11-09 Thread Alain Roger

Hi,

everytime i install PHP, my "php.ini" must be installed in "C:\windows\"
folder.

How can i do to force system to read "php.ini" file from "C:\PHP\" folder
only ?
thanks.

Alain


RE: [PHP] php.ini and .htaccess not working for php parameters

2006-11-09 Thread Ford, Mike
On 08 November 2006 23:04, James Tu wrote:

> Sorry...it was my own sillyness.  After confirming that the .htaccess
> file was indeed setting the include_path directory, it turns
> out that
> the class file was renamed and PHP could not find it.
> 
> I'm surprised that PHP doesn't complain that it couldn't find the
> file...then I started to comment out stuff in my .htaccess and it
> turns out that the culprit for now displaying errors was:
> 
> php_value error_reporting E_ALL
> When I commented that out, PHP reported the errors.  ugh!
> 
> Can I set that parameter in .htaccess?

Yes, of course -- but you need to take heed of the following CAUTION at 
http://uk.php.net/manual/en/configuration.changes.php:

+-+
| PHP constants do not exist outside of PHP. For example, in  |
| httpd.conf you can not use PHP constants such as E_ALL or   |
| E_NOTICE to set the error_reporting directive as they will have |
| no meaning and will evaluate to 0. Use the associated bitmask   |
| values instead. These constants can be used in php.ini  |
+-+

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

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



Re: [PHP] php.ini and .htaccess not working for php parameters

2006-11-08 Thread James Tu
Sorry...it was my own sillyness.  After confirming that the .htaccess  
file was indeed setting the include_path directory, it turns out that  
the class file was renamed and PHP could not find it.


I'm surprised that PHP doesn't complain that it couldn't find the  
file...then I started to comment out stuff in my .htaccess and it  
turns out that the culprit for now displaying errors was:


php_value error_reporting E_ALL
When I commented that out, PHP reported the errors.  ugh!

Can I set that parameter in .htaccess?



-James

On Nov 8, 2006, at 5:14 PM, James Tu wrote:

I've setup a few directories under my dev server's webroot...one  
for each project.
Under each project directory, I put php.ini files to set parameters  
such as include_path.
For some reason they are not taking effect.  Do I have to enable  
them somehow?
phpinfo() tells me that Server API is Apache, so that means PHP is  
running as a module not as CGI right?  So php.ini only works with  
PHP running as CGI?


I tried to use an .htaccess file instead and that didn't work either.

In my httpd.conf I have set

Options All
 AllowOverride All



Before, when I was using php.ini, i was getting an error from my  
include command...basically saying that it couldn't find the file.


Now that I'm using the .htaccess, I don't see any PHP errors, I put  
some print statements just to see where things go wrong.


include ('class.datetime_utility.php');
print "hello"; //shows up
$dd = new datetime_utility();
print "hello"; //doesn't show up!!!


What's happening here?

(In the past, I just modified the include_path of the main php.ini  
and this doesn't seem like a flexible solution.  I want to localize  
the settings in separate php.ini files for each project, so that  
when I have to deploy to production, I can also deploy the php.ini  
with minor adjustments.)


-James

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






[PHP] php.ini and .htaccess not working for php parameters

2006-11-08 Thread James Tu
I've setup a few directories under my dev server's webroot...one for  
each project.
Under each project directory, I put php.ini files to set parameters  
such as include_path.
For some reason they are not taking effect.  Do I have to enable them  
somehow?
phpinfo() tells me that Server API is Apache, so that means PHP is  
running as a module not as CGI right?  So php.ini only works with PHP  
running as CGI?


I tried to use an .htaccess file instead and that didn't work either.

In my httpd.conf I have set

Options All
 AllowOverride All



Before, when I was using php.ini, i was getting an error from my  
include command...basically saying that it couldn't find the file.


Now that I'm using the .htaccess, I don't see any PHP errors, I put  
some print statements just to see where things go wrong.


include ('class.datetime_utility.php');
print "hello"; //shows up
$dd = new datetime_utility();
print "hello"; //doesn't show up!!!


What's happening here?

(In the past, I just modified the include_path of the main php.ini  
and this doesn't seem like a flexible solution.  I want to localize  
the settings in separate php.ini files for each project, so that when  
I have to deploy to production, I can also deploy the php.ini with  
minor adjustments.)


-James

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



RE: [PHP] php.ini & ini_set

2006-11-01 Thread Richard Lynch
On Tue, October 31, 2006 8:59 pm, Beauford wrote:
> That doesn't work.
>
> Here is what I have.
>
> mail($email,$subject,$body,$from);
>
> Which is (senders address, the subject, the body of the message, and
> the
> from address)
>
> The from address is taken from this, and I added the -f in front of
> it.
> define("regaddress", "[EMAIL PROTECTED]");
>
> It still says it comes from:
> Nobody [EMAIL PROTECTED]; on behalf of; Registrar
> [EMAIL PROTECTED]

You're confusing the 4th and 5th parameters, partially because Chris
has misled you :-)



4th:  Regular headers like "From: [EMAIL PROTECTED]" and
"Reply-to: [EMAIL PROTECTED]"

5th: Args to sendmail, if your PHP user is a trusted user for sendmail
(unlikely in a shared-host environment with no php.ini) so you can
hack the "-f" which really truly forges the "sender" rather than
kinda/sorta forging it.

They are quite different, and serve different purposes.

You probably only *need* the 4th at this point, but need to construct
valid email headers (see 4th above) and not valid sendmail command
line flags (what you are trying to do now).

Note that spam filters will "catch" the forgery in 4th and penalize
you for it, so do everything else you can to make your email not look
like spam.  Unless it is spam, in which case you want to be sure to
use HTML enhanced (cough, cough) email, and lots of USELESS CAPS and
plenty of explamation points!!! and be sure to attach a couple GIF
images, and embed a reader-tracking GIF and...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php.ini & ini_set

2006-11-01 Thread Ed Lazor
I think that's what he's trying, but he's missing the fact that he  
needs to include the actual "From: " that you've specified.


In other words, I think he's doing:

mail("[EMAIL PROTECTED]", "Subject", "Body", "[EMAIL PROTECTED]");

instead of:

mail("[EMAIL PROTECTED]", "Subject", "Body",  
"From:[EMAIL PROTECTED]");




On Oct 31, 2006, at 10:55 PM, M.Sokolewicz wrote:


Why can't you just add a
From: Registrar <[EMAIL PROTECTED]>
header? =/

- tul

Chris wrote:

Beauford wrote:

That doesn't work.

Here is what I have.

mail($email,$subject,$body,$from);
Which is (senders address, the subject, the body of the message,  
and the

from address)

The from address is taken from this, and I added the -f in front  
of it.

define("regaddress", "[EMAIL PROTECTED]");

It still says it comes from:
Nobody [EMAIL PROTECTED]; on behalf of; Registrar
[EMAIL PROTECTED]

That's something different entirely to what your original email said.
Your mail server is adding that, it's not a php setting you can  
change.
If you look at the mail source, it will have an extra header in  
there (can't remember what it is but check against this email -  
something like "Sender" or "Sender-Address").


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



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



Re: [PHP] php.ini & ini_set

2006-10-31 Thread M.Sokolewicz

Why can't you just add a
From: Registrar <[EMAIL PROTECTED]>
header? =/

- tul

Chris wrote:

Beauford wrote:

That doesn't work.

Here is what I have.

mail($email,$subject,$body,$from);
Which is (senders address, the subject, the body of the message, and the
from address)

The from address is taken from this, and I added the -f in front of it.
define("regaddress", "[EMAIL PROTECTED]");

It still says it comes from:
Nobody [EMAIL PROTECTED]; on behalf of; Registrar
[EMAIL PROTECTED]


That's something different entirely to what your original email said.

Your mail server is adding that, it's not a php setting you can change.

If you look at the mail source, it will have an extra header in there 
(can't remember what it is but check against this email - something like 
"Sender" or "Sender-Address").




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



Re: [PHP] php.ini & ini_set

2006-10-31 Thread Chris

Beauford wrote:

That doesn't work.

Here is what I have.

mail($email,$subject,$body,$from); 


Which is (senders address, the subject, the body of the message, and the
from address)

The from address is taken from this, and I added the -f in front of it.
define("regaddress", "[EMAIL PROTECTED]");

It still says it comes from:
Nobody [EMAIL PROTECTED]; on behalf of; Registrar
[EMAIL PROTECTED]


That's something different entirely to what your original email said.

Your mail server is adding that, it's not a php setting you can change.

If you look at the mail source, it will have an extra header in there 
(can't remember what it is but check against this email - something like 
"Sender" or "Sender-Address").


--
Postgresql & php tutorials
http://www.designmagick.com/

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



FW: [PHP] php.ini & ini_set

2006-10-31 Thread Beauford
Sorry, this should be.

Which is (to address, the subject, the body of the message, and the from
address)

-

That doesn't work.

Here is what I have.

mail($email,$subject,$body,$from); 

Which is (senders address, the subject, the body of the message, and the
from address)

The from address is taken from this, and I added the -f in front of it.
define("regaddress", "[EMAIL PROTECTED]");

It still says it comes from:
Nobody [EMAIL PROTECTED]; on behalf of; Registrar
[EMAIL PROTECTED]

Thanks

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: October 31, 2006 9:38 PM
To: Beauford
Cc: 'PHP'
Subject: Re: [PHP] php.ini & ini_set

Beauford wrote:
>  Can you be more specific. I only see 4 parameters and none of them apply.

Oops sent you to the wrong page.

http://www.php.net/manual/en/function.mail.php

There are 5 parameters:

bool mail ( string to, string subject, string message [, string
additional_headers [, string additional_parameters]] )


Look for this:
additional_parameters (optional)


and look at example 3.

--
Postgresql & php tutorials
http://www.designmagick.com/

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

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



RE: [PHP] php.ini & ini_set

2006-10-31 Thread Beauford
That doesn't work.

Here is what I have.

mail($email,$subject,$body,$from); 

Which is (senders address, the subject, the body of the message, and the
from address)

The from address is taken from this, and I added the -f in front of it.
define("regaddress", "[EMAIL PROTECTED]");

It still says it comes from:
Nobody [EMAIL PROTECTED]; on behalf of; Registrar
[EMAIL PROTECTED]

Thanks

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: October 31, 2006 9:38 PM
To: Beauford
Cc: 'PHP'
Subject: Re: [PHP] php.ini & ini_set

Beauford wrote:
>  Can you be more specific. I only see 4 parameters and none of them apply.

Oops sent you to the wrong page.

http://www.php.net/manual/en/function.mail.php

There are 5 parameters:

bool mail ( string to, string subject, string message [, string
additional_headers [, string additional_parameters]] )


Look for this:
additional_parameters (optional)


and look at example 3.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

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

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



Re: [PHP] php.ini & ini_set

2006-10-31 Thread Chris

Beauford wrote:

 Can you be more specific. I only see 4 parameters and none of them apply.


Oops sent you to the wrong page.

http://www.php.net/manual/en/function.mail.php

There are 5 parameters:

bool mail ( string to, string subject, string message [, string 
additional_headers [, string additional_parameters]] )



Look for this:
additional_parameters (optional)


and look at example 3.

--
Postgresql & php tutorials
http://www.designmagick.com/

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



RE: [PHP] php.ini & ini_set

2006-10-31 Thread Beauford
 Can you be more specific. I only see 4 parameters and none of them apply.

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: October 31, 2006 9:13 PM
To: Beauford
Cc: PHP
Subject: Re: [PHP] php.ini & ini_set

Beauford wrote:
> I am working on a website for a friend that is being hosted by a third 
> party (which uses Linux) and I don't have access to the php.ini or any 
> other system files.
> 
> The problem I am having is this. When an email is sent from the 
> website and the user receives it, it says it is from 
> [EMAIL PROTECTED] instead of the websites email address. How can I 
> get it to say it is coming from the website address. I do have access 
> to a cgi bin, and maybe .htaccess if something can be done with these. 
> I thought though that I could use ini_set to do this.

http://www.php.net/mail

Check the 5th parameter usage and associated comments.

--
Postgresql & php tutorials
http://www.designmagick.com/

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

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



Re: [PHP] php.ini & ini_set

2006-10-31 Thread Chris

Beauford wrote:

I am working on a website for a friend that is being hosted by a third party
(which uses Linux) and I don't have access to the php.ini or any other
system files.

The problem I am having is this. When an email is sent from the website and
the user receives it, it says it is from [EMAIL PROTECTED] instead of the
websites email address. How can I get it to say it is coming from the
website address. I do have access to a cgi bin, and maybe .htaccess if
something can be done with these. I thought though that I could use ini_set
to do this.


http://www.php.net/mail

Check the 5th parameter usage and associated comments.

--
Postgresql & php tutorials
http://www.designmagick.com/

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



[PHP] php.ini & ini_set

2006-10-31 Thread Beauford
I am working on a website for a friend that is being hosted by a third party
(which uses Linux) and I don't have access to the php.ini or any other
system files.

The problem I am having is this. When an email is sent from the website and
the user receives it, it says it is from [EMAIL PROTECTED] instead of the
websites email address. How can I get it to say it is coming from the
website address. I do have access to a cgi bin, and maybe .htaccess if
something can be done with these. I thought though that I could use ini_set
to do this.

Any thoughts.

Thanks


Re: [PHP] php.ini version changed, code broke

2006-02-08 Thread Gerry Danen
You should use $_POST...

On 2/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hello all from a newbie.  We have a Nitix server (from Net Integration
> Technologies, Inc.) that hosts various web site.  Recently they released a
> software upgrade, and in the release notes was this warning:
>
> "A number of PHP options (in the php.ini file) were changed, either to
> improve security or to more closely follow the recommendations of the PHP
> developers. This should make it easier to run third-party PHP packages on
> Nitix, but could break existing installations that have been adapted for
> Nitix."
>
> After installing this release, the simplest of all simple things would no
> longer work - a basic HTML menu with 6 choices passed to a PHP script that
> prints out the selection chosen by the user!!  The variable name when
> printed (echo'd) in the PHP script was empty.
>
> The HTML:
>
> 
> 
> Deb
> Frank
> Jeff
> Lynne
> Nick
> Tom
> 
> 
> 
>
> The PHP:
>
> 
> echo $aName . "ttt";
>
> ?>
>
> What displays???  Just ttt of course.  What exactly could have changed to
> make this simple script fail?

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



RE: [PHP] php.ini version changed, code broke

2006-02-08 Thread Jay Blanchard
[snip]
What displays???  Just ttt of course.  What exactly could have changed to
make this simple script fail?
[/snip]


register_globals in the php.ini has been set to 'off' 

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



Re: [PHP] php.ini version changed, code broke

2006-02-08 Thread Duncan Hill
On Wednesday 08 February 2006 16:16, [EMAIL PROTECTED] wrote:
> What displays???  Just ttt of course.  What exactly could have changed to
> make this simple script fail?

register_globals probably

http://uk.php.net/register_globals

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



[PHP] php.ini version changed, code broke

2006-02-08 Thread [EMAIL PROTECTED]
Hello all from a newbie.  We have a Nitix server (from Net Integration
Technologies, Inc.) that hosts various web site.  Recently they released a
software upgrade, and in the release notes was this warning:

"A number of PHP options (in the php.ini file) were changed, either to
improve security or to more closely follow the recommendations of the PHP
developers. This should make it easier to run third-party PHP packages on
Nitix, but could break existing installations that have been adapted for
Nitix."

After installing this release, the simplest of all simple things would no
longer work - a basic HTML menu with 6 choices passed to a PHP script that
prints out the selection chosen by the user!!  The variable name when
printed (echo'd) in the PHP script was empty.

The HTML:



Deb
Frank
Jeff
Lynne
Nick
Tom




The PHP:



What displays???  Just ttt of course.  What exactly could have changed to
make this simple script fail?

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



Re: [PHP] php.ini & magic quotes

2005-09-30 Thread Jochem Maas

Jay Blanchard wrote:

Everyday I scratch my head.

In php.ini in the C:\WINNT it is said;

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(),
etc.
magic_quotes_runtime = Off


In phpinfo() it is said;



where does it say it read the ini file from?
is there a .htaccess equivelant setting somewhere
in the ISS server [your new job in a windows shop]
turning magic_quotes_gpc on (for the given 'vhost')?

(I use apache terminology - I trust your savvy
enough to translate them to ISSspeak :-)

magic_quotes_gpc On On 
magic_quotes_runtime Off Off 


[note the disparity]

and get_magic_quotes_gpc() returns a 1 (for 'on')

I am having a helluva time escaping single quotes for use with MSSQL because
it throws the following error

SELECT EPC, Owner, Location, Application, Process, Product, Purchased,
Comments FROM intranet.dbo.CustomerRelations WHERE Purchased = '1990\'\'s'
ORDER BY EPC DESC 


Filter=Purchased&FilterKey=1990\'\'s <--$_SERVER['QUERY_STRING']

1 <--get_magic_quotes_gpc


Warning: odbc_exec(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL
Server]Line 1: Incorrect syntax near '\'., SQL state 37000 in SQLExecDirect
in E:\fubar\iamscrewed\windowsblows\index.php on line 51
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near
'\'. 


Slashes are being inserted during the post, but i cannot get them to go


can you so a hack with 'magic_quotes_sybase' ini setting? (turn it on)
see here: http://nl2.php.net/sybase


away...stripslashes doesn;t work.can anyone help me get rid of the


what exactly isn't working?
something like this does do it for you?:


/**
 * array_stripslashes()
 *
 * stripsslashes from each value found in the given array,
 * and recurses if a value is itself an array.
 * this function is used to 'transform' request superglobals into
 * 'form' that is consistent regardless of server settings. (magic quotes, etc)
 *
 * @return array()
 */
function array_stripslashes(&$array) {
if(!is_array($array));
while (list($key) = @each($array)) {
if (is_array($array[$key])) {
array_stripslashes($array[$key]);
} else {
$array[$key] = stripslashes($array[$key]);
}
}
}

/* setup the env the way we like it. */
set_magic_quotes_runtime(0);// Disable magic_quotes_runtime
if (get_magic_quotes_gpc()) {   // stripslashes if they were auto added
array_stripslashes( $_POST  );
array_stripslashes( $_GET   );
array_stripslashes( $_REQUEST   );
array_stripslashes( $_COOKIES   );
array_stripslashes( $_HTTP_POST_VARS);
array_stripslashes( $_HTTP_GET_VARS );
array_stripslashes( $_HTTP_COOKIES_VARS );
}


slashes? Or should I just go for a nice motorcycle ride in the Hill Country?


If you have hills I'd say take an mtb. :-) I like mtb'ing - but I live
in a country





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



[PHP] php.ini & magic quotes

2005-09-30 Thread Jay Blanchard
Everyday I scratch my head.

In php.ini in the C:\WINNT it is said;

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(),
etc.
magic_quotes_runtime = Off

In phpinfo() it is said;

magic_quotes_gpc On On 
magic_quotes_runtime Off Off 

[note the disparity]

and get_magic_quotes_gpc() returns a 1 (for 'on')

I am having a helluva time escaping single quotes for use with MSSQL because
it throws the following error

SELECT EPC, Owner, Location, Application, Process, Product, Purchased,
Comments FROM intranet.dbo.CustomerRelations WHERE Purchased = '1990\'\'s'
ORDER BY EPC DESC 

Filter=Purchased&FilterKey=1990\'\'s <--$_SERVER['QUERY_STRING']

1 <--get_magic_quotes_gpc


Warning: odbc_exec(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL
Server]Line 1: Incorrect syntax near '\'., SQL state 37000 in SQLExecDirect
in E:\fubar\iamscrewed\windowsblows\index.php on line 51
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near
'\'. 

Slashes are being inserted during the post, but i cannot get them to go
away...stripslashes doesn;t work.can anyone help me get rid of the
slashes? Or should I just go for a nice motorcycle ride in the Hill Country?

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



Re: [PHP] php.ini and php.config Tutorial?

2005-09-08 Thread Vizion
On Thursday 08 September 2005 09:49,  the author Rory Browne contributed to 
the dialogue on-
 Re: [PHP] php.ini and php.config Tutorial?: 

>Hi David
>
>I know that quite a lot of online docs can be daunting for new users,
>but you should not underestimate the quality of the php documentation.


Sure -- I did look at those - my feeling is that they are high on providing 
the facts but low on providing meaning, context and interpretation.

Mathematically it is easy to understand x+y=z but if you do not know or cannot 
know the value attributable to x or y or z the formula is *** useless. In 
my view one needs to distinquish between documentation (which records what 
something does in technical terms) and the qualities of a manual which 
explains which might refer to the documentation as it seeks to explain how 
and why one should choose to apply the options defined in the documentation.

The php.net references  the general documentation stanfard is superb but I 
found it to be somewhat lacking in its ability to meet the expectations of a 
manual. However, unless I missed a salient link, I did not find the brief 
section on installation and configuration very useful.

Incidentally the book by Luke Welling & Laura Thomson, PHP and MySQL web 
Development seemed to promisong in fulfilling the manual role for programming 
PHP. I was however disappointed because but  the general standard throughout 
the book does not seem to have been carried through to the Appendix on 
installation and configuration. It does not go into detail in regard to 
configuration options.

I have written to the authors in the hope they might give consider devoting a 
full chapter to that topic in their next edition.

Do you happen to have any other suggestions?

Thanks

david
>
>On 9/8/05, Vizion <[EMAIL PROTECTED]> wrote:
>> Hi
>>
>> Background:
>> I am installing php with apache2 and ssl, mysql-server-5.0.11 on one of my
>> Freebsd 5.3. servers. I propose to  run a forum (currently investigating
>> phpbb but would like to consider others) and am also looking  for suitable
>> blog and wiki applications. I am more of a system administrator than a
>> programmer although I do have considerable experience of some programming
>> languages.
>>
>> Questions:
>> 1.
>> As I am new to php I would appreciated if someone could help me locate a
>> tutorial which not only describes what is in the configuration files
>> (which the distributed configuration files do quite well) but also, some
>> explanations that might be understood by a php neophyte, plus guidance and
>> detailed examples on one might choose on option over another in different
>> circumstances. For those who are not familiar with php the configuration
>> files can appear daunting.
>
>http://www.php.net/manual/en/configuration.php
>
>> 2.
>> Recomendations for forum, wiki and blog modules.
>
>www.hotscripts.com
>
>> Thanks
>> david
>> --
>> 40 yrs navigating and computing in blue waters.
>> English Owner & Captain of British Registered 60' bluewater Ketch S/V
>> Taurus. Currently in San Diego, CA. Sailing bound for Europe via Panama
>> Canal after completing engineroom refit.
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
40 yrs navigating and computing in blue waters.
English Owner & Captain of British Registered 60' bluewater Ketch S/V Taurus.
 Currently in San Diego, CA. Sailing bound for Europe via Panama Canal after 
completing engineroom refit.

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



Re: [PHP] php.ini and php.config Tutorial?

2005-09-08 Thread Rory Browne
Hi David

I know that quite a lot of online docs can be daunting for new users,
but you should not underestimate the quality of the php documentation.

On 9/8/05, Vizion <[EMAIL PROTECTED]> wrote:
> Hi
> 
> Background:
> I am installing php with apache2 and ssl, mysql-server-5.0.11 on one of my
> Freebsd 5.3. servers. I propose to  run a forum (currently investigating
> phpbb but would like to consider others) and am also looking  for suitable
> blog and wiki applications. I am more of a system administrator than a
> programmer although I do have considerable experience of some programming
> languages.
> 
> Questions:
> 1.
> As I am new to php I would appreciated if someone could help me locate a
> tutorial which not only describes what is in the configuration files (which
> the distributed configuration files do quite well) but also, some
> explanations that might be understood by a php neophyte, plus guidance and
> detailed examples on one might choose on option over another in different
> circumstances. For those who are not familiar with php the configuration
> files can appear daunting.

http://www.php.net/manual/en/configuration.php

> 
> 2.
> Recomendations for forum, wiki and blog modules.

www.hotscripts.com


> 
> Thanks
> david
> --
> 40 yrs navigating and computing in blue waters.
> English Owner & Captain of British Registered 60' bluewater Ketch S/V Taurus.
>  Currently in San Diego, CA. Sailing bound for Europe via Panama Canal after
> completing engineroom refit.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] php.ini and php.config Tutorial?

2005-09-08 Thread Vizion
On Thursday 08 September 2005 08:34,  the author Vizion contributed to the 
dialogue on-
 [PHP] php.ini and php.config Tutorial?: 

>Hi
>
>Background:
>I am installing php with apache2 and ssl, mysql-server-5.0.11 on one of my
>Freebsd 5.3. servers. I propose to  run a forum (currently investigating
>phpbb but would like to consider others) and am also looking  for suitable
>blog and wiki applications. I am more of a system administrator than a
>programmer although I do have considerable experience of some programming
>languages.
>
>Questions:
>1.
>As I am new to php I would appreciated if someone could help me locate a
>tutorial which not only describes what is in the configuration files (which
>the distributed configuration files do quite well) but also, some
>explanations that might be understood by a php neophyte, plus guidance and
>detailed examples on one might choose on option over another in different
>circumstances. For those who are not familiar with php the configuration
>files can appear daunting.
>
Added note of explanation -- my first build of php did not fare well -- I was 
not able to run php test scripts located in virtual host directories. Somehow 
I also finished up with a debug build rather than a production build - so I 
am going to start again from scratch!
>2.
>Recomendations for forum, wiki and blog modules.
>
>
>Thanks
>david
>--
>40 yrs navigating and computing in blue waters.
>English Owner & Captain of British Registered 60' bluewater Ketch S/V
> Taurus. Currently in San Diego, CA. Sailing bound for Europe via Panama
> Canal after completing engineroom refit.

-- 
40 yrs navigating and computing in blue waters.
English Owner & Captain of British Registered 60' bluewater Ketch S/V Taurus.
 Currently in San Diego, CA. Sailing bound for Europe via Panama Canal after 
completing engineroom refit.

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



[PHP] php.ini and php.config Tutorial?

2005-09-08 Thread Vizion
Hi

Background:
I am installing php with apache2 and ssl, mysql-server-5.0.11 on one of my 
Freebsd 5.3. servers. I propose to  run a forum (currently investigating 
phpbb but would like to consider others) and am also looking  for suitable 
blog and wiki applications. I am more of a system administrator than a 
programmer although I do have considerable experience of some programming 
languages.

Questions:
1.
As I am new to php I would appreciated if someone could help me locate a 
tutorial which not only describes what is in the configuration files (which 
the distributed configuration files do quite well) but also, some 
explanations that might be understood by a php neophyte, plus guidance and 
detailed examples on one might choose on option over another in different 
circumstances. For those who are not familiar with php the configuration 
files can appear daunting. 

2.
Recomendations for forum, wiki and blog modules.

Thanks
david
-- 
40 yrs navigating and computing in blue waters.
English Owner & Captain of British Registered 60' bluewater Ketch S/V Taurus.
 Currently in San Diego, CA. Sailing bound for Europe via Panama Canal after 
completing engineroom refit.

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



Re: [PHP] php.ini uploads

2005-05-06 Thread bala chandar
On 5/6/05, Jon Aston <[EMAIL PROTECTED]> wrote:
> this has got to be something easy but I was uploading to a folder on a
> windows PC
> c:\upload
> but I updated php and forgot to backup my ini file.
> 
> I have tried with quotes without quotes as well as a relational address to
> the folder in my ini file and I cannot get any uploads into the folder.
> 
> this is what I have tried
> 
> c:\upload

check for the writing access for the web server user

> c:\upload\
> "c:\upload"
> "c:\upload\"
> c:/upload
> c:/upload/
> "c:/upload"
> "c:/upload/"
> ../upload
> ..\upload
> 
> what am I doing wrong?
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
bala> balachandar muruganantham
blog> lynx http://chandar.blogspot.com
web> http://www.chennaishopping.com

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



[PHP] php.ini uploads

2005-05-06 Thread Jon Aston
this has got to be something easy but I was uploading to a folder on a
windows PC
c:\upload
but I updated php and forgot to backup my ini file.

I have tried with quotes without quotes as well as a relational address to
the folder in my ini file and I cannot get any uploads into the folder.

this is what I have tried

c:\upload
c:\upload\
"c:\upload"
"c:\upload\"
c:/upload
c:/upload/
"c:/upload"
"c:/upload/"
../upload
..\upload

what am I doing wrong?

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



RE: [PHP] php.ini file

2005-03-22 Thread Kim Madsen

> -Original Message-
> From: Burhan Khalid [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 21, 2005 2:05 PM

> > Hopefully not! Files in /tmp are deleted in most *NIX variants, this is
> > a _bad_ idea and the name of the folder pretty much tell You so...
> >
> > Default path is /usr/local/lib
> 
> No, I don't think this is correct.  The default path for temporary files
> is /tmp -- I just tested it on a clean install of PHP.

Ehhh... php.ini, a temp file?

> The whole point of temporary upload files is that they are deleted by
> the system, so you don't have stale files lying around.  Which is why
> there is the move_uploaded_file function.
> 
> This, of course, is assuming I didn't mis-interpret the question.

Quote: "> i'm experimenting with php on mandrake 10 and i'm not sure about a 
few things. first, where should the php.ini file go?"

I think You did indeed.

And I´ll correct my self for the info:

"If You compile PHP there´s a parameter to use: 

--with-config-file-path=/usr/local/php.ini"

Skip the php.ini from the _path_ (doh!)

--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/systemdeveloper

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



Re: [PHP] php.ini file

2005-03-21 Thread Burhan Khalid
Kim Madsen wrote:
-Original Message-
From: Burhan Khalid [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 21, 2005 8:57 AM


Check the output of phpinfo(); to see where it is expecting the file
to 

be.

Works only if the installation is completed and PHP is running ;-)

Use your system wide /tmp folder.  I believe this is the default
setting 

in PHP, so it should Just Work (tm)

Hopefully not! Files in /tmp are deleted in most *NIX variants, this is
a _bad_ idea and the name of the folder pretty much tell You so... 

Default path is /usr/local/lib 
No, I don't think this is correct.  The default path for temporary files 
is /tmp -- I just tested it on a clean install of PHP.

The whole point of temporary upload files is that they are deleted by 
the system, so you don't have stale files lying around.  Which is why 
there is the move_uploaded_file function.

This, of course, is assuming I didn't mis-interpret the question.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] php.ini file

2005-03-21 Thread Kim Madsen
-Original Message-
From: Burhan Khalid [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 21, 2005 8:57 AM

> Check the output of phpinfo(); to see where it is expecting the file
to 
> be.

Works only if the installation is completed and PHP is running ;-)

> Use your system wide /tmp folder.  I believe this is the default
setting 
> in PHP, so it should Just Work (tm)

Hopefully not! Files in /tmp are deleted in most *NIX variants, this is
a _bad_ idea and the name of the folder pretty much tell You so... 

Default path is /usr/local/lib 

--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/systemdeveloper

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



Re: [PHP] php.ini file

2005-03-20 Thread Burhan Khalid
Ruel Cima wrote:
hi,
i'm experimenting with php on mandrake 10 and i'm not sure about a few things.
first, where should the php.ini file go?
Check the output of phpinfo(); to see where it is expecting the file to be.
 i mean in which folder. next, i need
to upload files to a database and i dont know what folder to specify as the 
temp folder under the file uploads section in the php.ini nor what 
permissions to give such a folder.
Use your system wide /tmp folder.  I believe this is the default setting 
in PHP, so it should Just Work (tm)

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


RE: [PHP] php.ini file

2005-03-20 Thread Kim Madsen
-Original Message-
From: Ruel Cima [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 21, 2005 9:12 AM

> i'm experimenting with php on mandrake 10 and i'm not sure about a few 
> things. first, where should the php.ini file go? 

If You compile PHP there´s a parameter to use: 

--with-config-file-path=/usr/local/php.ini

-- 
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen 
Systemudvikler/systemdeveloper

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



  1   2   3   4   >