Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Site works fine on Apache but gives errors in IIS

Status
Not open for further replies.

SLMHC

MIS
Jul 23, 2004
274
CA
Ive been developing a site on my local Apache box for a friend . His host uses IIS. When i uploaded the site i now get errors and my forms no longer work.

I thought php was cross platform. Is there anything i should automatically change for a move to IIS?

-Dave
 
how about starting with telling us the errors you're getting...

-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
Compare the PHP setup on both machines.
Print out the phpinfo() and compare the settings, it will give clues as to what is different.
This has probably nothing to do with the web server.
 
Your errors in php.ini are set to "notice", try changing that to "warning" or higher to match your Apache setup.

Also correct line 5 of div_ale.php. This is the only one that I looked at; anywhere else you entered "localhost" without the quotes needs to be changed.
 
I caught that just after i posted. i should have done this sooner but im now in the process of moving my db connection info to an include file.

-Dave
 
You're getting the 404 error because you're referencing PHP_SELF but should instead be referencing $_SERVER['PHP_SELF'] in line 28 of add_contact_al.php

How did I know? I actually looked at the HTML source of the page that script produced.


As far as those "undefined index" errors go:

Insufficient data for a meaningful answer. No one on this site has any idea what lines 5, 6 and 7 of that script looks like.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
here it is:

$Team=$_POST['Team'];
$GM=$_POST['GM'];
$Email=$_POST['Email'];

-Dave
 
Then those errors makes perfect sense. If I go directly to that page, I have submitted no form to the script, so $_POST will be empty. So those indeces do not exist.

You're getting those errors because your script assumes the variables will exist. It should check for the existence of the variables in $_POST before trying to use them. isset() and array_key_exists() are two candidates for testing functions.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top