473,770 Members | 4,522 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

probably stupid problem

hi,

i installed php on my XP Prof. PC (including IIS, Mysql)

a basic command like $PHPLIB_DIR = $_SERVER['DOCUMENT_ROOT'] .
'/phplib';

is not working in php

what's wrong ?
Jul 17 '05 #1
3 1483
Snah wrote:
i installed php on my XP Prof. PC (including IIS, Mysql)

a basic command like $PHPLIB_DIR = $_SERVER['DOCUMENT_ROOT'] .
'/phplib';

is not working in php

what's wrong ?


*HOW* is it not working?
What does the basic command do? and what did you expect it to do?

Is there an error message? A warning? A notice?
[ enable notices by issuing ]

<?php ini_set('error_ reporting', E_ALL); ?>

[ at the top of your scripts or, perhaps ]
[ better, by reconfiguring php.ini ]

I remember a long time ago when I had PHP working under IIS. Some
$_SERVER indexes available for Apache are not available for IIS (and
vice-versa); I don't remember which.
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #2

"Pedro Graca" <he****@hotpop. com> wrote in message
news:c1******** *****@ID-203069.news.uni-berlin.de...
Snah wrote:
i installed php on my XP Prof. PC (including IIS, Mysql)

a basic command like $PHPLIB_DIR = $_SERVER['DOCUMENT_ROOT'] .. '/phplib';

is not working in php

what's wrong ?


*HOW* is it not working?
What does the basic command do? and what did you expect it to do?

Is there an error message? A warning? A notice?
[ enable notices by issuing ]

<?php ini_set('error_ reporting', E_ALL); ?>

[ at the top of your scripts or, perhaps ]
[ better, by reconfiguring php.ini ]

I remember a long time ago when I had PHP working under IIS. Some
$_SERVER indexes available for Apache are not available for IIS (and
vice-versa); I don't remember which.
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--


Your right that's the problem, in the meantime i discovered the phpinfo()
function call. This allows me easily to compare the different platforms.
Thanks for your tip
Jul 17 '05 #3
Snah wrote:
Your right that's the problem, in the meantime i discovered the phpinfo()
function call. This allows me easily to compare the different platforms.
Thanks for your tip


You can print all the variables in $_SERVER with

<?php
echo '<pre>';
print_r($_SERVE R);
echo '</pre>';
?>

for both servers, and print/compare the output.
It's easier than the output of phpinfo() :)
I also remember I ended up doing something like:

<?php // config.inc.php
if (stristr(php_sa pi_name(), 'apache') {
$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
$OTHER_VARS = $_SERVER['OTHER_VARS'];
} else { // IIS
$DOCUMENT_ROOT = $_SERVER['ROOT_DIRECTORY ']; // probably wrong
$OTHER_VARS = $_SERVER['EXTRA_VARS'];
}
?>

and then require that file (which had more things in it) and using

$DOCUMENT_ROOT (instead of $_SERVER['DOCUMENT_ROOT'])

for scripts running on apache or IIS.
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #4

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

Similar topics

119
4635
by: rhat | last post by:
I heard that beta 2 now makes ASP.NET xhtml compliant. Can anyone shed some light on what this will change and it will break stuff as converting HTML to XHTML pages DO break things. see, http://www.alistapart.com/articles/betterliving/ I read on http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnnetdep/html/netfxcompat.asp It said they changed stuff like this
9
1571
by: noone | last post by:
I have a database file that I use an autonumber field as the primary key index. Because of some rearrangements in the past, this index does not match the order that I would like it to be in, that is date order. What I would like to do is to eliminated the primary key field (I know how to do this), sort on the date field, and then reindex with a new autonumber field. Every time I try, however, the default sort field left over from the...
4
2731
by: Andy Proctor | last post by:
I hope there is an answer out there.... I have a simple database structured like this (non relevant tables and fields omitted) Members table memberID memberFname memberLname memberNokID
2
2309
by: Lampa Dario | last post by:
Hi, where is this stupid error in this program? When I execute it, i receive a segmentation fault error. #include <stdio.h> int main(int argc, char *argv, char *env) { int i=0; int l=0; int word=0; char *querystring; querystring=malloc(sizeof(char)*100000); if (getenv("QUERY_STRING")==NULL)
3
7113
by: Catweasel | last post by:
I'm new to C++ and have been chucked in at the deep-end. I have a C++ console app that works fine. All I want to do is write to file however as soon as I include the fstream library and try to compile VS .net chucks out errors, lots of them: c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\cstdio(17) : error C2143: syntax error : missing '{' before ':' c:\Program Files\Microsoft Visual Studio .NET
5
1717
by: Guoqi Zheng | last post by:
I think I have this kind of problem very often, now it is really making me crazy. VS.NET always want to change my html code. Ok, that is fine as long as Vs.Net can ask my confirmaton first. For example, I have below in header part of my html page. <base href="http://localhost/more/"> When I click save, VS.NET change it back to <base href="http://localhost/more"> automatically without asking me or anything. It just remove the last "/" by...
3
1366
by: Rob Mayo | last post by:
This is a stupid problem to have, but here goes. I wanted to make like an Outlook-looking app. Multiple splitters, panes, etc. If I ... 1. Take a Form, add a TreeView, dock it Left. 2. Add a Splitter, dock it Left. 3. Add a ListView, dock it Full ....I have no problems, but If I...
1
5905
by: Stef Mientki | last post by:
Does anyone know the equivalent of the MatLab "diff" function. The "diff" functions calculates the difference between 2 succeeding elements of an array. I need to detect (fast) the falling edge of a binary signal. There's derivate function in Python diff, but when you use an binary (true/false) input, it also detects rising edges. Probably a stupid question,
0
9439
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
10071
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
10017
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,...
1
7431
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
5326
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
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3987
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2832
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.