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.

PATH_INFO does not work under phpsuexec

Discussion in 'General Discussion' started by WMS, Jul 25, 2003.

  1. WMS

    WMS Active Member

    Joined:
    Jul 18, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Moscow
    Hello!

    Is there any way to use PATH_INFO under phpsuexec?

    cPanel.net Support Ticket Number:
     
    #1 WMS, Jul 25, 2003
    Last edited: Jul 25, 2003
  2. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    Stop using phpsuexec, its garbage. Wait until a real solution is released before trying to run php processes as their actual owner.

    cPanel.net Support Ticket Number:
     
  3. WMS

    WMS Active Member

    Joined:
    Jul 18, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Moscow
    What about spammers?

    How can I find out who sends emails from PHP scripts?

    cPanel.net Support Ticket Number:
     
  4. WMS

    WMS Active Member

    Joined:
    Jul 18, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Moscow
    Is there any possibility to automatically add custom directives in httpd.conf for virtual hosts?

    cPanel.net Support Ticket Number:
     
  5. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    PHP_Info works fine under phpsuexec...

    What kind of error are you getting.

    cPanel.net Support Ticket Number:
     
  6. WMS

    WMS Active Member

    Joined:
    Jul 18, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Moscow
    Not php_info.
    PATH_INFO.

    cPanel.net Support Ticket Number:
     
  7. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    What of Path_info don't work... I tested it, and I see no problems with it.

    From what I saw of it, it just sperates a path into 3 parts.
    Directory Name
    Base Name
    Extension

    Just a simply PHP command, would not see any reason why it would not work.

    cPanel.net Support Ticket Number:
     
  8. WMS

    WMS Active Member

    Joined:
    Jul 18, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Moscow
  9. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    Will either of the two following items are what you are looking for:

    <?
    echo($SCRIPT_FILENAME);
    ?>
    ( gives path with filename )
    OR

    <?
    echo($DOCUMENT_ROOT);
    ?>
    ( gives only path )


    Or as alternative...
    <?
    $path_parts = pathinfo($PHP_SELF);

    echo $path_parts["dirname"] . "\n";
    echo $path_parts["basename"] . "\n";
    echo $path_parts["extension"] . "\n";
    ?>
    ( takes $PHP_SELF and breaks it down into path, basename and extension )
    Of couse you could put $SCRIPT_FILENAME in place of $PHP_SELF for full absolute path.
     
    #9 Faldran, Jul 25, 2003
    Last edited: Jul 25, 2003
  10. WMS

    WMS Active Member

    Joined:
    Jul 18, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Moscow
    Are you kidding?:)))))

    Please read MORE carefully.

    If you do not understand, read the thread again, and again, an' again.:)))

    I'm NOT talking about $PHP_SELF.
    I'm talking about $PATH_INFO.

    It's NOT the path to the script.

    What is the difference between
    "script.php" & "script.php/one/two/three"?

    For mod_php4 they are the SAME files and "/one/two/three" is the VALUE of $PATH_INFO.
    For phpsuexec they are the DIFFERENT files.

    Do you understand NOW?:)

    cPanel.net Support Ticket Number:
     
    #10 WMS, Jul 26, 2003
    Last edited: Jul 26, 2003
  11. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    I have never seen anyone put /one/two/three for options at the end of php scripts.... new one on me...

    normally it is script.php?one=something&two=something etc...

    Well good luck on that one....

    cPanel.net Support Ticket Number:
     
  12. WMS

    WMS Active Member

    Joined:
    Jul 18, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Moscow
    Thanks:)

    But I didn't find any way to make it work...:(

    cPanel.net Support Ticket Number:
     
  13. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    You sure you have never seen it? ;)
    People already started doing these url rewrites a few years ago to have their pages spidered by the search engines.

    One way to do it is by using apache's mod_rewrite

    cPanel.net Support Ticket Number:
     
  14. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    Yep, first reference I have ever heard of anyone using that for anything.

    So what is the use of it.. does it really do anything...

    cPanel.net Support Ticket Number:
     
  15. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    Well, as mentioned this was done to make pages searchengine friendly. Otherwise your pages would not get spidered.
    Nowadays most searchengine spider dynamic urls without problems though.

    cPanel.net Support Ticket Number:
     
  16. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    Ok, so that is just another feature that is not very usefull.. since the bots have caught up with things..

    Could be why I could not find any refernces to it for PHP 4.3.2 on php.net

    cPanel.net Support Ticket Number:
     
  17. rbrown

    rbrown Active Member

    Joined:
    Jun 11, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    I'm having the same problem - 404 Error. I need to be able to use $PATH_INFO but I'm using phpsuexec. What should I do to get this working?
     
  18. rbrown

    rbrown Active Member

    Joined:
    Jun 11, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    This issue was resolved earlier today by cPanel. To try the latest version of phpsuexec, you'll need to rebuild apache:

    /scripts/easyapache

    Then the PHP scripts will run fine even with pathinfo appended on the end.

    Good luck!

    -- Rob
     
  19. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    about time, someone got a fix for that.. sure that will make alot of people happy now.
     
  20. faiz1985

    faiz1985 Registered

    Joined:
    Jan 6, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    it dosnt work with phpsuexec
    anyideas how I can make it work on phpsuexec without uninstalling it.

    http://the-new-age.net/o/
     
Loading...

Share This Page