首页 \ 问答 \ Wamp服务器无法启动(橙色图标)(Wamp server can't start (orange icon))

Wamp服务器无法启动(橙色图标)(Wamp server can't start (orange icon))

我无法在win7上启动wamp服务器。 我正在使用vhosts,一切都很好,直到我重新启动wamp服务器。

的httpd-vhost.conf:

<VirtualHost *:80>
ServerAdmin *.*@*.com
DocumentRoot "C:\Users\Rossko\Documents\PHP\wamp\www\***.local"
ServerName ***.local
ErrorLog "C:\Users\Rossko\Documents\PHP\wamp\apache\apache2.4.9\logs\***.local-error.log"
CustomLog "C:\Users\Rossko\Documents\PHP\wamp\apache\apache2.4.9\logs\***.local-access.log" common

在Apache错误日志中没有任何东西,端口80是空的。 为什么仍然是橙色而未能启动? 任何想法? 我在httpd-vhost.conf中有比www /文件夹中的项目更多的虚拟主机(没有足够的时间进行复制)是否可能由此引起错误?


I can't start wamp server on win7. I'm using vhosts, everything was fine untill I restart wamp server.

httpd-vhost.conf:

<VirtualHost *:80>
ServerAdmin *.*@*.com
DocumentRoot "C:\Users\Rossko\Documents\PHP\wamp\www\***.local"
ServerName ***.local
ErrorLog "C:\Users\Rossko\Documents\PHP\wamp\apache\apache2.4.9\logs\***.local-error.log"
CustomLog "C:\Users\Rossko\Documents\PHP\wamp\apache\apache2.4.9\logs\***.local-access.log" common

in Apache error log is nothing and port 80 is empty. Why is still orange and failed to start? Any idea? I have more virtual hosts in httpd-vhost.conf than projects in www/ folder (not enough time for copy) Is it possible that the error is coused by this?


原文:https://stackoverflow.com/questions/26105647
更新时间:2024-01-03 12:01

最满意答案

您可以通过使用:items而不是:some_model_a_sub_model_items作为关系的名称来实现此目的,并使用:class_name参数显式指定要引用的类的名称:

# An ActiveRecord Class named SomeModelASubModel (some_model_a_sub_model.rb)
class SomeModelASubModel < ActiveRecord::Base
  has_many :items, :class_name => "SomeModelASubModelItems"
end

有关详细信息,请参阅ActiveRecord文档


You could achieve this by using :items instead of :some_model_a_sub_model_items as the name of the relation, and explicitly specifying the name of the class you're referring to using the :class_name parameter:

# An ActiveRecord Class named SomeModelASubModel (some_model_a_sub_model.rb)
class SomeModelASubModel < ActiveRecord::Base
  has_many :items, :class_name => "SomeModelASubModelItems"
end

See the ActiveRecord docs for more info.

相关问答

更多
  • 您的问题可能是attributes是一个实例方法,您在类的上下文中执行此操作。 最接近你想要的类方法是column_names 。 Your problem is probably that attributes is an instance method and you're doing this in the context of the class. The class method that's closest to what you want is column_names.
  • 我认为您的问题是您给出的别名“:class”类是您可以通过运行此命令看到它的ActiveRecord方法之一 Contractor.first.methods 定义此别名只是以某种方式“覆盖”它并中断到rails操作 So, there is the gem safe_attributes who is doing the work. It's working perfectly so far.
  • 精确目标中的别名标记可以设置在链接上,以便在多次使用单个网址(通常是不同区域)的情况下跟踪对特定链接的响应。 The alias tag in Exact Target can be set on links to track response to specific link in the cases where single urls is used multiple times (typically different areas) of the email.
  • x , y和z是Apples构造函数中的可变阴影 (或别名 )。 你可以用this来解决它。 喜欢 private Array[] x; // <-- attribute named x private String y; // <-- attribute named y private String z; // <-- attribute named z public Apples(String y, // <-- parameter named y S ...
  • Arel(进行SQL查询的那个)仍然不知道ActiveRecord的别名(最多3.0.3)。 在这种情况下,您应该确保使用原始名称LoginId进行查询。 如果您进入控制台并创建User.where(:username =>“root”),您会看到它生成错误,尽管User.username运行良好。 现在只需替换sinup表单上的用户名出现,直到上游开始支持它。 编辑:顺便说一句,建议的方法是做一个观点 ! 别忘了! http://www.slideshare.net/napcs/rails-and-leg ...
  • 如果我没有记错,对象是通过引用传递的,但是如果你不克隆它们,它们会引用同一个对象。 原始物不是。 所以如果你有以下情况: var obj1 = { "id" : 7 }; var obj2 = { "one" : "a", "two" : "a", "three" : obj1, "four" : obj1 }; console.log(obj2.three === obj2.four) // -- > true 由于obj1是一个对象,并且您不克隆它,所以obj2 ...
  • 在./libs/Sema/SemaDeclAttr.cpp您将获得ProcessDeclAttributte函数。 在那里你会发现一个巨大的switch语句,你必须为你的属性添加一个case 。 当在代码中找到要编译的属性时, ProcessDeclAttribute是主调度函数。 在这里,您可以添加代码以指定clang对属性的反应。 断言指出了你的问题: Assertion failed: (Attr.isTypeAttr() && "Non-type attribute not handled"), f ...
  • 只需直接访问该属性,如下所示: def fooattr_raw self.attributes["fooattr"] end def fooattr add_feature_to fooattr_raw end Simply access the attribute directly like so: def fooattr_raw self.attributes["fooattr"] end def fooattr add_feature_to fooattr_raw end
  • 您可以通过使用:items而不是:some_model_a_sub_model_items作为关系的名称来实现此目的,并使用:class_name参数显式指定要引用的类的名称: # An ActiveRecord Class named SomeModelASubModel (some_model_a_sub_model.rb) class SomeModelASubModel < ActiveRecord::Base has_many :items, :class_name => "SomeModel ...
  • 该错误是因为您在where子句中使用了一个不存在的列。 您还需要定义alias_attribute for sale# to sale_number 。 在您的模型中,您可以: class Product < ActiveRecord::Base alias_attribute :sale_number, :"sale#" def self.helper_with_attribute where(sale_number: 5) end end 有了这个,您不需要仅为分配和检索目的定义 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)