Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Bugs & Fixes 2 years ago
Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I am not much into Linux. I am trying to setup a server through ssh. I installed apache php and mysql through this command.
sudo aptitude install apache2 php5-mysql libapache2-mod-php5 mysql-server
but I think php is not enabled on the server.
When I run command I receive response as below
$ which apache2ctl /usr/sbin/apache2ctl
But when I check $ which php I receive no response.
$ which php
$ locate php5 /etc/apparmor.d/abstractions/php5 /usr/share/ubuntu-serverguide/html/C/php5.html
On Debian (and thus Ubuntu), the Apache configuration files are stored under /etc/apache2. In that directory, there are 2 sub-directories for configuring modules: mods-available and mods-enabled. When you install an Apache module (ie: foo), it will put foo.load (and possibly foo.conf) into the /etc/apache2/mods-available directory. When you enable an Apache module using a2enmod, it will create a symbolic link in /etc/apache2/mods-enabled for each of the matching files from /etc/apache2/mods-available.
/etc/apache2
mods-available
mods-enabled
foo.load
foo.conf
/etc/apache2/mods-available
a2enmod
/etc/apache2/mods-enabled
Thus for an Ubuntu server with PHP5 enabled, you should see something like this:
$ cd /etc/apache2 $ ls -l mods-*/*php* -rw-r--r-- 1 root root 133 2008-02-27 15:49 mods-available/php5.conf -rw-r--r-- 1 root root 59 2008-02-27 15:49 mods-available/php5.load lrwxrwxrwx 1 root root 27 2009-02-05 07:30 mods-enabled/php5.conf -> ../mods-available/php5.conf lrwxrwxrwx 1 root root 27 2009-02-05 07:30 mods-enabled/php5.load -> ../mods-available/php5.load
If the php5 configuration files aren't shown in the mods-enabled directory, enable them as follows:
$ ref="https://forum.tuteehub.com/tag/sudo">sudo a2enmod php5 $ ref="https://forum.tuteehub.com/tag/sudo">sudo /etc/init.d/apache2 restart
Once you've done that, in order to test that PHP5 is configured, create /var/www/test.php as follows:
/var/www/test.php
$ echo "" | ref="https://forum.tuteehub.com/tag/sudo">sudo tee /var/www/test.php $ ref="https://forum.tuteehub.com/tag/sudo">sudo chown www-data:www-data /var/www/test.php $ ref="https://forum.tuteehub.com/tag/sudo">sudo chmod 755 /var/www/test.php
Once that's done, you should be able to browse to /test.php on that server and see the PHP configuration data.
/test.php
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.