php-windows Digest 16 Apr 2005 02:44:43 -0000 Issue 2634
Topics (messages 25843 through 25856):
PHP5 and MySQL
25843 by: JC Botha
25844 by: Kevin Smith
25845 by: JC Botha
25846 by: Wagner, Aaron
25847 by: JC Botha
25848 by: Wagner, Aaron
25849 by: JC Botha
25850 by: Wagner, Aaron
25851 by: JC Botha
25852 by: Ordal, Peter
25853 by: Wagner, Aaron
25854 by: Janet Valade
25855 by: JC Botha
25856 by: graeme
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
> >
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: JC Botha [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 3:01 PM
> Cc: [email protected]
> 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
--- End Message ---
--- Begin Message ---
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: [email protected]
> > 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
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: JC Botha [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 3:13 PM
> Cc: [email protected]
> 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: [email protected]
> > > 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
--- End Message ---
--- Begin Message ---
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: [email protected]
> > 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: [email protected]
> > > > 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
>
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: JC Botha [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 3:49 PM
> Cc: [email protected]
> 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: [email protected]
> > > 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: [email protected]
> > > > > 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.installation.addto
path
http://us4.php.net/manual/en/ref.mysql.php
aaron
--- End Message ---
--- Begin Message ---
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: [email protected]
> > 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: [email protected]
> > > > 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: [email protected]
> > > > > > 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.installation.addto
> path
>
> http://us4.php.net/manual/en/ref.mysql.php
>
> aaron
>
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Wagner, Aaron [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 4:05 PM
> To: JC Botha
> Cc: [email protected]
> Subject: RE: [PHP-WIN] PHP5 and MySQL
>
>
> 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
>
Yeah, if you are doing this on windows, don't forget to restart the entire
system (nothing short of that will do the trick).
See my bug report at http://bugs.php.net/bug.php?id=32625
Cheers,
Peter
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: JC Botha [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 4:15 PM
> Cc: [email protected]
> 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: [email protected]
> > > 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: [email protected]
> > > > > 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: [email protected]
> > > > > > > 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
--- End Message ---
--- Begin Message ---
JC Botha wrote:
This is the Browser error:
Fatal error: Call to undefined function mysql_connect() in
C:\apache\htdocs\cedarintranet\index.php on line 3
This error means that MySQL support is not enabled in your PHP. In PHP
4, this was done automatically. Now you need to enable it yourself when
you install. You can tell whether it's enabled by running a phpinfo()
statement in your PHP script. This statement outputs a long list of PHP
settings. Somewhere in that list, it provides a block of MySQL settings
for installations that have MySQL support enabled. If your output
doesn't show the MySQL settings, then MySQL support is not enabled.
To enable it on a Windows machine, in your php.ini file, uncomment the
"extension" line for mysql. You may need to restart Apache after you
edit the php.ini file. Be sure you are making changes in the php.ini
file that PHP is using. The output, mentioned above, from phpinfo()
shows the path to the php.ini file that PHP is using.
Janet
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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Janet Valade -- janet.valade.com
--- End Message ---
--- Begin Message ---
Ok, I did the phpinfo() and only the SQLlite is listed there, no MySQL
is listed. I did enable the php_mysql.dll and set the windows path to
c:\php. What else it there that I can look at. Thanks for all the
links sent to me, I read them all and try to follow the instructions
but some how I dont do someting tight on my XP computer.
If somebody is willing to review my php.ini file let me know and I
will email it to you.
Thanks
On 4/15/05, Janet Valade <[EMAIL PROTECTED]> wrote:
> JC Botha wrote:
>
> > This is the Browser error:
> > Fatal error: Call to undefined function mysql_connect() in
> > C:\apache\htdocs\cedarintranet\index.php on line 3
>
> This error means that MySQL support is not enabled in your PHP. In PHP
> 4, this was done automatically. Now you need to enable it yourself when
> you install. You can tell whether it's enabled by running a phpinfo()
> statement in your PHP script. This statement outputs a long list of PHP
> settings. Somewhere in that list, it provides a block of MySQL settings
> for installations that have MySQL support enabled. If your output
> doesn't show the MySQL settings, then MySQL support is not enabled.
>
> To enable it on a Windows machine, in your php.ini file, uncomment the
> "extension" line for mysql. You may need to restart Apache after you
> edit the php.ini file. Be sure you are making changes in the php.ini
> file that PHP is using. The output, mentioned above, from phpinfo()
> shows the path to the php.ini file that PHP is using.
>
> Janet
>
> >
> > 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
> >>>
> >>>
> >>>
> >>
> >>--
> >>PHP Windows Mailing List (http://www.php.net/)
> >>To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> >
>
> --
> Janet Valade -- janet.valade.com
>
>
--- End Message ---
--- Begin Message ---
I don't use MySQL however, on my XP machine...
The php.ini file is in the Windows directory. Open that file scroll down
to a list of Windows extensions, you should find something as follows:
;extension=php_msql.dll
;extension=php_mysql.dll
;extension=php_oci8.dll
Remove the semi-colon before the line that includes mysql, as follows:
;extension=php_msql.dll
extension=php_mysql.dll
;extension=php_oci8.dll
Save the file. Now go to the PHP folder and look inside the ext folder,
in there you should find the php_mysql.dll file. This means that your
path should be C:/PHP/ext (assuming that PHP is in the default location
viz C:/). Now look for the switch in the PHP.ini file called
extension_dir, change this to match the path just found, so I currently
have:
extension_dir = "C:\PHP\ext"
Now restart Apache. This will reload your php.ini file and ... low and
behold you will get an error... Can't find the dll libmysql.dll. This is
in the PHP folder, take a copy and place it in the C:/Windows/system32
folder and restart Apache. This time everything should run smothly check
by loading a page with phpinfo().
I followed these steps on my machine and I now have phpinfo() displayed.
hope this helps.
graeme.
JC Botha wrote:
Ok, I did the phpinfo() and only the SQLlite is listed there, no MySQL
is listed. I did enable the php_mysql.dll and set the windows path to
c:\php. What else it there that I can look at. Thanks for all the
links sent to me, I read them all and try to follow the instructions
but some how I dont do someting tight on my XP computer.
If somebody is willing to review my php.ini file let me know and I
will email it to you.
Thanks
On 4/15/05, Janet Valade <[EMAIL PROTECTED]> wrote:
JC Botha wrote:
This is the Browser error:
Fatal error: Call to undefined function mysql_connect() in
C:\apache\htdocs\cedarintranet\index.php on line 3
This error means that MySQL support is not enabled in your PHP. In PHP
4, this was done automatically. Now you need to enable it yourself when
you install. You can tell whether it's enabled by running a phpinfo()
statement in your PHP script. This statement outputs a long list of PHP
settings. Somewhere in that list, it provides a block of MySQL settings
for installations that have MySQL support enabled. If your output
doesn't show the MySQL settings, then MySQL support is not enabled.
To enable it on a Windows machine, in your php.ini file, uncomment the
"extension" line for mysql. You may need to restart Apache after you
edit the php.ini file. Be sure you are making changes in the php.ini
file that PHP is using. The output, mentioned above, from phpinfo()
shows the path to the php.ini file that PHP is using.
Janet
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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Janet Valade -- janet.valade.com
--
Experience is a good teacher, but she sends in terrific bills.
Minna Antrim
--- End Message ---