Do you offer PHP5 with MySQLi?
Modwest provides PHP4 as our standard PHP offering. However, we are also making PHP5 available to those customers who want to start using it now. In order to have your scripts execute as PHP5, do the following:
1. Name your PHP scripts with a ".php5" extension.
2. Make sure you have a valid /etc/php5/php.ini file under your /etc directory. PHP5 scripts look for an initialization file named "php.ini" under "/etc/php5" whereas PHP4 scripts expect to find that file under just "/etc". You'll find a valid php.ini file designed for PHP5 that you can copy/paste as an Annotation to this FAQ.
Because PHP versions 4 and 5 use different filename extensions, and different "php.ini" files, you can run PHP4 scripts side by side with PHP5 scripts.
index.php
will run as PHP4 and get configuration from /etc/php.ini.
index.php5
will run as PHP5 and get configuration from /etc/php5/php.ini.
PHP5 is available on our system with a variety of extension modules, including
mysqli, which are all listed on our
phpinfo page.
More information about using PHP version 5 instead of 4 is
here.
User-Contributed Notes
 |
| 15-Nov-2004 21:47 |
[PHP]
;;;;;;;;;;;;;;;;;;;;;;;;;;;
; About php.ini for PHP5 ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
; PHP looks for it in the current working directory, in the
; path designated by the environment variable PHPRC, and in
; the path defined at compile time (/etc/php5/php.ini), in that
; order. The path in which the php.ini file is looked for
; can be overridden using the -c argument in command line mode.
;
; Values can be a string, a number, a PHP constant
; (e.g. E_ALL or M_PI), one of the INI constants
; (On, Off, True, False, Yes, No and None) or an expression
; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo").
;
; Expressions in the INI file are limited to bitwise
; operators and parentheses:
; | bitwise OR
; & bitwise AND
; ~ bitwise NOT
; ! boolean NOT
;
; Boolean flags can be turned on using the values 1, On, True
; or Yes. They can be turned off using the values 0, Off, False
; or No.
;
; An empty string can be denoted by simply not writing
; anything after the equal sign, or by using the None keyword.
;
; If you use constants in your value, and these constants
; belong to a dynamically loaded extension (either a PHP
; extension or a Zend extension), you may only use these
; constants *after* the line that loads the extension.
;
;;;;;;;;;;;;;;;;;;;
; About this file ;
;;;;;;;;;;;;;;;;;;;
; Changes from previous default configs:
; - register_globals = Off [Security, Performance]
; - register_long_arrays = Off [Performance]
; - display_errors = Off [Security]
; - log_errors = On [Security]
; - output_buffering = 4096 [Performance]
; - register_argc_argv = Off [Performance]
; - magic_quotes_gpc = Off [Performance]
; - variables_order = "GPCS" [Performance]
; - error_reporting = E_ALL [Code Cleanliness, Security(?)]
; - allow_call_time_pass_reference = Off [Code cleanliness]
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;
engine = On
; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
zend.ze1_compatibility_mode = Off
short_open_tag = On
asp_tags = Off
precision = 14
y2k_compliance = On
output_buffering = 4096
;output_handler =
zlib.output_compression = Off
;zlib.output_handler =
implicit_flush = Off
unserialize_callback_func=
serialize_precision = 100
allow_call_time_pass_reference = Off
;
; Safe Mode
;
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
; This directive is *NOT* affected by whether Safe Mode
; is turned On or Off
;open_basedir =
disable_functions =
disable_classes =
;highlight.string = #DD0000
;highlight.comment = #FF9900
;highlight.keyword = #007700
;highlight.bg = #FFFFFF
;highlight.default = #0000BB
;highlight.html = #000000
;
; Misc
;
expose_php = On
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 30 ; Per script, in seconds
max_input_time = 60 ; Max seconds for parsing request data
memory_limit = 8M ; Max memory a script may consume (8MB)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; error_reporting is a bit-field.
; Or each number up to get desired error reporting level
; E_ALL - All errors and warnings
; E_ERROR - fatal run-time errors
; E_WARNING - run-time warnings (non-fatal errors)
; E_PARSE - compile-time parse errors
; E_NOTICE - run-time notices (these are warnings which often
; result from a bug in your code, but it's
; possible that it was intentional (e.g., using
; an uninitialized variable and relying on the
; fact it's automatically initialized to an
; empty string)
; E_STRICT - run-time notices, enable to have PHP suggest
; changes to your code which will ensure the best
; interoperability and forward compatibility
; of your code
; E_CORE_ERROR - fatal errors that occur during PHP's
; initial startup
; E_CORE_WARNING - warnings (non-fatal errors) that occur
; during PHP's initial startup
; E_COMPILE_ERROR - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated notice message
;
; Examples:
;
; - Show all errors, except for notices and coding standards warnings
;
;error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
;
; - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE
;
; - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
; - Show all errors
;
error_reporting = E_ALL
display_errors = On
display_startup_errors = Off
log_errors = Off
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
;html_errors = Off
;docref_root = "/phpmanual/"
;docref_ext = .html
;error_prepend_string = "<font color=ff0000>"
;error_append_string = "</font>"
error_log = /logs/php5_error_log
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
;
;arg_separator.output = "&"
;arg_separator.input = ";&"
variables_order = "GPCS"
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
post_max_size = 8M
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
;default_charset = "iso-8859-1"
;always_populate_raw_post_data = On
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
doc_root =
user_dir =
extension_dir = "/usr/local/libexec/php5"
enable_dl = On
; cgi.force_redirect = 1
; cgi.nph = 1
; cgi.redirect_status_env = ;
; fastcgi.impersonate = 1;
; cgi.rfc2616_headers = 0
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
file_uploads = On
upload_tmp_dir = /tmp
upload_max_filesize = 2M
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
allow_url_fopen = Off
;from="john@doe.com"
; user_agent="PHP"
default_socket_timeout = 60
; auto_detect_line_endings = Off
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;extension = bcmath.so
;extension = bz2.so
;extension = ctype.so
;extension = curl.so
;extension = dbase.so
;extension = dba.so
;extension = dbx.so
;extension = dio.so
;extension = dom.so
;extension = exif.so
;extension = fdf.so
;extension = filepro.so
;extension = ftp.so
;extension = gd.so
;extension = gettext.so
;extension = gmp.so
;extension = iconv.so
;extension = imap.so
;extension = ldap.so
;extension = mbstring.so
;extension = mcrypt.so
;extension = mhash.so
;extension = mime_magic.so
;extension = ming.so
;extension = mnogosearch.so
extension = mysql.so
;extension = mysqli.so
;extension = odbc.so
;extension = pcntl.so
;extension = pfpro.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 = xmlrpc.so
;extension = xml.so
;extension = xsl.so
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[Syslog]
define_syslog_variables = Off
[mail function]
sendmail_path = "/usr/sbin/sendmail -t"
;mail.force_extra_parameters =
[SQL]
sql.safe_mode = Off
[ODBC]
;odbc.default_db = Not yet implemented
;odbc.default_user = Not yet implemented
;odbc.default_pw = Not yet implemented
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[MySQL]
mysql.allow_persistent = Off
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
[MySQLI]
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_password =
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 = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[Sybase]
sybase.allow_persistent = On
sybase.max_persistent = -1
sybase.max_links = -1
;sybase.interface_file = "/usr/sybase/interfaces"
sybase.min_error_severity = 10
sybase.min_message_severity = 10
sybase.compatability_mode = Off
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[dbx]
dbx.colnames_case = "lowercase"
[bcmath]
bcmath.scale = 0
[browscap]
;browscap = extra/browscap.ini
[Informix]
ifx.default_host =
ifx.default_user =
ifx.default_password =
ifx.allow_persistent = On
ifx.max_persistent = -1
ifx.max_links = -1
ifx.textasvarchar = 0
ifx.byteasvarchar = 0
ifx.charasvarchar = 0
ifx.blobinfile = 0
ifx.nullformat = 0
[Session]
session.save_handler = files
session.save_path = "/tmp"
session.use_cookies = 1
; session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
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.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
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.connect_timeout = 5
;mssql.timeout = 60
;mssql.textlimit = 4096
;mssql.textsize = 4096
;mssql.batchsize = 0
;mssql.datetimeconvert = On
mssql.secure_connection = Off
;mssql.max_procs = 25
[Assertion]
;assert.active = On
;assert.warning = On
;assert.bail = Off
;assert.callback = 0
;assert.quiet_eval = 0
[Ingres II]
ingres.allow_persistent = On
ingres.max_persistent = -1
ingres.max_links = -1
ingres.default_database =
ingres.default_user =
ingres.default_password =
[Verisign Payflow Pro]
pfpro.defaulthost = "test-payflow.verisign.com"
pfpro.defaultport = 443
pfpro.defaulttimeout = 30
;pfpro.proxyaddress =
;pfpro.proxyport =
;pfpro.proxylogon =
;pfpro.proxypassword =
[Sockets]
sockets.use_system_read = On
[com]
;com.typelib_file =
;com.allow_dcom = true
;com.autoregister_typelib = true
;com.autoregister_casesensitive = false
;com.autoregister_verbose = true
[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
[FrontBase]
;fbsql.allow_persistent = On
;fbsql.autocommit = On
;fbsql.default_database =
;fbsql.default_database_password =
;fbsql.default_host =
;fbsql.default_password =
;fbsql.default_user = "_SYSTEM"
;fbsql.generate_warnings = Off
;fbsql.max_connections = 128
;fbsql.max_links = 128
;fbsql.max_persistent = -1
;fbsql.max_results = 128
;fbsql.batchSize = 1000
[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
; End
|
|
| 11-Jun-2005 12:37 |
The mysql-i extension is a client for PHP5 that allows you to use new
features like object oriented syntax.
As of this writing, however, MySQL server here is still 4.0.24. Since
some features of the mysqli client rely on a 4.1.3 server, those
features will be unavailable.
To check the current MySQL server version, go here:
http://www.modwest.com/help/kb6-13.html
|
|
 |
Related Questions:
How do I set PHP include_path?
What PHP modules are available and how do I load them?
How do I change timezone for PHP?
How do I do html form file uploads?
Can I run a PHP script on cron?
Why does a PHP function give an error that it is undefined?
Why does PHP HTTP authentication not work?
Why does my PHP script throw an Internal Server Error 500?
What version of PHP are you running and can I see a phpinfo()?
Can you change session cookie timeout in php.ini for me?
I can't upload a file larger than 8MB through a PHP script
Do you have a quick form mail script?
Can I use a PHP extension like PDFlib that I have personally purchased a license to use?
Where is the php_error_log?
Can I have all .html pages parsed as PHP?
What's the difference between running PHP as a cgi or as a module in safe mode?
The PHP curl module doesn't work.
My PHP session is lost whenever I go to a secure URL using the shared SSL certificate.
Do you provide PEAR?
Where can I download free PHP scripts?
How do I get different character sets within my PHP page to display correctly?
Do I need to set any 777 permissions in order for my PHP scripts to create files and directories?
Can I use Smarty Templates?
The PDFlib extension gives a UPR description error.
How do I execute my .php files as PHP 5?
How do I use the url_rewriter.tags setting for PHP?
Why does flush() not flush the data to my browser?
What is CAPTCHA? How can I use it?
Why does PHPLIB sessions give me a MySQL Database error?
Will my Zend Encoded files work?
The pfpro pfpro_process() function keeps giving me Error 31
Will IonCube encoded files work?
I need the virtual() function and it is not available.
Why does getallheaders() say undefined function?
Can I talk over SSL when opening an IMAP connection with the PHP imap_open() function?
How can one PHP file transparently handle all search-engine friendly URLs?
My PHP script needs a newer version of Zend Optimizer. What do I do?
How do I put PHP sessions into a database instead of the default files-based method?
Browse Categories:Getting Started, FTP, Telnet/SSH, Moving Domains, E-mail, Traffic Reports, Mailing Lists, Apache, PHP, CGI, Other Server-Side Scripting, MySQL Database, Imaging Libraries, Other Software, Billing & Terms, Control Panel, E-commerce, Pre-Sales |