[PHP-DB] Re: Configuring GD for Windows: image functions

2003-11-13 Thread niclas meyer
your path in php.ini should be:

extension_dir = your-drive\php\extensions\

i think =)

John Dillon [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
m...
Could someone suggest where I am going wrong in configuring GD for Windows
please?

 Ruunning Apache 1.3.2 and PHP 4.3.28

 Apache httpd.conf says:

  LoadModule php4_module c:/PHP/php-4.3.2-Win32/sapi/php4apache.dll

 php.ini is only in c:\WINNT and says

  extension=php_gd2.dll

 When I start Apache it says:

  ...unable to load ./extensions\php_gd2.dll ...could not be found

 This file (773KB 27/08/02) is in:

 c:\PHP
 c:\PHP\extensions
 c:\PHP\php-4.3.2-Win32\extensions
 c:\Program Files\PHP
 c:\Program Files\PHP\extensions
 c:\WINNT
 c:\WINNT\extensions

 for good measure.

 php.ini in c:\winnt says:
  ; Directory in which the loadable extensions (modules) reside.
  extension_dir = ./extensions

 Manual says:

 For Windows users who wants to enable the GD libary:

 It took me some while to figure this out, but in the end it worked (and
still does) great.

 1. First download the latest (stable recommended) version of php
 2. Unzip to f.ex c:\php\

 3. Now you should have a file in c:\php\ that's named php.ini.dist (or
something like that). Rename that to php.ini and copy t to the root of your
Windows directory.

 4. Open the php.ini file (the easiers way is to open the run promnt at your
start menu and just type php.ini and hit enter).

 5. Search (ctrl+f) for extension_dir. The default value is set to ./,
make it to ./extensions

 6. Now you need to find where in the php.ini the modules for Windows is
located. Search for gd.

 7. Remove the ; char infront of this line: extension=php_gd2.dll

 8. Try make a php script with some image functions and see if it works.
F.ex $im = imageCreate(test.jpg);
 If you get a message that says something like imageCreate function doesn't
exist the gd libary is not loaded.

 9. That's all. Have fun using GD in Windows :)



http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any,
are confidential. If you are not the named recipient please notify the
sender and immediately delete it. You may not disseminate, distribute, or
forward this e-mail message or disclose its contents to anybody else.
Copyright and any other intellectual property rights in its contents are the
sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free.
The sender therefore does not accept liability for any errors or omissions
in the contents of this message which arise as a result of e-mail
transmission.  If verification is required please request a hard-copy
version.
 Although we routinely screen for viruses, addressees should check this
e-mail and any attachments for viruses. We make no representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that to ensure regulatory compliance and for the protection of
our customers and business, we may monitor and read e-mails sent to and from
our server(s).

For further important information, please read the  Important Legal
Information and Legal Statement at
http://www.cantor.com/legal_information.html

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] RE: Configuring GD for Windows: image functions

2003-10-24 Thread Dillon, John
I actually got this to work by changing ./extensions to c:\php\extensions.
Still don't know where the ./ is relative to.  There is no error on starting
Apache.

However, at the code lines:
line 161 $file=$img[$y];
line 162 $src_img=ImageCreateFromJPEG($file);

I get error:
imagecreatefromjpeg: Unable to open 'images/R0012448.JPG' for reading in
c:\program files\apache group\apache\htdocs\pics\apics3.php on line 162

and it fails on:
$src_img=ImageRotate($src_img,90,0);

with 'unknown function'.

The manual says:

the function imagerotate() is available when php is built with bundled gd.
So this function won't be available when you (or your webhosting) build the
php gd support with external gd packages, either from the distribution CD or
from www.boutell.com.

built php using '--with-gd', not '--with-gd=DIR' to have this function
working.

This behaviour exist up to php-4.3.3.


I have php 4.3.28.  So is it a solution to change to 4.3.3 as there is
something about Upgraded the bundled GD library to version GD 2.0.15 in
the announcements: http://www.php.net/release_4_3_3.php.

Thanks,
John


-Original Message-
From: Dillon, John 
Sent: 24 October 2003 15:22
To: '[EMAIL PROTECTED]'
Subject: Configuring GD for Windows: image functions


Could someone suggest where I am going wrong in configuring GD for Windows
please?

 Ruunning Apache 1.3.2 and PHP 4.3.28
 
 Apache httpd.conf says:
 
LoadModule php4_module c:/PHP/php-4.3.2-Win32/sapi/php4apache.dll
 
 php.ini is only in c:\WINNT and says
 
extension=php_gd2.dll
 
 When I start Apache it says:
 
...unable to load ./extensions\php_gd2.dll ...could not be found
 
 This file (773KB 27/08/02) is in:
 
 c:\PHP
 c:\PHP\extensions
 c:\PHP\php-4.3.2-Win32\extensions
 c:\Program Files\PHP
 c:\Program Files\PHP\extensions
 c:\WINNT
 c:\WINNT\extensions
 
 for good measure.
 
 php.ini in c:\winnt says:
; Directory in which the loadable extensions (modules) reside.
extension_dir = ./extensions
 
 Manual says:
 
 For Windows users who wants to enable the GD libary:
 
 It took me some while to figure this out, but in the end it worked (and
still does) great.
 
 1. First download the latest (stable recommended) version of php
 2. Unzip to f.ex c:\php\
 
 3. Now you should have a file in c:\php\ that's named php.ini.dist (or
something like that). Rename that to php.ini and copy t to the root of your
Windows directory.
 
 4. Open the php.ini file (the easiers way is to open the run promnt at your
start menu and just type php.ini and hit enter).
 
 5. Search (ctrl+f) for extension_dir. The default value is set to ./,
make it to ./extensions
 
 6. Now you need to find where in the php.ini the modules for Windows is
located. Search for gd.
 
 7. Remove the ; char infront of this line: extension=php_gd2.dll
 
 8. Try make a php script with some image functions and see if it works.
F.ex $im = imageCreate(test.jpg);
 If you get a message that says something like imageCreate function doesn't
exist the gd libary is not loaded.
 
 9. That's all. Have fun using GD in Windows :) 
 


   http://www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are 
confidential. If you are not the named recipient please notify the sender and 
immediately delete it. You may not disseminate, distribute, or forward this e-mail 
message or disclose its contents to anybody else. Copyright and any other intellectual 
property rights in its contents are the sole property of Cantor Fitzgerald.
 E-mail transmission cannot be guaranteed to be secure or error-free. The sender 
therefore does not accept liability for any errors or omissions in the contents of 
this message which arise as a result of e-mail transmission.  If verification is 
required please request a hard-copy version.
 Although we routinely screen for viruses, addressees should check this e-mail and 
any attachments for viruses. We make no representation or warranty as to the absence 
of viruses in this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our customers and business, we may monitor and 
read e-mails sent to and from our server(s). 

For further important information, please read the  Important Legal Information and 
Legal Statement at http://www.cantor.com/legal_information.html

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php