Mac Os 10 +

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tristan@med.usyd.edu.au

    Mac Os 10 +

    Recently ive been migrating a PHP4 application build on a fedora Linux,
    to a MacOs10+ with PHP5.

    The most significant problem i have been experiencing is file based
    functions specifically functions handleing directories.

    For example both is_executable() , openDir() are returning false when
    the directories are setup and premissions are correct. I can access
    files in a directory but not execute functions on a directoy itself.

    For instance file_get_conten ts("/images/1.jpg") will work fine. However
    openDir("/images/") will fail.

    Has anyone else experienced the same sort of problem, if so did you
    find a fix or workaround?

    - Tristan

  • NC

    #2
    Re: Mac Os 10 +

    tristan@med.usy d.edu.au wrote:[color=blue]
    >
    > Recently ive been migrating a PHP4 application build on a fedora
    > Linux, to a MacOs10+ with PHP5.[/color]

    First of all, it pays to remember that MacOS X, when it comes to the
    inner workings of the file system, is nothing but a BSD Unix. The "X"
    conveniently has two meanings; it's the 10th major release of MacOS,
    which also happens to be an X-Window GUI...
    [color=blue]
    > For example both is_executable() , openDir() are returning false when
    > the directories are setup and premissions are correct. I can access
    > files in a directory but not execute functions on a directoy itself.[/color]

    In Unix (and, hence, in MacOS X), opening a directory and reading its
    contents are operations that require execute privileges. Reading a
    file is an operation that requires read privileges. If PHP does not
    have execute privileges, this is exactly what you should expect to
    happen.
    [color=blue]
    > For instance file_get_conten ts("/images/1.jpg") will work fine.
    > However openDir("/images/") will fail.[/color]

    Give PHP execute rights on the directory in question...

    Cheers,
    NC

    Comment

    • tristan@med.usyd.edu.au

      #3
      Re: Mac Os 10 +

      Well thats the confusion and the first thing we looked at. The
      directories do have full execute permissions.

      So far we have looked at the php permissions for users + groups enabled
      execution on the relevant directories without success.

      I'm sure there is something obvious which we are missing..

      Comment

      • d

        #4
        Re: Mac Os 10 +

        "NC" <nc@iname.com > wrote in message
        news:1139981627 .903803.258500@ z14g2000cwz.goo glegroups.com.. .[color=blue]
        > tristan@med.usy d.edu.au wrote:[color=green]
        >>
        >> Recently ive been migrating a PHP4 application build on a fedora
        >> Linux, to a MacOs10+ with PHP5.[/color]
        >
        > First of all, it pays to remember that MacOS X, when it comes to the
        > inner workings of the file system, is nothing but a BSD Unix. The "X"
        > conveniently has two meanings; it's the 10th major release of MacOS,
        > which also happens to be an X-Window GUI...[/color]

        Not by default it isn't :)


        Comment

        • Jasen Betts

          #5
          Re: Mac Os 10 +

          On 2006-02-15, tristan@med.usy d.edu.au <tristan@med.us yd.edu.au> wrote:[color=blue]
          > Recently ive been migrating a PHP4 application build on a fedora Linux,
          > to a MacOs10+ with PHP5.
          >
          > The most significant problem i have been experiencing is file based
          > functions specifically functions handleing directories.
          >
          > For example both is_executable() , openDir() are returning false when
          > the directories are setup and premissions are correct. I can access
          > files in a directory but not execute functions on a directoy itself.
          >
          > For instance file_get_conten ts("/images/1.jpg") will work fine. However
          > openDir("/images/") will fail.
          >
          > Has anyone else experienced the same sort of problem, if so did you
          > find a fix or workaround?[/color]

          sounds like you don't have execute permission for the directory.
          can you check that?

          --

          Bye.
          Jasen

          Comment

          • tristan@med.usyd.edu.au

            #6
            Re: Mac Os 10 +

            Its an interesting situation and we've tried the following combinations
            of users, groups with x permission.

            human user = A
            human user group = AG
            apache user = B
            Apache user Group = BG
            Independate Group = IG
            rwx A AG
            rwx B AG
            rwx A BG
            rwx B BG

            Setting both A and B to be members of IG
            rwx A IG
            rwx B IG

            We have also looked at the heirachy of the directories, incase there
            was a setting cascading down which may have affected it, and issues
            such as wether Apache was configured not to allow directory listings
            just of the off chance it may affect it, wether there was something
            changed in the implimentation of file and directory handling in PHP5 vs
            PHP4, and is there anything particular about the Mac systems that we
            might have missed which is where im at now.

            Come to think of it, I did have a similar problem once before on a
            Fedora box with a different application, the solution was to create an
            independant group that mimicked the group that the software was under
            on the original system. Though I never found out exactly why that
            worked.


            - Tristan

            Comment

            • Jasen Betts

              #7
              Re: Mac Os 10 +

              On 2006-02-15, tristan@med.usy d.edu.au <tristan@med.us yd.edu.au> wrote:[color=blue]
              > Well thats the confusion and the first thing we looked at. The
              > directories do have full execute permissions.
              >
              > So far we have looked at the php permissions for users + groups enabled
              > execution on the relevant directories without success.
              >
              > I'm sure there is something obvious which we are missing..[/color]

              enable them for everyone, if that helps check the id that php is running
              under

              Bye.
              Jasen

              Comment

              Working...