How to configure GD

Reply

Join Date: Jul 2006
Posts: 132
Reputation: ryy705 is an unknown quantity at this point 
Solved Threads: 0
ryy705 ryy705 is offline Offline
Junior Poster

How to configure GD

 
0
  #1
Jun 9th, 2008
Hello,
I call the imagettfbbox function like so imagettfbbox($font_size, 0, 'monofont.ttf', $code) but its generating the following error: 'imagettfbbox() [function.imagettfbbox]: Could not find/open font'

monofont.ttf is in the same folder. And the code executes fine on the server. It just won't work on my computer. This leads me to believe that GD is not installed correctly on my computer.
I get the following info about GD by running phpinfo():
  1. GD Support enabled
  2. GD Version 2.0 or higher
  3. FreeType Support enabled
  4. FreeType Linkage with freetype
  5. FreeType Version 2.3.5
  6. T1Lib Support enabled
  7. GIF Read Support enabled
  8. GIF Create Support enabled
  9. JPG Support enabled
  10. PNG Support enabled
  11. WBMP Support enabled

Following is my php.ini file. None of it makes any sense to me. Is there a way to tell if there is anything wrong with my GD configuration?
  1. [PHP]
  2. ;;;;;;;;;;;
  3. ; WARNING ;
  4. ;;;;;;;;;;;
  5. ; This is the default settings file for new PHP installations.
  6. ; By default, PHP installs itself with a configuration suitable for
  7. ; development purposes, and *NOT* for production purposes.
  8. ; For several security-oriented considerations that should be taken
  9. ; before going online with your site, please consult php.ini-recommended
  10. ; and http://php.net/manual/en/security.php.
  11.  
  12.  
  13. ;;;;;;;;;;;;;;;;;;;
  14. ; About php.ini ;
  15. ;;;;;;;;;;;;;;;;;;;
  16. ; This file controls many aspects of PHP's behavior. In order for PHP to
  17. ; read it, it must be named 'php.ini'. PHP looks for it in the current
  18. ; working directory, in the path designated by the environment variable
  19. ; PHPRC, and in the path that was defined in compile time (in that order).
  20. ; Under Windows, the compile-time path is the Windows directory. The
  21. ; path in which the php.ini file is looked for can be overridden using
  22. ; the -c argument in command line mode.
  23. ;
  24. ; The syntax of the file is extremely simple. Whitespace and Lines
  25. ; beginning with a semicolon are silently ignored (as you probably guessed).
  26. ; Section headers (e.g. [Foo]) are also silently ignored, even though
  27. ; they might mean something in the future.
  28. ;
  29. ; Directives are specified using the following syntax:
  30. ; directive = value
  31. ; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
  32. ;
  33. ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
  34. ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
  35. ; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo").
  36. ;
  37. ; Expressions in the INI file are limited to bitwise operators and parentheses:
  38. ; | bitwise OR
  39. ; & bitwise AND
  40. ; ~ bitwise NOT
  41. ; ! boolean NOT
  42. ;
  43. ; Boolean flags can be turned on using the values 1, On, True or Yes.
  44. ; They can be turned off using the values 0, Off, False or No.
  45. ;
  46. ; An empty string can be denoted by simply not writing anything after the equal
  47. ; sign, or by using the None keyword:
  48. ;
  49. ; foo = ; sets foo to an empty string
  50. ; foo = none ; sets foo to an empty string
  51. ; foo = "none" ; sets foo to the string 'none'
  52. ;
  53. ; If you use constants in your value, and these constants belong to a
  54. ; dynamically loaded extension (either a PHP extension or a Zend extension),
  55. ; you may only use these constants *after* the line that loads the extension.
  56. ;
  57. ;
  58. ;;;;;;;;;;;;;;;;;;;
  59. ; About this file ;
  60. ;;;;;;;;;;;;;;;;;;;
  61. ; All the values in the php.ini-dist file correspond to the builtin
  62. ; defaults (that is, if no php.ini is used, or if you delete these lines,
  63. ; the builtin defaults will be identical).
  64.  
  65.  
  66. ;;;;;;;;;;;;;;;;;;;;
  67. ; Language Options ;
  68. ;;;;;;;;;;;;;;;;;;;;
  69.  
  70. ; Enable the PHP scripting language engine under Apache.
  71. engine = On
  72.  
  73. ; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
  74. zend.ze1_compatibility_mode = Off
  75.  
  76. ; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
  77. ; NOTE: Using short tags should be avoided when developing applications or
  78. ; libraries that are meant for redistribution, or deployment on PHP
  79. ; servers which are not under your control, because short tags may not
  80. ; be supported on the target server. For portable, redistributable code,
  81. ; be sure not to use short tags.
  82. short_open_tag = On
  83.  
  84. ; Allow ASP-style <% %> tags.
  85. asp_tags = Off
  86.  
  87. ; The number of significant digits displayed in floating point numbers.
  88. precision = 12
  89.  
  90. ; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
  91. y2k_compliance = On
  92.  
  93. ; Output buffering allows you to send header lines (including cookies) even
  94. ; after you send body content, at the price of slowing PHP's output layer a
  95. ; bit. You can enable output buffering during runtime by calling the output
  96. ; buffering functions. You can also enable output buffering for all files by
  97. ; setting this directive to On. If you wish to limit the size of the buffer
  98. ; to a certain size - you can use a maximum number of bytes instead of 'On', as
  99. ; a value for this directive (e.g., output_buffering=4096).
  100. output_buffering = Off
  101.  
  102. ; You can redirect all of the output of your scripts to a function. For
  103. ; example, if you set output_handler to "mb_output_handler", character
  104. ; encoding will be transparently converted to the specified encoding.
  105. ; Setting any output handler automatically turns on output buffering.
  106. ; Note: People who wrote portable scripts should not depend on this ini
  107. ; directive. Instead, explicitly set the output handler using ob_start().
  108. ; Using this ini directive may cause problems unless you know what script
  109. ; is doing.
  110. ; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
  111. ; and you cannot use both "ob_gzhandler" and "zlib.output_compression".
  112. ; Note: output_handler must be empty if this is set 'On' !!!!
  113. ; Instead you must use zlib.output_handler.
  114. ;output_handler =
  115.  
  116. ; Transparent output compression using the zlib library
  117. ; Valid values for this option are 'off', 'on', or a specific buffer size
  118. ; to be used for compression (default is 4KB)
  119. ; Note: Resulting chunk size may vary due to nature of compression. PHP
  120. ; outputs chunks that are few hundreds bytes each as a result of
  121. ; compression. If you prefer a larger chunk size for better
  122. ; performance, enable output_buffering in addition.
  123. ; Note: You need to use zlib.output_handler instead of the standard
  124. ; output_handler, or otherwise the output will be corrupted.
  125. zlib.output_compression = Off
  126. ;zlib.output_compression_level = -1
  127.  
  128. ; You cannot specify additional output handlers if zlib.output_compression
  129. ; is activated here. This setting does the same as output_handler but in
  130. ; a different order.
  131. ;zlib.output_handler =
  132.  
  133. ; Implicit flush tells PHP to tell the output layer to flush itself
  134. ; automatically after every output block. This is equivalent to calling the
  135. ; PHP function flush() after each and every call to print() or echo() and each
  136. ; and every HTML block. Turning this option on has serious performance
  137. ; implications and is generally recommended for debugging purposes only.
  138. implicit_flush = Off
  139.  
  140. ; The unserialize callback function will be called (with the undefined class'
  141. ; name as parameter), if the unserializer finds an undefined class
  142. ; which should be instantiated.
  143. ; A warning appears if the specified function is not defined, or if the
  144. ; function doesn't include/implement the missing class.
  145. ; So only set this entry, if you really want to implement such a
  146. ; callback-function.
  147. unserialize_callback_func=
  148.  
  149. ; When floats & doubles are serialized store serialize_precision significant
  150. ; digits after the floating point. The default value ensures that when floats
  151. ; are decoded with unserialize, the data will remain the same.
  152. serialize_precision = 100
  153.  
  154. ; Whether to enable the ability to force arguments to be passed by reference
  155. ; at function call time. This method is deprecated and is likely to be
  156. ; unsupported in future versions of PHP/Zend. The encouraged method of
  157. ; specifying which arguments should be passed by reference is in the function
  158. ; declaration. You're encouraged to try and turn this option Off and make
  159. ; sure your scripts work properly with it in order to ensure they will work
  160. ; with future versions of the language (you will receive a warning each time
  161. ; you use this feature, and the argument will be passed by value instead of by
  162. ; reference).
  163. allow_call_time_pass_reference = On
  164.  
  165. ;
  166. ; Safe Mode
  167. ;
  168. ; NOTE: this is considered a "broken" security measure.
  169. ; Applications relying on this feature will not recieve full
  170. ; support by the security team. For more information please
  171. ; see /usr/share/doc/php5-common/README.Debian.security
  172. ;
  173. safe_mode = Off
  174.  
  175. ; By default, Safe Mode does a UID compare check when
  176. ; opening files. If you want to relax this to a GID compare,
  177. ; then turn on safe_mode_gid.
  178. safe_mode_gid = Off
  179.  
  180. ; When safe_mode is on, UID/GID checks are bypassed when
  181. ; including files from this directory and its subdirectories.
  182. ; (directory must also be in include_path or full path must
  183. ; be used when including)
  184. safe_mode_include_dir =
  185.  
  186. ; When safe_mode is on, only executables located in the safe_mode_exec_dir
  187. ; will be allowed to be executed via the exec family of functions.
  188. safe_mode_exec_dir =
  189.  
  190. ; Setting certain environment variables may be a potential security breach.
  191. ; This directive contains a comma-delimited list of prefixes. In Safe Mode,
  192. ; the user may only alter environment variables whose names begin with the
  193. ; prefixes supplied here. By default, users will only be able to set
  194. ; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).
  195. ;
  196. ; Note: If this directive is empty, PHP will let the user modify ANY
  197. ; environment variable!
  198. safe_mode_allowed_env_vars = PHP_
  199.  
  200. ; This directive contains a comma-delimited list of environment variables that
  201. ; the end user won't be able to change using putenv(). These variables will be
  202. ; protected even if safe_mode_allowed_env_vars is set to allow to change them.
  203. safe_mode_protected_env_vars = LD_LIBRARY_PATH
  204.  
  205. ; open_basedir, if set, limits all file operations to the defined directory
  206. ; and below. This directive makes most sense if used in a per-directory
  207. ; or per-virtualhost web server configuration file. This directive is
  208. ; *NOT* affected by whether Safe Mode is turned On or Off.
  209.  
  210. ; NOTE: this is considered a "broken" security measure.
  211. ; Applications relying on this feature will not recieve full
  212. ; support by the security team. For more information please
  213. ; see /usr/share/doc/php5-common/README.Debian.security
  214. ;
  215.  
  216. ;open_basedir =
  217.  
  218. ; This directive allows you to disable certain functions for security reasons.
  219. ; It receives a comma-delimited list of function names. This directive is
  220. ; *NOT* affected by whether Safe Mode is turned On or Off.
  221. disable_functions =
  222.  
  223. ; This directive allows you to disable certain classes for security reasons.
  224. ; It receives a comma-delimited list of class names. This directive is
  225. ; *NOT* affected by whether Safe Mode is turned On or Off.
  226. disable_classes =
  227.  
  228. ; Colors for Syntax Highlighting mode. Anything that's acceptable in
  229. ; <span style="color: ???????"> would work.
  230. ;highlight.string = #DD0000
  231. ;highlight.comment = #FF9900
  232. ;highlight.keyword = #007700
  233. ;highlight.bg = #FFFFFF
  234. ;highlight.default = #0000BB
  235. ;highlight.html = #000000
  236.  
  237. ; If enabled, the request will be allowed to complete even if the user aborts
  238. ; the request. Consider enabling it if executing long request, which may end up
  239. ; being interrupted by the user or a browser timing out.
  240. ; ignore_user_abort = On
  241.  
  242. ; Determines the size of the realpath cache to be used by PHP. This value should
  243. ; be increased on systems where PHP opens many files to reflect the quantity of
  244. ; the file operations performed.
  245. ; realpath_cache_size=16k
  246.  
  247. ; Duration of time, in seconds for which to cache realpath information for a given
  248. ; file or directory. For systems with rarely changing files, consider increasing this
  249. ; value.
  250. ; realpath_cache_ttl=120
  251.  
  252. ;
  253. ; Misc
  254. ;
  255. ; Decides whether PHP may expose the fact that it is installed on the server
  256. ; (e.g. by adding its signature to the Web server header). It is no security
  257. ; threat in any way, but it makes it possible to determine whether you use PHP
  258. ; on your server or not.
  259. expose_php = On
  260.  
  261.  
  262. ;;;;;;;;;;;;;;;;;;;
  263. ; Resource Limits ;
  264. ;;;;;;;;;;;;;;;;;;;
  265.  
  266. max_execution_time = 30 ; Maximum execution time of each script, in seconds
  267. max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
  268. ;max_input_nesting_level = 64 ; Maximum input variable nesting level
  269. memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)
  270.  
  271.  
  272. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  273. ; Error handling and logging ;
  274. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  275.  
  276. ; error_reporting is a bit-field. Or each number up to get desired error
  277. ; reporting level
  278. ; E_ALL - All errors and warnings (doesn't include E_STRICT)
  279. ; E_ERROR - fatal run-time errors
  280. ; E_RECOVERABLE_ERROR - almost fatal run-time errors
  281. ; E_WARNING - run-time warnings (non-fatal errors)
  282. ; E_PARSE - compile-time parse errors
  283. ; E_NOTICE - run-time notices (these are warnings which often result
  284. ; from a bug in your code, but it's possible that it was
  285. ; intentional (e.g., using an uninitialized variable and
  286. ; relying on the fact it's automatically initialized to an
  287. ; empty string)
  288. ; E_STRICT - run-time notices, enable to have PHP suggest changes
  289. ; to your code which will ensure the best interoperability
  290. ; and forward compatibility of your code
  291. ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
  292. ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
  293. ; initial startup
  294. ; E_COMPILE_ERROR - fatal compile-time errors
  295. ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
  296. ; E_USER_ERROR - user-generated error message
  297. ; E_USER_WARNING - user-generated warning message
  298. ; E_USER_NOTICE - user-generated notice message
  299. ;
  300. ; Examples:
  301. ;
  302. ; - Show all errors, except for notices and coding standards warnings
  303. ;
  304. ;error_reporting = E_ALL & ~E_NOTICE
  305. ;
  306. ; - Show all errors, except for notices
  307. ;
  308. ;error_reporting = E_ALL & ~E_NOTICE | E_STRICT
  309. ;
  310. ; - Show only errors
  311. ;
  312. ;error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
  313. ;
  314. ; - Show all errors except for notices and coding standards warnings
  315. ;
  316. error_reporting = E_ALL & ~E_NOTICE
  317.  
  318. ; Print out errors (as a part of the output). For production web sites,
  319. ; you're strongly encouraged to turn this feature off, and use error logging
  320. ; instead (see below). Keeping display_errors enabled on a production web site
  321. ; may reveal security information to end users, such as file paths on your Web
  322. ; server, your database schema or other information.
  323. display_errors = On
  324.  
  325. ; Even when display_errors is on, errors that occur during PHP's startup
  326. ; sequence are not displayed. It's strongly recommended to keep
  327. ; display_startup_errors off, except for when debugging.
  328. display_startup_errors = Off
  329.  
  330. ; Log errors into a log file (server-specific log, stderr, or error_log (below))
  331. ; As stated above, you're strongly advised to use error logging in place of
  332. ; error displaying on production web sites.
  333. log_errors = Off
  334.  
  335. ; Set maximum length of log_errors. In error_log information about the source is
  336. ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
  337. log_errors_max_len = 1024
  338.  
  339. ; Do not log repeated messages. Repeated errors must occur in same file on same
  340. ; line until ignore_repeated_source is set true.
  341. ignore_repeated_errors = Off
  342.  
  343. ; Ignore source of message when ignoring repeated messages. When this setting
  344. ; is On you will not log errors with repeated messages from different files or
  345. ; source lines.
  346. ignore_repeated_source = Off
  347.  
  348. ; If this parameter is set to Off, then memory leaks will not be shown (on
  349. ; stdout or in the log). This has only effect in a debug compile, and if
  350. ; error reporting includes E_WARNING in the allowed list
  351. report_memleaks = On
  352.  
  353. ;report_zend_debug = 0
  354.  
  355. ; Store the last error/warning message in $php_errormsg (boolean).
  356. track_errors = Off
  357.  
  358. ; Disable the inclusion of HTML tags in error messages.
  359. ; Note: Never use this feature for production boxes.
  360. ;html_errors = Off
  361.  
  362. ; If html_errors is set On PHP produces clickable error messages that direct
  363. ; to a page describing the error or function causing the error in detail.
  364. ; You can download a copy of the PHP manual from http://www.php.net/docs.php
  365. ; and change docref_root to the base URL of your local copy including the
  366. ; leading '/'. You must also specify the file extension being used including
  367. ; the dot.
  368. ; Note: Never use this feature for production boxes.
  369. ;docref_root = "/phpmanual/"
  370. ;docref_ext = .html
  371.  
  372. ; String to output before an error message.
  373. ;error_prepend_string = "<font color=ff0000>"
  374.  
  375. ; String to output after an error message.
  376. ;error_append_string = "</font>"
  377.  
  378. ; Log errors to specified file.
  379. ;error_log = filename
  380.  
  381. ; Log errors to syslog (Event Log on NT, not valid in Windows 95).
  382. ;error_log = syslog
  383.  
  384.  
  385. ;;;;;;;;;;;;;;;;;
  386. ; Data Handling ;
  387. ;;;;;;;;;;;;;;;;;
  388. ;
  389. ; Note - track_vars is ALWAYS enabled as of PHP 4.0.3
  390.  
  391. ; The separator used in PHP generated URLs to separate arguments.
  392. ; Default is "&".
  393. ;arg_separator.output = "&amp;"
  394.  
  395. ; List of separator(s) used by PHP to parse input URLs into variables.
  396. ; Default is "&".
  397. ; NOTE: Every character in this directive is considered as separator!
  398. ;arg_separator.input = ";&"
  399.  
  400. ; This directive describes the order in which PHP registers GET, POST, Cookie,
  401. ; Environment and Built-in variables (G, P, C, E & S respectively, often
  402. ; referred to as EGPCS or GPC). Registration is done from left to right, newer
  403. ; values override older values.
  404. variables_order = "EGPCS"
  405.  
  406. ; Whether or not to register the EGPCS variables as global variables. You may
  407. ; want to turn this off if you don't want to clutter your scripts' global scope
  408. ; with user data. This makes most sense when coupled with track_vars - in which
  409. ; case you can access all of the GPC variables through the $HTTP_*_VARS[],
  410. ; variables.
  411. ;
  412. ; You should do your best to write your scripts so that they do not require
  413. ; register_globals to be on; Using form variables as globals can easily lead
  414. ; to possible security problems, if the code is not very well thought of.
  415.  
  416. ; NOTE: applications relying on this feature will not recieve full
  417. ; support by the security team. For more information please
  418. ; see /usr/share/doc/php5-common/README.Debian.security
  419. ;
  420. register_globals = Off
  421.  
  422. ; Whether or not to register the old-style input arrays, HTTP_GET_VARS
  423. ; and friends. If you're not using them, it's recommended to turn them off,
  424. ; for performance reasons.
  425. register_long_arrays = On
  426.  
  427. ; This directive tells PHP whether to declare the argv&argc variables (that
  428. ; would contain the GET information). If you don't use these variables, you
  429. ; should turn it off for increased performance.
  430. register_argc_argv = On
  431.  
  432. ; When enabled, the SERVER and ENV variables are created when they're first
  433. ; used (Just In Time) instead of when the script starts. If these variables
  434. ; are not used within a script, having this directive on will result in a
  435. ; performance gain. The PHP directives register_globals, register_long_arrays,
  436. ; and register_argc_argv must be disabled for this directive to have any affect.
  437. auto_globals_jit = On
  438.  
  439. ; Maximum size of POST data that PHP will accept.
  440. post_max_size = 8M
  441. ; Magic quotes
  442. ;
  443.  
  444. ; Magic quotes for incoming GET/POST/Cookie data.
  445. magic_quotes_gpc = On
  446.  
  447. ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
  448. magic_quotes_runtime = Off
  449.  
  450. ; Use Sybase-style magic quotes (escape ' with '' instead of \').
  451. magic_quotes_sybase = Off
  452.  
  453. ; Automatically add files before or after any PHP document.
  454. auto_prepend_file =
  455. auto_append_file =
  456.  
  457. ; As of 4.0b4, PHP always outputs a character encoding by default in
  458. ; the Content-type: header. To disable sending of the charset, simply
  459. ; set it to be empty.
  460. ;
  461. ; PHP's built-in default is text/html
  462. default_mimetype = "text/html"
  463. ;default_charset = "iso-8859-1"
  464.  
  465. ; Always populate the $HTTP_RAW_POST_DATA variable.
  466. ;always_populate_raw_post_data = On
  467.  
  468.  
  469. ;;;;;;;;;;;;;;;;;;;;;;;;;
  470. ; Paths and Directories ;
  471. ;;;;;;;;;;;;;;;;;;;;;;;;;
  472.  
  473. ; UNIX: "/path1:/path2"
  474. ;include_path = ".:/usr/share/php"
  475. ;
  476. ; Windows: "\path1;\path2"
  477. ;include_path = ".;c:\php\includes"
  478.  
  479. ; The root of the PHP pages, used only if nonempty.
  480. ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
  481. ; if you are running php as a CGI under any web server (other than IIS)
  482. ; see documentation for security issues. The alternate is to use the
  483. ; cgi.force_redirect configuration below
  484. doc_root =
  485.  
  486. ; The directory under which PHP opens the script using /~username used only
  487. ; if nonempty.
  488. user_dir =
  489.  
  490. ; Directory in which the loadable extensions (modules) reside.
  491. ; extension_dir = "./"
  492.  
  493. ; Whether or not to enable the dl() function. The dl() function does NOT work
  494. ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
  495. ; disabled on them.
  496. enable_dl = On
  497.  
  498. ; cgi.force_redirect is necessary to provide security running PHP as a CGI under
  499. ; most web servers. Left undefined, PHP turns this on by default. You can
  500. ; turn it off here AT YOUR OWN RISK
  501. ; **You CAN safely turn this off for IIS, in fact, you MUST.**
  502. ; cgi.force_redirect = 1
  503.  
  504. ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
  505. ; every request.
  506. ; cgi.nph = 1
  507.  
  508. ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
  509. ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
  510. ; will look for to know it is OK to continue execution. Setting this variable MAY
  511. ; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
  512. ; cgi.redirect_status_env = ;
  513.  
  514. ; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's
  515. ; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
  516. ; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting
  517. ; this to 1 will cause PHP CGI to fix it's paths to conform to the spec. A setting
  518. ; of zero causes PHP to behave as before. Default is zero. You should fix your scripts
  519. ; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
  520. ; cgi.fix_pathinfo=0
  521.  
  522. ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
  523. ; security tokens of the calling client. This allows IIS to define the
  524. ; security context that the request runs under. mod_fastcgi under Apache
  525. ; does not currently support this feature (03/17/2002)
  526. ; Set to 1 if running under IIS. Default is zero.
  527. ; fastcgi.impersonate = 1;
  528.  
  529. ; Disable logging through FastCGI connection
  530. ; fastcgi.log = 0
  531.  
  532. ; cgi.rfc2616_headers configuration option tells PHP what type of headers to
  533. ; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
  534. ; is supported by Apache. When this option is set to 1 PHP will send
  535. ; RFC2616 compliant header.
  536. ; Default is zero.
  537. ;cgi.rfc2616_headers = 0
  538.  
  539.  
  540. ;;;;;;;;;;;;;;;;
  541. ; File Uploads ;
  542. ;;;;;;;;;;;;;;;;
  543.  
  544. ; Whether to allow HTTP file uploads.
  545. file_uploads = On
  546.  
  547. ; Temporary directory for HTTP uploaded files (will use system default if not
  548. ; specified).
  549. ;upload_tmp_dir =
  550.  
  551. ; Maximum allowed size for uploaded files.
  552. upload_max_filesize = 2M
  553.  
  554.  
  555. ;;;;;;;;;;;;;;;;;;
  556. ; Fopen wrappers ;
  557. ;;;;;;;;;;;;;;;;;;
  558.  
  559. ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
  560. allow_url_fopen = On
  561.  
  562. ; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
  563. allow_url_include = Off
  564.  
  565. ; Define the anonymous ftp password (your email address)
  566. ;from="john@doe.com"
  567.  
  568. ; Define the User-Agent string
  569. ; user_agent="PHP"
  570.  
  571. ; Default timeout for socket based streams (seconds)
  572. default_socket_timeout = 60
  573.  
  574. ; If your scripts have to deal with files from Macintosh systems,
  575. ; or you are running on a Mac and need to deal with files from
  576. ; unix or win32 systems, setting this flag will cause PHP to
  577. ; automatically detect the EOL character in those files so that
  578. ; fgets() and file() will work regardless of the source of the file.
  579. ; auto_detect_line_endings = Off
  580.  
  581.  
  582. ;;;;;;;;;;;;;;;;;;;;;;
  583. ; Dynamic Extensions ;
  584. ;;;;;;;;;;;;;;;;;;;;;;
  585. ;
  586. ; If you wish to have an extension loaded automatically, use the following
  587. ; syntax:
  588. ;
  589. ; extension=modulename.extension
  590. ;
  591. ; For example, on Windows:
  592. ;
  593. ; extension=msql.dll
  594. ;
  595. ; ... or under UNIX:
  596. ;
  597. ; extension=msql.so
  598. ;
  599. ; Note that it should be the name of the module only; no directory information
  600. ; needs to go here. Specify the location of the extension with the
  601. ; extension_dir directive above.
  602.  
  603.  
  604. ;;;;;;;;;;;;;;;;;;;
  605. ; Module Settings ;
  606. ;;;;;;;;;;;;;;;;;;;
  607.  
  608. [Date]
  609. ; Defines the default timezone used by the date functions
  610. ;date.timezone =
  611.  
  612. ;date.default_latitude = 31.7667
  613. ;date.default_longitude = 35.2333
  614.  
  615. ;date.sunrise_zenith = 90.583333
  616. ;date.sunset_zenith = 90.583333
  617.  
  618. [filter]
  619. ;filter.default = unsafe_raw
  620. ;filter.default_flags =
  621.  
  622. [iconv]
  623. ;iconv.input_encoding = ISO-8859-1
  624. ;iconv.internal_encoding = ISO-8859-1
  625. ;iconv.output_encoding = ISO-8859-1
  626.  
  627. [sqlite]
  628. ;sqlite.assoc_case = 0
  629.  
  630. [xmlrpc]
  631. ;xmlrpc_error_number = 0
  632. ;xmlrpc_errors = 0
  633.  
  634. [Pcre]
  635. ;PCRE library backtracking limit.
  636. ;pcre.backtrack_limit=100000
  637.  
  638. ;PCRE library recursion limit.
  639. ;Please note that if you set this value to a high number you may consume all
  640. ;the available process stack and eventually crash PHP (due to reaching the
  641. ;stack size limit imposed by the Operating System).
  642. ;pcre.recursion_limit=100000
  643.  
  644. [Syslog]
  645. ; Whether or not to define the various syslog variables (e.g. $LOG_PID,
  646. ; $LOG_CRON, etc.). Turning it off is a good idea performance-wise. In
  647. ; runtime, you can define these variables by calling define_syslog_variables().
  648. define_syslog_variables = Off
  649.  
  650. [mail function]
  651. ; For Win32 only.
  652. SMTP = localhost
  653. smtp_port = 25
  654.  
  655. ; For Win32 only.
  656. ;sendmail_from = me@example.com
  657.  
  658. ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
  659. sendmail_path = /usr/sbin/ssmtp -t -i -au blabla -ap blabla -am LOGIN
  660.  
  661. ; Force the addition of the specified parameters to be passed as extra parameters
  662. ; to the sendmail binary. These parameters will always replace the value of
  663. ; the 5th parameter to mail(), even in safe mode.
  664. ;mail.force_extra_parameters =
  665.  
  666. [SQL]
  667. sql.safe_mode = Off
  668.  
  669. [ODBC]
  670. ;odbc.default_db = Not yet implemented
  671. ;odbc.default_user = Not yet implemented
  672. ;odbc.default_pw = Not yet implemented
  673.  
  674. ; Allow or prevent persistent links.
  675. odbc.allow_persistent = On
  676.  
  677. ; Check that a connection is still valid before reuse.
  678. odbc.check_persistent = On
  679.  
  680. ; Maximum number of persistent links. -1 means no limit.
  681. odbc.max_persistent = -1
  682.  
  683. ; Maximum number of links (persistent + non-persistent). -1 means no limit.
  684. odbc.max_links = -1
  685.  
  686. ; Handling of LONG fields. Returns number of bytes to variables. 0 means
  687. ; passthru.
  688. odbc.defaultlrl = 4096
  689.  
  690. ; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char.
  691. ; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
  692. ; of uodbc.defaultlrl and uodbc.defaultbinmode
  693. odbc.defaultbinmode = 1
  694.  
  695. [MySQL]
  696. ; Allow or prevent persistent links.
  697. mysql.allow_persistent = On
  698.  
  699. ; Maximum number of persistent links. -1 means no limit.
  700. mysql.max_persistent = -1
  701.  
  702. ; Maximum number of links (persistent + non-persistent). -1 means no limit.
  703. mysql.max_links = -1
  704.  
  705. ; Default port number for mysql_connect(). If unset, mysql_connect() will use
  706. ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
  707. ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
  708. ; at MYSQL_PORT.
  709. mysql.default_port =
  710.  
  711. ; Default socket name for local MySQL connects. If empty, uses the built-in
  712. ; MySQL defaults.
  713. mysql.default_socket =
  714.  
  715. ; Default host for mysql_connect() (doesn't apply in safe mode).
  716. mysql.default_host =
  717.  
  718. ; Default user for mysql_connect() (doesn't apply in safe mode).
  719. mysql.default_user =
  720.  
  721. ; Default password for mysql_connect() (doesn't apply in safe mode).
  722. ; Note that this is generally a *bad* idea to store passwords in this file.
  723. ; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
  724. ; and reveal this password! And of course, any users with read access to this
  725. ; file will be able to reveal the password as well.
  726. mysql.default_password =
  727.  
  728. ; Maximum time (in seconds) for connect timeout. -1 means no limit
  729. mysql.connect_timeout = 60
  730.  
  731. ; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
  732. ; SQL-Errors will be displayed.
  733. mysql.trace_mode = Off
  734.  
  735. [MySQLi]
  736.  
  737. ; Maximum number of links. -1 means no limit.
  738. mysqli.max_links = -1
  739.  
  740. ; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
  741. ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
  742. ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
  743. ; at MYSQL_PORT.
  744. mysqli.default_port = 3306
  745.  
  746. ; Default socket name for local MySQL connects. If empty, uses the built-in
  747. ; MySQL defaults.
  748. mysqli.default_socket =
  749.  
  750. ; Default host for mysql_connect() (doesn't apply in safe mode).
  751. mysqli.default_host =
  752.  
  753. ; Default user for mysql_connect() (doesn't apply in safe mode).
  754. mysqli.default_user =
  755.  
  756. ; Default password for mysqli_connect() (doesn't apply in safe mode).
  757. ; Note that this is generally a *bad* idea to store passwords in this file.
  758. ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
  759. ; and reveal this password! And of course, any users with read access to this
  760. ; file will be able to reveal the password as well.
  761. mysqli.default_pw =
  762.  
  763. ; Allow or prevent reconnect
  764. mysqli.reconnect = Off
  765.  
  766. [mSQL]
  767. ; Allow or prevent persistent links.
  768. msql.allow_persistent = On
  769.  
  770. ; Maximum number of persistent links. -1 means no limit.
  771. msql.max_persistent = -1
  772.  
  773. ; Maximum number of links (persistent+non persistent). -1 means no limit.
  774. msql.max_links = -1
  775.  
  776. [OCI8]
  777. ; enables privileged connections using external credentials (OCI_SYSOPER, OCI_SYSDBA)
  778. ;oci8.privileged_connect = Off
  779.  
  780. ; Connection: The maximum number of persistent OCI8 connections per
  781. ; process. Using -1 means no limit.
  782. ;oci8.max_persistent = -1
  783.  
  784. ; Connection: The maximum number of seconds a process is allowed to
  785. ; maintain an idle persistent connection. Using -1 means idle
  786. ; persistent connections will be maintained forever.
  787. ;oci8.persistent_timeout = -1
  788.  
  789. ; Connection: The number of seconds that must pass before issuing a
  790. ; ping during oci_pconnect() to check the connection validity. When
  791. ; set to 0, each oci_pconnect() will cause a ping. Using -1 disables
  792. ; pings completely.
  793. ;oci8.ping_interval = 60
  794.  
  795. ; Tuning: This option enables statement caching, and specifies how
  796. ; many statements to cache. Using 0 disables statement caching.
  797. ;oci8.statement_cache_size = 20
  798.  
  799. ; Tuning: Enables statement prefetching and sets the default number of
  800. ; rows that will be fetched automatically after statement execution.
  801. ;oci8.default_prefetch = 10
  802.  
  803. ; Compatibility. Using On means oci_close() will not close
  804. ; oci_connect() and oci_new_connect() connections.
  805. ;oci8.old_oci_close_semantics = Off
  806.  
  807. [PostgresSQL]
  808. ; Allow or prevent persistent links.
  809. pgsql.allow_persistent = On
  810.  
  811. ; Detect broken persistent links always with pg_pconnect().
  812. ; Auto reset feature requires a little overheads.
  813. pgsql.auto_reset_persistent = Off
  814.  
  815. ; Maximum number of persistent links. -1 means no limit.
  816. pgsql.max_persistent = -1
  817.  
  818. ; Maximum number of links (persistent+non persistent). -1 means no limit.
  819. pgsql.max_links = -1
  820.  
  821. ; Ignore PostgreSQL backends Notice message or not.
  822. ; Notice message logging require a little overheads.
  823. pgsql.ignore_notice = 0
  824.  
  825. ; Log PostgreSQL backends Noitce message or not.
  826. ; Unless pgsql.ignore_notice=0, module cannot log notice message.
  827. pgsql.log_notice = 0
  828.  
  829. [Sybase]
  830. ; Allow or prevent persistent links.
  831. sybase.allow_persistent = On
  832.  
  833. ; Maximum number of persistent links. -1 means no limit.
  834. sybase.max_persistent = -1
  835.  
  836. ; Maximum number of links (persistent + non-persistent). -1 means no limit.
  837. sybase.max_links = -1
  838.  
  839. ;sybase.interface_file = "/usr/sybase/interfaces"
  840.  
  841. ; Minimum error severity to display.
  842. sybase.min_error_severity = 10
  843.  
  844. ; Minimum message severity to display.
  845. sybase.min_message_severity = 10
  846.  
  847. ; Compatibility mode with old versions of PHP 3.0.
  848. ; If on, this will cause PHP to automatically assign types to results according
  849. ; to their Sybase type, instead of treating them all as strings. This
  850. ; compatibility mode will probably not stay around forever, so try applying
  851. ; whatever necessary changes to your code, and turn it off.
  852. sybase.compatability_mode = Off
  853.  
  854. [Sybase-CT]
  855. ; Allow or prevent persistent links.
  856. sybct.allow_persistent = On
  857.  
  858. ; Maximum number of persistent links. -1 means no limit.
  859. sybct.max_persistent = -1
  860.  
  861. ; Maximum number of links (persistent + non-persistent). -1 means no limit.
  862. sybct.max_links = -1
  863.  
  864. ; Minimum server message severity to display.
  865. sybct.min_server_severity = 10
  866.  
  867. ; Minimum client message severity to display.
  868. sybct.min_client_severity = 10
  869.  
  870. [bcmath]
  871. ; Number of decimal digits for all bcmath functions.
  872. bcmath.scale = 0
  873.  
  874. [browscap]
  875. ;browscap = extra/browscap.ini
  876.  
  877. [Informix]
  878. ; Default host for ifx_connect() (doesn't apply in safe mode).
  879. ifx.default_host =
  880.  
  881. ; Default user for ifx_connect() (doesn't apply in safe mode).
  882. ifx.default_user =
  883.  
  884. ; Default password for ifx_connect() (doesn't apply in safe mode).
  885. ifx.default_password =
  886.  
  887. ; Allow or prevent persistent links.
  888. ifx.allow_persistent = On
  889.  
  890. ; Maximum number of persistent links. -1 means no limit.
  891. ifx.max_persistent = -1
  892.  
  893. ; Maximum number of links (persistent + non-persistent). -1 means no limit.
  894. ifx.max_links = -1
  895.  
  896. ; If on, select statements return the contents of a text blob instead of its id.
  897. ifx.textasvarchar = 0
  898.  
  899. ; If on, select statements return the contents of a byte blob instead of its id.
  900. ifx.byteasvarchar = 0
  901.  
  902. ; Trailing blanks are stripped from fixed-length char columns. May help the
  903. ; life of Informix SE users.
  904. ifx.charasvarchar = 0
  905.  
  906. ; If on, the contents of text and byte blobs are dumped to a file instead of
  907. ; keeping them in memory.
  908. ifx.blobinfile = 0
  909.  
  910. ; NULL's are returned as empty strings, unless this is set to 1. In that case,
  911. ; NULL's are returned as string 'NULL'.
  912. ifx.nullformat = 0
  913.  
  914. [Session]
  915. ; Handler used to store/retrieve data.
  916. session.save_handler = files
  917.  
  918. ; Argument passed to save_handler. In the case of files, this is the path
  919. ; where data files are stored. Note: Windows users have to change this
  920. ; variable in order to use PHP's session functions.
  921. ;
  922. ; As of PHP 4.0.1, you can define the path as:
  923. ;
  924. ; session.save_path = "N;/path"
  925. ;
  926. ; where N is an integer. Instead of storing all the session files in
  927. ; /path, what this will do is use subdirectories N-levels deep, and
  928. ; store the session data in those directories. This is useful if you
  929. ; or your OS have problems with lots of files in one directory, and is
  930. ; a more efficient layout for servers that handle lots of sessions.
  931. ;
  932. ; NOTE 1: PHP will not create this directory structure automatically.
  933. ; You can use the script in the ext/session dir for that purpose.
  934. ; NOTE 2: See the section on garbage collection below if you choose to
  935. ; use subdirectories for session storage
  936. ;
  937. ; The file storage module creates files using mode 600 by default.
  938. ; You can change that by using
  939. ;
  940. ; session.save_path = "N;MODE;/path"
  941. ;
  942. ; where MODE is the octal representation of the mode. Note that this
  943. ; does not overwrite the process's umask.
  944. ;session.save_path = /var/lib/php5
  945.  
  946. ; Whether to use cookies.
  947. session.use_cookies = 1
  948.  
  949. ;session.cookie_secure =
  950.  
  951. ; This option enables administrators to make their users invulnerable to
  952. ; attacks which involve passing session ids in URLs; defaults to 0.
  953. ; session.use_only_cookies = 1
  954.  
  955. ; Name of the session (used as cookie name).
  956. session.name = PHPSESSID
  957.  
  958. ; Initialize session on request startup.
  959. session.auto_start = 0
  960.  
  961. ; Lifetime in seconds of cookie or, if 0, until browser is restarted.
  962. session.cookie_lifetime = 0
  963.  
  964. ; The path for which the cookie is valid.
  965. session.cookie_path = /
  966.  
  967. ; The domain for which the cookie is valid.
  968. session.cookie_domain =
  969.  
  970. ; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript.
  971. session.cookie_httponly =
  972.  
  973. ; Handler used to serialize data. php is the standard serializer of PHP.
  974. session.serialize_handler = php
  975.  
  976. ; Define the probability that the 'garbage collection' process is started
  977. ; on every session initialization.
  978. ; The probability is calculated by using gc_probability/gc_divisor,
  979. ; e.g. 1/100 means there is a 1% chance that the GC process starts
  980. ; on each request.
  981.  
  982. ; This is disabled in the Debian packages, due to the strict permissions
  983. ; on /var/lib/php5. Instead of setting this here, see the cronjob at
  984. ; /etc/cron.d/php5, which uses the session.gc_maxlifetime setting below
  985. ;session.gc_probability = 0
  986. session.gc_divisor = 100
  987.  
  988. ; After this number of seconds, stored data will be seen as 'garbage' and
  989. ; cleaned up by the garbage collection process.
  990. session.gc_maxlifetime = 1440
  991.  
  992. ; NOTE: If you are using the subdirectory option for storing session files
  993. ; (see session.save_path above), then garbage collection does *not*
  994. ; happen automatically. You will need to do your own garbage
  995. ; collection through a shell script, cron entry, or some other method.
  996. ; For example, the following script would is the equivalent of
  997. ; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
  998. ; cd /path/to/sessions; find -cmin +24 | xargs rm
  999.  
  1000. ; PHP 4.2 and less have an undocumented feature/bug that allows you to
  1001. ; to initialize a session variable in the global scope, albeit register_globals
  1002. ; is disabled. PHP 4.3 and later will warn you, if this feature is used.
  1003. ; You can disable the feature and the warning separately. At this time,
  1004. ; the warning is only displayed, if bug_compat_42 is enabled.
  1005. session.bug_compat_42 = 1
  1006. session.bug_compat_warn = 1
  1007.  
  1008. ; Check HTTP Referer to invalidate externally stored URLs containing ids.
  1009. ; HTTP_REFERER has to contain this substring for the session to be
  1010. ; considered as valid.
  1011. session.referer_check =
  1012.  
  1013. ; How many bytes to read from the file.
  1014. session.entropy_length = 0
  1015.  
  1016. ; Specified here to create the session id.
  1017. session.entropy_file =
  1018.  
  1019. ;session.entropy_length = 16
  1020.  
  1021. ;session.entropy_file = /dev/urandom
  1022.  
  1023. ; Set to {nocache,private,public,} to determine HTTP caching aspects
  1024. ; or leave this empty to avoid sending anti-caching headers.
  1025. session.cache_limiter = nocache
  1026.  
  1027. ; Document expires after n minutes.
  1028. session.cache_expire = 180
  1029.  
  1030. ; trans sid support is disabled by default.
  1031. ; Use of trans sid may risk your users security.
  1032. ; Use this option with caution.
  1033. ; - User may send URL contains active session ID
  1034. ; to other person via. email/irc/etc.
  1035. ; - URL that contains active session ID may be stored
  1036. ; in publically accessible computer.
  1037. ; - User may access your site with the same session ID
  1038. ; always using URL stored in browser's history or bookmarks.
  1039. session.use_trans_sid = 0
  1040.  
  1041. ; Select a hash function
  1042. ; 0: MD5 (128 bits)
  1043. ; 1: SHA-1 (160 bits)
  1044. session.hash_function = 0
  1045.  
  1046. ; Define how many bits are stored in each character when converting
  1047. ; the binary hash data to something readable.
  1048. ;
  1049. ; 4 bits: 0-9, a-f
  1050. ; 5 bits: 0-9, a-v
  1051. ; 6 bits: 0-9, a-z, A-Z, "-", ","
  1052. session.hash_bits_per_character = 4
  1053.  
  1054. ; The URL rewriter will look for URLs in a defined set of HTML tags.
  1055. ; form/fieldset are special; if you include them here, the rewriter will
  1056. ; add a hidden <input> field with the info which is otherwise appended
  1057. ; to URLs. If you want XHTML conformity, remove the form entry.
  1058. ; Note that all valid entries require a "=", even if no value follows.
  1059. url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
  1060.  
  1061. [MSSQL]
  1062. ; Allow or prevent persistent links.
  1063. mssql.allow_persistent = On
  1064.  
  1065. ; Maximum number of persistent links. -1 means no limit.
  1066. mssql.max_persistent = -1
  1067.  
  1068. ; Maximum number of links (persistent+non persistent). -1 means no limit.
  1069. mssql.max_links = -1
  1070.  
  1071. ; Minimum error severity to display.
  1072. mssql.min_error_severity = 10
  1073.  
  1074. ; Minimum message severity to display.
  1075. mssql.min_message_severity = 10
  1076.  
  1077. ; Compatibility mode with old versions of PHP 3.0.
  1078. mssql.compatability_mode = Off
  1079.  
  1080. ; Connect timeout
  1081. ;mssql.connect_timeout = 5
  1082.  
  1083. ; Query timeout
  1084. ;mssql.timeout = 60
  1085.  
  1086. ; Valid range 0 - 2147483647. Default = 4096.
  1087. ;mssql.textlimit = 4096
  1088.  
  1089. ; Valid range 0 - 2147483647. Default = 4096.
  1090. ;mssql.textsize = 4096
  1091.  
  1092. ; Limits the number of records in each batch. 0 = all records in one batch.
  1093. ;mssql.batchsize = 0
  1094.  
  1095. ; Specify how datetime and datetim4 columns are returned
  1096. ; On => Returns data converted to SQL server settings
  1097. ; Off => Returns values as YYYY-MM-DD hh:mm:ss
  1098. ;mssql.datetimeconvert = On
  1099.  
  1100. ; Use NT authentication when connecting to the server
  1101. mssql.secure_connection = Off
  1102.  
  1103. ; Specify max number of processes. -1 = library default
  1104. ; msdlib defaults to 25
  1105. ; FreeTDS defaults to 4096
  1106. ;mssql.max_procs = -1
  1107.  
  1108. ; Specify client character set.
  1109. ; If empty or not set the client charset from freetds.comf is used
  1110. ; This is only used when compiled with FreeTDS
  1111. ;mssql.charset = "ISO-8859-1"
  1112.  
  1113. [Assertion]
  1114. ; Assert(expr); active by default.
  1115. ;assert.active = On
  1116.  
  1117. ; Issue a PHP warning for each failed assertion.
  1118. ;assert.warning = On
  1119.  
  1120. ; Don't bail out by default.
  1121. ;assert.bail = Off
  1122.  
  1123. ; User-function to be called if an assertion fails.
  1124. ;assert.callback = 0
  1125.  
  1126. ; Eval the expression with current error_reporting(). Set to true if you want
  1127. ; error_reporting(0) around the eval().
  1128. ;assert.quiet_eval = 0
  1129.  
  1130. [COM]
  1131. ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
  1132. ;com.typelib_file =
  1133. ; allow Distributed-COM calls
  1134. ;com.allow_dcom = true
  1135. ; autoregister constants of a components typlib on com_load()
  1136. ;com.autoregister_typelib = true
  1137. ; register constants casesensitive
  1138. ;com.autoregister_casesensitive = false
  1139. ; show warnings on duplicate constant registrations
  1140. ;com.autoregister_verbose = true
  1141.  
  1142. [mbstring]
  1143. ; language for internal character representation.
  1144. ;mbstring.language = Japanese
  1145.  
  1146. ; internal/script encoding.
  1147. ; Some encoding cannot work as internal encoding.
  1148. ; (e.g. SJIS, BIG5, ISO-2022-*)
  1149. ;mbstring.internal_encoding = EUC-JP
  1150.  
  1151. ; http input encoding.
  1152. ;mbstring.http_input = auto
  1153.  
  1154. ; http output encoding. mb_output_handler must be
  1155. ; registered as output buffer to function
  1156. ;mbstring.http_output = SJIS
  1157.  
  1158. ; enable automatic encoding translation according to
  1159. ; mbstring.internal_encoding setting. Input chars are
  1160. ; converted to internal encoding by setting this to On.
  1161. ; Note: Do _not_ use automatic encoding translation for
  1162. ; portable libs/applications.
  1163. ;mbstring.encoding_translation = Off
  1164.  
  1165. ; automatic encoding detection order.
  1166. ; auto means
  1167. ;mbstring.detect_order = auto
  1168.  
  1169. ; substitute_character used when character cannot be converted
  1170. ; one from another
  1171. ;mbstring.substitute_character = none;
  1172.  
  1173. ; overload(replace) single byte functions by mbstring functions.
  1174. ; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
  1175. ; etc. Possible values are 0,1,2,4 or combination of them.
  1176. ; For example, 7 for overload everything.
  1177. ; 0: No overload
  1178. ; 1: Overload mail() function
  1179. ; 2: Overload str*() functions
  1180. ; 4: Overload ereg*() functions
  1181. ;mbstring.func_overload = 0
  1182.  
  1183. [FrontBase]
  1184. ;fbsql.allow_persistent = On
  1185. ;fbsql.autocommit = On
  1186. ;fbsql.show_timestamp_decimals = Off
  1187. ;fbsql.default_database =
  1188. ;fbsql.default_database_password =
  1189. ;fbsql.default_host =
  1190. ;fbsql.default_password =
  1191. ;fbsql.default_user = "_SYSTEM"
  1192. ;fbsql.generate_warnings = Off
  1193. ;fbsql.max_connections = 128
  1194. ;fbsql.max_links = 128
  1195. ;fbsql.max_persistent = -1
  1196. ;fbsql.max_results = 128
  1197.  
  1198. [gd]
  1199. ; Tell the jpeg decode to libjpeg warnings and try to create
  1200. ; a gd image. The warning will then be displayed as notices
  1201. ; disabled by default
  1202. ;gd.jpeg_ignore_warning = 0
  1203.  
  1204. [exif]
  1205. ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
  1206. ; With mbstring support this will automatically be converted into the encoding
  1207. ; given by corresponding encode setting. When empty mbstring.internal_encoding
  1208. ; is used. For the decode settings you can distinguish between motorola and
  1209. ; intel byte order. A decode setting cannot be empty.
  1210. ;exif.encode_unicode = ISO-8859-15
  1211. ;exif.decode_unicode_motorola = UCS-2BE
  1212. ;exif.decode_unicode_intel = UCS-2LE
  1213. ;exif.encode_jis =
  1214. ;exif.decode_jis_motorola = JIS
  1215. ;exif.decode_jis_intel = JIS
  1216.  
  1217. [Tidy]
  1218. ; The path to a default tidy configuration file to use when using tidy
  1219. ;tidy.default_config = /usr/local/lib/php/default.tcfg
  1220.  
  1221. ; Should tidy clean and repair output automatically?
  1222. ; WARNING: Do not use this option if you are generating non-html content
  1223. ; such as dynamic images
  1224. tidy.clean_output = Off
  1225.  
  1226. [soap]
  1227. ; Enables or disables WSDL caching feature.
  1228. soap.wsdl_cache_enabled=1
  1229. ; Sets the directory name where SOAP extension will put cache files.
  1230. soap.wsdl_cache_dir="/tmp"
  1231. ; (time to live) Sets the number of second while cached file will be used
  1232. ; instead of original one.
  1233. soap.wsdl_cache_ttl=86400
  1234.  
  1235. ; Local Variables:
  1236. ; tab-width: 4
  1237. ; End:
  1238. extension=mcrypt.so
Last edited by ryy705; Jun 9th, 2008 at 2:04 pm.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 100
Reputation: petr.pavel is an unknown quantity at this point 
Solved Threads: 14
petr.pavel's Avatar
petr.pavel petr.pavel is offline Offline
Junior Poster

Re: How to configure GD

 
0
  #2
Jun 10th, 2008
Hi there,
I suspect that it fails because it looks for the font in a wrong directory.
You can either specify the path in the call of imagettfbbox
  1. imagettfbbox($font_size, 0, 'c:/windows/fonts/monofont.ttf', $code)
or use environment variable to set the path for all calls.
  1. putenv('gdfontpath=c:/windows/fonts/');
I'm not sure if it's GDFONTPATH or gdfontpath. For Windows use semicolons to separate multiple paths.

Good luck.
Petr 'PePa' Pavel

The more information you give the more relevant answer you get.
Please consider using "Add to ... Reputation" and mark your thread as Solved if you found what you were looking for. By giving feedback you help others.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 132
Reputation: ryy705 is an unknown quantity at this point 
Solved Threads: 0
ryy705 ryy705 is offline Offline
Junior Poster

Re: How to configure GD

 
0
  #3
Jun 10th, 2008
Thanks for your reply. Using absolute path did not help. As I mentioned in the previous post, the code works fine when I upload it to a server. But it doesn't work on my computer.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 100
Reputation: petr.pavel is an unknown quantity at this point 
Solved Threads: 14
petr.pavel's Avatar
petr.pavel petr.pavel is offline Offline
Junior Poster

Re: How to configure GD

 
0
  #4
Jun 10th, 2008
I'm sorry I assumed that you are running Windows on your development box and that would be why GD doesn't find the font in Windows font folder.

I'm quite sure that you don't have to configure GD library in any way so let's look for other reasons that imagettfbbox() fails.
Are you are absolute sure that monofont.ttf exists in the path you specified, user that runs the web server can read it? Try something along these lines:
  1. if (!file_get_contents('/absolute/path/monofont.ttf')) die('cannot read');
If on Windows try double back slashes instead of forward slashes - or vice versa.
Where is monofont.ttf stored and what syntax did you use when trying the absolute path?

Try downloading the latest version of GD library for your operating system (what is your operating system, by the way?). Did you compile it or got a binary? If compiled then try to get a package with binary instead.

I found that people reported problems if the file name contained a hyphen. Doesn't seem to be your problem though. Could be somewhere in the path?
Petr 'PePa' Pavel

The more information you give the more relevant answer you get.
Please consider using "Add to ... Reputation" and mark your thread as Solved if you found what you were looking for. By giving feedback you help others.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 132
Reputation: ryy705 is an unknown quantity at this point 
Solved Threads: 0
ryy705 ryy705 is offline Offline
Junior Poster

Re: How to configure GD

 
0
  #5
Jun 10th, 2008
The code you posted executed without errors. Yes, I am using linux.
Here is the line that throws the error. $textbox = imagettfbbox($font_size, 0, 'monofont.ttf', $code) or die('Error in imagettfbbox function'); I don't see why it doesn't run. Is there anything else I can do?
Last edited by ryy705; Jun 10th, 2008 at 1:04 pm.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1
Reputation: mcscreech is an unknown quantity at this point 
Solved Threads: 0
mcscreech mcscreech is offline Offline
Newbie Poster

Re: How to configure GD

 
0
  #6
Feb 25th, 2009
I just registered for this forum after searching for an answer to this problem and thought I'd add my 2 cents.

I discovered the following combination works on my machine:

  1. putenv('GDFONTPATH=C:\WINDOWS\Fonts');
  2. $font = getenv('GDFONTPATH') . '\comic.ttf';

This is on a WinXP Pro SP2 pc with Apache/2.2.11, PHP/5.2.8, GD/2.0.34 and mySQL/5.0.51a.

HTH, DaveT.
Last edited by peter_budo; Feb 25th, 2009 at 8:31 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC