• Advertisement
Sign in to follow this  

[web] Cannot make php work under Vista

This topic is 3764 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I'm trying to make Php working under vista. I was able to install (at least I think) by manually assigning the php extension with the php-CGI.exe app. I use IIS 7.0. First I wrote a basic test file to check if the engine was properly working. If I try to open the page I get a "HTTP Error 502.2 - Bad Gateway" error page. Then I tried to run php.exe with the command pxp.exe -1 > test.html but I get a "cli has stopped working error". The same with php.exe -h. I don't know if the two problems are related or not. I'm using the lastest php release. Someone knows what is the cause of the problem? Thank you!

Share this post


Link to post
Share on other sites
Advertisement
I had a similar issue a while back, which I resolved by having the command prompt run under administrator privilleges.

Create a new shortcut, and enter the path as "cmd".

Once its setup, right click on it and select properties, theres a checkbox which allows you to always run it as administrator. Apply that and then see if it works.

Share this post


Link to post
Share on other sites
Thank you but under the tab "compatibility" the "run this program as an administrator" is disabled (even if I login as an administrator). That said, I also executed php.exe logged as administrator and it gave me the same problems. I don't knwow if there is some ther property to set (Vista ask me explicit permission to do everythings, and I really mean 'everythings' :-)

Sorry, I'm really new to Vista (only a few days) and I don't know how to solve this issue...

Share this post


Link to post
Share on other sites
Dont try and run PHP.exe logged in as administrator, right click it and select "run as administrator". Being an administrator in Vista doesnt mean that an exe is going to run with admin's privilleges. If this option is greyed out then you are probably going to have to either find out why and get it resolved, or turn off UAC and reinstalling PHP.

The other solution I heard when I had this problem was downloading the latest PHP binaries and place them into where you installed PHP originally (eg: C:\php) and making sure you overwrite everything.

Share this post


Link to post
Share on other sites
I already had UAC disabled, but I'm not able to find a way to enable "run as administrator" (are you sure that it is enabled with UAC disabled?).
My problem is that when I run php.exe -i, it actually prints the info, only causes the "cli has stopped to work" error just before closing...

I will try again with the administrative privileges... Othe ideas?

EDIT:by the way, I've also overwritten everything with the latest binary (I already had the latest binary, but I did it anyway) and nothing changed...

EDIT2: I've also run the console with administrator privileges by using the run as administrator command (right click on the cmd link) but, again, nothing changed.

Share this post


Link to post
Share on other sites
I've found a site where they say that many people had this problem with php 5.2.2 and that they solved it upgrading to the 5.3. Well, I wonder if with the 5.4 they reintroduced this problem...

Share this post


Link to post
Share on other sites
Out of interest is PHP installed in your program files folder? If so that could be the source of the problems given the write permissions assosciated with it.

I successfully installed an all in one package (XAMPP) so PHP definetly works with vista.

http://sourceforge.net/project/downloading.php?groupname=xampp&filename=xampp-win32-1.6.4-installer.exe&use_mirror=heanet

Share this post


Link to post
Share on other sites
Quote:
Original post by Sonnenblume
Out of interest is PHP installed in your program files folder? If so that could be the source of the problems given the write permissions assosciated with it.

I successfully installed an all in one package (XAMPP) so PHP definetly works with vista.

http://sourceforge.net/project/downloading.php?groupname=xampp&filename=xampp-win32-1.6.4-installer.exe&use_mirror=heanet


Damn, I've already had another program with this problem... When I go at work tomorrow I will give it a try because I have PHP installed in the program files folder indeed!
I will let you know :-)

Thank you!

Share this post


Link to post
Share on other sites
I have no luck! I've given full rights for the php dir but the problem was still there. Then I used the non-installer version of PHP, I put it in the document folder and nothing changed...

Other options?

Thank you anyway!

Share this post


Link to post
Share on other sites
Have you tried totally uninstalling all instances of PHP, and then reinstalling it in a directory other than program files?

Have a read of this, it will explain the issues assosciated with using the program files directory.

http://www.clipboardextender.com/off-topic/vista-program-files-hide-and-seek

Interestingly enough, Microsoft have achknowledged that Visual Studio examples will also have the same issues if installed in Program Files. And their suggestion? Install them elsewhere :)

Share this post


Link to post
Share on other sites
I uninstalled PHP and then reinstalled it again in another folder. It still gives me that error. I tried running my php page and now it works (I never tried after the first time, so I don't really know where it was fixed :-(

But again, I wonder what does that error mean, why is it generated and how could I avoid it.

I will report the exact message error:

if I run php.exe (i.e. php.exe -i) it correctly prints the infos on the console, but when finished a messagebox appears with the followin error:

-------------------------------------
CLI has stopped working

A problem caused the program to stop working correctly.
Windows will close the program and notify you if a solution is available.
-------------------------------------

Interestingly enaugh, the console can still be used.

Thank you very much Sonnenblume for your help!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement