Categories

See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

php file not running in apache 2

General Tech Bugs & Fixes
Max. 2000 characters
Replies

usr_profile.png
Jai Khanna

User

( 6 months ago )

 

I am trying to run php with netbeans, when i try to run it, the echo in php is not comming in the browser, but the html file is working

My code

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

Only the jjjjjj is comming.

When i give php -v in terminal this is comming

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

and i searched for php problem and tried to install php but

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.

the problem is with php7 or php5?

Please help me

what's your interest


forum_ban8_5d8c5fd7cf6f7.gif