nbsp,php,autoconf,Zend,Applications
后端开发-php教程
一天的整理,仅供参考!棋牌游戏源码图,vscode弹出代码提示,ubuntu 16 上网,设置tomcat日志路径,sqlite设置最大连接数,爬虫网络爬虫的作用,php跳转到js,东莞seo方案怎么投放,刷赞的网站源码,教育网站 模板lzw
$a=new Mongo();上述代码执行时会报错,如下所示:
网站源码制作工具,ubuntu libv8,tomcat运行时内存地址,Objective-C爬虫,php判断数据是不是字符串,南汇seo培训lzw
Fatal error: Class ‘Mongo’ not found in /Users/mfw/PhpstormProjects/KeenSting/control/exprement.php online 17
多乐云卡盟源码下载,vscode输入tap,ubuntu终端打开网页地址,tomcat无法add,sqlite突然不能用,ecshop商家入驻插件,前端页面框架设计,58同城能爬虫么,php7 centos7,seo暗链,信息发布网站模板,网页时间日历代码,asp access 网站模板,骏商微信导航程序lzw
我安装的是MAMP集成开发环境phpstorm中的配置如下
查了很久的资料才发现是MAMP中的php没有扩展mongodb功能,系统自带的php我倒是撞了mongodb但是因为缺少php-cgi,所以根本没什么卵用--网页直接输入localhost:27017可以接入mac自带的php所扩展的mongo,而phpstorm职能连mamp,mamp没有mongo,所以就要给他装上
开始安装
1,这里要用到brew安装,没有的可以去度娘找找homebrew安装的教学,比较快,但是需要XCODE的支持,没有的去applestore down一个吧,免费,安装完需要启动一次再退出
2,安装mongodb(需要root权限 控制台输入sudo -s,回车后输入密码即可)bash-3.2# /Applications/MAMP/bin/php/php5.6.10/bin/pecl install mongo结果出错downloading mongo-1.6.10.tgz …Starting to download mongo-1.6.10.tgz (209,087 bytes)
………………………………………done: 209,087 bytes
118 source files, building
running: phpize
grep: /Applications/MAMP/bin/php/php5.6.10/include/php/main/php.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.6.10/include/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.6.10/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.ERROR: `phpize’ failed3,找到include文件夹(软连接,关联文件夹)bash-3.2# sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include /Applications/MAMP/bin/php/php5.6.10/include再次运行结果还是有问题bash-3.2# /Applications/MAMP/bin/php/php5.6.10/bin/pecl install mongodownloading mongo-1.6.10.tgz …
Starting to download mongo-1.6.10.tgz (209,087 bytes)
………………………………………done: 209,087 bytes
118 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Cannot find autoconf. Please check your autoconf installation and the$PHP_AUTOCONF environment variable. Then, rerun this script.ERROR: `phpize’ failed4,说是找不到autoconfig,那就安装!!(这里要退出root状态)KeenStings-MacBook-Pro:~ mfw$ brew install autoconf
Warning: You have an outdated version of /usr/bin/install_name_tool installed.
This will cause binary package installations to fail.
This can happen if you install osx-gcc-installer or RailsInstaller.
To restore it, you must reinstall OS X or restore the binary from
the OS packages.
==>Downloading
https://homebrew.bintray.com/bottles/autoconf-2.69.yosemite.bott
######################################################################## 100.0%
==>Pouring autoconf-2.69.yosemite.bottle.1.tar.gz�? /usr/local/Cellar/autoconf/2.69: 70 files, 3.1M5,安装完了执行 KeenStings-MacBook-Pro:~ mfw$ sudo /Applications/MAMP/bin/php/php5.6.10/bin/pecl install mongo提示Password:
downloading mongo-1.6.10.tgz …
Starting to download mongo-1.6.10.tgz (209,087 bytes)
……………………………………done: 209,087 bytes
118 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525Build with Cyrus SASL (MongoDB Enterprise Authentication) support? [no]6,输入yes回车就好了很长一段提示信息最后是这个Build process completed successfully
Installing ‘/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/mongo.so’
install ok: channel://pecl.php.net/mongo-1.6.10
configuration option “php_ini” is not set to php.ini location
You should add “extension=mongo.so” to php.iniKeenStings-MacBook-Pro:~ mfw$7,到你的位置去吧php.ini中加入extension=mongo.so 即可看教学就一回,但是我找了一天的资料==
版权声明:本文为博主原创文章,未经博主允许不得转载。
以上就介绍了MAC系统下phpstorm不能基于MAXP使用MongoDB的结局办法,包括了方面的内容,希望对PHP教学有兴趣的朋友有所帮助。
装配pdo_oci在这一步/usr/local/php/bin/phpize出现这样警告 | 装配pdo_oci在这一步/usr/local/php/bin/phpize出现这样警告 ...