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.

Own Scritps

Discussion in 'General Discussion' started by strauberry, May 29, 2003.

  1. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,
    I'm trying to write my own scripts in the /scripts directory. I tried this one:

    PHP:
    #!/usr/bin/perl
    print "Content-type: text/html\n\n";
    print 
    "Hello";
    But nothing :( PHP cannot be used in this directory, can it?

    Why is there no output? The script has the same owner and permissions than all the other scripts..

    THANK YOU!!
    strauberry

    cPanel.net Support Ticket Number:
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    vi test.php

    input code

    save file

    chmod 755

    ./test.php

    works fine.


    How are you calling it?

    cPanel.net Support Ticket Number:
     
  3. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I didn't try your manual (thank you). I'm calling it via a link in the command file.

    Thank you!
    strauberry

    cPanel.net Support Ticket Number:
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    It won't work from the browser from what I know, but it should work fine for you from the shell.

    cPanel.net Support Ticket Number:
     
  5. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I have to use it via the browser because I need a special script for my resellers :)

    Thank you!
    strauberry

    cPanel.net Support Ticket Number:
     
  6. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    I May be wrong but don't u think this file should be test.cgi or test.pl instead.

    If this is test.php then why do u need this
    #!/usr/bin/perl
    print "Content-type: text/html\n\n";
    print "Hello";

    Correct me if i am wrong.

    Regards,

    cPanel.net Support Ticket Number:
     
  7. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    there's no perl-Code button :)

    it's a perl-file (without a extension because none of the files has a extension )

    Thank you :)
    strauberry

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page