I’m trying to install Magento on IIS6.1 on Windows Server 2008.
When I go to: http://www.mydomain.com/install.php I’m getting this error:
C:Program Files (x86)PHPv5.3/app/Mage.php was not found
I’ve done a day of Google searches and arrived on posts like:
http://www.magentocommerce.com/boards/viewthread/15003/
http://www.magentocommerce.com/boards/viewthread/79826/
http://www.imagedia.com/2010/09/appmage-php-was-not-found-using-magento/
There’s something about disabling PHP safe mode and altering index.php, but they all run on Plesk or at least not IIS.
I have this Handler Mapping in IIS:
Request path: *.php
Module: FastCgiModule
Executable (optional): C:Program Files (x86)PHPv5.3php-cgi.exe
Name: PHP53_via_FastCGI
Restrictions
Mapping: Invoke handler only if request is mapped to: File or Folder
Verbs: On of the following verbs: GET,HEAD,POST
Access: Script
which should be correct according to this blog: http://www.gentex.com.au/info-center/blog/gentexs-web-blog/installing-magneto-on-iis7-ndashwindows-7-and-2008-server
How to fix this error on IIS?
Thanks!!
Locally on my Windows 7 machine with IIS7.5 the installation does work.
Also: I plan to use multiple stores on my Magento installation, don’t know if that requires a different solution.
2
Answers
I solved it. I changed this line in index.php:
to
the DIR function gets the current working directory of the script.
I can now install Magento and view the frontend of my site, but I'm now running into login issues. This may be caused by the fact that my sessions are saved on disk and again the right folder is not found or that I have not set the right folder permissions yet (not even sure if that's feasible when I was able to install Magento in the first place). It appears I'm one step further now though.
I have no idea of how windows works, but I’d think that you don’t put Magento into
C:Program Files (x86)PHPv5.3
. So my guess is that the root folder of the virtual host (or whatever equivalent of those on IIS are) is not correctly defined.can you check that?
ps: any particular reason you’re not using a linux server? I think this is going to give you a lot of troubles down the road.