Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache2.2.14 runs with PHP 5.3.1 but getting include errors |
|
Author |
|
herohittoo
Joined: 23 Nov 2009 Posts: 2 Location: Buffalo
|
Posted: Mon 23 Nov '09 22:33 Post subject: Apache2.2.14 runs with PHP 5.3.1 but getting include errors |
|
|
Hi,
First let me apologize if this is a repeat on the forum. I have my Apache server running on Windows XP and I have PHP installed also. I am trying to run my web server but a few things are happening. The php pages are not coming up in php but showing the code on the page. When I run php forthe page on the command line I get the following errors:
Code: |
C:\PHP>php.exe c:\Apache2.2\htdocs\seer_2\index.php
PHP Warning: include(./config/globaloptions_seer_0.php): failed to open stream:
No such file or directory in C:\Apache2.2\htdocs\seer_2\index.php on line 54
PHP Warning: include(): Failed opening './config/globaloptions_seer_0.php' for
inclusion (include_path='.;C:\php5\pear') in C:\Apache2.2\htdocs\seer_2\index.php on line 54
PHP Notice: Undefined variable: seer_DEFAULTHOMELOGO in C:\Apache2.2\htdocs\seer_2\index.php on line 72
PHP Notice: Undefined variable: seer_DEFAULTWELCOMEMSG in C:\Apache2.2\htdocs\seer_2\index.php on line 75
PHP Warning: include(./include/seer_header.php): failed to open stream: No such file or directory in C:\Apache2.2\htdocs\seer_2\index.php on line 82
PHP Warning: include(): Failed opening './include/seer_header.php' for inclusion (include_path='.;C:\php5\pear') in C:\Apache2.2\htdocs\seer_2\index.php on line 82
<P CLASS='PAGETITLE'>
<B>Welcome</B>
</P><TABLE ALIGN='CENTER' WIDTH='630'>
<TR>
<TD WIDTH='380' ALIGN='CENTER' VALIGN='M
IDDLE'>
<IMG SRC='' ALT='bull'>
</TD>
<TD WIDTH='250'>
<P CLASS='INFOREPORT'></P>
</TD>
</TR>
</TABLE>
PHP Warning: include(./include/seer_footer.php): failed to open stream: No such file or directory in C:\Apache2.\htdocs\seer_2\index.php on line 85
PHP Warning: include(): Failed opening './include/seer_footer.php' for inclusion (include_path='.;C:\php5\pear') in C:\Apache2.2\htdocs\seer_2\index.php on line 85
|
Here is the relavent, imo, code from the http.conf:
Code: |
ServerRoot "C:/apache2.2"
# Php external compatability
PHPIniDir "C:/php/"
LoadModule php5_module "C:/php/php5apache2_2.dll"
DocumentRoot "C:/Apache2.2/htdocs"
<Directory "C:/Apache2.2/htdocs">
|
and here is the code from the php.ini:
Code: |
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = Off
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\Apache2.2\seer_2\include"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
; http://php.net/doc-root
doc_root = c:/Apache2.2/htdocs
|
I dont mean for this to be long winded but I wanted to show you everything I could so you could point and show me what a fool I am being.
I appreciate any help.
Thank you!!! |
|
Back to top |
|
Millennium
Joined: 17 Apr 2006 Posts: 179 Location: Leiderdorp, NL, EU
|
Posted: Tue 24 Nov '09 0:03 Post subject: |
|
|
how about removing the comment before include_path?
like
Code: |
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = Off
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
include_path = ".;c:\Apache2.2\seer_2\include"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
; http://php.net/doc-root
doc_root = c:/Apache2.2/htdocs
|
|
|
Back to top |
|
herohittoo
Joined: 23 Nov 2009 Posts: 2 Location: Buffalo
|
Posted: Tue 24 Nov '09 4:09 Post subject: Here is the result |
|
|
I had tried that earlier, that is why the code wasnt default. Listed below is what the error returns:
Code: |
C:\PHP>php.exe c:\Apache2.2\htdocs\seer_2\index.php
PHP Warning: include(./config/globaloptions_seer_0.php): failed to open stream:
No such file or directory in C:\Apache2.2\htdocs\seer_2\index.php on line 54
PHP Warning: include(): Failed opening './config/globaloptions_seer_0.php' for
inclusion (include_path='.;c:\Apache2.2\seer_2\include') in C:\Apache2.2\htdocs\
seer_2\index.php on line 54
PHP Notice: Undefined variable: seer_DEFAULTHOMELOGO in C:\Apache2.2\htdocs\see
r_2\index.php on line 72
PHP Notice: Undefined variable: seer_DEFAULTWELCOMEMSG in C:\Apache2.2\htdocs\s
eer_2\index.php on line 75
PHP Warning: include(./include/seer_header.php): failed to open stream: No such
file or directory in C:\Apache2.2\htdocs\seer_2\index.php on line 82
PHP Warning: include(): Failed opening './include/seer_header.php' for inclusio
n (include_path='.;c:\Apache2.2\seer_2\include') in C:\Apache2.2\htdocs\seer_2\i
ndex.php on line 82
<P CLASS='PAGETITLE'>
<B>Welcome</B>
</P><TABLE ALIGN='CENTER' WIDTH='630'>
<TR>
<TD WIDTH='380' ALIGN='CENTER' VALIGN='M
IDDLE'>
<IMG SRC='' ALT='bull'>
</TD>
<TD WIDTH='250'>
<P CLASS='INFOREPORT'></P>
</TD>
</TR>
</TABLE>PHP Warning: include(./include/seer_footer.php)
: failed to open stream: No such file or directory in C:\Apache2.2\htdocs\seer_2
\index.php on line 85
PHP Warning: include(): Failed opening './include/seer_footer.php' for inclusio
n (include_path='.;c:\Apache2.2\seer_2\include') in C:\Apache2.2\htdocs\seer_2\i
ndex.php on line 85
C:\PHP>
|
For some reason, it cannot dictate the file system properly. If I put the included php files in the same folder as the index, it will call but every include in every php file then gives an error. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 24 Nov '09 17:12 Post subject: |
|
|
Wait a moment!
You can't run internet pages from the commandline.
The includes are not in full paths, but relative paths. So if you realy want to run that on the command line (which makes no sense to me) you have to change the dir to the file
e.g.
Code: |
C:\>cd Apache2.2\htdocs\seer_2
C:\Apache2.2\htdocs\seer_2>C:\PHP\php.exe index.php
|
|
|
Back to top |
|
|
|
|
|
|