PHP can't find image extension

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

    PHP can't find image extension

    I'm trying to do some image work. I have enabled the graphics extension and
    the extension path in php.ini, as well as copying the dll to C:\PHP...just
    for good measure.

    php.ini:

    extension_dir =C:\PHP\ext
    extension=php_g d2.dll

    but...when I try to use ImageCreateFrom Jpeg in a script I get the following
    error:

    Fatal error: Call to undefined function imagecreatefrom jpeg() in
    C:\Inetpub\wwwr oot\PHP\thumbna il\thumbnail.ph p on line 47


    Any ideas where I should look in order to correct this?

    TIA,

    Larry Woods


  • Simon Stienen

    #2
    Re: PHP can't find image extension

    On 2005-08-01 17-45-16 lwoods <lwoods <larry@lwoods.c om>> wrote:[color=blue]
    > I'm trying to do some image work. I have enabled the graphics extension and
    > the extension path in php.ini, as well as copying the dll to C:\PHP...just
    > for good measure.
    >
    > php.ini:
    >
    > extension_dir =C:\PHP\ext
    > extension=php_g d2.dll
    >
    > but...when I try to use ImageCreateFrom Jpeg in a script I get the following
    > error:
    >
    > Fatal error: Call to undefined function imagecreatefrom jpeg() in
    > C:\Inetpub\wwwr oot\PHP\thumbna il\thumbnail.ph p on line 47
    >
    > Any ideas where I should look in order to correct this?
    >
    > TIA,
    >
    > Larry Woods[/color]

    Try c:/php/ext/
    Btw: Are you sure, the .ini is in the appropiate directory for your HTTPd?

    HTH,
    Simon
    --
    Simon Stienen <http://slashlife.org/>
    "What you do in this world is a matter of no consequence,
    The question is, what can you make people believe that you have done."
    /Sherlock Holmes in A Study in Scarlet by Sir Arthur Conan Doyle/

    Comment

    • Erwin Moller

      #3
      Re: PHP can't find image extension

      Simon Stienen wrote:
      [color=blue]
      > On 2005-08-01 17-45-16 lwoods <lwoods <larry@lwoods.c om>> wrote:[color=green]
      >> I'm trying to do some image work. I have enabled the graphics extension
      >> and the extension path in php.ini, as well as copying the dll to
      >> C:\PHP...just for good measure.
      >>
      >> php.ini:
      >>
      >> extension_dir =C:\PHP\ext
      >> extension=php_g d2.dll
      >>
      >> but...when I try to use ImageCreateFrom Jpeg in a script I get the
      >> following error:
      >>
      >> Fatal error: Call to undefined function imagecreatefrom jpeg() in
      >> C:\Inetpub\wwwr oot\PHP\thumbna il\thumbnail.ph p on line 47
      >>
      >> Any ideas where I should look in order to correct this?
      >>
      >> TIA,
      >>
      >> Larry Woods[/color]
      >
      > Try c:/php/ext/
      > Btw: Are you sure, the .ini is in the appropiate directory for your HTTPd?
      >
      > HTH,
      > Simon[/color]

      Hi,

      One more thing:
      Some pre-configured Windows-installers are really bad.
      I saw a few of them that installed PHP just fine, so it seems, untill you
      want to add new extension. That just won't work.

      If Simons advice (which also makes perfect sense :P) doesn't help, intall
      PHP as described on their site/readme.

      Regards,
      Erwin Moller

      Comment

      • lwoods

        #4
        Re: PHP can't find image extension

        I changed the "C:\PHP\ext " to "C:\PHP\ext \" ...no change. Also changed the
        "\" to "/"; no change. I have my php.ini in C:\PHP and I "assume" that it
        is being found because I have a script that executes the "phpinfo()"
        function and that seems to display O.K.

        Whoa!!!! I just ran the script with the phpinfo() and it's showing
        "C:\php5" as being the directory for the extensions! I have added "C:\PHP"
        to my PATH environmental variable, and have added an env. variable named
        PHPRC=C:\PHP\ex t . php.exe in in the directory C:\PHP so obviously they are
        finding it. So, what do I have to do to get them to find my php.ini. BTW,
        to my knowledge there are NO other php.ini's in this system (including the
        WINDOWS directory).

        Larry


        How can I test to see if
        "Simon Stienen" <news@news.slas hlife.org> wrote in message
        news:1mjlzvuk5n lxd$.dlg@news.s lashlife.org...[color=blue]
        > On 2005-08-01 17-45-16 lwoods <lwoods <larry@lwoods.c om>> wrote:[color=green]
        > > I'm trying to do some image work. I have enabled the graphics extension[/color][/color]
        and[color=blue][color=green]
        > > the extension path in php.ini, as well as copying the dll to[/color][/color]
        C:\PHP...just[color=blue][color=green]
        > > for good measure.
        > >
        > > php.ini:
        > >
        > > extension_dir =C:\PHP\ext
        > > extension=php_g d2.dll
        > >
        > > but...when I try to use ImageCreateFrom Jpeg in a script I get the[/color][/color]
        following[color=blue][color=green]
        > > error:
        > >
        > > Fatal error: Call to undefined function imagecreatefrom jpeg() in
        > > C:\Inetpub\wwwr oot\PHP\thumbna il\thumbnail.ph p on line 47
        > >
        > > Any ideas where I should look in order to correct this?
        > >
        > > TIA,
        > >
        > > Larry Woods[/color]
        >
        > Try c:/php/ext/
        > Btw: Are you sure, the .ini is in the appropiate directory for your HTTPd?
        >
        > HTH,
        > Simon
        > --
        > Simon Stienen <http://slashlife.org/>
        > "What you do in this world is a matter of no consequence,
        > The question is, what can you make people believe that you have done."
        > /Sherlock Holmes in A Study in Scarlet by Sir Arthur Conan Doyle/[/color]



        Comment

        • lwoods

          #5
          Re: PHP can't find image extension

          Thanks, Erwin,

          I didn't use the installer, as others have suggested, so I don't think that
          is my problem. Take a look at my latest reply.

          Larry

          "Erwin Moller"
          <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> wrote in
          message news:42ee48f3$0 $11072$e4fe514c @news.xs4all.nl ...[color=blue]
          > Simon Stienen wrote:
          >[color=green]
          > > On 2005-08-01 17-45-16 lwoods <lwoods <larry@lwoods.c om>> wrote:[color=darkred]
          > >> I'm trying to do some image work. I have enabled the graphics[/color][/color][/color]
          extension[color=blue][color=green][color=darkred]
          > >> and the extension path in php.ini, as well as copying the dll to
          > >> C:\PHP...just for good measure.
          > >>
          > >> php.ini:
          > >>
          > >> extension_dir =C:\PHP\ext
          > >> extension=php_g d2.dll
          > >>
          > >> but...when I try to use ImageCreateFrom Jpeg in a script I get the
          > >> following error:
          > >>
          > >> Fatal error: Call to undefined function imagecreatefrom jpeg() in
          > >> C:\Inetpub\wwwr oot\PHP\thumbna il\thumbnail.ph p on line 47
          > >>
          > >> Any ideas where I should look in order to correct this?
          > >>
          > >> TIA,
          > >>
          > >> Larry Woods[/color]
          > >
          > > Try c:/php/ext/
          > > Btw: Are you sure, the .ini is in the appropiate directory for your[/color][/color]
          HTTPd?[color=blue][color=green]
          > >
          > > HTH,
          > > Simon[/color]
          >
          > Hi,
          >
          > One more thing:
          > Some pre-configured Windows-installers are really bad.
          > I saw a few of them that installed PHP just fine, so it seems, untill you
          > want to add new extension. That just won't work.
          >
          > If Simons advice (which also makes perfect sense :P) doesn't help, intall
          > PHP as described on their site/readme.
          >
          > Regards,
          > Erwin Moller[/color]



          Comment

          • lwoods

            #6
            Re: PHP can't find image extension

            I got it to work. I did two things...which is not too cool...but I copied
            the php.ini to my WINDOW directory AND it restarted IIS. I have a feeling
            that I needed to restart IIS to get php to reread the php.ini file.

            ??????????????? ???

            TIA,

            Larry

            "lwoods" <larry@lwoods.c om> wrote in message
            news:MSrHe.5407 3$4o.8468@fed1r ead06...[color=blue]
            > I changed the "C:\PHP\ext " to "C:\PHP\ext \" ...no change. Also changed[/color]
            the[color=blue]
            > "\" to "/"; no change. I have my php.ini in C:\PHP and I "assume" that it
            > is being found because I have a script that executes the "phpinfo()"
            > function and that seems to display O.K.
            >
            > Whoa!!!! I just ran the script with the phpinfo() and it's showing
            > "C:\php5" as being the directory for the extensions! I have added[/color]
            "C:\PHP"[color=blue]
            > to my PATH environmental variable, and have added an env. variable named
            > PHPRC=C:\PHP\ex t . php.exe in in the directory C:\PHP so obviously they[/color]
            are[color=blue]
            > finding it. So, what do I have to do to get them to find my php.ini.[/color]
            BTW,[color=blue]
            > to my knowledge there are NO other php.ini's in this system (including the
            > WINDOWS directory).
            >
            > Larry
            >
            >
            > How can I test to see if
            > "Simon Stienen" <news@news.slas hlife.org> wrote in message
            > news:1mjlzvuk5n lxd$.dlg@news.s lashlife.org...[color=green]
            > > On 2005-08-01 17-45-16 lwoods <lwoods <larry@lwoods.c om>> wrote:[color=darkred]
            > > > I'm trying to do some image work. I have enabled the graphics[/color][/color][/color]
            extension[color=blue]
            > and[color=green][color=darkred]
            > > > the extension path in php.ini, as well as copying the dll to[/color][/color]
            > C:\PHP...just[color=green][color=darkred]
            > > > for good measure.
            > > >
            > > > php.ini:
            > > >
            > > > extension_dir =C:\PHP\ext
            > > > extension=php_g d2.dll
            > > >
            > > > but...when I try to use ImageCreateFrom Jpeg in a script I get the[/color][/color]
            > following[color=green][color=darkred]
            > > > error:
            > > >
            > > > Fatal error: Call to undefined function imagecreatefrom jpeg() in
            > > > C:\Inetpub\wwwr oot\PHP\thumbna il\thumbnail.ph p on line 47
            > > >
            > > > Any ideas where I should look in order to correct this?
            > > >
            > > > TIA,
            > > >
            > > > Larry Woods[/color]
            > >
            > > Try c:/php/ext/
            > > Btw: Are you sure, the .ini is in the appropiate directory for your[/color][/color]
            HTTPd?[color=blue][color=green]
            > >
            > > HTH,
            > > Simon
            > > --
            > > Simon Stienen <http://slashlife.org/>
            > > "What you do in this world is a matter of no consequence,
            > > The question is, what can you make people believe that you have done."
            > > /Sherlock Holmes in A Study in Scarlet by Sir Arthur Conan Doyle/[/color]
            >
            >
            >[/color]



            Comment

            • Simon Stienen

              #7
              Re: PHP can't find image extension

              On 2005-08-01 18-13-33 lwoods <larry@lwoods.c om> wrote:[color=blue]
              > I changed the "C:\PHP\ext " to "C:\PHP\ext \" ...no change. Also changed the
              > "\" to "/"; no change. I have my php.ini in C:\PHP and I "assume" that it
              > is being found because I have a script that executes the "phpinfo()"
              > function and that seems to display O.K.[/color]
              PHP even runs without any php.ini - it just assumes default values.
              [color=blue]
              > Whoa!!!! I just ran the script with the phpinfo() and it's showing
              > "C:\php5" as being the directory for the extensions! I have added "C:\PHP"
              > to my PATH environmental variable, and have added an env. variable named
              > PHPRC=C:\PHP\ex t . php.exe in in the directory C:\PHP so obviously they are
              > finding it. So, what do I have to do to get them to find my php.ini. BTW,
              > to my knowledge there are NO other php.ini's in this system (including the
              > WINDOWS directory).[/color]
              Then you should try to copy the php.ini to \windows or \windows\system (32).
              For Apache2, the php.ini has to be located in Apaches root directory (the
              main binary is bin\apache.exe from there), but I don't know, where IIS
              wants its php.ini.

              HTH,
              Simon
              --
              Simon Stienen <http://slashlife.org/>
              "What you do in this world is a matter of no consequence,
              The question is, what can you make people believe that you have done."
              /Sherlock Holmes in A Study in Scarlet by Sir Arthur Conan Doyle/

              Comment

              Working...