PhpStorm内置Web服务器不能与PHP一起使用,导致"没有指定输入文件"错误

时间:2014-07-25 03:09:51

标签: php phpstorm

我刚安装了#jet; jetbrains PhpStorm 7.1.3"和配置PHP解释器(PHP 5.5.14)正确。但是对于每个php脚本,使用其内置的Web服务器在浏览器中会出现No input file specified错误。

我该怎样摆脱这个问题?

我的操作系统是Windows 7 64位。

idea.log的相关部分:

2014-07-26 00:15:37,122 [  57068]   INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342 
2014-07-26 00:15:38,613 [  58559]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/codeStyleSettings.xml file is null 
2014-07-26 00:15:38,628 [  58574]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/projectCodeStyle.xml file is null 
2014-07-26 00:15:40,204 [  60150]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/fileColors.xml file is null 
2014-07-26 00:15:41,577 [  61523]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/IntelliLang.xml file is null 
2014-07-26 00:15:42,528 [  62474]   INFO - dvertisement.PluginsAdvertiser - plugins.jetbrains.com 
java.net.UnknownHostException: plugins.jetbrains.com
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at java.net.Socket.connect(Socket.java:528)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
    at sun.net.www.http.HttpClient.New(HttpClient.java:308)
    at sun.net.www.http.HttpClient.New(HttpClient.java:326)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:975)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850)
    at com.intellij.ide.plugins.RepositoryHelper.loadPluginsFromRepository(RepositoryHelper.java:72)
    at com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.PluginsAdvertiser$2$1.run(PluginsAdvertiser.java:249)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:464)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
    at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:373)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:420)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:150)
2014-07-26 00:15:43,106 [  63052]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/phing.xml file is null 
2014-07-26 00:15:49,314 [  69260]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/webResources.xml file is null 
2014-07-26 00:15:51,015 [  70961]   INFO - tor.impl.FileEditorManagerImpl - Project opening took 32828 ms 
2014-07-26 00:15:53,963 [  73909]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/cachedDictionary.xml file is null 
2014-07-26 00:16:00,181 [  80127]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/watcherTasks.xml file is null 
2014-07-26 00:18:31,166 [ 231112]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/dataSources.xml file is null 
2014-07-26 00:18:31,213 [ 231159]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/dataSources.xml file is null 
2014-07-26 00:18:31,244 [ 231190]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/sqlDataSources.xml file is null 
2014-07-26 00:18:31,260 [ 231206]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/jsLibraryMappings.xml file is null 
2014-07-26 00:18:31,587 [ 231533]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/databaseColors.xml file is null 
2014-07-26 00:18:31,966 [ 231912]   INFO - org.jetbrains.io.BuiltInServer - web server stopped 

2 个答案:

答案 0 :(得分:1)

经过一些与phpstorm的斗争后,我终于找到了摆脱这个问题的方法。

只需删除php.ini以便php文件夹中没有php.ini,然后重新启动phpstorm,结果内置的Web服务器工作正常。

答案 1 :(得分:-2)

我今天遇到了同样的问题。我发现我在错误的doucument中创建了项目文件。你应该把php脚本放到“C:\ Apache24 \ htdocs”下的文件中,这取决于你在httpd.conf中的设置(文件在C:\ Apache24 \ conf)。