[PHP-WIN] Re: PHP mkdir with IIS and network share

2003-11-20 Thread David Strencsev
I'm not sure if you need the mode octal in the mkdir funcion in windows.
Anyway I hope you read a comment in the php's online mkdir function manual:

 mkdir will create directories with undesired/unexpected owner/group
settings in certain circumstandes when SAFE_MODE is on. See the bug report:
http://bugs.php.net/bug.php?id=24604

You might notice that when you create a new directory using this code:

mkdir($dir, 0777);

The created folder actually has permissions of 0755, instead of the
specified
0777. Why is this you ask? Because of umask(): http://www.php.net/umask

The default value of umask, at least on my setup, is 18. Which is 22 octal,
or
0022. This means that when you use mkdir() to CHMOD the created folder to
0777,
PHP takes 0777 and substracts the current value of umask, in our case 0022,
so
the result is 0755 - which is not what you wanted, probably.

The "fix" for this is simple, include this line:

$old_umask = umask(0);

Right before creating a folder with mkdir() to have the actual value you put
be
used as the CHMOD. If you would like to return umask to its original value
when
you're done, use this:

umask($old_umask);

"Dang Nguyen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi All,
>
> I have a php script that was carried over from an Apache/Solaris
environment
> into a Windows 2000/IIS/PHP 4.3.4 environment.  Now I need to tweak the
> script a little to deal with the filesystem differences.  The script, as
> originally designed and written, can read files from the filesystem,
create
> directories, write files back to the filesystem, etc.  After moving to the
> Windows environment, the script is now required to access files on a
network
> share and create files and directories over the network share.  I've
figured
> out how to configure IIS so that PHP scripts will be able to read, using
> opendir(),readdir(), etc., from the network share.  However, after the
> reconfiguration of IIS, my scripts still cannot create directories over
the
> network share.  No errors are getting written to my error log file either.
>
> I have reconfigured IIS to use an account that has read and write
> permissions on the network share when "anonymous" access is used, which is
> how the scripts can now read and list files on the network share.   Does
> anyone have any other suggestions for me to check or do so that the
scripts
> can also create files and directories on the network share?
>
> code snippet:
> $directory = 'seint16\\nt_share\\';
> mkdir($directory,0755);
>
>
> Thanks,
> Dang Nguyen

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



[PHP-WIN] Re: PHP 5 and MySQL..Anyone have a Clue???

2004-04-27 Thread David Strencsev
I've downloaded the PHP5 RC2 an there are the libraries,
you only have to enable this extension in php.ini, copy libmysql.dll to your
%windir%\system32
and set the read & execute prermissions for the "Internet Guest Account" to
both libmysql.dll and php_mysql.dll (in your extensions directory)

"Pnllan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I like most of the new fucntionality (especially the Zend 2.0 Engine) in
> PHP5, but MySQL functionality is not built into PHP as it has been on
> previous versions.
>
> So what do I get the MySQL Client Library?
> What do I do then?
>
> There are a lot of people out there who use PHP/MySQL for many things, and
> now it looks like it is going to be a Major hurdle to continue.  Has
> Microsoft bought into PHP 5.0 and chosen this path to make it such a pain
> that we will go out and buy MS SQL and use IIS?

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



[PHP-WIN] PHP5 ISAPI DLL not working with IIS5????

2004-04-27 Thread David Strencsev
Why!!??

I've PHP5-RC2 installed and IIS5 (Win XP Pro SP1).
I had PHP4.3.1 ISAPI installed before and worked fine with IIS.

But now, PHP5's ISAPI module is NOT working. I've configured IIS the same
way as with PHP4, but using the php5isapi.dll instead of php4isapi.dll.
I've got an error when trying to load ANY php document with my browsers,
mozilla says "document contains no data" and internet explorer throws its
DNS Error default page.
I've tested CGI and PHP5 worked fine... but I want ISAPI.

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