PHP

PHP is a scripting language designed primarily for web development, but it’s also widely used as a general-purpose programming language.

PHP subscription active
You will receive email notifications for new publications on PHP.
1597 Results
  • Question

    How to upgrade PHP 7.0.33 to 7.4.7 on Ubuntu 16.04 (NGINX)?

    My server configuration (DigitalOcen): * 4GB RAM | 80 GB Disk * Ubuntu 16.04 x64 (NGINX) - WordPress Current PHP version: 7.0.33 * Reason to upgrade: WordPress Error - PHP Update Required Kindly help. Thank you!
    Accepted Answer: Hi @chinmayrajyaguru, You can actually upgrade the PHP version, you can just install a new one. Firstly, to be able to install a certain PHP version, in this case, 7.2 you'll need to add a certain repository to your ...
    2 By chinmayrajyaguru Ubuntu 16.04 Nginx PHP WordPress
  • Question

    How to change caching_sha2_password to mysql_native_password on a DigitalOcean's Managed MySQL Database?

    I want to use the new DigitalOcean MySQL Managed Databases with my PHP application but I'm getting this error here: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; con...
    Accepted Answer: Hello, The easiest way to fix that would be to alter your existing user with the following: ALTER USER <^>myuser <^>IDENTIFIED WITH mysql_native_password BY '<^>mypassword<^>'; Another thing that you could do is to ...
    6 By bitmap Databases MySQL PHP WordPress
  • Question

    Updates to Droplet

    I need to make some updates.....not sure where or how to begin. Tutorials are pretty confusing. Increase upload limit beyond 2 MB. Can't install .zip file, which is 2.5 MB. But Wordpress plugin is asking for 30 MB...
    Accepted Answer: Hi @jgwalter, I'll try and answer the questions in a way the instructions should be followed. You can't upgrade your PHP version, you need to install a new one. To be able to install a certain PHP version, in this ca...
    2 By jgwalter PHP
  • Question

    How to install composer 2

    Hello https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-20-04 how to upgrade to version 2 ?? <^>command, composer self-update --2 , is not defined !!<^> Also as non root user:...
    Accepted Answer: Hi there, In case that you've installed composer with apt already you might have to remove the package first and then follow the steps from the tutorial: Remove the current installation: sudo apt remove composer Ins...
    1 By tjeumoonen Ubuntu PHP Ubuntu 20.04
  • Question

    Unable to locate package php7.2 Ubuntu 20.04

    We are unable to install the php7.2 and php7.1 version in the ubuntu 20.04. Currently we are using php7.4 and we need the php7.2 also When we tried to install the php7.2 below commands were not successful in the digit...
    Accepted Answer: Hello, I just tested this on a fresh new Ubuntu 20.04 Droplet and I was able to install PHP 7.2 after running the following commands: Update your repositories: sudo apt update Then add the Ondrej PHP repository: su...
    2 By karthiksts Apache PHP Ubuntu 20.04 DigitalOcean PHP Frameworks
  • Question

    Upgrade PHP from 7.2 to 7.4 on CentOS 8 and Apache

    Hi all, I host 2 WordPress sites using Apache(httpd) on my droplet and am getting the nagging message to upgrade my version of PHP. I've found some tutorials and article on installing PHP, but nothing regarding upgrad...
    Accepted Answer: Hi @jplafata, In order to upgrade from one PHP version to another just need to install it. There is no actual upgrade process like upgrading from Ubuntu 16 to 18. You just install your new PHP version and make that th...
    2 By jplafata PHP Apache CentOS CentOS 8
  • Question

    Ubuntu 20.04 upgrade : "Please install all available updates for your release before upgrading" even after packages updating

    Hello ! :) I would like to upgrade my 18.04.5 Ubuntu to 20,04. Of course, before doing it, I've updated all installed packages : sudo apt update && sudo apt -y full-upgrade && sudo apt autoremove But even after this...
    Accepted Answer: Hi @BlackBelt35, I've had cases where a third-party repositories with a broken-dependency, which showed up via sudo apt list --upgradable - the package in question did require another package, which was unavailable du...
    1 By BlackBelt35 Ubuntu 20.04 Ubuntu 18.04 PHP
  • Question

    How to install Zip Extension for PHP 7.4 on CentOS 8

    I've installed the php 7.4 on new system CentOS 8 but I've discovered that the ZIP extension is missing or not installed so I don't know how to install with the new commands belongs to CentOS 8. These steps I've done ...
    Accepted Answer: Success with command php-zip only without version to install from new CentOS 8 AppStream Thanks @alexdo ``` dnf install php-zip Last metadata expiration check: 3:50:20 ago on Sun 05 Sep 2021 05:09:48 PM UTC. Dependen...
    2 By HadyShaltout PHP CentOS 8 Apache
  • Question

    404 error nginx php problem.

    Greetings, First of all huge thanks to all the people who wrote guides and are helping people understand more how to do stuff, now back to my question. I've done everything step by step with Digitalocean's guides; I'...
    Accepted Answer: Which digitalocean guide are you using?
    1 By testrunner666 Nginx LEMP PHP WordPress
  • Question

    Why I can't install php5 modules on Ubuntu 16.04?

    Hello, I have just finished setting up my Ubuntu 16.4 server. I have installed php5.6.26 because I am going to use Wordpress and I am not sure if all plugins are compatible with php7. I need to install some php modu...
    Accepted Answer: As of Ubuntu 16.04.x default PHP version is PHP7. You should add PHP5 repository and you will be able to install it. First of all add repository : command sudo add-apt-repository ppa:ondrej/php When it finishes updat...
    2 By rodikr PHP Ubuntu 16.04
  • Question

    #2002 - No such file or directory &mdash; The server is not responding (or the local server's socket is not correctly configured).

    When I try to login my PHPMyAdmin, I get the following error messages: ``` 2002 - No such file or directory &mdash; The server is not responding (or the local server's socket is not correctly configured). mysqlirealc...
    Accepted Answer: Hello, I would recommend changeinglocalhost to 127.0.0.1 in your config.inc.php PHPmyAdmin file. It should look something like this after the change: $cfg['Servers'][$i]['host'] = '127.0.0.1'; That way when using 12...
    2 By bepari662 MySQL PHP Apache Ubuntu 18.04
  • Question

    Issues with CRON job executing on Ubuntu 20.04 with PHP 7.4 FPM

    I am having issues properly setting up the following CRON job to automate backups on my client's website. The site is Joomla-based and I am using Akeeba Backup to handle the backups. The recommendations for the comman...
    Accepted Answer: Hello, As the website uses PHP 7.4, I believe that it is best to run the cronjob with PHP 7.4 as well for consistency. To check if this /usr/bin/php7.4 is the correct path to the PHP 7.4 executable, you could run the ...
    1 By mikehermary Ubuntu 20.04 PHP Linux Commands
  • Question

    How to update php.ini on a digitalocean app

    I've deployed a PHP app on digitalocean app and I need to increase the post file size and upload the max file size limit. but I can't access the php.ini or create a working .htaccess file. Will really appreciate your ...
    Accepted Answer: Hey @sergiowilliomes , The easiest way to edit the php.ini settings is to add a .user.ini file to your codebase with the following lines in it. These lines will set the values for post_max_size and upload_max_filesize...
    2 By sergiowilliomes PHP DigitalOcean App Platform
  • Question

    How to install manually phpMyAdmin on Ubuntu?

    It is usually recommended to use distribution packages when possible - they usually provide integration to your distribution and you will automatically get security updates from your distribution. You can find a coll...
    Accepted Answer: There are a few ways of installing phpMyAdmin as described in the official documentation here: https://docs.phpmyadmin.net/en/latest/setup.html However I've been using another method which is a bit more convenient for...
    1 By bobbyiliev MySQL PHP LAMP Stack Apache
  • Question

    Creating a local environment from an existing droplet?

    I have a custom site running on an Ubuntu LAMP 16.04 droplet. The site is built with PHP and has entries in a SQL database. What's the best way to clone this droplet as-is (SQL database and all) and run it locally? On...
    Accepted Answer: Hello, It would depend on what OS you are using on your local environment. For example, if you have a Windows PC, you could install the WAMP stack which would allow you to have Apache/PHP/MySQL on your laptop. If you ...
    1 By gregbarbosa Ubuntu 16.04 LAMP Stack PHP SQL Git GitHub Actions
  • Question

    Can't run php file in browser.

    I have a PHP file about MQTT publish. When I run this PHP file in the terminal it run properly and no error everything was fine, But when I open it via a browser I get an error like this: Warning: stream_socket_clien...
    Accepted Answer: Hello @wattanaipongtham , Check your php.ini settings for the parameter safe_mode. It should be Off. Also try to disable suhosin if it's running. If it's not solved, tell me if you are using Apache or Nginx? Regards,...
    1 By wattanaipongtham PHP
  • Question

    Trying to install Latest PHP version on CentOS 7

    I've been trying to install the latest PHP version on my CentOS 7 droplet but every install keeps missing some key extensions. If I try to add them afterwards, there are some dependency failures which really bugs me....
    Accepted Answer: Hi @Remdore, So I ran into the same problem a day ago. Even if you install PHP 7.2 with yum something without any preparation always doesn't work right away. So, to install ANY PHP version you wish, you can follow the...
    1 By Remdore Apache PHP
  • Question

    IP address worked but domain name does not

    Domain name is registered and DNS is pointed to DO as per tutorial. Created "A" record for fireball.design and www.fireball.design and *.fireball.design. Also created Nginx server block for fireball.design in /etc/ngi...
    Accepted Answer: Tried the Fail2ban stuff but nothing worked and even uninstalled it. Tried lots of other things. I give up 3 weeks later for a simple LEMP stack with Wordpress. One click garbage installs. Can somebody delete this wh...
    4 By AndreyPavlov DNS Initial Server Setup LEMP Networking Nginx PHP WordPress Ubuntu 18.04
  • Question

    Why can't I connect to a remote MySQL server from a PHP application, but can connect from mysql-client

    Hi! I'm bamboozled. Here's the setup: * One application server, Ubuntu 18.04 LTS (PHP 7.2, mysql-client) * One database server, Ubuntu 18.04 LTS (mysql-server 5.7) I need to connect to the database from a PHP appl...
    Accepted Answer: Hello, This is quite interesting. As you are able to connect to the database with the mysql command, my guess would be that the password that you are using might not be correct, does your password have any special cha...
    1 By firestormbe352da97c3f50bea MySQL PHP Ubuntu 18.04
  • Question

    Digitalocean Space for images vs local shared hosting

    Hello, Actually I'm using a platform (sngine social network), on a shared hosting , that have no option to setup a CDN, it has "only" option to setup an external storage (Digitalocean is present). My small community i...
    Accepted Answer: Hello, I would personally use an S3 storage like the DigitalOcean Spaces when planning for future scaling. That way if your static files will not be stored locally on the server itself but they will be on that S3 sto...
    1 By SmallAzureSeal Apache PHP