logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Going crazy trying to get PHP5 to run with apache on win 7
Author
cnielsen4211



Joined: 22 Jan 2010
Posts: 4

PostPosted: Fri 22 Jan '10 9:27    Post subject: Going crazy trying to get PHP5 to run with apache on win 7 Reply with quote

I have spent two days trying to get Apache to run with php5 on a win 7 home premium system.

I have downloaded installed and uninstalled Apache 2.2 latest and Apache 2.0.58 which wont install on win 7

Can anyone tell me which versions of Apache are compatible with php5 and how to get it running.

I have tried almost everything i have found on the web... none work...

anybody? There are lots of well meaning helps on the web but other than setting LoadModule C:\PHP5\php5apache22.dll etc there's no options that work.
PHPIniDir stops Apache cold...

version 2.0.58 wont run on win 7 .. wont even install

I have used Apache &PHP on XP and no problems but on windows 7 it just doesn't work.. getting desperate...

Kind Regards
cnielsen4211
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 22 Jan '10 11:08    Post subject: Reply with quote

If you follow this tutorial it will run on Win7. Notice that you don't need to install the Microsoft VC++ Redistributable.


if you still have a question please ask again.
Back to top
wm003



Joined: 24 Mar 2006
Posts: 88

PostPosted: Fri 22 Jan '10 13:54    Post subject: Reply with quote

Apache 2.2.14 VC9 from apachelounge
+ PHP 5.3.1 VC9 TS from php.net
+ mod_fcgi 2.2b VC9 from apachelounge
+ eaccelerator SVN279 VC9 (from user millennium)

work fine on win7 for me
Back to top
Millennium



Joined: 17 Apr 2006
Posts: 179
Location: Leiderdorp, NL, EU

PostPosted: Fri 22 Jan '10 14:58    Post subject: Reply with quote

wm003 wrote:
Apache 2.2.14 VC9 from apachelounge
+ PHP 5.3.1 VC9 TS from php.net
+ mod_fcgi 2.2b VC9 from apachelounge
+ eaccelerator SVN279 VC9 (from user millennium)

work fine on win7 for me


If you use mod_fcgid for php, you can run the NTS version of PHP
Back to top
cnielsen4211



Joined: 22 Jan 2010
Posts: 4

PostPosted: Sun 24 Jan '10 5:15    Post subject: Nope... Still got problems Reply with quote

wm003 wrote:
Apache 2.2.14 VC9 from apachelounge
+ PHP 5.3.1 VC9 TS from php.net
+ mod_fcgi 2.2b VC9 from apachelounge
+ eaccelerator SVN279 VC9 (from user millennium)

work fine on win7 for me


that's a good tutorial, but the error I get when I try to start httpd from a cmd prompt is that the sockets are not open...

"Could not bind to address 0.0.0.0:80 no listening sockets available, shutting down."

I looked up how to open sockets and did what I thought was right, but that didn't fix anything..

at least i know the reason now, thanks..

Anyone know how to open sockets on win 7???
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sun 24 Jan '10 17:45    Post subject: Reply with quote

There is a program listen on port 80 often skype is the problem.

Open a command line (cmd.exe) as Administrator and type
netstat -ab
Than you can see which program is listen on port 80.
Back to top
wm003



Joined: 24 Mar 2006
Posts: 88

PostPosted: Mon 25 Jan '10 10:26    Post subject: Reply with quote

Millennium wrote:

If you use mod_fcgid for php, you can run the NTS version of PHP


Never got success with any NTS version, apache always crashes with fcgi (but i have no need to use NTS anyway) Smile
Back to top
cnielsen4211



Joined: 22 Jan 2010
Posts: 4

PostPosted: Thu 28 Jan '10 3:53    Post subject: Still no good... Reply with quote

I've shut down Skype and messenger and run NetStat and there are no programs using port 80...

Other ports above 50,000 are in use but not port 80

the message reads

" An attempt was made to access a socket in a way forbidden by it's access permissions.. Make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down.."

I gather I have to find out how to set permissions on socket 80, without being bombarded by the latest and greatest virus plague.

Anybody know how to do this on Win 7?
Back to top
cnielsen4211



Joined: 22 Jan 2010
Posts: 4

PostPosted: Thu 28 Jan '10 4:58    Post subject: I think I've got IIS working, so that will do me for now Reply with quote

I have this urgent project and I could do it easily on XP. but on win 7? Just can't get apache to run...

But I think I've got IIS running, so any server in a storm..

I'll come back to apache after the crisis subsides..
Back to top
AndrushkaUS



Joined: 17 Mar 2010
Posts: 1
Location: Europe

PostPosted: Wed 17 Mar '10 17:12    Post subject: Reply with quote

Same issue. Couldn't get Apache to work on Win 7, also didn't want any IIS stuff.
So I had to use Apache emulator - Helicon APE. Still using it.

Regards
Andrew
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 17 Mar '10 23:19    Post subject: Re: Still no good... Reply with quote

cnielsen4211 wrote:

" An attempt was made to access a socket in a way forbidden by it's access permissions.. Make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down.."


Did you install any virus scanner? Any exra firewall?
Back to top
black_harry



Joined: 22 Feb 2010
Posts: 15
Location: Germany, Stuttgart

PostPosted: Wed 24 Mar '10 9:06    Post subject: Same problem with W2K8 Server + Solution Reply with quote

On my Server I had the same problem - Port 80 was occupied by another process, but no IIS installed.
"netstat -ano" showed that the PID 4 occupied the port. PID 4 = "System".
This came from the "Windows Remote Management" / Powershell 1.x installation.
For WinRM the port 80 / 443 is shared - and Apache does not know how to share a port under Windows.

If this scenario matches your problem, here's the
SOLUTION:
a) install newest WinRM / Powershell 2.0. Then a different port (5985 / 5986) is used for WinRM, Port 80 / 443 is free again.
See Microsoft-articles:
KB960568
KB968930
-> Install Both, restart required.

BUT (Short extraction from the WinRM Release Notes):
If you upgrade from a previous version of WinRM, during the upgrade, any WinRM listeners on port 80 or 443 are automatically migrated to ports 5985 and 5986 while retaining the original configuration settings. In addition, the existing listeners on ports 80/443 are flagged as “compatibility” listeners and continue to listen on these ports.

b) configure the WinRM compatibility Listener not to listen any more on Port 80 (and 443):
on command-line run:
winrm set winrm/config/service @{EnableCompatibilityHttpListener="False"}
winrm set winrm/config/service @{EnableCompatibilityHttpsListener="False"}

Then Apache should be able to connect to Port 80 / 443.
Back to top
tryy



Joined: 20 Jun 2010
Posts: 2

PostPosted: Sun 20 Jun '10 14:36    Post subject: Reply with quote

I have same problem but i got evaluation copy that dosnt allow download from microsoft's site.
Is there a way to apply solution on evaluation copy of windows?

I can run powershell but i think its powershell 1. Are there other ways to do to?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 21 Jun '10 15:55    Post subject: Re: Same problem with W2K8 Server + Solution Reply with quote

black_harry wrote:

b) configure the WinRM compatibility Listener not to listen any more on Port 80 (and 443):
on command-line run:
winrm set winrm/config/service @{EnableCompatibilityHttpListener="False"}
winrm set winrm/config/service @{EnableCompatibilityHttpsListener="False"}


See solution b) Not nice but it seems to work
Back to top
tryy



Joined: 20 Jun 2010
Posts: 2

PostPosted: Tue 22 Jun '10 9:24    Post subject: Reply with quote

Thanks for reply. Something else might be the problem, unfortunatly. The
"winrm quickconfig"
gives "WinRM is not set up to receive requests on this machine."
Back to top


Reply to topic   Topic: Going crazy trying to get PHP5 to run with apache on win 7 View previous topic :: View next topic
Post new topic   Forum Index -> Apache