p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: jpgraph.php


Message #1 by sri_core@m... on Tue, 21 May 2002 20:15:30
Hi 
I downloaded jpgraph.php from the website http://www.aditus.nu/jpgraph/. 
and tried this first program chart.php but I am getting a weird error
Parse error: parse error, unexpected T_INCLUDE in 
c:\inetpub\wwwroot\chart.php on line 2
My code:
<? php
include ("jpgraph.php");
include ("jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);
$graph= new graph (300,200);
$graph->SetScale("textlin");
$lineplot=new LinePlot($ydata);
$graph->Add($LinePlot);

$graph->Stroke();
?>

Help Please....
Thanks
Sri
Message #2 by "Nikolai Devereaux" <yomama@u...> on Tue, 21 May 2002 12:28:31 -0700
> Parse error: parse error, unexpected T_INCLUDE in 
> c:\inetpub\wwwroot\chart.php on line 2
> My code:
> <? php
> include ("jpgraph.php");

Hi,

There shouldn't be a space between <? and php on line 1.

take care,

nik
Message #3 by sri_core@m... on Tue, 21 May 2002 21:11:41
> 
> Parse error: parse error, unexpected T_INCLUDE in 
> c:\inetpub\wwwroot\chart.php on line 2
> My code:
> <? php
> include ("jpgraph.php");

Hi,

There shouldn't be a space between <? and php on line 1.

take care,

nik
Thanks nik. Now the error is Fatal error: Call to undefined function: 
imagecreate() in c:\inetpub\wwwroot\jpgraph.php on line 1330
I searched the documentation in zend.com and it says I need GD library 
functions. There I go and searched and downloaded from sourceforge.net a 
converter from p2ng to gif.....Did not work again. There seems to be lot 
of issues for this software to work on windows. Now I am going to try in 
RedHat. Pls let me know if there is any simple way for me to implement 
this in windows. I went around many website and totally confused now.
Thanks
Sri
Message #4 by "Nikolai Devereaux" <yomama@u...> on Tue, 21 May 2002 14:27:39 -0700
> Thanks nik. Now the error is Fatal error: Call to undefined function:
> imagecreate() in c:\inetpub\wwwroot\jpgraph.php on line 1330
> I searched the documentation in zend.com and it says I need GD library
> functions. There I go and searched and downloaded from sourceforge.net a
> converter from p2ng to gif.....Did not work again. There seems to be lot
> of issues for this software to work on windows. Now I am going to try in
> RedHat. Pls let me know if there is any simple way for me to implement
> this in windows. I went around many website and totally confused now.

Not too much more, you just need to install the gd library for windows php.
Here's (imo) the easiest path for you to take:


Download the windows zip file (not the installer) from
www.php.net/downloads.php.  This zip contains all of the dlls you need to
install several extensions, including GD.

put php_gd.dll in your PHP directory.

uncomment the following line in your php.ini file:
  extension=php_gd.dll

put gd dll in your path, probably in WINNT\system32.  I think it's called
GDI32.dll or something like that, but don't quote me.


That should do it, iirc.  It's been a while.

nik

Message #5 by "Luis Morales" <luismorales@j...> on Tue, 21 May 2002 22:32:46 -0400
Hi,

Your problem is your php. PHP on windows not have support to gd libraries.
This are requiered by JD graph to make the charts.

I sugest you, download cygwin, install apache, and php dynamic modules and
try again Or try compile php on windows with gd support.

Good luck

LM

----- Original Message -----
From: <sri_core@m...>
To: "beginning php" <beginning_php@p...>
Sent: Tuesday, May 21, 2002 8:15 PM
Subject: [beginning_php] jpgraph.php


> Hi
> I downloaded jpgraph.php from the website http://www.aditus.nu/jpgraph/.
> and tried this first program chart.php but I am getting a weird error
> Parse error: parse error, unexpected T_INCLUDE in
> c:\inetpub\wwwroot\chart.php on line 2
> My code:
> <? php
> include ("jpgraph.php");
> include ("jpgraph_line.php");
>
> $ydata = array(11,3,8,12,5,1,9,13,5,7);
> $graph= new graph (300,200);
> $graph->SetScale("textlin");
> $lineplot=new LinePlot($ydata);
> $graph->Add($LinePlot);
>
> $graph->Stroke();
> ?>
>
> Help Please....
> Thanks
> Sri
>

Message #6 by "Nikolai Devereaux" <yomama@U...> on Tue, 21 May 2002 23:11:37 -0700
Uh... doesn't have support for the gd libraries?  GD is offered as a dll
extension to PHP for windows.  It doesn't come with the installer on the
downloads page, but it is bundled with the zipped version.

It even says so on the php download site:

<quote url="http://www.php.net/downloads">

PHP 4.2.1 zip package [5,217Kb] - 14 May 2002
(CGI binary plus server API versions for Apache, Apache2 (experimental),
ISAPI, NSAPI, Servlet and Pi3Web. MySQL support built-in, many extensions
included, packaged as zip)

PHP 4.2.1 installer [897Kb] - 13 May 2002
(CGI only, MySQL support built-in, packaged as Windows installer to install
and configure PHP, and automatically configure IIS, PWS and Xitami, with
manual configuration for other servers. N.B. no external extensions
included)

</quote>


Take care,

nik

Message #7 by "Srinivasan Prasanna" <Sri_Core@m...> on Wed, 22 May 2002 12:09:08 -0400
------=_NextPart_001_0001_01C20189.7A0488A0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Did everything listed below, but same error.
Fatal error: Call to undefined function: imagecreate() in c:\inetpub\wwwr
oot\jpgraph.php on line 1330

Any ideas?
Thanks
Sri 
 
----- Original Message -----
From: Nikolai Devereaux
Sent: Tuesday, May 21, 2002 5:34 PM
To: beginning php
Subject: [beginning_php] RE: jpgraph.php
 

> Thanks nik. Now the error is Fatal error: Call to undefined function:
> imagecreate() in c:\inetpub\wwwroot\jpgraph.php on line 1330
> I searched the documentation in zend.com and it says I need GD library
> functions. There I go and searched and downloaded from sourceforge.net 
a
> converter from p2ng to gif.....Did not work again. There seems to be lo
t
> of issues for this software to work on windows. Now I am going to try i
n
> RedHat. Pls let me know if there is any simple way for me to implement
> this in windows. I went around many website and totally confused now.

Not too much more, you just need to install the gd library for windows ph
p.
Here's (imo) the easiest path for you to take:


Download the windows zip file (not the installer) from
www.php.net/downloads.php.  This zip contains all of the dlls you need to
install several extensions, including GD.

put php_gd.dll in your PHP directory.

uncomment the following line in your php.ini file:
  extension=3Dphp_gd.dll

put gd dll in your path, probably in WINNT\system32.  I think it's called
GDI32.dll or something like that, but don't quote me.


That should do it, iirc.  It's been a while.

nik


to unsubscribe send a blank email to leave-beginning_php-823862D@p...
.com.Get more from the Web.  FREE MSN Explorer download : http://explorer
.msn.com

Message #8 by "Nikolai Devereaux" <yomama@u...> on Wed, 22 May 2002 09:50:37 -0700
Did everything listed below, but same error.
Fatal error: Call to undefined function: imagecreate() in
c:\inetpub\wwwroot\jpgraph.php on line 1330

Run a phpinfo script and see if it shows that the GD library is installed.
On my machine, I see the following table:

                  gd
+---------------------------------------+
|GD Support            | enabled        |
|GD Version            | 2.0 or higher  |
|FreeType Support      | enabled        |
|FreeType Linkage      | with freetype  |
|JPG Support           | enabled        |
|PNG Support           | enabled        |
|WBMP Support          | enabled        |
+---------------------------------------+

nik

Message #9 by sri_core@m... on Wed, 22 May 2002 20:12:43
> 
Did everything listed below, but same error.
Fatal error: Call to undefined function: imagecreate() in
c:\inetpub\wwwroot\jpgraph.php on line 1330

Run a phpinfo script and see if it shows that the GD library is installed.
On my machine, I see the following table:

                  gd
+---------------------------------------+
|GD Support            | enabled        |
|GD Version            | 2.0 or higher  |
|FreeType Support      | enabled        |
|FreeType Linkage      | with freetype  |
|JPG Support           | enabled        |
|PNG Support           | enabled        |
|WBMP Support          | enabled        |
+---------------------------------------+

nik

You caught me. when I run this phpinfo() I don't see the GD in the table. 
SO I am doing a mistake somewhere. I have downloaded php4.2.1 zip packages 
and installed the DLL's in the winnt/system32 also in the php directory . 
Any idea where I am missing?
Thanks
Sri
Message #10 by sri_core@m... on Wed, 22 May 2002 20:22:12
My entire phpinfo() page. Thought might be helpful if you know exactly 
where I need to install the gd.dll

PHP Version 4.2.1 

System Windows NT 5.0 build 2195 
Build Date May 12 2002 23:51:56 
Server API CGI 
Virtual Directory Support enabled 
Configuration File (php.ini) Path C:\WINNT\php.ini 
Debug Build no 
Thread Safety enabled 

 This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.2.0, Copyright (c) 1998-2002 Zend Technologies
 


---------------------------------------------------------------------------
-----

PHP 4 Credits

---------------------------------------------------------------------------
-----

Configuration
PHP Core 
Directive Local Value Master Value 
allow_call_time_pass_reference
 On On 
allow_url_fopen
 1 1 
always_populate_raw_post_data
 0 0 
arg_separator.input
 & & 
arg_separator.output
 & & 
asp_tags
 Off Off 
auto_append_file
 no value no value 
auto_prepend_file
 no value no value 
browscap
 no value no value 
default_charset
 no value no value 
default_mimetype
 text/html text/html 
define_syslog_variables
 Off Off 
disable_functions
 no value no value 
display_errors
 On On 
display_startup_errors
 Off Off 
doc_root
 no value no value 
enable_dl
 On On 
error_append_string
 no value no value 
error_log
 no value no value 
error_prepend_string
 no value no value 
error_reporting
 2047 2047 
expose_php
 On On 
extension_dir
 ./ ./ 
file_uploads
 1 1 
gpc_order
 GPC GPC 
highlight.bg
 #FFFFFF #FFFFFF 
highlight.comment
 #FF9900 #FF9900 
highlight.default
 #0000CC #0000CC 
highlight.html
 #000000 #000000 
highlight.keyword
 #006600 #006600 
highlight.string
 #CC0000 #CC0000 
html_errors
 On On 
ignore_user_abort
 Off Off 
implicit_flush
 Off Off 
include_path
 .;c:\php4\pear .;c:\php4\pear 
log_errors
 Off Off 
magic_quotes_gpc
 On On 
magic_quotes_runtime
 Off Off 
magic_quotes_sybase
 Off Off 
max_execution_time
 30 30 
open_basedir
 no value no value 
output_buffering
 no value no value 
output_handler
 no value no value 
post_max_size
 8M 8M 
precision
 12 12 
register_argc_argv
 On On 
register_globals
 Off Off 
safe_mode
 Off Off 
safe_mode_exec_dir
 no value no value 
safe_mode_gid
 Off Off 
safe_mode_include_dir
 no value no value 
sendmail_from
 me@l... me@l... 
sendmail_path
 no value no value 
short_open_tag
 On On 
SMTP
 localhost localhost 
sql.safe_mode
 Off Off 
track_errors
 Off Off 
unserialize_callback_func
 no value no value 
upload_max_filesize
 2M 2M 
upload_tmp_dir
 C:\PHP\uploadtemp C:\PHP\uploadtemp 
user_dir
 no value no value 
variables_order
 EGPCS EGPCS 
xmlrpc_error_number
 0 0 
xmlrpc_errors
 Off Off 
y2k_compliance
 Off Off 


standard
Regex Library Bundled library enabled 
Dynamic Library Support enabled 
Internal Sendmail Support for Windows enabled 

Directive Local Value Master Value 
assert.active
 1 1 
assert.bail
 0 0 
assert.callback
 no value no value 
assert.quiet_eval
 0 0 
assert.warning
 1 1 
safe_mode_allowed_env_vars
 PHP_ PHP_ 
safe_mode_protected_env_vars
 LD_LIBRARY_PATH LD_LIBRARY_PATH 
url_rewriter.tags
 a=href,area=href,frame=src,input=src,form=fakeentry 
a=href,area=href,frame=src,input=src,form=fakeentry 


bcmath
BCMath support enabled 


calendar
Calendar support enabled 


com
Directive Local Value Master Value 
com.allow_dcom
 Off Off 
com.autoregister_casesensitive
 On On 
com.autoregister_typelib
 Off Off 
com.autoregister_verbose
 Off Off 
com.typelib_file
 no value no value 


ftp
FTP support enabled 


mysql
MySQL Support enabled 
Active Persistent Links 0 
Active Links 0 
Client API version 3.23.39 

Directive Local Value Master Value 
mysql.allow_persistent
 On On 
mysql.default_host
 no value no value 
mysql.default_password
 no value no value 
mysql.default_port
 no value no value 
mysql.default_socket
 no value no value 
mysql.default_user
 no value no value 
mysql.max_links
 Unlimited Unlimited 
mysql.max_persistent
 Unlimited Unlimited 


odbc
ODBC Support enabled 
Active Persistent Links 0 
Active Links 0 
ODBC library Win32 

Directive Local Value Master Value 
odbc.allow_persistent
 On On 
odbc.check_persistent
 On On 
odbc.default_db
 no value no value 
odbc.default_pw
 no value no value 
odbc.default_user
 no value no value 
odbc.defaultbinmode
 return as is return as is 
odbc.defaultlrl
 return up to 4096 bytes return up to 4096 bytes 
odbc.max_links
 Unlimited Unlimited 
odbc.max_persistent
 Unlimited Unlimited 


pcre
PCRE (Perl Compatible Regular Expressions) Support enabled 
PCRE Library Version 3.4 22-Aug-2000 


session
Session Support enabled 

Directive Local Value Master Value 
session.auto_start
 Off Off 
session.cache_expire
 180 180 
session.cache_limiter
 nocache nocache 
session.cookie_domain
 no value no value 
session.cookie_lifetime
 0 0 
session.cookie_path
 / / 
session.cookie_secure
 Off Off 
session.entropy_file
 no value no value 
session.entropy_length
 0 0 
session.gc_maxlifetime
 1440 1440 
session.gc_probability
 1 1 
session.name
 PHPSESSID PHPSESSID 
session.referer_check
 no value no value 
session.save_handler
 files files 
session.save_path
 C:\PHP\sessiondata C:\PHP\sessiondata 
session.serialize_handler
 php php 
session.use_cookies
 On On 
session.use_trans_sid
 1 1 


xml
XML Support active 
XML Namespace Support active 
EXPAT Version 1.95.2 


wddx
WDDX Support enabled 


Additional Modules


Environment
Variable Value 
ALLUSERSPROFILE C:\Documents and Settings\All Users 
CommonProgramFiles C:\Program Files\Common Files 
COMPUTERNAME CORECOMM-5AT0D3 
ComSpec C:\WINNT\system32\cmd.exe 
CONTENT_LENGTH 0 
GATEWAY_INTERFACE CGI/1.1 
HTTP_ACCEPT */* 
HTTP_ACCEPT_LANGUAGE en-us 
HTTP_CONNECTION Keep-Alive 
HTTP_HOST localhost 
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) 
HTTP_ACCEPT_ENCODING gzip, deflate 
HTTPS off 
INSTANCE_ID 1 
LOCAL_ADDR 127.0.0.1 
NUMBER_OF_PROCESSORS 1 
Os2LibPath C:\WINNT\system32\os2\dll; 
OS Windows_NT 
Path C:\orant\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32
\Wbem;C:\Program Files\Common Files\Adaptec Shared\System;C:\Program 
Files\SecureCRT 3.0;C:\Program Files\Microsoft SQL Server\80
\Tools\BINN;c:\jdk1.3.1_02\bin 
PATH_INFO /sri.php 
PATH_TRANSLATED c:\inetpub\wwwroot\sri.php 
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH 
PROCESSOR_ARCHITECTURE x86 
PROCESSOR_IDENTIFIER x86 Family 15 Model 1 Stepping 2, GenuineIntel 
PROCESSOR_LEVEL 15 
PROCESSOR_REVISION 0102 
ProgramFiles C:\Program Files 
REMOTE_ADDR 127.0.0.1 
REMOTE_HOST 127.0.0.1 
REQUEST_METHOD GET 
SCRIPT_NAME /sri.php 
SERVER_NAME localhost 
SERVER_PORT 80 
SERVER_PORT_SECURE 0 
SERVER_PROTOCOL HTTP/1.1 
SERVER_SOFTWARE Microsoft-IIS/5.0 
SystemDrive C: 
SystemRoot C:\WINNT 
TEMP C:\WINNT\TEMP 
TMP C:\WINNT\TEMP 
USERPROFILE C:\Documents and Settings\Srinivasan Prasanna 
windir C:\WINNT 


PHP Variables
Variable Value 
_SERVER["ALLUSERSPROFILE"] C:\\Documents and Settings\\All Users  
_SERVER["CommonProgramFiles"] C:\\Program Files\\Common Files  
_SERVER["COMPUTERNAME"] CORECOMM-5AT0D3  
_SERVER["ComSpec"] C:\\WINNT\\system32\\cmd.exe  
_SERVER["CONTENT_LENGTH"] 0  
_SERVER["GATEWAY_INTERFACE"] CGI/1.1  
_SERVER["HTTP_ACCEPT"] */*  
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us  
_SERVER["HTTP_CONNECTION"] Keep-Alive  
_SERVER["HTTP_HOST"] localhost  
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 
5.0)  
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate  
_SERVER["HTTPS"] off  
_SERVER["INSTANCE_ID"] 1  
_SERVER["LOCAL_ADDR"] 127.0.0.1  
_SERVER["NUMBER_OF_PROCESSORS"] 1  
_SERVER["Os2LibPath"] C:\\WINNT\\system32\\os2\\dll;  
_SERVER["OS"] Windows_NT  
_SERVER["Path"] 
C:\\orant\\bin;C:\\WINNT\\system32;C:\\WINNT;C:\\WINNT\\System32
\\Wbem;C:\\Program Files\\Common Files\\Adaptec Shared\\System;C:\\Program 
Files\\SecureCRT 3.0;C:\\Program Files\\Microsoft SQL Server\\80
\\Tools\\BINN;c:\\jdk1.3.1_02\\bin  
_SERVER["PATH_INFO"] /sri.php  
_SERVER["PATH_TRANSLATED"] c:\\inetpub\\wwwroot\\sri.php  
_SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH  
_SERVER["PROCESSOR_ARCHITECTURE"] x86  
_SERVER["PROCESSOR_IDENTIFIER"] x86 Family 15 Model 1 Stepping 2, 
GenuineIntel  
_SERVER["PROCESSOR_LEVEL"] 15  
_SERVER["PROCESSOR_REVISION"] 0102  
_SERVER["ProgramFiles"] C:\\Program Files  
_SERVER["REMOTE_ADDR"] 127.0.0.1  
_SERVER["REMOTE_HOST"] 127.0.0.1  
_SERVER["REQUEST_METHOD"] GET  
_SERVER["SCRIPT_NAME"] /sri.php  
_SERVER["SERVER_NAME"] localhost  
_SERVER["SERVER_PORT"] 80  
_SERVER["SERVER_PORT_SECURE"] 0  
_SERVER["SERVER_PROTOCOL"] HTTP/1.1  
_SERVER["SERVER_SOFTWARE"] Microsoft-IIS/5.0  
_SERVER["SystemDrive"] C:  
_SERVER["SystemRoot"] C:\\WINNT  
_SERVER["TEMP"] C:\\WINNT\\TEMP  
_SERVER["TMP"] C:\\WINNT\\TEMP  
_SERVER["USERPROFILE"] C:\\Documents and Settings\\Srinivasan Prasanna  
_SERVER["windir"] C:\\WINNT  
_SERVER["PHP_SELF"] /sri.php  
_SERVER["argv"] Array
(
)

  
_SERVER["argc"] 0  
_ENV["ALLUSERSPROFILE"] C:\\Documents and Settings\\All Users  
_ENV["CommonProgramFiles"] C:\\Program Files\\Common Files  
_ENV["COMPUTERNAME"] CORECOMM-5AT0D3  
_ENV["ComSpec"] C:\\WINNT\\system32\\cmd.exe  
_ENV["CONTENT_LENGTH"] 0  
_ENV["GATEWAY_INTERFACE"] CGI/1.1  
_ENV["HTTP_ACCEPT"] */*  
_ENV["HTTP_ACCEPT_LANGUAGE"] en-us  
_ENV["HTTP_CONNECTION"] Keep-Alive  
_ENV["HTTP_HOST"] localhost  
_ENV["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 
5.0)  
_ENV["HTTP_ACCEPT_ENCODING"] gzip, deflate  
_ENV["HTTPS"] off  
_ENV["INSTANCE_ID"] 1  
_ENV["LOCAL_ADDR"] 127.0.0.1  
_ENV["NUMBER_OF_PROCESSORS"] 1  
_ENV["Os2LibPath"] C:\\WINNT\\system32\\os2\\dll;  
_ENV["OS"] Windows_NT  
_ENV["Path"] 
C:\\orant\\bin;C:\\WINNT\\system32;C:\\WINNT;C:\\WINNT\\System32
\\Wbem;C:\\Program Files\\Common Files\\Adaptec Shared\\System;C:\\Program 
Files\\SecureCRT 3.0;C:\\Program Files\\Microsoft SQL Server\\80
\\Tools\\BINN;c:\\jdk1.3.1_02\\bin  
_ENV["PATH_INFO"] /sri.php  
_ENV["PATH_TRANSLATED"] c:\\inetpub\\wwwroot\\sri.php  
_ENV["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH  
_ENV["PROCESSOR_ARCHITECTURE"] x86  
_ENV["PROCESSOR_IDENTIFIER"] x86 Family 15 Model 1 Stepping 2, 
GenuineIntel  
_ENV["PROCESSOR_LEVEL"] 15  
_ENV["PROCESSOR_REVISION"] 0102  
_ENV["ProgramFiles"] C:\\Program Files  
_ENV["REMOTE_ADDR"] 127.0.0.1  
_ENV["REMOTE_HOST"] 127.0.0.1  
_ENV["REQUEST_METHOD"] GET  
_ENV["SCRIPT_NAME"] /sri.php  
_ENV["SERVER_NAME"] localhost  
_ENV["SERVER_PORT"] 80  
_ENV["SERVER_PORT_SECURE"] 0  
_ENV["SERVER_PROTOCOL"] HTTP/1.1  
_ENV["SERVER_SOFTWARE"] Microsoft-IIS/5.0  
_ENV["SystemDrive"] C:  
_ENV["SystemRoot"] C:\\WINNT  
_ENV["TEMP"] C:\\WINNT\\TEMP  
_ENV["TMP"] C:\\WINNT\\TEMP  
_ENV["USERPROFILE"] C:\\Documents and Settings\\Srinivasan Prasanna  
_ENV["windir"] C:\\WINNT  


Thanks
Sri
Message #11 by "Nikolai Devereaux" <yomama@u...> on Wed, 22 May 2002 12:34:21 -0700
> You caught me. when I run this phpinfo() I don't see the GD in the table.
> SO I am doing a mistake somewhere. I have downloaded php4.2.1 zip
> packages
> and installed the DLL's in the winnt/system32 also in the php directory .
> Any idea where I am missing?


Did you enable the extension in php.ini?  Just having the DLL's on your hard
drive doens't mean that PHP knows about them -- you probably forgot to
uncomment the extension=php_gd.dll line in php.ini.

nik

Message #12 by sri_core@m... on Wed, 22 May 2002 20:53:25
Sorry for asking this dumb question. In the ini file is every line which 
has got a ; is a commented line. If so then I removed the ; and 
uncommented now. But getting a warning through my phpinfo() script 
as "Unable to load dynamic library'./php_gd.dll' - The specific module 
could not be found.

Thanks
Sri

> 
> You caught me. when I run this phpinfo() I don't see the GD in the table.
> SO I am doing a mistake somewhere. I have downloaded php4.2.1 zip
> packages
> and installed the DLL's in the winnt/system32 also in the php directory .
> Any idea where I am missing?


Did you enable the extension in php.ini?  Just having the DLL's on your 
hard
drive doens't mean that PHP knows about them -- you probably forgot to
uncomment the extension=php_gd.dll line in php.ini.

nik

Message #13 by sri_core@m... on Wed, 22 May 2002 20:58:53
> Sorry for asking this dumb question. In the ini file is every line which 
h> as got a ; is a commented line. If so then I removed the ; and 
u> ncommented now. But getting a warning through my phpinfo() script 
a> s "Unable to load dynamic library'./php_gd.dll' - The specific module 
c> ould not be found.

> Thanks
S> ri

> > 
>>  You caught me. when I run this phpinfo() I don't see the GD in the 
table.
>>  SO I am doing a mistake somewhere. I have downloaded php4.2.1 zip
>>  packages
>>  and installed the DLL's in the winnt/system32 also in the php 
directory .
>>  Any idea where I am missing?

> 
D> id you enable the extension in php.ini?  Just having the DLL's on your 
h> ard
d> rive doens't mean that PHP knows about them -- you probably forgot to
u> ncomment the extension=php_gd.dll line in php.ini.

> nik

Also, do you think renaming either the dll or the ini file as gds32.dll 
will help . If it is gds32 then I have to rename ini from php_gd.dll to 
gds32.dll. Or I should n't touch the naming?
Thanks
Sri
Message #14 by "Nikolai Devereaux" <yomama@u...> on Wed, 22 May 2002 13:01:18 -0700
> Sorry for asking this dumb question. In the ini file is every line which
> has got a ; is a commented line. If so then I removed the ; and
> uncommented now. But getting a warning through my phpinfo() script
> as "Unable to load dynamic library'./php_gd.dll' - The specific module
> could not be found.

We're getting close!

Where is php_gd.dll in your filesystem?  For some reason, I've never gotten
PHP to properly use the extension_dir directive in php.ini.  Even when I
added that extension dir to the system path, it still couldn't find the
files.

The only thing that worked for me is to modify the extension_dir line (in
php.ini) to look like this:

extension_dir = c:\php\

and move the php_gd.dll file into that directory.

take care,

nik

Message #15 by "Nikolai Devereaux" <yomama@u...> on Wed, 22 May 2002 13:03:35 -0700
> Also, do you think renaming either the dll or the ini file as gds32.dll
> will help . If it is gds32 then I have to rename ini from php_gd.dll to
> gds32.dll. Or I should n't touch the naming?

NO!  don't rename any files!!!

gds32.dll should go into your system path (winnt\system32\ is a good
choice), and php_gd.dll should go into whatever dir you specify is your
extension_dir in php.ini.


Again, the only three steps I mentioned in an earlier email are:

*  Put the gds32.dll in the system path
*  Put the php_gd.dll in c:\php\  (this is my extension_dir)
*  uncomment the extension=php_gd.dll line in php.ini

nik

Message #16 by "Srinivasan Prasanna" <Sri_Core@m...> on Wed, 22 May 2002 16:36:22 -0400
------=_NextPart_001_0000_01C201AE.CE8141F0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

My file extension_dir in php.ini is
extension_dir =3D C:\PHP\php-4.2.1-Win32\extensions
and I have my php_gd.dll in this directory extensions still the same erro
r.  

PHP Warning: Unable to load dynamic library './php_gd.dll' - The specifie
d module could not be found. in Unknown on line 0 

Help Pls..........
Thanks
Sri

----- Original Message -----
From: Nikolai Devereaux
Sent: Wednesday, May 22, 2002 4:18 PM
To: beginning php
Subject: [beginning_php] RE: jpgraph.php
 

> Sorry for asking this dumb question. In the ini file is every line whic
h
> has got a ; is a commented line. If so then I removed the ; and
> uncommented now. But getting a warning through my phpinfo() script
> as "Unable to load dynamic library'./php_gd.dll' - The specific module
> could not be found.

We're getting close!

Where is php_gd.dll in your filesystem?  For some reason, I've never gott
en
PHP to properly use the extension_dir directive in php.ini.  Even when I
added that extension dir to the system path, it still couldn't find the
files.

The only thing that worked for me is to modify the extension_dir line (in
php.ini) to look like this:

extension_dir =3D c:\php\

and move the php_gd.dll file into that directory.

take care,

nik


to unsubscribe send a blank email to leave-beginning_php-823862D@p...
.com.Get more from the Web.  FREE MSN Explorer download : http://explorer
.msn.com

Message #17 by Sri_core@m... on Wed, 22 May 2002 21:49:04
I am running php 4.2.1 is this an issue?
Thanks
Sri
Message #18 by "Nikolai Devereaux" <yomama@U...> on Wed, 22 May 2002 14:12:43 -0700
> My file extension_dir in php.ini is
> extension_dir = C:\PHP\php-4.2.1-Win32\extensions
> and I have my php_gd.dll in this directory
> extensions still the same error.


Okay, perhaps I wasn't clear enough when I posted this:
------
For some reason, I've never gotten PHP to properly use the extension_dir
directive in php.ini.  Even when I added that extension dir to the system
path, it still couldn't find the files.

The only thing that worked for me is to modify the extension_dir line (in
php.ini) to look like this:

extension_dir = c:\php\

and move the php_gd.dll file into that directory.
------

Let me rephrase it:

I've never gotten PHP to find a php_xxx.dll file that wasn't in the same
directory as php.exe.  Change your extension_dir to be this directory and
move your php_gd.dll file there.


nik


Message #19 by sri_core@m... on Wed, 22 May 2002 22:34:16
> 
> My file extension_dir in php.ini is
> extension_dir = C:\PHP\php-4.2.1-Win32\extensions
> and I have my php_gd.dll in this directory
> extensions still the same error.


Okay, perhaps I wasn't clear enough when I posted this:
------
For some reason, I've never gotten PHP to properly use the extension_dir
directive in php.ini.  Even when I added that extension dir to the system
path, it still couldn't find the files.

The only thing that worked for me is to modify the extension_dir line (in
php.ini) to look like this:

extension_dir = c:\php\

and move the php_gd.dll file into that directory.
------

Let me rephrase it:

I've never gotten PHP to find a php_xxx.dll file that wasn't in the same
directory as php.exe.  Change your extension_dir to be this directory and
move your php_gd.dll file there.


nik


Sorry the same error. Now my extension_dir =c:\php\ and my php.exe and 
pgp_gd.dll is in the same directory as c;\php\.....
any more help pls....
thanks
Sri
Message #20 by sri_core@m... on Wed, 22 May 2002 23:33:49
I just can't get this working. Guess had to sleep with this. I am looking 
forward for any suggestions from you.
Thanks much as always :)
Sri
Message #21 by "Nikolai Devereaux" <yomama@U...> on Wed, 22 May 2002 15:36:49 -0700
> I just can't get this working. Guess had to sleep with this. I am looking
> forward for any suggestions from you.
> Thanks much as always :)

To tell you the truth, I don't know where else to go.

I have one more thought, it's that you just copied the php.exe and
php_gd.dll files into c:\php\ and tried again.  if that's the case, it won't
work because you probably still have your webserver running the php.exe
that's in c:\php\php-4.2.1\

I think there might be some confusion about what I'm trying to get you to
do.

When I said "move your php_gd.dll file into the same dir as php.exe" I did
_NOT_ intend for you to move your executable around!  I can see how my post
was confusing because I made specific reference to c:\php\.  However, I
thought I was pretty clear that c:\php\ is where my php.exe is, and told you
to change your extension_dir to where YOUR php.exe was, and copy the
php_gd.dll file there.


Just because it's been a long day, let me sum up.

Leave your php.exe file wherever it was to begin with.  Modify your
extension_dir to point to this directory.  EVEN IF IT IS NOT c:\php\.  move
your php_gd.dll file into this directory, too.


If this doesn't work, I'm sorry -- there's nothing else I can really
suggest.

Take care,

nik

Message #22 by "Guitargod \(E-mail\)" <kaykay@g...> on Thu, 23 May 2002 12:02:48 +0530
If I were you, I'd start afresh : Use the default filenames in the book and
foloow it to the letter. It looks like the GD extensions haven't been
uncommented properly and save the .ini file, or else you probably didn't
restart the webserver. (These are all errors that I ran into :) So I'd try
and start afresh, and follow the book. Or if you want to take a shortcut:
move all the files from \php 4.2.1\ to C:\php, run through the instructions
again.
-K

-----Original Message-----
From: sri_core@m... [mailto:sri_core@m...]
Sent: 22 May 2002 23:34
To: beginning php
Subject: [beginning_php] RE: jpgraph.php


I just can't get this working. Guess had to sleep with this. I am looking
forward for any suggestions from you.
Thanks much as always :)
Sri
Message #23 by "Dan Ostrowski" <dan@t...> on Thu, 23 May 2002 16:39:11
hehe. i'm glad i use linux.

;)

dan
Message #24 by "Srinivasan Prasanna" <Sri_Core@m...> on Thu, 23 May 2002 13:34:45 -0400
------=_NextPart_001_0001_01C2025E.9A5E2E00
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

If any of you have GD library got installed in windows what version of ph
p are you using? I have php4.2.1.
Thanks
Sri 
 
----- Original Message -----
From: Dan Ostrowski
Sent: Thursday, May 23, 2002 11:47 AM
To: beginning php
Subject: [beginning_php] RE: jpgraph.php
 
hehe. i'm glad i use linux.

;)

dan
to unsubscribe send a blank email to leave-beginning_php-823862D@p...
.com.Get more from the Web.  FREE MSN Explorer download : http://explorer
.msn.com

Message #25 by "Nikolai Devereaux" <yomama@u...> on Thu, 23 May 2002 11:20:38 -0700
> If any of you have GD library got installed in windows
> what version of php are you using? I have php4.2.1.

I just downloaded php 4.2.1 using the zip file from www.php.net/

It took me longer to write this email than it did to install it with GD
support enabled.


Here's what I did.

1)  Unzipped it to c:\
    This put everything into c:\php-4.2.1-Win32\ automatically


2)  Edited httpd.conf and modified the ScriptAlias directive:

ScriptAlias /php/ "c:/php-4.2.1-Win32/"

    Here are other php-relevant lines from httpd.conf:

AddType application/x-httpd-php .php .html .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps

Action application/x-httpd-php "/php/php.exe"

    NOTE:  the "/php/" in the Action directive refers to the ScriptAlias
path set on the first line.  The only line I changed in my httpd.conf file
was ScriptAlias.


3)  Moved php_gd.dll into the same directory as php.exe.
    php_gd.dll was in c:\php-4.2.1-Win32\extensions originally.
    It is now in c:\php-4.2.1-Win32\

4)  Moved gds32.dll a directory in my system path.  (c:\winnt\system32)


5)  Restarted Apache to process the new httpd.conf.


6)  Tested the installation with phpinfo():
             gd
GD Support                  enabled
GD Version                  1.6.2 or higher
FreeType Support            enabled
FreeType Linkage            with TTF library
JPG Support                 enabled
PNG Support                 enabled
WBMP Support                enabled


7)  Tested GD with this script:

<?php
header ("Content-type: image/png");
$im = @imagecreate (105, 20)
    or die ("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 233, 14, 91);
imagestring ($im, 1, 5, 5,  "A Simple Text String", $text_color);
imagepng ($im);
?>


take care,

Nik

Message #26 by "Guitargod \(E-mail\)" <kaykay@g...> on Fri, 24 May 2002 00:01:23 +0530
I'm not much of a *nix man.. and I didn't really know that VIM had been
ported to Win32...

but in any case Lemmy is great, and I'm very satisfied with it.
-K

-----Original Message-----
From: Dan Ostrowski [mailto:dan@t...]
Sent: 23 May 2002 16:39
To: beginning php
Subject: [beginning_php] RE: jpgraph.php


hehe. i'm glad i use linux.

;)

dan

Message #27 by "Guitargod \(E-mail\)" <kaykay@g...> on Fri, 24 May 2002 00:01:54 +0530
Even when you can't play Counterstrike/Flashpoint/SIMS/Quake/Larry 7?
*grin*
but of course you have a dual boot system :)
-K

-----Original Message-----
From: Dan Ostrowski [mailto:dan@t...]
Sent: 23 May 2002 16:39
To: beginning php
Subject: [beginning_php] RE: jpgraph.php


hehe. i'm glad i use linux.

;)

dan

Message #28 by "Nikolai Devereaux" <yomama@u...> on Thu, 23 May 2002 11:32:40 -0700
Forgot something:

I copied php.ini-dist to c:\winnt and uncommented the extension=php_gd.dll
line in it.

nik

Message #29 by "Guitargod \(E-mail\)" <kaykay@g...> on Fri, 24 May 2002 00:14:15 +0530
It's a library.. so you should be concerned with which installation file was
used to install PHP. Best thing (as I mentioned im the previous post) is to
start afresh. Download the entire zip file (NOT the ~900k installer) and
install it step by step as according to the book.

-K
-----Original Message-----
From: Srinivasan Prasanna [mailto:Sri_Core@m...]
Sent: 23 May 2002 23:05
To: beginning php
Subject: [beginning_php] RE: jpgraph.php


If any of you have GD library got installed in windows what version of php
are you using? I have php4.2.1.
Thanks
Sri

Message #30 by "Nikolai Devereaux" <yomama@u...> on Thu, 23 May 2002 11:49:05 -0700
> Even when you can't play Counterstrike/Flashpoint/SIMS/Quake/Larry 7?
> *grin*
> but of course you have a dual boot system :)

CounterStrike is the number one reason why most of my fellow CS majors at
UCSD failed their classes.

I think Counter Strike was less effective as a game as it was a filter for
the irresponsible, lazy, and/or easily addicted.  A kind of academic-level
social darwinism at work.

I think the only exercise these people got was playing Dance Dance
Revolution at the local arcades.

The sun?  Fresh air?  What are those?  Who needs them, what with the new
graphics module patches to the game??  The sun looks so real on the screen
that I put on sunblock before I play now!!

nik

Message #31 by "Nikolai Devereaux" <yomama@u...> on Thu, 23 May 2002 11:50:58 -0700
Okay, Jake's being picky:

> I copied php.ini-dist to c:\winnt and uncommented the extension=php_gd.dll
> line in it.

Of course, I renamed the copy in c:\winnt to "php.ini", but considering the
incredible amount of time and the level of detail in the posts on this
thread, we really should not leave anything to chance.

nik

Message #32 by "Guitargod \(E-mail\)" <kaykay@g...> on Fri, 24 May 2002 00:22:26 +0530
something along the lines of:
	Morpheus: Do you think that's air you're breathing right now?
		    Now hit me. Don't just think you can.. KNOW you can....
*grin* I love that line...

...anyways ...agreed Counter Strike lends a new meaning to "CS major" :)

-K



-----Original Message-----
From: Nikolai Devereaux [mailto:yomama@u...]
Sent: 24 May 2002 00:19
To: beginning php
Subject: [beginning_php] RE: jpgraph.php



> Even when you can't play Counterstrike/Flashpoint/SIMS/Quake/Larry 7?
> *grin*
> but of course you have a dual boot system :)

CounterStrike is the number one reason why most of my fellow CS majors at
UCSD failed their classes.

I think Counter Strike was less effective as a game as it was a filter for
the irresponsible, lazy, and/or easily addicted.  A kind of academic-level
social darwinism at work.

I think the only exercise these people got was playing Dance Dance
Revolution at the local arcades.

The sun?  Fresh air?  What are those?  Who needs them, what with the new
graphics module patches to the game??  The sun looks so real on the screen
that I put on sunblock before I play now!!

nik


Message #33 by "Srinivasan Prasanna" <Sri_Core@m...> on Thu, 23 May 2002 16:48:09 -0400
------=_NextPart_001_0000_01C20279.9E503470
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

You are right...after going so far...I will try to get this one up. Not s
uccessful so far. One diff we both have I have IIS as my server. I am goi
ng to try exactly your path now.
Thanks much Nik!
Sri 
 
----- Original Message -----
From: Nikolai Devereaux
Sent: Thursday, May 23, 2002 3:29 PM
To: beginning php
Subject: [beginning_php] RE: jpgraph.php
 

Forgot something:

I copied php.ini-dist to c:\winnt and uncommented the extension=3Dphp_gd.
dll
line in it.

nik


to unsubscribe send a blank email to leave-beginning_php-823862D@p...
.com.Get more from the Web.  FREE MSN Explorer download : http://explorer
.msn.com

Message #34 by sri_core@m... on Thu, 23 May 2002 22:59:21
IT WORKED NOW!!!!!
Win 2k + Apache did the magic. Also, since I had to go through this 
frustation for about 33 hours just for installation I think IIS and php 
with GD library doesn't seem to work. Some one out there might want to 
write something to try to patch up this defect. Or I might be totally 
wrong. If there is a way please share it. 
Nik deserves a big hand. I don't think anyone could have motivated me to 
go for it like this dude. I have never seen your picture but the moment I 
saw my line graph in the browser I felt you looking for this moment from 
behind my shoulder. Thanks a lot Nik and who ever posted religiously their 
ideas and tips!!!! 
I really appreciate your help my friend. People like you are blessing in 
disguise for many out there like me...... Continue your great work.
Thanks again
Sri
Message #35 by "Nikolai Devereaux" <yomama@u...> on Thu, 23 May 2002 14:55:37 -0700
Thank you for the kind words!

I'm glad to hear that things are (finally) working okay.

nik
Message #36 by Daniel Walker <dan@w...> on Fri, 24 May 2002 08:35:42 +0000
That'd be Quake 3 that was written on Linux and then ported to Windows, t
hen,
would it ;)?

Geez, guys, "Life's too short... Play less" (or buy a game cube).

I'm delighted to see that the WierdOS debugger (recently cited as a reaso
n to
"upgrade" to XP) is, itself, a security vulnerability:

http://www.theinquirer.net/24050204.htm
http://www.theregister.co.uk/content/55/25407.html

Yet Another Reason to Love Linux :)

On Thursday 23 May 2002 18:49, you wrote:
> > Even when you can't play Counterstrike/Flashpoint/SIMS/Quake/Larry 7?
> > *grin*
> > but of course you have a dual boot system :)
>
> CounterStrike is the number one reason why most of my fellow CS majors 
at
> UCSD failed their classes.
>
> I think Counter Strike was less effective as a game as it was a filter 
for
> the irresponsible, lazy, and/or easily addicted.  A kind of academic-le
vel
> social darwinism at work.
>
> I think the only exercise these people got was playing Dance Dance
> Revolution at the local arcades.
>
> The sun?  Fresh air?  What are those?  Who needs them, what with the ne
w
> graphics module patches to the game??  The sun looks so real on the scr
een
> that I put on sunblock before I play now!!
>
> nik
>
>

Message #37 by "Guitargod \(E-mail\)" <kaykay@g...> on Fri, 24 May 2002 20:28:31 +0530
don't get me wrong... I've got nothing against *nix...but still ... I can't
believe the number of people who bag the shyte out of WinOS, who all have a
dual/tri boot running on their system...coz of games...

Aside from this ... does anybody know how to setup the IIS 5.0 mail
server...or give me a hand with my mail() errors? I'm not getting access to
my server apparently... the SMTP "virtual" server that was listed under the
IIS MMC is missing... and the documentation is very poor... and I can't
really find out how to get the bugger back..!
any help is appreciated!

:)
and btw I take it Dan Walker != Dan Ostrowski?

Cheers
-KayKay

-----Original Message-----
From: Daniel Walker [mailto:dan@w...]
Sent: 24 May 2002 14:06
To: beginning php
Subject: [beginning_php] RE: jpgraph.php


That'd be Quake 3 that was written on Linux and then ported to Windows,
then,
would it ;)?

Geez, guys, "Life's too short... Play less" (or buy a game cube).

I'm delighted to see that the WierdOS debugger (recently cited as a reason
to
"upgrade" to XP) is, itself, a security vulnerability:

http://www.theinquirer.net/24050204.htm
http://www.theregister.co.uk/content/55/25407.html

Yet Another Reason to Love Linux :)

On Thursday 23 May 2002 18:49, you wrote:
> > Even when you can't play Counterstrike/Flashpoint/SIMS/Quake/Larry 7?
> > *grin*
> > but of course you have a dual boot system :)
>
> CounterStrike is the number one reason why most of my fellow CS majors at
> UCSD failed their classes.
>
> I think Counter Strike was less effective as a game as it was a filter for
> the irresponsible, lazy, and/or easily addicted.  A kind of academic-level
> social darwinism at work.
>
> I think the only exercise these people got was playing Dance Dance
> Revolution at the local arcades.
>
> The sun?  Fresh air?  What are those?  Who needs them, what with the new
> graphics module patches to the game??  The sun looks so real on the screen
> that I put on sunblock before I play now!!
>
> nik
>
>




  Return to Index