0
SimpleXMLElement 객체의 배열을 캐싱하는 데 어려움이 있습니다. 실패한 apc_store 행입니다. 이유가 확실하지 않습니다.APC SimpleXMLElement 객체의 캐싱 배열
이 줄에서 프로그램이 종료됩니다. 다른 곳에서 사용했기 때문에 이상합니다. 배열을 ArrayObject에 래핑하고 캐시에 저장합니다.
내 코드 추출물은 다음과 같습니다 :
$feed = /* some url */
$xml = simplexml_load_file($feed);
$items = $xml -> xpath('/rss//item');
foreach($items as $item){
$item -> addChild('myTag1', "My Tag 1");
$item -> addChild('myTag2', "My Tag 2");
}
apc_store($feed, new ArrayObject($items), 60);
내 로그 파일이 제대로 작동이가 도움이 단지의 경우, 마지막 항목입니다하지만 난 그게 SSL 및하지와 함께 할 생각 생각하지 않는다 유용한 정보 :
[Wed Feb 20 12:21:51 2013] [notice] caught SIGTERM, shutting down
Attempt to free unreferenced scalar: SV 0x7fe7805e2130, Perl interpreter: 0x7fe7805ea4f0 during global destruction.
[Wed Feb 20 12:21:54 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Feb 20 12:21:54 2013] [notice] SSL FIPS mode disabled
Attempt to free unreferenced scalar: SV 0x7f94bfa75ec0, Perl interpreter: 0x7f94bfa56550 during global destruction.
[Wed Feb 20 12:21:57 2013] [notice] Digest: generating secret for digest authentication ...
[Wed Feb 20 12:21:57 2013] [notice] Digest: done
[Wed Feb 20 12:21:59 2013] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Wed Feb 20 12:21:59 2013] [notice] mod_python: using mutex_directory /tmp
[Wed Feb 20 12:21:59 2013] [notice] SSL FIPS mode disabled
[Wed Feb 20 12:21:59 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.4.10 mod_python/3.3.1 Python/2.7.3 mod_ssl/2.2.22 OpenSSL/1.0.0j-fips mod_perl/2.0.5 Perl/v5.14.3 configured -- resuming normal operations
도움 주셔서 감사합니다.