开发者

PHP extension works from browser not from CMD

I'm still struggling integrate APC with EasyPHP for testing Doctrine + CI.

  • Installed APC
  • configured php.ini
  • see it in phpinfo()

A开发者_如何学Godded this to my php.ini :

[APC]
apc.shm_segments=1
apc.optimization=0
apc.shm_size=128
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.enable_cli=1

created a test file test.php :

<?php
 print_r(apc_sma_info());
?>

accessing with browser (getting result on screen) : Array ( [num_seg] => 1 [seg_size] => 33554368 [avail_mem] => 33237360 [block_lists] => Array ( [0] => Array ( [0] => Array ( [size] => 33237336 [offset] => 317048 ) ) ) )

running from command prompt : D:\devl\EasyPHP-5.3.5.0\www>php test.php

Fatal error: Call to undefined function apc_sma_info() in D:\devl\EasyPHP-5.3.5. 0\www\test.php on line 2

any ideas why?


I do not know EasyPHP - but there are often different php.ini files for Apache and Cli...

Please check this first for your WAMP stack.


apache and CLI may have different php.ini files, so check which is the loaded php.ini in the cli environment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜