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!

newbie :( , can not do any thing

Discussion in 'cPanel Developers' started by ThE EnD, Oct 27, 2011.

  1. ThE EnD

    ThE EnD Member

    Joined:
    Aug 25, 2009
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    51
    Hello their ,

    iam really strange here ,

    but i get an idea of script , and want to get some help in it .

    i need to create a button in cpanel , which inside it , i can create new file named php.ini inside user /public_html

    and to add variables to it

    just that

    how can i ?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,517
    Likes Received:
    425
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. morissette

    morissette Well-Known Member

    Joined:
    May 24, 2009
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    Austin, TX
    cPanel Access Level:
    Root Administrator
    InstallingPlugins < SoftwareDevelopmentKit < TWiki

    you could probably do something as simple as

    Code:
    #!/usr/bin/perl
    
    use strict;
    use warnings;
    
    use File::Copy;
    
    my $defphp = '/usr/local/lib/php.ini';
    my $newphp = "/home/$user/php.ini";
    
    copy("$defphp", "$newphp") or die "Copy failed: $!";
    
    Obviously you would need to find the user and what not but that should be easy enough.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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