简体   繁体   English

Symfony imap“试图从全局名称空间中调用函数“ imap_open”。

[英]Symfony imap “Attempted to call function ”imap_open“ from the global namespace.”

Im trying to get imap working inside my symfony 3 project. 我试图让imap在symfony 3项目中运行。 But when im trying to run any imap related commands I get the "Attempted to call function "imap_function_here" from the global namespace." 但是,当我尝试运行任何与imap相关的命令时,我得到了"Attempted to call function "imap_function_here" from the global namespace." error. 错误。 I'm pretty sure that I am using it correctly because if I run an completely empty php file with just: 我很确定自己使用正确,因为如果我只运行一个完全空的php文件:

<?php
$conn = \imap_open('imap.mailserver.com:993/imap/ssl}INBOX','mail@mailserver.com', 'password');
var_dump($conn)

It work just fine, but the exact same code inside my symfony project wil result in an error. 它工作正常,但是我的symfony项目中完全相同的代码将导致错误。 Can anyone help me, thanks in advance. 任何人都可以帮助我,在此先感谢。

So after 3 hours of failing I restarted my server and it works. 因此,在3个小时的故障后,我重新启动了服务器,它可以正常工作。 My symfony was running while I installed imap so it started without it. 安装imap时,我的symfony正在运行,因此没有它就开始运行。 So thanks for the effort, but it just was a stupid mistake on my side. 因此,感谢您的努力,但这只是我这方面的愚蠢错误。

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

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