We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43072
    • 4 Posts
    Hi,

    I'm new to MODX and experimenting with an install on my current hosting platform. The particular virtual server I'm using had many PHP extensions disabled, and I'm having to enable things one at a time as I hit roadblocks (JSON, database driver, curl). I'm wondering if anyone could help me with a list of reasonable/necessary things to have enabled going forward so I don't have to hit a snag and investigate each time?

    Mostly the extension= lines are what I had to uncomment to get things working. The php.ini file is posted below.

    Thanks!

    [PHP]
    engine = On
    zend.ze1_compatibility_mode = Off
    short_open_tag = Off
    asp_tags = Off
    precision    =  14
    y2k_compliance = On
    output_buffering = 4096
    zlib.output_compression = Off
    implicit_flush = Off
    unserialize_callback_func=
    serialize_precision = 100
    allow_call_time_pass_reference = Off
    safe_mode = Off
    safe_mode_gid = Off
    safe_mode_include_dir =
    safe_mode_exec_dir =
    safe_mode_allowed_env_vars = PHP_
    safe_mode_protected_env_vars = LD_LIBRARY_PATH
    disable_functions =
    disable_classes =
    expose_php = Off
    max_execution_time = 60
    max_input_time = 60
    memory_limit = 64M
    error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
    display_errors = Off
    display_startup_errors = Off
    log_errors = On
    log_errors_max_len = 1024
    ignore_repeated_errors = On
    ignore_repeated_source = On
    report_memleaks = On
    track_errors = Off
    arg_separator.output = "&"
    variables_order = "GPCS"
    register_globals = Off
    register_long_arrays = Off
    register_argc_argv = Off
    auto_globals_jit = On
    post_max_size = 32M
    magic_quotes_gpc = Off
    magic_quotes_runtime = Off
    magic_quotes_sybase = Off
    auto_prepend_file =
    auto_append_file =
    default_mimetype = "text/html"
    default_charset = "UTF-8"
    include_path = ".:/usr/local/lib/php"
    doc_root =
    user_dir =
    enable_dl = On
    cgi.force_redirect = 1
    cgi.fix_pathinfo = 1
    file_uploads = On
    upload_tmp_dir = /tmp
    upload_max_filesize = 32M
    allow_url_fopen = Off
    allow_url_include = Off
    user_agent="PHP"
    default_socket_timeout = 60
    
    ;extension=apc.so
    ;extension=bcmath.so
    ;extension=bz2.so
    ;extension=calendar.so
    extension=curl.so
    ;extension=dba.so
    ;extension=dbase.so
    ;extension=dbx.so
    ;extension=dom.so
    ;extension=eaccelerator.so
    ;extension=exif.so
    ;extension=ftp.so
    extension=gd.so
    ;extension=gettext.so
    ;extension=gmp.so
    extension=iconv.so
    ;extension=imap.so 
    extension=json.so
    ;extension=mhash.so
    extension=mbstring.so
    extension=mcrypt.so
    extension=mysql.so
    extension=mysqli.so
    ;extension=pcntl.so
    ;extension=pdf.so
    extension=pdo.so
    extension=pdo_mysql.so
    ;extension=pdo_pgsql.so
    ;extension=pdo_sqlite.so
    ;extension=pgsql.so
    ;extension=posix.so
    ;extension=pspell.so
    ;extension=shmop.so
    ;extension=soap.so
    extension=sockets.so
    ;extension=sysvsem.so
    ;extension=sysvshm.so
    ;extension=wddx.so
    ;extension=xmlrpc.so
    ;extension=xsl.so
    ;extension=zip.so
    extension=zlib.so
    
    [Date]
    date.timezone = UTC
    
    [filter]
    ;filter.default = unsafe_raw
    ;filter.default_flags =
    
    [iconv]
    ;iconv.input_encoding = ISO-8859-1
    ;iconv.internal_encoding = ISO-8859-1
    ;iconv.output_encoding = ISO-8859-1
    
    [sqlite]
    ;sqlite.assoc_case = 0
    
    [xmlrpc]
    ;xmlrpc_error_number = 0
    ;xmlrpc_errors = 0
    
    [Pcre]
    ;pcre.recursion_limit=100000
    ;pcre.backtrack_limit=100000
    
    [Syslog]
    define_syslog_variables  = Off
    
    [SQL]
    sql.safe_mode = Off
    
    [MySQL]
    mysql.allow_persistent = On
    mysql.max_persistent = 20
    mysql.max_links = -1
    mysql.default_port = 3306
    mysql.default_socket =
    mysql.default_host = localhost
    mysql.connect_timeout = 60
    mysql.trace_mode = Off
    
    [MySQLi]
    mysqli.max_links = -1
    mysqli.default_port = 3306
    mysqli.default_socket =
    mysqli.default_host = localhost
    mysqli.reconnect = Off
    
    [mSQL]
    msql.allow_persistent = On
    msql.max_persistent = -1
    msql.max_links = -1
    
    [PostgresSQL]
    pgsql.allow_persistent = On
    pgsql.auto_reset_persistent = Off
    pgsql.max_persistent = 20
    pgsql.max_links = 40
    pgsql.ignore_notice = 0
    pgsql.log_notice = 0
    
    [bcmath]
    bcmath.scale = 0
    
    [Session]
    session.save_handler = files
    session.save_path = [redacted]
    session.use_cookies = 1
    session.name = PHPSESSID
    session.auto_start = 0
    session.cookie_lifetime = 0
    session.cookie_path = /
    session.cookie_domain =
    session.cookie_httponly = 
    session.serialize_handler = php
    session.gc_probability = 1
    session.gc_divisor     = 1000
    session.gc_maxlifetime = 1440
    session.bug_compat_42 = 0
    session.bug_compat_warn = 1
    session.referer_check =
    session.entropy_length = 0
    session.entropy_file =
    session.cache_limiter = nocache
    session.cache_expire = 180
    session.use_trans_sid = 0
    session.hash_function = 1
    session.hash_bits_per_character = 5
    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
    
    [MSSQL]
    mssql.allow_persistent = On
    mssql.max_persistent = -1
    mssql.max_links = -1
    mssql.min_error_severity = 10
    mssql.min_message_severity = 10
    mssql.compatability_mode = Off
    mssql.secure_connection = Off
    
    [mbstring]
    ;mbstring.language = Japanese
    ;mbstring.internal_encoding = EUC-JP
    ;mbstring.http_input = auto
    ;mbstring.http_output = SJIS
    ;mbstring.encoding_translation = Off
    ;mbstring.detect_order = auto
    ;mbstring.substitute_character = none;
    ;mbstring.func_overload = 0
    ;mbstring.strict_encoding = Off
    
    [gd]
    ;gd.jpeg_ignore_warning = 0
    
    [exif]
    ;exif.encode_unicode = ISO-8859-15
    ;exif.decode_unicode_motorola = UCS-2BE
    ;exif.decode_unicode_intel    = UCS-2LE
    ;exif.encode_jis =
    ;exif.decode_jis_motorola = JIS
    ;exif.decode_jis_intel    = JIS
    
    [Tidy]
    ;tidy.default_config = /usr/local/lib/php/default.tcfg
    tidy.clean_output = Off
    
    [soap]
    soap.wsdl_cache_enabled=1
    soap.wsdl_cache_dir="/tmp"
    soap.wsdl_cache_ttl=86400
    
    [Zend]
    zend_optimizer.version=3.3.0
    zend_extension=/usr/local/joyent/zend/ZendExtensionManager.so
    zend_extension_ts=/usr/local/joyent/zend/ZendExtensionManager_TS.so
    zend_extension_manager.optimizer=/usr/local/joyent/zend/Optimizer-3.3.0
    zend_extension_manager.optimizer_ts=/usr/local/joyent/zend/Optimizer_TS-3.3.0
    
      • 11681
      • 98 Posts
      patzer,

      This specifies the server environment that MODX Revo requires:

      http://rtfm.modx.com/display/revolution20/Server+Requirements

      Is your configuration working well enough to allow you to install? In Revo 2.2.5-pl (for example), you can view the server configuration as the MODX Manager sees it under Reports => System Info. It's a good idea to check this, since your hosting service's config & policy might require you to have php.ini files at both the document root and at the Manager root. That is the case for the host I'm currently using.

      Of course you can also temporarily place a file containing the phpinfo() call at any place of interest in the file hierarchy in order to view the configuration in effect there.
        I looked just like that in 1964.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Any custom php.ini files have to exist in every directory where a .php file will be run; php.ini is not inherited like .htaccess files are. For the most part, this means the location of the manager's index.php, and possibly the site's main index.php file. Everything else is just included, not run independently.

        If you do happen to have independent .php files, AJAX processors for example, then they would also need to have a php.ini file in their own directories.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org