php-windows Digest 11 Jul 2007 15:34:00 -0000 Issue 3280
Topics (messages 28199 through 28201):
Re: Windows 2k3 sp2 and mssql error
28199 by: Zleviticus
28200 by: Zleviticus
Mysql_send.php
28201 by: Jacob Bergman
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 ---
To add a php script will run from the IIS machine via command prompt. Both
the command prompt one and the IIS one use the mssql connect function.
As stated in a previous post:
It fails with :
i am using a php script via a web page to access data on the server and
display it. when i run the page i get the standard:
Warning: mssql_connect() [ <http://solomon/Flash/function.mssql-connect>
function.mssql-connect]: Unable to connect to server: 192.168.1.9
-----Original Message-----
From: Niel Archer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 10, 2007 9:00 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Windows 2k3 sp2 and mssql error
Hi
I know very little about IIS, but I do know that "it fails" doesn't tell us
much of anything. We need details. What are the actual errors reported.
Have you tried running it from A without using IIS under the same conditions
as "another script that connects up to B using the same settings, not
through IIS" If, as it seems you mean, that was via the command line then
the settings were likely subtly different (user would probably be
different). At a guess, I'd say your problem is either
configuration/installation of the module, or user based.
--
Niel Archer
--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Iswsue resolved. The issue was related to a security update to ISS. It
stopped allowing a local anonymous account from accessing the mssql server.
I created a new user account on the Domain, gave it little permissions in
the domain (same as atypical user) and then it worked. I would not
recommend this workaround for a production internet server but it does work
in my environment where there is not any access from outside the firewalla
nd there are not any more permissions than a standard user has anyways.
Thanks for the suggestions.
Z
-----Original Message-----
From: Zleviticus [mailto:[EMAIL PROTECTED]
Sent: Monday, July 09, 2007 11:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Windows 2k3 sp2 and mssql error
I am perplexed with an issue that i need help on. I have searched and can
not find a resolution and can not find out what is going on.
Here is the situation:
I have a windows 2003 Server running IIS 6, php 5.2.1 I have another windows
2003 server running mssql 2000 with all the latest service packs.
i am using a php script via a web page to access data on the server and
display it. when i run the page i get the standard:
Warning: mssql_connect() [ <http://solomon/Flash/function.mssql-connect>
function.mssql-connect]: Unable to connect to server: 192.168.1.9
I can connect to the sql server via the php script if i run it from my
client in my editing software.
What can i do at thins point to troubleshoot and get it to work. It was
working prior to an installation of sp2 for win2k3
uninstalling sp2 is not an option.
--- End Message ---
--- Begin Message ---
When I try to run the mysql_send.php function from your website... from
the 3rd edition of the php and mysql for dummies, I get these errors:
************************************************************************
**
Warning: mysqli_connect() [function.mysqli-connect]: (00000/1130): Host
'PHP-AND-MYSQL.VMware.psd267.wednet.edu' is not allowed to connect to
this MySQL server in C:\xampp\htdocs\mysql_send.php on line 21
Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given
in C:\xampp\htdocs\mysql_send.php on line 22
Database Selected:
Query:
Results
------------------------------------------------------------------------
--------
Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given
in C:\xampp\htdocs\mysql_send.php on line 28
Error:
------------------------------------------------------------------------
--------
************************************************************************
****
The screen with the database name and and query comes up ok, but I get
what is displayed above as soon as I hit the submit query button.
Thanks for the help.
Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
[EMAIL PROTECTED]
-----Original Message-----
From: Janet Valade [mailto:[EMAIL PROTECTED]
Sent: Monday, July 09, 2007 10:53 AM
To: Jacob Bergman
Subject: Re: [PHP-WIN] Testing MySQL PHP connection
Here you go. Hope the editing marks aren't too confusing. The lines
through things don't mean they are crossed out. It means they are in a
different type face.
Janet
Jacob Bergman wrote:
> That would be great, thanks!
>
> Jacob Bergman
> Network Technician
> Pullman School District #267
> (509) 432-4012
> [EMAIL PROTECTED]
>
> -----Original Message-----
> From: Janet Valade [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 09, 2007 10:04 AM
> To: Jacob Bergman
> Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>
> I have installed a document with complete, up-to-date instructions for
> installing PHP on my web site at janet.valade.com. This might be
helpful
>
> for you.
>
> Also, I have instructions that I have just written for installing from
> XAMPP on Windows. They are for the book I am writing now. I could send
> the XAMPP instructions to you if you would like.
>
> Janet
>
>
> Jacob Bergman wrote:
>
>
>>Thanks for all the help guys... but I think I am going to blow away
>
> what
>
>>I have so far and install wamp5. I want to be able to get on with
>
> your
>
>>book Janet :) Thanks for the help though. I'm sure I will have plenty
>>more questions.
>>
>>Jacob Bergman
>>Network Technician
>>Pullman School District #267
>>(509) 432-4012
>>[EMAIL PROTECTED]
>>
>>-----Original Message-----
>>From: Janet Valade [mailto:[EMAIL PROTECTED]
>>Sent: Monday, July 09, 2007 9:17 AM
>>To: Jacob Bergman
>>Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>>
>>There error message means that the mysqli functions are not enabled.
>>This means one of two things: (1) you did not activate the mysqli
>>functions in php.ini by commenting the mysqli line. After editing
>>php.ini, you need to restart your web server. Also, be sure you are
>>editing the correct php.ini, as shown in the output of phpinfo().
>>
>>(2) PHP cannot the find one or both of the files: php_mysqli.dll
>>andlibmysqli.dll. The files must be located where PHP can find them.
>
> The
>
>>simplest way is to locate them in a folder that is in your system
>
> path.
>
>>If you added c:\php to your system path, copy them there. Or you can
>>copy them to your windows\system32 folder.
>>
>>Janet
>>
>>
>>Jacob Bergman wrote:
>>
>>
>>
>>>While trying to connect to the mysqll database with php, I use the
>>>following file:
>>>
>>>
>>>
>>><?php
>>>
>>>/* Program: mysql_up.php
>>>
>>>* Desc: Connects to MySQL Server and
>>>
>>>* outputs settings.
>>>
>>>*/
>>>
>>>echo "<html>
>>>
>>> <head><title>Test MySQL</title></head>
>>>
>>> <body>";
>>>
>>>$host="PHP-AND-MYSQL";
>>>
>>>$user="root";
>>>
>>>$password="Britt9906";
>>>
>>>
>>>
>>>$cxn = mysqli_connect($host,$user,$password);
>>>
>>>$sql="SHOW STATUS";
>>>
>>>$result = mysqli_query($cxn,$sql);
>>>
>>>if($result == false)
>>>
>>>{
>>>
>>> echo "<h4>Error: ".mysqli_error($cxn)."</h4>";
>>>
>>>}
>>>
>>>else
>>>
>>>{
>>>
>>> /* Table that displays the results */
>>>
>>> echo "<table border='1'>
>>>
>>> <tr><th>Variable_name</th>
>>>
>>> <th>Value</th></tr>";
>>>
>>> for($i = 0; $i < mysqli_num_rows($result); $i++)
>>>
>>> {
>>>
>>> echo "<tr>";
>>>
>>> $row_array = mysqli_fetch_row($result);
>>>
>>> for($j = 0;$j < mysqli_num_fields($result);$j++)
>>>
>>> {
>>>
>>> echo "<td>".$row_array[$j]."</td>\n";
>>>
>>> }
>>>
>>> }
>>>
>>> echo "</table>";
>>>
>>>}
>>>
>>>?>
>>>
>>></body></html>
>>>
>>>
>>>
>>>When I access this file I I get "Fatal error: Call to undefined
>>
>>function
>>
>>
>>>mysqli_connect() in C:\Program Files\Apache
>>>Group\Apache2\htdocs\mysql_up.php on line 13"
>>>
>>>
>>>
>>>Not sure what is wrong... I'm pretty new to all this and grabbed
this
>>>out of a book. Thanks for the help!
>>>
>>>
>>>
>>>Jacob Bergman
>>>
>>>Network Technician
>>>
>>>Pullman School District #267
>>>
>>>(509) 432-4012
>>>
>>>[EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
--
Janet Valade -- janet.valade.com
--- End Message ---