使用 Bake in Cake 时出现多个 PHP 和控制台警告

发布于 2024-11-25 02:02:00 字数 1191 浏览 0 评论 0原文

伙计们。

我一直在尝试在 CakePHP 1.3 中烘焙一些模型、控制器和视图 - 然而,当我从控制台运行命令时,我遇到了很多警告和意外行为。例如,如果我尝试烘焙具有关联的模型,它第一次会失败)并将 PHP 错误回显到生成的模型文件中);如果我再次烘烤它,它就会正常工作。

很多这些警告都与用户权限有关(尤其是 Cake 的 tmp 缓存) - 不幸的是,我的主机使用的是带有 Solaris ACL 的 SunOS 机器,因此运行有点粗糙。然而,我一直担心的是其他消息:(

sh: /usr/local/php/bin/clear: not found

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/apc.so' - ld.so.1: php: fatal: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/apc.so: open failed: No such file or directory in Unknown on line 0
PHP Warning:  set_time_limit(): Cannot set time limit in safe mode in ~/cakephp_1.3/cake/console/cake.php on line 133
PHP Warning:  fopen(~/cake_apps/tmp/cache/persistent/cake_core_file_map): failed to open stream: Permission denied in /web2/web/floridasadd.org/cakephp_1.3/cake/libs/file.php on line 152

请注意,出于安全原因,我已将我的主目录替换为 ~(如果适用)。)

以前有人遇到过此情况吗?这是一个奇怪的问题,Solaris ACL 使问题变得更加复杂。此外,我的主目录位于 chroot 监狱中,但它仅对 http 守护进程有效。 (我的 shell 访问权限没有被锁定 - 我想我在我的 UID 下运行的程序也没有被锁定。)

我知道这个问题有点随意,但我真的在寻找任何有过这种经历的人Cake's Bake 脚本也有类似的经历。我不太确定该去哪里。有人有什么想法或经验可以与我分享吗?我将不胜感激。

guys.

I've been trying to bake some models, controllers, and views in CakePHP 1.3 - however, when I run the command from console, I've been running into a lot of warnings and unexpected behavior. For instance, if I attempt to bake a model with associations, it fails the first time )and echos a PHP error into the generated model file); if I bake it again, it works correctly.

A lot of these warnings have to do with user permissions (especially for Cake's tmp cache) - unfortunately, my host is using a SunOS box with Solaris ACLs, so the running is a bit rough there. However, it's the other messages that I've been worried about:

sh: /usr/local/php/bin/clear: not found

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/apc.so' - ld.so.1: php: fatal: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/apc.so: open failed: No such file or directory in Unknown on line 0
PHP Warning:  set_time_limit(): Cannot set time limit in safe mode in ~/cakephp_1.3/cake/console/cake.php on line 133
PHP Warning:  fopen(~/cake_apps/tmp/cache/persistent/cake_core_file_map): failed to open stream: Permission denied in /web2/web/floridasadd.org/cakephp_1.3/cake/libs/file.php on line 152

(Please note that I have replaced my home directory with ~, where applicable, for security reasons.)

Has anyone run into this before? It's kind of a strange issue, compounded by the Solaris ACLs. Additionally, my home directory is in a chroot jail, but it's only in effect for the http daemon. (My shell access isn't locked in - I would imagine that programs I run under my UID aren't locked in, either.)

I know that this question is a little haphazard, but I'm really looking for anyone who has had a similar experience with Cake's Bake script. I'm not really sure where to go here. Does anyone have any ideas or experience to share with me? I would greatly appreciate it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

美男兮 2024-12-02 02:02:00

看起来您的 PHP CLI 正在安全模式下运行,因此会出现错误。
尝试在 PHP CLI php.ini 中设置 safe_mode = off (您可以通过 shell 中的 php --ini 找到它)。

Looks like your PHP CLI is running in safe mode, hence the errors.
Try setting safe_mode = off in PHP CLI php.ini (you can find it via php --ini in shell).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文