|
|
| Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate. |
|
|||||||
| TouchArcade.com - iPhone Game Reviews and News |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
|
#1 |
|
macrumors 68030
Join Date: Nov 2003
|
MySQL/PHP
Here is my problem, I reinstalled OS X recently, so I had to reinstall php and mysql (Ver 14.7 Distrib 4.1.7, for apple-darwin7.5.0 (powerpc)) which both work from terminal, and php (PHP 4.3.10 (cli) (built: Jan 23 2005 21:23:17)) works with apache (one that comes in panther) just fine. The problem was I opted to use the pre-configured package instead of starting from the source.
Using tested code PHP using both standard method of mysql_connect() and PEAR methods, I cannot connect to mysql. I keep getting: "Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in xxx". This the same message in PEAR as well, and the code has been tested on different servers. I think it has to do my mysql_lib and mysql_include being blank. PHP Version => 4.3.10 System => Darwin superbovine.local 7.8.0 Darwin Kernel Version 7.8.0: Wed Dec 22 14:26:17 PST 2004; root:xnu/xnu-517.11.1.obj~1/RELEASE_PPC Power Macintosh Build Date => Jan 23 2005 21:21:25 Configure Command => '/SourceCache/apache_mod_php/apache_mod_php-17.5/php/configure' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-apxs' '--with-ldap=/usr' '--with-kerberos=/usr' '--enable-cli' '--with-zlib-dir=/usr' '--enable-trans-sid' '--with-xml' '--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-mbregex' '--enable-dbx' '--enable-sockets' '--with-iodbc=/usr' '--with-curl=/usr' '--with-config-file-path=/etc' '--sysconfdir=/private/etc' Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /etc PHP API => 20020918 PHP Extension => 20020429 Zend Extension => 20021010 Debug Build => no Thread Safety => disabled Registered PHP Streams => php, http, ftp, compress.zlib Configuration PHP Core Directive => Local Value => Master Value allow_call_time_pass_reference => On => On allow_url_fopen => On => On always_populate_raw_post_data => Off => Off arg_separator.input => & => & arg_separator.output => & => & asp_tags => Off => Off auto_append_file => no value => no value 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 => On => On error_append_string => no value => no value error_log => no value => no value error_prepend_string => no value => no value error_reporting => no value => no value expose_php => On => On extension_dir => /usr/lib/php/extensions/no-debug-non-zts-20020429 => /usr/lib/php/extensions/no-debug-non-zts-20020429 file_uploads => On => On gpc_order => GPC => GPC 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 => Off => On ignore_repeated_errors => Off => Off ignore_repeated_source => Off => Off ignore_user_abort => Off => Off implicit_flush => On => Off include_path => .:/usr/lib/php => .:/usr/lib/php log_errors => Off => Off log_errors_max_len => 1024 => 1024 magic_quotes_gpc => On => On magic_quotes_runtime => Off => Off magic_quotes_sybase => Off => Off max_execution_time => 0 => 30 max_input_time => -1 => -1 open_basedir => no value => no value output_buffering => 0 => 0 output_handler => no value => no value post_max_size => 8M => 8M precision => 14 => 14 register_argc_argv => On => On register_globals => Off => Off report_memleaks => On => On safe_mode => Off => Off safe_mode_exec_dir => /usr/local/php/bin => /usr/local/php/bin safe_mode_gid => Off => Off safe_mode_include_dir => no value => no value sendmail_from => no value => no value sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i serialize_precision => 100 => 100 short_open_tag => On => On SMTP => localhost => localhost smtp_port => 25 => 25 sql.safe_mode => Off => Off track_errors => Off => Off unserialize_callback_func => no value => no value upload_max_filesize => 2M => 2M upload_tmp_dir => no value => no value user_dir => no value => no value variables_order => no value => no value xmlrpc_error_number => 0 => 0 xmlrpc_errors => Off => Off y2k_compliance => On => On . . . dbx dbx support => enabled dbx version => 1.0.0 supported databases => MySQL ODBC PostgreSQL Microsoft SQL Server FrontBase Oracle 8 (oci8) Sybase-CT Directive => Local Value => Master Value dbx.colnames_case => unchanged => unchanged exif EXIF Support => enabled EXIF Version => 1.4 $Id: exif.c,v 1.118.2.29 2004/11/10 01:44:58 iliaa Exp $ Supported EXIF Version => 0220 Supported filetypes => JPEG,TIFF ftp FTP support => enabled ldap . . . mysql MySQL Support => enabled Active Persistent Links => 0 Active Links => 0 Client API version => 3.23.49 MYSQL_MODULE_TYPE => builtin MYSQL_SOCKET => /tmp/mysql.sock MYSQL_INCLUDE => MYSQL_LIBS => Directive => Local Value => Master Value 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 odbc ODBC Support => enabled Active Persistent Links => 0 Active Links => 0 ODBC library => iodbc ODBC_INCLUDE => -I/usr/include ODBC_LFLAGS => -L/usr/lib ODBC_LIBS => -liodbc Directive => Local Value => Master Value odbc.allow_persistent => On => On odbc.check_persistent => On => On odbc.default_db => no value => no value odbc.default_pw => <i>no value</i> => <i>no value</i> 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 . . . session Session Support => enabled Registered save handlers => files user Directive => Local Value => Master Value session.auto_start => Off => Off session.bug_compat_42 => On => On session.bug_compat_warn => On => On session.cache_expire => 180 => 180 session.cache_limiter => nocache => nocache session.cookie_domain => no value => no value 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 => 100 => 100 session.gc_maxlifetime => 1440 => 1440 session.gc_probability => 1 => 1 session.name => PHPSESSID => PHPSESSID session.referer_check => no value => no value session.save_handler => files => files session.save_path => /tmp => /tmp session.serialize_handler => php => php session.use_cookies => On => On session.use_only_cookies => Off => Off session.use_trans_sid => Off => Off sockets Sockets Support => enabled standard Regex Library => Bundled library enabled Dynamic Library Support => enabled Path to sendmail => /usr/sbin/sendmail -t -i 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 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,form=,fieldset= => a=href,area=href,frame=src,form=,fieldset= user_agent => no value => no value . . . Additional Modules Module Name Environment Variable => Value TERM_PROGRAM => Apple_Terminal TERM => xterm-color SHELL => /bin/bash TERM_PROGRAM_VERSION => 100.1.4 USER => cow SSH_AUTH_SOCK => /tmp/502/SSHKeychain.socket __CF_USER_TEXT_ENCODING => 0x1F5:0:0 PATH => /bin:/sbin:/usr/bin:/usr/sbin PWD => /users/cow/sites/url SHLVL => 1 HOME => /Users/cow LOGNAME => cow CVS_RSH => ssh SECURITYSESSIONID => 2111f0 _ => /usr/bin/php OLDPWD => /users/cow/sites PHP Variables Variable => Value _SERVER["TERM_PROGRAM"] => Apple_Terminal _SERVER["TERM"] => xterm-color _SERVER["SHELL"] => /bin/bash _SERVER["TERM_PROGRAM_VERSION"] => 100.1.4 _SERVER["USER"] => cow _SERVER["SSH_AUTH_SOCK"] => /tmp/502/SSHKeychain.socket _SERVER["__CF_USER_TEXT_ENCODING"] => 0x1F5:0:0 _SERVER["PATH"] => /bin:/sbin:/usr/bin:/usr/sbin _SERVER["PWD"] => /users/cow/sites/url _SERVER["SHLVL"] => 1 _SERVER["HOME"] => /Users/cow _SERVER["LOGNAME"] => cow _SERVER["CVS_RSH"] => ssh _SERVER["SECURITYSESSIONID"] => 2111f0 _SERVER["_"] => /usr/bin/php _SERVER["OLDPWD"] => /users/cow/sites _SERVER["PHP_SELF"] => _SERVER["SCRIPT_NAME"] => _SERVER["SCRIPT_FILENAME"] => _SERVER["PATH_TRANSLATED"] => _SERVER["DOCUMENT_ROOT"] => _SERVER["argv"] => Array ( ) _SERVER["argc"] => 0 _ENV["TERM_PROGRAM"] => Apple_Terminal _ENV["TERM"] => xterm-color _ENV["SHELL"] => /bin/bash _ENV["TERM_PROGRAM_VERSION"] => 100.1.4 _ENV["USER"] => cow _ENV["SSH_AUTH_SOCK"] => /tmp/502/SSHKeychain.socket _ENV["__CF_USER_TEXT_ENCODING"] => 0x1F5:0:0 _ENV["PATH"] => /bin:/sbin:/usr/bin:/usr/sbin _ENV["PWD"] => /users/cow/sites/url _ENV["SHLVL"] => 1 _ENV["HOME"] => /Users/cow _ENV["LOGNAME"] => cow _ENV["CVS_RSH"] => ssh _ENV["SECURITYSESSIONID"] => 2111f0 _ENV["_"] => /usr/bin/php _ENV["OLDPWD"] => /users/cow/sites |
|
|
|
|
|
#2 |
|
Demi-God (Moderator emeritus)
Join Date: Mar 2002
Location: Great(?) Britain
|
I had this problem, took me freakin AGES to figure out WTF was going on
![]() ...anyway, now you can benifit from my suffering... If you install MySQL 4.0 it should work, it's because of a change in 4.1 that there's the problem connecting to it from PHP. But, you don't have to go back to 4.0 to get this working. This will save your pain! |
|
|
|
|
|
#3 |
|
macrumors 601
Join Date: Jul 2002
Location: Fox Lake, IL
|
Should be no need to reinstall apache, so I would try again by first installing
http://www.entropy.ch/software/macosx/mysql/ then http://www.entropy.ch/software/macosx/php/ That is, of course, if you haven't already tried these.
__________________
|
|
|
|
|
|
#4 | |
|
Thread Starter
macrumors 68030
Join Date: Nov 2003
|
Quote:
|
|
|
|
|
|
|
#5 |
|
macrumors 601
Join Date: Jul 2002
Location: Fox Lake, IL
|
Not that it matter much anymore, but I ran into the same problem. Before downgrading, I tried option 3 (on my logins). Worked like a charm and much less suffering.
http://www.whoopis.com/howtos/mysql-auth-fix.html
__________________
|
|
|
|
|
|
#6 | |
|
Demi-God (Moderator emeritus)
Join Date: Mar 2002
Location: Great(?) Britain
|
Quote:
|
|
|
|
|
|
|
#7 | |
|
macrumors 601
Join Date: Jul 2002
Location: Fox Lake, IL
|
Quote:
__________________
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|