
php开发
这家伙很懒,还没填写该栏目的介绍呢~

采用官方github上的代码,
https://github.com/brix/crypto-js/issues/154
PHP端无法解析,研究了一天。
使用无法解密,最终发现,我下载的JS是用的克隆的方式,而正确的是应该下载官方的releases,地址如下:
https://github.com/brix/crypto-js/releases
需要引入:
<sc...

php开发使用kindeditor上传图片和附件成功后,没有插入在文本框,弹出层也没有消失
使用kindeditor上传图片和附件成功后,没有插入在文本框,弹出层也没有消失
网上搜了半天都没有我这种问题,最后发现是我自己愚蠢了,返回的JSON格式和官方要求的不符。
必须要官方文档里面一模一样的。
$data['message']='文件检测到非法代码,您的相关信息已被记录并通知管理员处理!';
$data['error...

php开发PHP中的preg_replace替换中文乱码
需要适用u模式修正符,且源字符串需要是UTF8编码
使用u模式时,源串必须是 utf-8 字符集的$article_info['message'] = preg_replace("~[^\"]美句[^\"]~u",'<a href="https://www.aibahu.com/explore/category-duanwenmeijv" a...

php开发php的oci_execute执行exec报ora-00900错误
exec dbms_refresh.refresh('MV_***')
通过php的oci_execute执行后,报错ora-00900
oci_execute(): ORA-00917: \xe7\xbc\xba\xe5\xa4\xb1\xe9\x80\x97\xe5\x8f\xb7 in
经检索发现:
call可以和sql一样执行;
exec不是sql...

php开发webservice是不是需要启用libxml_disable_entity_loader(true)了呢
<?php
libxml_disable_entity_loader(true);
?>
可以百度一下以上关键字:
xml的漏洞。在simplexml_load_string之前使用上面那句话。

php开发PHP趋势,PHP已死,PHP颓势
最近经常讨论到这个问题,不由得也关注起来,搜了一下网上大家的评论,感觉并没有讨论的那么悲观。
然而,有那么一句话:作为一个程序员,会那么几门语言,是必须的。
希望那些连PHP还只能写几句增删改查的,加油!

php开发AH00098: pid file Apache24/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
这次是因为PHP的curl扩展造成的。
apache只显示上面这个错。
apache2.4.33

php开发php的session_start造成的连接堵塞
一个耗时的连接,没有加载完成,
第二个连接会等待第一个链接加载完成,并且响应时间会累加在上面。
这种问题,是因为session_start的文件锁造成的,把session写入到数据库或者redis中,可以解决。

php开发"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
更新了Php环境到最新的php7.3.4,使用composer install的时候提示如题:
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
原因composer版本太低,更新一下composer版本。

php开发SHA384 is not supported by your openssl extension, could not verify the phar file integrity
用composer self-update的时候提示这个。
原因:
composer 版本过低
解决办法:
This has been fixed already, reinstall composer from https://getcomposer.org to overwrite your current one as it's too ol...

php开发PHP Startup: Unable to load dynamic library 'curl',php7.3.4版本curl无法加载
报错:\xef\xbf\xbd\xd2\xb2\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xd6\xb8\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xc4\xa3\xef\xbf\xbd\xe9\xa1\xa3
看大家把PHP版本...

php开发oci_connect(): OCIEnvNlsCreate() failed
为了这个错误编译了好几个小时。
原由是因为我在服务器上安装了oracle18c的服务器程序,肯定就设置了$ORACLE_HOME等变量。
编译Oci的时候,php默认就是用这个编译了,然后连接oracle报错如标题。
这里有个技巧就是在Phpinfo中可以看到oci编译使用的oracle_home,如下:
Compile-time ORACLE_HOME /usr/...
![PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined](https://www.144d.com/content/templates/J2/images/random/2.jpg)
php开发PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
今天在用pdo处理oracle的查询时,遇到这个问题,全部使用的?作为占位符,然后给定的一个数组
生成的SQL语句如下:
update model_test set name=?,birth=to_date(?,'yyyy-mm-dd hh24:mi:ss'),sui=?,jianjie=? where (uuid='?')
关键问题就在这个where字句,用?作为占位符...

php开发HTTP request failed! HTTP/1.1 502 Bad Gateway#015) LNMP
lnmp集成环境执行PHP稍微时间久点会出现502,其他情况下正常
参考文章:
http://www.heminjie.com/network/2137.html
改了下配置参数,暂时没有出现502了
原文备份如下:
第一种原因:
LNMP没有安装成功,脚本中某些lib包可能没有安装上,造成php没有编译安装成功。可以看一下是否存在/usr/local/p...

php开发AH00326: Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
windows下apache的假死,有时候可能是就是因为这个原因造成的
需要启用mpm模块
# Server-pool management (MPM specific)
Include conf/extra/httpd-mpm.conf (去掉该行前面的注释符号"#")
然后修改:
#由于mpm_winnt模块只会创建1个子进程,因此这里对单个子进程的参数设置就相当于对...

php开发PHP的soapheader问题
PHP写的服务端,如果通过header验证需要注意一下
soapui工具里添加的header是放在$_SERVER数组中的。
而PHP的soapheader添加的,是放在soap原始请求中的,需要通过获取
MessageServer::soaputils_autoFindSoapRequest();
原始请求来取得。
部分服务端解析:
$username=iss...

php开发loadXML(): Extra content at the end of the document in Entity
今天被一个soap坑死了,上次调试都没有问题,今天突然死活不通,获取不到值。根本原因还是基础不牢,xml的基础知识不清楚。
逐步调试,发现loadXML过后,就没有内容,因为是soap,也没有报错。
本地调试发现错误:
loadXML(): Extra content at the end of the document in Entity
经搜索发现,导致这...

php开发CAS的服务记录是空的,没有定义服务。
错误原因
CAS 5.x 默认情况下不支持HTTP的客户端接入,建议客户端采用HTTPS协议。
不过,确实无法升级为HTTP的,那也可以把CAS Server开启支持HTTP的客户端接入。
具体开发的方法如下:
·1. 修改http支持的配置
打开文件:cas\WEB-INF\classes\services\HTTPSandIMAPS-10000001.json
第三行...