我认为我的 apache 服务器存在性能问题。我在 solaris 10 上有 apache 服务器,带有 php 和一些 flash 客户端应用程序。客户端通过 HTTPService 请求以 XML 格式从服务器获取数据。有时数据没有到达,有时它会到达。可能在 apache 服务器或 php 中的性能(可能在 php.ini 文件中配置)这对我来说是一个严重的问题。请帮我。最好的祝福。埃拉德。
php.ini 配置文件:
[PHP]
cgi.fix_pathinfo = 1
memory_limit = 512M ; Maximum amount of memory a script may consume (8MB)
default_socket_timeout = 180000
; Enable the PHP scripting language engine under Apache.
engine = On
safe_mode = Off
; include_path=/opt/coolstack/php5/lib/php:.:
include_path=/opt/OV/httpd/php5/lib/php:.:
; extension_dir=/opt/coolstack/php5/lib/php/extensions/no-debug-non-zts-20060613
extension_dir=/opt/OV/httpd/php5/lib/php/extensions/no-debug-non-zts-20060613
; CSKmysql32 is required for mysql and mysqli extensions.
extension="mysql.so"
extension="mysqli.so"
extension="apc.so"
extension="zlib.so"
extension=dom.so
;extension=bcmath.so
;extension=bz2.so
;extension=calendar.so
;extension=ctype.so
;extension=dbase.so
;extension=dtrace.so
;extension=exif.so
;extension=ftp.so
;extension=hash.so
;extension=iconv.so
;extension=imap.so
;extension=json.so
extension=ldap.so
;extension=mbstring.so
;extension=openssl.so
;extension=pcntl.so
;extension=pdo_pgsql.so
;extension=pgsql.so
;extension=posix.so
;extension=pspell.so
;extension=shmop.so
;extension=snmp.so
;extension=soap.so
;extension=sockets.so
;extension=sysvmsg.so
;extension=sysvsem.so
;extension=sysvshm.so
;extension=tokenizer.so
;extension=wddx.so
;extension=xmlreader.so
;extension=xmlwriter.so
;extension=xsl.so
;extension=zip.so
;extension=memcache.so
;extension=tcpwrap.so
;zend_extension="/opt/coolstack/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
; hardened-php - uncomment to enable. See http://hardened-php.net
;extension="suhosin.so"
; CSKlibs package is required for following extensions :
extension=curl.so
;extension=dba.so
;extension=gd.so
;extension=gettext.so
;extension=gmp.so
;extension=tidy.so
;extension=odbc.so
;extension=pdo_odbc.so
; CSKtds is required for following extensions :
;extension=pdo_dblib.so
; CSKncurses is required for following extensions :
;extension=ncurses.so
;extension=readline.so
; CSKmysql32 package is required for following extensions :
;extension=pdo_mysql.so
; CSKapache2 package is required for following extensions :
;extension=xmlrpc.so
apc.enabled=1
apc.shm_segments=1
apc.optimization=0
apc.shm_size=128
apc.ttl=120
apc.user_ttl=120
apc.gc_ttl=120
apc.stat=1
apc.num_files_hint=1024
apc.user_entries_hint=100
apc.mmap_file_mask=/dev/zero
;apc.enable_cli=1
; Allow or prevent persistent links.
;mysql.allow_persistent = On
; Maximum number of persistent links. -1 means no limit.
;mysql.max_persistent = -1
; Maximum number of links (persistent + non-persistent). -1 means no limit.
;mysql.max_links = -1
[Session]
session.use_cookies = 1
session.cookie_lifetime = 0
session.gc_probability = 1
session.gc_divisor = 5000
session.gc_maxlifetime = 6000
session.entropy_file = "/dev/urandom"
;session.cache_expire = 300
;session.cache_limiter = nocache
;session.save_path = "5;/tmp"
PHP服务脚本代码例如:
class client
{
var $clientIP;
function __construct()
{
$this->clientIP = $_SERVER['REMOTE_ADDR'];
}
public function get_client_info()
{
print "<clientIP>".$this->clientIP."</clientIP>\n";
}
}