473,387 Members | 1,493 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.

php.ini location question

I'm trying to set the PHP include path for a PHP class on my web host, but I
don't have access to the root php.ini.

My host allows me to have my own php.ini which applies to each directory it
appears in but it seems I need to have a php.ini in each and every directory
I want my include path to apply in.

I would rather avoid having a php.ini in each directory, since it's a class
I use all over my site (phpMailer - excellent multipart email class).

Is there any way to make my php.ini in my webserver root apply to all
sub-directories, or another way to achieve this (btw - I can't use
..htaccess) ?

Thanks in advance.
Jul 17 '05 #1
1 4581
furry wrote:
I'm trying to set the PHP include path for a PHP class on my web host, but I
don't have access to the root php.ini.

My host allows me to have my own php.ini which applies to each directory it
appears in but it seems I need to have a php.ini in each and every directory
I want my include path to apply in.

I would rather avoid having a php.ini in each directory, since it's a class
I use all over my site (phpMailer - excellent multipart email class).

Is there any way to make my php.ini in my webserver root apply to all
sub-directories, or another way to achieve this (btw - I can't use
.htaccess) ?


If you only want to set the include path, you can use ini_set to do the
job like this:

ini_set('include_path',dirname(__FILE__).'/php.ini');

Put that in a file in your docroot, put the php.ini file in the same
directory, then make sure that you include the file with that call in it
in your script.

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Jul 17 '05 #2

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

Similar topics

19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
13
by: Jerry Manner | last post by:
Hi I have a problem using the location.href("ProductL.htm") javascript code. Using this code on my system ( W98 SE, IE 6.0) is working correctly. But if a user has W2000 IE 5.0 it doesn't work....
11
by: William Buch | last post by:
I have a strange problem. The code isn't written by me, but uses the qsort function in stdlib. ALWAYS, the fourth time through, the memory location of variable list (i.e. mem location = 41813698)...
1
by: Colin McGuire | last post by:
Thanks everyone for help in my previous post. Using the "Point.op_Addition" from the previous post I have to now focus on the real problem. I need to manually position a new form so that its...
6
by: G*rd*n | last post by:
I have been using the HTTP "Location" reponse header to direct a symbolic request to a CGI program to an actual URL/file. For example, let us suppose the CGI program's table indicates xyz ->...
13
by: Marc | last post by:
The first part of the below writes the name and location of all buttons on a from to a text file. The second part reads that information back in and recreates the buttons. My problem is reading...
2
by: Jeff | last post by:
I'm very new to javascript and need only a small amount in an asp.net application I'm working on. I apologize if I'm not using the correct terminology to describe the problem. I got the code below...
1
by: Choronzon | last post by:
I have a player table, which is made up of fields: id SERIAL NOTNULL AUTO_INCREMENT (this is the primary key, auto increment so each player is assigned a unique key) player VARCHAR (just a...
5
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the text in the url/location bar?...
6
by: Marcolino | last post by:
Hi all, I have a simple problem but I don't know which is the best way to solve it. I need to savo into a table into access DB the location and the size of a form. Is there a way to save...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.