【问题标题】:php.ini variable not set through htaccessphp.ini 变量未通过 htaccess 设置
【发布时间】:2012-06-11 07:48:05
【问题描述】:

哪些 php.ini 变量我们不能通过 phpfiles 或 htaccess 设置。

表示如果我们要设置变量,那么我们必须直接在php服务器文件中配置。

谁能给我该变量名称的列表?

【问题讨论】:

  • 假设自己检查手册只是一项繁重的工作。

标签: php phpinfo php-ini


【解决方案1】:

http://php.net/manual/en/ini.list.php

选中“可更改”列

【讨论】:

    【解决方案2】:

    完整的列表很长。您可以查看此页面List of php.ini directives 寻求帮助。 Changeable栏里有PHP_INI_的你需要看看。

    allow_call_time_pass_reference
    allow_url_fopen
    allow_url_include
    always_populate_raw_post_data
    apc.cache_by_default
    apc.enabled
    apc.enable_cli
    apc.file_update_protection
    apc.filters
    apc.gc_ttl
    apc.include_once_override
    apc.localcache
    apc.localcache.size
    apc.max_file_size
    apc.mmap_file_mask
    apc.num_files_hint
    apc.optimization
    apc.report_autofilter
    apc.rfc1867
    apc.rfc1867_freq
    apc.rfc1867_name
    apc.rfc1867_prefix
    apc.shm_segments
    apc.shm_size
    apc.slam_defense
    apc.stat
    apc.stat_ctime
    apc.ttl
    apc.user_entries_hint
    apc.user_ttl
    apc.write_lock
    apd.bitmask
    apd.dumpdir
    apd.statement_tracing
    arg_separator
    arg_separator.input
    arg_separator.output
    asp_tags
    assert.active
    assert.bail
    assert.callback
    assert.quiet_eval
    assert.warning
    async_send
    auto_append_file
    auto_detect_line_endings
    auto_globals_jit
    auto_prepend_file
    axis2.client_home
    axis2.enable_exception
    axis2.enable_trace
    axis2.log_path
    bcmath.scale
    bcompiler.enabled
    birdstep.max_links
    blenc.key_file
    browscap
    cgi.check_shebang_line
    cgi.discard_path
    cgi.fix_pathinfo
    cgi.force_redirect
    cgi.nph
    cgi.redirect_status_env
    cgi.rfc2616_headers
    child_terminate
    cli.pager
    cli.prompt
    cli_server.color
    coin_acceptor.autoreset
    coin_acceptor.auto_initialize
    coin_acceptor.auto_reset
    coin_acceptor.command_function
    coin_acceptor.delay
    coin_acceptor.delay_coins
    coin_acceptor.delay_prom
    coin_acceptor.device
    coin_acceptor.lock_on_close
    coin_acceptor.start_unlocked
    com.allow_dcom
    com.autoregister_casesensitive
    com.autoregister_typelib
    com.autoregister_verbose
    com.code_page
    com.typelib_file
    crack.default_dictionary
    daffodildb.default_host
    daffodildb.default_password
    daffodildb.default_socket
    daffodildb.default_user
    daffodildb.port
    date.default_latitude
    date.default_longitude
    date.sunrise_zenith
    date.sunset_zenith
    date.timezone
    dba.default_handler
    dbx.colnames_case
    default_charset
    default_mimetype
    default_socket_timeout
    define_syslog_variables
    detect_unicode
    disable_classes
    disable_functions
    display_errors
    display_startup_errors
    docref_ext
    docref_root
    doc_root
    enable_dl
    engine
    error_append_string
    error_log
    error_prepend_string
    error_reporting
    etpan.default.charset
    etpan.default.protocol
    exif.decode_jis_intel
    exif.decode_jis_motorola
    exif.decode_unicode_intel
    exif.decode_unicode_motorola
    exif.encode_jis
    exif.encode_unicode
    exit_on_timeout
    expect.logfile
    expect.loguser
    expect.timeout
    expose_php
    extension
    extension_dir
    fastcgi.impersonate
    fastcgi.logging
    fbsql.allow_persistant
    fbsql.allow_persistent
    fbsql.autocommit
    fbsql.batchSize
    fbsql.batchsize
    fbsql.default_database
    fbsql.default_database_password
    fbsql.default_host
    fbsql.default_password
    fbsql.default_user
    fbsql.generate_warnings
    fbsql.max_connections
    fbsql.max_links
    fbsql.max_persistent
    fbsql.max_results
    fbsql.mbatchSize
    fbsql.show_timestamp_decimals
    file_uploads
    filter.default
    filter.default_flags
    from
    gd.jpeg_ignore_warning
    geoip.custom_directory
    geoip.database_standard
    gpc_order
    hidef.ini_path
    highlight.bg
    highlight.comment
    highlight.default
    highlight.html
    highlight.keyword
    highlight.string
    html_errors
    htscanner.config_file
    htscanner.default_docroot
    htscanner.default_ttl
    htscanner.stop_on_error
    http.allowed_methods
    http.allowed_methods_log
    http.cache_log
    http.composite_log
    http.etag.mode
    http.etag_mode
    http.force_exit
    http.log.allowed_methods
    http.log.cache
    http.log.composite
    http.log.not_found
    http.log.redirect
    http.ob_deflate_auto
    http.ob_deflate_flags
    http.ob_inflate_auto
    http.ob_inflate_flags
    http.only_exceptions
    http.persistent.handles.ident
    http.persistent.handles.limit
    http.redirect_log
    http.request.datashare.connect
    http.request.datashare.cookie
    http.request.datashare.dns
    http.request.datashare.ssl
    http.request.methods.allowed
    http.request.methods.custom
    http.send.deflate.start_auto
    http.send.deflate.start_flags
    http.send.inflate.start_auto
    http.send.inflate.start_flags
    http.send.not_found_404
    hyerwave.allow_persistent
    hyperwave.allow_persistent
    hyperwave.default_port
    ibase.allow_persistent
    ibase.dateformat
    ibase.default_charset
    ibase.default_db
    ibase.default_password
    ibase.default_user
    ibase.max_links
    ibase.max_persistent
    ibase.timeformat
    ibase.timestampformat
    ibm_db2.binmode
    ibm_db2.i5_allow_commit
    ibm_db2.i5_dbcs_alloc
    ibm_db2.instance_name
    iconv.input_encoding
    iconv.internal_encoding
    iconv.output_encoding
    ifx.allow_persistent
    ifx.blobinfile
    ifx.byteasvarchar
    ifx.charasvarchar
    ifx.default_host
    ifx.default_password
    ifx.default_user
    ifx.max_links
    ifx.max_persistent
    ifx.nullformat
    ifx.textasvarchar
    ignore_repeated_errors
    ignore_repeated_source
    ignore_user_abort
    imlib2.font_cache_max_size
    imlib2.font_path
    implicit_flush
    include_path
    ingres.allow_persistent
    ingres.array_index_start
    ingres.blob_segment_length
    ingres.cursor_mode
    ingres.default_database
    ingres.default_password
    ingres.default_user
    ingres.max_links
    ingres.max_persistent
    ingres.report_db_warnings
    ingres.timeout
    ingres.trace_connect
    ircg.control_user
    ircg.keep_alive_interval
    ircg.max_format_message_sets
    ircg.shared_mem_size
    ircg.work_dir
    last_modified
    ldap.base_dn
    ldap.max_links
    log.dbm_dir
    log_errors
    log_errors_max_len
    magic_quotes_gpc
    magic_quotes_runtime
    magic_quotes_sybase
    mail.add_x_header
    mail.force_extra_parameters
    mail.log
    mailparse.def_charset
    maxdb.default_db
    maxdb.default_host
    maxdb.default_pw
    maxdb.default_user
    maxdb.long_readlen
    max_execution_time
    max_input_nesting_level
    max_input_vars
    max_input_time
    mbstring.detect_order
    mbstring.encoding_translation
    mbstring.func_overload
    mbstring.http_input
    mbstring.http_output
    mbstring.internal_encoding
    mbstring.language
    mbstring.script_encoding
    mbstring.strict_detection
    mbstring.substitute_character
    mcrypt.algorithms_dir
    mcrypt.modes_dir
    memcache.allow_failover
    memcache.chunk_size
    memcache.default_port
    memcache.hash_function
    memcache.hash_strategy
    memcache.max_failover_attempts
    memory_limit
    mime_magic.debug
    mime_magic.magicfile
    msql.allow_persistent
    msql.max_links
    msql.max_persistent
    mssql.allow_persistent
    mssql.batchsize
    mssql.charset
    mssql.compatability_mode
    mssql.connect_timeout
    mssql.datetimeconvert
    mssql.max_links
    mssql.max_persistent
    mssql.max_procs
    mssql.min_error_severity
    mssql.min_message_severity
    mssql.secure_connection
    mssql.textlimit
    mssql.textsize
    mssql.timeout
    mysql.allow_persistent
    mysql.connect_timeout
    mysql.default_host
    mysql.default_password
    mysql.default_port
    mysql.default_socket
    mysql.default_user
    mysql.max_links
    mysql.max_persistent
    mysql.trace_mode
    mysqli.default_host
    mysqli.default_port
    mysqli.default_pw
    mysqli.default_socket
    mysqli.default_user
    mysqli.max_links
    mysqli.reconnect
    namazu.debugmode
    namazu.lang
    namazu.loggingmode
    namazu.sortmethod
    namazu.sortorder
    nsapi.read_timeout
    oci8.default_prefetch
    oci8.max_persistent
    oci8.old_oci_close_semantics
    oci8.persistent_timeout
    oci8.ping_interval
    oci8.privileged_connect
    oci8.statement_cache_size
    odbc.allow_persistent
    odbc.check_persistent
    odbc.defaultbinmode
    odbc.defaultlrl
    odbc.default_db
    odbc.default_pw
    odbc.default_user
    odbc.max_links
    odbc.max_persistent
    odbtp.datetime_format
    odbtp.detach_default_queries
    odbtp.guid_format
    odbtp.interface_file
    odbtp.truncation_errors
    opendirectory.default_separator
    opendirectory.max_refs
    opendirectory.separator
    open_basedir
    oracle.allow_persistent
    oracle.max_links
    oracle.max_persistent
    output_buffering
    output_handler
    pam.servicename
    pcre.backtrack_limit
    pcre.recursion_limit
    pdo.dsn.*
    pdo_odbc.connection_pooling
    pdo_odbc.db2_instance_name
    pfpro.defaulthost
    pfpro.defaultport
    pfpro.defaulttimeout
    pfpro.proxyaddress
    pfpro.proxylogon
    pfpro.proxypassword
    pfpro.proxyport
    pgsql.allow_persistent
    pgsql.auto_reset_persistent
    pgsql.ignore_notice
    pgsql.log_notice
    pgsql.max_links
    pgsql.max_persistent
    phar.extract_list
    phar.readonly
    phar.require_hash
    enable_post_data_reading
    post_max_size
    precision
    printer.default_printer
    python.append_path
    python.prepend_path
    realpath_cache_size
    realpath_cache_ttl
    register_argc_argv
    register_globals
    register_long_arrays
    report_memleaks
    report_zend_debug
    request_order
    runkit.internal_override
    runkit.superglobal
    safe_mode
    safe_mode_allowed_env_vars
    safe_mode_exec_dir
    safe_mode_gid
    safe_mode_include_dir
    safe_mode_protected_env_vars
    sendmail_from
    sendmail_path
    serialize_precision
    session.auto_start
    session.bug_compat_42
    session.bug_compat_warn
    session.cache_expire
    session.cache_limiter
    session.cookie_domain
    session.cookie_httponly
    session.cookie_lifetime
    session.cookie_path
    session.cookie_secure
    session.entropy_file
    session.entropy_length
    session.gc_dividend
    session.gc_divisor
    session.gc_maxlifetime
    session.gc_probability
    session.hash_bits_per_character
    session.hash_function
    session.name
    session.referer_check
    session.save_handler
    session.save_path
    session.serialize_handler
    session.use_cookies
    session.use_only_cookies
    session.use_trans_sid
    session_pgsql.create_table
    session_pgsql.db
    session_pgsql.disable
    session_pgsql.failover_mode
    session_pgsql.gc_interval
    session_pgsql.keep_expired
    session_pgsql.sem_file_name
    session_pgsql.serializable
    session_pgsql.short_circuit
    session_pgsql.use_app_vars
    session_pgsql.vacuum_interval
    short_open_tag
    simple_cvs.authMethod
    simple_cvs.compressionLevel
    simple_cvs.cvsRoot
    simple_cvs.host
    simple_cvs.moduleName
    simple_cvs.userName
    simple_cvs.workingDir
    SMTP
    smtp_port
    soap.wsdl_cache
    soap.wsdl_cache_dir
    soap.wsdl_cache_enabled
    soap.wsdl_cache_limit
    soap.wsdl_cache_ttl
    sql.safe_mode
    sqlite.assoc_case
    sybase.allow_persistent
    sybase.hostname
    sybase.interface_file
    sybase.login_timeout
    sybase.max_links
    sybase.max_persistent
    sybase.min_client_severity
    sybase.min_error_severity
    sybase.min_message_severity
    sybase.min_server_severity
    sybase.timeout
    sybct.allow_persistent
    sybct.deadlock_retry_count
    sybct.hostname
    sybct.login_timeout
    sybct.max_links
    sybct.max_persistent
    sybct.min_client_severity
    sybct.min_server_severity
    sybct.packet_size
    sybct.timeout
    sysvshm.init_mem
    tidy.clean_output
    tidy.default_config
    track_errors
    track_vars
    unserialize_callback_func
    uploadprogress.file.filename_template
    upload_max_filesize
    max_file_uploads
    upload_tmp_dir
    url_rewriter.tags
    user_agent
    user_dir
    user_ini.cache_ttl
    user_ini.filename
    valkyrie.auto_validate
    valkyrie.config_path
    variables_order
    velocis.max_links
    vld.active
    vld.execute
    vld.skip_append
    vld.skip_prepend
    windows_show_crt_warning
    xbithack
    xdebug.auto_profile
    xdebug.auto_profile_mode
    xdebug.auto_trace
    xdebug.collect_includes
    xdebug.collect_params
    xdebug.collect_return
    xdebug.collect_vars
    xdebug.default_enable
    xdebug.dump.COOKIE
    xdebug.dump.ENV
    xdebug.dump.FILES
    xdebug.dump.GET
    xdebug.dump.POST
    xdebug.dump.REQUEST
    xdebug.dump.SERVER
    xdebug.dump.SESSION
    xdebug.dump_globals
    xdebug.dump_once
    xdebug.dump_undefined
    xdebug.extended_info
    xdebug.idekey
    xdebug.manual_url
    xdebug.max_nesting_level
    xdebug.output_dir
    xdebug.profiler_aggregate
    xdebug.profiler_append
    xdebug.profiler_enable
    xdebug.profiler_enable_trigger
    xdebug.profiler_output_dir
    xdebug.profiler_output_name
    xdebug.remote_autostart
    xdebug.remote_enable
    xdebug.remote_handler
    xdebug.remote_host
    xdebug.remote_log
    xdebug.remote_mode
    xdebug.remote_port
    xdebug.show_exception_trace
    xdebug.show_local_vars
    xdebug.show_mem_delta
    xdebug.trace_format
    xdebug.trace_options
    xdebug.trace_output_dir
    xdebug.trace_output_name
    xdebug.var_display_max_children
    xdebug.var_display_max_data
    xdebug.var_display_max_depth
    xmlrpc_errors
    xmlrpc_error_number
    xmms.path
    xmms.session
    y2k_compliance
    yami.response.timeout
    yaz.keepalive
    yaz.log_file
    yaz.log_mask
    yaz.max_links
    zend.enable_gc
    zend.multibyte
    zend.script_encoding
    zend.signal_check
    zend.ze1_compatibility_mode
    zend_extension
    zend_extension_debug
    zend_extension_debug_ts
    zend_extension_ts
    zlib.output_compression
    zlib.output_compression_level
    zlib.output_handler
    

    【讨论】:

      【解决方案3】:

      请在此处查看变量列表

      http://php.net/manual/en/ini.list.php

      其中的“可更改”列显示了确定何时何地可以设置指令的模式。

      网址是

      http://www.php.net/manual/en/configuration.changes.modes.php

      【讨论】:

        【解决方案4】:

        检查List of php.ini directivesChangeable 字段。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2011-12-07
          • 2017-12-22
          • 1970-01-01
          • 1970-01-01
          • 2019-05-30
          • 2014-12-02
          • 2015-07-25
          • 2018-11-18
          相关资源
          最近更新 更多