470,614 Members | 1,627 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,614 developers. It's quick & easy.

Smarty gives File does not exist: C:/Program Files/Apache Group/Apache2/htdocs/favicon.ico

I am sure that I am making a simple boneheaded mistake and I would
appreciate your help in spotting in. I have just installed
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:

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
[Tue Feb 22 01:36:28 2005] [notice] Child 2528: Child process is
[Tue Feb 22 01:36:28 2005] [notice] Child 2528: Acquired the start
[Tue Feb 22 01:36:28 2005] [notice] Child 2528: Starting 250 worker
[Tue Feb 22 01:36:28 2005] [notice] Child 2528: Listening on port 80.
[Tue Feb 22 01:36:56 2005] [error] [client] 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

My directory structure looks like this:


C:\Program Files\Apache Group\Apache2>

================================================== ===========================
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
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 "C:/Program Files/Apache Group/Apache2/htdocs">
Options Indexes IncludesNOEXEC ExecCGI mULTIvIEWS FollowSymLinks
Order allow,deny
Allow from all


UserDir "My Documents/My Website"
DirectoryIndex index.html index.html.var

AccessFileName .htaccess

<Files ~ "^\.ht">
Order allow,deny
Deny from all

TypesConfig conf/mime.types
DefaultType text/plain

<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic

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

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

SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/
RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$

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

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:


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
y2k_compliance = On

output_buffering = 4096

zlib.output_compression = Off
implicit_flush = Off


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
; (e.g. by adding its signature to the Web server header). It is no
; 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
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
; Error handling and logging ;

; error_reporting is a bit-field. Or each number up to get desired
; reporting level
; E_ALL - All errors and warnings (doesn't include
; 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
; 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
; to your code which will ensure the best
; and forward compatibility of your code
; E_CORE_ERROR - fatal errors that occur during PHP's initial
; E_CORE_WARNING - warnings (non-fatal errors) that occur during
; 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
; - Show all errors
error_reporting = E_ALL

; Print out errors (as a part of the output). For production web
; you're strongly encouraged to turn this feature off, and use error
; 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
; 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
; 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
; 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
; stdout or in the log). This has only effect in a debug compile, and
; 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

; 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 =


; 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
; 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
; disabled on them.
enable_dl = On

--Thank you,
--Mike Jr.

Jul 17 '05 #1
2 13778

A favicon can appear in any folder on your site and is normally in the
route. When browsers request your site they often will look for a
favicon in the same page as the requested file -- end of. A favicon
outside of the webroot as nothing to do with your error log.

Jul 17 '05 #2

James wrote:
A favicon can appear in any folder on your site and is normally in the route. When browsers request your site they often will look for a
favicon in the same page as the requested file -- end of. A favicon
outside of the webroot as nothing to do with your error log.

Thank you. Downloading and installing Apache, PHP, Smarty, and MySQL
was my project for the weekend; That and being a father to my three
boys. Since I downloaded a vanilla installation and ran the simplest
of scripts, I was surprised that a favorite icon was requested at all.
I got around the problem by copying favicon.ico from path C:\Program
Files\Apache Group\Apache2\manual\images to where Smarty was looking
for it and the problem went away. I am still curious why the icon was
being requested at all.

Well, learning something new is why I started all this. There are some
other wrinkles that I am investigating,

[client] PHP Parse error: syntax error, unexpected T_STRING
in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\index.php on line

But it's all fun.

--Best regards,
--Mike Jr.

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Steve Kershaw | last post: by
23 posts views Thread by canabatz | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.