The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

sem_get

Discussion in 'General Discussion' started by ayor, Aug 14, 2004.

  1. ayor

    ayor Member

    Joined:
    Jul 7, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    FRANCE
    apache rebuilt with --enable-sysvsem & sem_get undifined function

    Hi,
    I have rebuild apache on my dedicated server to fork some process (fork... with "--enable-pcntl"), and it's ok now. late I rebuild apache a second time to get some functions like sem_get, sem_acquire... (--enable-sysvsem), and I don't know what's happened

    When I execute the php script from my browser, all it's ok. And when I execute it from the command line (ssh), there is no problem too.

    but when I try to plan a cron like (
    Code:
    php /home/a/b/c/the_php_script.php
    )

    I get a error message which says : "sem_get (undefined function)"

    if somebodys know anything about this pb, please tell me about the solutions I had to install, cause after many tries, I ve no idea anymore :(

    thanks
     
    #1 ayor, Aug 14, 2004
    Last edited: Aug 15, 2004
  2. ayor

    ayor Member

    Joined:
    Jul 7, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    FRANCE
    up please ;)
     
  3. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    You type in ssh:
    php /home/a/b/c/the_php_script.php

    and it works, but the same piece of code does not work from cron?
     
  4. ayor

    ayor Member

    Joined:
    Jul 7, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    FRANCE
    yes that is the probleme...

    from the ssh, there is no problem, but when the cron launch the same command, the notification mail shows "sem_get undefined function"

    that's so strange
     
  5. icanectc

    icanectc Well-Known Member

    Joined:
    Mar 10, 2003
    Messages:
    344
    Likes Received:
    0
    Trophy Points:
    16
    try inputting the data into cron like this

    php /home/a/b/c/the_php_script.php cron

    with cron at the end.
     
  6. ayor

    ayor Member

    Joined:
    Jul 7, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    FRANCE
    thanks, but it doesn't work better...

    on another board, somebodys said to me about the possibility of php's path who can be wrong if two versions of php are installed on my server

    i try that ;)
     
  7. ayor

    ayor Member

    Joined:
    Jul 7, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    FRANCE
    thanks to all...

    the problem has been solved. there were 2 differents install of php, and just one of them supports semaphores.

    the cron used the other php... and while giving the cron the full path of php, it was ok
     

Share This Page