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.

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:
    1
    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:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. morissette

    morissette Well-Known Member

    Joined:
    May 24, 2009
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    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.
     

Share This Page