记录下多平台多人开发的一处坑:

项目使用的是symfony来开发微信小程序的后端,在windows下开发,linux下运行

在开发时用到了一个汉字转拼音的第三方库,用composer安装后,开发环境一切正常,推到某代码托管平台上,然后我从测试服务器上把代码拉下来开始测试,死活跑不起来甚至项目首页都500了,看了下log死长死长的一坨,这里粘一部分

[Tue Oct 09 23:02:37.495408 2018] [php7:notice] [pid 22252:tid 140611868919552] [client 14.116.137.166:45569] PHP Warning:  require(/vdb/htdocs/yiban_refactoring/vendor/composer/../khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php): failed to open stream: No such file or directory in /vdb/htdocs/yiban_refactoring/vendor/composer/autoload_real.php on line 66
[Tue Oct 09 23:02:37.495451 2018] [php7:notice] [pid 22252:tid 140611868919552] [client 14.116.137.166:45569] PHP Stack trace:
[Tue Oct 09 23:02:37.495458 2018] [php7:notice] [pid 22252:tid 140611868919552] [client 14.116.137.166:45569] PHP   1. {main}() /vdb/htdocs/yiban_refactoring/web/app.php:0
[Tue Oct 09 23:02:37.495463 2018] [php7:notice] [pid 22252:tid 140611868919552] [client 14.116.137.166:45569] PHP   2. require() /vdb/htdocs/yiban_refactoring/web/app.php:5
[Tue Oct 09 23:02:37.495469 2018] [php7:notice] [pid 22252:tid 140611868919552] [client 14.116.137.166:45569] PHP   3. ComposerAutoloaderInitad5be7bd98f94b3e074e7a30cf933640::getLoader() /vdb/htdocs/yiban_refactoring/vendor/autoload.php:7
[Tue Oct 09 23:02:37.495480 2018] [php7:notice] [pid 22252:tid 140611868919552] [client 14.116.137.166:45569] PHP   4. composerRequiread5be7bd98f94b3e074e7a30cf933640() /vdb/htdocs/yiban_refactoring/vendor/composer/autoload_real.php:56
[Tue Oct 09 23:02:37.495490 2018] [php7:notice] [pid 22252:tid 140611868919552] [client 14.116.137.166:45569] PHP Fatal error:  require(): Failed opening required '/vdb/htdocs/yiban_refactoring/vendor/composer/../khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php' (include_path='.:') in /vdb/htdocs/yiban_refactoring/vendor/composer/autoload_real.php on line 66
[Tue Oct 09 23:02:37.495493 2018] [php7:notice] [pid 22252:tid 140611868919552] [client 14.116.137.166:45569] PHP Stack trace:

找不到文件/vendor/composer/../khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php 我进到目录里面看了下
TIM图片20181012183036.png

明明在这里鸭怎么会找不到?遂求助大佬
大佬一针见血的告诉我文件夹Common的首字母不一样
emmmm.....
这就解释了为什么开发环境运行正常而测试服务器出错,因为windows不区分大小写,Linux区分大小写
谨以此文记录下我盯着log两小时没找到错误

标签: 开发

已有 4 条评论

  1. 既然来了,就踩一下。

  2. 噗哈哈哈,日常傻fufu~

    1. 哈哈哈可以说是我的日常了

  3. 233333,一般这种情况出现会吐槽自己怎么这么傻逼

添加新评论