Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Dec 2009
    Posts
    77
    Thanks
    2
    Thanked 0 Times in 0 Posts

    The exec() function is disabled in your PHP by the disabled_functions parameter in ph

    how do i enable exec() in php.ini? where is php.ini? cant find it in the directories in my site.

  • #2
    New Coder
    Join Date
    Dec 2009
    Posts
    77
    Thanks
    2
    Thanked 0 Times in 0 Posts
    can i at least view the values in php.ini?

  • #3
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,976
    Thanks
    15
    Thanked 229 Times in 229 Posts
    PHP Code:
    <html>
    <head>
    <title>PHP Test</title>
    </head>
    <body>

    <?php phpinfo(); ?>

    </body>
    </html>
    Make a page with that code, name it test.php, upload it to your site and open it with your browser. It should tell you how the php is configured.

  • #4
    New Coder
    Join Date
    Dec 2009
    Posts
    77
    Thanks
    2
    Thanked 0 Times in 0 Posts
    <?php
    phpinfo();
    ?>
    ok but suppose i override these values with an htaccess file or a second php.ini file. which values will be output

  • #5
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,976
    Thanks
    15
    Thanked 229 Times in 229 Posts
    Quote Originally Posted by chopficaro View Post
    <?php
    phpinfo();
    ?>
    ok but suppose i override these values with an htaccess file or a second php.ini file. which values will be output
    Is this your own server or a webhost server? If a webhost, it all depends on the host's settings. We can't tell you before you try it.

  • #6
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Not all settings can be changed everywhere:
    http://php.net/configuration.changes.modes
    http://php.net/ini.list

    exec() is commonly disabled for security reasons, but it is still possible to get directory sizes. Check the Filesystem functions and comments.
    Last edited by Inigoesdr; 11-06-2010 at 03:42 PM.

  • #7
    Regular Coder
    Join Date
    Jun 2006
    Location
    UK
    Posts
    922
    Thanks
    302
    Thanked 3 Times in 3 Posts
    If you are on a shared server and your webhost has apache running under safe mode then you should not be able to override the php.ini settings set by your webhost.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •