Page 1 of 1

PHP doesn't working

PostPosted: 24. September 2023 10:54
by pippuccio76
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 ?

Re: PHP doesn't working

PostPosted: 24. September 2023 11:20
by Altrea
How do you try to show the index.php?

Re: PHP doesn't working

PostPosted: 24. September 2023 14:12
by pippuccio76
From browser

Re: PHP doesn't working

PostPosted: 24. September 2023 15:39
by Altrea
how exactly?
What does your browsers address bar show at the time the error occurs?

Re: PHP doesn't working

PostPosted: 24. September 2023 20:13
by pippuccio76
This is screenshot of chrome:

https://imgur.com/a/DmHeDUk

Re: PHP doesn't working

PostPosted: 24. September 2023 20:33
by pippuccio76
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....

Re: PHP doesn't working

PostPosted: 24. September 2023 20:35
by pippuccio76
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)