Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Oct 2002
    Posts
    6

    Default Running CGI Scripts Inside CPanel?

    Hello, I am hopeing someone here can help me. I am trying to create my own CPanel Theme. I would like to run a CGI script so I can addin some of my custom billing stuff for each client. I cannot get the cgi script to work. I Have

    www.xxxxx.com:2082/frontend/MYTHEME/index.cgi

    I know that CPanel does not run on apache so is this possible? I have saw someone run a php script in these directories so thats why im thinking it is possible.

    Please help,

    Thanks
    Ryan

  2. #2
    Member
    Join Date
    Sep 2001
    Location
    Spain
    Posts
    779

    Default

    Not really CGI I think, but you can run perl scripts this way:
    &perl /path/to/perl/script&
    Make sure the script exits with 1 for its output to be displayed.

  3. #3
    Member
    Join Date
    Oct 2002
    Posts
    6

    Default that halfway works!

    Hello, Thanks for the help. That will work if I just use a basic cgi script. When I addin the code to connect to my mySQL database i get a LW/SIMPLE.pm error? Has anyone successfully integrated a cgi/perl script into cPanel before?

    Thanks,
    Ryan

  4. #4
    Member
    Join Date
    Sep 2001
    Location
    Spain
    Posts
    779

    Default

    Sorry, I answered too fast. You can certainly run CGI and PHP scripts from inside Cpanel. Create a directory in /usr/local/cpanel/base/3rdparty for your program and store your files there. Chmod the directory and all CGI scripts 0755. You can run it from a user's cpanel this way:

    &a href=&/3rdparty/yourdirectory/index.cgi&&Billing&/a&

    I don't know what could be wrong with LW/SIMPLE.pm, I use DBI to connect to the MySQL database and it works OK.

  5. #5
    Member
    Join Date
    Oct 2002
    Posts
    6

    Default Not Working

    When I chmoded my theme directory and script. I did exactly what you showed told me and for some reason when I click on the link it just displays the code of the cgi script. Is there something I need to do to make it work on my server?

    Please help,
    Thanks,
    Ryan

  6. #6
    sav
    sav is offline
    Member
    Join Date
    Oct 2002
    Posts
    11

    Default

    [quote:6623d9e8c1][i:6623d9e8c1]Originally posted by LazulaWeb.com[/i:6623d9e8c1]
    When I chmoded my theme directory and script. I did exactly what you showed told me and for some reason when I click on the link it just displays the code of the cgi script. Is there something I need to do to make it work on my server?[/quote:6623d9e8c1]

    Try [b:6623d9e8c1]chmod 755 yourscript.cgi[/b:6623d9e8c1]

Similar Threads & Tags
Similar threads

  1. Replies: 5
    Last Post: 05-19-2011, 07:16 AM
  2. CGI scripts not running at all...
    By ircmaxell in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 03-19-2008, 10:28 AM
  3. Running cgi in cPanel directories
    By denise006 in forum New User Questions
    Replies: 0
    Last Post: 06-29-2007, 04:47 PM
  4. Replies: 0
    Last Post: 02-14-2005, 09:49 PM
  5. CGI scripts not running
    By jmc67 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-18-2003, 09:11 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube