473,802 Members | 2,461 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4603
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('includ e_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
31075
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(). The problem is that after the reload, it brings you right to the top of the page. When I click 'refresh" on the original page, it brings me back to the original viewing position. Is there a way to duplicate this in from the popup window. Also,...
13
2194
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. When using this code the browser shows an error on page in the statusbar. If I click on the statusbar to find out what is causing the error I see this description 'The property of this method is not supported by this object' ( I have translated...
11
2861
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) becomes 11, then the program crashes. It is obviously qsort that may me overwritten the used memory location. The weird thing is that it is ALWAYS the fourth time running the program. Below is the code MEMORY LOCATION OK HERE for (i = 0; i...
1
9429
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 upper left hand corner is positioned exactly in the middle of the button that was pressed (Button1). I can't seem to get the knack of Location() and PointToScreen() to position the new form here. According to the help, location() is to do
6
2891
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 -> /this/that/the.other.thing.html, then redirect.cgi?xyz results in the page /this/that... being sent. redirect.cgi is usually in another directory than the page it is to supply. This works fine as far as it goes. A problem arises when the actual...
13
1985
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 the location value back in where I marked ?????????????????????. As it wont accept a string value? Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
2
8782
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 to work under most conditions to capture the client's screen resolution and then redirect to another page (but there likely are better ways to code this). This needs to work under 3 conditions; A) if the current top.location.href is similar to...
1
1719
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 text player name) player_id VARCHAR(text matching the players in-game number)
5
443
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the text in the url/location bar? ----------------------------------------------------------------------- This text can only be altered by changing the URL of the page. The normal solution is to use frames, though this can introduce problems of its own. ===
6
1589
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 Location and Size into a single text field, on I need 4 Field X,Y,Height and Width? If yes, how can convert Location and Size into String and then Back to a Location and Size to apply back to the form?
0
9561
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10532
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10302
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10281
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9111
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7597
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6835
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.