3

I've installed Xampp 1.8.3 with the installer and I'm trying to move my htdocs folder from C:\xampp\htdocs to C:\Users\Håvard\htdocs. I've done the necessary edits to the httpd.conf file in xampp and Apache is starting, no problem there.

I've been struggling with this problem for a few days now, I even posted a question on it here earlier. Since then I've gotten a little bit further in my quest for a solutiion and I've come to the conclusion that this is a problem regarding the norwegian letter in my Windows-username (and therefore userfolder)

When I try to open my PHP project as localhost/project/index.php i get this message:

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required 'C:/Users/Håvard/htdocs/project/index.php' (include_path='.;C:\xampp\php\pear\') in Unknown on line 0

The reason that I believe the norwegian letter is the reason for this message is that if I change the DocumentRoot and Directory in httpd.conf to anything else besides this folder (ex: C:/Users/Daniel) it works like a charm.

Why am I getting this error message? There is nothing wrong with my index.php as I've tried it with a different documentroot... Why is the "Håvard"-folder the problem? Is it the norwegian letter, or something else I have overlooked?

Community
  • 1
  • 1
Håvard Brynjulfsen
  • 819
  • 1
  • 12
  • 22
  • 1
    Maybe check this out: http://stackoverflow.com/q/1408/3933332 ! – Rizier123 Nov 09 '14 at 00:39
  • Thanks, but I've already tried it :) It's working fine if I use any other folder than my "Håvard"-folder... So I'm trying to find a solution to why this folder is the problem – Håvard Brynjulfsen Nov 09 '14 at 00:45
  • Configer your document root so that it is working! then make a php skript where you include an other php skript but this skript has to be in a folder with the name `Håvard` if it work's it's not a include problem it has to do with then config file and how this is used! – Rizier123 Nov 09 '14 at 00:50
  • Okay so an other idea: every where, where you used `Håvard` you gone warp the string/ name with this function! `utf8_decode()` (P.S. forget the other idea i test it already) – Rizier123 Nov 09 '14 at 00:56
  • `utf8_decode` works, but that's just for includes I do in my php-files.. But my problem exists "Unknown on line 0"... Where is line 0? I mean, it's not a problem inside my php-files – Håvard Brynjulfsen Nov 09 '14 at 01:02
  • So you mean the directory works but you can call skripts in your browser? – Rizier123 Nov 09 '14 at 01:03
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/64559/discussion-between-havard-brynjulfsen-and-rizier123). – Håvard Brynjulfsen Nov 09 '14 at 01:06
  • 1 Idea i have left: download https://de.emeditor.com/ this editor press ctrl + o and then change the entire xampp directory to utf-8! after that try it again to set your document root! And if php works in the new directory – Rizier123 Nov 09 '14 at 02:26

1 Answers1

0

This happened to me once, My problem was that i had extracted an old project into the xampp folder. This old project included an .htaccess file which was messing with everything within the xampp folder. The solution was to delete the .htaccess file. I hope this helps someone.

Punter Bad
  • 473
  • 7
  • 14