ورود

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : مشکل در session ها در vps



reimei
July 13th, 2011, 00:44
سلام؛
من یه vps دارم با دو تا دامنه.
session در یکی از دامنه ها کار نمی کنه و توی فایل phpinfo این دامنه، اصلا _COOKIE["PHPSESSID"] نیست! چه طور میشه این مشکل رو حل کرد؟

Rezash
July 13th, 2011, 01:21
لزوما اسمش PHPSESSID نيست .
آيا در اول اسكريپت تابع


session_start();

رو فراخوني ميكنيد ؟
براي دوميني كه سشن ها در اون كار نميكنند php.ini اختصاصي داريد ؟
مقدار Session Support روي enable هست ؟
يك نسخه از phpinfo رو لينك بديد بررسي كنم.

reimei
July 13th, 2011, 06:38
ممنون به خاطر جوابتون.
اول فایل session_start() رو فراخوانی کردم، وارد میشه، ولی نمی تونه session رو نگه داره. کد توی کامپیوتر خودم که xampp نصبه، درست کار میکنه، ولی توی remote server کار نمیکنه.
نه، php.ini برای هر دو سایت یکیه.
بله، enable هست.


file:///C:/Documents%20and%20Settings/root/My%20Documents/My%20Music/phpinfo/t_files/phpinfo.gif (http://www.php.net/)PHP Version 5.2.17


System Linux srv900.screweb.com 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 Build Date Feb 21 2011 04:29:36 Configure Command './configure' '--host=i686-redhat-linux-gnu' '--build=i686-redhat-linux-gnu' '--target=i386-redhat-linux' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/usr/share/file/magic.mime' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--enable-zip' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' Server API Apache 2.0 Handler Virtual Directory Support disabled Configuration File (php.ini) Path /etc Loaded Configuration File /etc/php.ini Scan this dir for additional .ini files /etc/php.d additional .ini files parsed /etc/php.d/dbase.ini, /etc/php.d/dom.ini, /etc/php.d/gd.ini, /etc/php.d/imap.ini, /etc/php.d/lighttpd.ini, /etc/php.d/mbstring.ini, /etc/php.d/mcrypt.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini PHP API 20041225 PHP Extension 20060613 Zend Extension 220060519 Debug Build no Thread Safety disabled Zend Memory Manager enabled IPv6 Support enabled Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, data, http, ftp, zip Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls Registered Stream Filters zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed
file:///C:/Documents%20and%20Settings/root/My%20Documents/My%20Music/phpinfo/t_files/phpinfo_002.gif (http://www.zend.com/) This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v3.1.31, Copyright (c) 2002-2007, by ionCube Ltd., and
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.2.8, Copyright (c) 1998-2007, by Zend Technologies

PHP Credits (http://takhfif100.com/__kloxo/phpinfo.php?=aasdasasddasd)

Configuration

PHP Core

DirectiveLocal ValueMaster Value allow_call_time_pass_referenceOffOff allow_url_fopenOnOn allow_url_includeOnOn always_populate_raw_post_dataOffOff arg_separator.input&& arg_separator.output&& asp_tagsOffOff auto_append_fileno valueno value auto_globals_jitOnOn auto_prepend_fileno valueno value browscapno valueno value default_charsetno valueno value default_mimetypetext/htmltext/html define_syslog_variablesOffOff disable_classesno valueno value disable_function***ec,passthru,shell_exec,system,p roc_open,popen,curl_exec,curl_multi_exec,parse_ini _file,show_sourceexec,passthru,shell_exec,system,p roc_open,popen,curl_exec,curl_multi_exec,parse_ini _file,show_source display_errorsOffOff display_startup_errorsOnOn doc_rootno valueno value docref_extno valueno value docref_rootno valueno value enable_dlOnOn error_append_stringno valueno value error_logno valueno value error_prepend_stringno valueno value error_reporting61436143 expose_phpOnOn extension_dir/usr/lib/php/modules/usr/lib/php/modules file_uploadsOnOn highlight.bg#FFFFFF#FFFFFF highlight.comment#FF8000#FF8000 highlight.default#0000BB#0000BB highlight.html#000000#000000 highlight.keyword#007700#007700 highlight.string#DD0000#DD0000 html_errorsOnOn ignore_repeated_errorsOffOff ignore_repeated_sourceOffOff ignore_user_abortOffOff implicit_flushOffOff include_path.:/usr/share/pear/.:/usr/share/pear/ log_errorsOffOff log_errors_max_len10241024 magic_quotes_gpcOffOff magic_quotes_runtimeOffOff magic_quotes_sybaseOffOff mail.force_extra_parametersno valueno value max_execution_time3030 max_file_uploads2020 max_input_nesting_level6464 max_input_time6060 memory_limit32M32M open_basedir/home/httpd/somewebsite.com/httpdocs:/home/httpd/somewebsite.com/somewebsite.com:/home/admin/:/tmp:/usr/share/pear:/var/lib/php/session/:/home/kloxo/httpd/scriptno value output_bufferingno valueno value output_handlerno valueno value post_max_size8M8M precision1414 realpath_cache_size16K16K realpath_cache_ttl120120 register_argc_argvOnOn register_globalsOffOff register_long_arraysOnOn report_memleaksOnOn report_zend_debugOnOn safe_modeOffOff safe_mode_exec_dirno valueno value safe_mode_gidOffOff safe_mode_include_dirno valueno value sendmail_fromno valueno value sendmail_path/usr/sbin/sendmail -t -i -f postmaster@somewebsite.com/usr/sbin/sendmail -t -i serialize_precision100100 short_open_tagOnOn SMTPlocalhostlocalhost smtp_port2525 sql.safe_modeOffOff track_errorsOffOff unserialize_callback_funcno valueno value upload_max_filesize2M2M upload_tmp_dir/tmp//tmp/ user_dirno valueno value variables_orderEGPCSEGPCS xmlrpc_error_number00 xmlrpc_errorsOffOff y2k_complianceOnOn zend.ze1_compatibility_modeOffOff
apache2handler

Apache Version Apache/2.2.17 (EL) Apache API Version 20051115 Server Administrator root@localhost Hostname:Port somewebsite.com:0 User/Group apache(48)/48 Max Requests Per Child: 4000 - Keep Alive: off - Max Per Connection: 100 Timeouts Connection: 120 - Keep-Alive: 15 Virtual Server Yes Server Root /etc/httpd Loaded Modules core prefork http_core mod_so mod_auth_basic mod_auth_digest mod_authn_file mod_authn_alias mod_authn_anon mod_authn_dbm mod_authn_default mod_authz_host mod_authz_user mod_authz_owner mod_authz_groupfile mod_authz_dbm mod_authz_default util_ldap mod_authnz_ldap mod_include mod_log_config mod_logio mod_env mod_ext_filter mod_mime_magic mod_expires mod_deflate mod_headers mod_usertrack mod_setenvif mod_mime mod_dav mod_status mod_autoindex mod_info mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_***** mod_*****_balancer mod_*****_ftp mod_*****_http mod_*****_connect mod_cache mod_suexec mod_disk_cache mod_file_cache mod_mem_cache mod_cgi mod_php5 mod_*****_ajp mod_ssl
DirectiveLocal ValueMaster Value engine11 last_modified00 xbithack00
Apache Environment

VariableValue HTTP_HOST somewebsite.com HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110614 AlexaToolbar/alxf-2.12 Firefox/3.6.18 HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_ACCEPT_LANGUAGE en-us,en;q=0.5 HTTP_ACCEPT_ENCODING gzip,deflate HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7 HTTP_KEEP_ALIVE 115 HTTP_CONNECTION keep-alive HTTP_REFERER http://swip:port/display.php?frm_action=update&frm_subaction=phpinfo&frm_o_o%5B0%5D%5Bclass%5D=domain&frm_o_o%5B0%5D%5Bnname%5D=somewebsite.com&frm_o_o%5B1%5D%5Bclass%5D=web HTTP_COOKIE __utma=98439796.622378530.1310428244.1310428244.13 10129032.2; __utmz=98439796.1344321244.1.1.utmcsr=(direct)|utm ccn=(direct)|utmcmd=(none); __utmb=98439796.2.5.3857820194; __utmc=98439796 PATH /sbin:/usr/sbin:/bin:/usr/bin SERVER_SIGNATURE <address>Apache/2.2.17 (EL) Server at somewebsite.com Port 80</address> SERVER_SOFTWARE Apache/2.2.17 (EL) SERVER_NAME somewebsite.com SERVER_ADDR SERVER_ADDR SERVER_PORT 80 REMOTE_ADDR remoteip DOCUMENT_ROOT /home/admin/somewebsite.com/ SERVER_ADMIN root@localhost SCRIPT_FILENAME /home/admin/kloxoscript/phpinfo.php REMOTE_PORT 3986 GATEWAY_INTERFACE CGI/1.1 SERVER_PROTOCOL HTTP/1.1 REQUEST_METHOD GET QUERY_STRING session=dfghsaertb3rds2fghjdsar25ujkfxsfsxcsdfdsfs dfsdfelwlkokpoopokokobmb4d REQUEST_URI /__kloxo/phpinfo.php?session=dfghsaertb3rds2fghjdsar25ujkfx sfsxcsdfdsfsdfsdfelwlkokpoopokokobmb4d SCRIPT_NAME /__kloxo/phpinfo.php
HTTP Headers Information

HTTP Request Headers HTTP Request GET /__kloxo/phpinfo.php?session=dfghsaertb3rds2fghjdsar25ujkfx sfsxcsdfdsfsdfsdfelwlkokpoopokokobmb4d HTTP/1.1 Host somewebsite.com User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110614 AlexaToolbar/alxf-2.12 Firefox/3.6.18 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Referer http://swip:port/display.php?frm_action=update&frm_subaction=phpinfo&frm_o_o%5B0%5D%5Bclass%5D=domain&frm_o_o%5B0%5D%5Bnname%5D=somewebsite.com&frm_o_o%5B1%5D%5Bclass%5D=web Cookie __utma=98439796.622378530.1310428244.1310428244.13 10129032.2; __utmz=98439796.1344321244.1.1.utmcsr=(direct)|utm ccn=(direct)|utmcmd=(none); __utmb=98439796.2.5.3857820194; __utmc=98439796 HTTP Response Headers X-Powered-By PHP/5.2.17 Connection close Transfer-Encoding chunked Content-Type text/html; charset=UTF-8
bz2

BZip2 Support Enabled Stream Wrapper support compress.bz2:// Stream Filter support bzip2.decompress, bzip2.compress BZip2 Version 1.0.3, 15-Feb-2005
calendar

Calendar support enabled
ctype

ctype functions enabled
curl

cURL support enabled cURL Information libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
date

date/time support enabled "Olson" Timezone Database Version 2010.9 Timezone Database internal Default timezone America/New_York
DirectiveLocal ValueMaster Value date.default_latitude31.766731.7667 date.default_longitude35.233335.2333 date.sunrise_zenith90.58333390.583333 date.sunset_zenith90.58333390.583333 date.timezoneno valueno value
dom

DOM/XML enabled DOM/XML API Version 20031129 libxml Version 2.6.26 HTML Support enabled XPath Support enabled XPointer Support enabled Schema Support enabled RelaxNG Support enabled
exif

EXIF Support enabled EXIF Version 1.4 $Id: exif.c 293036 2010-01-03 09:23:27Z sebastian $ Supported EXIF Version 0220 Supported filetypes JPEG,TIFF
filter

Input Validation and Filtering enabled Revision $Revision: 298196 $
DirectiveLocal ValueMaster Value filter.defaultunsafe_rawunsafe_raw filter.default_flagsno valueno value
ftp

FTP support enabled
gd

GD Support enabled GD Version bundled (2.0.34 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.2.1 GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled
gettext

GetText Support enabled
gmp

gmp support enabled GMP version 4.1.4
hash

hash support enabled Hashing Engines md2 md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru gost adler32 crc32 crc32b haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5
iconv

iconv support enabled iconv implementation glibc iconv library version 2.5
DirectiveLocal ValueMaster Value iconv.input_encodingISO-8859-1ISO-8859-1 iconv.internal_encodingISO-8859-1ISO-8859-1 iconv.output_encodingISO-8859-1ISO-8859-1
imap

IMAP c-Client Version 2004 SSL Support enabled Kerberos Support enabled
json

json support enabled json version 1.2.1
libxml

libXML support active libXML Version 2.6.26 libXML streams enabled
mbstring

Multibyte Support enabled Multibyte string engine libmbfl Multibyte (japanese) regex support enabled Multibyte regex (oniguruma) version 4.4.4 Multibyte regex (oniguruma) backtrack check On
mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
DirectiveLocal ValueMaster Value mbstring.detect_orderno valueno value mbstring.encoding_translationOffOff mbstring.func_overload00 mbstring.http_inputpasspass mbstring.http_outputpasspass mbstring.internal_encodingno valueno value mbstring.languageneutralneutral mbstring.strict_detectionOffOff mbstring.substitute_characterno valueno value
mcrypt

mcrypt supportenabled Version 2.5.8 Api No 20021217 Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes Supported modes cbc cfb ctr ecb ncfb nofb ofb stream
DirectiveLocal ValueMaster Value mcrypt.algorithms_dirno valueno value mcrypt.modes_dirno valueno value
mime_magic

mime_magic supportinvalid magic file, disabled
DirectiveLocal ValueMaster Value mime_magic.debugOffOff mime_magic.magicfile/usr/share/file/magic.mime/usr/share/file/magic.mime
mysql

MySQL Supportenabled Active Persistent Links 0 Active Links 0 Client API version 5.0.92 MYSQL_MODULE_TYPE external MYSQL_SOCKET /var/lib/mysql/mysql.sock MYSQL_INCLUDE -I/usr/include/mysql MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient
DirectiveLocal ValueMaster Value mysql.allow_persistentOffOff mysql.connect_timeout6060 mysql.default_hostno valueno value mysql.default_passwordno valueno value mysql.default_portno valueno value mysql.default_socketno valueno value mysql.default_userno valueno value mysql.max_linksUnlimitedUnlimited mysql.max_persistentUnlimitedUnlimited mysql.trace_modeOffOff
mysqli

MysqlI Supportenabled Client API library version 5.0.92 Client API header version 5.0.91 MYSQLI_SOCKET /var/lib/mysql/mysql.sock
DirectiveLocal ValueMaster Value mysqli.default_hostno valueno value mysqli.default_port33063306 mysqli.default_pwno valueno value mysqli.default_socketno valueno value mysqli.default_userno valueno value mysqli.max_linksUnlimitedUnlimited mysqli.reconnectOffOff
openssl

OpenSSL support enabled OpenSSL Version OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
pcre

PCRE (Perl Compatible Regular Expressions) Support enabled PCRE Library Version 6.6 06-Feb-2006
DirectiveLocal ValueMaster Value pcre.backtrack_limit100000100000 pcre.recursion_limit100000100000
PDO

PDO supportenabled PDO drivers mysql, sqlite
pdo_mysql

PDO Driver for MySQL, client library version5.0.92
pdo_sqlite

PDO Driver for SQLite 3.xenabled PECL Module version 1.0.1 $Id: pdo_sqlite.c 293036 2010-01-03 09:23:27Z sebastian $ SQLite Library 3.3.6
posix

Revision $Revision: 293036 $
pspell

PSpell Support enabled
Reflection

Reflectionenabled Version $Id: php_reflection.c 300129 2010-06-03 00:43:37Z felipe $
session

Session Support enabled Registered save handlers files user Registered serializer handlers php php_binary wddx
DirectiveLocal ValueMaster Value session.auto_startOffOff session.bug_compat_42OffOff session.bug_compat_warnOnOn session.cache_expire180180 session.cache_limiternocachenocache session.cookie_domainno valueno value session.cookie_httponlyOffOff session.cookie_lifetime00 session.cookie_path// session.cookie_secureOffOff session.entropy_fileno valueno value session.entropy_length00 session.gc_divisor10001000 session.gc_maxlifetime14401440 session.gc_probability11 session.hash_bits_per_character44 session.hash_function00 session.namePHPSESSIDPHPSESSID session.referer_checkno valueno value session.save_handlerfilesfiles session.save_path/var/lib/php/session/var/lib/php/session session.serialize_handlerphpphp session.use_cookiesOnOn session.use_only_cookiesOffOff session.use_trans_sid00
shmop

shmop support enabled
SimpleXML

Simplexml supportenabled Revision $Revision: 299016 $ Schema support enabled
sockets

Sockets Support enabled
SPL

SPL supportenabled Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBound***ception, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException
standard

Regex Library Bundled library enabled Dynamic Library Support enabled Path to sendmail /usr/sbin/sendmail -t -i -f postmaster@somewebsite.com
DirectiveLocal ValueMaster Value assert.active11 assert.bail00 assert.callbackno valueno value assert.quiet_eval00 assert.warning11 auto_detect_line_endings00 default_socket_timeout6060 safe_mode_allowed_env_varsPHP_PHP_ safe_mode_protected_env_varsLD_LIBRARY_PATHLD_LIBR ARY_PATH url_rewriter.tagsa=href,area=href,frame=src,input= src,form=fakeentrya=href,area=href,frame=src,input =src,form=fakeentry user_agentno valueno value
sysvmsg

sysvmsg support enabled Revision $Revision: 293036 $
tokenizer

Tokenizer Support enabled
wddx

WDDX Supportenabled WDDX Session Serializer enabled
xml

XML Support active XML Namespace Support active libxml2 Version 2.6.26
xmlreader

XMLReader enabled
xmlwriter

XMLWriter enabled
xsl

XSL enabled libxslt Version 1.1.17 libxslt compiled against libxml Version 2.6.26 EXSLT enabled libexslt Version 1.1.17
Zend Optimizer

Optimization Pass 1 enabled Optimization Pass 2 enabled Optimization Pass 3 enabled Optimization Pass 4 enabled Optimization Pass 9 enabled Zend Loader enabled License Path no value Obfuscation level 3
zip

Zip enabled Extension Version $Id: php_zip.c 305848 2010-11-30 11:04:06Z pajoye $ Zip version 1.8.11 Libzip version 0.9.0
zlib

ZLib Support enabled Stream Wrapper support compress.zlib:// Stream Filter support zlib.inflate, zlib.deflate Compiled Version 1.2.3 Linked Version 1.2.3
DirectiveLocal ValueMaster Value zlib.output_compressionOffOff zlib.output_compression_level-1-1 zlib.output_handlerno valueno value
Additional Modules

Module Name dbase ionCube Loader sysvsem sysvshm
Environment

VariableValue CONSOLE /dev/console SELINUX_INIT YES TERM linux INIT_VERSION sysvinit-2.86 PATH /sbin:/usr/sbin:/bin:/usr/bin runlevel 3 RUNLEVEL 3 PWD /usr/local/lxlabs/kloxo/httpdocs LANG C previous N PREVLEVEL N SHLVL 7 HOME / _ /usr/sbin/httpd
PHP Variables

VariableValue _REQUEST["session"]dfghsaertb3rds2fghjdsar25ujkfxsfsxcsdfdsfsdfsdfelw lkokpoopokokobmb4d _REQUEST["__utma"]98439796.622378530.1310428244.1310428244.131012903 2.2 _REQUEST["__utmz"]98439796.1344321244.1.1.utmcsr=(direct)|utmccn=(di rect)|utmcmd=(none) _REQUEST["__utmb"]98439796.2.5.3857820194 _REQUEST["__utmc"]98439796 _GET["session"]dfghsaertb3rds2fghjdsar25ujkfxsfsxcsdfdsfsdfsdfelw lkokpoopokokobmb4d _COOKIE["__utma"]98439796.622378530.1310428244.1310428244.131012903 2.2 _COOKIE["__utmz"]98439796.1344321244.1.1.utmcsr=(direct)|utmccn=(di rect)|utmcmd=(none) _COOKIE["__utmb"]98439796.2.5.3857820194 _COOKIE["__utmc"]98439796 _SERVER["HTTP_HOST"]somewebsite.com _SERVER["HTTP_USER_AGENT"]Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110614 AlexaToolbar/alxf-2.12 Firefox/3.6.18 _SERVER["HTTP_ACCEPT"]text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 _SERVER["HTTP_ACCEPT_LANGUAGE"]en-us,en;q=0.5 _SERVER["HTTP_ACCEPT_ENCODING"]gzip,deflate _SERVER["HTTP_ACCEPT_CHARSET"]ISO-8859-1,utf-8;q=0.7,*;q=0.7 _SERVER["HTTP_KEEP_ALIVE"]115 _SERVER["HTTP_CONNECTION"]keep-alive _SERVER["HTTP_REFERER"]http://swip:port/display.php?frm_action=update&frm_subaction=phpinfo&frm_o_o%5B0%5D%5Bclass%5D=domain&frm_o_o%5B0%5D%5Bnname%5D=somewebsite.com&frm_o_o%5B1%5D%5Bclass%5D=web _SERVER["HTTP_COOKIE"]__utma=98439796.622378530.1310428244.1310428244.13 10129032.2; __utmz=98439796.1344321244.1.1.utmcsr=(direct)|utm ccn=(direct)|utmcmd=(none); __utmb=98439796.2.5.3857820194; __utmc=98439796 _SERVER["PATH"]/sbin:/usr/sbin:/bin:/usr/bin _SERVER["SERVER_SIGNATURE"]<address>Apache/2.2.17 (EL) Server at somewebsite.com Port 80</address> _SERVER["SERVER_SOFTWARE"]Apache/2.2.17 (EL) _SERVER["SERVER_NAME"]somewebsite.com _SERVER["SERVER_ADDR"]_SERVER["SERVER_ADDR"] _SERVER["SERVER_PORT"]80 _SERVER["REMOTE_ADDR"]remotip _SERVER["DOCUMENT_ROOT"]/home/admin/somewebsite.com/ _SERVER["SERVER_ADMIN"]root@localhost _SERVER["SCRIPT_FILENAME"]/home/admin/kloxoscript/phpinfo.php _SERVER["REMOTE_PORT"]3986 _SERVER["GATEWAY_INTERFACE"]CGI/1.1 _SERVER["SERVER_PROTOCOL"]HTTP/1.1 _SERVER["REQUEST_METHOD"]GET _SERVER["QUERY_STRING"]session=dfghsaertb3rds2fghjdsar25ujkfxsfsxcsdfdsfs dfsdfelwlkokpoopokokobmb4d _SERVER["REQUEST_URI"]/__kloxo/phpinfo.php?session=dfghsaertb3rds2fghjdsar25ujkfx sfsxcsdfdsfsdfsdfelwlkokpoopokokobmb4d _SERVER["SCRIPT_NAME"]/__kloxo/phpinfo.php _SERVER["PHP_SELF"]/__kloxo/phpinfo.php _SERVER["REQUEST_TIME"]1310520758 _SERVER["argv"]Array
(
[0] => session=dfghsaertb3rds2fghjdsar25ujkfxsfsxcsdfdsfs dfsdfelwlkokpoopokokobmb4d
)
_SERVER["argc"]1 _ENV["CONSOLE"]/dev/console _ENV["SELINUX_INIT"]YES _ENV["TERM"]linux _ENV["INIT_VERSION"]sysvinit-2.86 _ENV["PATH"]/sbin:/usr/sbin:/bin:/usr/bin _ENV["runlevel"]3 _ENV["RUNLEVEL"]3 _ENV["PWD"]/usr/local/lxlabs/kloxo/httpdocs _ENV["LANG"]C _ENV["previous"]N _ENV["PREVLEVEL"]N _ENV["SHLVL"]7 _ENV["HOME"]/ _ENV["_"]/usr/sbin/httpd
PHP License

This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.

reimei
July 13th, 2011, 15:50
همین الان یه سایت وردپرس آپلود کردم. کاملا درست کار میکنه.
احتمالا مشکل از کد منه... ولی من مشکلی نمی بینم!

<?php
session_start();
class MyClass
{
public function checkMe()
{
if($_SESSION['auth'] == 'yes')
{
return true;
}
else
{
return false;
}
}

public function login()
{
if($this->checkMe() === false)
{
if(isset($_POST['login']))
{
$username = $_POST['username'];
$password = $_POST['password'];
$sql = "SELECT * FROM admin WHERE username = '$username' AND password=SHA1('$password')";
//query Database
$db = new db;
$result = $db->queryAll($sql);
if(count($result) == 1)
{
$_SESSION['auth'] = 'yes';
$login = false;
}
else
{
$error = 'نام كاربرى يا رمز عبور اشتباه مي باشد.';
}
}
if($login === true)
{
//render login page
$this->registry->template->error = $error;
$this->registry->template->render('admin/login');
}
else
{
//function index
$this->index();
}

}
elseif($this->checkMe() === true)
{
//function index
$this->index();
}
}

public function index()
{
if($this->checkMe() === true)
{
//render index page
$this->registry->template->message= 'خوش آمدید';
$this->registry->template->render('admin/index');
}
}

public function sampleFunction()
{
if($this->checkMe() === true)
{
//do sth else
}
}
}
?>

Rezash
July 13th, 2011, 16:39
فايل رو با notepad++ باز كنيد ف charset رو بذاريد utf8 without BOM و ذخيره كنيد.
احتمالا به علت مشكل utf و كاراكتر اضافي سشن با مشكل مواجه هست.چون همونطور كه ميدونيد دستوراتي كه نياز به ارسال هدر دارند بايد قبل از هر خروجي وارد بشند.

reimei
July 13th, 2011, 22:01
این کار رو هم کردم، بازم درست نشد

Rezash
July 13th, 2011, 22:29
فايلتون رو zip و پيوست كنيد تا بررسي كنمش.

reimei
July 14th, 2011, 15:21
فایل رو پیوست کردم

Rezash
July 14th, 2011, 19:57
مشكلي نداره
منظورم خود فايل بود،ميخواستم از لحاظ charset بررسيش كنم.اين فايل رو بدون ويرايش آپلود كنيد و با اين فايل هم نتيجه رو بگيد.
با charset درست به درستي كار كرد.

reimei
July 14th, 2011, 20:05
ممنون از کمک دوستان، مشکل حل شد. نتیجه ای که از این مبحث میگیریم:
در مرحله development این دو خط رو فراموش نکنیم

error_reporting(E_ALL);
ini_set('display_errors',1);