Navigate
Home
ArticleWiki
Forum
Journal
Search
Newsletter
Links
Tech News
expertsrt.com
Welcome Guest.
Username:

Password:

Remember me

Problem installing MYSQL with PHP
Welcome, Guest. Please login or register.
December 02, 2008, 06:19:46 AM
11304 Posts in 1248 Topics by 498 Members
Latest Member: katCheeme
Experts Round Table Network  |  Databases  |  MySQL  |  Problem installing MYSQL with PHP « previous next »
Pages: 1 [2] 3
Author Topic: Problem installing MYSQL with PHP  (Read 1581 times)
seandelaney
Moderator
*
Offline Offline

Posts: 119



WWW
« Reply #15 on: January 26, 2007, 03:17:17 AM »

ok i will help you fix this.

can i see your php.ini file please? or lets start from the beginning and do a fresh install on your machine?
Logged

seandelaney
Moderator
*
Offline Offline

Posts: 119



WWW
« Reply #16 on: January 26, 2007, 11:28:21 AM »

i found your problem...

you had wrong lines in php.ini file uncommented

Code:
;extension=php_mysql.dll

should be:

Code:
extension=php_mysql.dll
Logged

DougB

Offline Offline

Posts: 16


« Reply #17 on: January 26, 2007, 02:16:24 PM »

Sean, you back yet???
DougB
Logged

More coffee....
shiguera

Offline Offline

Posts: 6


« Reply #18 on: February 05, 2007, 10:06:15 PM »

I'm running Win XP sp2, installed apache 2.2.4 and PHP 5.2.0.  Tested and work ok (the "It works!" page appears as well as the info from phpinfo.php).  I then installed MySQL 5.0.27 and tested it alone, it works ok from the command line. BUT, did a http://localhost/phpinfo.php and there is no section on MySQL.  Did a phpmyadmin and it says that it can't load MySQL.  I checked for the usual things like the extension, the \ext directory, the PHP and MySQL/bin directories are in the PATH, etc., everything seems to be ok except that I don't have a copy of libmysql.dll in the system32 directory.

I went ahead and enabled showing startup errors and I get a warning saying that the dynamic library module php_mysql.dll was not found, but the file is present and so is the libmysql.dll.

I've been thinking about uninstalling MySQL and reinstalling again but first I want some advice from you. Please any idea(s) will be appreciated.
Logged
seandelaney
Moderator
*
Offline Offline

Posts: 119



WWW
« Reply #19 on: February 06, 2007, 12:52:21 AM »

Quote
everything seems to be ok except that I don't have a copy of libmysql.dll in the system32 directory.

when i setup my installation i didnt put the libmysql.dll file in the system32 directory.

first off, take a look at how ive got mine setup:

I have the following files in these folders:

Code:
W:\PHP\libmysql.dll
W:\PHP\ext\php_mysql.dll

after doing this, if your mysql still does not work, can i see these lines from your php.ini file:

Code:
; Directory in which the loadable extensions (modules) reside.
extension_dir = "W:\PHP\ext"
Logged

seandelaney
Moderator
*
Offline Offline

Posts: 119



WWW
« Reply #20 on: February 06, 2007, 12:54:13 AM »

Also please read over this:

http://dev.mysql.com/downloads/connector/php/
Logged

VGR
Mentor

Offline Offline

Posts: 682



WWW
« Reply #21 on: February 06, 2007, 11:30:08 AM »

connector is not useful

guy, your problem (mysql not showing up in phpinfo() results) is a common one, answered IMHO very recently on www.europeanexperts.org

have a look

i don't want to search myself or copy-paste here ;-)
Logged

techie overlord, answers all kind of questions on http://www.europeanexperts.org
shiguera

Offline Offline

Posts: 6


« Reply #22 on: February 06, 2007, 07:41:36 PM »

Hi guys,

yes, I have the files in these locations:
c:\PHP\libmysql.dll
c:\PHP\ext\php_mysql.dll

Also, my extensions directory is:
extension_dir = "c:\PHP\ext\"

which is uncommented. I  have tried forward slashes, with and without the trailing slash.  As for the connector, I have it installed since the beginning.

I will take a look at VGR's post and will comment tomorrow.  Thanks.
Logged
shiguera

Offline Offline

Posts: 6


« Reply #23 on: February 06, 2007, 08:45:32 PM »

VGR,

I looked around and couldn't find any "recent" post that specifically talks about this problem.  Would you please post the link?
Logged
VGR
Mentor

Offline Offline

Posts: 682



WWW
« Reply #24 on: February 06, 2007, 11:14:05 PM »

Hello, well I guess it's http://www.fecj.org/europeanexperts/question.php?id_q=1486

some PHP 5.0 distributions wee lacking the appropriate lib_mysql library, so you couldn't connect to a working mysql(d) server when using apache 2.2. the problem doesn't exist with Apache 1.3.x or 2.0.54

it's fixed in the latest packages
Logged

techie overlord, answers all kind of questions on http://www.europeanexperts.org
shiguera

Offline Offline

Posts: 6


« Reply #25 on: February 07, 2007, 06:52:48 AM »

VGR,

I went up to point 5 and everything is as supposed to.  I did not understand what to do on point 6 with the OLD_PASSWORD() stuff.  I have Apache 2.2.4, is your suggestion to downgrade? I am including here my phpinfo.php result so that you guys take a look and see if there is anything wrong.....

phpinfo()PHP Version 5.2.0

      System Windows NT TEST-A72880BC08 5.1 build 2600
      Build Date Nov 2 2006 11:50:55
      Configure Command cscript /nologo configure.js "--enable-snapshot-build"
      "--with-gd=shared"
      Server API Apache 2.0 Handler
      Virtual Directory Support enabled
      Configuration File (php.ini) Path C:\PHP\php.ini
      PHP API 20041225
      PHP Extension 20060613
      Zend Extension 220060519
      Debug Build no
      Thread Safety enabled
      Zend Memory Manager enabled
      IPv6 Support enabled
      Registered PHP Streams php, file, data, http, ftp, compress.zlib
      Registered Stream Socket Transports tcp, udp
      Registered Stream Filters convert.iconv.*, string.rot13, string.toupper,
      string.tolower, string.strip_tags, convert.*, consumed, zlib.*

       This program makes use of the Zend Scripting Language Engine:
      Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies





PHP Credits



Configuration
PHP Core
      DirectiveLocal ValueMaster Value
      allow_call_time_pass_referenceOffOff
      allow_url_fopenOnOn
      allow_url_includeOffOff
      always_populate_raw_post_dataOffOff
      arg_separator.input&&
      arg_separator.output&&
      asp_tagsOffOff
      auto_append_fileno valueno value
      auto_globals_jitOnOn
      auto_prepend_fileno valueno value
      browscapno valueno value
      default_charsetno valueno value
      default_mimetypetext/htmltext/html
      define_syslog_variablesOffOff
      disable_classesno valueno value
      disable_functionsno valueno value
      display_errorsOnOn
      display_startup_errorsOnOn
      doc_rootno valueno value
      docref_extno valueno value
      docref_rootno valueno value
      enable_dlOnOn
      error_append_stringno valueno value
      error_logc:\PHP\log\php_error.logc:\PHP\log\php_error.log
      error_prepend_stringno valueno value
      error_reporting61436143
      expose_phpOnOn
      extension_dirC:\PHP\ext\C:\PHP\ext\
      file_uploadsOnOn
      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_errorsOnOn
      ignore_repeated_errorsOffOff
      ignore_repeated_sourceOffOff
      ignore_user_abortOffOff
      implicit_flushOffOff
      include_path.;C:\php5\pear.;C:\php5\pear
      log_errorsOnOn
      log_errors_max_len10241024
      magic_quotes_gpcOffOff
      magic_quotes_runtimeOffOff
      magic_quotes_sybaseOffOff
      mail.force_extra_parametersno valueno value
      max_execution_time3030
      max_input_time6060
      open_basedirno valueno value
      output_buffering40964096
      output_handlerno valueno value
      post_max_size8M8M
      precision1414
      realpath_cache_size16K16K
      realpath_cache_ttl120120
      register_argc_argvOffOff
      register_globalsOffOff
      register_long_arraysOffOff
      report_memleaksOnOn
      report_zend_debugOnOn
      safe_modeOffOff
      safe_mode_exec_dirno valueno value
      safe_mode_gidOffOff
      safe_mode_include_dirno valueno value
      sendmail_fromno valueno value
      sendmail_pathno valueno value
      serialize_precision100100
      short_open_tagOnOn
      SMTPlocalhostlocalhost
      smtp_port2525
      sql.safe_modeOffOff
      track_errorsOnOn
      unserialize_callback_funcno valueno value
      upload_max_filesize2M2M
      upload_tmp_dirno valueno value
      user_dirno valueno value
      variables_orderGPCSGPCS
      xmlrpc_error_number00
      xmlrpc_errorsOffOff
      y2k_complianceOnOn
      zend.ze1_compatibility_modeOffOff


apache2handler
      Apache Version Apache/2.2.4 (Win32) PHP/5.2.0
      Apache API Version 20051115
      Server Administrator sergio.higuera@ca.schneider-electric.com
      Hostname:Port localhost:80
      Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
      Timeouts Connection: 300 - Keep-Alive: 5
      Virtual Server No
      Server Root C:/Apache22
      Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_actions
      mod_alias mod_asis mod_auth_basic mod_authn_default mod_authn_file
      mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user
      mod_autoindex mod_cgi mod_dir mod_env mod_imagemap mod_include mod_isapi
      mod_log_config mod_mime mod_negotiation mod_setenvif mod_userdir mod_php5

      DirectiveLocal ValueMaster Value
      engine11
      last_modified00
      xbithack00


Apache Environment
      VariableValue
      HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
      application/x-shockwave-flash, */*
      HTTP_ACCEPT_LANGUAGE en-us
      HTTP_ACCEPT_ENCODING gzip, deflate
      HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
      HTTP_HOST localhost
      HTTP_CONNECTION Keep-Alive
      PATH
      C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PHP;C:\PHP\ext;C:\MySQLSr5\bin

      SystemRoot C:\WINDOWS
      COMSPEC C:\WINDOWS\system32\cmd.exe
      PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
      WINDIR C:\WINDOWS
      SERVER_SIGNATURE no value
      SERVER_SOFTWARE Apache/2.2.4 (Win32) PHP/5.2.0
      SERVER_NAME localhost
      SERVER_ADDR 127.0.0.1
      SERVER_PORT 80
      REMOTE_ADDR 127.0.0.1
      DOCUMENT_ROOT C:/Apache22/htdocs
      SERVER_ADMIN sergio.higuera@ca.schneider-electric.com
      SCRIPT_FILENAME C:/Apache22/htdocs/phpinfo.php
      REMOTE_PORT 1044
      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
      Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
      application/x-shockwave-flash, */*
      Accept-Language en-us
      Accept-Encoding gzip, deflate
      User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
      Host localhost
      Connection Keep-Alive
      HTTP Response Headers
      X-Powered-By PHP/5.2.0
      Keep-Alive timeout=5, max=99
      Connection Keep-Alive
      Transfer-Encoding chunked
      Content-Type text/html


bcmath
      BCMath support enabled


calendar
      Calendar support enabled


com_dotnet
      COM supportenabled
      DCOM supportdisabled
      .Net supportenabled

      DirectiveLocal ValueMaster Value
      com.allow_dcom00
      com.autoregister_casesensitive11
      com.autoregister_typelib00
      com.autoregister_verbose00
      com.code_pageno valueno value
      com.typelib_fileno valueno value


ctype
      ctype functions enabled


date
      date/time support enabled
      Timezone Database Version 2006.14
      Timezone Database internal
      Default timezone Europe/Paris

      DirectiveLocal ValueMaster Value
      date.default_latitude31.766731.7667
      date.default_longitude35.233335.2333
      date.sunrise_zenith90.58333390.583333
      date.sunset_zenith90.58333390.583333
      date.timezoneno valueno value


dom
      DOM/XML enabled
      DOM/XML API Version 20031129
      libxml Version 2.6.26
      HTML Support enabled
      XPath Support enabled
      XPointer Support enabled
      Schema Support enabled
      RelaxNG Support enabled


filter
      Input Validation and Filteringenabled
      Revision $Revision: 1.52.2.25 $

      DirectiveLocal ValueMaster Value
      filter.defaultunsafe_rawunsafe_raw
      filter.default_flagsno valueno value


ftp
      FTP support enabled


hash
      hash support enabled
      Hashing Engines md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160
      whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4
      tiger192,4 snefru gost adler32 crc32 crc32b 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.9

      DirectiveLocal ValueMaster Value
      iconv.input_encodingISO-8859-1ISO-8859-1
      iconv.internal_encodingISO-8859-1ISO-8859-1
      iconv.output_encodingISO-8859-1ISO-8859-1


json
      json support enabled
      json version 1.2.1


libxml
      libXML support active
      libXML Version 2.6.26
      libXML streams enabled


odbc
      ODBC Supportenabled
      Active Persistent Links 0
      Active Links 0
      ODBC library Win32

      DirectiveLocal ValueMaster Value
      odbc.allow_persistentOnOn
      odbc.check_persistentOnOn
      odbc.default_dbno valueno value
      odbc.default_pwno valueno value
      odbc.default_userno valueno value
      odbc.defaultbinmodereturn as isreturn as is
      odbc.defaultlrlreturn up to 4096 bytesreturn up to 4096 bytes
      odbc.max_linksUnlimitedUnlimited
      odbc.max_persistentUnlimitedUnlimited


pcre
      PCRE (Perl Compatible Regular Expressions) Support enabled
      PCRE Library Version 6.7 04-Jul-2006


Reflection
      Reflectionenabled
      Version $Id: php_reflection.c,v 1.164.2.33.2.31 2006/10/18 16:35:15
      johannes Exp $


session
      Session Support enabled
      Registered save handlers files user
      Registered serializer handlers php php_binary wddx

      DirectiveLocal ValueMaster Value
      session.auto_startOffOff
      session.bug_compat_42OffOff
      session.bug_compat_warnOnOn
      session.cache_expire180180
      session.cache_limiternocachenocache
      session.cookie_domainno valueno value
      session.cookie_httponlyOffOff
      session.cookie_lifetime00
      session.cookie_path//
      session.cookie_secureOffOff
      session.entropy_fileno valueno value
      session.entropy_length00
      session.gc_divisor10001000
      session.gc_maxlifetime14401440
      session.gc_probability11
      session.hash_bits_per_character55
      session.hash_function00
      session.namePHPSESSIDPHPSESSID
      session.referer_checkno valueno value
      session.save_handlerfilesfiles
      session.save_pathno valueno value
      session.serialize_handlerphpphp
      session.use_cookiesOnOn
      session.use_only_cookiesOffOff
      session.use_trans_sid00


SimpleXML
      Simplexml supportenabled
      Revision $Revision: 1.151.2.22.2.15 $
      Schema support enabled


SPL
      SPL supportenabled
      Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator,
      SplObserver, SplSubject
      Classes AppendIterator, ArrayIterator, ArrayObject,
      BadFunctionCallException, BadMethodCallException, CachingIterator,
      DirectoryIterator, DomainException, EmptyIterator, FilterIterator,
      InfiniteIterator, InvalidArgumentException, IteratorIterator,
      LengthException, LimitIterator, LogicException, NoRewindIterator,
      OutOfBoundsException, OutOfRangeException, OverflowException,
      ParentIterator, RangeException, RecursiveArrayIterator,
      RecursiveCachingIterator, RecursiveDirectoryIterator,
      RecursiveFilterIterator, RecursiveIteratorIterator,
      RecursiveRegexIterator, RegexIterator, RuntimeException,
      SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage,
      SplTempFileObject, UnderflowException, UnexpectedValueException


standard
      Regex Library Bundled library enabled
      Dynamic Library Support enabled
      Internal Sendmail Support for Windows enabled

      DirectiveLocal ValueMaster Value
      assert.active11
      assert.bail00
      assert.callbackno valueno value
      assert.quiet_eval00
      assert.warning11
      auto_detect_line_endings00
      default_socket_timeout6060
      safe_mode_allowed_env_varsPHP_PHP_
      safe_mode_protected_env_varsLD_LIBRARY_PATHLD_LIBRARY_PATH
      url_rewriter.tagsa=href,area=href,frame=src,input=src,form=fakeentrya=href,area=href,frame=src,input=src,form=fakeentry
      user_agentno valueno value


tokenizer
      Tokenizer Support enabled


wddx
      WDDX Supportenabled
      WDDX Session Serializer enabled


xml
      XML Support active
      XML Namespace Support active
      libxml2 Version 2.6.26


xmlreader
      XMLReader enabled


xmlwriter
      XMLWriter enabled


zlib
      ZLib Support enabled
      Stream Wrapper support compress.zlib://
      Stream Filter support zlib.inflate, zlib.deflate
      Compiled Version 1.2.3
      Linked Version 1.2.3

      DirectiveLocal ValueMaster Value
      zlib.output_compressionOffOff
      zlib.output_compression_level-1-1
      zlib.output_handlerno valueno value


Additional Modules
      Module Name


Environment
      VariableValue
      ALLUSERSPROFILE C:\Documents and Settings\All Users
      CommonProgramFiles C:\Program Files\Common Files
      COMPUTERNAME TEST-A72880BC08
      ComSpec C:\WINDOWS\system32\cmd.exe
      FP_NO_HOST_CHECK NO
      NUMBER_OF_PROCESSORS 1
      OS Windows_NT
      Path
      C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PHP;C:\PHP\ext;C:\MySQLSr5\bin

      PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
      PROCESSOR_ARCHITECTURE x86
      PROCESSOR_IDENTIFIER x86 Family 6 Model 8 Stepping 10, GenuineIntel
      PROCESSOR_LEVEL 6
      PROCESSOR_REVISION 080a
      ProgramFiles C:\Program Files
      SystemDrive C:
      SystemRoot C:\WINDOWS
      TEMP C:\WINDOWS\TEMP
      TMP C:\WINDOWS\TEMP
      USERPROFILE C:\Documents and Settings\LocalService
      windir C:\WINDOWS
      AP_PARENT_PID 1772


PHP Variables
      VariableValue
      _SERVER["HTTP_ACCEPT"]image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
      application/x-shockwave-flash, */*
      _SERVER["HTTP_ACCEPT_LANGUAGE"]en-us
      _SERVER["HTTP_ACCEPT_ENCODING"]gzip, deflate
      _SERVER["HTTP_USER_AGENT"]Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
      5.1; SV1)
      _SERVER["HTTP_HOST"]localhost
      _SERVER["HTTP_CONNECTION"]Keep-Alive
      _SERVER["PATH"]C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PHP;C:\PHP\ext;C:\MySQLSr5\bin
      _SERVER["SystemRoot"]C:\WINDOWS
      _SERVER["COMSPEC"]C:\WINDOWS\system32\cmd.exe
      _SERVER["PATHEXT"].COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
      _SERVER["WINDIR"]C:\WINDOWS
      _SERVER["SERVER_SIGNATURE"]no value
      _SERVER["SERVER_SOFTWARE"]Apache/2.2.4 (Win32) PHP/5.2.0
      _SERVER["SERVER_NAME"]localhost
      _SERVER["SERVER_ADDR"]127.0.0.1
      _SERVER["SERVER_PORT"]80
      _SERVER["REMOTE_ADDR"]127.0.0.1
      _SERVER["DOCUMENT_ROOT"]C:/Apache22/htdocs
      _SERVER["SERVER_ADMIN"]sergio.higuera@ca.schneider-electric.com
      _SERVER["SCRIPT_FILENAME"]C:/Apache22/htdocs/phpinfo.php
      _SERVER["REMOTE_PORT"]1044
      _SERVER["GATEWAY_INTERFACE"]CGI/1.1
      _SERVER["SERVER_PROTOCOL"]HTTP/1.1
      _SERVER["REQUEST_METHOD"]GET
      _SERVER["QUERY_STRING"]no value
      _SERVER["REQUEST_URI"]/phpinfo.php
      _SERVER["SCRIPT_NAME"]/phpinfo.php
      _SERVER["PHP_SELF"]/phpinfo.php
      _SERVER["REQUEST_TIME"]1170834058


PHP License
      This program is free software; you can redistribute it and/or modify it
      under the terms of the PHP License as published by the PHP Group and
      included in the distribution in the file: LICENSE
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
      or FITNESS FOR A PARTICULAR PURPOSE.
      If you did not receive a copy of the PHP license, or have any questions
      about PHP licensing, please contact license@php.net.



Logged
shiguera

Offline Offline

Posts: 6


« Reply #26 on: February 07, 2007, 07:15:16 AM »

And here is my php.ini, which I have edited and deleted much of the comments just for this post, not in the original one in the machine:

[PHP]

;;;;;;;;;;;;;;;;;;;
; About php.ini   ;
;;;;;;;;;;;;;;;;;;;
;
;
;;;;;;;;;;;;;;;;;;;
; About this file ;
;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;

; Enable the PHP scripting language engine under Apache.
engine = On

; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
zend.ze1_compatibility_mode = Off

; Allow the <? tag.  Otherwise, only <?php and <script> tags are

recognized.
short_open_tag = On

; Allow ASP-style <% %> tags.
asp_tags = Off

; The number of significant digits displayed in floating point numbers.
precision    =  14

; Enforce year 2000 compliance (will cause problems with non-compliant

browsers)
y2k_compliance = On

output_buffering = 4096

; Note: output_handler must be empty if this is set 'On' !!!!
;       Instead you must use zlib.output_handler.
;output_handler =

; Note: You need to use zlib.output_handler instead of the standard
;       output_handler, or otherwise the output will be corrupted.
zlib.output_compression = Off
;zlib.output_compression_level = -1

;zlib.output_handler =

implicit_flush = Off

; callback-function.
unserialize_callback_func=

serialize_precision = 100

allow_call_time_pass_reference = Off

;
; Safe Mode
;
safe_mode = Off

safe_mode_gid = Off

safe_mode_include_dir =

safe_mode_exec_dir =

safe_mode_allowed_env_vars = PHP_

safe_mode_protected_env_vars = LD_LIBRARY_PATH

;open_basedir =

disable_functions =

disable_classes =


; realpath_cache_size=16k

; realpath_cache_ttl=120

;
expose_php = On


;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in

seconds
max_input_time = 60   ; Maximum amount of time each script may spend

parsing request data
memory_limit = 16M      ; Maximum amount of memory a script may consume

(16MB)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;error_reporting =

E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
;
;   - Show all errors, except coding standards warnings
;
error_reporting  =  E_ALL

;display_errors = Off
display_errors = On

;display_startup_errors = Off
display_startup_errors = On

log_errors = On

log_errors_max_len = 1024

ignore_repeated_errors = Off

ignore_repeated_source = Off

report_memleaks = On

;report_zend_debug = 0

; Store the last error/warning message in $php_errormsg (boolean).
track_errors = On

;html_errors = Off

;docref_root = "/phpmanual/"
;docref_ext = .html

; String to output before an error message.
;error_prepend_string = "<font color=ff0000>"

; String to output after an error message.
;error_append_string = "</font>"

; Log errors to specified file.
error_log = "c:\PHP\log\php_error.log"

; Log errors to syslog (Event Log on NT, not valid in Windows 95).
;error_log = syslog


;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
;
;arg_separator.output = "&amp;"

;arg_separator.input = ";&"

variables_order = "GPCS"

register_globals = Off

register_long_arrays = Off

register_argc_argv = Off

auto_globals_jit = On

; Maximum size of POST data that PHP will accept.
post_max_size = 8M

; Magic quotes
;

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from

exec(), etc.
magic_quotes_runtime = Off

; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off

; Automatically add files before or after any PHP document.
auto_prepend_file =
auto_append_file =

default_mimetype = "text/html"
;default_charset = "iso-8859-1"

; Always populate the $HTTP_RAW_POST_DATA variable.
;always_populate_raw_post_data = On


;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"

; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues.  The alternate is to use the
; cgi.force_redirect configuration below
doc_root =

; The directory under which PHP opens the script using /~username used

only
; if nonempty.
user_dir =

; Directory in which the loadable extensions (modules) reside.
;extension_dir = "c:\PHP\ext\"
extension_dir = "C:\PHP\ext\"

; Whether or not to enable the dl() function.  The dl() function does NOT

work
; properly in multithreaded servers, such as IIS or Zeus, and is

automatically
; disabled on them.
enable_dl = On

; cgi.force_redirect is necessary to provide security running PHP as a CGI

under
; most web servers.  Left undefined, PHP turns this on by default.  You

can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
; cgi.force_redirect = 1

; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
; every request.
; cgi.nph = 1

; cgi.redirect_status_env = ;

; fastcgi.impersonate = 1;

; Disable logging through FastCGI connection
; fastcgi.log = 0

;cgi.rfc2616_headers = 0


;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if

not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M


;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;

; Whether to allow the treatment of URLs (like http:// or ftp://) as

files.
allow_url_fopen = On

; Whether to allow include/require to open URLs (like http:// or ftp://)

as files.
allow_url_include = Off

; Define the anonymous ftp password (your email address)
;from="john@doe.com"

; Define the User-Agent string
; user_agent="PHP"

; Default timeout for socket based streams (seconds)
default_socket_timeout = 60

; auto_detect_line_endings = Off


;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;

;extension=php_mbstring.dll
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll

; MySQL extension
extension=php_mysql.dll


;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll



;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

[Date]
; Defines the default timezone used by the date functions
;date.timezone =

;date.default_latitude = 31.7667
;date.default_longitude = 35.2333

;date.sunrise_zenith = 90.583333
;date.sunset_zenith = 90.583333

[filter]
;filter.default = unsafe_raw
;filter.default_flags =

[iconv]
;iconv.input_encoding = ISO-8859-1
;iconv.internal_encoding = ISO-8859-1
;iconv.output_encoding = ISO-8859-1

[sqlite]
;sqlite.assoc_case = 0

[xmlrpc]
;xmlrpc_error_number = 0
;xmlrpc_errors = 0

[Pcre]
;pcre.recursion_limit=100000
;pcre.backtrack_limit=100000

[Syslog]
; Whether or not to define the various syslog variables (e.g. $LOG_PID,
; $LOG_CRON, etc.).  Turning it off is a good idea performance-wise.  In
; runtime, you can define these variables by calling

define_syslog_variables().
define_syslog_variables  = Off

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

;sendmail_path =

;mail.force_extra_parameters =

[SQL]
sql.safe_mode = Off

[ODBC]
;odbc.default_db    =  Not yet implemented
;odbc.default_user  =  Not yet implemented
;odbc.default_pw    =  Not yet implemented

; Allow or prevent persistent links.
odbc.allow_persistent = On

; Check that a connection is still valid before reuse.
odbc.check_persistent = On

; Maximum number of persistent links.  -1 means no limit.
odbc.max_persistent = -1

; Maximum number of links (persistent + non-persistent).  -1 means no

limit.
odbc.max_links = -1

; Handling of LONG fields.  Returns number of bytes to variables.  0 means
; passthru.
odbc.defaultlrl = 4096

odbc.defaultbinmode = 1

[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

mysql.default_port =

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 =

mysql.default_password =

; Maximum time (in seconds) for connect timeout. -1 means no limit
mysql.connect_timeout = 60

mysql.trace_mode = Off

[MySQLi]

; Maximum number of links.  -1 means no limit.
mysqli.max_links = -1

mysqli.default_port = 3306

mysqli.default_socket =

mysqli.default_host =

mysqli.default_user =

mysqli.default_pw =

; Allow or prevent reconnect
mysqli.reconnect = Off

[mSQL]
; Allow or prevent persistent links.
msql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
msql.max_persistent = -1

; Maximum number of links (persistent+non persistent).  -1 means no limit.
msql.max_links = -1

[PostgresSQL]
; Allow or prevent persistent links.
pgsql.allow_persistent = On

pgsql.auto_reset_persistent = Off

; Maximum number of persistent links.  -1 means no limit.
pgsql.max_persistent = -1

; Maximum number of links (persistent+non persistent).  -1 means no limit.
pgsql.max_links = -1

pgsql.ignore_notice = 0

pgsql.log_notice = 0

[Sybase]
; Allow or prevent persistent links.
sybase.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
sybase.max_persistent = -1

; Maximum number of links (persistent + non-persistent).  -1 means no

limit.
sybase.max_links = -1

;sybase.interface_file = "/usr/sybase/interfaces"

; Minimum error severity to display.
sybase.min_error_severity = 10

; Minimum message severity to display.
sybase.min_message_severity = 10

sybase.compatability_mode = Off

[Sybase-CT]
; Allow or prevent persistent links.
sybct.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
sybct.max_persistent = -1

; Maximum number of links (persistent + non-persistent).  -1 means no

limit.
sybct.max_links = -1

; Minimum server message severity to display.
sybct.min_server_severity = 10

; Minimum client message severity to display.
sybct.min_client_severity = 10

[bcmath]
; Number of decimal digits for all bcmath functions.
bcmath.scale = 0

[browscap]
;browscap = extra/browscap.ini

[Informix]
; Default host for ifx_connect() (doesn't apply in safe mode).
ifx.default_host =

; Default user for ifx_connect() (doesn't apply in safe mode).
ifx.default_user =

; Default password for ifx_connect() (doesn't apply in safe mode).
ifx.default_password =

; Allow or prevent persistent links.
ifx.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
ifx.max_persistent = -1

; Maximum number of links (persistent + non-persistent).  -1 means no

limit.
ifx.max_links = -1

; If on, select statements return the contents of a text blob instead of

its id.
ifx.textasvarchar = 0

; If on, select statements return the contents of a byte blob instead of

its id.
ifx.byteasvarchar = 0

; Trailing blanks are stripped from fixed-length char columns.  May help

the
; life of Informix SE users.
ifx.charasvarchar = 0

; If on, the contents of text and byte blobs are dumped to a file instead

of
; keeping them in memory.
ifx.blobinfile = 0

; NULL's are returned as empty strings, unless this is set to 1.  In that

case,
; NULL's are returned as string 'NULL'.
ifx.nullformat = 0

[Session]
; Handler used to store/retrieve data.
session.save_handler = files

;
;     session.save_path = "N;MODE;/path"
;session.save_path = "/tmp"

; Whether to use cookies.
session.use_cookies = 1

;session.cookie_secure =

; session.use_only_cookies = 1

; Name of the session (used as cookie name).
session.name = PHPSESSID

; Initialize session on request startup.
session.auto_start = 0

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

; The path for which the cookie is valid.
session.cookie_path = /

; The domain for which the cookie is valid.
session.cookie_domain =

session.cookie_httponly =

; Handler used to serialize data.  php is the standard serializer of PHP.
session.serialize_handler = php

session.gc_probability = 1
session.gc_divisor     = 1000

session.gc_maxlifetime = 1440


session.bug_compat_42 = 0
session.bug_compat_warn = 1

session.referer_check =

; How many bytes to read from the file.
session.entropy_length = 0

; Specified here to create the session id.
session.entropy_file =

;session.entropy_length = 16

;session.entropy_file = /dev/urandom

session.cache_limiter = nocache

; Document expires after n minutes.
session.cache_expire = 180

session.use_trans_sid = 0

; Select a hash function
; 0: MD5   (128 bits)
; 1: SHA-1 (160 bits)
session.hash_function = 0

session.hash_bits_per_character = 5

url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

[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

;mssql.datetimeconvert = On

; Use NT authentication when connecting to the server
mssql.secure_connection = Off

;mssql.max_procs = -1

;mssql.charset = "ISO-8859-1"

[Assertion]
; Assert(expr); active by default.
;assert.active = On

; Issue a PHP warning for each failed assertion.
;assert.warning = On

; Don't bail out by default.
;assert.bail = Off

; User-function to be called if an assertion fails.
;assert.callback = 0

;assert.quiet_eval = 0

[COM]
; path to a file containing GUIDs, IIDs or filenames of files with

TypeLibs
;com.typelib_file =
; allow Distributed-COM calls
;com.allow_dcom = true
; autoregister constants of a components typlib on com_load()
;com.autoregister_typelib = true
; register constants casesensitive
;com.autoregister_casesensitive = false
; show warnings on duplicate constant registrations
;com.autoregister_verbose = true

[mbstring]
; language for internal character representation.
;mbstring.language = Japanese

; internal/script encoding.
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)
;mbstring.internal_encoding = EUC-JP

; http input encoding.
;mbstring.http_input = auto

;mbstring.http_output = SJIS

;mbstring.encoding_translation = Off

;mbstring.detect_order = auto

;mbstring.substitute_character = none;

;mbstring.func_overload = 0

; enable strict encoding detection.
;mbstring.strict_encoding = Off

[FrontBase]
;fbsql.allow_persistent = On
;fbsql.autocommit = On
;fbsql.show_timestamp_decimals = Off
;fbsql.default_database =
;fbsql.default_database_password =
;fbsql.default_host =
;fbsql.default_password =
;fbsql.default_user = "_SYSTEM"
;fbsql.generate_warnings = Off
;fbsql.max_connections = 128
;fbsql.max_links = 128
;fbsql.max_persistent = -1
;fbsql.max_results = 128

[gd]
;gd.jpeg_ignore_warning = 0

[exif]
;exif.encode_unicode = ISO-8859-15
;exif.decode_unicode_motorola = UCS-2BE
;exif.decode_unicode_intel    = UCS-2LE
;exif.encode_jis =
;exif.decode_jis_motorola = JIS
;exif.decode_jis_intel    = JIS

[Tidy]
;tidy.default_config = /usr/local/lib/php/default.tcfg

tidy.clean_output = Off

[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400

; Local Variables:
; tab-width: 4
; End:
Logged
VGR
Mentor

Offline Offline

Posts: 682



WWW
« Reply #27 on: February 07, 2007, 12:25:17 PM »

hello,

forget about the old_password(), it was just a track to follow in an other situation.

in httpd.conf

apache2handler
      Apache Version Apache/2.2.4 (Win32) PHP/5.2.0
> nice
      Server Administrator [my friend Serge][d.00.t]higuera@ca.schneider-electric.com
> edit your post to obsfuscate your real email address, there are email harvestors astray ;-)

      Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_actions
      mod_alias mod_asis mod_auth_basic mod_authn_default mod_authn_file
      mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user
      mod_autoindex mod_cgi mod_dir mod_env mod_imagemap mod_include mod_isapi
      mod_log_config mod_mime mod_negotiation mod_setenvif mod_userdir mod_php5

mod_php5 is loaded, it's ok
mysql doesn't appear, it's apparently normal nowadays
>ok

you DO NOT have the mysql section appearing : MySql is not activated from PHP.
>KO
You should have this kind of stuff in php.ini :
extension=php_mysql.dll
>ok
+ the library placed in an appropriate place (in the extension_dir)

you have extension_dir = "C:\PHP\ext\"
> ok

it should work. If apache service/console loads with no error, it means PHP also has no problem loading. Look eventually in the %MACHINENAME%.err file in the mysql directory

then try from PHP to get the real errors

I have 99% the same config as yours and it works. Are you sure you can't connect to MySql from PHP ?
try this out :
Code:
$linkID=mysql_connect("$dbHost","$dbLogin","$dbPassword") or die ("bad connect".mysql_error());
mysql_select_db('mysql',$linkID) or die ("bad select DB ".mysql_error());
$query="select * from user;";
$result=mysql_query($query,$linkID) or die ("bad query ".mysql_error());
echo "ok";
this could fail partly because of privileges but anyway it will tell you at which step connection fails.

I checked that you indeed have in httpd.conf what you should have at this point :
display_errors = On
display_startup_errors = On
log_errors = On


so try it out and come back with more feedback, please ;-)
« Last Edit: February 07, 2007, 12:30:47 PM by VGR » Logged

techie overlord, answers all kind of questions on http://www.europeanexperts.org
VGR
Mentor

Offline Offline

Posts: 682



WWW
« Reply #28 on: February 07, 2007, 12:46:10 PM »

it's ***now*** IMHO that the OLD_PASSWORD() NPC can enter the game. ***if*** you upgraded an "old" mysql database ("system" tables) from a previous mysql version, that used "old password" (ie, shorter ones), ***then*** you may very well in fact have the "lib_mysql" interface failing to connect while you can enter the mysql console from the shell/DOS/ssh.

the reverse can be true. The "new" interface is lib_mysqli ; it supports only "new passwords" by default. lib_mysql also. Thus you may have to say in my.ini : use_old_passwords for a newer mysql installation to accept lib_mysql connections. Am I clear ? (I'm not sure to be clear to myself either ;-)

also, note that I found the latest mysql installator to make inappropriate guesses and choices when writing the default my.ini file. You should definitely have a look at the question "mysql consuming too much memory" on the front page of www.europeanexperts.org
I had to add "forgotten" options, to change values as per the lines from the "large" template file, etc
examples :

#VGR14012007 MOD from 100G to 2G
myisam_max_sort_file_size=2G

#VGR ADDed from my-large.ini
# ? skip-locking
max_allowed_packet = 1M
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 2
#EoAdd

#VGR14012007 ADDed from my-large.ini
[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
Logged

techie overlord, answers all kind of questions on http://www.europeanexperts.org
shiguera

Offline Offline

Posts: 6


« Reply #29 on: February 07, 2007, 07:28:44 PM »

thanks VGR,  I'll try/check tomorrow since I'm at home now and the machine is a t work.  I will check the error file and the code you posted to test the connection.  I didn't get it from your last post about the memory consumption (I'll read the post about it).
Logged
Pages: 1 [2] 3
« previous next »
    Jump to: