f



PHP is looking for php.ini file in c:\windows

As the installation txt suggests, I have left my php.ini file inside
the c:\php directory... but running phpinfo() shows that my php.ini
file is in c:\windows as shown below.

Configuration File (php.ini path) - C:\WINDOWS

Well there is no php.ini file in my windows directory, so I'm not sure
where it's getting it's configuration settings from... unless I suppose
they're built into the executable somewhere if no php.ini file is
found. My questions is - why php is not locating my php.ini file that
is located in the c:\php directory? I'd rather not move it to the
windows directory so I can keep everything nice and tidy like the
installation file suggests.

BTW - This is a brand new laptop I'm installing PHP on so there is (I
just double checked) no PHP.ini file in the c:\windows directory. The
path is set to include c:\php... and opening a DOS prompt and typing
"php" is a recognizable command regardless of my current directory.
This is the 2nd machine I have had this same problem with. I'm still
confused...

Any thoughts?

thanks

0
SonVoltMMA (17)
7/11/2006 9:38:57 PM
comp.lang.php 32646 articles. 0 followers. Post Follow

17 Replies
1398 Views

Similar Articles

[PageSpeed] 18

~john wrote:

> As the installation txt suggests, I have left my php.ini file inside
> the c:\php directory... but running phpinfo() shows that my php.ini
> file is in c:\windows as shown below.
>
> Configuration File (php.ini path) - C:\WINDOWS
>
> Well there is no php.ini file in my windows directory, so I'm not sure
> where it's getting it's configuration settings from... unless I suppose
> they're built into the executable somewhere if no php.ini file is
> found. My questions is - why php is not locating my php.ini file that
> is located in the c:\php directory? I'd rather not move it to the
> windows directory so I can keep everything nice and tidy like the
> installation file suggests.
>
> BTW - This is a brand new laptop I'm installing PHP on so there is (I
> just double checked) no PHP.ini file in the c:\windows directory. The
> path is set to include c:\php... and opening a DOS prompt and typing
> "php" is a recognizable command regardless of my current directory.
> This is the 2nd machine I have had this same problem with. I'm still
> confused...
>
> Any thoughts?
>
> thanks


Well.. either stop IIS then copy the php.ini to \windows, or change the
path setting in your config file.

0
die.spam (165)
7/11/2006 10:00:23 PM
~john wrote:

> As the installation txt suggests, I have left my php.ini file inside
> the c:\php directory... but running phpinfo() shows that my php.ini
> file is in c:\windows as shown below.
>
> Configuration File (php.ini path) - C:\WINDOWS
>
> Well there is no php.ini file in my windows directory, so I'm not sure
> where it's getting it's configuration settings from... unless I suppose
> they're built into the executable somewhere if no php.ini file is
> found. My questions is - why php is not locating my php.ini file that
> is located in the c:\php directory? I'd rather not move it to the
> windows directory so I can keep everything nice and tidy like the
> installation file suggests.
>
> BTW - This is a brand new laptop I'm installing PHP on so there is (I
> just double checked) no PHP.ini file in the c:\windows directory. The
> path is set to include c:\php... and opening a DOS prompt and typing
> "php" is a recognizable command regardless of my current directory.
> This is the 2nd machine I have had this same problem with. I'm still
> confused...
>
> Any thoughts?
>
> thanks


Well.. either stop IIS then copy the php.ini to \windows, or change the
path setting in your config file. 

Flamer.

0
die.spam (165)
7/11/2006 10:00:34 PM
Hi John,


> Well there is no php.ini file in my windows directory, so I'm not sure
> where it's getting it's configuration settings from... unless I suppose
> they're built into the executable somewhere if no php.ini file is
> found. My questions is - why php is not locating my php.ini file that
> is located in the c:\php directory? I'd rather not move it to the
> windows directory so I can keep everything nice and tidy like the
> installation file suggests.

There are a few options to accomplish this. I usually use the 
environment variable PHPRC. Set it to the folder where your php.ini 
resides (C:\PHP in your case).
For other options see: http://nl3.php.net/manual/en/configuration.php


HTH.
Peter.
-- 
http://www.phpforums.nl
0
7/11/2006 10:03:19 PM
I don't want to move the php.ini file to my windows directory. As the
installation text suggests, I'd rather keep everything inside the
c:\php folder.

What do you mean change the path? The path of "doc_root"? It's pointed
to c:\php. Plus It's not going to do much good to change anything in
the .ini file if it's looking for the .ini file in the wrong
location... ie nothing I do in the php.ini file is going to be noticed
since it's not using it unless I copy it to the windows directory.

~john


flamer die.spam@hotmail.com wrote:
> ~john wrote:
>
> > As the installation txt suggests, I have left my php.ini file inside
> > the c:\php directory... but running phpinfo() shows that my php.ini
> > file is in c:\windows as shown below.
> >
> > Configuration File (php.ini path) - C:\WINDOWS
> >
> > Well there is no php.ini file in my windows directory, so I'm not sure
> > where it's getting it's configuration settings from... unless I suppose
> > they're built into the executable somewhere if no php.ini file is
> > found. My questions is - why php is not locating my php.ini file that
> > is located in the c:\php directory? I'd rather not move it to the
> > windows directory so I can keep everything nice and tidy like the
> > installation file suggests.
> >
> > BTW - This is a brand new laptop I'm installing PHP on so there is (I
> > just double checked) no PHP.ini file in the c:\windows directory. The
> > path is set to include c:\php... and opening a DOS prompt and typing
> > "php" is a recognizable command regardless of my current directory.
> > This is the 2nd machine I have had this same problem with. I'm still
> > confused...
> >
> > Any thoughts?
> >
> > thanks
>
>
> Well.. either stop IIS then copy the php.ini to \windows, or change the
> path setting in your config file. 
> 
> Flamer.

0
SonVoltMMA (17)
7/11/2006 10:19:06 PM
>Peter van Schie wrote:
> For other options see: http://nl3.php.net/manual/en/configuration.php

>From the link...

"Please note that the SetEnv PHPRC "directory/to/phpini/" only works
when using PHP as CGI"

I'm not using the CGI

0
SonVoltMMA (17)
7/11/2006 10:26:50 PM
~john schreef:
>> Peter van Schie wrote:
>> For other options see: http://nl3.php.net/manual/en/configuration.php
> 
>>From the link...
> 
> "Please note that the SetEnv PHPRC "directory/to/phpini/" only works
> when using PHP as CGI"
> 
> I'm not using the CGI

Neither am I, that's simply a faulty statement. But if you really don't 
want to use the PHPRC environment variable, use the registry key for 
instance. There's enough options.

Peter.

-- 
http://www.phpforums.nl
0
7/11/2006 10:32:23 PM
On 11 Jul 2006 15:26:50 -0700, "~john" <SonVoltMMA@gmail.com> wrote:

>>Peter van Schie wrote:
>> For other options see: http://nl3.php.net/manual/en/configuration.php
>
>>From the link...
>
>"Please note that the SetEnv PHPRC "directory/to/phpini/" only works
>when using PHP as CGI"
>
>I'm not using the CGI

 That user contributed note could be much better worded. It's saying that
SetEnv in httpd.conf won't have any effect on PHP as an Apache module, because
SetEnv in httpd.conf only affects subprocesses spawned by Apache - i.e. CGI.

 PHPRC works fine for PHP as Apache module when you set it as an environment
variable for the Apache process itself, i.e. you set it before Apache starts
up.

-- 
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
0
andy171 (2271)
7/11/2006 10:33:38 PM
Not to be prude but all these "work-arounds" go against what the
included instructions in the official PHP download say to do. It
explicitely says "leave the php.ini file in the c:\php folder"... Did
the PHP team just make a mistake in the installation instructions or is
this a bug with the current release of PHP 5.1.4? It just seems a
little aggravating...

~john


Andy Hassall wrote:
> On 11 Jul 2006 15:26:50 -0700, "~john" <SonVoltMMA@gmail.com> wrote:
>
> >>Peter van Schie wrote:
> >> For other options see: http://nl3.php.net/manual/en/configuration.php
> >
> >>From the link...
> >
> >"Please note that the SetEnv PHPRC "directory/to/phpini/" only works
> >when using PHP as CGI"
> >
> >I'm not using the CGI
>
>  That user contributed note could be much better worded. It's saying that
> SetEnv in httpd.conf won't have any effect on PHP as an Apache module, because
> SetEnv in httpd.conf only affects subprocesses spawned by Apache - i.e. CGI.
>
>  PHPRC works fine for PHP as Apache module when you set it as an environment
> variable for the Apache process itself, i.e. you set it before Apache starts
> up.
>
> --
> Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
> http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

0
SonVoltMMA (17)
7/12/2006 12:02:55 AM
~john wrote:
> Not to be prude but all these "work-arounds" go against what the
> included instructions in the official PHP download say to do. It
> explicitely says "leave the php.ini file in the c:\php folder"... Did
> the PHP team just make a mistake in the installation instructions or is
> this a bug with the current release of PHP 5.1.4? It just seems a
> little aggravating...
> 
> ~john
> 
> 
> Andy Hassall wrote:
> 
>>On 11 Jul 2006 15:26:50 -0700, "~john" <SonVoltMMA@gmail.com> wrote:
>>
>>
>>>>Peter van Schie wrote:
>>>>For other options see: http://nl3.php.net/manual/en/configuration.php
>>>
>>>>From the link...
>>>
>>>"Please note that the SetEnv PHPRC "directory/to/phpini/" only works
>>>when using PHP as CGI"
>>>
>>>I'm not using the CGI
>>
>> That user contributed note could be much better worded. It's saying that
>>SetEnv in httpd.conf won't have any effect on PHP as an Apache module, because
>>SetEnv in httpd.conf only affects subprocesses spawned by Apache - i.e. CGI.
>>
>> PHPRC works fine for PHP as Apache module when you set it as an environment
>>variable for the Apache process itself, i.e. you set it before Apache starts
>>up.
>>
>>--
>>Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
>>http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
> 
> 

No, it's unclear documentation at all.  All versions of PHP I've used 
have been that way.

Personally I leave it in the C:\Windows folder, along with other 
configuration files.  But if you want to leave it in C:\php, you can 
either set the environment variable or edit the registry.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
7/12/2006 12:56:45 AM
Andy Hassall wrote:
>  That user contributed note could be much better worded. It's saying that
> SetEnv in httpd.conf won't have any effect on PHP as an Apache module, because
> SetEnv in httpd.conf only affects subprocesses spawned by Apache - i.e. CGI.
>
>  PHPRC works fine for PHP as Apache module when you set it as an environment
> variable for the Apache process itself, i.e. you set it before Apache starts
> up.
>

But now you have to restart the machine in order to change the path,
since services get their environment from the service manager. A typo?
Another restart.

Really, just stick the file into C:\Windows. People have doing been
this since PHP 3.

0
chernyshevsky (2297)
7/12/2006 4:33:13 AM
~john wrote:
> >Peter van Schie wrote:
> > For other options see: http://nl3.php.net/manual/en/configuration.php
>
> >From the link...
>
> "Please note that the SetEnv PHPRC "directory/to/phpini/" only works
> when using PHP as CGI"
>
> I'm not using the CGI

did you try?
autoexec.bat
SET PATH= "directory/to/phpini/"

0
turt (13)
7/12/2006 4:40:54 AM
Follow these steps for Windows

Click Start
Right Click on My Computer and Click Properties
Choose Advanced from the Tabs
Click Environmenr Variables
In the bottom window labeled System Variables look for PATH
Highlight PATH and click Edit
At the end of the path settings add the following assuming php is in
the c:\php folder.

     ;c:\php

(Caution: Dont erase anything else that was there!

Just in case, check if there is already a path for PHP in the path
settings before you add it.
)

Click Ok until you exit everything.

Restart your computer.




~john wrote:
> As the installation txt suggests, I have left my php.ini file inside
> the c:\php directory... but running phpinfo() shows that my php.ini
> file is in c:\windows as shown below.
>
> Configuration File (php.ini path) - C:\WINDOWS
>
> Well there is no php.ini file in my windows directory, so I'm not sure
> where it's getting it's configuration settings from... unless I suppose
> they're built into the executable somewhere if no php.ini file is
> found. My questions is - why php is not locating my php.ini file that
> is located in the c:\php directory? I'd rather not move it to the
> windows directory so I can keep everything nice and tidy like the
> installation file suggests.
>
> BTW - This is a brand new laptop I'm installing PHP on so there is (I
> just double checked) no PHP.ini file in the c:\windows directory. The
> path is set to include c:\php... and opening a DOS prompt and typing
> "php" is a recognizable command regardless of my current directory.
> This is the 2nd machine I have had this same problem with. I'm still
> confused...
> 
> Any thoughts?
> 
> thanks

0
7/12/2006 3:31:53 PM
~john wrote:
> As the installation txt suggests, I have left my php.ini file inside
> the c:\php directory... but running phpinfo() shows that my php.ini
> file is in c:\windows as shown below.
>
> Configuration File (php.ini path) - C:\WINDOWS

Please do as "Paul" suggests...

>use the environment variable PHPRC.

Be sure to restart your PC, since Apache needs to read this env var
after each PC start.

Don't ask, I can't stand it either.


> Well there is no php.ini file in my windows directory,

As it shouldn't!!!

And on your note of...

> "Please note that the SetEnv PHPRC "directory/to/phpini/" only works
> when using PHP as CGI"

Sorry John, this is not correct. Use that ENV VAR.

And Peter, no need to use the registry! I have a complete "linux" type
install with PHP, Perl, mySQL, Apache, all without ANYTHING in the
WINDOWS nor anything in the REGISTRY.  (web.torres.ws/walters_way)

And as for the "instructions in the official PHP download", I never
worry about those. So many times they are written by WINDOW-centric
folks, with no thought to installation, backup, maintiance, etc. They
do it the "Windows Way".

I have a complete set of install documents on how set up a PC for PHP
(and other apps) with complete disregard for "The Windows Way".

In regards to Jerrys advice of leaving things in the WINDOWS directory.
All well an good, but, back your system up, replace your OS (from
scratch) and then restore Apache, PHP, Perl, and mySQL less than 10
minutes. Not.

And as for "ImOK' advice on the PATH, don't touch it, unless your going
to use PHP from the command line. (which I do from time to time). IF
you do than I suggest placing this in the PATH var...

;%PHPRC%

That way to change the path in one place and it cascades across as
needed.

Hope this helps you.

PS: I have virutal hosts running on my PC for Apache as well. Helps me
test things better.

0
otrWalter1 (40)
7/12/2006 7:08:56 PM
otrWalter@gmail.com schreef:

> And Peter, no need to use the registry! I have a complete "linux" type
> install with PHP, Perl, mySQL, Apache, all without ANYTHING in the
> WINDOWS nor anything in the REGISTRY.  (web.torres.ws/walters_way)

I didn't say he *had* to. ;) It was just another suggestion besides 
using the PHPRC env var, because he seemed reluctant using it. Not sure 
why though.

Regards,
Peter.
-- 
http://www.phpforums.nl
0
7/12/2006 10:32:37 PM
I already did that when I first installed PHP... I've installed PHP
many many times on both Windows and Linux systems.

~john


ImOk wrote:
> Follow these steps for Windows
>
> Click Start
> Right Click on My Computer and Click Properties
> Choose Advanced from the Tabs
> Click Environmenr Variables
> In the bottom window labeled System Variables look for PATH
> Highlight PATH and click Edit
> At the end of the path settings add the following assuming php is in
> the c:\php folder.
>
>      ;c:\php
>
> (Caution: Dont erase anything else that was there!
>
> Just in case, check if there is already a path for PHP in the path
> settings before you add it.
> )
>
> Click Ok until you exit everything.
>
> Restart your computer.
>
>
>
>
> ~john wrote:
> > As the installation txt suggests, I have left my php.ini file inside
> > the c:\php directory... but running phpinfo() shows that my php.ini
> > file is in c:\windows as shown below.
> >
> > Configuration File (php.ini path) - C:\WINDOWS
> >
> > Well there is no php.ini file in my windows directory, so I'm not sure
> > where it's getting it's configuration settings from... unless I suppose
> > they're built into the executable somewhere if no php.ini file is
> > found. My questions is - why php is not locating my php.ini file that
> > is located in the c:\php directory? I'd rather not move it to the
> > windows directory so I can keep everything nice and tidy like the
> > installation file suggests.
> >
> > BTW - This is a brand new laptop I'm installing PHP on so there is (I
> > just double checked) no PHP.ini file in the c:\windows directory. The
> > path is set to include c:\php... and opening a DOS prompt and typing
> > "php" is a recognizable command regardless of my current directory.
> > This is the 2nd machine I have had this same problem with. I'm still
> > confused...
> > 
> > Any thoughts?
> > 
> > thanks

0
SonVoltMMA (17)
7/13/2006 12:44:04 AM
otrWalter@gmail.com wrote:

> And as for "ImOK' advice on the PATH, don't touch it, unless your going
> to use PHP from the command line. (which I do from time to time). IF
> you do than I suggest placing this in the PATH var...
>
> ;%PHPRC%
>
> That way to change the path in one place and it cascades across as
> needed.
> 
> Hope this helps you.



Thanks, I'll give this a shot.

~john

0
SonVoltMMA (17)
7/13/2006 12:48:04 AM
Peter van Schie wrote:

> I didn't say he *had* to. ;) It was just another suggestion besides
> using the PHPRC env var, because he seemed reluctant using it. Not sure
> why though.
>
> Regards,
> Peter.


Not reluctant... I guess my main concern was why the official
instructions were off I suppose :P

thanks for all your help,

~john

0
SonVoltMMA (17)
7/13/2006 12:49:06 AM
Reply:

Similar Artilces:

Php constants in php.ini
I am trying to set user_agent = PHP_VERSION in php.ini. In my php.ini the instructions say that you can use constants in the php.ini file. The only constants I can get to work, though, are the error level constants like E_ALL, E_ERROR, E_WARNING, etc., ... Is anyone aware of some sort of trick to getting others to work? (I was thinking it would be nice to have the user agent string used by my Php scripts to use PHP_VERSION in the string.) -- ***************************** Chuck Anderson • Boulder, CO http://www.CycleTourist.com Integrity is obvious. The lack of it is common. *****...

PHP does not parse .PHP files
I have this problem with PHP that someone might be able to help. With CLI, I am able to execute my .php files. For example, if I type "php phpinfo.php" , this works fine on my system. If I put the phpinfo.php file is in /var/www/html and I try to access it through the browser, I get the content of the file and not the execution of the file. Instead of display the info of PHP, I got the text of the file as: <?php phpinfo(); ?> Why? Thanks Phong Ho wrote: >I have this problem with PHP that someone might be able to help. > >With CLI, I am able to execute my ....

Parsing a php include (which also contains php code)
Hello, I am using the <?php include() ?> statement on my website for organizational purposes. However, one of my includes contains some PHP code. Is there any way for the server to actually parse the include? I've tried this before, and it did not parse the include. Rather, it included the file as just plain ASCII. ======================= /*EXAMPLE 1*/ /*index.php*/ .... <?php include('global/includes/footer.inc') ?> .... /*footer.inc*/ .... <p>&copy 1993-<?php echo date("Y") ?> Kingswood School. All rights reserved.</p> .... /*EXAMPLE 2*/ /*index.php*/ .... <?php include('global/includes/lastmod.php') ?> .... /*lastmod.php*/ .... <?php echo "This file was last modified: "; echo strftime("%A %B %d %Y"); include('whateverfilename.inc'); ?> ============================= I would like to be able to parse the include if it has php code, and in some cases, create nesting includes (an include within an include). Is this even possible? Any ideas? Any help is certainly appreciated. Thanks! Steven Borrelli Web Developer Kingswood School Steven Borrelli wrote: > Hello, > > I am using the <?php include() ?> statement on my website for > organizational purposes. However, one of my includes contains some > PHP code. Is there any way for the server to actually parse the > include? I've tried this before, and it did not parse the in...

PHP Training Institute In Delhi, Live Projects on PHP. Short Term PHP Courses, PHP Scripts, PHP Training with Live Projects.
Vserve Global offers short term PHP: Hypertext Preprocessor Training Course, which is a widely used, general-purpose scripting language that was originally designed for web development, to produce dynamic web pages. It can be embedded into HTML and generally runs on a web server, which needs to be configured to process PHP code and create web page content from it. It can be deployed on most web servers and on almost every operating system and platform free of charge.PHP is installed on over 20 million websites and 1 million web servers. TOPICS:- >> Core PHP Language >> HTML, Cascad...

php outside php (?)
Sounds weird, i know. What i want/wonder is the following: PHP can do the next: <?php if($foo == 'bar') { ?> Ow yeah, foo is bar! <?php }; ?> But how can i do the following: <?php $foo= ?> this is what foo looks like. <?php }; ?> This way i could edit the content of $foo in DW's design-view. I hope it's clear enough for you all to understand... Greetings frizzle. frizzle wrote: > But how can i do the following: > > <?php > > $foo= > > ?> > this is what foo looks like. > <?php > > }; > > ?> > > This way i could edit the content of $foo in DW's design-view. > I hope it's clear enough for you all to understand... <?php ob_start(); ?> this is what foo looks like. <?php $foo=ob_get_clean(); ?> -- Justin Koivisto - justin@koivi.com http://koivi.com Wow, little late on the reply, but i still wanted to thank you for your help. This is exactly what i meant, and it works great! :D Thanks again. ...

php to php obj
Hi All, Is there any tool to convert the .php files into its object files in deploying the files to other's server like java classes are deployed? Thanks in advance --AR John7481 <arjohn7481@hotmail.com> wrote or quoted: > Is there any tool to convert the .php files into its object files in > deploying the files to other's server like java classes are deployed? To what end? Do you want a PHP obfuscator? They tend not to be needed - since the code remains on the server. Do you want a PHP squeezer? Again - since PHP remains on the server that is of reduced importance. PHP obfuscators and squeezers are out there - but what exactly are you looking for? -- __________ |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply. With total disregard for any kind of safety measures Tim Tyler <tim@tt1lock.org> leapt forth and uttered: > John7481 <arjohn7481@hotmail.com> wrote or quoted: > >> Is there any tool to convert the .php files into its object >> files in deploying the files to other's server like java >> classes are deployed? > > To what end? > > Do you want a PHP obfuscator? They tend not to be needed - > since the code remains on the server. > > Do you want a PHP squeezer? Again - since PHP remains on the > server that is of reduced importance. > > PHP obfuscators and squeezers are out there - but what exactly > are you looking for? I think he'...

PHP within PHP...
I took over the support of a website that is set up something like this inside one of the pages: include_once("header.php"); <?php //to get the content of the page they do this: $content = mysql_query("select content etc...); echo $content; ?> include_once("footer.php"); I am having problems evaluating any php that is used in the mysql content. Is there a way to get the mysql withing the mysql to run? Thank you for your time, Mandragon On Sep 17, 12:56 pm, Mandrago...@gmail.com wrote: > I took over the support of a website that is set up something like > this inside one of the pages: > > include_once("header.php"); > > <?php > //to get the content of the page they do this: > $content = mysql_query("select content etc...); > > echo $content; > ?> > > include_once("footer.php"); > > I am having problems evaluating any php that is used in the mysql > content. Is there a way to get the mysql withing the mysql to run? > > Thank you for your time, > > Mandragon Sorry, The question should read: "Is there a way to get the php withing the echo $htmlcontent to run?" Of course you are, $content is a resource. The MySQL Query resource. try this: $content = mysql_query('bla bla bla'); while ($row = mysql_fetch_assoc($content)) { $result[] = $row; } $content = $result; Now you can use $content ;). In answer to your edit... eval($co...

Modify a php file(model) with php
I have an invoice model on my server! and i want to replace some field(like adresse, phone, price, VAT, ....) do you know a tools or class that allows those kind of manipulations Thanks you Yoni Yoni Alhadeff a �crit : > I have an invoice model on my server! and i want to replace some field(like > adresse, phone, price, VAT, ....) > > do you know a tools or class that allows those kind of manipulations > > Thanks you > > Yoni > > Couldn't you replace field with var and have them set when including your template (it become one in fact) ? I didn'...

where is php.ini for the PHP CLI binary?
#!/bin/php <?php echo "hello, world!"; ?> That produces the following: PHP Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0 PHP Warning: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0 hello, world! I'd like to update my php.ini file to make those errors go away but don't know where it is. Any ideas as to how I could go about finding it? yawnmoth wrote: > #!/bin/php > <?php > echo "hello, world!"; > ?> > > That produces the following: > > PHP Warning: Directive 'register_globals' is deprecated in PHP 5.3 > and greater in Unknown on line 0 > PHP Warning: Directive 'register_long_arrays' is deprecated in PHP > 5.3 and greater in Unknown on line 0 > hello, world! > > I'd like to update my php.ini file to make those errors go away but > don't know where it is. Any ideas as to how I could go about finding > it? It is/should be in the root directory where your index.php document is stored. Check with your ISP to confirm that the file is named php.ini. Mine, for example, is named php5.ini, and everything failed miserably before I properly named it. Do you have #!bin/php in the [pagename].php document? Try removing it. Bill B yawnmoth wrote: > #!/bin/php > <?php > echo "hello, world!"; > ?> > > That produces the fol...

When does the php interpreter loads the php file?
Hi All, I'm wondering three facts about php, apache and apache module. 1.How can i differentiate the php intepreter if it's running as a apache module or as cgi? 2.When does the php interpretor loads the php file to main memory? 3.and till when it keeps the php file on memory? - in my experience only after installing Zend it caches the php file. Thak you *** Kim Gijung wrote/escribi� (20 Oct 2004 00:03:35 -0700): > 1.How can i differentiate the php intepreter if it's running as a > apache module or as cgi? If I recall correctly phpinfo() calls it "Server API&qu...

php assembly of multiple php files
I am trying to combine multiple php pages into 1. Basically I have created a shell page and then a seperate php file for each form to be included within the shell. The problem I am having is that when a user submits one of the forms the main shell and the other php files POST values are all returned as NULL and I only get the values pertaining to the form that was submitted?. If all the files were combined into one very long php file, I would get all the POSTs returned how can I do the same but with multiple files? When you submit an include, do the POST values not get passed back to the Main calling page? Thank you, QB Question Boy wrote: > I am trying to combine multiple php pages into 1. > > Basically I have created a shell page and then a seperate php file for > each form to be included within the shell. > > The problem I am having is that when a user submits one of the forms > the main shell and the other php files POST values are all returned as > NULL and I only get the values pertaining to the form that was > submitted?. If all the files were combined into one very long php > file, I would get all the POSTs returned how can I do the same but > with multiple files? > > When you submit an include, do the POST values not get passed back to > the Main calling page? > > Thank you, > > QB This has nothing to do with PHP - it's how HTML works. The browser will only send the data for the form being subm...

PHP on a MacOS sever. Where is php.ini?
I have a client who is using a Mac OSX server. I'm logged in now, but I cannot find php.ini. Is the file called something different on a Mac? I need to locate the variable for max_uploads and increase the size. -- [ Sugapablo ] [ http://www.sugapablo.com <--music ] [ http://www.sugapablo.net <--personal ] [ sugapablo@12jabber.com <--jabber IM ] Sugapablo wrote: > I have a client who is using a Mac OSX server. I'm logged in now, but I > cannot find php.ini. Is the file called something different on a Mac? > > I need to ...

want to get content of one php file in another php file
i have one php file having content Contents of ex1.php file <body> <?php $content = "c://webserver/www/abc.php"; $handle = fopen($content, "r"); echo fread($handle,filesize($content)); ?> </body> this is reading abc.php file in which i m simply using an echo statement. When i execute ex1.php file i cant see the php statement of abc.php file content of abc.php file is <?php echo "hello";?> sarika wrote: > i have one php file having content > > Contents of ex1.php file > <body> > <?php > $content = "c://webserver/www/abc.php"; > $handle = fopen($content, "r"); > echo fread($handle,filesize($content)); > ?> > </body> > this is reading abc.php file in which i m simply using an echo > statement. When i execute ex1.php file i cant see the php statement of > abc.php file > > content of abc.php file is > <?php echo "hello";?> That's interesting, I've found out that it's the browser that's hiding <?php ?> tags within .phpx pages. Probably to avoid short tags scripts (on a server that doesn't allow them) from getting leaked by visitors who don't know about this browser trick, until the dev' realizes his error. Not a good thing, IMO; dev's should take care, themselves, and it's still not secure since the hidden string is still in the rendered source. And now we don't know how ...

Is a PHP variable supposed to be seen in a .js file included into a .php file
Is a PHP variable supposed to be seen in a .js file included into a .php file? I have a client side javascript code stored in a .js file which is included into a PHP file using <script src="filename.js></script> This code initialises a Javascript variable var u="string"; The string is supposed to be the value of $HTTP_HOST So, when initialise this variable like var u=<? echo $HTTP_HOST;?>; I sterted getting a javascript message Syntax Error Am I doing something wrong, or PHP variables are not seen in included js files? aa wrote: > Is a PHP variable supposed to be seen in a .js file included into a .php > file? > > I have a client side javascript code stored in a .js file which is included > into a PHP file using > <script src="filename.js></script> > > This code initialises a Javascript variable > var u="string"; > > The string is supposed to be the value of $HTTP_HOST > > So, when initialise this variable like > > var u=<? echo $HTTP_HOST;?>; > > I sterted getting a javascript message Syntax Error > > Am I doing something wrong, or PHP variables are not seen in included js > files? js files are not parsed for PHP code unless you specifically tell the webserver to do so. Therefore, "var u=<? echo $HTTP_HOST;?>;" in the .js will error since the browser doesn't know what to do. -- Justin Koivisto - spam@koiv...

Open .php file with PHP Designer 2007 by clicking the file in XP
In windows XP, I want to be able to click on a .php file and have it opened in PHP Designer 2007, Or right-click on it and have an "edit" menu option presented to me. I know how to tweak the registry to do this in general, but what would the command line look like in this specific case ? PHP Designer does not do this automatically. It is as if the program does not allow commandline options. It only opens with the last file used or a menu of recently opened files. ...

SSI Including PHP File Within PHP File Causes Seg Fault and Crash
Can somebody concur or verify the following? I'm having this problem on all of my installations. I've got Apache 2.0.40 and PHP 4.2.2 installed and configured from RedHat RPMs. Nothing out of the ordinary. In the httpd.conf file, PHP files are called with the following: <Files *.php> SetOutputFilter PHP;INCLUDES SetInputFilter PHP LimitRequestBody 524288 </Files> I create two files as follows: /test1.php <!--#include virtaul="/test2.php" --> and /test2.php Testing 1 2 3 By going to http://host/test1.php, it may or may not display the fi...

HELP!! PHP Warning: PHP Startup: Unable to load dynamic library 'c:\PHP\Ext\php_mysql.dll'
Why do I keep getting this error mesgage on my phpinfo() page trying to get PHP and MySQL to communicate? I am running this in IIS. Here's what I have - My php.ini resides in my C:\WINNT directory. In it, I have removed the ';' from the extension=php_mysql.dll. Also in the php.ini file I set extension_dir = c:\PHP\Ext In c:\PHP\Ext I have the following files: libmysqli.dll libmySQL.dll php5apache2.dll (Do I need this since I am using IIS)? php5ts.dll php_mysql.dll Any help would be tremendously appreciated. I have spent a ton of time on this. Thanks. MS wrote: > Wh...

Does a lower php.ini replace an upper php.ini in the directory tree ? Activation in .htaccess necessary ?
As far as I know I can override the php settings for a certain branch of the whole directory tree by putting a additional, new php.ini in this directory. Is this true ? If I assign in this new php.ini only a new value to 1 (!) php variable are then all the other php parameter values taken from the next php.ini when I go towards the root of the directory tree? Or - otherwise - are default built-in values from PHP taken in this case ? Do I have to do something else to activate this new php.ini (e.g. specify something in the ..htaccess file) ? Lars Greetings, Lars Willich. In reply to Your message dated Saturday, October 27, 2007, 13:18:44, LW> As far as I know I can override the php settings for a certain branch of the whole directory tree LW> by putting a additional, new php.ini in this directory. LW> Is this true ? AFAIK, it was removed some builds ago to avoid unpredictable results. LW> If I assign in this new php.ini only a new value to 1 (!) php variable are then all the LW> other php parameter values taken from the next php.ini when I go towards the root of LW> the directory tree? Or - otherwise - are default built-in values from PHP taken in this case ? Default, because PHP read only single INI file. LW> Do I have to do something else to activate this new php.ini (e.g. specify something in the LW> .htaccess file) ? Hm. Please tell me why You bothering with PHP.ini if You using PHP as web scripting engine? Install PHP as Apache module ...

Best PHP Training | PHP Development Training | PHP Training Institute
Tops Technologies provides php and mysql certification courses in ahmedabad, baroda, surat, Rajkot, Udaipur, Gujarat, india.PHP Training with MySQL is an introductory course in the PHP and MySQL technology. Mysql and php training course, php for beginners, sql training courses, PHP Training courses, php courses, mysql training courses, php mysql course. For More Details :- http://www.tops-int.com ...

Failed opening required 'PEAR.php' (include_path='F:\www\include') in F:\Program Files\PHP\PEAR\Text\CAPTCHA.php on line 22
Hi, Guys=EF=BC=8Cwhen I run my site ,I got some errors: Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in F:\Program Files\PHP\PEAR \Text\CAPTCHA.php on line 22 Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path=3D'F:\www\include') in F:\Program Files \PHP\PEAR\Text\CAPTCHA.php on line 22 It appears that it cann't find the pear.php ,but i checked my dir,and this file was there,and also I have my php.ini file checked,the include_path=3Dinclude_path=3D".;F:\Program Files\PHP\pear;F:\www \include" ,it looks all right,was there anything I have missed in the config file?Or something wrong ? Wish somebody can help me out. Thanks, Mikay >Warning: require_once(PEAR.php) [function.require-once]: failed to >open stream: No such file or directory in F:\Program Files\PHP\PEAR >\Text\CAPTCHA.php on line 22 >Fatal error: require_once() [function.require]: Failed opening >required 'PEAR.php' (include_path='F:\www\include') in F:\Program Files >\PHP\PEAR\Text\CAPTCHA.php on line 22 So where is the pear.php file? >It appears that it cann't find the pear.php ,but i checked my dir,and >this file was there,and also I have my php.ini file checked,the >include_path=include_path=".;F:\Program Files\PHP\pear;F:\www >\include" ,it looks all right,was there anything I have missed in the >config...

unix / php 4.4.0 / php.ini ?
hi all, i cant find php.ini in upgraded php from 4.3.7 ?!?!? where the hell is it ? the prefix is new but there is no lib directory /usr/local/php-4.4.0/ On Mon, 08 Aug 2005 16:25:48 +0200, g0c wrote: > where the hell is it ? find / -name "php.ini" -- JDS | jeffrey@example.invalid | http://www.newtnotes.com DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/ On 2005-08-08, g0c <REMOVEg0c@msn.com> wrote: > hi all, > i cant find php.ini in upgraded php from 4.3.7 ?!?!? > where the hell is it ? > the prefix is new but there is no li...

Why are my PHP files are not being executed (PHP keywords/syntax being ignored)
I have been hosting a website on the same server for roughly 2 years. The entire site is based on a group of PHP scripts. Today, without changing a thing, the server stopped recognizing all PHP keywords and syntax. When I use firefox, the page simply displays a text/plain version of my source code. When I use IE, the page loads as text/html, however, all lines of PHP code (between "<?" and "?>") are displayed as text. My assumption is that my host has stopped providing PHP extensions. Can anybody confirm this or give me another explanation? All help is greatly ap...

PHP (PHP Hypertext Preprocessor) Programming is Similar to C ...
PHP (PHP Hypertext Preprocessor) Programming is Similar to C ... PHP programming is similar to C / JavaScript and Java. ... Modeling Agencies - Helping Teen Models =B7 Fashion and Success - Starting a Retail ... Read More http://childschooledu.blogspot.com/ ...

cron jobs in PHP admin to run a PHP file
I want to run a php script every day. The page goes to a directory and parses a file and adds data to the database. Where it says "command" in cron jobs I don't know what it is looking for? Can I put the name of my php file? This is what I have: Minute Hour Day Month Weekday Command 1 8 1-7 1-31 * myPage.php The reason I am asking is I don't have a clue what PHPadmin wants in the command box. All I want to do is run the php script. Thanks, janis JRough wrote: >I want to run a php script every day. The page goes to a directory > and > parses a file and adds data to the database. Where it says "command" > in cron jobs I don't know what it is looking for? Can I put the name > of my php file? > > This is what I have: > > Minute Hour Day Month Weekday Command > 1 8 1-7 1-31 > * myPage.php > > The reason I am asking is I don't have a clue what PHPadmin wants in > the command box. All I want to do is run the php script. > > Thanks, > janis usually you would put the path to the php interpreter followed by any required options followed by the script file name On May 27, 12:17 pm, JRough <jlro...@yahoo.com> wrote: > I want to run a php script every day. The page goes to a directory > and > parses a file and add...

Web resources about - PHP is looking for php.ini file in c:\windows - comp.lang.php

Brothers Among 3 Brussels Suicide Attackers; Another Assailant Is Sought
BRUSSELS — Three suicide bombers — including two brothers — carried out the attacks on Brussels on Tuesday, the Belgian authorities announced ...

Let’s See: will S6 cases fit on a Galaxy S7?
So you've got your hands on a Samsung Galaxy S6 and you're planning on updating to a brand new Galaxy S7 in the immediate future. You want to ...

Google launches service to make machine learning easier
Google is making it easier for businesses to take advantage of the machine learning revolution with a new product for building models that predict ...

Bill Requiring Refugees to Register Passes SC State Senate
The South Carolina Senate has passed a bill setting up a registry for refugees that would be the first of its kind in the country if it becomes ...

Critics are crushing 'Batman v Superman' from every angle
As a society, we love superhero movies — but when a movie like Batman v. Superman: Dawn of Justice comes along, we're just as likely to love ...

Star Wars: Battlefront ‘Outer Rim’ update now available
Yesterday brought a big Star Wars: Battlefront update, and with that updates gamers get access to a bunch of new stuff: Hutt Contracts, new firearms, ...

Court: Racially Biased Code Words Used in NY Housing Case
A federal appeals court says officials in a suburban New York village acquiesced to race-based opposition to a housing project

Google adds ride-sharing tab to Maps for iOS
Google today updated its Google Maps iOS app to include a ride-sharing tab it introduced for Android owners just last week. While Uber is the ...

Eye-tracking VR headset startup FOVE raises $11M Series A led by Colopl VR Fund, with participation from ...
Catherine Shu / TechCrunch : Eye-tracking VR headset startup FOVE raises $11M Series A led by Colopl VR Fund, with participation from Samsung ...

Seattle streets closed all day for man at top of tree - KIRO-TV
A crowd of people gathered around the scene next to the Macy’s building on Tuesday morning when fire crews first responded. At first it was ...

Resources last updated: 3/23/2016 10:41:42 PM