So I installed XAMPP and it worked fine at first (At least I think so. I typed in localhost and got the XAMPP page).
I have the files for the site I'm working on in my Dropbox folder so they stay up to date across my computers. I was looking for a way to point XAMPP to my working folder so I didn't have to work in htdocs and then move it back to Dropbox.
I found this thread:
Make XAMPP/Apache serve file outside of htdocs
And I followed cmcculloh's answer on how to set up a virtual host.
As the last step in his instructions said, I restarted Apache.
Except it won't start.
I click Start in the control panel and it says 'Starting apache service...'
....and it sits there
After Googling about it I saw tips like disable make sure port 80 is clear and disable anti-virus. And use 'netstat -nab' in a cmd prompt to check if something is using port 80
Well AvastSVC.exe is using port 80. What I don't get is why it worked fine after I installed it, with Avast running.... But it wasn't until I tried to restart that suddenly Avast is getting in the way.... So I'm not so sure that that's the problem.
Maybe it's something I did when I was trying to set up the virtual host?
I just want to test php without uploading to a web server D=
Edit:
Oh and btw, I closed Avast and made sure the process was gone but it still shows up under 'netstat -nab'. I looked under Services and there is still an Avast service but it won't let me stop it =S
If this is just for testing/learning/development purposes, perhaps you could try using EasyPHP and set an alias to the Dropbox folder with the HTML files within. Also, I recommend you use port 8080 for development, not port 80.
Related
I have been developing a php project and the wamp server was seems
working fine but suddenly it stops working and i don't know what to do
because when i check its status it says server online and green icon is also
showing but it just does not work whenever i run .php files, Mr. browser
just write it down as i did in notepad++ but before some days it was working
fine, please help me I'm kinda stuck?
I also want to mention that in the mean while I installed tomcat server for some other work is it anything to do with fault because i'm pretty sure both operating on differnet port numbers
use <?php instead of <?or left click wamp > php > settings > short_open_tags
and make sure you are running your scripts through localhost and not just opening the php file in the browser
Read More about wamp problem
If you're definitely viewing the script through your MAMP setup (if your URL bar starts with http:// instead of file://) and it is showing the contents of the PHP file instead of executing the script, it sounds like Apache is running fine, but PHP-FPM is the issue or a misconfiguration between the two. Apache should detect it is a PHP script and ship it to the PHP-FPM process, accept a response then ship it to your browser.
I would recommend checking PHP-FPM logs first. All logs are in MAMP/logs - scroll to the bottom of each one for latest entries. Ensure the service is running as expected and logging hits when Apache serves a .php file. PHP-FPM may be using a socket file (which can hit permission problems) or on a network port (which can be in use/require admin privileges/etc). Otherwise check your config files, or re-install MAMP for fresh config files.
If Apache cannot start, common reasons are;
The port is in use by another application
The port is a low number and you do not have administrator privileges to use that port
Switching from wired to wireless / switching network adapters / changing hostname, etc
Apache is already running, or Apache thinks it is
You must sign out from Skype it'll occupied the port of Apache or you should turn down the server and then restart you pc and turn it on. It will work fine.
I had installed wamp server successfully but after starting all services it's not turning into green. I don't know exact problem also there is no port blocking problem.
Default Apache port 80 is not using by any other program.
I am trying to find out the error but not getting any.
All the error log files are empty.
I also checked mysql port and don't have any issue.
Did you have WAMP instaled before on this current windows machine?
Did you select the explorer.exe when promted?
I had same problem after i tried to instal wamp on same location where the last one was.
You need to uninstall the current wamp, delete the folder, clean you system registries and junk files, use ccleaner for this and then instal wamp again.
I know you are professional but I will give this suggestion considering that you still beginner :
remove this one completely and reboot your machine then create new folder ,if you have tow or three partition , create it in D and name it for example wamp.
when you start installation make sure that you select correct path to your folder wamp and when you write a server name , just write localhost without .com then write the user user#localhost and make password.
after that type at browser localhost and see what what happened.
I can't make a php server run on my local computer. I tryed with wampserver and Easy PHP. I checked the usage of my port:80, I changed the port from :80 to :8080, I gave Apache and mysql the permissions required on the firewall settings... I did everything, but when a type http://localhost with or without the port number browser answer is always the same:
ERR_CONNECTION_REFUSED
Can you help me, please?
While I think this questions is off-topic, I will try to answer it.
I have had problems with Skype and WAMP running at the same time. If you have Skype open, close it and WAMP, then open just WAMP. There is a setting in skype to use an alternate port. It has been covered thousands of times all over the internet.
Close everything you can think of.. Zone Alarm or any other software based firewall, disable Windows firewall, temporarily disable your AV if it has a built in firewall. I am not saying you should run without protection, but you need to identify what is causing the troubles. As far as hardware firewalls, I have a Linksys wireless router (built in firewall) and I have never had to do anything to get WAMP to work behind it.
If you have been messing with tons of settings in your WAMP, then just uninstall it and re-install it. You don't need to change your port to 8080 to get it working, and doing so would require you to always include :8080 in your URL (unless you have it listen on both).
With a stock WAMP, and everything you can think of closed or disabled, try again.
The WAMP icon should be green. Click on it, and go into both Apache and MySQL. They have a "services" sub-menu, where you can start/stop/restart the service. Start should be greyed out, and stop and restart should be available. If you see one of them not started, try clicking "start service". If it still won't start, then click "Install Service". Wait a minute. Then click "Start Service".
For some reason, when I freshly install WAMP, I have to manually install the service on one of them. I don't recall which one. Once I install the service, it then will work. You might have to click the WAMP icon again, and select "Restart All Services". Then go into the Apache and MySQL menus and make sure the services are started.
OK after about an hour of trying all of the fixes and youtubes I could find, I read Wade's approach. So with that knowledge I went:
wamp menu->apache->services->start/resume and boom localhost wamp page popped right up.
This was a fresh install the error for localhost was 404 err connection refused.
I hope this helps your frustration.
I am new to Windows IIS and I need to run a php/mysql application on it. For local php development on windows, I have found WAMP to be the easiest.
But can WAMP be used in this case instead of installing php and mysql separately ?
This needs to be done on an ec2 Windows 2003 instance. So far, I have already tried installing WAMP and setting up apache to listen on port 8080 instead of 80. From inside the remote desktop, both IIS and WAMP work properly in parallel on their respective ports.
However, when I try to connect from another computer using the ip address http://184.**.***.***, IIS works fine serving the default web page but cannot connect to apache on http://184.**.***.***:8080.
Is it possible to use WAMP at all for this purpose and if yes, would there be any disadvantages in using it instead of installing php/mysql seperately ?
Edit :
I dont know if this is a problem of blocked 8080 port. To verify this I stopped IIS and configured apache to listen to 80. Even then http://184.**.***.*** doent show the WAMP homepage. IS anything needed to be configured in IIS ?
RESOLVED :
Added the port 80 in Windows Firewall Exceptions and it started working.
Also, its necessary to select "Put Online" in the WAMP tray otherwise it gives a forbidden response as suggested by some answers.
Thanks
I haven't used EC2 in this way before, but broadly speaking, I'd encourage you to use the same server for development and production environments if at all possible - the installation effort can be a bit of a pain, but it's nothing compared to developing an app locally and then finding an IIS configuration issue causes it to break on production.
This approach also lets you keep your PHP configurations in source code control - php.ini and any modules you're using - and automatically deploy them alongside your application; again, forgetting to deploy the correct PHP.ini usually makes your application do crazy things...
So, your choices appear to be:
- switch off IIS and have WAMP listen to port 80. Not sure WAMP is designed for production level traffic, but in the past, I've run low-traffic public websites in this way.
- work out why port 8080 is blocked, and if it can be unblocked. This would still require you to run your website on an unusual port, which makes for ugly and hard-to-communicate URLs.
- install PHP on your IIS instance. One benefit of having installed WAMP is that MySQL should already be up and running, and the basic PHP installation should also be there; getting PHP to run on IIS is no longer a dark art ([http://php.iis.net][1])
For my money, I'd go for the latter option...IIS is a production quality server, and it's clearly what Amazon want you to use in this instance.
Of course, running IIS on your development environment may be a problem.
Have you put the server online? Think it is offline by default, meaning it's only accessible from your local machine. It's an option in the systray menu to put it online.
If I remember well, there is an option "go public" (or "put online") on the system traya icon of wamp.
This option modifies the httpd.conf to authorize public access.
You should give a try.
On a side note, you can make php work with IIS. This is another option to help you manage your server. (Mysql and Php have to be installed separatly but, this is very easy to do as far as I remember :) )
I have downloaded some files which have .php extension.
Then I installed WAMMP server on my, but I am not able to view those files. I have also turned off the IIS from the add/remove windows program. Still, I am not able to view the pages.
I'm presuming that by WAMP, you are using Apache as your server? You need to find your www folder in C:\WAMP\www and place files in there.
Here is the wamp server I use.
http://www.wampserver.com/en/download.php
I have also used this one in the past.
http://www.apachefriends.org/en/xampp.html
Click on the wamp server icon on your taskbar, go to Apache and you will find Test Port 80 in there. That will show whether port 80 is available or not. If not, go to httpd.conf file which is in the Apache menu of wamp server, find line Listen 80. Change 80 to 88. Restart All Services in wamp and that should work. Let me know if that helped.
How are you trying to view the pages? Why exactly are you "not able" to do it? Are you aware that PHP files are basically programs that run on a server, and you view their output using a web browser? Assuming that you have actual PHP files (rather than their output) and all the resources that they need, you will have to put them into the source folder that WAMP is configured to display, and then you will be able to view them by going to http://localhost in your web browser.
in the run put mmc - on the consol file / add /remove item choose internet information service and under website turn off the iis
if you installed in the past wamp/mysql selete all and reinstall only the wamp
Click on the wamp server icon in the taskbar and test "localhost".
If that works, click the "phpinfo()" link on the page.
If that works too, your wamp server is working and you should be able to execute php files.
If not, you need to make sure it is installed properly and started properly.