You are here: Relative addressing issue. « PHP Programming Language « IT news, forums, messages
Relative addressing issue.

Posted by AlterEgo on 09/20/07 22:28

Hi all,

Win 2k3 server
Apache 2.0.59
PHP 5.2.4
Eclipse 3.3

I have been teaching myself open source web development utilizing a book
which I highly recommend for developers from other environments learning
XAMP web development: Core Web Application Development with PHP and MySQL.

I copied and modified some examples from the CD and have worked through most
of my issues so far. I'm stuck on a problem that I think is due to some
configuration item.

This is my web file structure relevant to the issue:

c:\web\tbwe\
c:\web\tbwe\error.php
c:\web\tbwe\includes\
c:\web\tbwe\includes\errors.php
c:\web\tbwe\images\
c:\web\tbwe\css\
c:\web\tbwe\logs\tbwe_log.log

In the "/includes" folder I have several files, among them is a file called
errors.php containing an error class. I get the following entries in the
Apache error log when I execute a page that calls the error function:

[Thu Sep 20 14:52:18 2007] [error] [client 127.0.0.1] PHP Warning:
error_log(../../logs/tbwe_log.log) [<a
href='function.error-log'>function.error-log</a>]: failed to open stream: No
such file or directory in C:\\Web\\Tbwe\\includes\\errors.php on line 61
[Thu Sep 20 14:52:18 2007] [error] [client 127.0.0.1] script
'C:/Web/Tbwe/includes/error.php' not found or unable to stat
[Thu Sep 20 14:52:19 2007] [error] [client 127.0.0.1] script
'C:/Web/Tbwe/includes/error.php' not found or unable to stat
[Thu Sep 20 14:52:27 2007] [error] [client 127.0.0.1] script
'C:/Web/Tbwe/includes/error.php' not found or unable to stat

***First error:
Line 61 in the errors.php file:
error_log(date('c')
. " Unhandled Error ($in_errfile, $in_errline): "
. "$in_errno, '$in_errstr'\r\n", 3, LOGFILE_PATH);

My guess is that LOGFILE_PATH isn't set correctly which is set earlier as
follows:
define('LOGFILE_PATH', '../../logs/tbwe_log.log');

***Second error:
This error doesn't display a line number, but there is a call that
references *error.php* that displays an error page. The file is in the doc
root, it is not in the /includes/ folder where the application is looking
for it. This is the call:

header('Location: ../error.php?err=' . $in_errno);

*** Apache relevant configuration:

DocumentRoot "C:/Web/Tbwe"

<Directory "C:/Web/Tbwe">
Options Indexes FollowSymLinks
Options +Includes
Options +IncludesNoExec
AllowOverride Limit
Order allow,deny
Allow from all
<Directory>

*** PHP relevant configuration:

doc_root ="C:\Web\Tbwe"
include_path=".;C:\Program Files\PHP\pear"
include_path = ".;c:\Web\Tbwe"

Any help is greatly appreciated.

-- Bill

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация