473,372 Members | 991 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Alternate location for php.ini

Is there a way to set php.ini to the alternate location?

I'm trying to use 2 version of PHP(php4 and php5), but php.ini is in the
way. Anyone knows how to circumvent this issues? Perhaps there is an env
variable we can set.

Thanks
Jul 17 '05 #1
6 14960
Artco News <ar*******@verizon.net> wrote:
Is there a way to set php.ini to the alternate location?

I'm trying to use 2 version of PHP(php4 and php5), but php.ini is in the
way. Anyone knows how to circumvent this issues? Perhaps there is an env
variable we can set.


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

Second paragraph.

JOn

--
You cannot propel yourself forward by patting yourself on the back.

Jul 17 '05 #2
Are you using in CGI mode or SAPI mode? I'm using the SAPI mode. So, when I
run the phpinfo() it still look at my C:\WINDOWS directory.

I did the above definition and stop/start the apache2 and still no go. Any
idea where should you look. Thanks a bunch.

"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:ok********************************@4ax.com...
On Tue, 04 Nov 2003 19:09:57 GMT, "Artco News" <ar*******@verizon.net> wrote:
I did set the PHPRC(c:\php\config) env var as well as
PHP_INI(c:\php\config\php4.ini) env var but still no go.
PHPRC certainly works, I'm using it right now.

FWIW I used / instead of \, i.e. d:/php

Also make sure that your web server actually gets PHPRC in its

environment; it may be different from yours, particularly if it's running as LocalSystem
instead of a named user.

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

Jul 17 '05 #3
On Tue, 04 Nov 2003 19:58:45 GMT, "Artco News" <ar*******@verizon.net> wrote:
Are you using in CGI mode or SAPI mode? I'm using the SAPI mode. So, when I
run the phpinfo() it still look at my C:\WINDOWS directory.

I did the above definition and stop/start the apache2 and still no go. Any
idea where should you look. Thanks a bunch.


As a module under Apache2.

The Apache service will run as a child of SERVICES.EXE; unless you restart
that it's not going to see the new environment. Rebooting is a fairly sure way
of getting it to restart. ;-)

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #4
I follow your lead and still no go.

First I remove/rename c:\windows\php.ini
Then I created a directory: c:\apps\php\config\php.ini
Then I set envar phprc=c:\apps\php\config(then c:/apps/php/config). And no
luck as well.

I also rebooted my machine. Any ideas. Oh, BTW, I'm running php-4.3.4RC1
"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:vj********************************@4ax.com...
On Tue, 04 Nov 2003 19:58:45 GMT, "Artco News" <ar*******@verizon.net> wrote:
Are you using in CGI mode or SAPI mode? I'm using the SAPI mode. So, when Irun the phpinfo() it still look at my C:\WINDOWS directory.

I did the above definition and stop/start the apache2 and still no go. Anyidea where should you look. Thanks a bunch.
As a module under Apache2.

The Apache service will run as a child of SERVICES.EXE; unless you

restart that it's not going to see the new environment. Rebooting is a fairly sure way of getting it to restart. ;-)

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

Jul 17 '05 #5
On Tue, 04 Nov 2003 21:14:14 GMT, "Artco News" <ar*******@verizon.net> wrote:
I follow your lead and still no go.

First I remove/rename c:\windows\php.ini
Then I created a directory: c:\apps\php\config\php.ini
Then I set envar phprc=c:\apps\php\config(then c:/apps/php/config). And no
luck as well.


It's PHPRC, not phprc.

Is the server picking it up in the environment? Echo out $_ENV['PHPRC'] in a
script.

If not - where did you set it?

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #6
Thanks, that did it. When in doubt, REBOOT!
Thanks a bunch.

By the way, I was trying to install the latest snaps of PHP5 beta2. I had no
such luck. Perhaps you can give me some pointers. I did exactly what the
install.txt said but still got the following error:

The Apache service named reported the following error:
Cannot load X:/Apps/php/php5/php4apache2.dll into server: The specified
module could not be found. .

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:ut********************************@4ax.com...
On Tue, 04 Nov 2003 21:14:14 GMT, "Artco News" <ar*******@verizon.net> wrote:
I follow your lead and still no go.

First I remove/rename c:\windows\php.ini
Then I created a directory: c:\apps\php\config\php.ini
Then I set envar phprc=c:\apps\php\config(then c:/apps/php/config). And
noluck as well.


It's PHPRC, not phprc.

Is the server picking it up in the environment? Echo out $_ENV['PHPRC']

in a script.

If not - where did you set it?

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Guy Scharf | last post by:
We have a set of HTML files that serve as help to an application. When the user requests help, we start the default browser with the appropriate HTML file. Some of our HTML files will link to...
4
by: Mark A | last post by:
Trying to upgrade alternate FP9 to alternate FP9a on Red Hat Linux. After running the following command: ../installAltFixPak -y it says it was successful, but no new directory is created in...
2
by: Hers2keep | last post by:
I have a report that prints daily. The report needs to print whether or not there are records available. I read in an old post on this group that putting an unbound text box in the report footer,...
1
by: Eric Lindsay | last post by:
I am trying to understand the differences between and uses of persistent, default and alternate styles. I have read http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on...
1
by: delwar66 | last post by:
Hi Is anyone here who can help me to get this scripts running under alternate credentials................. ''''''''''''''''''''''''''' ''''''''''''''''''''''''''' ' Monitor EDID...
5
by: Michael R | last post by:
Searching the net I've found a simple technique to add row numbers and alternate colors (for the even and the uneven row) to a continuous form. 1st step: Create a textbox, send it to background...
1
by: Chandra | last post by:
If a iframe src link is not available, how can i provide a default site or alternate site for the iframe to use?
9
by: johkar | last post by:
I need some browser implementation clarification. In the below example, the alternate stylesheet could be invoked by user agents that support alternate stylesheets or by script. Are there any...
6
by: Mark A | last post by:
In version 8.2 ESE we used alternate fixpacks to allow multiple fixpack levels for different instances, and to allow an instance to be deprecated back to the previous fixpack (with certain...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.