I have created a web app which uses PHPMailer for mailing and its working properly on my local server(Windows OS). However, when I uploaded it to the production server(Ubuntu 14.04.4) it returned an error which says “Message could not be sent.Mailer Error: Extension missing: openssl”.I tried looking for solution but nothing works. Anyway I'm using PHP5.3.6. I hope you guys can help me.
1条回答 默认 最新
- duanneng2014 2017-05-10 02:08关注
You can compile the openssl extension.
first step : download the php source in the version you are using .
then run command:
tar zxvf php-yourphpversion.tar.gz cd php-yourphpversion/ext/openssl/ #notice if you have error "cannot find config.m4" when run phpize , you #should rename the file "config0.m4" to "config.m4" by command #"mv config0.m4 config.m4" /usr/local/php/bin/phpize #here is your php location have install #in my computer ,the php is location in # /usr/local/php/ so the phpize is in # /usr/local/php/bin/phpize #(your php location)/bin/php-config ./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config make sudo make install
then the openssl will install and return a
path
in my computer it return/usr/local/php/lib/php/extensions/debug-zts-20160303/
finally modify php.ini and restart php-fpm :
extension_dir = "the path return after install" #you should add the return path here extension=openssl.so
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 matlab数字图像处理频率域滤波
- ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
- ¥15 ELGamal和paillier计算效率谁快?
- ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
- ¥15 ubuntu系统下挂载磁盘上执行./提示权限不够
- ¥15 Arcgis相交分析无法绘制一个或多个图形
- ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
- ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
- ¥15 fpga自动售货机数码管(相关搜索:数字时钟)
- ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误