PHP doesn't working

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

PHP doesn't working

Postby pippuccio76 » 24. September 2023 10:54

Hi ,i have update my system from windows 10 to 11, i have installed xampp , change the file :

C:\xampp\apache\conf\httpd.conf

whith my old htdocs (syncronized) :

Code: Select all

DocumentRoot "C:\Users\stefano.xxx\OneDrive - xxx\Documenti\htdocs"
<Directory "C:\Users\stefano.xxx\OneDrive - xxx\Documenti\htdocs">



If i try to show the older index.php i have :

Code: Select all
<?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 solve it ?
pippuccio76
 
Posts: 5
Joined: 24. September 2023 10:39
XAMPP version: 3
Operating System: Windows 11

Re: PHP doesn't working

Postby Altrea » 24. September 2023 11:20

How do you try to show the index.php?
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: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: PHP doesn't working

Postby pippuccio76 » 24. September 2023 14:12

From browser
pippuccio76
 
Posts: 5
Joined: 24. September 2023 10:39
XAMPP version: 3
Operating System: Windows 11

Re: PHP doesn't working

Postby Altrea » 24. September 2023 15:39

how exactly?
What does your browsers address bar show at the time the error occurs?
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: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: PHP doesn't working

Postby pippuccio76 » 24. September 2023 20:13

This is screenshot of chrome:

https://imgur.com/a/DmHeDUk
pippuccio76
 
Posts: 5
Joined: 24. September 2023 10:39
XAMPP version: 3
Operating System: Windows 11

Re: PHP doesn't working

Postby pippuccio76 » 24. September 2023 20:33

FOund error :

change :

Code: Select all
DocumentRoot "C:\Users\stefano.xxx\OneDrive - xxx\Documenti\htdocs"
<Directory "C:\Users\stefano.xxx\OneDrive - xxx\Documenti\htdocs">


to :


Code: Select all
DocumentRoot "C:/Users/stefano.xxx/OneDrive - xxx/Documenti/htdocs"
<Directory "C:/Users/stefano.xxx/OneDrive - xxx/Documenti/htdocs">



backslash....
pippuccio76
 
Posts: 5
Joined: 24. September 2023 10:39
XAMPP version: 3
Operating System: Windows 11

Re: PHP doesn't working

Postby pippuccio76 » 24. September 2023 20:35

ANtother problem :

i use codeigniter 4 in my project , if i try to do :

php spark serve


Code: Select all
"php" non è riconosciuto come comando interno o esterno,
 un programma eseguibile o un file batch.


(Italian error)
pippuccio76
 
Posts: 5
Joined: 24. September 2023 10:39
XAMPP version: 3
Operating System: Windows 11


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 204 guests