> -----Original Message-----
> From: JC Botha [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 15, 2005 4:15 PM
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] PHP5 and MySQL
> 
> Ok, here is some of the php.ini I would appreciate some help:
> 
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;
> ; Paths and Directories ;
> ;;;;;;;;;;;;;;;;;;;;;;;;;
> 
> ; UNIX: "/path1:/path2"
> ;include_path = ".:/php/includes"
> ;
> ; Windows: "\path1;\path2"
> include_path = "c:\php"
> 
> ; 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 = c:\apache\htdocs
> 
> ; 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\"
> 
> ; 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
> 
> ; if cgi.force_redirect is turned on, and you are not running under
> Apache or Netscape
> ; (iPlanet) web servers, you MAY need to set an environment variable
> name that PHP
> ; will look for to know it is OK to continue execution.  Setting this
> variable MAY
> ; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
> ; cgi.redirect_status_env = ;
> 
> ; FastCGI under IIS (on WINNT based OS) supports the ability 
> to impersonate
> ; security tokens of the calling client.  This allows IIS to 
> define the
> ; security context that the request runs under.  mod_fastcgi 
> under Apache
> ; does not currently support this feature (03/17/2002)
> ; Set to 1 if running under IIS.  Default is zero.
> ; fastcgi.impersonate = 1;
> 
> ; cgi.rfc2616_headers configuration option tells PHP what 
> type of headers to
> ; use when sending HTTP response code. If it's set 0 PHP sends Status:
> header that
> ; is supported by Apache. When this option is set to 1 PHP will send
> ; RFC2616 compliant header.
> ; Default is zero.
> ;cgi.rfc2616_headers = 0
> 
> On 4/15/05, Wagner, Aaron <[EMAIL PROTECTED]> wrote:
> > 
> > 
> > > -----Original Message-----
> > > From: JC Botha [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, April 15, 2005 3:49 PM
> > > Cc: php-windows@lists.php.net
> > > Subject: Re: [PHP-WIN] PHP5 and MySQL
> > >
> > > the "Path enviroment" is that the following in the php.ini =
> > > include_path = "c:\php"
> > >
> > > But if the above is correct then it is not working either.
> > > this is the error that I get: Fatal error: Call to 
> undefined function
> > > mysql_connect() in 
> C:\apache\htdocs\cedarintranet\index.php on line 3
> > >
> > >
> > >
> > > On 4/15/05, Wagner, Aaron <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: JC Botha [mailto:[EMAIL PROTECTED]
> > > > > Sent: Friday, April 15, 2005 3:13 PM
> > > > > Cc: php-windows@lists.php.net
> > > > > Subject: Re: [PHP-WIN] PHP5 and MySQL
> > > > >
> > > > > I did read that the direct support for MySQL was removed.
> > > PHP5 is no
> > > > > longer as supportive as PHP4 So I'm considering going
> > > back to PHP4 if
> > > > > none can help me.
> > > > >
> > > > > On 4/15/05, Wagner, Aaron 
> <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: JC Botha [mailto:[EMAIL PROTECTED]
> > > > > > > Sent: Friday, April 15, 2005 3:01 PM
> > > > > > > Cc: php-windows@lists.php.net
> > > > > > > Subject: Re: [PHP-WIN] PHP5 and MySQL
> > > > > > >
> > > > > > > This is the Browser error:
> > > > > > > Fatal error: Call to undefined function mysql_connect() in
> > > > > > > C:\apache\htdocs\cedarintranet\index.php on line 3
> > > > > > >
> > > > > > > This is my php code:
> > > > > > > // Connect to the database server
> > > > > > >       $dbcnx = mysql_connect("localhost", 
> "intranet", "1234");
> > > > > > >       if (!$dbcnx) {
> > > > > > >               echo( "<P>Unable to connect to the " .
> > > > > > >                  "database server at this time. 
> Please make
> > > > > > > use of the contact page.</P>" );
> > > > > > >               exit();
> > > > > > >       }
> > > > > > >
> > > > > > >       // Select the database
> > > > > > >       if ([EMAIL PROTECTED]("cedarintranet") ) {
> > > > > > >               echo( "<P>Unable to connect to the " .
> > > > > > >                       "database server at this 
> time. Please
> > > > > > > contact webmaster at
> > > > > > > [EMAIL PROTECTED]</P>" );
> > > > > > >               exit();
> > > > > > >       }
> > > > > > >
> > > > > > >
> > > > > > > On 4/15/05, Kevin Smith <[EMAIL PROTECTED]> wrote:
> > > > > > > > Perhaps posting you code will help us resolve 
> your problem.
> > > > > > > >
> > > > > > > > JC Botha wrote:
> > > > > > > >
> > > > > > > > >Dear Users
> > > > > > > > >
> > > > > > > > >I'm havin a problem to connect to MySQL through the
> > > > > use of PHP5. I
> > > > > > > > >followed all documentation and none seem to resolve the
> > > > > > > problem. I'm
> > > > > > > > >running WinXP on the computer that I use to develop
> > > > > the apps. Any
> > > > > > > > >advice out there that could be of help.
> > > > > > > > >
> > > > > > > > >Thanks
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > >
> > > > > > From Looking at the error.....it appears that mssql is
> > > not either
> > > > > > compiled in or tne module is not installed.
> > > > > >
> > > > > > Although, I thought that support for mysql was included
> > > in PHP since
> > > > > > ver4.
> > > > > >
> > > > > > aaron
> > > > > >
> > > >
> > > > Check this.  It appears that he has the same issue as you.
> > > >
> > > > http://www.codecomments.com/archive229-2005-1-374037.html
> > > >
> > > > aaron
> > > >
> > >
> > The windowz path needs to be set to c:\php
> > 
> > Check these out also
> > 
> http://us4.php.net/manual/en/faq.installation.php#faq.installa
> tion.addto
> > path
> > 
> > http://us4.php.net/manual/en/ref.mysql.php
> > 
> > aaron
> >
> 

------------------------------------------------------------------
Add c:\php to your PATH environment variable.

php_mysql.dll requires libmysql.dll, which in PHP5 is bundled in the php
directory, assuming you have installed from the .zip download of PHP.
Unless
it's visible through a directory in the PATH environment variable, it'll
fail
with the error message you stated - because php_mysql.dll will try and
fail to
load the library when PHP tries to load php_mysql.dll.

The other less recommended alternative is to put libmysql.dll in the
system32
directory, but you're better off not messing with the system
directories; it's
likely to sting you later.
-------------------------------------------------------------------

This has nothing to do with the php.ini

You need to add c:\php to the windows environmental path.

-----php_mysql.dll requires libmysql.dll-----

Php_mysql.dll is looking for the libmysql.dll file which is in the
c:\php directory by default.  
Search your drive for "libmysql.dll" and either change your windows path
or add that file to your c:\windows\systems32 directory.

Aaron

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to