First, let me extend my Thank you to all that help me in advance. I'm new to the boards today, but only in a posting sense.

I have been setting up Linux webserver for years now, while I was in college, using apache, php, etc. I have been coding php for years, but I am baffled at this one, and its probably something that veterans have seen before, and that's why I'm calling out for help.

I started a new job, and was asked to move the internal php application from one windows server to another windows server. Now, I only have limited access to the old server, because of its importance, but I have Admin rights to the new Windows Server. Now, since I am using someone else code, I wanted to mirror the servers, since everyone is happy with the site itself, and its running very smoothly.

So I setup IIS, and followed this tutorial on installing/setting php (down to the letter). Since I have never setup a Windows Web Server before. The Code was accessing MS SQL remotely, so I installed Enterprise Manager and uncommented out the required extensions. (Actually I did all of this 3 times before I got it right 🙂 ).

I then copied everything over into the directory that I made as root in IIS. Everything works correctly. It connects to the database, it uses Sessions correctly, it displays everything... But then I noticed my problem. It doesn't seem to be recognizing variables.

The gentleman before me used Session variables to keep up with the page titles, which is very smart and easily done, but now the page headers read: <?=$_SESSION['currentpage']?>. Its not just Session variables though. He used variables like $url for forms... For example (on the login page):

			<form name="theform" action="<?=$url?>"  method="post">
	

When you hit submit it send you to 'http://site/<?=$url?>' which is no good. :p

Is there something I missed in my php setup or IIS setup?
And like I said, ALL of this works on another Windows 2k3 box with IIS6, but its running PHP 5.0.5. Would that make that big of a difference?

I have also tried (I know its bad, but I wanted to know) setting register_global = On.... But that didn't work either.

I have also noticed that when I change my php.ini on this windows box, it doesn't seem to matter. Its amost like its being loaded on boot.... Any idea on that?

Any help, suggestions, or ideas are GREATLY appreciated.

    If the actual URL that gets called is "http://site/<?=$url?>" then the page that created the html code did not get passed through the PHP engine. Does the page have the proper .php extension? Can you post the code for the page that creates the URL (including the page name)?

    Also, in Linux a change to the php.ini requires a restart of the web server. Probable the same in Windows.

      That line I posted is in index.php. At the very top of index.php it states:

      $url = login.php

      And when I say http://site/<?=$url?> I mean that is what the address bar states.

      ....

      And I am restarting the server every time I make a change.

        What I think I'm ultimately trying to say is that: Variables are not being recognized by the php scripts, it just outputs any variables like regular text in MOST cases. Shortly I will post some code and some screenshots, so there are examples.

          It looks like the php.ini directive "short_open_tag" is turned off. You could either turn it on or, ideal but more tedious, change each instance of the open tag. Then explain to the gentleman before you why short open tags are bad.

            Thanks I'll give it a try and let you know what I find.

            And that gentleman is no longer employed with this company :p

              Write a Reply...