473,387 Members | 1,942 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,387 software developers and data experts.

How to set php.ini through Apache

Hi,

I am using PHP through Apache. I need to include dynamic extensions in PHP (ssh2.so).

All i need to know is how to specify the custom php.ini path while starting php through Apache. Because i came to know that dynamic extensions can be loaded only through .ini files.

I tried compiling the php --with-config-file-path=./ and try to place the php.ini under libphp5.so and failed.

Also i tried SetEnv PHPRC /home/users/web/bEXAMPLE/pow.EXAMPLE in .htaccess file and give All permission in httpd.conf file.

I am not clear in using PHPRC variable and how to use the --with-config-file-path. Please clarify me.

My versions:
Apache: 2.0.4.7
PHP:5.2.4
Oct 15 '07 #1
4 2046
ronverdonk
4,258 Expert 4TB
The PHP.INI file is stored in the C:\Windows directory.

Ronald
Oct 15 '07 #2
Hey,

My problem is no linux machine. How can i tell Apache to load an external php.ini file while starting php.

prasanna
Oct 15 '07 #3
Hi,

I got this by adding a line PHPINIDir "conf" in httpd.conf file.

And created a directory "conf" under ServerRoot and place the file php.ini under that directory.

Now the default php.ini is getting override by the file(php.ini) which i kept under ServerRoot/conf directory.

Now i can able to load dynamic extensions in PHP through Apache module.

Thanks for your help.

Prasanna
Oct 16 '07 #4
ronverdonk
4,258 Expert 4TB
Good that you solved it yourself. Also thank you for sharing this solution, so other members can profit from your experience.

Ronald
Oct 16 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
5
by: Grant Collins | last post by:
Hi I am writing a web based application as part of a small project that I am undertaking using servlets beans and jsp. I already have one servlet - bean - jsp page working and I have written...
1
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
19
by: Alex Madon | last post by:
Hello, I am testing a web application (using the DBX PHP function to call a Postgresql backend). I have 375Mb RAM on my test home box. I ran ab (apache benchmark) to test the behaviour of the...
0
by: zhenya.tkachenko | last post by:
Hi! Have a problem with mod_auth_mysql. Compilation and installation of module done ok: # /usr/local/apache/bin/apxs -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz...
6
by: MaiyaHolliday | last post by:
Hello, I've recently installed apache on a new computer, and cannot figure out why my site will not process any includes. (it was working on my old one) There are no errors on the page such as...
3
by: amanjsingh | last post by:
Hi, I am trying to implement Java Web Service using Apache Axis2 and Eclipse as a tool. I have created the basic code and deployed the service using various eclipse plugin but when I try to invoke...
0
rsrinivasan
by: rsrinivasan | last post by:
Hi All, When i run my JSP program, ihave the following exception. How i solve this problem? HTTP Status 500 - ...
6
by: josequinonesii | last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet... Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not...
2
by: ramprakashjava | last post by:
sorry still that error exist , how to avoid this deprecated method overriding in my netbeans ! In Bundled tomcat log it shows Dec 30, 2009 9:03:45 PM...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.