What items are in htdocs when installed?

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

What items are in htdocs when installed?

Postby ichi » 23. December 2017 19:47

I created a new project called SetupTest using NetBeans 8.2, under php>php application. But I accidentally set the Sources Folder to:
/Applications/XAMPP/xamppfiles/htdocs directory instead of /Applications/XAMPP/xamppfiles/htdocs/SetupTest.

I would like to remove what ever made during the process of creating the new project,
So I wondered if you can tell me what htdocs contents originally. So I won't remove those items.

At the moment, when I see index.php, it says that
"Something is wrong with the XAMPP installation :-("
I presumed it could be be something to do with the source folder setting.
(well, at least I can make it straight so if it is nothing to do with the source folder set, I can eliminate the possibility)

I am new to both NetBeans and Xampp.

Well, alternatively I can just remove XAMPP then install it again...
Thank you in advance.

XAMPP: 7.0.26-0 from https://www.apachefriends.org/download.html.
OSX: 10:13:2
php: 7.0.26_18
Xdebug: 2.4.0
ichi
 
Posts: 2
Joined: 23. December 2017 18:50
XAMPP version: 7.0.26-0
Operating System: OSX 10.13.2

Re: What items are in htdocs when installed?

Postby Nobbie » 24. December 2017 11:25

At the moment, when I see index.php, it says that
"Something is wrong with the XAMPP installation :-("


That usually happens when you open the file index.php directly from your file system, instead via localhost. Dont click twice on index.php or similar, instead enter http://localhost/index.php into your browser.
Nobbie
 
Posts: 10441
Joined: 09. March 2008 13:04

Re: What items are in htdocs when installed?

Postby ichi » 24. December 2017 15:24

http://localhost/index.php
It doesn't work. It must be something to do with htdoc preset or something.

"Something is wrong with the XAMPP installation :-(" is in actual index.php file.

it looks like this.

<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/dashboard/');
exit;
?>
Something is wrong with the XAMPP installation :-(

So it's primary configuration (I think).

I created another project within htdocs holder, it perfectly fine and works.
So back to the question, what does htdocs folder originally contents?
ichi
 
Posts: 2
Joined: 23. December 2017 18:50
XAMPP version: 7.0.26-0
Operating System: OSX 10.13.2

Re: What items are in htdocs when installed?

Postby Nobbie » 25. December 2017 13:22

That means your installation is corrupted, the PHP code (which you are seeing) is not interpreted by PHP. This either means PHP has not been activated (dont know how to do that) or you have a .htaccess file in htdocs which sets wrong Content Type for PHP files. Maybe a line like "AddType *.php ...." is inside a .htaccess file.

I dont know how you achieved that, you must have copied something into the folder. I think a fresh install is the best option for you. I dont know the original content of htdocs folder, as i have no OSX version.
Nobbie
 
Posts: 10441
Joined: 09. March 2008 13:04


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 4 guests