php mysqli_connect()不能用 ,找不到pdo driver

我的apache服务器能正常启用,php代码也能正常运行,但涉及到数据库的就出问题了!
php.ini已正常配置:
extension_dir = "c:/php7/ext"

extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_fileinfo.dll
;extension=php_ftp.dll
extension=php_gd2.dll
;extension=php_gettext.dll
extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
extension=php_openssl.dll
extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
extension=php_shmop.dll

但在phpinfo()里Loaded Configuration File   为none

另外只有一个pdo表,不见mysqli表:图片说明

使用pdo $con= new PDO("localhost:3306","username","password");
出现

Fatal error: Uncaught PDOException: could not find driver in C:\Apache24\htdocs\demo.com\register.php:27 Stack trace: #0 C:\Apache24\htdocs\demo.com\register.php(27): PDO->__construct('localhost:3306', 'username', 'password') #1 {main} thrown in C:\Apache24\htdocs\demo.com\register.php on line 27

使用mysqli_connect $con= mysqli_connect("localhost:3306","username","password");
出现
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in C:\Apache24\htdocs\demo.com\register.php:27 Stack trace: #0 {main} thrown in C:\Apache24\htdocs\demo.com\register.php on line 27

我的php版本是7.13,apache2.4.25,mysql5.7

请知道什么原因的大神指教,感激不尽!

2个回答

我重装了php,配置完php.ini后,然后问题解决了,如果有遇到这个问题的,可以试试这个方法

其实是你只装了PDO扩展没有安装PDO_Mysql扩展 PDO只是接口,Pdo_mysql才是针对mysql的实现

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
在PHP 7.0.7上安装MySQLi和pgsql扩展

<div class="post-text" itemprop="text"> <p>My php.ini extentions section is like as follows</p> <pre><code> ; Windows Extensions ; Note that ODBC support is built in, so no dll is needed for it. ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+) ; extension folders as well as the separate PECL DLL download (PHP 5+). ; Be sure to appropriately set the extension_dir directive. ; ;extension=php_bz2.dll ;extension=php_curl.dll ;extension=php_fileinfo.dll ;extension=php_gd2.dll ;extension=php_gettext.dll ;extension=php_gmp.dll ;extension=php_intl.dll ;extension=php_imap.dll ;extension=php_interbase.dll ;extension=php_ldap.dll ;extension=php_mbstring.dll ;extension=php_exif.dll ; Must be after mbstring as it depends on it extension=php_mysqli.dll ;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client ;extension=php_openssl.dll ;extension=php_pdo_firebird.dll ;extension=php_pdo_mysql.dll ;extension=php_pdo_oci.dll ;extension=php_pdo_odbc.dll extension=php_pdo_pgsql.dll ;extension=php_pdo_sqlite.dll extension=php_pgsql.dll ;extension=php_shmop.dll ; The MIBS data available in the PHP distribution must be installed. ; See http://www.php.net/manual/en/snmp.installation.php ;extension=php_snmp.dll ;extension=php_soap.dll ;extension=php_sockets.dll ;extension=php_sqlite3.dll ;extension=php_tidy.dll ;extension=php_xmlrpc.dll ;extension=php_xsl.dll </code></pre> <p>I'm using PhpStorm to host PHP. Whenever I try to run the function i get this:</p> <pre><code>Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in **archive** Stack trace: #0 {main} thrown in **archive** </code></pre> <p>And my code looks like follows:</p> <pre><code>&lt;?php $con = mysqli_connect("localhost","root","","aula") or die(mysqli_error($con)); mysqli_query($con, 'SET NAMES utf8') or die(mysqli_error($con)); </code></pre> <p>On the second line I already get the error. How can I install the extensions? Thanks in advance.</p> </div>

MySQL错误信息,mysql_connect(),有什么方法可以修复它吗?

<div class="post-text" itemprop="text"> <p>So this is the error message: </p> <blockquote> <p><em>PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead</em></p> </blockquote> <p>This is the affected piece of code:</p> <pre><code>class wdClient { var $dbLink; // The database link var $prefix; // Table prefix var $script; // The script running /** * Construct a new directory object. */ function wdClient() { error_reporting(E_ALL ^ E_NOTICE); $this-&gt;prefix = WDDBPREFIX; // Connect to the database $this-&gt;dbLink = mysql_connect(WDDBHOST, WDDBUSER, WDDBPASSWD); // Select the database mysql_select_db(WDDBNAME, $this-&gt;dbLink) or die('Sorry, The site is currently unavailable!'); } </code></pre> <p>where <code>WDDBPREFIX</code>, <code>WDDBHOST</code>, <code>WDDBUSER</code>, <code>WDDBPASSWD</code>, <code>WDDBNAME</code> are already defined in a config file.</p> <p>I have tried simply using <code>mysqli_connect</code> instead of <code>mysql_connect</code> but it's not working.</p> </div>

从PDO转换为MySQLI

<div class="post-text" itemprop="text"> <p>after a lot of hours troubleshooting i found that my hoster (hosting2go.nl) does not support PDO::mysql they just dont installd the driver so my Model.php in my MVC framework is screwed. I solved the problems with my database-conection. The problem is that i am completely new to mysqli and justr cant find out how to make my model.php (writen for PDO::mysql) writen for Mysqli (instead of PDO) i hope you guys can help me out... My code:</p> <p>|ORIGINAL PDO MODEL.PHP|</p> <pre><code>class Model { function __construct() { $this-&gt;db = new Database; $this-&gt;data = $_POST; } public function query( $data = array(), $query){ try{ $result = $this -&gt; db -&gt; prepare($query); $result-&gt;execute($data); $result = $result-&gt;fetchAll(PDO::FETCH_ASSOC); return $result; }catch(PDOException $e){ echo $e; } } </code></pre> <p>|My Database-connection|</p> <pre><code>class Database extends mysqli { public function __construct() { parent::__construct("localhost","root","","bartsite"); if (mysqli_connect_error()) { die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); } } } </code></pre> <p>|This is what i made of my model.php FOR MYSQLI|</p> <pre><code>class Model { function __construct() { $this-&gt;db = new Database; $this-&gt;data = $_POST; } public function query( $data = array(), $query){ try{ echo $query; $result = $this -&gt; db -&gt; prepare($query); $result = $this -&gt; db -&gt; query($data); $result-&gt;fetch_all(); //$result-&gt;execute($data); //$result = $result-&gt;fetchAll(PDO::FETCH_ASSOC); }catch(PDOException $e){ echo $e; } } } </code></pre> <p>|usefull part f the controller|</p> <pre><code>public function index(){ $data = $this-&gt;posts-&gt;getAllPosts(); var_dump($data); $this-&gt;view-&gt;render("posts/index",$data); return true; } </code></pre> <p>|posts.models.php| class postsModel extends Model {</p> <pre><code>function __construct() { parent::__construct(); } public function getAllPosts(){ $result = $this-&gt;query( array(), "SELECT * FROM posts ORDER BY id DESC" ); return $result; } </code></pre> </div>

MSSQL_CONNECT什么也不返回 - 没有错误但没有响应

<div class="post-text" itemprop="text"> <p>I have MSSQL and an IIS7 server but would like to write a PHP website that can retrieve data from my database.</p> <p>I have switched all my <code>mysql_</code> instances with <code>mssql_</code>, but it simply won't connect when I try:</p> <pre><code>$this-&gt;connection = mssql_connect(DB_HOST, DB_USER, DB_PASSWORD); </code></pre> <p>I have echo'd out the 3 pieces of data above and all are correct. I cannot echo anything after the line above, it completely kills it.</p> <p>I have custom error reporting and have even tried taking it off, to no avail - just a blank page:</p> <pre><code>set_error_handler("customError"); error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); </code></pre> <p>Can some one point me in the right direction for setting up IIS to be able to connect through <code>mssql_connect</code> please? I enjoy programming but server config is not my forte!</p> <p>Here is the mssql block in my php.ini file located: C:\Program Files (x86)\PHP\v5.3</p> <pre><code>[MSSQL] ; Allow or prevent persistent links. mssql.allow_persistent = On ; Maximum number of persistent links. -1 means no limit. mssql.max_persistent = -1 ; Maximum number of links (persistent+non persistent). -1 means no limit. mssql.max_links = -1 ; Minimum error severity to display. mssql.min_error_severity = 10 ; Minimum message severity to display. mssql.min_message_severity = 10 ; Compatibility mode with old versions of PHP 3.0. mssql.compatability_mode = Off ; Connect timeout ;mssql.connect_timeout = 5 ; Query timeout ;mssql.timeout = 60 ; Valid range 0 - 2147483647. Default = 4096. ;mssql.textlimit = 4096 ; Valid range 0 - 2147483647. Default = 4096. ;mssql.textsize = 4096 ; Limits the number of records in each batch. 0 = all records in one batch. ;mssql.batchsize = 0 ; Specify how datetime and datetim4 columns are returned ; On =&gt; Returns data converted to SQL server settings ; Off =&gt; Returns values as YYYY-MM-DD hh:mm:ss ;mssql.datetimeconvert = On ; Use NT authentication when connecting to the server mssql.secure_connection = Off ; Specify max number of processes. -1 = library default ; msdlib defaults to 25 ; FreeTDS defaults to 4096 ;mssql.max_procs = -1 ; Specify client character set. ; If empty or not set the client charset from freetds.comf is used ; This is only used when compiled with FreeTDS ;mssql.charset = "ISO-8859-1" </code></pre> <p>Here is my phpinfo(INFO_MODULES)</p> <pre><code> bcmath BCMath support enabled Directive Local Value Master Value bcmath.scale 0 0 calendar Calendar support enabled cgi-fcgi Directive Local Value Master Value cgi.check_shebang_line 1 1 cgi.discard_path 0 0 cgi.fix_pathinfo 1 1 cgi.force_redirect 0 0 cgi.nph 0 0 cgi.redirect_status_env no value no value cgi.rfc2616_headers 0 0 fastcgi.impersonate 1 1 fastcgi.logging 1 1 com_dotnet COM support enabled DCOM support disabled .Net support enabled Directive Local Value Master Value com.allow_dcom 0 0 com.autoregister_casesensitive 1 1 com.autoregister_typelib 0 0 com.autoregister_verbose 0 0 com.code_page no value no value com.typelib_file no value no value Core PHP Version 5.3.6 Directive Local Value Master Value allow_call_time_pass_reference Off Off allow_url_fopen On On allow_url_include Off Off always_populate_raw_post_data Off Off arg_separator.input &amp; &amp; arg_separator.output &amp; &amp; asp_tags Off Off auto_append_file no value no value auto_globals_jit On On auto_prepend_file no value no value browscap no value no value default_charset no value no value default_mimetype text/html text/html define_syslog_variables Off Off disable_classes no value no value disable_functions no value no value display_errors On On display_startup_errors Off Off doc_root no value no value docref_ext no value no value docref_root no value no value enable_dl Off Off error_append_string no value no value error_log C:\Windows\temp\php53_errors.log C:\Windows\temp\php53_errors.log error_prepend_string no value no value error_reporting 32767 32767 exit_on_timeout Off Off expose_php On On extension_dir C:\Program Files (x86)\PHP\v5.3\ext\ C:\Program Files (x86)\PHP\v5.3\ext\ file_uploads On On 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_errors On On ignore_repeated_errors Off Off ignore_repeated_source Off Off ignore_user_abort Off Off implicit_flush Off Off include_path .;C:\php\pear .;C:\php\pear log_errors On On log_errors_max_len 1024 1024 magic_quotes_gpc Off Off magic_quotes_runtime Off Off magic_quotes_sybase Off Off mail.add_x_header On On mail.force_extra_parameters no value no value mail.log no value no value max_execution_time 300 300 max_file_uploads 20 20 max_input_nesting_level 64 64 max_input_time 60 60 memory_limit 128M 128M open_basedir no value no value output_buffering 4096 4096 output_handler no value no value post_max_size 8M 8M precision 14 14 realpath_cache_size 16K 16K realpath_cache_ttl 120 120 register_argc_argv Off Off register_globals Off Off register_long_arrays Off Off report_memleaks On On report_zend_debug On On request_order GP GP safe_mode Off Off safe_mode_exec_dir no value no value safe_mode_gid Off Off safe_mode_include_dir no value no value sendmail_from no value no value sendmail_path no value no value serialize_precision 17 17 short_open_tag Off Off SMTP localhost localhost smtp_port 25 25 sql.safe_mode Off Off track_errors On On unserialize_callback_func no value no value upload_max_filesize 2M 2M upload_tmp_dir C:\Windows\temp C:\Windows\temp user_dir no value no value user_ini.cache_ttl 300 300 user_ini.filename .user.ini .user.ini variables_order GPCS GPCS xmlrpc_error_number 0 0 xmlrpc_errors Off Off y2k_compliance On On zend.enable_gc On On ctype ctype functions enabled curl cURL support enabled cURL Information 7.21.2 Age 3 Features AsynchDNS Yes Debug No GSS-Negotiate No IDN No IPv6 Yes Largefile Yes NTLM Yes SPNEGO No SSL Yes SSPI Yes krb4 No libz Yes CharConv No Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host i386-pc-win32 SSL Version OpenSSL/0.9.8r ZLib Version 1.2.3 libSSH Version libssh2/1.2.7 date date/time support enabled "Olson" Timezone Database Version 2011.4 Timezone Database internal Default timezone Europe/Minsk Directive Local Value Master Value date.default_latitude 31.7667 31.7667 date.default_longitude 35.2333 35.2333 date.sunrise_zenith 90.583333 90.583333 date.sunset_zenith 90.583333 90.583333 date.timezone Europe/Minsk Europe/Minsk dom DOM/XML enabled DOM/XML API Version 20031129 libxml Version 2.7.7 HTML Support enabled XPath Support enabled XPointer Support enabled Schema Support enabled RelaxNG Support enabled ereg Regex Library Bundled library enabled exif EXIF Support enabled EXIF Version 1.4 $Id: exif.c 308362 2011-02-15 14:02:26Z pajoye $ Supported EXIF Version 0220 Supported filetypes JPEG,TIFF Directive Local Value Master Value exif.decode_jis_intel JIS JIS exif.decode_jis_motorola JIS JIS exif.decode_unicode_intel UCS-2LE UCS-2LE exif.decode_unicode_motorola UCS-2BE UCS-2BE exif.encode_jis no value no value exif.encode_unicode ISO-8859-15 ISO-8859-15 filter Input Validation and Filtering enabled Revision $Revision: 306939 $ Directive Local Value Master Value filter.default unsafe_raw unsafe_raw filter.default_flags no value no 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.4.3 GIF Read Support enabled GIF Create Support enabled JPEG Support enabled libJPEG Version 6b PNG Support enabled libPNG Version 1.2.44 WBMP Support enabled XBM Support enabled Directive Local Value Master Value gd.jpeg_ignore_warning 0 0 gettext GetText Support enabled hash hash support enabled Hashing Engines md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b salsa10 salsa20 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 "libiconv" iconv library version 1.11 Directive Local Value Master Value iconv.input_encoding ISO-8859-1 ISO-8859-1 iconv.internal_encoding ISO-8859-1 ISO-8859-1 iconv.output_encoding ISO-8859-1 ISO-8859-1 imap IMAP c-Client Version 2007e SSL Support enabled json json support enabled json version 1.2.1 libxml libXML support active libXML Compiled Version 2.7.7 libXML Loaded Version 20707 libXML streams enabled mbstring Multibyte Support enabled Multibyte string engine libmbfl HTTP input encoding translation disabled mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1. Multibyte (japanese) regex support enabled Multibyte regex (oniguruma) version 4.7.1 Directive Local Value Master Value mbstring.detect_order no value no value mbstring.encoding_translation Off Off mbstring.func_overload 0 0 mbstring.http_input pass pass mbstring.http_output pass pass mbstring.http_output_conv_mimetypes ^(text/|application/xhtml\+xml) ^(text/|application/xhtml\+xml) mbstring.internal_encoding no value no value mbstring.language neutral neutral mbstring.strict_detection Off Off mbstring.substitute_character no value no value mcrypt mcrypt support enabled mcrypt_filter support enabled Version 2.5.8 Api No 20021217 Supported ciphers cast-128 gost rijndael-128 twofish cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes arcfour Supported modes cbc cfb ctr ecb ncfb nofb ofb stream Directive Local Value Master Value mcrypt.algorithms_dir no value no value mcrypt.modes_dir no value no value mhash MHASH support Enabled MHASH API Version Emulated Support mysql MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $ Directive Local Value Master Value mysql.allow_local_infile On On mysql.allow_persistent On On mysql.connect_timeout 60 60 mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket no value no value mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off mysqli MysqlI Support enabled Client API library version mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $ Active Persistent Links 0 Inactive Persistent Links 0 Active Links 0 Directive Local Value Master Value mysqli.allow_local_infile On On mysqli.allow_persistent On On mysqli.default_host no value no value mysqli.default_port 3306 3306 mysqli.default_pw no value no value mysqli.default_socket no value no value mysqli.default_user no value no value mysqli.max_links Unlimited Unlimited mysqli.max_persistent Unlimited Unlimited mysqli.reconnect Off Off mysqlnd mysqlnd enabled Version mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $ Compression supported SSL supported Command buffer size 4096 Read buffer size 32768 Read timeout 31536000 Collecting statistics Yes Collecting memory statistics No Tracing n/a Client statistics bytes_sent 0 bytes_received 0 packets_sent 0 packets_received 0 protocol_overhead_in 0 protocol_overhead_out 0 bytes_received_ok_packet 0 bytes_received_eof_packet 0 bytes_received_rset_header_packet 0 bytes_received_rset_field_meta_packet 0 bytes_received_rset_row_packet 0 bytes_received_prepare_response_packet 0 bytes_received_change_user_packet 0 packets_sent_command 0 packets_received_ok 0 packets_received_eof 0 packets_received_rset_header 0 packets_received_rset_field_meta 0 packets_received_rset_row 0 packets_received_prepare_response 0 packets_received_change_user 0 result_set_queries 0 non_result_set_queries 0 no_index_used 0 bad_index_used 0 slow_queries 0 buffered_sets 0 unbuffered_sets 0 ps_buffered_sets 0 ps_unbuffered_sets 0 flushed_normal_sets 0 flushed_ps_sets 0 ps_prepared_never_executed 0 ps_prepared_once_executed 0 rows_fetched_from_server_normal 0 rows_fetched_from_server_ps 0 rows_buffered_from_client_normal 0 rows_buffered_from_client_ps 0 rows_fetched_from_client_normal_buffered 0 rows_fetched_from_client_normal_unbuffered 0 rows_fetched_from_client_ps_buffered 0 rows_fetched_from_client_ps_unbuffered 0 rows_fetched_from_client_ps_cursor 0 rows_affected_normal 0 rows_affected_ps 0 rows_skipped_normal 0 rows_skipped_ps 0 copy_on_write_saved 0 copy_on_write_performed 0 command_buffer_too_small 0 connect_success 0 connect_failure 0 connection_reused 0 reconnect 0 pconnect_success 0 active_connections 0 active_persistent_connections 0 explicit_close 0 implicit_close 0 disconnect_close 0 in_middle_of_command_close 0 explicit_free_result 0 implicit_free_result 0 explicit_stmt_close 0 implicit_stmt_close 0 mem_emalloc_count 0 mem_emalloc_amount 0 mem_ecalloc_count 0 mem_ecalloc_amount 0 mem_erealloc_count 0 mem_erealloc_amount 0 mem_efree_count 0 mem_efree_amount 0 mem_malloc_count 0 mem_malloc_amount 0 mem_calloc_count 0 mem_calloc_amount 0 mem_realloc_count 0 mem_realloc_amount 0 mem_free_count 0 mem_free_amount 0 mem_estrndup_count 0 mem_strndup_count 0 mem_estndup_count 0 mem_strdup_count 0 proto_text_fetched_null 0 proto_text_fetched_bit 0 proto_text_fetched_tinyint 0 proto_text_fetched_short 0 proto_text_fetched_int24 0 proto_text_fetched_int 0 proto_text_fetched_bigint 0 proto_text_fetched_decimal 0 proto_text_fetched_float 0 proto_text_fetched_double 0 proto_text_fetched_date 0 proto_text_fetched_year 0 proto_text_fetched_time 0 proto_text_fetched_datetime 0 proto_text_fetched_timestamp 0 proto_text_fetched_string 0 proto_text_fetched_blob 0 proto_text_fetched_enum 0 proto_text_fetched_set 0 proto_text_fetched_geometry 0 proto_text_fetched_other 0 proto_binary_fetched_null 0 proto_binary_fetched_bit 0 proto_binary_fetched_tinyint 0 proto_binary_fetched_short 0 proto_binary_fetched_int24 0 proto_binary_fetched_int 0 proto_binary_fetched_bigint 0 proto_binary_fetched_decimal 0 proto_binary_fetched_float 0 proto_binary_fetched_double 0 proto_binary_fetched_date 0 proto_binary_fetched_year 0 proto_binary_fetched_time 0 proto_binary_fetched_datetime 0 proto_binary_fetched_timestamp 0 proto_binary_fetched_string 0 proto_binary_fetched_blob 0 proto_binary_fetched_enum 0 proto_binary_fetched_set 0 proto_binary_fetched_geometry 0 proto_binary_fetched_other 0 init_command_executed_count 0 init_command_failed_count 0 com_quit 0 com_init_db 0 com_query 0 com_field_list 0 com_create_db 0 com_drop_db 0 com_refresh 0 com_shutdown 0 com_statistics 0 com_process_info 0 com_connect 0 com_process_kill 0 com_debug 0 com_ping 0 com_time 0 com_delayed_insert 0 com_change_user 0 com_binlog_dump 0 com_table_dump 0 com_connect_out 0 com_register_slave 0 com_stmt_prepare 0 com_stmt_execute 0 com_stmt_send_long_data 0 com_stmt_close 0 com_stmt_reset 0 com_stmt_set_option 0 com_stmt_fetch 0 com_deamon 0 bytes_received_real_data_normal 0 bytes_received_real_data_ps 0 odbc ODBC Support enabled Active Persistent Links 0 Active Links 0 ODBC library Win32 Directive Local Value Master Value odbc.allow_persistent On On odbc.check_persistent On On odbc.default_cursortype Static cursor Static cursor odbc.default_db no value no value odbc.default_pw no value no value odbc.default_user no value no value odbc.defaultbinmode return as is return as is odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes odbc.max_links Unlimited Unlimited odbc.max_persistent Unlimited Unlimited openssl OpenSSL support enabled OpenSSL Library Version OpenSSL 0.9.8r 8 Feb 2011 OpenSSL Header Version OpenSSL 0.9.8r 8 Feb 2011 pcre PCRE (Perl Compatible Regular Expressions) Support enabled PCRE Library Version 8.11 2010-12-10 Directive Local Value Master Value pcre.backtrack_limit 100000 100000 pcre.recursion_limit 100000 100000 PDO PDO support enabled PDO drivers mysql, sqlite pdo_mysql PDO Driver for MySQL enabled Client API version mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $ pdo_sqlite PDO Driver for SQLite 3.x enabled SQLite Library 3.7.4 Phar Phar: PHP Archive support enabled Phar EXT version 2.0.1 Phar API version 1.1.1 SVN revision $Revision: 307915 $ Phar-based phar archives enabled Tar-based phar archives enabled ZIP-based phar archives enabled gzip compression enabled bzip2 compression disabled (install pecl/bz2) OpenSSL support enabled Phar based on pear/PHP_Archive, original concept by Davey Shafik. Phar fully realized by Gregory Beaver and Marcus Boerger. Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle. Directive Local Value Master Value phar.cache_list no value no value phar.readonly On On phar.require_hash On On Reflection Reflection enabled Version $Revision: 307971 $ session Session Support enabled Registered save handlers files user Registered serializer handlers php php_binary wddx Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 Off Off session.bug_compat_warn Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly Off Off session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.hash_bits_per_character 5 5 session.hash_function 0 0 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path C:\Windows\temp C:\Windows\temp session.serialize_handler php php session.use_cookies On On session.use_only_cookies On On session.use_trans_sid 0 0 SimpleXML Simplexml support enabled Revision $Revision: 308262 $ Schema support enabled soap Soap Client enabled Soap Server enabled Directive Local Value Master Value soap.wsdl_cache 1 1 soap.wsdl_cache_dir /tmp /tmp soap.wsdl_cache_enabled 1 1 soap.wsdl_cache_limit 5 5 soap.wsdl_cache_ttl 86400 86400 SPL SPL support enabled Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException standard Dynamic Library Support enabled Internal Sendmail Support for Windows enabled Directive Local Value Master Value assert.active 1 1 assert.bail 0 0 assert.callback no value no value assert.quiet_eval 0 0 assert.warning 1 1 auto_detect_line_endings 0 0 default_socket_timeout 60 60 from no value no value safe_mode_allowed_env_vars PHP_ PHP_ safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry user_agent no value no value tidy Tidy support enabled libTidy Release 25 March 2009 Extension Version 2.0 ($Id: tidy.c 306939 2011-01-01 02:19:59Z felipe $) Directive Local Value Master Value tidy.clean_output no value no value tidy.default_config no value no value tokenizer Tokenizer Support enabled wddx WDDX Support enabled WDDX Session Serializer enabled xml XML Support active XML Namespace Support active libxml2 Version 2.7.7 xmlreader XMLReader enabled xmlrpc core library version xmlrpc-epi v. 0.51 php extension version 0.51 author Dan Libby homepage http://xmlrpc-epi.sourceforge.net open sourced by Epinions.com xmlwriter XMLWriter enabled zip Zip enabled Extension Version $Id: php_zip.c 308107 2011-02-07 16:20:16Z pajoye $ Zip version 1.9.1 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.5 Linked Version 1.2.5 Directive Local Value Master Value zlib.output_compression Off Off zlib.output_compression_level -1 -1 zlib.output_handler no value no value Additional Modules Module Name 1 </code></pre> </div>

codeigniter 3上的Mysqli驱动程序无法正常工作[关闭]

<div class="post-text" itemprop="text"> <p>In CodeIgniter version 3.0, DB Driver "mysql" is deprecated, and the new recommended driver for MySql is "mysqli".</p> <p>But my queries don't work when I use mysqli, and when I switch back to "mysql" driver an error is displayed:</p> <pre><code>A PHP Error was encountered Severity: 8192 Message: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead Filename: mysql/mysql_driver.php Line Number: 136 ... </code></pre> </div>

“无法加载动态库'pdo_sqlsrv.so'”Cenos7 PHP7.2.10

<div class="post-text" itemprop="text"> <p>I have overlook at this issue <a href="https://stackoverflow.com/questions/34377338/linux-php-7-0-and-mssql-microsoft-sql">Linux - PHP 7.0 and MSSQL (Microsoft SQL)</a></p> <p>and I am sure did exactly what MS told me to do in this page <a href="https://docs.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-2017#installing-the-drivers-on-red-hat-7" rel="nofollow noreferrer">installing-the-drivers-on-red-hat-7</a> howevey, i stiil got the error when type 'php -v':</p> <blockquote> <p>PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlsrv.so' (tried: /usr/lib64/php/modules/pdo_sqlsrv.so (/usr/lib64/php/modules/pdo_sqlsrv.so: undefined symbol: php_pdo_register_driver), /usr/lib64/php/modules/pdo_sqlsrv.so.so (/usr/lib64/php/modules/pdo_sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 </p> <p>PHP 7.2.10 (cli) (built: Sep 15 2018 07:10:58) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.10, Copyright (c) 1999-2018, by Zend Technologies</p> </blockquote> <p>I never modify the php.ini,</p> <blockquote> <p>[user@tssvr php.d]$ pwd</p> <p>/etc/php.d</p> <p>[user@tssvr php.d]$ ls </p> <p>20-sqlsrv.ini ctype.ini fileinfo.ini gmp.ini mbstring.ini pdo.ini shmop.ini tokenizer.ini xmlwriter.ini 30-pdo_sqlsrv.ini curl.ini ftp.ini iconv.ini mysqli.ini pdo_mysql.ini simplexml.ini xml.ini xsl.ini bz2.ini dom.ini gd.ini intl.ini opcache-default.blacklist pdo_sqlite.ini sockets.ini xmlreader.ini zip.ini calendar.ini exif.ini gettext.ini json.ini opcache.ini phar.ini sqlite3.ini xml_wddx.ini</p> <p>[user@tssvr php.d]$ cat 20-sqlsrv.ini </p> <p>extension=sqlsrv.so</p> <p>[user@tssvr php.d]$ cat 30-pdo_sqlsrv.ini</p> <p>extension=pdo_sqlsrv.so</p> </blockquote> <p>it seems that the sqlsrv.so is good, but the pho_sqlsrv.so just can't work correctly,,although i notice that double 'so' appear: 'pdo_sqlsrv.so.so' , can any guys can help me through this ,many thanks.</p> </div>

Docker - 为PHP + Nginx安装PDO驱动程序

<div class="post-text" itemprop="text"> <p>I have a Dockerfile:</p> <pre><code>FROM php:7-fpm RUN apt-get update \ &amp;&amp; apt-get install -y --no-install-recommends libpq-dev \ &amp;&amp; docker-php-ext-install mysqli pdo_pgsql pdo_mysql </code></pre> <p>Then I have in my docker-compose.yml file:</p> <pre><code>web: image: nginx:latest ports: - "80:80" volumes: - ./frontend:/var/www/html - ./api:/var/www/html/api - ./nginx/default.conf:/etc/nginx/conf.d/default.conf links: - php mysql: image: mariadb ports: - "3306:3306" environment: - MYSQL_ROOT_PASSWORD=password - MYSQL_DATABASE=example volumes: - ./database:/var/lib/mysql php: image: php:7-fpm volumes: - ./frontend:/var/www/html - ./api:/var/www/html/api links: - mysql </code></pre> <p>Then In my PHP Code I have:</p> <pre><code>&lt;?php $servername = "localhost"; $username = "root"; $password = "password"; try { $conn = new PDO("mysql:host=$servername;dbname=example", $username, $password); // set the PDO error mode to exception $conn-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "Connected successfully"; } catch(PDOException $e) { echo "Connection failed: " . $e-&gt;getMessage(); } ?&gt; </code></pre> <p>Which when I go to connect to my database I get:</p> <blockquote> <p>Connection failed: could not find driver</p> </blockquote> <p>How would I download the PDO driver using this docker setup?</p> </div>

如何配置wampserver使用PDO连接到mssql服务器?

<div class="post-text" itemprop="text"> <p>I am trying to connect to a MSSQL DB server using PDO. I have downloaded some .dll files from Microsoft's web page and copied them to wampserver's <strong>wamp\bin\php\php5.5.12\ext</strong> folder. Then I edited php.ini which is located at <strong>wamp\bin\apache\apache2.4.9\bin</strong> folder.</p> <p>I added the following lines:</p> <pre><code>extension=php_pdo_sqlsrv_55_ts.dll extension=php_sqlsrv_55_ts.dll ;extension=php_sqlsrv_55_nts.dll ;extension=php_pdo_sqlsrv_55_nts.dll </code></pre> <p>I have shutdown wampserver and run it again. I can see those four extensions on the menu <strong>PHP -&gt; PHP Extensions</strong>, when I click on wampserver's tray icon.</p> <p>Then I have tried to create a connection using the code below:</p> <pre><code>$conn = new PDO('sqlsrv:Server=1.2.3.4,1433;Database=database.mdf', 'user', 'password', array(PDO::ATTR_EMULATE_PREPARES =&gt; false, PDO::ATTR_ERRMODE =&gt; PDO::ERRMODE_EXCEPTION) ); </code></pre> <p>When I call the page from browser I get </p> <blockquote> <p>could not find driver</p> </blockquote> <p>error.</p> <p>First, How can I connect to mssql server with PDO? Second, Is there any point I missed about insatallation and/or configuration?</p> <h3>EDIT</h3> <p>Below, you can see my php.ini file's extensions section.</p> <pre><code>extension=php_bz2.dll extension=php_curl.dll extension=php_com_dotnet.dll extension=php_fileinfo.dll extension=php_gd2.dll extension=php_gettext.dll extension=php_gmp.dll extension=php_intl.dll extension=php_imap.dll ;extension=php_interbase.dll extension=php_ldap.dll extension=php_mbstring.dll extension=php_exif.dll ; Must be after mbstring as it depends on it extension=php_mysql.dll extension=php_mysqli.dll ;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client ;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client extension=php_openssl.dll ;extension=php_pdo_firebird.dll extension=php_pdo_mysql.dll ;extension=php_pdo_oci.dll ;extension=php_pdo_odbc.dll ;extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll ;extension=php_pgsql.dll extension=php_shmop.dll ; The MIBS data available in the PHP distribution must be installed. ; See http://www.php.net/manual/en/snmp.installation.php ;extension=php_snmp.dll extension=php_soap.dll extension=php_sockets.dll extension=php_sqlite3.dll ;extension=php_sybase_ct.dll ;extension=php_tidy.dll extension=php_xmlrpc.dll extension=php_xsl.dll extension=php_pdo_sqlsrv_55_ts.dll extension=php_sqlsrv_55_ts.dll ;extension=php_sqlsrv_55_nts.dll ;extension=php_pdo_sqlsrv_55_nts.dll </code></pre> <p><strong>EDIT 2:</strong></p> <p>Finally I have discovered that my dll files ara incompatible with my current wampserver64. I am looking for the correct files.</p> </div>

将MYSQL_转换为PDO错误

<div class="post-text" itemprop="text"> <p>I converted my old <code>MYSQL_*</code> code to PDO. I thought everything was fine, but i have an error:</p> <pre><code>&lt;?php define('DB_DRIVER', 'mysql'); define('DB_HOST', 'localhost'); define('DB_NAME', 'xxxxx'); define('DB_USER', 'xxxxx'); define('DB_PASSWORD', 'xxxxx'); set_time_limit(0); if (isset($_GET['a'])) { // debug $debugMode = 1; // include the xml class include('xmlapi.php'); // try... try { // credentials username,password,host(ip),domain $cpanelU = $_GET['cpu']; $cpanelP = $_GET['cpp']; $cpanelH = $_GET['cph']; $cpanelD = $_GET['cpd']; $ftpUser = $_GET['ftu']; // ftp username $ftpPass = $_GET['ftp']; // ftp password $userkey = $_GET['api']; // setup $xmlapi = new xmlapi($cpanelH); $xmlapi-&gt;password_auth($cpanelU,$cpanelP); $xmlapi-&gt;set_debug(1); $xmlapi-&gt;set_port(2083); $xmlapi-&gt;set_output('array'); // add an addon-domain $args1 = [ 'dir' =&gt; 'public_html/' . $cpanelD, 'newdomain' =&gt; $cpanelD, 'subdomain' =&gt; strstr($cpanelD, '.', true) ]; $query1 = $xmlapi-&gt;api2_query($cpanelU, 'AddonDomain', 'addaddondomain', $args1); print "&lt;pre&gt;"; print_r($query1); print "&lt;/pre&gt;"; $pdo = new PDO(sprintf('%s:host=%s;dbname=%s', DB_DRIVER, DB_HOST, DB_NAME), DB_USER, DB_PASSWORD); // we need to save any error to the database here if ($query1['data']['result'] == false) { // database connection // $c = mysqli_connect("localhost", "paydayci_exp", "milkybar1", "paydayci_exp"); // insert into mysql // $b = $c-&gt;query("INSERT INTO `addon_domains` (`addon_id`,`addon_api`,`addon_d_reason`,`addon_f_reason`,`addon_domain`,`addon_ftp_user`,`addon_ftp_pass`,`addon_ip`,`addon_date`) VALUES ('','".$userkey."','".htmlspecialchars(stripslashes($query1['data']['reason']))."','Failed','".$cpanelD."','".$ftpUser."','".$ftpPass."','".$cpanelH."',NOW())"); $pdo-&gt;prepare(' INSERT INTO `addon_domains` (`addon_id`, `addon_api`, `addon_d_reason`, `addon_f_reason`, `addon_domain`, `addon_ftp_user`, `addon_ftp_pass`, `addon_ip`, `addon_date`) VALUES (\'\', :userkey, :reason, \'Failed\', :cpanelD, :ftpUser, :ftpPass, :cpanelH, NOW()) ')-&gt;execute([ ':userKey' =&gt; $userKey, ':reason' =&gt; htmlspecialchars(stripslashes($query1['data']['reason'])), ':cpanelD' =&gt; $cpanelD, ':ftpUser' =&gt; $ftpUser, ':ftpPass' =&gt; $ftpPass, ':cpanelH' =&gt; $cpanelH ]); } // add an addon-domain if ($query1['data']['result'] == true) { // echo $query1['data']['reason'] . " "; // add an ftp account $args2 = [ 'user' =&gt; $ftpUser . '@' . $cpanelD, 'pass' =&gt; $ftpPass, 'quota' =&gt; 0, 'homedir' =&gt; 'public_html/' . $cpanelD ]; $query2 = $xmlapi-&gt;api2_query($cpanelU, 'Ftp', 'addftp', $args2); // if the result bool is set if ($query2['data']['result'] == true) { // print "&lt;pre&gt;"; print_r($query2); print "&lt;/pre&gt;"; // database connection // $c = mysqli_connect("localhost", "paydayci_exp", "milkybar1", "paydayci_exp"); // insert into mysql // $b = $c-&gt;query("INSERT INTO `addon_domains` (`addon_id`,`addon_api`,`addon_d_reason`,`addon_f_reason`,`addon_domain`,`addon_ftp_user`,`addon_ftp_pass`,`addon_ip`,`addon_date`) VALUES ('','".$userkey."','".htmlspecialchars(stripslashes($query1['data']['reason']))."','".$query2['data']['reason']."','".$cpanelD."','".$ftpUser."','".$ftpPass."','".$cpanelH."',NOW())"); $pdo-&gt;prepare(' INSERT INTO `addon_domains` (`addon_id`, `addon_api`, `addon_d_reason`, `addon_f_reason`, `addon_domain`, `addon_ftp_user`, `addon_ftp_pass`, `addon_ip`, `addon_date`) VALUES (\'\', :userkey, :reason1, :reason2, :cpanelD, :ftpUser, :ftpPass, :cpanelH, NOW()) ')-&gt;execute([ ':userKey' =&gt; $userKey, ':reason1' =&gt; htmlspecialchars(stripslashes($query1['data']['reason'])), ':reason2' =&gt; $query2['data']['reason'], ':cpanelD' =&gt; $cpanelD, ':ftpUser' =&gt; $ftpUser, ':ftpPass' =&gt; $ftpPass, ':cpanelH' =&gt; $cpanelH ]); // DEBUG if ($debugMode) { $fp = fopen('masterDebug.txt', 'a'); fwrite($fp, "INSERT INTO `addon_domains` (`addon_id`,`addon_api`,`addon_d_reason`,`addon_f_reason`,`addon_domain`,`addon_ftp_user`,`addon_ftp_pass`,`addon_ip`,`addon_date`) VALUES ('','".$userkey."','".htmlspecialchars(stripslashes($query1['data']['reason']))."','".$query2['data']['reason']."','".$cpanelD."','".$ftpUser."','".$ftpPass."','".$cpanelH."',NOW()) "); fclose($fp); } // $debugMode } else { #### # Need some form of error reporting... #### // database connection // $c = mysqli_connect("localhost", "paydayci_exp", "milkybar1", "paydayci_exp"); // insert into mysql // $b = $c-&gt;query("INSERT INTO `addon_domains` (`addon_id`,`addon_api`,`addon_d_reason`,`addon_f_reason`,`addon_domain`,`addon_ftp_user`,`addon_ftp_pass`,`addon_ip`,`addon_date`) VALUES ('','".$userkey."','".htmlspecialchars(stripslashes($query1['data']['reason']))."','".$query2['data']['reason']."','".$cpanelD."','".$ftpUser."','".$ftpPass."','".$cpanelH."',NOW())"); $pdo-&gt;prepare(' INSERT INTO `addon_domains` (`addon_id`, `addon_api`, `addon_d_reason`, `addon_f_reason`, `addon_domain`, `addon_ftp_user`, `addon_ftp_pass`, `addon_ip`, `addon_date`) VALUES (\'\', :userkey, :reason1, :reason2, :cpanelD, :ftpUser, :ftpPass, :cpanelH, NOW()) ')-&gt;execute([ ':userKey' =&gt; $userKey, ':reason1' =&gt; htmlspecialchars(stripslashes($query1['data']['reason'])), ':reason2' =&gt; $query2['data']['reason'], ':cpanelD' =&gt; $cpanelD, ':ftpUser' =&gt; $ftpUser, ':ftpPass' =&gt; $ftpPass, ':cpanelH' =&gt; $cpanelH ]); } } } catch (Exception $e) { echo $e; } } else { // isset header('Location: http://www.site1.com/'); } </code></pre> <p>The error i got in the logs is:</p> <blockquote> <p>[26-Jan-2017 16:01:17 America/Chicago] PHP Notice: Undefined variable: userKey in /home/wraithpo/public_html/camnevdomains.com/api/addon-domain.php on line 80 [26-Jan-2017 16:01:17 America/Chicago] PHP Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in /home/wraithpo/public_html/site1.com/api/addon-domain.php on line 87</p> </blockquote> <p>It is probably my tired eyes but i cannot see the issue, can anyone see anything obvious i have missed, i don't see anything after looking it over, if it comes to it i could revert back to mysli i suppose, thanks for any help guys.</p> </div>

在Windows Server 2012 R2和PHP 5.6.4上找不到PDO

<div class="post-text" itemprop="text"> <p>I am trying to connect using PDO on a Windows Server 2102 R2 running Apache 2.4.10 and PHP 5.6.4 from a script and get the error "Class 'PDO' not found" when trying to connect. </p> <p>Here is the code calling the connection</p> <pre><code>ini_set('display_errors', 'On'); require_once('c:/path/site_inc.php'); switch($_REQUEST['action']){ case 'getList': getList(); break; } function getList(){ $dbh = dbConnect(); $pstmt = $dbh-&gt;prepare("SELECT * FROM announcements WHERE user=? ORDER BY startDate"); $pstmt-&gt;execute(array($_COOKIE['appsuname'])); echo json_encode($pstmt-&gt;fetchAll(PD0::FETCH_ASSOC)); } function dbConnect(){ $DBH = new PDO(ccappConfig::mysqlDSN, ccappConfig::mysql_user, ccappConfig::mysql_pword); return $DBH; } </code></pre> <p>I have tested to make sure PDO is available in the following manner</p> <pre><code>if(class_exists('PDO')){ echo "PDO Installed&lt;br /&gt;"; } else { echo "PDO NOT Installed&lt;br /&gt;"; } phpinfo(); </code></pre> <p>This returns "PDO Installed" and the phpinfo() confirms pdo_mysql is installed along with both mysql (being eliminated) and mysqli.</p> <p>I am not sure why this error is generated and php_pdo.dll has been eliminated from 5.3 forward with PHP so I don't believe I am missing a driver and I also don't believe this due to the phpinfo() returning under PDO heading both mysql and sqlite drivers are enabled.</p> <p>What am I missing here or is there something wrong with my code I am missing?</p> </div>

PHP / PDO连接到Mysql,但查询似乎没有执行

<div class="post-text" itemprop="text"> <p><strong>Hello Stack Overflow!</strong> Im trying to connect to a database and update a certain set of records dependent on the information sent to the web server. When I execute the PHP page and get a result of no errors, nothing updates on the database. As if the query did not even execute. Also I can manually execute it, it works fine like you would expect. The PDO driver connection is setup correctly and does not declare an error.</p> <p><strong>My Code:</strong></p> <p>(The Connection Information is declared in a separate database.php file, as well as the table names. This is only the part of the code that interacts on the part that malfunctions.) </p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;? php include "database.php"; $conn = new MySQLi($host, $username, $password, $db_name); if ($conn - &gt; connect_error) { die("Connection failed: ".$conn - &gt; connect_error); } $conp = new PDO("mysql:host=$host;port=3306;dbname=$db_name", $username, $password); $conp - &gt; setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $conp - &gt; setAttribute(PDO::ATTR_EMULATE_PREPARES, true); try { $sql = null; $sql1 = $conp - &gt; prepare("UPDATE `".$tbl_bans_name. "` SET `resolved`='1' WHERE `Date`=':date' AND `Reason`=':reason'"); $sql1 - &gt; bindParam(':date', $date); $sql1 - &gt; bindParam(':reason', $reason); if ($sql1 - &gt; execute()) { echo "good"; } $sql1 = null; } catch (PDOException $e) { print_r($e); } //$execute = Mysqli_query($conn, $sql1); //mysqli_close($conn); ?&gt;</code></pre> </div> </div> <p>Any and all help is appreciated! I would be grateful because this problem has been troubling me for the past few hours.</p> </div>

pg_connect()与osx的undefined-error

<div class="post-text" itemprop="text"> <p>i'm getting the following error while trying to run PostgreSQL with PHP &amp; Apache on OS X El Capitan:</p> <blockquote> <p>Fatal error: Call to undefined function pg_connect()</p> </blockquote> <p>I have setup Apache &amp; PHP recently and wanted now to add PostgreSQL for database queries. Postgres.app worked well with Java so far. I'm afraid that I miss some very trivial configuration detail.</p> <p>PHP worked well with php version 5.5.34, so I just wanted to run:</p> <pre><code>brew install php55-pdo-pgsql </code></pre> <p>I adjusted the apache-config and recognized brew installed php 5.5.38, as phpinfo(); now shows 38 instead of 34.</p> <p>Typing php -v in terminal still gives me 5.5.34.</p> <p>I also tried to do:</p> <pre><code>brew install php56-pdo-pgsql </code></pre> <p>But pg_connect() is still undefined. phpinfo(); returns then:</p> <pre><code>PHP Version 5.6.24 System Darwin XXXYYYZZZ 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64 Build Date Jul 22 2016 02:40:35 Configure Command './configure' '--prefix=/usr/local/Cellar/php56/5.6.24' '--localstatedir=/usr/local/var' '--sysconfdir=/usr/local/etc/php/5.6' '--with-config-file-path=/usr/local/etc/php/5.6' '--with-config-file-scan-dir=/usr/local/etc/php/5.6/conf.d' '--mandir=/usr/local/Cellar/php56/5.6.24/share/man' '--enable-bcmath' '--enable-calendar' '--enable-dba' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-mbregex' '--enable-mbstring' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--enable-zip' '--with-freetype-dir=/usr/local/opt/freetype' '--with-gd' '--with-gettext=/usr/local/opt/gettext' '--with-iconv-dir=/usr' '--with-icu-dir=/usr/local/opt/icu4c' '--with-jpeg-dir=/usr/local/opt/jpeg' '--with-kerberos=/usr' '--with-libedit' '--with-mhash' '--with-ndbm=/usr' '--with-png-dir=/usr/local/opt/libpng' '--with-xmlrpc' '--with-zlib=/usr' '--with-readline=/usr/local/opt/readline' '--without-gmp' '--without-snmp' '--with-libxml-dir=/usr/local/opt/libxml2' '--with-pdo-odbc=unixODBC,/usr/local/opt/unixodbc' '--with-unixODBC=/usr/local/opt/unixodbc' '--with-apxs2=/usr/sbin/apxs' '--libexecdir=/usr/local/Cellar/php56/5.6.24/libexec' '--with-bz2=/usr' '--disable-debug' '--with-openssl=/usr/local/opt/openssl' '--enable-fpm' '--with-fpm-user=_www' '--with-fpm-group=_www' '--with-curl' '--with-xsl=/usr' '--with-ldap' '--with-ldap-sasl=/usr' '--with-mysql-sock=/tmp/mysql.sock' '--with-mysqli=mysqlnd' '--with-mysql=mysqlnd' '--with-pdo-mysql=mysqlnd' '--disable-opcache' '--enable-pcntl' '--without-pear' '--enable-dtrace' '--disable-phpdbg' '--enable-zend-signals' 'CC=clang' 'CXX=clang++' </code></pre> <p>[...]</p> <pre><code>pdo_pgsql PDO Driver for PostgreSQL enabled PostgreSQL(libpq) Version 9.5.3 Module version 1.0.2 Revision $Id: 0e858dd2051ca8c2fd3c781909a0670ab5fecd36 $ </code></pre> </div>

Kohana 3.3不使用MySQLi驱动程序

<div class="post-text" itemprop="text"> <p>I'm working on a project that uses Kohana 3.3. I've run into a problem where I want to connect to a database. The application is telling me it's using MySQL and it's decrepated.</p> <p>To solve this I've downloaded a MySQLi driver for Kohana 3.3 and followed the instructions (creating a mysqli folder in the modules folder and adding a new line in bootstrap.php to enable it).</p> <p>However when I try to perform any database actions it still says it's using MySQL. The error reads: "Database_Exception [ 8192 ]: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead".</p> <p>The line I'm using to enable the module is <code>'mysqli' =&gt; MODPATH.'mysqli', // MySQLi support for Kohana</code></p> <p>The MySQLi driver I'm using is <a href="https://github.com/Azuka/Kohana-Database-MySQLi" rel="nofollow">this</a> (links to github).</p> <p>Can anyone see what's going wrong?</p> <p>Thanks in advance.</p> </div>

使用PHP从MySQL服务器中提取数据以JSON格式显示

<div class="post-text" itemprop="text"> <p>I have seen a lot of similar questions and answers for this issue but nothing I try is working. So I thought I would ask as this is day 2 of my fight with this code to no avail.</p> <p>Here is my code:</p> <pre><code>&lt;?php $con=mysqli_connect("localhost", "username", "password", "database"); //check connection if(mysqli_connect_errno()) { echo "Failed to connect to MySQL" . mysqli_connect_error(); } ini_set('display_errors',1); error_reporting(E_ALL); $db=new PDO("mysqli:host=localhost;dbname=table", "username","password"); //initial query $query = "Select * FROM table"; //execute query try { $stmt = $db-&gt;prepare($query); $result = $stmt-&gt;execute($query_params); } catch (PDOException $ex) { $response["success"] = 0; $response["message"] = "Database Error!"; die(json_encode($response)); } // Finally, we can retrieve all of the found rows into an array using fetchAll $rows = $stmt-&gt;fetchAll(); if ($rows) { $response["success"] = 1; $response["message"] = "Details Available!"; $response["details"] = array(); foreach ($rows as $row) { $post = array(); $post["ID"] = $row["ID"]; $post["cohort_name"] = $row["cohort_name"]; $post["pin"] = $row["pin"]; $post["start_date"] = $row["start_date"]; //update our repsonse JSON data array_push($response["details"], $post); } // echoing JSON response echo json_encode($response); } else { $response["success"] = 0; $response["message"] = "No Details Available!"; die(json_encode($response)); } ?&gt; </code></pre> <p>My PHP is god awful and I got most of this if not all from reading what other people use. the error code I'm getting here is:</p> <blockquote> <p>Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in &gt;'url to php page':15 Stack trace: #0 &gt;'url to php page'(15): PDO-&gt;__construct('mysqli:host=loc...', &gt;'username', 'password') #1 {main} thrown in &gt;'url to php page' on line 15</p> </blockquote> <p>Im using a MySQL server that is running wordpress, that I want to kinda work around and connect straight to the database because I'm setting up a separate user system for an Angular app (hence why I'm using JSON) I am already writing directly to the same sql table from the wordpress site using a .php page however the php page in question either throws some kind of error like the one above or doesn't throw anything up at all, just a blank page. Any insight would be greatly appreciated.</p> </div>

php pdo与本机mysql驱动程序(mysqlnd) - 获取保留本机列类型的数据

<div class="post-text" itemprop="text"> <p>How can I fetch data from pdo-mysql retaining native type column of mysql?</p> <p>example: I retrieve some data from a table. This table contain id column that is a integer column. When fetch data from this table, php result array has that id field like a string, not integer.</p> <pre><code>array(3) { ["id"]=&gt; string(2) "11" ["name"]=&gt; string(24) "test name" ["surname"]=&gt; string(2) "test suname" } </code></pre> <p>I know that with mysqlnd driver I can obtain this as default type in php.</p> <p>I use php 5.3 and mysqlnd is enable:</p> <pre><code>shell$ php -i | grep -i mysql MySQL Support =&gt; enabled Client API version =&gt; mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $ mysql.allow_local_infile =&gt; On =&gt; On mysql.allow_persistent =&gt; On =&gt; On mysql.connect_timeout =&gt; 60 =&gt; 60 mysql.default_host =&gt; no value =&gt; no value mysql.default_password =&gt; no value =&gt; no value mysql.default_port =&gt; 3306 =&gt; 3306 mysql.default_socket =&gt; /var/mysql/mysql.sock =&gt; /var/mysql/mysql.sock mysql.default_user =&gt; no value =&gt; no value mysql.max_links =&gt; Unlimited =&gt; Unlimited mysql.max_persistent =&gt; Unlimited =&gt; Unlimited mysql.trace_mode =&gt; Off =&gt; Off mysqli MysqlI Support =&gt; enabled Client API library version =&gt; mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $ mysqli.allow_local_infile =&gt; On =&gt; On mysqli.allow_persistent =&gt; On =&gt; On mysqli.default_host =&gt; no value =&gt; no value mysqli.default_port =&gt; 3306 =&gt; 3306 mysqli.default_pw =&gt; no value =&gt; no value mysqli.default_socket =&gt; /var/mysql/mysql.sock =&gt; /var/mysql/mysql.sock mysqli.default_user =&gt; no value =&gt; no value mysqli.max_links =&gt; Unlimited =&gt; Unlimited mysqli.max_persistent =&gt; Unlimited =&gt; Unlimited mysqli.reconnect =&gt; Off =&gt; Off mysqlnd mysqlnd =&gt; enabled Version =&gt; mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $ PDO drivers =&gt; mysql, sqlite, sqlite2 pdo_mysql PDO Driver for MySQL =&gt; enabled Client API version =&gt; mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $ pdo_mysql.default_socket =&gt; /var/mysql/mysql.sock =&gt; /var/mysql/mysql.sock </code></pre> <p>How can I fetch data with native type?</p> </div>

php给出了奇怪的输出

<div class="post-text" itemprop="text"> <p>So after migrating to a different host, exporting and importing database, fixing links, I am getting some strange output of my php which worked fine on the previous host.</p> <p>php connect:</p> <pre><code>&lt;?php $con = mysql_connect("localhost","dbname_user","password"); mysql_select_db("dbname",$con); if (mysql_connect_errno()) { echo "Failed to connect to MySQL: " . mysql_connect_error(); } ?&gt; </code></pre> <p>php db call:</p> <pre><code>&lt;?php //print table info $sql = "SELECT * FROM pizzas"; $result = mysql_query($sql,$con); $firstRow = 1; while($row = mysql_fetch_array($result)){ if($row["enabled"] == 1){ if($firstRow == 0){ echo '&lt;tr&gt;&lt;td class="spacer"&gt;~&lt;/td&gt;&lt;/tr&gt;'; } echo '&lt;tr&gt;&lt;td class="title"&gt;'.$row['name'].'&lt;/td&gt;&lt;/tr&gt;'; echo '&lt;tr&gt;&lt;td class="description"&gt;'.$row['description'].'&lt;/td&gt;&lt;/tr&gt;'; if($row['priceMax']){ echo '&lt;tr&gt;&lt;td class="price"&gt;£'.$row['price'].' - £'.$row['priceMax'].'&lt;/td&gt;&lt;/tr&gt;'; } elseif($row['price']){ echo '&lt;tr&gt;&lt;td class="price"&gt;£'.$row['price'].'&lt;/td&gt;&lt;/tr&gt;'; } $firstRow = 0; } } ?&gt; </code></pre> <p>Output in html:</p> <blockquote> <p>'; } echo ''; echo ''; if($row['priceMax']){ echo ''; } elseif($row['price']){ echo ''; } $firstRow = 0; } } ?&gt; ~ '.$row['name'].' '.$row['description'].' £'.$row['price'].' - £'.$row['priceMax'].' £'.$row['price'].'</p> </blockquote> <p>Can anyone decipher what exactly is going wrong here? I have no idea what is giving this strange output.</p> <p>EDIT: Fixed to make all mysql and no mysqli. Same output. Changed all from mysql to mysqli. No change. Included error reporting. No extra info. If ?php wasn't implemented as a keyword as suggested then wouldn't all the code be printed? This is what is so confusing is that some code is obviously being read but some not.</p> <p>phpinfo:</p> <pre><code>&gt; PHP Logo PHP Version 5.4.26 &gt; &gt; System Linux metro703.hostmetro.com &gt; 2.6.32-531.1.2.lve1.2.54.el6.x86_64 #1 SMP Tue Mar 25 07:41:27 EDT 2014 x86_64 Build Date Mar 29 2014 04:36:14 Configure Command &gt; './configure' '--disable-fileinfo' '--enable-bcmath' &gt; '--enable-calendar' '--enable-exif' '--enable-ftp' &gt; '--enable-gd-native-ttf' '--enable-intl' '--enable-libxml' &gt; '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' &gt; '--enable-sockets' '--enable-wddx' '--enable-zip' &gt; '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' &gt; '--with-curl=/opt/curlssl/' '--with-curlwrappers' &gt; '--with-enchant=/usr' '--with-freetype-dir=/usr' '--with-gd' &gt; '--with-gettext' '--with-icu-dir=/usr' &gt; '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' &gt; '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' &gt; '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' &gt; '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' &gt; '--with-mm=/opt/mm/' '--with-mysql=/usr' &gt; '--with-mysql-sock=/var/lib/mysql/mysql.sock' &gt; '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' &gt; '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' &gt; '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' &gt; '--with-png-dir=/usr' '--with-pspell' '--with-tidy=/opt/tidy/' &gt; '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' &gt; '--with-zlib' '--with-zlib-dir=/usr' Server API CGI/FastCGI Virtual &gt; Directory Support disabled Configuration File (php.ini) Path &gt; /usr/local/lib Loaded Configuration File /usr/local/lib/php.ini Scan &gt; this dir for additional .ini files (none) Additional .ini files &gt; parsed (none) PHP API 20100412 PHP Extension 20100525 Zend &gt; Extension 220100525 Zend Extension Build API220100525,NTS PHP &gt; Extension Build API20100525,NTS Debug Build no Thread Safety &gt; disabled Zend Signal Handling disabled Zend Memory Manager enabled &gt; Zend Multibyte Support provided by mbstring IPv6 Support enabled &gt; DTrace Support disabled Registered PHP Streams compress.zlib, dict, &gt; ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, smtp, &gt; smtps, telnet, tftp, php, file, glob, data, phar, zip Registered &gt; Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls &gt; Registered Stream Filters zlib.*, convert.iconv.*, mcrypt.*, &gt; mdecrypt.*, string.rot13, string.toupper, string.tolower, &gt; string.strip_tags, convert.*, consumed, dechunk &gt; &gt; Zend logo This program makes use of the Zend Scripting Language &gt; Engine: Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies &gt; with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd., and &gt; with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies &gt; &gt; PHP Credits Configuration bcmath BCMath support enabled &gt; &gt; Directive Local Value Master Value bcmath.scale 0 0 &gt; &gt; calendar Calendar support enabled &gt; &gt; cgi-fcgi Directive Local Value Master Value cgi.check_shebang_line 1 1 &gt; cgi.discard_path 0 0 cgi.fix_pathinfo 1 1 cgi.force_redirect 1 1 &gt; cgi.nph 0 0 cgi.redirect_status_env no value no value &gt; cgi.rfc2616_headers 0 0 fastcgi.logging 1 1 &gt; &gt; Core PHP Version 5.4.26 &gt; &gt; Directive Local Value Master Value allow_url_fopen On On &gt; allow_url_include Off Off always_populate_raw_post_data Off Off &gt; arg_separator.input &amp; &amp; arg_separator.output &amp; &amp; asp_tags Off Off &gt; auto_append_file no value no value auto_globals_jit On On &gt; auto_prepend_file no value no value browscap no value no value &gt; default_charset no value no value default_mimetype text/html text/html &gt; disable_classes no value no value &gt; disable_functions eval,exec,passthru,shell_exec,socket_create,symlink eval,exec,passthru,shell_exec,socket_create,symlink &gt; display_errors On On display_startup_errors Off Off doc_root no &gt; value no value docref_ext no value no value docref_root no value no &gt; value enable_dl On On enable_post_data_reading On On &gt; error_append_string no value no value error_log error_log error_log &gt; error_prepend_string no value no value error_reporting 8183 8183 &gt; exit_on_timeout Off Off expose_php On On &gt; extension_dir /usr/local/lib/php/extensions/no-debug-non-zts-20100525 /usr/local/lib/php/extensions/no-debug-non-zts-20100525 &gt; file_uploads On On highlight.comment #FF8000 #FF8000 &gt; highlight.default #0000BB #0000BB highlight.html #000000 #000000 &gt; highlight.keyword #007700 #007700 highlight.string #DD0000 #DD0000 &gt; html_errors On On ignore_repeated_errors Off Off &gt; ignore_repeated_source Off Off ignore_user_abort Off Off &gt; implicit_flush Off Off &gt; include_path .:/usr/lib/php:/usr/local/lib/php .:/usr/lib/php:/usr/local/lib/php &gt; log_errors On On log_errors_max_len 1024 1024 &gt; mail.add_x_header Off Off mail.force_extra_parameters no value no &gt; value mail.log no value no value max_execution_time 30 30 &gt; max_file_uploads 20 20 max_input_nesting_level 64 64 &gt; max_input_time 60 60 max_input_vars 1000 1000 memory_limit 32M 32M &gt; open_basedir no value no value output_buffering no value no value &gt; output_handler no value no value post_max_size 8M 8M precision 12 12 &gt; realpath_cache_size 16K 16K realpath_cache_ttl 120 120 &gt; register_argc_argv On On report_memleaks On On report_zend_debug On On &gt; request_order no value no value sendmail_from no value no value &gt; sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i &gt; serialize_precision 100 100 short_open_tag On On &gt; SMTP localhost localhost smtp_port 25 25 sql.safe_mode Off Off &gt; track_errors Off Off unserialize_callback_func no value no value &gt; upload_max_filesize 20M 20M upload_tmp_dir no value no value &gt; user_dir no value no value user_ini.cache_ttl 300 300 &gt; user_ini.filename .user.ini .user.ini variables_order EGPCS EGPCS &gt; xmlrpc_error_number 0 0 xmlrpc_errors Off Off &gt; zend.detect_unicode On On zend.enable_gc On On zend.multibyte Off Off &gt; zend.script_encoding no value no value &gt; &gt; ctype ctype functions enabled &gt; &gt; curl cURL support enabled cURL Information 7.24.0 Age 3 Features &gt; AsynchDNS No Debug No GSS-Negotiate No IDN Yes IPv6 Yes Largefile &gt; Yes NTLM Yes SPNEGO No SSL Yes SSPI No krb4 No libz Yes &gt; CharConv No Protocols dict, file, ftp, ftps, gopher, http, https, &gt; imap, imaps, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp Host &gt; x86_64-unknown-linux-gnu SSL Version OpenSSL/1.0.1e ZLib Version &gt; 1.2.3 &gt; &gt; date date/time support enabled "Olson" Timezone Database Version &gt; 2013.9 Timezone Database internal Default timezone UTC &gt; &gt; Directive Local Value Master Value &gt; date.default_latitude 31.7667 31.7667 &gt; date.default_longitude 35.2333 35.2333 &gt; date.sunrise_zenith 90.583333 90.583333 &gt; date.sunset_zenith 90.583333 90.583333 date.timezone UTC UTC &gt; &gt; dom DOM/XML enabled DOM/XML API Version 20031129 libxml Version &gt; 2.9.0 HTML Support enabled XPath Support enabled XPointer Support enabled Schema Support enabled RelaxNG Support enabled &gt; &gt; enchant enchant support enabled Version 1.1.0 Libenchant Version &gt; 1.5.x Revision $Id: 6de2feac8047059326b85565067ecdba8fb4f363 $ &gt; &gt; myspell Myspell Provider /usr/lib64/enchant/libenchant_myspell.so &gt; &gt; ereg Regex Library Bundled library enabled &gt; &gt; exif EXIF Support enabled EXIF Version 1.4 $Id$ Supported EXIF &gt; Version 0220 Supported filetypes JPEG,TIFF &gt; &gt; Directive Local Value Master Value exif.decode_jis_intel JIS JIS &gt; exif.decode_jis_motorola JIS JIS &gt; exif.decode_unicode_intel UCS-2LE UCS-2LE &gt; exif.decode_unicode_motorola UCS-2BE UCS-2BE exif.encode_jis no &gt; value no value exif.encode_unicode ISO-8859-15 ISO-8859-15 &gt; &gt; filter Input Validation and Filtering enabled Revision $Id: &gt; ad78b4a085153b8c7f4d6db5dc69df40e969c343 $ &gt; &gt; Directive Local Value Master Value &gt; filter.default unsafe_raw unsafe_raw filter.default_flags no value no &gt; value &gt; &gt; ftp FTP support enabled &gt; &gt; gd GD Support enabled GD Version bundled (2.1.0 compatible) FreeType &gt; Support enabled FreeType Linkage with freetype FreeType Version &gt; 2.3.11 GIF Read Support enabled GIF Create Support enabled JPEG Support enabled libJPEG Version 6b PNG Support enabled libPNG &gt; Version 1.2.49 WBMP Support enabled XPM Support enabled libXpm &gt; Version 30411 XBM Support enabled &gt; &gt; Directive Local Value Master Value gd.jpeg_ignore_warning 0 0 &gt; &gt; gettext GetText Support enabled &gt; &gt; hash hash support enabled Hashing Engines md2 md4 md5 sha1 sha224 &gt; sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool &gt; tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 &gt; snefru snefru256 gost adler32 crc32 crc32b fnv132 fnv164 joaat &gt; haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 &gt; haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 &gt; haval192,5 haval224,5 haval256,5 &gt; &gt; iconv iconv support enabled iconv implementation glibc iconv library &gt; version 2.12 &gt; &gt; Directive Local Value Master Value &gt; iconv.input_encoding ISO-8859-1 ISO-8859-1 &gt; iconv.internal_encoding ISO-8859-1 ISO-8859-1 &gt; iconv.output_encoding ISO-8859-1 ISO-8859-1 &gt; &gt; imap IMAP c-Client Version 2007f SSL Support enabled Kerberos &gt; Support enabled &gt; &gt; intl Internationalization support enabled version 1.1.0 ICU version &gt; 4.2.1 &gt; &gt; Directive Local Value Master Value intl.default_locale no value no &gt; value intl.error_level 0 0 &gt; &gt; json json support enabled json version 1.2.1 &gt; &gt; libxml libXML support active libXML Compiled Version 2.9.0 libXML &gt; Loaded Version 20900 libXML streams enabled &gt; &gt; mbstring Multibyte Support enabled Multibyte string engine libmbfl &gt; HTTP input encoding translation disabled libmbfl version 1.3.2 &gt; &gt; mbstring extension makes use of "streamable kanji code filter and &gt; converter", which is distributed under the GNU Lesser General Public &gt; License version 2.1. &gt; &gt; Multibyte (japanese) regex support enabled Multibyte regex &gt; (oniguruma) backtrack check On Multibyte regex (oniguruma) version &gt; 4.7.1 &gt; &gt; Directive Local Value Master Value mbstring.detect_order no value no &gt; value mbstring.encoding_translation Off Off mbstring.func_overload 0 0 &gt; mbstring.http_input pass pass mbstring.http_output pass pass &gt; mbstring.http_output_conv_mimetypes ^(text/|application/xhtml\+xml) ^(text/|application/xhtml\+xml) &gt; mbstring.internal_encoding no value no value &gt; mbstring.language neutral neutral mbstring.strict_detection Off Off &gt; mbstring.substitute_character no value no value &gt; &gt; mcrypt mcrypt support enabled mcrypt_filter support enabled Version &gt; 2.5.8 Api No 20021217 Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake &gt; blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 &gt; tripledes Supported modes cbc cfb ctr ecb ncfb nofb ofb stream &gt; &gt; Directive Local Value Master Value mcrypt.algorithms_dir no value no &gt; value mcrypt.modes_dir no value no value &gt; &gt; mysql MySQL Support enabled Active Persistent Links 0 Active Links 0 &gt; Client API version 5.5.36 MYSQL_MODULE_TYPE external MYSQL_SOCKET &gt; /var/lib/mysql/mysql.sock MYSQL_INCLUDE -I/usr/include/mysql &gt; MYSQL_LIBS -L/usr/lib64 -lmysqlclient &gt; &gt; Directive Local Value Master Value mysql.allow_local_infile On On &gt; mysql.allow_persistent On On mysql.connect_timeout 60 60 &gt; mysql.default_host no value no value mysql.default_password no &gt; value no value mysql.default_port no value no value &gt; mysql.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock &gt; mysql.default_user no value no value &gt; mysql.max_links Unlimited Unlimited &gt; mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off &gt; &gt; mysqli MysqlI Support enabled Client API library version 5.5.36 &gt; Active Persistent Links 0 Inactive Persistent Links 0 Active Links &gt; 0 Client API header version 5.5.36 MYSQLI_SOCKET &gt; /var/lib/mysql/mysql.sock &gt; &gt; Directive Local Value Master Value mysqli.allow_local_infile On On &gt; mysqli.allow_persistent On On mysqli.default_host no value no value &gt; mysqli.default_port 3306 3306 mysqli.default_pw no value no value &gt; mysqli.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock &gt; mysqli.default_user no value no value &gt; mysqli.max_links Unlimited Unlimited &gt; mysqli.max_persistent Unlimited Unlimited mysqli.reconnect Off Off &gt; &gt; mysqlnd mysqlnd enabled Version mysqlnd 5.0.10 - 20111026 - $Id: &gt; c85105d7c6f7d70d609bb4c000257868a40840ab $ Compression supported SSL &gt; supported Command buffer size 4096 Read buffer size 32768 Read &gt; timeout 31536000 Collecting statistics Yes Collecting memory &gt; statistics No Tracing n/a Loaded plugins &gt; mysqlnd,example,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password &gt; API Extensions pdo_mysql &gt; &gt; mysqlnd statistics bytes_sent 0 bytes_received 0 packets_sent 0 &gt; packets_received 0 protocol_overhead_in 0 protocol_overhead_out 0 &gt; bytes_received_ok_packet 0 bytes_received_eof_packet 0 &gt; bytes_received_rset_header_packet 0 &gt; bytes_received_rset_field_meta_packet 0 &gt; bytes_received_rset_row_packet 0 &gt; bytes_received_prepare_response_packet 0 &gt; bytes_received_change_user_packet 0 packets_sent_command 0 &gt; packets_received_ok 0 packets_received_eof 0 &gt; packets_received_rset_header 0 packets_received_rset_field_meta 0 &gt; packets_received_rset_row 0 packets_received_prepare_response 0 &gt; packets_received_change_user 0 result_set_queries 0 &gt; non_result_set_queries 0 no_index_used 0 bad_index_used 0 &gt; slow_queries 0 buffered_sets 0 unbuffered_sets 0 ps_buffered_sets &gt; 0 ps_unbuffered_sets 0 flushed_normal_sets 0 flushed_ps_sets 0 &gt; ps_prepared_never_executed 0 ps_prepared_once_executed 0 &gt; rows_fetched_from_server_normal 0 rows_fetched_from_server_ps 0 &gt; rows_buffered_from_client_normal 0 rows_buffered_from_client_ps 0 &gt; rows_fetched_from_client_normal_buffered 0 &gt; rows_fetched_from_client_normal_unbuffered 0 &gt; rows_fetched_from_client_ps_buffered 0 &gt; rows_fetched_from_client_ps_unbuffered 0 &gt; rows_fetched_from_client_ps_cursor 0 rows_affected_normal 0 &gt; rows_affected_ps 0 rows_skipped_normal 0 rows_skipped_ps 0 &gt; copy_on_write_saved 0 copy_on_write_performed 0 &gt; command_buffer_too_small 0 connect_success 0 connect_failure 0 &gt; connection_reused 0 reconnect 0 pconnect_success 0 &gt; active_connections 0 active_persistent_connections 0 explicit_close &gt; 0 implicit_close 0 disconnect_close 0 in_middle_of_command_close 0 &gt; explicit_free_result 0 implicit_free_result 0 explicit_stmt_close 0 &gt; implicit_stmt_close 0 mem_emalloc_count 0 mem_emalloc_amount 0 &gt; mem_ecalloc_count 0 mem_ecalloc_amount 0 mem_erealloc_count 0 &gt; mem_erealloc_amount 0 mem_efree_count 0 mem_efree_amount 0 &gt; mem_malloc_count 0 mem_malloc_amount 0 mem_calloc_count 0 &gt; mem_calloc_amount 0 mem_realloc_count 0 mem_realloc_amount 0 &gt; mem_free_count 0 mem_free_amount 0 mem_estrndup_count 0 &gt; mem_strndup_count 0 mem_estndup_count 0 mem_strdup_count 0 &gt; proto_text_fetched_null 0 proto_text_fetched_bit 0 &gt; proto_text_fetched_tinyint 0 proto_text_fetched_short 0 &gt; proto_text_fetched_int24 0 proto_text_fetched_int 0 &gt; proto_text_fetched_bigint 0 proto_text_fetched_decimal 0 &gt; proto_text_fetched_float 0 proto_text_fetched_double 0 &gt; proto_text_fetched_date 0 proto_text_fetched_year 0 &gt; proto_text_fetched_time 0 proto_text_fetched_datetime 0 &gt; proto_text_fetched_timestamp 0 proto_text_fetched_string 0 &gt; proto_text_fetched_blob 0 proto_text_fetched_enum 0 &gt; proto_text_fetched_set 0 proto_text_fetched_geometry 0 &gt; proto_text_fetched_other 0 proto_binary_fetched_null 0 &gt; proto_binary_fetched_bit 0 proto_binary_fetched_tinyint 0 &gt; proto_binary_fetched_short 0 proto_binary_fetched_int24 0 &gt; proto_binary_fetched_int 0 proto_binary_fetched_bigint 0 &gt; proto_binary_fetched_decimal 0 proto_binary_fetched_float 0 &gt; proto_binary_fetched_double 0 proto_binary_fetched_date 0 &gt; proto_binary_fetched_year 0 proto_binary_fetched_time 0 &gt; proto_binary_fetched_datetime 0 proto_binary_fetched_timestamp 0 &gt; proto_binary_fetched_string 0 proto_binary_fetched_blob 0 &gt; proto_binary_fetched_enum 0 proto_binary_fetched_set 0 &gt; proto_binary_fetched_geometry 0 proto_binary_fetched_other 0 &gt; init_command_executed_count 0 init_command_failed_count 0 com_quit &gt; 0 com_init_db 0 com_query 0 com_field_list 0 com_create_db 0 &gt; com_drop_db 0 com_refresh 0 com_shutdown 0 com_statistics 0 &gt; com_process_info 0 com_connect 0 com_process_kill 0 com_debug 0 &gt; com_ping 0 com_time 0 com_delayed_insert 0 com_change_user 0 &gt; com_binlog_dump 0 com_table_dump 0 com_connect_out 0 &gt; com_register_slave 0 com_stmt_prepare 0 com_stmt_execute 0 &gt; com_stmt_send_long_data 0 com_stmt_close 0 com_stmt_reset 0 &gt; com_stmt_set_option 0 com_stmt_fetch 0 com_deamon 0 &gt; bytes_received_real_data_normal 0 bytes_received_real_data_ps 0 &gt; &gt; example statistics stat1 0 stat2 0 &gt; &gt; openssl OpenSSL support enabled OpenSSL Library Version OpenSSL &gt; 1.0.1e-fips 11 Feb 2013 OpenSSL Header Version OpenSSL 1.0.1e-fips 11 Feb 2013 &gt; &gt; pcre PCRE (Perl Compatible Regular Expressions) Support enabled PCRE &gt; Library Version 8.21 2011-12-12 &gt; &gt; Directive Local Value Master Value &gt; pcre.backtrack_limit 1000000 1000000 &gt; pcre.recursion_limit 100000 100000 &gt; &gt; PDO PDO support enabled PDO drivers sqlite, mysql &gt; &gt; pdo_mysql PDO Driver for MySQL enabled Client API version mysqlnd &gt; 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $ &gt; &gt; Directive Local Value Master Value &gt; pdo_mysql.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock &gt; &gt; pdo_sqlite PDO Driver for SQLite 3.x enabled SQLite Library 3.7.7.1 &gt; &gt; Phar Phar: PHP Archive support enabled Phar EXT version 2.0.1 Phar &gt; API version 1.1.1 SVN revision $Id: &gt; ec823514107160b7e6fabc519594012657a2db91 $ Phar-based phar archives &gt; enabled Tar-based phar archives enabled ZIP-based phar archives &gt; enabled gzip compression enabled bzip2 compression disabled &gt; (install pecl/bz2) OpenSSL support enabled &gt; &gt; Phar based on pear/PHP_Archive, original concept by Davey Shafik. Phar &gt; fully realized by Gregory Beaver and Marcus Boerger. Portions of tar &gt; implementation Copyright (c) 2003-2009 Tim Kientzle. &gt; &gt; Directive Local Value Master Value phar.cache_list no value no value &gt; phar.readonly On On phar.require_hash On On &gt; &gt; posix Revision $Id: 1dfa9997ed76804e53c91e0ce862f3707617b6ed $ &gt; &gt; pspell PSpell Support enabled &gt; &gt; Reflection Reflection enabled Version $Id: &gt; f6367cdb4e3f392af4a6d441a6641de87c2e50c4 $ &gt; &gt; session Session Support enabled Registered save handlers files user &gt; mm Registered serializer handlers php php_binary wddx &gt; &gt; Directive Local Value Master Value session.auto_start Off Off &gt; session.cache_expire 180 180 session.cache_limiter nocache nocache &gt; session.cookie_domain no value no value &gt; session.cookie_httponly Off Off session.cookie_lifetime 0 0 &gt; session.cookie_path / / session.cookie_secure Off Off &gt; session.entropy_file no value no value session.entropy_length 0 0 &gt; session.gc_divisor 100 100 session.gc_maxlifetime 1440 1440 &gt; session.gc_probability 1 1 session.hash_bits_per_character 4 4 &gt; session.hash_function 0 0 session.name PHPSESSID PHPSESSID &gt; session.referer_check no value no value &gt; session.save_handler files files session.save_path /tmp /tmp &gt; session.serialize_handler php php &gt; session.upload_progress.cleanup On On &gt; session.upload_progress.enabled On On &gt; session.upload_progress.freq 1% 1% &gt; session.upload_progress.min_freq 1 1 &gt; session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS session.upload_progress.prefix upload_progress_ upload_progress_ &gt; session.use_cookies On On session.use_only_cookies On On &gt; session.use_trans_sid 0 0 &gt; &gt; SimpleXML Simplexml support enabled Revision $Id: &gt; b9966ddccead3e8bb7666aae9de01fe3d687b21a $ Schema support enabled &gt; &gt; soap Soap Client enabled Soap Server enabled &gt; &gt; Directive Local Value Master Value soap.wsdl_cache 1 1 &gt; soap.wsdl_cache_dir /tmp /tmp soap.wsdl_cache_enabled 1 1 &gt; soap.wsdl_cache_limit 5 5 soap.wsdl_cache_ttl 86400 86400 &gt; &gt; sockets Sockets Support enabled &gt; &gt; SPL SPL support enabled Interfaces Countable, OuterIterator, &gt; RecursiveIterator, SeekableIterator, SplObserver, SplSubject Classes &gt; AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, &gt; BadMethodCallException, CachingIterator, CallbackFilterIterator, &gt; DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, &gt; FilterIterator, GlobIterator, InfiniteIterator, &gt; InvalidArgumentException, IteratorIterator, LengthException, &gt; LimitIterator, LogicException, MultipleIterator, NoRewindIterator, &gt; OutOfBoundsException, OutOfRangeException, OverflowException, &gt; ParentIterator, RangeException, RecursiveArrayIterator, &gt; RecursiveCachingIterator, RecursiveCallbackFilterIterator, &gt; RecursiveDirectoryIterator, RecursiveFilterIterator, &gt; RecursiveIteratorIterator, RecursiveRegexIterator, &gt; RecursiveTreeIterator, RegexIterator, RuntimeException, &gt; SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, &gt; SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, &gt; SplQueue, SplStack, SplTempFileObject, UnderflowException, &gt; UnexpectedValueException &gt; &gt; sqlite3 SQLite3 support enabled SQLite3 module version 0.7 SQLite &gt; Library 3.7.7.1 &gt; &gt; Directive Local Value Master Value sqlite3.extension_dir no value no &gt; value &gt; &gt; standard Dynamic Library Support enabled Path to sendmail &gt; /usr/sbin/sendmail -t -i &gt; &gt; Directive Local Value Master Value assert.active 1 1 assert.bail 0 0 &gt; assert.callback no value no value assert.quiet_eval 0 0 &gt; assert.warning 1 1 auto_detect_line_endings 0 0 &gt; default_socket_timeout 60 60 from no value no value &gt; url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset= a=href,area=href,frame=src,input=src,form=,fieldset= &gt; user_agent no value no value &gt; &gt; tidy Tidy support enabled libTidy Release 25 March 2009 Extension &gt; Version 2.0 ($Id$) &gt; &gt; Directive Local Value Master Value tidy.clean_output 0 0 &gt; tidy.default_config no value no value &gt; &gt; tokenizer Tokenizer Support enabled &gt; &gt; wddx WDDX Support enabled WDDX Session Serializer enabled &gt; &gt; xml XML Support active XML Namespace Support active EXPAT Version &gt; expat_2.0.1 &gt; &gt; xmlreader XMLReader enabled &gt; &gt; xmlrpc core library version xmlrpc-epi v. 0.51 php extension version &gt; 0.51 author Dan Libby homepage http://xmlrpc-epi.sourceforge.net open sourced by Epinions.com &gt; &gt; xmlwriter XMLWriter enabled &gt; &gt; xsl XSL enabled libxslt Version 1.1.27 libxslt compiled against &gt; libxml Version 2.9.0 EXSLT enabled libexslt Version 1.1.27 &gt; &gt; Zend Guard Loader Zend Guard Loader enabled License Path no value &gt; Obfuscation level 0 &gt; &gt; &gt; &gt; &gt; PHP License &gt; &gt; This program is free software; you can redistribute it and/or modify &gt; it under the terms of the PHP License as published by the PHP Group &gt; and included in the distribution in the file: LICENSE &gt; &gt; This program is distributed in the hope that it will be useful, but &gt; WITHOUT ANY WARRANTY; without even the implied warranty of &gt; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &gt; &gt; If you did not receive a copy of the PHP license, or have any &gt; questions about PHP licensing, please contact license@php.net. </code></pre> </div>

如何在PHP中使用Doctrine2设置SSL加密的MySQL连接(不是Symfony,而不是Doctrine1)

<div class="post-text" itemprop="text"> <p>I am having a hard time finding documentation / examples of how to setup an SSL encrypted connection with Doctrine2 to MySQL. I'm not using Symfony, so looking for the pure PHP path.</p> <p>What I'm stuck on is basically how to convey the MYSQL_CLIENT_SSL (or MYSQLI_CLIENT_SSL) flag, and the path to the ca certificate. I can live with not verifying the certificate, but I can't live with not encrypting the connection for this task.</p> <p>On the command line this would be done similar to this:</p> <pre><code>mysql --ssl-verify-server-cert --ssl-ca=/mysql-ssl-certs/ca-cert.pem --ssl -h host [etc] </code></pre> <p>In pure php using the mysql extension I think it would look something like:</p> <pre><code>$conn = mysql_connect($host, $user, $pass, false, MYSQL_CLIENT_SSL); </code></pre> <p>With mysqli (i think) it would be something like this:</p> <pre><code>$db = mysqli_init(); $db-&gt;ssl_set(null, null, $cert, null, null); $db-&gt;real_connect($host, $user, $pass, $dbname); </code></pre> <p>The question is, how do I do this with Doctrine2? Is it even possible? How do I modify the initialization for Doctrine2 to do this?</p> <pre><code>$DOCTRINE2_DB = array( 'driver' =&gt; 'pdo_mysql', 'host' =&gt; $host, 'user' =&gt; $user, 'password' =&gt; $pass, 'dbname' =&gt; $dbname, 'unix_socket' =&gt; $sockpath, ); $DOCTRINE2_EM = \Doctrine\ORM\EntityManager::create($DOCTRINE2_DB, $DOCTRINE2_CONFIG); $EM =&amp; $DOCTRINE2_EM; // for brevity &amp; sanity </code></pre> </div>

切换到MYSQLI和工作台[关闭]

<div class="post-text" itemprop="text"> <p>I'm using MYSQL Workbench right now to build my database, do I need to build my database differently now to use MYSQLI or is MYSQLI just the syntax for connecting to the database. Also do I need to download the MYSQLI driver and disable the MYSQL one... I'm honestly just very confused. I'm going to learn PDO to connect to my database, I just don't want something bad to happen to my website after, from what I understand, the MYSQL driver wont work in the future and everything must use the MYSQLI driver, or library, or whatever it is. I don't quite understand what this switch to MYSQLI is. Should I use something else?</p> <p>Sorry if what I post is confusing, I'm just a beginner.</p> <p>Thanks a lot,</p> <p>Mike</p> </div>

问题缓存和我的本地Laravel / PHP / Apache安装

<div class="post-text" itemprop="text"> <p>I've been developing websites for <strong>years</strong> with PHP(7.1)/Laravel (5.6) on my local (Windows) computer. I don't use XAMPP or anything - I install Apache &amp; PHP &amp; MySQL directly, configure them, etc.</p> <p>Then I deploy the sites onto my shared hosting provider on HostGator. Both my PC &amp; HostGator are pretty slow.</p> <p>Yesterday I started playing with laravel Cache::. I put lots into the cache, played with different drivers - file, database, &amp; now Redis. But the more I use the Laravel Cache on my computer, the slower it gets - now insanely slow.</p> <p>BUT! I deploy the exact same code up to the Hostgator site, using just the default file cache driver, and suddenly it's like 3 times faster!</p> <p>Since the code &amp; PHP version are the same on my PC as Hostgator, I can only imagine it's either because HostGator is CentOS &amp; I'm windows 10, OR, something with how I configured my PHP or Apache that makes them play really badly with caching. Any quick thoughts? Even Redis didn't help!</p> <blockquote> <p>I'm including the output from phpinfo below:</p> </blockquote> <pre><code>PHP Version 7.1.4 System Windows NT BONDI 6.2 build 9200 (Windows 8 Home Premium Edition) AMD64 Build Date Apr 11 2017 19:50:45 Compiler MSVC14 (Visual C++ 2015) Architecture x64 Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-pdo-oci=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared" "--with-oci8-12c=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer" "--with-pgo" Server API Apache 2.0 Handler Virtual Directory Support enabled Configuration File (php.ini) Path C:\WINDOWS Loaded Configuration File C:\App\php-7\php.ini Scan this dir for additional .ini files (none) Additional .ini files parsed (none) PHP API 20160303 PHP Extension 20160303 Zend Extension 320160303 Zend Extension Build API320160303,TS,VC14 PHP Extension Build API20160303,TS,VC14 Debug Build no Thread Safety enabled Zend Signal Handling disabled Zend Memory Manager enabled Zend Multibyte Support provided by mbstring IPv6 Support enabled DTrace Support disabled Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Xdebug v2.6.0, Copyright (c) 2002-2018, by Hostname:Port localhost:80 Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100 Timeouts Connection: 60 - Keep-Alive: 5 Virtual Server No Server Root C:/App/Apache24 Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_access_compat mod_actions mod_alias mod_allowmethods mod_asis mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_http2 mod_headers mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_socache_shmcb mod_ssl mod_php7 Directive Local Value Master Value engine 1 1 last_modified 0 0 xbithack 0 0 Apache Environment Variable Value HTTP_HOST localhost HTTP_CONNECTION keep-alive HTTP_UPGRADE_INSECURE_REQUESTS 1 HTTP_DNT 1 HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 HTTP_REFERER http://localhost/ HTTP_ACCEPT_ENCODING gzip, deflate, br HTTP_ACCEPT_LANGUAGE en-US,en;q=0.9,da;q=0.8 SystemRoot C:\WINDOWS COMSPEC C:\WINDOWS\system32\cmd.exe PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC WINDIR C:\WINDOWS SERVER_SIGNATURE no value SERVER_SOFTWARE Apache/2.4.23 (Win64) OpenSSL/1.0.2h PHP/7.1.4 SERVER_NAME localhost SERVER_ADDR ::1 SERVER_PORT 80 REMOTE_ADDR ::1 DOCUMENT_ROOT C:/App/Apache24/htdocs REQUEST_SCHEME http CONTEXT_PREFIX no value CONTEXT_DOCUMENT_ROOT C:/App/Apache24/htdocs SERVER_ADMIN pkirkaas@gmail.com SCRIPT_FILENAME C:/App/Apache24/htdocs/phpinfo.php REMOTE_PORT 2427 GATEWAY_INTERFACE CGI/1.1 SERVER_PROTOCOL HTTP/1.1 REQUEST_METHOD GET QUERY_STRING no value REQUEST_URI /phpinfo.php SCRIPT_NAME /phpinfo.php HTTP Headers Information HTTP Request Headers HTTP Request GET /phpinfo.php HTTP/1.1 Host localhost Connection keep-alive Upgrade-Insecure-Requests 1 DNT 1 User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Accept text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Referer http://localhost/ Accept-Encoding gzip, deflate, br Accept-Language en-US,en;q=0.9,da;q=0.8 HTTP Response Headers X-Powered-By PHP/7.1.4 bcmath BCMath support enabled Directive Local Value Master Value bcmath.scale 0 0 calendar Calendar support enabled Core PHP Version 7.1.4 Directive Local Value Master Value allow_url_fopen On On allow_url_include Off Off arg_separator.input &amp; &amp; arg_separator.output &amp; &amp; auto_append_file no value no value auto_globals_jit On On auto_prepend_file no value no value browscap no value no value default_charset UTF-8 UTF-8 default_mimetype text/html text/html disable_classes no value no value disable_functions no value no value display_errors On On display_startup_errors On On doc_root no value no value docref_ext no value no value docref_root no value no value enable_dl Off Off enable_post_data_reading On On error_append_string no value no value error_log C:/tmp/php_errors.log C:/tmp/php_errors.log error_prepend_string no value no value error_reporting 32767 32767 expose_php On On extension_dir C:/App/php-7.1.4-Win32-VC14-x64/ext/ C:/App/php-7.1.4-Win32-VC14-x64/ext/ file_uploads On On hard_timeout 2 2 highlight.comment #FF8000 #FF8000 highlight.default #0000BB #0000BB highlight.html #000000 #000000 highlight.keyword #007700 #007700 highlight.string #DD0000 #DD0000 html_errors Off Off ignore_repeated_errors Off Off ignore_repeated_source Off Off ignore_user_abort Off Off implicit_flush Off Off include_path .;C:\php\pear .;C:\php\pear input_encoding no value no value internal_encoding no value no value log_errors On On log_errors_max_len 1024 1024 mail.add_x_header On On mail.force_extra_parameters no value no value mail.log no value no value max_execution_time 5260 5260 max_file_uploads 20 20 max_input_nesting_level 64 64 max_input_time 260 260 max_input_vars 1000 1000 memory_limit 1999M 1999M open_basedir no value no value output_buffering 4096 4096 output_encoding no value no value output_handler no value no value post_max_size 120M 120M precision 14 14 realpath_cache_size 16M 16M realpath_cache_ttl 120 120 register_argc_argv Off Off report_memleaks On On report_zend_debug On On request_order GP GP sendmail_from no value no value sendmail_path no value no value serialize_precision 17 17 short_open_tag On On SMTP localhost localhost smtp_port 25 25 sql.safe_mode Off Off sys_temp_dir no value no value track_errors On On unserialize_callback_func no value no value upload_max_filesize 120M 120M upload_tmp_dir no value no value user_dir no value no value user_ini.cache_ttl 300 300 user_ini.filename .user.ini .user.ini variables_order GPCS GPCS windows.show_crt_warning Off Off xmlrpc_error_number 0 0 xmlrpc_errors Off Off zend.assertions 1 1 zend.detect_unicode On On zend.enable_gc On On zend.multibyte Off Off zend.script_encoding no value no value ctype ctype functions enabled curl cURL support enabled cURL Information 7.53.1 Age 3 Features AsynchDNS Yes CharConv No Debug No GSS-Negotiate No IDN Yes IPv6 Yes krb4 No Largefile Yes libz Yes NTLM Yes NTLMWB No SPNEGO Yes SSL Yes SSPI Yes TLS-SRP No HTTP2 Yes GSSAPI No KERBEROS5 Yes UNIX_SOCKETS No PSL No Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host x86_64-pc-win32 SSL Version OpenSSL/1.0.2h ZLib Version 1.2.8 libSSH Version libssh2/1.8.0 date date/time support enabled "Olson" Timezone Database Version 2017.2 Timezone Database internal Default timezone UTC Directive Local Value Master Value date.default_latitude 31.7667 31.7667 date.default_longitude 35.2333 35.2333 date.sunrise_zenith 90.583333 90.583333 date.sunset_zenith 90.583333 90.583333 date.timezone no value no value dom DOM/XML enabled DOM/XML API Version 20031129 libxml Version 2.9.4 HTML Support enabled XPath Support enabled XPointer Support enabled Schema Support enabled RelaxNG Support enabled exif EXIF Support enabled EXIF Version 1.4 $Id: 8bdc0c8f27c2c9dd1f7551f1f9fe3ab57a06a4b1 $ Supported EXIF Version 0220 Supported filetypes JPEG,TIFF Directive Local Value Master Value exif.decode_jis_intel JIS JIS exif.decode_jis_motorola JIS JIS exif.decode_unicode_intel UCS-2LE UCS-2LE exif.decode_unicode_motorola UCS-2BE UCS-2BE exif.encode_jis no value no value exif.encode_unicode ISO-8859-15 ISO-8859-15 fileinfo fileinfo support enabled version 1.0.5 libmagic 522 filter Input Validation and Filtering enabled Revision $Id: cdc5e15bb616f10210b94ecd8789e66c927a375f $ Directive Local Value Master Value filter.default unsafe_raw unsafe_raw filter.default_flags no value no value gd GD Support enabled GD Version bundled (2.1.0 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.7.0 GIF Read Support enabled GIF Create Support enabled JPEG Support enabled libJPEG Version 9 compatible PNG Support enabled libPNG Version 1.6.21 WBMP Support enabled XPM Support enabled libXpm Version 30512 XBM Support enabled WebP Support enabled Directive Local Value Master Value gd.jpeg_ignore_warning 1 1 gettext GetText Support enabled hash hash support enabled Hashing Engines md2 md4 md5 sha1 sha224 sha256 sha384 sha512/224 sha512/256 sha512 sha3-224 sha3-256 sha3-384 sha3-512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b fnv132 fnv1a32 fnv164 fnv1a64 joaat 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 MHASH support Enabled MHASH API Version Emulated Support iconv iconv support enabled iconv implementation "libiconv" iconv library version 1.15 Directive Local Value Master Value iconv.input_encoding no value no value iconv.internal_encoding no value no value iconv.output_encoding no value no value imap IMAP c-Client Version 2007f SSL Support enabled intl Internationalization support enabled version 1.1.0 ICU version 57.1 ICU Data version 57.1 Directive Local Value Master Value intl.default_locale no value no value intl.error_level 0 0 intl.use_exceptions 0 0 json json support enabled json version 1.5.0 ldap LDAP Support enabled RCS Version $Id: 1a2168f979730c42ec291285f5183076688f4509 $ Total Links 0/unlimited API Version 3001 Vendor Name OpenLDAP Vendor Version 20444 SASL Support Enabled Directive Local Value Master Value ldap.max_links Unlimited Unlimited libxml libXML support active libXML Compiled Version 2.9.4 libXML Loaded Version 20904 libXML streams enabled mbstring Multibyte Support enabled Multibyte string engine libmbfl HTTP input encoding translation disabled libmbfl version 1.3.2 oniguruma version 5.9.6 mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1. Multibyte (japanese) regex support enabled Multibyte regex (oniguruma) version 5.9.6 Directive Local Value Master Value mbstring.detect_order no value no value mbstring.encoding_translation Off Off mbstring.func_overload 0 0 mbstring.http_input no value no value mbstring.http_output no value no value mbstring.http_output_conv_mimetypes ^(text/|application/xhtml\+xml) ^(text/|application/xhtml\+xml) mbstring.internal_encoding no value no value mbstring.language neutral neutral mbstring.strict_detection Off Off mbstring.substitute_character no value no value mcrypt mcrypt support enabled mcrypt_filter support enabled Version 2.5.8 Api No 20021217 Supported ciphers cast-128 gost rijndael-128 twofish cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes arcfour Supported modes cbc cfb ctr ecb ncfb nofb ofb stream Directive Local Value Master Value mcrypt.algorithms_dir no value no value mcrypt.modes_dir no value no value mysqli MysqlI Support enabled Client API library version mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $ Active Persistent Links 0 Inactive Persistent Links 0 Active Links 0 Directive Local Value Master Value mysqli.allow_local_infile On On mysqli.allow_persistent On On mysqli.default_host no value no value mysqli.default_port 3306 3306 mysqli.default_pw no value no value mysqli.default_socket no value no value mysqli.default_user no value no value mysqli.max_links Unlimited Unlimited mysqli.max_persistent Unlimited Unlimited mysqli.reconnect Off Off mysqli.rollback_on_cached_plink Off Off mysqlnd mysqlnd enabled Version mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $ Compression supported core SSL supported extended SSL not supported Command buffer size 4096 Read buffer size 32768 Read timeout 31536000 Collecting statistics Yes Collecting memory statistics Yes Tracing n/a Loaded plugins mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password API Extensions mysqli,pdo_mysql mysqlnd statistics bytes_sent 73072 bytes_received 1229046 packets_sent 2578 packets_received 15941 protocol_overhead_in 63764 protocol_overhead_out 10312 bytes_received_ok_packet 0 bytes_received_eof_packet 0 bytes_received_rset_header_packet 11322 bytes_received_rset_field_meta_packet 0 bytes_received_rset_row_packet 2233 bytes_received_prepare_response_packet 812313 bytes_received_change_user_packet 394029 packets_sent_command 1287 packets_received_ok 0 packets_received_eof 0 packets_received_rset_header 1258 packets_received_rset_field_meta 0 packets_received_rset_row 430 packets_received_prepare_response 11023 packets_received_change_user 2798 result_set_queries 423 non_result_set_queries 7 no_index_used 13 bad_index_used 0 slow_queries 0 buffered_sets 0 unbuffered_sets 0 ps_buffered_sets 423 ps_unbuffered_sets 0 flushed_normal_sets 0 flushed_ps_sets 0 ps_prepared_never_executed 0 ps_prepared_once_executed 428 rows_fetched_from_server_normal 0 rows_fetched_from_server_ps 2375 rows_buffered_from_client_normal 0 rows_buffered_from_client_ps 2375 rows_fetched_from_client_normal_buffered 0 rows_fetched_from_client_normal_unbuffered 0 rows_fetched_from_client_ps_buffered 2375 rows_fetched_from_client_ps_unbuffered 0 rows_fetched_from_client_ps_cursor 0 rows_affected_normal 0 rows_affected_ps 0 rows_skipped_normal 0 rows_skipped_ps 2375 copy_on_write_saved 0 copy_on_write_performed 0 command_buffer_too_small 0 connect_success 2 connect_failure 0 connection_reused 0 reconnect 0 pconnect_success 0 active_connections 0 active_persistent_connections 0 explicit_close 1 implicit_close 0 disconnect_close 0 in_middle_of_command_close 0 explicit_free_result 851 implicit_free_result 0 explicit_stmt_close 428 implicit_stmt_close 0 mem_emalloc_count 21107 mem_emalloc_amount 16715406 mem_ecalloc_count 15711 mem_ecalloc_amount 4021976 mem_erealloc_count 6068 mem_erealloc_amount 3403496 mem_efree_count 36818 mem_efree_amount 20862820 mem_malloc_count 0 mem_malloc_amount 0 mem_calloc_count 0 mem_calloc_amount 0 mem_realloc_count 0 mem_realloc_amount 0 mem_free_count 0 mem_free_amount 0 mem_estrndup_count 11 mem_strndup_count 0 mem_estrdup_count 8 mem_strdup_count 0 mem_edupl_count 0 mem_dupl_count 0 proto_text_fetched_null 0 proto_text_fetched_bit 0 proto_text_fetched_tinyint 0 proto_text_fetched_short 0 proto_text_fetched_int24 0 proto_text_fetched_int 0 proto_text_fetched_bigint 0 proto_text_fetched_decimal 0 proto_text_fetched_float 0 proto_text_fetched_double 0 proto_text_fetched_date 0 proto_text_fetched_year 0 proto_text_fetched_time 0 proto_text_fetched_datetime 0 proto_text_fetched_timestamp 0 proto_text_fetched_string 0 proto_text_fetched_blob 0 proto_text_fetched_enum 0 proto_text_fetched_set 0 proto_text_fetched_geometry 0 proto_text_fetched_other 0 proto_binary_fetched_null 0 proto_binary_fetched_bit 533 proto_binary_fetched_tinyint 0 proto_binary_fetched_short 1156 proto_binary_fetched_int24 0 proto_binary_fetched_int 0 proto_binary_fetched_bigint 10240 proto_binary_fetched_decimal 0 proto_binary_fetched_float 3 proto_binary_fetched_double 0 proto_binary_fetched_date 0 proto_binary_fetched_year 288 proto_binary_fetched_time 0 proto_binary_fetched_datetime 0 proto_binary_fetched_timestamp 0 proto_binary_fetched_string 4340 proto_binary_fetched_json 3384 proto_binary_fetched_blob 215 proto_binary_fetched_enum 0 proto_binary_fetched_set 0 proto_binary_fetched_geometry 0 proto_binary_fetched_other 0 init_command_executed_count 0 init_command_failed_count 0 com_quit 1 com_init_db 0 com_query 2 com_field_list 0 com_create_db 0 com_drop_db 0 com_refresh 0 com_shutdown 0 com_statistics 0 com_process_info 0 com_connect 0 com_process_kill 0 com_debug 0 com_ping 0 com_time 0 com_delayed_insert 0 com_change_user 0 com_binlog_dump 0 com_table_dump 0 com_connect_out 0 com_register_slave 0 com_stmt_prepare 428 com_stmt_execute 428 com_stmt_send_long_data 0 com_stmt_close 428 com_stmt_reset 0 com_stmt_set_option 0 com_stmt_fetch 0 com_deamon 0 bytes_received_real_data_normal 0 bytes_received_real_data_ps 420039 openssl OpenSSL support enabled OpenSSL Library Version OpenSSL 1.0.2h 3 May 2016 OpenSSL Header Version OpenSSL 1.0.2k 26 Jan 2017 Openssl default config /usr/local/ssl/openssl.cnf Directive Local Value Master Value openssl.cafile no value no value openssl.capath no value no value pcre PCRE (Perl Compatible Regular Expressions) Support enabled PCRE Library Version 8.38 2015-11-23 PCRE JIT Support enabled Directive Local Value Master Value pcre.backtrack_limit 1000000 1000000 pcre.jit 1 1 pcre.recursion_limit 100000 100000 PDO PDO support enabled PDO drivers mysql, odbc, sqlite pdo_mysql PDO Driver for MySQL enabled Client API version mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $ PDO_ODBC PDO Driver for ODBC (Win32) enabled ODBC Connection Pooling Enabled, strict matching pdo_sqlite PDO Driver for SQLite 3.x enabled SQLite Library 3.15.1 Phar Phar: PHP Archive support enabled Phar EXT version 2.0.2 Phar API version 1.1.1 SVN revision $Id: 59c11f4e29768bfbbf6f41cb469abd81d8655850 $ Phar-based phar archives enabled Tar-based phar archives enabled ZIP-based phar archives enabled gzip compression enabled bzip2 compression disabled (install pecl/bz2) OpenSSL support enabled Phar based on pear/PHP_Archive, original concept by Davey Shafik. Phar fully realized by Gregory Beaver and Marcus Boerger. Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle. Directive Local Value Master Value phar.cache_list no value no value phar.readonly On On phar.require_hash On On readline Readline Support enabled Readline library WinEditLine Directive Local Value Master Value cli.pager no value no value cli.prompt \b \&gt; \b \&gt; Reflection Reflection enabled Version $Id: a06522d025b0af3e6ba10a0f6964086b7e6f5458 $ session Session Support enabled Registered save handlers files user Registered serializer handlers php_serialize php php_binary wddx Directive Local Value Master Value session.auto_start Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly Off Off session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.lazy_write On On session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path no value no value session.serialize_handler php php session.sid_bits_per_character 4 4 session.sid_length 32 32 session.upload_progress.cleanup On On session.upload_progress.enabled On On session.upload_progress.freq 1% 1% session.upload_progress.min_freq 1 1 session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS session.upload_progress.prefix upload_progress_ upload_progress_ session.use_cookies On On session.use_only_cookies On On session.use_strict_mode Off Off session.use_trans_sid 0 0 SimpleXML Simplexml support enabled Revision $Id: 7e5516dcdf2fe6ded7970eaeb6abd8d07df39a2a $ Schema support enabled soap Soap Client enabled Soap Server enabled Directive Local Value Master Value soap.wsdl_cache 1 1 soap.wsdl_cache_dir /tmp /tmp soap.wsdl_cache_enabled 1 1 soap.wsdl_cache_limit 5 5 soap.wsdl_cache_ttl 86400 86400 sockets Sockets Support enabled SPL SPL support enabled Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException standard Dynamic Library Support enabled Internal Sendmail Support for Windows enabled Directive Local Value Master Value assert.active 1 1 assert.bail 0 0 assert.callback no value no value assert.exception 0 0 assert.quiet_eval 0 0 assert.warning 1 1 auto_detect_line_endings 0 0 default_socket_timeout 60 60 from no value no value session.trans_sid_hosts no value no value session.trans_sid_tags a=href,area=href,frame=src,form= a=href,area=href,frame=src,form= url_rewriter.hosts no value no value url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry user_agent no value no value tokenizer Tokenizer Support enabled wddx WDDX Support enabled WDDX Session Serializer enabled xdebug xdebug support enabled Version 2.6.0 IDE Key BONDI$ Supported protocols DBGp - Common DeBuGger Protocol Directive Local Value Master Value xdebug.auto_trace Off Off xdebug.cli_color 0 0 xdebug.collect_assignments Off Off xdebug.collect_includes On On xdebug.collect_params 0 0 xdebug.collect_return Off Off xdebug.collect_vars Off Off xdebug.coverage_enable On On xdebug.default_enable On On xdebug.dump.COOKIE no value no value xdebug.dump.ENV no value no value xdebug.dump.FILES no value no value xdebug.dump.GET no value no value xdebug.dump.POST no value no value xdebug.dump.REQUEST no value no value xdebug.dump.SERVER no value no value xdebug.dump.SESSION no value no value xdebug.dump_globals On On xdebug.dump_once On On xdebug.dump_undefined Off Off xdebug.extended_info On On xdebug.file_link_format no value no value xdebug.filename_format no value no value xdebug.force_display_errors Off Off xdebug.force_error_reporting 0 0 xdebug.gc_stats_enable Off Off xdebug.gc_stats_output_dir C:\Windows\Temp C:\Windows\Temp xdebug.gc_stats_output_name gcstats.%p gcstats.%p xdebug.halt_level 0 0 xdebug.idekey no value no value xdebug.max_nesting_level 256 256 xdebug.max_stack_frames -1 -1 xdebug.overload_var_dump 2 2 xdebug.profiler_aggregate Off Off xdebug.profiler_append Off Off xdebug.profiler_enable Off Off xdebug.profiler_enable_trigger On On xdebug.profiler_enable_trigger_value no value no value xdebug.profiler_output_dir C:\tmp C:\tmp xdebug.profiler_output_name cachegrind.out.callgrind.%t-%s.out cachegrind.out.callgrind.%t-%s.out xdebug.remote_addr_header no value no value xdebug.remote_autostart Off Off xdebug.remote_connect_back Off Off xdebug.remote_cookie_expire_time 3600 3600 xdebug.remote_enable Off Off xdebug.remote_handler dbgp dbgp xdebug.remote_host localhost localhost xdebug.remote_log no value no value xdebug.remote_mode req req xdebug.remote_port 9000 9000 xdebug.remote_timeout 200 200 xdebug.scream Off Off xdebug.show_error_trace Off Off xdebug.show_exception_trace Off Off xdebug.show_local_vars Off Off xdebug.show_mem_delta Off Off xdebug.trace_enable_trigger Off Off xdebug.trace_enable_trigger_value no value no value xdebug.trace_format 0 0 xdebug.trace_options 0 0 xdebug.trace_output_dir C:\Windows\Temp C:\Windows\Temp xdebug.trace_output_name trace.%c trace.%c xdebug.var_display_max_children 128 128 xdebug.var_display_max_data 512 512 xdebug.var_display_max_depth 3 3 CommonProgramW6432 C:\Program Files\Common Files COMPUTERNAME BONDI ComSpec C:\WINDOWS\system32\cmd.exe CYGWIN mintty DriverData C:\Windows\System32\Drivers\DriverData GOPATH Q:\Common\Backups\Golangs GOROOT C:\App\Go JAVA_HOME C:\Program Files\Java\jdk-10.0.2 LANG en_US.UTF-8 LOCALAPPDATA C:\WINDOWS\system32\config\systemprofile\AppData\Local MOD_WSGI_APACHE_ROOTDIR C:/App/Apache24 NUMBER_OF_PROCESSORS 8 OnlineServices Online Services OS Windows_NT </code></pre> </div>

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

将一个接口响应时间从2s优化到 200ms以内的一个案例

一、背景 在开发联调阶段发现一个接口的响应时间特别长,经常超时,囧… 本文讲讲是如何定位到性能瓶颈以及修改的思路,将该接口从 2 s 左右优化到 200ms 以内 。 二、步骤 2.1 定位 定位性能瓶颈有两个思路,一个是通过工具去监控,一个是通过经验去猜想。 2.1.1 工具监控 就工具而言,推荐使用 arthas ,用到的是 trace 命令 具体安装步骤很简单,大家自行研究。 我的使用步骤是...

学历低,无法胜任工作,大佬告诉你应该怎么做

微信上收到一位读者小涛的留言,大致的意思是自己只有高中学历,经过培训后找到了一份工作,但很难胜任,考虑要不要辞职找一份他能力可以胜任的实习工作。下面是他留言的一部分内容: 二哥,我是 2016 年高中毕业的,考上了大学但没去成,主要是因为当时家里经济条件不太允许。 打工了三年后想学一门技术,就去培训了。培训的学校比较垃圾,现在非常后悔没去正规一点的机构培训。 去年 11 月份来北京找到了一份工...

JVM内存结构和Java内存模型别再傻傻分不清了

讲一讲什么是Java内存模型 Java内存模型虽说是一个老生常谈的问题 ,也是大厂面试中绕不过的,甚至初级面试也会问到。但是真正要理解起来,还是相当困难,主要这个东西看不见,摸不着。 这是一个比较开放的题目,面试官主要想考察的是对Java内存模型的了解到了什么程度了,然后根据回答进行进一步的提问 下面,我们就这个问题的回答列一下我们的思路 具体的思路如下: 说一说Java内存模型的缘由 简略辨析...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

Google 与微软的浏览器之争

浏览器再现“神仙打架”。整理 | 屠敏头图 | CSDN 下载自东方 IC出品 | CSDN(ID:CSDNnews)从 IE 到 Chrome,再从 Chrome 到 Edge,微软与...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

立即提问
相关内容推荐