Php 5 and Mysql on Windows
Php 5 and Mysql on Windows
am 03.10.2006 20:21:29 von brian.kejser
Hi
I setup Php as follows:
1. Download the php zip file (not the installer)
2. Unzip the files to c:\Php
3. Add c:\php to the path
4. Copy php.ini-dist to php.ini
5. Add and enable the web extension php5isapi.dll
6. Add the .php extension mapping to php5isapi.dll at the the web sites
folder
7. Grant everyone read access to c:\php
8. Enable the mysql extension in php.ini
9. Set the extension_dir in php.ini to ./ext
10. Reboot
I setup Mysql as follows:
1. Download the 5.x installer
2. Run the installer
3. Run the configuration tool ater the installer
When I run the following script, the error "Fatal error: Call to
undefined function mysql_connect() in Test.php on line 3" is returned.
$conn = mysql_connect('localhost', 'root', 'password')
?>
Any help would be appreciated.
Thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
re: Php 5 and Mysql on Windows
am 03.10.2006 22:59:34 von brian.kejser
Hey
Thanks but that didn't help.
Do you have any other suggestions?
By the way, I'm using php 5.1.6 and mysql 5.0.24a.
-----Original Message-----
From: ScotDiddle@silverdarkroom.com
Sent: Tue, October 3, 2006 11:52
To: brian.kejser@protexis.com, php-db@lists.php.net
Subject: re: [PHP-DB] Php 5 and Mysql on Windows
Hi Brian...
My guess is that you want to take the period out from in front of the
/ext parm... This says look one directory higher than that of
/php... for a folder called /ext
Here is my extension_dir entry: extension_dir = "c:/WebServ/php/ext/"
Scot L. Diddle, Richmond VA, 804.231.8407
----------------------------------------
From: brian.kejser@protexis.com
Sent: Tuesday, October 03, 2006 7:22 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Php 5 and Mysql on Windows
Hi
I setup Php as follows:
1. Download the php zip file (not the installer)
2. Unzip the files to c:\Php
3. Add c:\php to the path
4. Copy php.ini-dist to php.ini
5. Add and enable the web extension php5isapi.dll
6. Add the .php extension mapping to php5isapi.dll at the the web sites
folder
7. Grant everyone read access to c:\php
8. Enable the mysql extension in php.ini
9. Set the extension_dir in php.ini to ./ext
10. Reboot
I setup Mysql as follows:
1. Download the 5.x installer
2. Run the installer
3. Run the configuration tool ater the installer
When I run the following script, the error "Fatal error: Call to
undefined function mysql_connect() in Test.php on line 3" is returned.
$conn = mysql_connect('localhost', 'root', 'password')
?>
Any help would be appreciated.
Thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Php 5 and Mysql on Windows
am 03.10.2006 23:00:39 von brian.kejser
Hey
I'm using IIS on W2K3 SP1, php 5.1.6 and mysql 5.0.24a.
-----Original Message-----
From: "Alejandro Tesone"
Sent: Tue, October 3, 2006 12:25
To: brian.kejser@protexis.com
Subject: Re: [PHP-DB] Php 5 and Mysql on Windows
Which server you will use? Apache or Microsoft?
On 10/3/06, brian.kejser@protexis.com wrote:
>
> Hi
>
> I setup Php as follows:
>
> 1. Download the php zip file (not the installer)
> 2. Unzip the files to c:\Php
> 3. Add c:\php to the path
> 4. Copy php.ini-dist to php.ini
> 5. Add and enable the web extension php5isapi.dll
> 6. Add the .php extension mapping to php5isapi.dll at the the web sites
> folder
> 7. Grant everyone read access to c:\php
> 8. Enable the mysql extension in php.ini
> 9. Set the extension_dir in php.ini to ./ext
> 10. Reboot
>
> I setup Mysql as follows:
>
> 1. Download the 5.x installer
> 2. Run the installer
> 3. Run the configuration tool ater the installer
>
> When I run the following script, the error "Fatal error: Call to
> undefined function mysql_connect() in Test.php on line 3" is returned.
>
>
>
> $conn = mysql_connect('localhost', 'root', 'password')
>
> ?>
>
> Any help would be appreciated.
>
> Thanks
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Php 5 and Mysql on Windows
am 03.10.2006 23:12:14 von Stut
brian.kejser@protexis.com wrote:
> I setup Mysql as follows:
>
> 1. Download the 5.x installer
> 2. Run the installer
> 3. Run the configuration tool ater the installer
>
> When I run the following script, the error "Fatal error: Call to
> undefined function mysql_connect() in Test.php on line 3" is returned.
>
> $conn = mysql_connect('localhost', 'root', 'password')
Installing MySQL is not enough - you need to enable the mysql extension
in your php.ini.
-Stut
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Php 5 and Mysql on Windows
am 03.10.2006 23:20:41 von brian.kejser
Hey
I did that already. Step (8) of setting up php.
Do I need to move any files around or add anything else to the path?
-----Original Message-----
From: "Stut"
Sent: Tue, October 3, 2006 14:12
To: brian.kejser@protexis.com
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Php 5 and Mysql on Windows
brian.kejser@protexis.com wrote:
> I setup Mysql as follows:
>
> 1. Download the 5.x installer
> 2. Run the installer
> 3. Run the configuration tool ater the installer
>
> When I run the following script, the error "Fatal error: Call to
> undefined function mysql_connect() in Test.php on line 3" is returned.
>
> $conn = mysql_connect('localhost', 'root', 'password')
Installing MySQL is not enough - you need to enable the mysql extension
in your php.ini.
-Stut
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Php 5 and Mysql on Windows
am 03.10.2006 23:31:55 von Stut
brian.kejser@protexis.com wrote:
> I did that already. Step (8) of setting up php.
Oops, sorry, missed that.
> Do I need to move any files around or add anything else to the path?
Long time since I've actually set up a Windows server but I seem to
remember there are some DLLs in the distribution that need to be on the
path for MySQL to function.
You may also want to check that where you've put php.ini is where PHP is
expecting it to be. A phpinfo() page will tell you that.
-Stut
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Php 5 and Mysql on Windows
am 03.10.2006 23:33:47 von Dave W
------=_Part_7902_23637351.1159911227327
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
You might want to try php.ini-recommended instead of php.ini-dist.
On 10/3/06, brian.kejser@protexis.com wrote:
>
> Hey
>
> I did that already. Step (8) of setting up php.
>
> Do I need to move any files around or add anything else to the path?
>
>
>
>
> -----Original Message-----
> From: "Stut"
> Sent: Tue, October 3, 2006 14:12
> To: brian.kejser@protexis.com
> Cc: php-db@lists.php.net
> Subject: Re: [PHP-DB] Php 5 and Mysql on Windows
>
> brian.kejser@protexis.com wrote:
> > I setup Mysql as follows:
> >
> > 1. Download the 5.x installer
> > 2. Run the installer
> > 3. Run the configuration tool ater the installer
> >
> > When I run the following script, the error "Fatal error: Call to
> > undefined function mysql_connect() in Test.php on line 3" is returned.
> >
> > $conn = mysql_connect('localhost', 'root', 'password')
>
> Installing MySQL is not enough - you need to enable the mysql extension
> in your php.ini.
>
> -Stut
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Dave W
------=_Part_7902_23637351.1159911227327--
Re: Php 5 and Mysql on Windows
am 04.10.2006 00:03:39 von Niel Archer
Hi
Make sure that the php.ini file being used is the one you thinkit is.
I keep mine in the php directory, so I have to be very careful that I
don't accidentally let one get into the Windows folder, becuase that is
search first
The manual lists the search order. It also has some notes on setting up
IIS and where to put the php5isapi.dll so it is found
Niel
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Php 5 and Mysql on Windows
am 04.10.2006 00:28:21 von brian.kejser
Hey
I tried that but I still get the error.
-----Original Message-----
From: "Dave W"
Sent: Tue, October 3, 2006 14:33
To: brian.kejser@protexis.com
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Php 5 and Mysql on Windows
You might want to try php.ini-recommended instead of php.ini-dist.
On 10/3/06, brian.kejser@protexis.com wrote:
>
> Hey
>
> I did that already. Step (8) of setting up php.
>
> Do I need to move any files around or add anything else to the path?
>
>
>
>
> -----Original Message-----
> From: "Stut"
> Sent: Tue, October 3, 2006 14:12
> To: brian.kejser@protexis.com
> Cc: php-db@lists.php.net
> Subject: Re: [PHP-DB] Php 5 and Mysql on Windows
>
> brian.kejser@protexis.com wrote:
> > I setup Mysql as follows:
> >
> > 1. Download the 5.x installer
> > 2. Run the installer
> > 3. Run the configuration tool ater the installer
> >
> > When I run the following script, the error "Fatal error: Call to
> > undefined function mysql_connect() in Test.php on line 3" is returned.
> >
> > $conn = mysql_connect('localhost', 'root', 'password')
>
> Installing MySQL is not enough - you need to enable the mysql extension
> in your php.ini.
>
> -Stut
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Dave W
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Php 5 and Mysql on Windows
am 04.10.2006 04:20:20 von frank
IIRC: When you are using ISAPI you must have php,ini in the windows
directory.
If you are using CGI you can have it in the same directory as all other
PHP files.
- Frank
> Hi
>
> Make sure that the php.ini file being used is the one you thinkit is.
>
> I keep mine in the php directory, so I have to be very careful that I
> don't accidentally let one get into the Windows folder, becuase that is
> search first
>
> The manual lists the search order. It also has some notes on setting up
> IIS and where to put the php5isapi.dll so it is found
>
> Niel
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Php 5 and Mysql on Windows
am 04.10.2006 06:31:48 von brian.kejser
Wow
That solved it. Awesome. Thanks you so much.
-----Original Message-----
From: "Frank M. Kromann"
Sent: Tue, October 3, 2006 19:20
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Php 5 and Mysql on Windows
IIRC: When you are using ISAPI you must have php,ini in the windows
directory.
If you are using CGI you can have it in the same directory as all other
PHP files.
- Frank
> Hi
>
> Make sure that the php.ini file being used is the one you thinkit is.
>
> I keep mine in the php directory, so I have to be very careful that I
> don't accidentally let one get into the Windows folder, becuase that is
> search first
>
> The manual lists the search order. It also has some notes on setting up
> IIS and where to put the php5isapi.dll so it is found
>
> Niel
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Php 5 and Mysql on Windows
am 04.10.2006 08:31:08 von Lester Caine
brian.kejser@protexis.com wrote:
> That solved it. Awesome. Thanks you so much.
Brian - A 'phpinfo()' test page is almost essential. When you make
changes to the php.ini file you can check they have taken ;)
--
Lester Caine - G8HFL
-----------------------------
L.S.Caine Electronic Services - http://home.lsces.co.uk
Model Engineers Digital Workshop -
http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php