SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Aug 26, 2002, 20:43 #1
- Join Date
- Jul 2002
- Location
- Along the Wasatch Fault line.
- Posts
- 1,771
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
localhost development of multiple sites trouble!
I have setup on my machine, PHP, mySQL, and Apache.
I have set my document root with apache to my e: drive's root directory with the intention of being able to develop/test multiple sites at a time simply by accessing each site by typing ht tp://localhost/sitename/testpage (intentional space in http).
However! I have discovered that since I began development of a second site, I can not get the script to access the includes that I have trying to "include" in the script.
The directory structure for each site is like this:
e:/siteOne/includes
e:/siteTwo/includes
I have even created an .htaccess file for each site, but to no avail. The includes of the second site REFUSE to be included, even when I commented out the "include_path" setting in the php.ini file and restarted apache.
I'm at a loss at what to do, or what to change, and any help would be greatly appreciated!John
-
Aug 26, 2002, 21:24 #2
- Join Date
- Feb 2001
- Location
- New Zealand
- Posts
- 516
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How exactly are you calling the includes?
You could always try setting your own include path constant and using that for your includes, eg:
PHP Code:define('INC_DIR', 'e:/siteOne/includes/');
require_once(INC_DIR.'includeFile.inc.php');
Oh no! the coots are eating my nodes!
-
Aug 27, 2002, 08:05 #3
- Join Date
- Jul 2002
- Location
- Along the Wasatch Fault line.
- Posts
- 1,771
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
That's fine, but at the top of all of my scripts I have an include that comes before the definition and so it requires the full path for that include. So when I make the site public, I still have to change the path at least once on ALL of the scripts for that site that have includes. While this does reduce the amount of adjustments that I would have to make, I was hoping there would be an easier way.
I can't believe that you and I are the only ones that write multiple sites at once, locally.
My error reporting is up so high that it even tells me when I have an undefined variable!And for development, I never put @ in front of any function. (I save that for when a site goes public)
John
-
Aug 27, 2002, 19:53 #4
- Join Date
- Feb 2001
- Location
- New Zealand
- Posts
- 516
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Something really weird must be going on then if the files aren't being included and there are no errors being spat out.
Oh no! the coots are eating my nodes!
Bookmarks