arquivo php não executando no apache 2

0

Estou tentando executar o php com o netbeans, quando tento executá-lo, o echo no php não está chegando no navegador, mas o arquivo html está funcionando

Meu código

<html>
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>jjjjjj
    <?php        
    echo 'hello world';
    ?>
</body>
</html>

Apenas o jjjjjj está chegando.

Quando eu dou php -v no terminal isso está vindo

PHP 7.0.4-7ubuntu2 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

e eu procurei por problema php e tentei instalar o php mas

sudo apt-get install apache2 php5 libapache2-mod-php5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apache2 is already the newest version (2.4.18-2ubuntu3).
php5 is already the newest version (5.3.2-1ubuntu4).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dbus : Depends: adduser but it is not going to be installed
 dpkg : Breaks: libapache2-mod-php5 (< 5.6.4+dfsg-3~) but 5.3.2-1ubuntu4 is to be installed
 libapache2-mod-php5 : Depends: apache2-mpm-prefork (> 2.0.52) but it is not going to be installed or
                                apache2-mpm-itk but it is not installable
                       Depends: apache2.2-common but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

o problema é com php7 ou php5?

Por favor me ajude

    
por Mukund 13.05.2016 / 13:27

1 resposta

0

Do seu log, parece que uma versão mais antiga do pacote (que talvez não oficial) está causando problemas durante a instalação.

A resposta à sua pergunta é bem explicada com a solução aqui: askubuntu: libapache- edição de instalação do mod5-php

Siga a solução lá. Se houver problema, por favor comente.

    
por ankit7540 14.05.2016 / 10:48