Results 1 to 12 of 12

Thread: New DirectAdmin Plugins and iFrames

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Posts
    245

    New DirectAdmin Plugins and iFrames

    Hi

    I can see that DirectAdmin allows full screen display when accessing *.raw however I'm getting nothing back from Safari and Firefox is telling me using this URL is unsafe (even out of iframe), even though the rest of the sites work just fine.

    So what is the protocol here? For instance:

    - admin/index.html

    This is fine. It is executable sweet to handle PHP

    However with
    - admin/output/folder/index.html

    I can't access, under the same constraints. Why is this? Are sub folders in admin/* allowed? Put more simply, what is the expected filesystem layout of admin folder with internal links?

    Kind regards
    Courtesy of Youds Media Ltd.

    DirectAdmin Plugin: Styled Default Pages for new customers; see this forum thread.

  2. #2
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    7,975
    I think you're missing HTTP headers. Please check https://www.directadmin.com/features.php?id=610 for more information.
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  3. #3
    Join Date
    Jul 2008
    Posts
    245
    Quote Originally Posted by smtalk View Post
    I think you're missing HTTP headers. Please check https://www.directadmin.com/features.php?id=610 for more information.
    Awesome. Im glad you replied. Does Evolution theme give access to upload panels and the like using fancy tokens or such? Was wondering how extensible it is.

    Will update shortly, Id done for the day.
    Courtesy of Youds Media Ltd.

    DirectAdmin Plugin: Styled Default Pages for new customers; see this forum thread.

  4. #4
    Join Date
    Jul 2008
    Posts
    245
    Ah, not so much luck this time. I have investigated (twice) and found that the following (with a PHP shebang) is not working:

    Code:
    #!/usr/local/bin/php
    <?php header("HTTP/1.1 200 OK"); header("Content-Type: text/html"); ?>
    That's the first 2 lines of my index.raw file. Please note; for anyone following this from Google, the problem with folders etc is quickly isolated when you notice admin as being the root folder. Hence all URL's must begin starting from folder admin.

    Many thanks.
    Courtesy of Youds Media Ltd.

    DirectAdmin Plugin: Styled Default Pages for new customers; see this forum thread.

  5. #5
    Join Date
    Jul 2008
    Posts
    245
    So I found this neat trick to make the text appear at the very least:

    Code:
     -nc/usr/local/directadmin/plugins/custombuild/php.ini
    Meaning the PHP shebang and header is as follows:

    Code:
    #!/usr/local/bin/php -nc/usr/local/directadmin/plugins/custombuild/php.ini
    <?php header("HTTP/1.1 200 OK"); header("Content-Type: text/html"); ?>...
    Which gets you started. But other than that I can't make it display formed HTML; I only see the output of the script.

    Any advice appreciated.
    Courtesy of Youds Media Ltd.

    DirectAdmin Plugin: Styled Default Pages for new customers; see this forum thread.

  6. #6
    Join Date
    Jul 2008
    Posts
    245
    So stupid me, using header instead of echo. I thought it was a PHP issue (as it supports the header function) and used that by accident.

    So, from my findings:

    Code:
    #!/usr/local/bin/php -nc/usr/local/directadmin/plugins/custombuild/php.ini
    <?php echo "HTTP/1.1 200 OK"; echo "Content-Type: text/html"; ?><!doctype...
    Works perfectly. Thanks.
    Courtesy of Youds Media Ltd.

    DirectAdmin Plugin: Styled Default Pages for new customers; see this forum thread.

  7. #7
    Join Date
    Jul 2008
    Posts
    245
    Sorry to raise another issue (as the thread name is quite generic) but I've a WTF with one of DirectAdmin features.

    I'm accessing a script via ajax and am told (when viewed in separate tab) that DA requires referrer information and furthermore always returns a status code of 0 (not 200) when its state changes to 4, the final state. Hence; this script can not be run via AJAX methods.

    Is there some way of calling scripts in DirectAdmin I should be aware of?

    Kind regards
    Courtesy of Youds Media Ltd.

    DirectAdmin Plugin: Styled Default Pages for new customers; see this forum thread.

Posting Permissions

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