Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

You don't have permission to access /phpinfo.php on this server

Discussion in 'General Discussion' started by sexy_guy, Jun 8, 2003.

  1. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    166
    I have phpinfo.php in /htdocs and i want users to be able to call it from their control panel. Since turning on phpsuexec everyone gets a 403 Forbidden error. Tried .htaccess with Options +Indexes but that didnt work. Anyone know what i have to modify in httpd.conf or .htaccess to get php working?

    Thanks

    cPanel.net Support Ticket Number:
     
  2. carlgm

    carlgm Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    England, UK
    Hey, do this

    chmod 0755 /usr/local/apache/htdocs/phpinfo.php

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    166
    That doesnt work. I need to add Options +ExecCGI in httpd.conf for /usr/local/apache/htdocs/ but so far everywhere i'v placed it says i dont have access to the /htdocs directory. Anyone know where i have to place Options +ExecCGI?

    cPanel.net Support Ticket Number:
     
  4. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    316
    If you are running php+suexec, you will run into this problem, that php scripts don't work in htdocs dir, due to it not being run as a user...

    easy solution is to create an account and call it from there.

    cPanel.net Support Ticket Number:
     
  5. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    166
    I should be able to turn it on in httpd.conf. I just know where to put the blasted command. At this for 2hrs all ready.

    cPanel.net Support Ticket Number:
     
  6. howard

    howard Well-Known Member

    Joined:
    Apr 20, 2003
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    166
    Did you add the ExecCGI option to line of Option statement undernearth the <Directory "/usr/local/apache/htdocs"> line

    And as already been said you will need to include the hashbang (.e.g #!/usr/bin/php) to be able to run any php scripts in there

    cPanel.net Support Ticket Number:
     
  7. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    166
    FINALLY! That worked and thanks Howard.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice