php记录
一.php_gd.dll
1.在php.ini文件中查找以下行:
;extension=gd
删除前面的分号,使其变为:
extension=gd
2.运行以下命令来安装gd扩展:
php -d extension=php_gd.dll --ini
二、ext-fileinfo
同上
php -d extension=php_fileinfo.dll --ini
php -d extension=xdebug.dll --ini
D:\php\php\php7.4.22_nts_win32_vc15x64_v7.4.22_itmop.com\ext\
三、composer
composer装的是8.2的,但是环境变量配的是7.4
四、
cp .env.test .env
php artisan key:generate
Application key [base64:bVonob0WrFRigiowA+jH8qrtKM08Q512nbROZhDSIus=] set successfully.
5/
检查 PHP 配置文件:打开你的 PHP 配置文件(如 php.ini)并确认以下行没有被注释掉:
extension=mysqli
extension=pdo_mysql
之后执行php artisan migrate 运行数据库迁移:
6、php artisan serve 启动内置的开发服务器
7、现在,你可以在浏览器中访问 http://localhost:8000 来查看你的应用程序。
你可以在终端中使用 php artisan serve --port=8000 命令来指定其他端口号。例如,如果你想要在 8080 端口上运行开发服务器,可以使用以下命令:
php artisan serve --port=8080
五、Redis(可选项)
1、下载 Redis:访问 Redis 官方 GitHub 页面(https://github.com/microsoftarchive/redis/releases)并下载最新的 Redis 版本。你可以选择适合你的 Windows 版本的 Redis-x.x.x.zip 文件进行下载。
/2、ERR Client sent AUTH, but no password is set tcp://127.0.0.2:6379]
在 Redis 配置文件中找到 requirepass 选项,将其取消注释并设置一个密码。例如,将 requirepass 设置为 "mypassword":
requirepass mypassword
redis-cli.exe shutdown
redis-server.exe redis.windows.conf
redis-cli -h 127.0.0.1 -p 6379 -a mypassword
redis-cli.exe
六、Xdebug
版本2.几就行,3以上会有名称改变
[Xdebug]
zend_extension="D:/php/php/php7.4.22_nts_win32_vc15x64_v7.4.22_itmop.com/ext/xdebug.dll"
xdebug.collect_params=1
xdebug.collect_return=1
;xdebug.auto_trace=1
;xdebug.trace_output_dir="D:/php/php/php7.4.22_nts_win32_vc15x64_v7.4.22_itmop.com/php_log/php7.4.3nts.xdebug.trace"
;xdebug.profiler_enable=1
;xdebug.profiler_output_dir="D:/php/php/php7.4.22_nts_win32_vc15x64_v7.4.22_itmop.com/php_log/php7.4.3nts.xdebug.profiler"
;xdebug.mode =debug
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
首选项,设置里
七、phpStudy(个人用的不好用)
八、
netstat -aon|findstr "9000"