Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Trying to run INVO test site on IIS 7.5

Having issues running the INVO test site on the following setup:

Windows 7 IIS 7.5 WAMP (for PHP 5.4)

PHP is installed and working properly in IIS 7.5 already Phalcon is installed and displaying as so when calling phpinfo()

The INVO website is installed at the root directory of its website (http://invo:8282).

The info below is what occurs when I try to use the website.

Entering http://invo:8282 in the browser's address bar:

  • Address bar remains at http://invo:8282
  • Home page appears, but no CSS is loaded

Clicking on "About" link

  • IIS error 404.0 Not Found
  • Address bar changes to http://invo:8282/invo/about/index
  • Error pages states:
    • Requested URL : http://invo:8282/public/invo/about/index
    • Physical Path: c:\inepub\wwwroot\invo\public\invo\about\index

Entering http://invo:8282/public/about/index in the browser's address bar:

  • Address bar remains at http://invo:8282/public/about/index
  • About page is loaded, but without CSS

I'm sure that has something to do with routing, but not quite sure how to overcome it.

Any ideas?

Why do you want to run it on IIS?



4.3k
edited Sep '14

It's a system that I've inherited (php on windows) and I need to convert it to MVC.

Why do you want to run it on IIS?

The reason I asked is that when I'm forced to use windows I solve it by using vmware player and installing a virtual linux machine. The other option is to install apache on the windows box. Other than that I don't really know what you could do.

I have found that the amount of time I spend fighting windows is far and beyond the time it takes me to install a vm from scratch and getting everything up and running. Usually it takes me a couple of hours to be running in basic mode and another couple of days having everything humming like a well oiled engine. While doing the same directly in windows is a never ending painful story.



4.3k

Unfortunately, I don't have the luxury of being able to install the VM. This is on one of our clients servers so I don't have the flexibility to do so.

Everything seems to be working correctly, it's only the ReWrite stuff that is not being handled in IIS as well as it does on Apache.

The reason I asked is that when I'm forced to use windows I solve it by using vmware player and installing a virtual linux machine. The other option is to install apache on the windows box. Other than that I don't really know what you could do.

I have found that the amount of time I spend fighting windows is far and beyond the time it takes me to install a vm from scratch and getting everything up and running. Usually it takes me a couple of hours to be running in basic mode and another couple of days having everything humming like a well oiled engine. While doing the same directly in windows is a never ending painful story.

edited Sep '14

I'm sorry I can't help you. I sometimes work with windows admins and they always seem to have many problems i rarely see in other environments, which is why I try to avoid it, it almost always means extra unpaid work for me.



9.5k
Accepted
answer

I solve it by using vmware player and installing a virtual linux machine. The other option is to install apache on the windows box. Other than that I don't really know what you could do.

Haters gonna hate. Phalcon works beautifully on IIS. The rewrite trick is to set server document root to the public folder and use URL rewrite to point everything that's not a file to index.php. That's it.



12.0k

hi nazwa, do you mind sharing your web.config rules? require it to run on iis

I solve it by using vmware player and installing a virtual linux machine. The other option is to install apache on the windows box. Other than that I don't really know what you could do.

Haters gonna hate. Phalcon works beautifully on IIS. The rewrite trick is to set server document root to the public folder and use URL rewrite to point everything that's not a file to index.php. That's it.



9.5k

@Derek, not sure if you still need it, but there you go. With the classic folder structure.

  1. /app
  2. /var
  3. /public <-- index.php + web.config + this is what you set as physical path in IIS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <clear />
                <rule name="index" patternSyntax="Wildcard">
                    <match url="*" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>


12.0k

Had resolved my issue! thanks alot for following up!

@Derek, not sure if you still need it, but there you go. With the classic folder structure.

  1. /app
  2. /var
  3. /public <-- index.php + web.config + this is what you set as physical path in IIS

```xml <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <clear /> <rule name="index" patternSyntax="Wildcard"> <match url="*" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> </conditions> <action type="Rewrite" url="index.php" /> </rule> </rules> </rewrite> </system.webServer> </configuration> ```