Apache2 not running php files




















GioMac GioMac 4, 3 3 gold badges 22 22 silver badges 41 41 bronze badges. Pete Pete 1. Almino Melo Almino Melo 1 2 2 bronze badges. Sign up or log in Sign up using Google.

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked 0. Related 2. Hot Network Questions.

Question feed. Getting PHP to work with apache to run. Asked 10 years, 10 months ago. Active 4 years, 7 months ago. Viewed 33k times.

How can I fix this? Improve this question. Add a comment. Active Oldest Votes. Run below commands again and check Improve this answer. I got several errors during the process, here's my full output: pastebin. I think you probably missed restarting apache Kevin - php4 definitely won't exist, you installed php5.

And regarding your edited post, it says directory not found, perhaps I don't even have apache installed? Learn more. Asked 7 years, 9 months ago. Active 1 year, 9 months ago. Viewed k times.

Improve this question. ThunderBird 1, 13 13 gold badges 17 17 silver badges 30 30 bronze badges. Add a comment. Active Oldest Votes. Typing: sudo apt-get install apache2 php5 libapache2-mod-php5 will install everything you need and will start the apache server with support for PHP.

To verify that the php module is loaded, type: a2query -m php5 if not enabled, then load with: sudo a2enmod php5 and restart apache: sudo service apache2 restart Update for php7. Install: sudo apt-get install apache2 php7.

Improve this answer. Niket Pathak 1 1 silver badge 6 6 bronze badges. It would be better to use a2enmod than to copy the file manually between mods-available and mods-enabled. For ubuntu Show 5 more comments. Community Bot 1. Ubuntu This single command will do the job for you: sudo apt-get install apache2 php libapache2-mod-php Here libapache2-mod-php is a meta-package that installs libapache2-mod-php7.

You have to restart apache after this of course. Jiminy Idiot Jiminy Idiot 41 1 1 bronze badge. Open php.



0コメント

  • 1000 / 1000