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.
1285 Results
  • Question

    Restore the server with the button inside the droplet configuration and now the apache, mysql and ssh services do not start

    One day I needed to restore the server due to a problem that occurred with the wordpress that I had installed that was disabled and needed a quick solution. I gave him the option to restore from the droplet control pa...
    Accepted Answer: Assuming you’re on Ubuntu, systemctl enable apache2 mysql Link for references. https://linuxconfig.org/how-to-start-service-on-boot-on-ubuntu-20-04 Ps: MySQL is dead, I highly recommend using mariadb instead. All MyS...
    2 By stiven8as Ubuntu 18.04 PHP WordPress Backups
  • 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

    LAMP php mail only sending to gmail

    I have a droplet setup using the LAMP by DigitalOcean OS Ubuntu 18.04 framework (which includes Postfix), and in testing out the php mail() function, I find that sending or cc'ing email to a Gmail address works perfec...
    Accepted Answer: OK, so I configured Postfix to use my Gmail account as my SMTP server and all is good now. Still not sure why the email wasn't showing up in my inboxes before, but they are now! Hope this helps someone...
    1 By g3logic Ubuntu 18.04 PHP
  • 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

    Centos 8 LEMP: PHP-FPM install error

    I'm following the directions and running into an issue on the Centos 8 LEMP tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-8 Any help would be grea...
    Accepted Answer: Hi @chipsterz, Have you tried doing a System Upgrade beforehand? You can check for whether software updates are available with the following command: sudo dnf check-update You can do a minimal software update with t...
    1 By chipsterz CentOS 8 PHP LEMP
  • 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

    How to setup domain and sub-domain to different hosting providers

    Hello, Current situation: My domain: www.example.com which is with 'BigRock', which has nameservers connection to the 'HostGator'. Now, I want to point www.blog.example.com sub-domain to 'DigitalOcean'. Expected outpu...
    Accepted Answer: Hello, @suchakmaulik179 If your domain name is using Hostgator's nameservers than all DNS changes need to be made from their control panel, because the active DNS zone is there. If you made DNS changes for your domai...
    1 By suchakmaulik179 WordPress DNS Networking Apache 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

    PHPDesigner not working, because of old SSH, is there a hot fix?

    Hello, I use PHPDesigner which I really love and i prefer not using another software for my PHP coding. However PHPdesigner hasn't been updated since 2013 which sucks because it uses some old SSH settings which it see...
    Accepted Answer: Hi there @Geekologist, It looks like someone had the same question on the DigitalOcean community site a while ago, I would recommend checking the answer here: https://www.digitalocean.com/community/questions/server-do...
    1 By Geekologist PHP Ubuntu Ubuntu 18.04
  • Question

    How to upgrade MySQL server, for the one-click app

    Hello, I'm using the PHPMyAdmin one-click app, but the MySQL server version is way behind and I'm not sure how to upgrade it without breaking anything The current version is: mysql Ver 14.14 Distrib 5.7.30, for Lin...
    Accepted Answer: Hi there @Geekologist, With the PHPmyAdmin 1-Click installation, you get MySQL 5.7 and PHPmyAdmin 4.6.6. I believe that if you upgrade your MySQL installation you would need to upgrade PHPmyAdmin to the latest version...
    1 By Geekologist PHP MySQL One-Click Install Apps Ubuntu Ubuntu 18.04 Databases DigitalOcean
  • Question

    Wrong domain when sending mails from PHP, how to fix it?

    I had to rename my droplet to send mails, and it was renamed to my domain name, because I needed to be fqdn. When sending mails using php mail() function, it worked just fine, and the mails were received from somethin...
    Accepted Answer: Just had to update my /etc/mailname file
    2 By Dantael PHP Nginx DigitalOcean Debian 10
  • Question

    How to Setup Laravel with DigitalOcean Managed Redis Cluster?

    Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, and sorted sets. According to the official Laravel documentati...
    Accepted Answer: Prerequisites: In order to complete this tutorial, you will need: An Ubuntu Droplet with Laravel installed, you can follow the steps from this guide here on How to Install and Configure Laravel with LEMP on Ubuntu 18....
    1 By bobbyiliev Redis PHP PHP Frameworks Ubuntu Linux Basics Linux Commands
  • 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

    How To Find php.ini? (Ubuntu LAMP on 18.04)

    I'm trying to upload a large database to phpMyAdmin, and so need to adjust the values of uploadmaxfilesize, memorylimit and postmax_size in the php.ini configuration file. However I'm having trouble locating php.ini o...
    Accepted Answer: Hi @alexanderCrab, The best way to see which PHP.ini your website is looking at is using phpinfo. PHPinfo() is a PHP method which can be used in a file like so ``` <?php phpinfo(); ``` Basically, what you need to do ...
    1 By alexanderCrab PHP MySQL Ubuntu 18.04
  • Question

    error 500.autoload problem PHP-MVC

    hi, im trying to deploy my php-mvc app and i cant get my autoload.php to work. Everything works correctly on localhost, but when deploying on the server it gives me 500 (Internal error server) ... I have tried to edit...
    Accepted Answer: the error was that linux is case sensitive xD
    2 By FLP PHP
  • 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

    Has anyone solved this error?A PHP Error was encountered Severity: Warning Msg: mysqli:real_connect(): (HY000/2002): Connection refused

    error 1 A PHP Error was encountered Severity: Warning Message: mysqli::real_connect(): (HY000/2002): Connection refused Filename: mysqli/mysqli_driver.php Line Number: 201 error 2 A PHP Error was encountered Severity:...
    Accepted Answer: Hello, It looks like that your server is running out of disk space. You can check that with this command: df -h My guess would be that the server ran out of space and MySQL crashed, that is why you are getting the f...
    1 By thiago20 MySQL PHP Ubuntu
  • Question

    phpMyAdmin File Limit

    I'm trying to import a 151 MB database into phpMyAdmin and am getting the error "You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit." I've already edit...
    Accepted Answer: Hello, @alexanderCrab Could you please confirm that the uploadmaxfilesize change has taken effect? What you can do is to create an info.php file and then check the value. You can create a file named info.php (the nam...
    1 By alexanderCrab MySQL PHP PHP Frameworks
  • 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

    Phpmyadmin or Alternative for PHP7 + Nginx + MySql 5.7 + Ubuntu 16.04

    Hello, I have been reading up on the tutorials and some of the comments on the community pages but I would like to know if there are any better alternatives or any advice to better manage my databases. I use Phpmyadmi...
    Accepted Answer: Phpmyadmin does support PHP 7 and Mysql 5.7. I recommend you to grab latest release from their download page (https://www.phpmyadmin.net/downloads/). Current download link is: https://files.phpmyadmin.net/phpMyAdmin/4...
    2 By Lilap Nginx MySQL PHP Ubuntu 16.04