我在openwrt上进行项目,当我尝试在symfony 3中使用pole datetimetype生成表单时,出现了一个我无法克服的错误。在Xampp上,此项目有效!
datefmt_create: date formatter creation failed: U_MEMORY_ALLOCATION_ERROR
IntlDateFormatter->__construct('pl', 2, -1, object(IntlTimeZone), 1, '')
in vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/Type/DateType.php (line 87)
root@VigoradoNetwork:/www1/homesystem# php-cgi bin/symfony_requirements
PHP Warning: Module 'mysqlnd' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'http.so' (tried: /usr/lib/php/http.so (Error loading shared library libmbedx509.so.0: No such file or directory (needed by /usr/lib/php/http.so)), /usr/lib/php/http.so.so (Error loading shared library /usr/lib/php/http.so.so: No such file or directory)) in Unknown on line 0
X-Powered-By: PHP/7.2.9
Content-type: text/html; charset=UTF-8
<br />
<b>Deprecated</b>: Function create_function() is deprecated in <b>/www1/homesystem/var/SymfonyRequirements.php</b> on line <b>551</b><br />
<br />
<b>Fatal error</b>: Uncaught IntlException: Constructor failed in /www1/homesystem/var/SymfonyRequirements.php:658
Stack trace:
#0 /www1/homesystem/var/SymfonyRequirements.php(658): Collator->__construct('fr_FR')
#1 /www1/homesystem/bin/symfony_requirements(6): SymfonyRequirements->__construct()
#2 {main}
thrown in <b>/www1/homesystem/var/SymfonyRequirements.php</b> on line <b>658</b><br />
在php.ini
中,我有128mb的php内存
symfony 3,4和4,1中显示相同的错误
答案 0 :(得分:0)
两件事:1)为什么以root身份运行它? 2)使用php-cgi
或其他方式代替./bin/<whatever>
可以使用不同的php.ini文件,因此可以使用不同的选项(即分配的RAM更少)。这就是注释的内容,您还可以通过web/config.php
脚本从浏览器检查需求。
此外,请确保var/SymfonyRequirements.php
脚本与您使用的相同symfony版本相对应。