laravel PHP mcrypt 安装设置laravel 环境问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14476181/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 07:31:03  来源:igfitidea点击:

PHP mcrypt installing and setting up laravel environment issues

phplaravelmcrypt

提问by Om3ga

I am using Mac OS X Lion 10.7.5 and I want to clear one thing I do not want to use XAMPP, MAMP anymore.

我正在使用 Mac OS X Lion 10.7.5,我想澄清一件事,我不想再使用 XAMPP、MAMP。

So I enabled apache, php and installed mysql following this link. This work well. Then I downloaded laravel and installed it following this link. I copied laravel folder inside Sitesfolder which I created according to first link tutorial. Now when I click on publicfolder inside laravelfolder it gives me following error

所以我启用了 apache、php 并按照此链接安装了 mysql 。这工作得很好。然后我下载了 laravel 并按照这个链接安装了它。我将 laravel 文件Sites夹复制到我根据第一个链接教程创建的文件夹中。现在,当我单击public文件夹内的laravel文件夹时,它给了我以下错误

Unhandled Exception

Message:

Call to undefined function Laravel\mcrypt_create_iv()
Location:

/Users/zafarsaleem/Sites/learning-laravel/laravel/crypter.php on line 36

Then checked whether mcrypts are installed in phpinfo(). They are not there. To install mcryptI followed this link. It worked until when I followed to PHP Extensiontitle. When I downloaded PHP 5.3.8 is now the default since Mac OS X 10.7.3unpacked and when I issue phpizecommand it gives me this error

然后检查phpinfo()中是否安装了mcrypts。他们不在那里。要安装mcrypt我按照这个链接。它一直有效,直到我跟随PHP Extension标题。当我下载PHP 5.3.8 is now the default since Mac OS X 10.7.3解包并发出phpize命令时,它给了我这个错误

Cannot find config.m4. 
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

What does this top level source directory of the module means? How can I make mcrypt install properly to make laravel work? Please help.

这是什么top level source directory of the module means?如何正确安装 mcrypt 以使 Laravel 工作?请帮忙。

回答by Alex

You will need to install Xcode and the command line toolsextra package within Xcode, for then to install mcrypt

您需要在 Xcode 中安装 Xcode 和command line tools额外的包,然后才能安装mcrypt

For more details, read this http://www.coolestguyplanettech.com/how-to-install-mcrypt-for-php-on-mac-osx-lion-10-7-development-server/

有关更多详细信息,请阅读此http://www.coolestguyplanettech.com/how-to-install-mcrypt-for-php-on-mac-osx-lion-10-7-development-server/