from vh3 import virthost / AddVirtDomain / Ensim / Apache

Discussion in 'Python' started by Dan Messenger, Apr 7, 2004.

  1. Hi,

    I'm new to python, and am trying to use some premade scripts on RedHat 7,
    but its giving me errors.

    The scripts are part of the Ensim hosting software, and when I run the
    command "AddVirtDomain" from a root shell, it works fine.

    However when I call it from my php page, and thus running under the apache
    user, I get the following error:

    Traceback (most recent call last):
    File "/usr/local/bin/AddVirtDomain", line 26, in ?
    from vh3 import virthost
    File "virtualhosting/virthost.py", line 46, in ?
    File
    "/home/build/qa/webppliance/3.1.11/2/lwp/vaishali2/WebGui/base/services/vh3/
    virtualhosting/virtutil.py", line 14, in ?
    ImportError: No module named logging

    The first file mentioned is the one I am running, and 2nd two dont even
    exist - tho the script runs fine under a root shell.

    To me this indicates a permissions problem - but permissions to what? The
    files mentioned dont exist !

    Anybody got any ideas ?
    Thanks in advance
    -Dan
     
    Dan Messenger, Apr 7, 2004
    #1
    1. Advertising

  2. Dan Messenger

    A. Y. Chen Guest

    Hi, I'm trying to do the same thing and getting the exact same problem
    as you. Have you had any luck? Part of the difficulty is that the
    files virthost.py and virtutil.py are probably compiles (in .pyc
    form), and not located in those directories shown in the trace.
    However, I still get the same error after I chmod those files.



    "Dan Messenger" <> wrote in message news:<c520nj$2ndag2$-berlin.de>...
    > Hi,
    >
    > I'm new to python, and am trying to use some premade scripts on RedHat 7,
    > but its giving me errors.
    >
    > The scripts are part of the Ensim hosting software, and when I run the
    > command "AddVirtDomain" from a root shell, it works fine.
    >
    > However when I call it from my php page, and thus running under the apache
    > user, I get the following error:
    >
    > Traceback (most recent call last):
    > File "/usr/local/bin/AddVirtDomain", line 26, in ?
    > from vh3 import virthost
    > File "virtualhosting/virthost.py", line 46, in ?
    > File
    > "/home/build/qa/webppliance/3.1.11/2/lwp/vaishali2/WebGui/base/services/vh3/
    > virtualhosting/virtutil.py", line 14, in ?
    > ImportError: No module named logging
    >
    > The first file mentioned is the one I am running, and 2nd two dont even
    > exist - tho the script runs fine under a root shell.
    >
    > To me this indicates a permissions problem - but permissions to what? The
    > files mentioned dont exist !
    >
    > Anybody got any ideas ?
    > Thanks in advance
    > -Dan
     
    A. Y. Chen, Apr 22, 2004
    #2
    1. Advertising

  3. (A. Y. Chen) wrote in message news:<>...
    > Hi, I'm trying to do the same thing and getting the exact same problem
    > as you. Have you had any luck? Part of the difficulty is that the
    > files virthost.py and virtutil.py are probably compiles (in .pyc
    > form), and not located in those directories shown in the trace.
    > However, I still get the same error after I chmod those files.
    >
    >
    >
    > "Dan Messenger" <> wrote in message news:<c520nj$2ndag2$-berlin.de>...
    > > Hi,
    > >
    > > I'm new to python, and am trying to use some premade scripts on RedHat 7,
    > > but its giving me errors.
    > >
    > > The scripts are part of the Ensim hosting software, and when I run the
    > > command "AddVirtDomain" from a root shell, it works fine.
    > >
    > > However when I call it from my php page, and thus running under the apache
    > > user, I get the following error:
    > >
    > > Traceback (most recent call last):
    > > File "/usr/local/bin/AddVirtDomain", line 26, in ?
    > > from vh3 import virthost
    > > File "virtualhosting/virthost.py", line 46, in ?
    > > File
    > > "/home/build/qa/webppliance/3.1.11/2/lwp/vaishali2/WebGui/base/services/vh3/
    > > virtualhosting/virtutil.py", line 14, in ?
    > > ImportError: No module named logging


    ...are you sure that php is running the same version of python as you
    from the command line. the logging module is a standard one, BUT it is
    only available in python >= 2.3

    /Simon
     
    Simon Dahlbacka, Apr 23, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page