標題:

免費註冊體驗

 

此文章來自奇摩知識+如有不便請留言告知

apache php mysql大問題

發問:

裝完上面個三樣野 但係係php就connect唔到mysql 睇一睇apache的error log 發現 [Fri Jul 20 11:38:39 2007] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function mysql_connect() in E:\\\\fff\\\\htdocs\\\\dbconnect.inc.php on line 5, referer: http://localhost/ 係咪裝上面個三樣野有問題所以my_sql_connect()先會undefined???

最佳解答:

你查看一下, php.ini裡面, 是否已經enable了 mysql 的library. 查看方法有兩個, 1. 建立一php檔, 然後裡面如下程式碼, 若你於瀏覽器看到沒有mysql選項, 則去php.ini更改設定, 設定如下, [MySQL] ; Allow or prevent persistent links. mysql.allow_persistent = On ; Maximum number of persistent links. -1 means no limit. mysql.max_persistent = -1 ; Maximum number of links (persistent + non-persistent). -1 means no limit. mysql.max_links = -1 ; Default port number for mysql_connect(). If unset, mysql_connect() will use ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look ; at MYSQL_PORT. mysql.default_port = ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. mysql.default_socket = ; Default host for mysql_connect() (doesn't apply in safe mode). mysql.default_host = ; Default user for mysql_connect() (doesn't apply in safe mode). mysql.default_user = ; Default password for mysql_connect() (doesn't apply in safe mode). ; Note that this is generally a *bad* idea to store passwords in this file. ; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password") ; and reveal this password! And of course, any users with read access to this ; file will be able to reveal the password as well. mysql.default_password = ; Maximum time (in secondes) for connect timeout. -1 means no limimt mysql.connect_timeout = -1 ; Trace mode. When trace_mode is active (=On), warnings for table/index scans and ; SQL-Erros will be displayed. mysql.trace_mode = Off

其他解答:
arrow
arrow

    xhwmjv0 發表在 痞客邦 留言(0) 人氣()