简体   繁体   English

cakephp $ this-> Form-> input无法识别实时服务器上的Text列

[英]cakephp $this->Form->input not recognising a Text column on live server

I have a weird issue which is only happening on my live server, on my localhost the form input is working as expected. 我有一个奇怪的问题,它只发生在我的实时服务器上,在我的本地主机上,表单输入按预期工作。 The files are all the same and the database is an export/import of my localhost one. 文件都是一样的,数据库是我本地主机的导出/导入。

if you go to you will see the details of a user. 如果您转到,则将看到用户的详细信息。 The 'Personal Details' input should be a text area. “个人详细信息”输入应为文本区域。 That column has the type text in both databases so how come it's not picking up that fact in the online version? 该列在两个数据库中都有文本类型,因此为什么它没有在在线版本中了解到这一事实呢?

My localhost is php 5.3.1 我的本地主机是PHP 5.3.1

the live server is php 5.2.17 实时服务器是php 5.2.17

Strangely I have another table with the same column type and it works just fine 奇怪的是,我有另一个表具有相同的列类型,并且工作正常

The personal_details column should just be detected by cakephp as a textarea shouldn't it? cakephp应该只检测personal_details列,因为不是textarea吗? There's nothing else cake needs to know that is there? 蛋糕没有其他需要知道的吗?

Anyone any ideas? 有任何想法吗?

Most likely it's a caching issue - your server has the old version of your model/table cached, so doesn't know about the new field or it's type. 最有可能是缓存问题-您的服务器缓存了旧版本的模型/表,因此不知道新字段或类型。 Clear your cache on the live server. 清除实时服务器上的缓存。

One easy way to do this is to set debug to 2 on your server, then refresh the page. 一种简单的方法是在服务器上将debug设置为2,然后刷新页面。 After that, you should set debug back to zero. 之后,您应该将debug设置回零。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM