#1
  1. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    When attempting to use PHP's image functions, Win95 "PWS4" PHP3 returns an error message.

    It states:
    Fatal error: Unable to open c:WEBSHAREWWWROOT/php3/circle.inc.php3 in - on line 0
    No input file specified.

    Of course, if I set it to "not be" an include file, I get a different error, which states that the function is not supported..

    Is PHP incapable of rendering "gif" functions
    on Win9x? Or.. is there a library missing perhaps?

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    63
    Rep Power
    15
    Can you show some of the code you are using to open the file?
  4. #3
  5. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    Not really, but what I can tell you is that
    the same file is setting on my web server, and works perfectly.. so I know it's not
    the file..

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    63
    Rep Power
    15
    Well if we can't see the code then I can only make a few guesses.
    1) Check permissions on the directory
    2) Make sure the / are proper for the operating system you are on
    3) Is your operating system case sensitive?
  8. #5
  9. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    <?php
    Header ("Content-type: image/gif");
    $img = ImageCreate(250, 250);
    $black = ImageColorAllocate($img, 0, 0, 0);
    $red = ImageColorAllocate($img, 255, 0, 0);
    $green = ImageColorAllocate($img, 0, 255, 0);
    ImageFill($img, 0, 0, $black);
    ImageArc($img, 125, 125, 250, 250, 0, 360, $red);
    ImageFill($img, 125, 125, $green);
    ImageGIF($img);
    ImageDestroy($img);
    ?>

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    63
    Rep Power
    15
    1) You are using require not include
    2) When I tested your code out, it worked perfectly, a green circle in a black box.
    3) I was able to replicate your error message...


    Fatal error: Failed opening required 'mg.phtml' in /home/httpd/www-devphp/html/test/imginclude.phtml on line 1

    How did I replicate it? By mispelling img.phtml.

    3) This means: Either your file name is incorrect, your os is case sensitive, or your path to the file is incorrect.

    4) Try using a relative path such as ../php3/circle.inc.php3

    ------------------
    ----------------------
    Ulysses J Ludwig
    Consultant
    Ujludwig@yahoo.com
    310.678.8324
  12. #7
  13. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    Thanks for the input, I'll take a closer look
    and see If I can't correct my mistakes.

    I do have one final question regarding using
    php to generate images..

    How do we bring this into a regular document?

    when I add the code lines into a normal document, I naturally get an error about the headers already being set.

    ???

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.
  14. #8
  15. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    I corrected the problem, and now I have a new one:

    Fatal error: Call to unsupported or undefined function imagegif() in <b>c:WEBSHAREWWWROOT/php3/circle.inc.php3 on line 10

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    63
    Rep Power
    15
    In your php.ini file uncomment the following line:

    ;extension=php3_gd.dll

    This allows your php to render images.
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    63
    Rep Power
    15
    The most recent version of gd library is at
    http://www.boutell.com/gd/
  20. #11
  21. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    Straight from my php3.ini file...

    ;Windows Extensions

    extension=php3_calendar.dll
    extension=php3_crypt.dll
    extension=php3_db2.dll
    extension=php3_dbase.dll
    extension=php3_dbm.dll
    extension=php3_fb.dll
    extension=php3_filepro.dll
    extension=php3_ftp.dll
    extension=php3_gd.dll
    extension=php3_hyperware.dll
    extension=php3_imap4r1.dll
    extension=php3_interbase.dll
    extension=php3_ldap.dll
    extension=php3_msql1.dll
    extension=php3_msql2.dll
    extension=php3_mssql.dll
    extension=php3_mssql70.dll
    extension=php3_mysql.dll
    extension=php3_oci73.dll
    extension=php3_oci80.dll
    extension=php3_pcre.dll
    extension=php3_pdflib.dll
    extension=php3_snmp.dll
    extension=php3_solid23.dll
    extension=php3_xml.dll
    extension=php3_zlib.dll
    ;extension=php3_odbc.dll

    I will see about obtaining the library file
    you indicated in your following post.

    Are there any other libraries out there?
    ones that may be missing??

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.
  22. #12
  23. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by ujludwig:
    The most recent version of gd library is at
    http://www.boutell.com/gd/
    [/quote]

    This site indicates I need these libraries:
    libpng
    jpeg-6b or later
    zlib

    I don't believe that I have the first two
    files... where might I obtain them.

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.

IMN logo majestic logo threadwatch logo seochat tools logo