I have installed all the necessary servers to work with php in Ubuntu..
But i don't know how to compile php in Linux.
My hostname is "blackparrot" my user name is "red"
Pls tell or show me a way to compile php here
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
You don't need to compile PHP if you already installed LAMP as PHP is run in the server itself, you need just to invoke the files in the proper place as @MustafaJF mention.
nautilus with administrative privileges by executing (in a terminal or by hitting Alt-F2 for the run program dialog), write
gksudo nautilus, provide your password and go to the
/var/www folder, over there simply drop your php files which you can access later by opening a web browser and pointing to the
foldername is the folder where the php files will reside and
yourphpfile.php is the file containing your php code.
A good example to test if everything is running fine is the to create a file with the next contents inside:
<?php phpinfo(); ?>
Let's name this file
phpinfo.php and place it at the very root of
/var/www folder, after which we'll invoke it via
http://localhost/phpinfo.php and will result in something like this:
Results may vary from case to case.
/var/www is a protected place of which you will need administrative privileges each time you want to access the files for a change or something. But if you prefer, you can (at your own risk) change the location of your
/var/www to a different place for testing purposes, which will suppose no risk at all if you do it just for testing purposes and have your server not exposed to the net. See this answer for a workaround to change the default location of your testing server.
Please inform if you are experiencing any issues.