php-windows Digest 10 Jul 2007 15:46:30 -0000 Issue 3279

Topics (messages 28192 through 28198):

Re: system() call in PHP5 on win2003
        28192 by: Niel Archer

Re: [PHP] system() call in PHP5 on win2003
        28193 by: Tijnema

Re: Windows 2k3 sp2 and mssql error
        28194 by: Zleviticus
        28195 by: Niel Archer
        28198 by: Zleviticus

Version php for windows compiled with --enable-memory-limit
        28196 by: carlos Alberto RR
        28197 by: Niel Archer

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 ---
Hi

Sounds like a permission problem.  You don't mention which HTTP server
you're using, but I know with Apache (and likely so with IIS also) PHP
can't run with 'Everyone' permissions as that is not the same as 'Anyone
at all'.  If memory serves, Everyone is authenticated users + anonymous
users + guests.  And services like Apache/IIS don't run as any kind of
person (user), unless specifically told to do so.
--
Niel Archer

--- End Message ---
--- Begin Message ---
On 7/10/07, Xiaogang <[EMAIL PROTECTED]> wrote:
We used to use php 4 on our web server on win2000, and use the system()
to call some DOS programs. That how we call it:

    $cmd = "c:\\Inetpub\\wwwroot\\test.exe";
        $last_line = system($cmd, $retval);
        print ("<br>\nretval =\"". $retval. "\"<br>\n");

It was working perfectly for years.

However, recently we moved to a win2003 server, and install the php
5.2.3, and now the system() no longer works as expected:

   1. It no longer work in the web, the only result returned
      to the web browser is "retval =-1";

   2. It still works if tested in DOS commandline (use the
      command such as "php test.php");

   3. Even change the $cmd to "type test.txt" or "dir", the
      result is the same: works in DOS prompt window, but
      not web browser (received only "retval =-1").

I have checked the permissions on all those files/folders, even tried
giving read/execute permission to "everyone", still no help.

In our configuation, the safe mode is off.

Any clue? Thanks in advance.

Xiaogang


Are you sure PHP does actually read the config file?
Check if safe_mode is really off using phpinfo(); like this:
<?php
phpinfo();
?>

Tijnema
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

--- End Message ---
--- Begin Message ---
 Ok Let me detail the setup more.

A. windows 2k3 server sp2 with php 5.1
Contains the script running via IIS 6 

B. windows 2k3 server sp2 with mssql 2000 sp4?

C. My windows xp machine

When I run the script from server A using any username and password
including sa account from A it fails. If I run the script from my editing
software on my local machine it runs fine. If I run another script that
connects up to B using the same settings, not through IIS. (Using php from
command line) it works fine. 


-----Original Message-----
From: bedul [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 09, 2007 9:19 PM
To: Zleviticus; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Windows 2k3 sp2 and mssql error

sry if i mistaken

----- Original Message -----
From: "Zleviticus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2007 10:11 PM
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 think i will called the first as A and the second as B

------------------------------------------------------------
>
> 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
where do you execute this script?? on A or B?
i notice 192.168.1.9 was B right??
--------------------------------------------------
> I can connect to the sql server via the php script if i
run it from my
> client in my editing software.
there were another ?? well are this on A or the new one.

i think the problem are on the permision in B.
you should create an user (example)

user: Bedul
Host: %
password: bedul

then when u want to connect this.. try using user Bedul

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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
hello Everybody,

I need download one version of  php5 for  windows compiled the option
with --enable-memory-limit, somebody knows where I can dowload it. I
hope you can help me.


thanks for you help.

--- End Message ---
--- Begin Message ---
Hi

According to the documentation for PHP 5.2.1 (http://uk.php.net/ini.core)
you no longer need to have this enabled at compile time to use the
memory_limit directive
--
Niel Archer

--- End Message ---

Reply via email to