Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am trying to install LAMP on my Ubuntu 12.04, from the method shown in this link. After running the following code
sudo apt-get install php5 mysql-server apache2
I should have php installed, but when i type "localhost/info.php" it does not show the PHP window that it is supposed to show, instead the file gets downloaded in the Downloads folder
Any help would be appreciated
Restart the apache.
sudo service apache2 restart
I would recommend you to install the packages in a different order:
sudo apt-get install apache2 php5 mysql-server
I mean , install first apache so when php is installed then will automatically enable the mod_php apache module. But because you installed the php5 package first may be the mod_php is not yet enabled. Just double check that.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I a2enmod php7.4 and a2dismod php7.3 on apache & Ubuntu and my Wordpress sites stopped working saying cannot connect to database.
Upon further investigation through phpinfo mysqli is not enabled with php7.4. If I reenable php7.3 then mysqli is enabled, switch back to 7.4 and nothing.
I have tried looking at php.ini and adding:
extension=php_mysqli
extension=php_mysqli.so
No change.
I have tried running sudo apt-get install php-mysql and it says it is already installed.
I have tried running sudo apt-get install php7.4-mysql and it says that doesn't exist.
Does php7.4 not support mysqli at all?
OK I've found it.
Need to add repository: sudo add-apt-repository ppa:ondrej/php
Then sudo apt-get install php7.4-mysql
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
(Please note I am completely new to this, don't be mean)
I have a laptop (running a clean install of Ubuntu), how can I set up a local testing server that any computer on my network can access? It has to be SQL and PHP capable
Ok So You want to setup Localhost with apche2 , mysql and phpmyadmin ?
First install apache2 using command line
sudo apt-get install apache2
then install php and other stuffs
sudo apt-get install php5,php5-cli,php5-mysql,php5-curl
Now you need to install Mysql server
sudo apt-get install mysql-server
This will ask username and password for mysql server
then install phpmyadmin
sudo apt-get install phpmyadmin
Provide mysql credential while installing and here you go .. :-) .
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I need to install clamav to be used on php. How can I do it? I have tried to google how to install clamav, but most instructions either install clam av correctly, but not the php package, or missing dependencies, or similar problems.
You just need to install ClamAV like normal (with the epel repo)...
yum install clamav
yum install clamav-devel
If you don't have EPEL you can get it from IUS community (if you want you can also grab the IUS repo and get the latest version of PHP) - thank the RackSpace engineers for this!
wget http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/epel-release-6-5.noarch.rpm
rpm -ivh epel-release-6-5.noarch.rpm
Then you download and install this library, which will handle all the hard things for you.
wget **the direct link you got**
tar -xvzf php-clamav_0.15.7.tar.gz
cd php-clamav-0.15.7
phpize
./configure
make
make install
Now add the extension to your /etc/php.ini
extension=/usr/lib64/php/modules/clamav.so
Remember to change the path to what was given to you by make install
then restart your Apache
service httpd restart
Make a file with the contents:
<?php
echo cl_info();
It should come up with something like this:
Now you should have access to all the library functions, you can now scan files like this:
$retcode = cl_scanfile($file, $virus_name);
if ($retcode === CL_VIRUS)
{
echo "Virus Detected! {$virus_name}";
}
Congratulations! You can find other functions here
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a problem: on my server phpmyadmin doesn't work anymore.
it offers the file db_structure.php for download instead of parsing it .
once downloaded it has 0KB
I already removed it with atp-get purge and reinstalled it, but still the same
what could be wrong?
maybe a module missing that phpmyadmin is using? cause all other php files work on my server
I had same problem.
Try following command. This is solved my problem.
sudo apt-get install libapache2-mod-php5
In general, download instead of running is caused by not installed/enabled php module.
You may also enable the php apache module using:
sudo apt-get install php
sudo a2enmod php
I found out the reason:
i had the beta version of googles spdy:// protocol included on my server and this caused the error.
i disabled it in
/etc/apache2/mods-enebled/
and everything went fine again
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am attempting to install the expect pecl extension.
OS version = 10.7.3
PHP version 5.3.10 installed via macports
expect version 5.45 installed via macports
The command I am executing:
sudo pecl -d preferred_state=beta install expect
fails with ld: library not found for -lexpect
The libexpect5.45.dylib file is located in /opt/local/lib
full output of the install command is here PASTEBIN
From what I can tell pecl just can not find the libexpect library, I even tried prepending
LD_LIBRARY_PATH=/opt/local/lib/expect5.45 and
LD_LIBRARY_PATH=/System/Library/Tcl/8.5/expect5.45 and
LD_LIBRARY_PATH=/opt/local/lib each location has an expect5.45.dylib file. It did not help.