error message when accessing phpinfo

Problems with the Windows version of XAMPP, questions, comments, and anything related.

error message when accessing phpinfo

Postby wildswan » 19. March 2010 13:38

Windows 7
Apache2.2.14

Noob here. I have installed and can run Apache from the control panel app, however when I try to access phpinfo (either via splash screen, or by navigating to /localhost/index.php) I get the following message:

"Warning: file_put_contents(../../install/xampp_language.txt) [function.file-put-contents]: failed to open stream: No such file or directory in D:\xampp\htdocs\xampp\lang.php on line 2

"Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\xampp\lang.php:2) in D:\xampp\htdocs\xampp\lang.php on line 10"

When I look in the file directory, I find lang.php in D:/xampp/htdocs/xampp/lang.php.

Is there a way to fix this??

Here is a copy of the error log:

Warning: DocumentRoot [C:/xampp/htdocs] does not exist
Warning: DocumentRoot [C:/xampp/htdocs] does not exist
[Fri Mar 19 04:10:56 2010] [notice] Digest: generating secret for digest authentication ...
[Fri Mar 19 04:10:56 2010] [notice] Digest: done
[Fri Mar 19 04:10:56 2010] [notice] Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Fri Mar 19 04:10:56 2010] [notice] Server built: Nov 11 2009 14:29:03
[Fri Mar 19 04:10:56 2010] [notice] Parent: Created child process 3684
Warning: DocumentRoot [C:/xampp/htdocs] does not exist
Warning: DocumentRoot [C:/xampp/htdocs] does not exist
[Fri Mar 19 04:10:58 2010] [notice] Digest: generating secret for digest authentication ...
[Fri Mar 19 04:10:58 2010] [notice] Digest: done
[Fri Mar 19 04:10:58 2010] [notice] Child 3684: Child process is running
[Fri Mar 19 04:10:58 2010] [notice] Child 3684: Acquired the start mutex.
[Fri Mar 19 04:10:58 2010] [notice] Child 3684: Starting 150 worker threads.
[Fri Mar 19 04:10:58 2010] [notice] Child 3684: Starting thread to listen on port 443.
[Fri Mar 19 04:10:58 2010] [notice] Child 3684: Starting thread to listen on port 443.
[Fri Mar 19 04:10:58 2010] [notice] Child 3684: Starting thread to listen on port 80.
[Fri Mar 19 04:10:58 2010] [notice] Child 3684: Starting thread to listen on port 80.
[Fri Mar 19 04:13:15 2010] [error] [client ::1] File does not exist: D:/xampp/htdocs/favicon.ico
[Fri Mar 19 04:13:15 2010] [error] [client ::1] File does not exist: D:/xampp/htdocs/favicon.ico
[Fri Mar 19 04:13:18 2010] [error] [client ::1] File does not exist: D:/xampp/htdocs/favicon.ico

I'm assuming the "Warning: DocumentRoot [C:/xampp/htdocs] does not exist" is because I have moved the htdocs folder to d:/xampp/htdocs/, but maybe there is a clue here.
wildswan
 
Posts: 4
Joined: 12. March 2010 17:57

Re: error message when accessing phpinfo

Postby Altrea » 19. March 2010 14:22

wildswan wrote:"Warning: file_put_contents(../../install/xampp_language.txt) [function.file-put-contents]: failed to open stream: No such file or directory in D:\xampp\htdocs\xampp\lang.php on line 2
...
When I look in the file directory, I find lang.php in D:/xampp/htdocs/xampp/lang.php.


Can you find "../../install/xampp_language.txt" as well?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: error message when accessing phpinfo

Postby Altrea » 19. March 2010 16:10

wildswan wrote:I'm assuming the "Warning: DocumentRoot [C:/xampp/htdocs] does not exist" is because I have moved the htdocs folder to d:/xampp/htdocs/, but maybe there is a clue here.


Do you have changed your Directory Path (and VirtualHosts Document Root if you defined some) as well as DocumentRoot? search your httpd.conf file for All wrong C:/Xampp paths
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: error message when accessing phpinfo

Postby wildswan » 19. March 2010 16:45

No.
There is
    C:/xampp/htdocs-inactive/xampp/langs.php and langsettings.php and
    C:/xampp/htdocs-inactive/xampp/lang/languages.php.
    (htdocs-inactive is the folder where I kept the original copy of this folder on c: drive

And there is
    D:/xampp/htdocs/xampp/langs.php and langsettings.php and
    D:/xampp/htdocs/xampp/lang/languages.php

I moved the htdocs folder to d: and have the following settings in my httpd.conf file:

    ServerRoot "C:/xampp/apache"
    ServerName localhost:80
    DocumentRoot "D:/xampp/htdocs"
    <Directory "D:/xampp/htdocs">
      Options Indexes FollowSymLinks Includes ExecCGI
      AllowOvverride All
      Order allow,deny
      Allow from all
    </Directory>

A search on "language_txt" the returns only this file: C:/xampp/htdocs/xampp/naviperl.inc
wildswan
 
Posts: 4
Joined: 12. March 2010 17:57

Re: error message when accessing phpinfo

Postby wildswan » 19. March 2010 17:05

Altrea wrote:Do you have changed your Directory Path (and VirtualHosts Document Root if you defined some) as well as DocumentRoot? search your httpd.conf file for All wrong C:/Xampp paths


Other than the config settings mentioned in my previous post, are there any other settings that use the c:/xampp paths???
wildswan
 
Posts: 4
Joined: 12. March 2010 17:57

Re: error message when accessing phpinfo

Postby Altrea » 19. March 2010 22:15

okay, don't tried to use the xampp test applications from a different DocumentRoot before.

edit following files:
- D:\xampp\htdocs\xampp\index.php
- D:\xampp\htdocs\xampp\langsettings.php
- D:\xampp\htdocs\xampp\lang.php
- D:\xampp\htdocs\xampp\head.php
- D:\xampp\htdocs\xampp\navi.php
- D:\xampp\htdocs\xampp\naviperl.inc
- D:\xampp\htdocs\xampp\start.php

Search for ../../ (all relative paths) and replace them with absolute paths C:/xampp/

Try if that worked for you.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: error message when accessing phpinfo

Postby SageH » 10. June 2011 21:00

Sorry for the necro-post but this thread was the first result when searching for "Warning: DocumentRoot [C:/xampp/htdocs] does not exist" generated when I was trying to start apache.

For my xampp 1.7.4 on windows 7 installation running "httpd.exe -t" generated:
Warning: DocumentRoot [C:/xampp/htdocs] does not exist
Syntax OK

After pulling my hair out for a while I replaced the DocumentRoot in my httpd.conf with a known bad value i.e. DocumentRoot "c:/aasdfasdfasfasdf". Re-running httpd -t generated an error that DocumentRoot must be a directory. Reset it back to the correct value and got my original error message. That told me it was parsing farther through the file with my original value and that it must be getting overwritten somewhere.

At the end of the httpd.conf are a series of include statements. Going through each of those file, sure enough I found another DocumentRoot setting in the file httpd-ssl.conf. Corrected that and apache started right up. Hope this helps someone else.
SageH
 
Posts: 1
Joined: 10. June 2011 20:42


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 95 guests