Hi guys, i just made an update to ubuntu 19.10. i installed the lamp before on linux and with localhost/index.php i could see the website. Now when i go to localhost/index.php i can see the sourcecode of the website but not the website running. do you have any idea what can be the problem? Code: <?php include 'inc/header.php'; ?> <div class="panel panel-default"> <h2>User Registration</h2> </div> <div class="panel-body"> <div style="max-width: 600px; margin:0 auto"> <form action="" method="POST"> <div class="form-group"> <label for="name"> Your Name </label> <input type="text" id="name" name="name" class="form-control" /> </div> <div class="form-group"> <label for="username"> User Name </label> <input type="text" id="username" name="username" class="form-control" /> </div> <div class="form-group"> <label for="email"> Email Address </label> <input type="text" id="email" name="email" class="form-control" /> </div> <div class="form-group"> <label for="password"> Password </label> <input type="password" id="password" name="password" class="form-control" /> </div> </form> <button type="submit" name="login" class="btn btn-success"> Submit </button> </div> </div> <?php include 'inc/footer.php'; ?> thanks for your kind help Tom
Have you installed the necessary PHP packages? The symptom you describe indeed looks like website does not execute the PHP script. Try running PHP from command line, does it work then?
Hi thanks for your quick answer. I have the problem with the chrome browser only , with firefox it is working normally. when i run php from command line it works: Code: tom@tom-air:~$ php -r 'echo function_exists("foo") ? "yes" : "no";' notom@tom-air:~$
Try again in incognito mode. If it behaves differently with browsers, it looks like a caching problem.
Then PHP seems not (or no longer) to be activated in the webserver. Look at installed modules and read the webserver logfiles. See also: https://askubuntu.com/questions/451708/php-script-not-executing-on-apache-server When looking at these guides, note that installing mod_php is a fast solution but for a production server you want to use php-fpm