problem loading php_gd2.dll php5/apache2.0+

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pete Marsh

    problem loading php_gd2.dll php5/apache2.0+

    Wondering if anyone can recomend some sample code for dynamically
    loading the GD module.

    I have tried setting the extension dir in php.ini, and loading the GD
    module from there when apache is started, but it won't load.

    There is also the option of dynamically loading the module at run time
    of the script.

    LD() i believe is the call.

    Anyone able to recommend a workaround here?

    Or provide a hint with a sample?

    Here's the closest usage of DL() i have found but not quite what I
    need,


    <?php
    $gd_is_shared = "shared-library";

    if (function_exist s('ImageCreateF romPNG') && !@dl('gd.so')) {
    $gd_is_shared = "embedded";
    }

    print $gd_is_shared;
    ?>

    I'm just hoping to determine what the error message is as to why it
    won't load under windows.

  • Jerry Stuckle

    #2
    Re: problem loading php_gd2.dll php5/apache2.0+

    Pete Marsh wrote:
    Wondering if anyone can recomend some sample code for dynamically
    loading the GD module.
    >
    I have tried setting the extension dir in php.ini, and loading the GD
    module from there when apache is started, but it won't load.
    >
    There is also the option of dynamically loading the module at run time
    of the script.
    >
    LD() i believe is the call.
    >
    Anyone able to recommend a workaround here?
    >
    Or provide a hint with a sample?
    >
    Here's the closest usage of DL() i have found but not quite what I
    need,
    >
    >
    <?php
    $gd_is_shared = "shared-library";
    >
    if (function_exist s('ImageCreateF romPNG') && !@dl('gd.so')) {
    $gd_is_shared = "embedded";
    }
    >
    print $gd_is_shared;
    ?>
    >
    I'm just hoping to determine what the error message is as to why it
    won't load under windows.
    >
    If it won't load at Apache startup, there's a problem. And I would
    expect this problem would keep it from loading dynamically, also.

    Did you check your Apache error log? Perhaps even your Windows event
    log might have something.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • Pete Marsh

      #3
      Re: problem loading php_gd2.dll php5/apache2.0+

      On Mar 22, 5:20 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
      Pete Marsh wrote:
      Wondering if anyone can recomend some sample code for dynamically
      loading the GD module.
      >
      I have tried setting the extension dir in php.ini, and loading the GD
      module from there when apache is started, but it won't load.
      >
      There is also the option of dynamically loading the module at run time
      of the script.
      >
      LD() i believe is the call.
      >
      Anyone able to recommend a workaround here?
      >
      Or provide a hint with a sample?
      >
      Here's the closest usage of DL() i have found but not quite what I
      need,
      >
      <?php
      $gd_is_shared = "shared-library";
      >
      if (function_exist s('ImageCreateF romPNG') && !@dl('gd.so')) {
      $gd_is_shared = "embedded";
      }
      >
      print $gd_is_shared;
      ?>
      >
      I'm just hoping to determine what the error message is as to why it
      won't load under windows.
      >
      If it won't load at Apache startup, there's a problem. And I would
      expect this problem would keep it from loading dynamically, also.
      >
      Did you check your Apache error log? Perhaps even your Windows event
      log might have something.

      hi, I think I may have a syntax error in the Load module directive in
      httpd.conf

      I have made a guess as I could not find the specific definition for
      calling the GD module.

      I've included the correct syntax bellow for loading the php5 module,
      which i used as a guide.

      LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll "
      Loadmodule gd_module "C:/program Files/PHP/php_gd2.dll"
      ^^^^^^^^^

      Instead of gd_module, what should I use above?

      Thanks




      Comment

      • Pete Marsh

        #4
        Re: problem loading php_gd2.dll php5/apache2.0+

        On Mar 22, 12:19 pm, "Pete Marsh" <m...@witty.com wrote:
        On Mar 22, 5:20 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
        >
        >
        >
        Pete Marsh wrote:
        Wondering if anyone can recomend some sample code for dynamically
        loading the GD module.
        >
        I have tried setting the extension dir in php.ini, and loading the GD
        module from there when apache is started, but it won't load.
        >
        There is also the option of dynamically loading the module at run time
        of the script.
        >
        LD() i believe is the call.
        >
        Anyone able to recommend a workaround here?
        >
        Or provide a hint with a sample?
        >
        Here's the closest usage of DL() i have found but not quite what I
        need,
        >
        <?php
        $gd_is_shared = "shared-library";
        >
        if (function_exist s('ImageCreateF romPNG') && !@dl('gd.so')) {
        $gd_is_shared = "embedded";
        }
        >
        print $gd_is_shared;
        ?>
        >
        I'm just hoping to determine what the error message is as to why it
        won't load under windows.
        >
        If it won't load at Apache startup, there's a problem. And I would
        expect this problem would keep it from loading dynamically, also.
        >
        Did you check your Apache error log? Perhaps even your Windows event
        log might have something.
        >
        hi, I think I may have a syntax error in the Load module directive in
        httpd.conf
        >
        I have made a guess as I could not find the specific definition for
        calling the GD module.
        >
        I've included the correct syntax bellow for loading the php5 module,
        which i used as a guide.
        >
        LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll "
        Loadmodule gd_module "C:/program Files/PHP/php_gd2.dll"
        ^^^^^^^^^
        >
        Instead of gd_module, what should I use above?

        Further experimentation shows that the error being generated is:

        Syntax error on line 963 of "C:/program files/Apache Group/Apache2/
        conf/httpd.conf: Can't locate API module structure 'gd2_module' in
        file C:/program files/PHP/php_gd2.dll

        Any further ideas appreciated.

        Comment

        • Jerry Stuckle

          #5
          Re: problem loading php_gd2.dll php5/apache2.0+

          Pete Marsh wrote:
          On Mar 22, 12:19 pm, "Pete Marsh" <m...@witty.com wrote:
          >On Mar 22, 5:20 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
          >>
          >>
          >>
          >>Pete Marsh wrote:
          >>>Wondering if anyone can recomend some sample code for dynamically
          >>>loading the GD module.
          >>>I have tried setting the extension dir in php.ini, and loading the GD
          >>>module from there when apache is started, but it won't load.
          >>>There is also the option of dynamically loading the module at run time
          >>>of the script.
          >>>LD() i believe is the call.
          >>>Anyone able to recommend a workaround here?
          >>>Or provide a hint with a sample?
          >>>Here's the closest usage of DL() i have found but not quite what I
          >>>need,
          >>><?php
          >>>$gd_is_share d = "shared-library";
          >>>if (function_exist s('ImageCreateF romPNG') && !@dl('gd.so')) {
          >>> $gd_is_shared = "embedded";
          >>>}
          >>>print $gd_is_shared;
          >>>?>
          >>>I'm just hoping to determine what the error message is as to why it
          >>>won't load under windows.
          >>If it won't load at Apache startup, there's a problem. And I would
          >>expect this problem would keep it from loading dynamically, also.
          >>Did you check your Apache error log? Perhaps even your Windows event
          >>log might have something.
          >hi, I think I may have a syntax error in the Load module directive in
          >httpd.conf
          >>
          >I have made a guess as I could not find the specific definition for
          >calling the GD module.
          >>
          >I've included the correct syntax bellow for loading the php5 module,
          >which i used as a guide.
          >>
          >LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll "
          >Loadmodule gd_module "C:/program Files/PHP/php_gd2.dll"
          > ^^^^^^^^^
          >>
          >Instead of gd_module, what should I use above?
          >
          >
          Further experimentation shows that the error being generated is:
          >
          Syntax error on line 963 of "C:/program files/Apache Group/Apache2/
          conf/httpd.conf: Can't locate API module structure 'gd2_module' in
          file C:/program files/PHP/php_gd2.dll
          >
          Any further ideas appreciated.
          >
          How about asking in an Apache group, such as alt.apache.conf iguration,
          where the Apache gurus hang out.

          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          • Pete Marsh

            #6
            Re: problem loading php_gd2.dll php5/apache2.0+

            On Mar 22, 8:28 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
            Pete Marsh wrote:
            On Mar 22, 12:19 pm, "Pete Marsh" <m...@witty.com wrote:
            On Mar 22, 5:20 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
            >
            >Pete Marsh wrote:
            >>Wondering if anyone can recomend some sample code for dynamically
            >>loading the GD module.
            >>I have tried setting the extension dir in php.ini, and loading the GD
            >>module from there when apache is started, but it won't load.
            >>There is also the option of dynamically loading the module at run time
            >>of the script.
            >>LD() i believe is the call.
            >>Anyone able to recommend a workaround here?
            >>Or provide a hint with a sample?
            >>Here's the closest usage of DL() i have found but not quite what I
            >>need,
            >><?php
            >>$gd_is_shar ed = "shared-library";
            >>if (function_exist s('ImageCreateF romPNG') && !@dl('gd.so')) {
            >> $gd_is_shared = "embedded";
            >>}
            >>print $gd_is_shared;
            >>?>
            >>I'm just hoping to determine what the error message is as to why it
            >>won't load under windows.
            >If it won't load at Apache startup, there's a problem. And I would
            >expect this problem would keep it from loading dynamically, also.
            >Did you check your Apache error log? Perhaps even your Windows event
            >log might have something.
            hi, I think I may have a syntax error in the Load module directive in
            httpd.conf
            >
            I have made a guess as I could not find the specific definition for
            calling the GD module.
            >
            I've included the correct syntax bellow for loading the php5 module,
            which i used as a guide.
            >
            LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll "
            Loadmodule gd_module "C:/program Files/PHP/php_gd2.dll"
            ^^^^^^^^^
            >
            Instead of gd_module, what should I use above?
            >
            Further experimentation shows that the error being generated is:
            >
            Syntax error on line 963 of "C:/program files/Apache Group/Apache2/
            conf/httpd.conf: Can't locate API module structure 'gd2_module' in
            file C:/program files/PHP/php_gd2.dll
            >
            Any further ideas appreciated.
            >
            How about asking in an Apache group, such as alt.apache.conf iguration,
            where the Apache gurus hang out.

            I fixed it. Turns out that GD is loaded as an extension under php5,
            not a module, and has to be invoked from php.ini There was also a path
            issue in php.ini, where an absolute path was required instead of the
            default relative one.


            Comment

            Working...