Enable php extensions on shared server?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • yodertony@gmail.com

    Enable php extensions on shared server?

    Hi, bona-fide php newbie here.

    I have a very cheap php-enabled linux hosting account.

    Unfortunately, this host does not have some extensions enabled which I
    need, namely, the dom-xml and xslt extensions.

    Assuming that the server admins ignore my pleas, is there a way to
    locally
    enable these extensions for my account, with a local copy of php.ini,
    or
    local copies of the proper *.so files, or some magic in the .htaccess
    file?

    Or should I just look for a new host.

    Thanks
    Tony

  • Johnny

    #2
    Re: Enable php extensions on shared server?


    <yodertony@gmai l.comwrote in message
    news:1160663053 .231499.183710@ h48g2000cwc.goo glegroups.com.. .
    Hi, bona-fide php newbie here.
    >
    I have a very cheap php-enabled linux hosting account.
    >
    Unfortunately, this host does not have some extensions enabled which I
    need, namely, the dom-xml and xslt extensions.
    >
    Assuming that the server admins ignore my pleas, is there a way to
    locally
    enable these extensions for my account, with a local copy of php.ini,
    or
    local copies of the proper *.so files, or some magic in the .htaccess
    file?
    >
    Or should I just look for a new host.
    >
    Thanks
    Tony
    >
    interesting question, let's see.
    mine's inexpensive too :) a piggyback on someone elses $7 a month...
    on shared LAMP servers the usual way to "local copy of php.ini" is with a
    directive in the .htaccess
    in the folder you are using PHP, if they'll let you, like
    php_value register_global s Off

    php_admin_value open_basedir none


    PHP4 you might be OK since its bundled but since PHP5 DOM XML functions are
    moved to PECL

    I just looked in phpinfo on mine and under Configure command it has these
    entries
    '--with-dom' '--with-dom-xslt' '--with-dom-exslt'

    so I'll see if I can turn them off.....
    OK the docs say:
    Any directive type set with php_admin_value can not be overridden by
    ..htaccess or virtualhost directives.

    So I'll try to see if I can do
    php_admin_value open_basedir none



    OK it cauesed an error when I tried to do

    phpinfo();

    so I gues you can't



    Looks like another host is the go. Good luck.



    Comment

    • Colin McKinnon

      #3
      Re: Enable php extensions on shared server?

      yodertony@gmail .com wrote:
      >
      Unfortunately, this host does not have some extensions enabled which I
      need, namely, the dom-xml and xslt extensions.
      >
      Assuming that the server admins ignore my pleas, is there a way to
      locally
      enable these extensions for my account, with a local copy of php.ini,
      no.
      or
      local copies of the proper *.so files,
      If they are already on the server you may be able to use dl() to load them
      at runtime. If their not there already then a sure fire way to upset your
      provider is to start uploading binaries into a shared webserver.
      Or should I just look for a new host.
      >
      Probably the best bet.

      IIRC there were a couple of pure PHP XML parsers but last time I looked XSLT
      was a bit flaky.

      HTH

      C.

      Comment

      • Johnny

        #4
        Re: Enable php extensions on shared server?


        "Colin McKinnon"
        <colin.thisisno tmysurname@ntlw orld.deletemeun lessURaBot.comw rote in
        message news:ABwXg.2319 7$pa.2003@newsf e2-gui.ntli.net...
        yodertony@gmail .com wrote:
        >

        Unfortunately, this host does not have some extensions enabled which I
        need, namely, the dom-xml and xslt extensions.

        Assuming that the server admins ignore my pleas, is there a way to
        locally
        enable these extensions for my account, with a local copy of php.ini,
        >
        no.
        >
        or
        local copies of the proper *.so files,
        If they are already on the server you may be able to use dl() to load them
        at runtime. If their not there already then a sure fire way to upset your
        provider is to start uploading binaries into a shared webserver.
        Thanks for that info Colin.
        I see on php,net there is an expoit related to dl() and I just checked a
        couple of hosts of clienst and enable_dl is on on both
        and I don't seem to be able to turn it off using .htaccess
        I tried
        php_value enable_dl Off

        and it accepted that but phpinfo() showed it still on

        should I be concerned or is this a rare exploit?



        Comment

        • yodertony@gmail.com

          #5
          Re: Enable php extensions on shared server?


          Colin McKinnon wrote:
          yodertony@gmail .com wrote:
          >

          Unfortunately, this host does not have some extensions enabled which I
          need, namely, the dom-xml and xslt extensions.

          Assuming that the server admins ignore my pleas, is there a way to
          locally
          enable these extensions for my account, with a local copy of php.ini,
          >
          no.
          >
          or
          local copies of the proper *.so files,
          If they are already on the server you may be able to use dl() to load them
          at runtime. If their not there already then a sure fire way to upset your
          provider is to start uploading binaries into a shared webserver.
          Thanks Colin, dl() seems to work. cha ching. I owe ya a beer.

          Comment

          Working...