I am working to build a small email client inside a web application. After doing some research I attempted to use the imap function. I got an error saying I was calling an undefined function, so again I researched and uncommented extension=php_imap.dll
.
我正在努力在Web应用程序中构建一个小型电子邮件客户端。在做了一些研究后,我试图使用imap函数。我得到一个错误,说我正在调用一个未定义的函数,所以我再次研究并取消注释extension = php_imap.dll。
I then found I had to update php with the imap function and I did so. Now, the imap functions works in php interactive inside Terminal, but I can't get it to work in the browser. I'm assuming I have to somehow load it in the Apache Config files but I can't seem to find how to do so.
然后我发现我必须使用imap函数更新php,我这样做了。现在,imap函数在终端内部的php交互中工作,但我不能让它在浏览器中工作。我假设我必须以某种方式加载它在Apache Config文件中,但我似乎无法找到如何这样做。
Any Ideas?
1 个解决方案
#1
0
You'll need to restart Apache to reload the PHP module with the new configuration. The command line PHP starts a new PHP instance each time with the latest configuration, whereas the PHP extension running in Apache is separate, and only loads new configuration setting when Apache itself is restarted.
您需要重新启动Apache以使用新配置重新加载PHP模块。命令行PHP每次使用最新配置启动一个新的PHP实例,而在Apache中运行的PHP扩展是独立的,并且只在Apache本身重新启动时加载新的配置设置。
Assuming you're running on Windows based on the .dll extension, so apachectl restart
or apache2ctl restart
may work, or the installer you used may have a tray app or other GUI tool that can do it for you.
假设您是根据.dll扩展名在Windows上运行,这样的apachectl重新启动或者apache2ctl重新启动可能会工作,或者你使用的安装程序可能有一个托盘应用程序或其他GUI工具,它可以为你做。
If running on Linux sudo service apache2 restart
or sudo service httpd restart
depending on distribution.
如果在Linux上运行sudo service apache2 restart或sudo service httpd restart取决于分发。
#1
0
You'll need to restart Apache to reload the PHP module with the new configuration. The command line PHP starts a new PHP instance each time with the latest configuration, whereas the PHP extension running in Apache is separate, and only loads new configuration setting when Apache itself is restarted.
您需要重新启动Apache以使用新配置重新加载PHP模块。命令行PHP每次使用最新配置启动一个新的PHP实例,而在Apache中运行的PHP扩展是独立的,并且只在Apache本身重新启动时加载新的配置设置。
Assuming you're running on Windows based on the .dll extension, so apachectl restart
or apache2ctl restart
may work, or the installer you used may have a tray app or other GUI tool that can do it for you.
假设您是根据.dll扩展名在Windows上运行,这样的apachectl重新启动或者apache2ctl重新启动可能会工作,或者你使用的安装程序可能有一个托盘应用程序或其他GUI工具,它可以为你做。
If running on Linux sudo service apache2 restart
or sudo service httpd restart
depending on distribution.
如果在Linux上运行sudo service apache2 restart或sudo service httpd restart取决于分发。