php-windows Digest 22 Jul 2004 02:22:44 -0000 Issue 2328

Topics (messages 24231 through 24237):

Directory functions and php 5
        24231 by: Andres Vergara

Re: Handling Linux directory paths in Win32
        24232 by: Jason Barnett
        24234 by: Paul Menard

Re:
        24233 by: Ssb

Re: php5 and phpMyAdmin
        24235 by: Adrian Cooper

Re: php 4&5
        24236 by: Oliver John V. Tibi
        24237 by: Oliver John V. Tibi

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 ---
Hello,

I just installed php 5 on Windows 2003 IIS 6.0. PHP seems to be
working fine, however none of the directory functions seems to be
working (I tried amongst others is_dir() and opendir()), they do not
return anything, is like they just don't do anything (no errors
either). Has anybody had this problem?

Thanks.

Andres.

--- End Message ---
--- Begin Message ---
I've run into this exact problem many times.  Two things:

1) use the PEAR constant DIRECTORY_SEPERATOR, or define it yourself
if (PHP_OS == 'Win32' || PHP_OS == 'WinNT') {
  define('DIRECTORY_SEPERATOR', '\');
} else {
  define('DIRECTORY_SEPERATOR', '/');
}

2) I have two ways that I solve the relative include problem.
  a) include_once dirname(__FILE__) . 'path/to/relative/include.php';

  or for class libraries

  b) function __autoload($class) {
       // Use your own logic, I have mine defined to do PEAR-like loading
       $file = str_replace('_', DIRECTORY_SEPERATOR, $class);
       include_once($file . '.php');
     }


As that would mean the macro code would not slow the linux machine down at all when running the php script if it did not even have to evaluate to see if it did need to run the macro function, although I know php is a scripted language and not compiled like C/C++ so I don't think its possible

Note: PHP goes through the compile step, it's just that everything is compiled on demand.

--- End Message ---
--- Begin Message ---
Just a comment or thought on Jason's reply. I thought you could use '/' as the 
seperator and the
PHP engine would figure out based on the run-time OS what the actual path format would 
be. Hence
you can use actual path names like;

E:/path1/path2/path3/somefile.php

in your include and require statements.

At least my code uses the '/' on these types of paths and works fine on Windows and 
*nix systems.
IIS and Apache both.

FPM

--- Jason Barnett <[EMAIL PROTECTED]> wrote:
> I've run into this exact problem many times.  Two things:
> 
> 1) use the PEAR constant DIRECTORY_SEPERATOR, or define it yourself
> if (PHP_OS == 'Win32' || PHP_OS == 'WinNT') {
>    define('DIRECTORY_SEPERATOR', '\');
> } else {
>    define('DIRECTORY_SEPERATOR', '/');
> }
> 
> 2) I have two ways that I solve the relative include problem.
>    a) include_once dirname(__FILE__) . 'path/to/relative/include.php';
> 
>    or for class libraries
> 
>    b) function __autoload($class) {
>         // Use your own logic, I have mine defined to do PEAR-like loading
>         $file = str_replace('_', DIRECTORY_SEPERATOR, $class);
>         include_once($file . '.php');
>       }
> 
> > 
> > As that would mean the macro code would not slow the linux
> > machine down at all when running the php script if it did
> > not even have to evaluate to see if it did need to run the
> > macro function, although I know php is a scripted language
> > and not compiled like C/C++ so I don't think its possible
> 
> Note: PHP goes through the compile step, it's just that everything is compiled 
> on demand.
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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

<<attachment: gjvprtdjgh.bmp>>


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

> My apologies, I quit using phpmyadmin before php5.0.0 came out

 Is there anything better than phpmyadmin out there that works with Windows?

 Thanks!

 Regards,

 Adrian.
>

--- End Message ---
--- Begin Message ---
*Chuckles!*

And I thought we were on php.windows. :)

-- 

Running 'ojtibi' on '127.0.0.1' (BATCH_OPTIMISTIC mode).
"Live free() or die()."

"Jason Barnett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Honestly, it's rude to directly email people trying to help you.  You
should
> always send your responses to the list for a couple of reasons:
>
> 1) I don't always have the answer (though I like to pretend I do)
> 2) Other people are very smart (see 1)
> 3) I am not your technical support person - I am a *volunteer*.  If you
want to
> pay me to do that then I'll be more than happy to answer your every email.
> 4) When we solve a problem in the lists everyone gets to see the
resolution of
> the problem.  If someone else has the same problem they can read our
discussion
> and perhaps solve their problem on their own - which is better for
everyone.
>
> If someone else is willing to help, he is using an Apache server.

--- End Message ---
--- Begin Message ---
*Chuckles!*

And I thought we were on php.windows. :)

-- 

Running 'ojtibi' on '127.0.0.1' (BATCH_OPTIMISTIC mode).
"Live free() or die()."

"Jason Barnett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Honestly, it's rude to directly email people trying to help you.  You
should
> always send your responses to the list for a couple of reasons:
>
> 1) I don't always have the answer (though I like to pretend I do)
> 2) Other people are very smart (see 1)
> 3) I am not your technical support person - I am a *volunteer*.  If you
want to
> pay me to do that then I'll be more than happy to answer your every email.
> 4) When we solve a problem in the lists everyone gets to see the
resolution of
> the problem.  If someone else has the same problem they can read our
discussion
> and perhaps solve their problem on their own - which is better for
everyone.
>
> If someone else is willing to help, he is using an Apache server.

--- End Message ---

Reply via email to