Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
550 views
in Technique[技术] by (71.8m points)

localhost - how to setup built-in webserver in PhpStorm

Set up:

1) OS - Win 8.1
2) WAMP
3) PhpStorm 7.1.3

I have been working on Dreamweaver for quite a long time and recently I ditched it because of its limited features. Setting up a local env using Dreamweaver is fairly simple and I had no problem with it. So I installed PhpStorm thinking it would quite easy to run my PHP web app in the same way when I was using DW, but When I try to run my web app in PhpStorm using its built-in webserver I get 502 Bad Gateway error, What I did is simply import the folder (which is in www directory) in PhpStorm and try to run it on browser, but I couldn't get it to work locally. I believe I have to set up Interpreter under settings, but how do I go ahead and what should I include?

When I run my webapp using WAMP the URL looks like

http://localhost/appname/trunk/public/

When I run it using PhpStorm built-in webserver the URL looks like

http://localhost:63342/appname/trunk/public/

Error: 502 bad gateway.

I am quite stuck now.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

First (check your interpreter)

1- From File choose Setting

2- In setting navigate to PHP

3- In Interpreter (if you don't have interpreter you will see message like that )

enter image description here

Second (Add new interpreter)

1-Add new interpreter From Add sign (green plus +) --> choose (other)local if you work in your local pc

2-write any name you want refer to (default PHP)

3- navigate to your PHP directory file From PHP home*

I hope this help you

enter image description here

*If you use wamp you will find it in c:wampinphp(your php version)

If you use xamp you will find it C:xamppphp


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...