Questions tagged [php]
PHP is a server-side scripting language, used for building browser-based applications. This includes websites as well as programs that don't really need any form of interaction with the user.
848
questions with no upvoted or accepted answers
9
votes
2
answers
4k
views
libMagickWand-6.Q16.so.2: cannot open shared object file
After upgrading Ubuntu 16.04 to 18.04, I can't run php commands.
php -v shows me this:
php: error while loading shared libraries: libMagickWand-6.Q16.so.2: cannot open shared object file: No such ...
6
votes
0
answers
8k
views
How to add support for MS Access .mdb to PHP7 PDO in Ubuntu 18.04
I needed to be able to read a .mdb (Microsoft Access© (JET) file) copied from a Windows system on Linux, specifically Ubuntu 18.04. I searched dozens of web sites and could not find a straightforward ...
5
votes
0
answers
777
views
How to disable mpm-itk for a specific virtualhost?
I've a main site on a server that needs to run a sudo command which I white listed via visudo. That worked fine until I installed apache-mpm-itk and then I started getting the following error:
sudo: ...
4
votes
0
answers
19k
views
php-fpm not creating /run/php/php7.2-fpm.sock (ubuntu 18.04 server)
error log ERROR: unable to bind listening socket for address '/run/php/php7.2-fpm.sock': No such file or directory
Could someone help me find the problem with this as I run out of ideas below is what ...
4
votes
0
answers
1k
views
Can't send email from PHP with SSMTP
I'm using ubuntu 16.04 and PHP 7. I make a website that allows admin to send an email to other admin. So I installed SSMTP and configured it properly. Here is the thing :
I can send an email by using ...
4
votes
2
answers
7k
views
apache2 on ubuntu 14 - localhost works but ip doesn't
I've just installed apache2 on my box, along with php5.
I can navigate to "localhost" and it works. But I can't access this webserver from another machine... or even locally using the IP ...
4
votes
1
answer
2k
views
Cannot load /usr/lib/apache2/modules/mod_mpm_itk.so
I ran tasksel to install lamp server, but I accidentally delete everything, when I got everything work as before I noticed that apache is not working and here is there message I get while trying to ...
4
votes
1
answer
741
views
php5 is already the newest version but in phpinfo i get 5.4
Details:
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
I want to install php5.5 so i try next step:
php -v
PHP 5.4.26 (cli) (built: Apr 8 ...
3
votes
0
answers
618
views
Any other ways to make multiple sites on one server use different PHP versions?
I recently upgraded the PHP version on 3 production servers to 7.4, along with MySQL and Apache2. Today we learned that one of the websites is still showing 7.2 in phpinfo(), despite php -v showing 7....
3
votes
1
answer
4k
views
How to install PECL on Ubuntu 21.04 with php8.0
i have problems with the usage/installation of the pecl library.
Here is what i did:
echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu hirsute main" >
/etc/apt/sources.list.d/...
3
votes
0
answers
2k
views
VsCode: PHP XDebug Cannot evaluate code without a connection
i'm using ubuntu v18.4 with apache2 and php7.3.3 installed. I tried to install php-debug in vscode, but i always get this error when start debugging:
Cannot evaluate code without a connection
here'...
3
votes
1
answer
4k
views
All PHP 7.4 are not available in 20.04
I just did a do-release-upgrade that went fine, but I am still stuck at PHP 7.3.
$ apt install php7.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some ...
3
votes
0
answers
868
views
Ubuntu 20.04 - Can't Install Older PHP Versions
I decided to install Ubuntu 20.04 and give it a go. I am loving it so far, but I have run into an issue that may prevent me from using it.
The default repositories have PHP 7.4, which is awesome, ...
3
votes
0
answers
129
views
UnixODBC reads ASCII?ANSI although It is compiled with iconv enabled
I have been searching for this issue for quite a while, please do not be quick to give me similar questions, here is the issue:
I installed and configured unixodbc on ubuntu, connected it to
oracle ...
3
votes
0
answers
4k
views
Upgrading to PHP 7.2 (from 7.0) broke MySQLi functions on NGINX server
EDIT - fixed with complete purge and reinstallation of PHP (see bottom)
I'm hosting a web server (using NGINX) with a MySQL database backend. It was working previously with PHP 7.0, but when I ...
3
votes
1
answer
1k
views
Safely upgrade PHP from 5.6.38 to PHP 7.2+ on Ubuntu 18.04.1 LTS
I am running a production server on Ubuntu 18.04.1 LTS which has PHP 5.6.38 installed. It's serving a PHP 5x application but because of composer and other requirements I need to upgrade it safely on ...
3
votes
1
answer
880
views
SSL Issue on curl by compiling PHP7
While compiling PHP7 with curl I got this message in my log:
/php-src/ext/curl/interface.c:74:5: warning: #warning "libcurl was compiled with SSL support, but configure could not determine which" "...
3
votes
0
answers
3k
views
How to install php7-fpm with Apache on Ubuntu 16.04 with custom .ini and chrooted vhosts?
After several security concerns, I decided to completely redo my server configuration on shared hosting because I need some vhosts to be able to use functions like exec and some running Wordpress to ...
3
votes
1
answer
4k
views
Apache2 not able to restart in Ubuntu 16.04
I installed Apache2 on my Ubuntu machine. At first it was working fine as I started and restarted many times in the course. But now suddenly when I tried to restart it gave me this error message:
[.......
3
votes
1
answer
1k
views
Can't connect MySQL and Web
I do some coding to connect MySQL and webserver. This is my coding
$dbusername = "root"; // enter database username, I used "arduino" in step 2.2
$dbpassword = "qonita84"; // enter database ...
3
votes
0
answers
855
views
Unmet dependencies when doing apt-get install php-soap
I'm trying to install (as root) php-soap on Ubuntu 14.04.
I did apt-get update and apt-get install php-soap, and got the following output:
Reading package lists... Done
Building dependency tree ...
3
votes
0
answers
441
views
MySQL support not available. after upgrade to 16.04.1 from 14.04
When I visit the webpage, all I see on the screen is "MySQL support not available." I have checked to see if mysql was running, and it is, apache is running, and I can see my phpinfo.php test file.
I'...
3
votes
1
answer
784
views
How can I build PHP5 Dependencies while having MariaDB installed?
I am trying to build php5 dependencies on Ubuntu 14.04.2 LTS. Unfortunately I get the following error message.
% sudo apt-get build-dep php5
Reading package lists... Done
Building dependency tree ...
3
votes
1
answer
3k
views
php application asking intl but already installed
My (Symfony) application currently crashes, throwing the error:
("The Symfony\Component\Intl\Collator\Collator::__construct() method's argument $locale value 'fr' behavior is not implemented. Only ...
3
votes
0
answers
491
views
Resetting a failed Horde installation on 14.04?
I first tried to install Horde Webmail by following the instructions on horde.org (ie PEAR install, like I did on my previous server, 7years ago) but it failed on connecting to mysql.
I then noticed ...
3
votes
0
answers
1k
views
Why is apache still logging my PHP Notices?
I have edited /etc/php5/acpache2/php.ini and set error_reporting = E_ALL & ~E_NOTICE then restarted apache, yet my /var/log/apache2/error.log is still filling up with PHP Notice: Undefined index: ...
3
votes
1
answer
3k
views
How to apply a php bug patch
I want to uptake fix for this PHP Bug: https://bugs.php.net/bug.php?id=52043
I am not sure on how can I install this patch. Conceptually I understand I need to follow following steps:
get php code &...
2
votes
0
answers
131
views
PhpMyadmin throwing 500 with nginx and Php on Ubuntu 22.04
I have tried installing phpmyadmin as mentioned in the link below
https://thelinuxterminal.com/how-to-install-phpmyadmin-ubuntu-22-10/
I followed it step by step but i am getting 500 if i visit the ...
2
votes
0
answers
353
views
Using phpize without installing php-dev
I am developing a PHP application that uses the Sync extension.
On the development server, I installed Sync through PECL, with the command sudo pecl install sync. When I tried to bring the application ...
2
votes
0
answers
2k
views
Unable to load dynamic library 'mongodb.so' (tried: /usr/lib/php/20210902/mongodb.so on fresh 22.04.1 LTS
I installed a fresh image
updated and upgraded
apt nginx-common php8.1-cli php8.1-fpm php8.1-mongodb
PHP -v
PHP Warning: PHP Startup: Unable to load dynamic library 'mongodb.so'
(tried: /usr/lib/php/...
2
votes
0
answers
2k
views
The following packages have been kept back: PHP
I get this message after 22.04 upgrade on a Digital Ocean LAMPSTACK droplet:
The following packages have been kept back:
libapache2-mod-php7.4 php7.4-bz2 php7.4-cli php7.4-common php7.4-json php7.4-...
2
votes
1
answer
11k
views
SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746
I'm using PHP Laravel 7.4 on Ubuntu 20.04 and trying to get data from SQL Server located on a Windows server in another cloud.
This method was tested on my PC (Windows) and it successfully retrieved ...
2
votes
1
answer
6k
views
sh: 1: python: not found when execute python script from php
I'm tring to execute a python script call from php with the command below:
$output = shell_exec('python /var/www/html/sna/server/userManagement.py '. $user.' '. $pass .' \''.$action.'\' 2>&1');
...
2
votes
0
answers
2k
views
How to install old PHP 5.5.21 on ubuntu 20.04?
I need to install specific PHP 5.5.21 version with some extensions GD2, PDO, PDO_pgsql, SOAP, ZIP, ICONV, OPENSSL, XML, with Apache2 in Ubuntu 20.04
I would like to install PHP on defaults directory ...
2
votes
1
answer
6k
views
After Upgrading to PHP 7.4 No MySQL
I updated PHP to 7.4 and according to phpinfo() the mysqli running is:
Client API library version mysqlnd 7.4.0
but PHP pages do not connect. The MySQL server is running as I can access it through ...
2
votes
1
answer
2k
views
PHP serve command error in Laravel project
I just installed Laravel with all the requirements (php, composer, nodejs) and created a new project called blogg. When I run php artisan serve
it returns an error saying that autoload.php does not ...
2
votes
0
answers
438
views
Web server goes unresponsive
I've been knocking my brains on this for a week...
Setup:
Ubuntu 16.04
LAMP stack, php 5.6 (yes I know I need to upgrade this).
The server runs many sites for one organization, one of which gets ...
2
votes
0
answers
674
views
Directive RemoveHandler working with PHP5.6 and PHP 7
I have 2 linode servers each hosting a website. Site A runs under Ubuntu 14.04/Apache2/Mysql/PHP 5.59, Site B runs under Ubuntu 16.04/Apache2/Mysql/PHP 7.0, and I am using Webmin/Virtualmin to manage ...
2
votes
0
answers
889
views
How to get the latest PHP 7.3 patches in 18.04?
I have installed PHP 7.3 via the ppa:ondrej/php repository and everything was running smoothly, until I ran across this major 7.3.0 bug with __callStatic which lead to a lot of broken code in my ...
2
votes
0
answers
1k
views
How to install php7.2-curl without uninstalling libcurl3 in Ubuntu 18.04
I'm using a software that comes with a separate php and that php has php-fpm that requires libcurl3, but php7.2-curl requires libcurl4. When I run sudo apt install php7.2-curl the command uninstalls ...
2
votes
0
answers
640
views
apt-get upgrade didn't update PHP but updated its php modules
I performed
sudo apt-get upgrade
and was expecting to see that PHP version update from 5.6.30 to 5.6.37. To my surprise, php version didn't upgrade but its modules did. I still see 5.6.30 in ...
2
votes
0
answers
195
views
duplicate php packages
I use this repository for my php installation as its more up to date than Ubuntu's repository, but after I upgraded from 16.04 to 18.04 I can no longer install any php packages. for example, I need to ...
2
votes
0
answers
573
views
IREDMAIL - Install on Ubuntu with Existing Webserver - PHP,NGINX,MYSQL
I'm hosting my website on a VPS with an existing webserver configuration: PHP, NGINX, MYSQL.
The first time I installed iredmail, I followed this tutorial.
It ended up overwriting all my nginx/site ...
2
votes
0
answers
920
views
mysql version 8.0.11 and Symfony 4 error "MySQL server has gone away"
I' m using Symfony 4 and Mysql version is 8.0.11 and using a user instead of a root login and when i try to use the command php bin/console make:migration i get this error:
In AbstractMySQLDriver.php ...
2
votes
0
answers
3k
views
How to start Apache server in xampp on Ubuntu?
I've successfully installed lampp and xampp on my Ubuntu 18.04 LTS. But when I start xampp with the command sudo /opt/lampp/lampp start the Apache server does not start.
when starting the server:
...
2
votes
0
answers
688
views
XAMPP not saving cookie file
I'm trying to run a script that uses PHP CURL to log in into a website, and I want to save that cookie to use in further requests.
My curl connection have this configuration:
CURLOPT_FOLLOWLOCATION =...
2
votes
0
answers
4k
views
Ubuntu locks up at "Started Clean php session files"
I am having an issue with my server box..
MSI Tomahawk B350 MB BIOS 1.60
AMD Ryzen x1800
64GB 3300 Ram
Samsung 960 Pro 1TB M.2 SSD
Plain Jane video card
500w Gold Power supply
I have tried Ubuntu ...
2
votes
1
answer
529
views
Compiling PHP from source (an old version) will delete or corrupt my current PHP7? What is the proper way to install both + switch between them?
I have PHP 7.1 on my Ubuntu machine.
I need to work on a project that uses php5 5.3.3-7+squeeze17 (yes... a 10 year old code).
I have found the source of this package: https://launchpad.net/...
2
votes
1
answer
618
views
How to use php7.0-fpm and php5.6-fpm concurrently on same server, but different vhosts?
I am using Ubuntu 16.04 and Apache 2.4.29
I used a guide to install php7.0-fpm and get my server set up on HTTP/2:
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04
These are the changes made based ...
2
votes
1
answer
3k
views
mysql_connect error
I've executed the below command in sublime text editor
mysql_connect('localhost','root','');
And got the below error:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /opt/...