将 silverstripe 网站移至开发环境后出现问题
我们有一个 silverstripe 网站,可以在 centos 网络服务器上正常运行。我被要求对此站点进行修改,并且必须在我们的内部 Ubuntu 开发服务器上有一个工作副本。制作该网站的人早已去世,没有人知道这个项目。
我进行了移动,传输了数据库并将配置文件更改为新设置。现在,每当我启动该网站时,我都会收到一个完整的页面或红色错误:
FATAL ERROR: call_user_func_array() expects parameter 2 to be array, null given
At line 404 in /home/user/site/sapphire/core/ViewableData.php
call_user_func_array(Array,)
line 404 of ViewableData.php
ViewableData->XML_val(current_lang,,1)
line 4 of .cache.home.user.site.mysite.templates.Layout.PageAccueil.ss
include(/home/user/site/silverstripe-cache/.cache.home.user.site.mysite.templates.Layout.PageAccueil.ss)
line 197 of SSViewer.php
SSViewer->process(PageAccueil_Controller)
line 189 of SSViewer.php
SSViewer->process(PageAccueil_Controller)
line 296 of Controller.php
Controller->defaultAction(index,Array)
line 267 of Controller.php
Controller->run(Array)
line 22 of ModelAsController.php
ModelAsController->run(Array)
line 27 of RootURLController.php
RootURLController->run(Array)
line 104 of Director.php
Director::direct()
line 160 of main.php
据我所知,我们的开发服务器上没有什么“奇怪”的,并且其他框架(zend 框架甚至 wordpress)工作得很好。 这不是最新版本的 silverstripe 的问题,但在尝试更新它时我遇到了同样的错误,所以我希望在更新它之前让它工作。
我们使用的是 silverstripe 版本 2.2.2。
欢迎任何帮助或指点! 编辑:我确实尝试使用 /dev/build/?flush=1
加载网站,并且 /build/?flush=1
在这些页面上仍然遇到相同的错误。缓存文件也应该正确设置。
We have a silverstripe website that works ok in production on a centos webserver. I am asked to make modifications to this site and have to have a working copy on our internal Ubuntu dev server. The guy that did the website is long gone and no one knows this project.
I did the move, transfered the database and changed the config files to the new settings. Now whenever I start the site I get a full page or red errors:
FATAL ERROR: call_user_func_array() expects parameter 2 to be array, null given
At line 404 in /home/user/site/sapphire/core/ViewableData.php
call_user_func_array(Array,)
line 404 of ViewableData.php
ViewableData->XML_val(current_lang,,1)
line 4 of .cache.home.user.site.mysite.templates.Layout.PageAccueil.ss
include(/home/user/site/silverstripe-cache/.cache.home.user.site.mysite.templates.Layout.PageAccueil.ss)
line 197 of SSViewer.php
SSViewer->process(PageAccueil_Controller)
line 189 of SSViewer.php
SSViewer->process(PageAccueil_Controller)
line 296 of Controller.php
Controller->defaultAction(index,Array)
line 267 of Controller.php
Controller->run(Array)
line 22 of ModelAsController.php
ModelAsController->run(Array)
line 27 of RootURLController.php
RootURLController->run(Array)
line 104 of Director.php
Director::direct()
line 160 of main.php
As far as I know nothing is "weird" on our dev server and other frameworks (zend framework or even wordpress) work perfectly.
This is not with the latest version of silverstripe but trying to update it I ran into the same errors so I'd prefer have it work before updating it.
We are using silverstripe version 2.2.2.
Any helps or pointers are welcome!
edit: I did try to load the site with /dev/build/?flush=1
and /build/?flush=1
still get the same errors on theses pages. Also the cache files should be set correctly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1) 您可能想尝试
?flush=all
(除非您对数据库进行了任何更改,否则不需要/dev/build
)2) My第一个猜测是 PHP 版本。旧版和开发版的版本是否相同?如果我没记错的话,SS 2.2 不能很好地与 PHP 5.3 配合使用。
从 2.2 升级到 2.4 时可能会遇到问题 - 有一些更改,但它们应该相对较小。如果您尚未执行
?flush=all
操作,您可能仍会收到先前版本的错误。或者您甚至可能想手动清除 silverstripe 缓存目录(
silverstripe-cache
或者如果/tmp
中不存在一些目录)。当我将 SS 文件从一台服务器复制到另一台服务器时,我总是这样做,因为旧的缓存文件可能会导致非常奇怪的行为......1) You might want to try
?flush=all
(unless you've made any changes to the database, you don't need/dev/build
)2) My first guess would be the PHP version. Do you have the same version on both the old and the dev box? SS 2.2 doesn't work well with PHP 5.3 - if I remember correctly.
Running into issues when upgrading from 2.2 to 2.4 can happen - there were some changes but they should be relatively minor. If you haven't done the
?flush=all
you might still get errors from the previous version.Or you might even want to clear out the silverstripe cache directory manually (
silverstripe-cache
or if that doesn't exist a few directories down in/tmp
). I always do that when copying my SS files from one server to another as old cache files can lead to very weird behavior...