Access Forbidden - Error 403 - Mac

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

Access Forbidden - Error 403 - Mac

Postby jp87 » 08. May 2023 21:23

Hello,
I just installed Xampp and trying to launch my php page via the browser by typing http://localhost/hello.php (my new php file)

This is the message that I am getting just in the browser...

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

localhost
Apache/2.4.56 (Unix) OpenSSL/1.1.1t PHP/8.2.4 mod_perl/2.0.12 Perl/v5.34.1


There are no error messages in the Server Events log and all my servers are running properly.

I am using VSC to code my php, I saved the folder for my new code files in my documents folder and then saved the new document root path to that folder in the httpd.conf file. I also changed the directory.

I also tried to fix the issue by changing the permissions by going to httpd-xampp.conf and putting 'Require all granted'. This didn't fix the issue.

When opening up my index,php file that's in the htdocs folder, it has an error message at the bottom.

<?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 :-(

How can I get php local host running? Thanks for your help. I'm new to programming.
jp87
 
Posts: 1
Joined: 08. May 2023 21:05
XAMPP version: 8.2.4
Operating System: MacOS Ventura 13.1

Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 53 guests