I am sure that I am making a simple boneheaded mistake and I would
appreciate your help in spotting in. I have just installed
apache_2.0.53-win32-x86-no_ssl.exe
php-5.0.3-Win32.zip
Smarty-2.6.7.tar.gz
on a system running WindowsXP SP2.
Apache and PHP tested out fine. After adding Smarty, I ran the
following http://localhost/testphp.php
where testphp.php is in C:\Program Files\Apache Group\Apache2\htdocs
and contains:
<?php
require('C:\php5\includes\smarty\libs\Smarty.class .php');
$smarty = new Smarty;
?>
I keep seeing this in the apache error log:
[Tue Feb 22 01:36:28 2005] [notice] Apache/2.0.53 (Win32) configured --
resuming normal operations
[Tue Feb 22 01:36:28 2005] [notice] Server built: Feb 10 2005 06:11:34
[Tue Feb 22 01:36:28 2005] [notice] Parent: Created child process 2528
[Tue Feb 22 01:36:28 2005] [notice] Disabled use of AcceptEx() WinSock2
API
[Tue Feb 22 01:36:28 2005] [notice] Child 2528: Child process is
running
[Tue Feb 22 01:36:28 2005] [notice] Child 2528: Acquired the start
mutex.
[Tue Feb 22 01:36:28 2005] [notice] Child 2528: Starting 250 worker
threads.
[Tue Feb 22 01:36:28 2005] [notice] Child 2528: Listening on port 80.
[Tue Feb 22 01:36:56 2005] [error] [client 127.0.0.1] File does not
exist: C:/Program Files/Apache Group/Apache2/htdocs/favicon.ico
Why is Apache looking in C:/Program Files/Apache Group/Apache2/htdocs/
?
favicon.ico is in path C:\Program Files\Apache
Group\Apache2\manual\images
My directory structure looks like this:
C:\php5
dev
ext
extras
includes
smarty
cache
configs
demo
libs
misc
templates
templates_c
unit_test
PEAR
C:\Program Files\Apache Group\Apache2>
bin
cgi-bin
conf
error
htdocs
icons
include
lib
logs
manual
modules
proxy
================================================== ===========================
conf.httpd looks like this with comments and some stuff at the end
removed to save space in this post.
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "C:/Program Files/Apache Group/Apache2"
PidFile logs/httpd.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild 0
</IfModule>
Listen 80
#
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
#LoadModule auth_anon_module modules/mod_auth_anon.so
#LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule headers_module modules/mod_headers.so
LoadModule imap_module modules/mod_imap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
# PHP 5 installation:
LoadModule php5_module "c:/php5/php5apache2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php5"
ServerAdmin xxxxx@xxxxxxx
ServerName www.testhost.com:80
#
UseCanonicalName Off
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
#
<Directory "C:/Program Files/Apache Group/Apache2/htdocs">
Options Indexes IncludesNOEXEC ExecCGI mULTIvIEWS FollowSymLinks
Order allow,deny
Allow from all
</Directory>
#
UserDir "My Documents/My Website"
DirectoryIndex index.html index.html.var
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
#
TypesConfig conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
ErrorLog logs/error.log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access.log common
ServerTokens Full
ServerSignature Off
Alias /icons/ "C:/Program Files/Apache Group/Apache2/icons/"
<Directory "C:/Program Files/Apache Group/Apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "C:/Program
Files/Apache Group/Apache2/manual$1"
<Directory "C:/Program Files/Apache Group/Apache2/manual">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
<Files *.html>
SetHandler type-map
</Files>
SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/
prefer-language=$1
RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$
/manual/$1$2
</Directory>
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
<Directory "C:/Program Files/Apache Group/Apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
IndexOptions FancyIndexing VersionSort
[sniped a bunch of hopefully not relevant stuff]
================================================== ========
php.ini looks like this with comments and some stuff sniped to save
space in this post:
[PHP]
engine = On
; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
zend.ze1_compatibility_mode = Off
short_open_tag = On
; Allow ASP-style <% %> tags.
asp_tags = Off
; The number of significant digits displayed in floating point numbers.
precision = 14
; Enforce year 2000 compliance (will cause problems with non-compliant
browsers)
y2k_compliance = On
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func=
serialize_precision = 100
allow_call_time_pass_reference = Off
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
directive is
disable_functions =
disable_classes =
; Colors for Syntax Highlighting mode. Anything that's acceptable in
; <font color="??????"> would work.
;highlight.string = #DD0000
;highlight.comment = #FF9900
;highlight.keyword = #007700
;highlight.bg = #FFFFFF
;highlight.default = #0000BB
;highlight.html = #000000
;
; Misc
;
; Decides whether PHP may expose the fact that it is installed on the
server
; (e.g. by adding its signature to the Web server header). It is no
security
; threat in any way, but it makes it possible to determine whether you
use PHP
; on your server or not.
expose_php = Off
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 30 ; Maximum execution time of each script, in
seconds
max_input_time = 60 ; Maximum amount of time each script may spend
parsing request data
memory_limit = 8M ; Maximum amount of memory a script may consume
(8MB)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; error_reporting is a bit-field. Or each number up to get desired
error
; reporting level
; E_ALL - All errors and warnings (doesn't include
E_STRICT)
; E_ERROR - fatal run-time errors
; E_WARNING - run-time warnings (non-fatal errors)
; E_PARSE - compile-time parse errors
; E_NOTICE - run-time notices (these are warnings which often
result
; from a bug in your code, but it's possible that
it was
; intentional (e.g., using an uninitialized
variable and
; relying on the fact it's automatically
initialized to an
; empty string)
; E_STRICT - run-time notices, enable to have PHP suggest
changes
; to your code which will ensure the best
interoperability
; and forward compatibility of your code
; E_CORE_ERROR - fatal errors that occur during PHP's initial
startup
; E_CORE_WARNING - warnings (non-fatal errors) that occur during
PHP's
; initial startup
; E_COMPILE_ERROR - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated notice message
;
; Examples:
;
; - Show all errors, except for notices and coding standards warnings
;
;error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
;
; - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE
;
; - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
; - Show all errors
;
error_reporting = E_ALL
; Print out errors (as a part of the output). For production web
sites,
; you're strongly encouraged to turn this feature off, and use error
logging
; instead (see below). Keeping display_errors enabled on a production
web site
; may reveal security information to end users, such as file paths on
your Web
; server, your database schema or other information.
display_errors = Off
; Even when display_errors is on, errors that occur during PHP's
startup
; sequence are not displayed. It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = Off
; Log errors into a log file (server-specific log, stderr, or error_log
(below))
; As stated above, you're strongly advised to use error logging in
place of
; error displaying on production web sites.
log_errors = On
; Set maximum length of log_errors. In error_log information about the
source is
; added. The default is 1024 and 0 allows to not apply any maximum
length at all.
log_errors_max_len = 1024
; Do not log repeated messages. Repeated errors must occur in same file
on same
; line until ignore_repeated_source is set true.
ignore_repeated_errors = Off
; Ignore source of message when ignoring repeated messages. When this
setting
; is On you will not log errors with repeated messages from different
files or
; sourcelines.
ignore_repeated_source = Off
; If this parameter is set to Off, then memory leaks will not be shown
(on
; stdout or in the log). This has only effect in a debug compile, and
if
; error reporting includes E_WARNING in the allowed list
report_memleaks = On
; Store the last error/warning message in $php_errormsg (boolean).
track_errors = Off
[snip]
; Magic quotes
;
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off
; Magic quotes for runtime-generated data, e.g. data from SQL, from
exec(), etc.
magic_quotes_runtime = Off
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off
; Automatically add files before or after any PHP document.
auto_prepend_file =
auto_append_file =
[snip]
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php5\includes\"
include_path = ".;c:\php5\includes"
doc_root = "C:\Program Files\Apache Group\Apache2\"
; The directory under which PHP opens the script using /~username used
only
; if nonempty.
user_dir =
; Directory in which the loadable extensions (modules) reside.
extension_dir = "./"
; Whether or not to enable the dl() function. The dl() function does
NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is
automatically
; disabled on them.
enable_dl = On
[snip]
--Thank you,
--Mike Jr.