473,738 Members | 9,555 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Site for tips on server neutrality of PHP code?

I'm working on a site that's being developed on Apache/Linux and going to
be hosted on IIS/Windows. Anyone know of a site with good tips on possible
pitfalls, things to look for. Typical things I'll be looking to do that I
can see tripping me up include file upload, email, etc.

I'll be googling until then, but I thought I'd ask as well.

Preston
Jul 17 '05 #1
4 1762
Preston Crawford wrote:
I'm working on a site that's being developed on Apache/Linux and going to
be hosted on IIS/Windows. Anyone know of a site with good tips on possible
pitfalls, things to look for. Typical things I'll be looking to do that I
can see tripping me up include file upload, email, etc.


The super-global array $_SERVER does not have the same keys.
If you rely on $_SERVER['DOCUMENT_ROOT'], $_SERVER['SCRIPT_FILENAM E'] (IIRC),
maybe others (I can check tomorrow) you'll have a nasty surprise when
you switch servers.
--
USENET would be a better place if everybody read: : mail address :
http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
http://www.expita.com/nomime.html : to 10K bytes :
Jul 17 '05 #2
Pedro Graca <he****@hotpop. com> wrote in message news:<c3******* ******@ID-203069.news.uni-berlin.de>...
Preston Crawford wrote:
I'm working on a site that's being developed on Apache/Linux and going to
be hosted on IIS/Windows. Anyone know of a site with good tips on possible
pitfalls, things to look for. Typical things I'll be looking to do that I
can see tripping me up include file upload, email, etc.


The super-global array $_SERVER does not have the same keys.
If you rely on $_SERVER['DOCUMENT_ROOT'], $_SERVER['SCRIPT_FILENAM E'] (IIRC),
maybe others (I can check tomorrow) you'll have a nasty surprise when
you switch servers.


I assume the same is true of $HTTP_SERVER_VA RS? (I work on a project
that stays backwards compatible with PHP 4.0.6).
Jul 17 '05 #3
lawrence wrote:
Pedro Graca <he****@hotpop. com> wrote in message news:<c3******* ******@ID-203069.news.uni-berlin.de>...
The super-global array $_SERVER does not have the same keys.
If you rely on $_SERVER['DOCUMENT_ROOT'], $_SERVER['SCRIPT_FILENAM E'] (IIRC),
maybe others (I can check tomorrow) you'll have a nasty surprise when
you switch servers.


I assume the same is true of $HTTP_SERVER_VA RS? (I work on a project
that stays backwards compatible with PHP 4.0.6).


Yes, just tested it.

I've just run print_r($_SERVE R) on both IIS and Apache.
As it is, what I said before is wrong (sorry everyone), both
[DOCUMENT_ROOT] and [SCRIPT_FILENAME] are available under both servers.
For my configuration this is what I found (unless I messed up again):

$_SERVER keys available under both servers
[DOCUMENT_ROOT]
[HTTP_*]
[PHP_SELF]
[QUERY_STRING]
[REMOTE_ADDR]
[REQUEST_METHOD]
[REQUEST_URI]
[SCRIPT_FILENAME]
[SCRIPT_NAME]
[SERVER_NAME]
[SERVER_PORT]
[SERVER_PROTOCOL]
[SERVER_SOFTWARE]

$_SERVER keys available under Apache but NOT IIS
[COMSPEC]
[GATEWAY_INTERFA CE]
[PATHEXT]
[PATH]
[REMOTE_PORT]
[SERVER_ADDR]
[SERVER_ADMIN]
[SERVER_SIGNATUR E]
[SystemRoot]
[WINDIR]

$_SERVER keys available under IIS but NOT Apache
[ALL_HTTP]
[APPL_MD_PATH]
[APPL_PHYSICAL_P ATH]
[AUTH_TYPE]
[AUTH_USER]
[CONTENT_LENGTH]
[HTTPS]
[INSTANCE_ID]
[INSTANCE_META_P ATH]
[LOGON_USER]
[ORIG_PATH_INFO]
[ORIG_PATH_TRANS LATED]
[PATH_INFO]
[PATH_TRANSLATED]
[REMOTE_HOST]
[REMOTE_USER]
[url]

--
USENET would be a better place if everybody read: : mail address :
http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
http://www.netmeister. org/news/learn2quote2.ht ml : "text/plain" :
http://www.expita.com/nomime.html : to 10K bytes :
Jul 17 '05 #4
Pedro Graca wrote:
Yes, just tested it.

I've just run print_r($_SERVE R) on both IIS and Apache.
As it is, what I said before is wrong (sorry everyone), both
[DOCUMENT_ROOT] and [SCRIPT_FILENAME] are available under both servers.


That data is slightly misleading... I have a more comprehensive look at
PHP 4.3.4 on Apache 1.3.29 and PHP 4.3.3 on IIS 5.1 that I just created
for another project that I've been working on.

http://www.koivi.com/apache-iis-php-server-array.html

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
SEO Competition League: http://seo.koivi.com/
Jul 17 '05 #5

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

Similar topics

2
2335
by: Benny Alexander | last post by:
Hi, We are developing a CMS in ASP and before we write the code for a complete site search script and Forum, we want to check if is there any good ones? Kindly please let us know. Thanks in advance Benny
2
1505
by: Dhanraj K.S | last post by:
Hi All, Is there any Site search application which is extremely powerful. It would be a great help if some one can suggest! Thanks in advance,
3
2510
by: Carol | last post by:
What's the best way to do a site search of my site? I am using asp and access heavily on a regular ISP google? Or write a bunch of queries? what else is there?
1
2634
by: D. Lee Christopher | last post by:
Can anyone point me to a good tutorial for creating a site-level search applet? I am trying to create a virtual catalog of sorts, and I would like to be able to search the catalog and have the results displayed on the same page with one column text and an image of the product. I've seen several tutorials that create site-level searches that will bring back a search results page with options to choose from. I am looking to create a...
2
2210
by: Shige | last post by:
I have a .Net website hosted on another IIS6.0. Whenever I tried to access my website after a long time, it will take forever to load, my browser will just show a blank white page and the progress bar is loading so slow. However after it is loaded, the subsequent pages is loaded up almost instantly. And even after i close my IE and reopen again and load up the website again, it is still instantly loaded up. Somehow the problem only...
2
1356
by: Wells | last post by:
Debate Simmering in US Over Regulation of Internet A heated debate is shaping up in Washington about a concept some activists are calling Internet network neutrality, known more popularly as net neutrality. At issue are calls for the U.S. government to regulate the Internet, and, in effect, opponents say, determine which companies get bigger shares of the profits. To read the full text, please go to:...
48
2473
by: northband | last post by:
Hi, I am interested in re-writing my website in Python vs PHP but have a few questions. Here are my specs, please advise as to which configuration would be best: 1.Dell Poweredge Server, w/IIS, currently Windows but considering FreeBSD 2. Site consists of result pages for auctions and items for sale (100 per page) 3. MySQL (Dell Poweredge w/AMD) database server connected to my web server
3
1400
by: Mark C | last post by:
Hi I was in the progress of developing a web site whereby developers can do free online tests on various programming languages. After initial feedback I managed to fix quite a few issues and changed the look and feel. I would just like some futher comments\tips\hints or feedback The site is http://www.quiznetonline.com
15
1239
by: dan | last post by:
I changed website hosts. The code that worked on my old host does not work on the new host. It appears that the php code is not running or running correctly. Nothing related to php is displaying. Not even the php code. Why would it work on one host and not the other? Apache 2.2.8 Any ideas? The new host is not too excited about helping. Are there any places to validate php code?
0
8788
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
9476
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...
1
9263
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
8210
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
6751
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
6053
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
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
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.