I created a droplet in DigitalOcean (LAMP on Ubuntu 20.04)
Installed WP PHP files using WinSCP
Run it on PUTTY
Checked site on web browser
I received a message saying "PDO Driver for SQLite is missing"
Found solutions online and here's what I've tried:
Find php.ini & uncomment (remove ;) on extension=pdo_mysql & extension=pdo_sqlite
Restarted apache on PuTTY by using this command sudo service apache2 restart
But didn't work
Any tips please?
Related
I'm having some difficulty setting up Nginx with PHP and MYSQL on mac, where I cannot make any connection to the database. If I spawn a server using php -S, I can connect without problem. However Nginx running on port 8080 is unable to connect at all.
I've installed (and now uninstalled) php with brew, which might be an issue because it looks like PHP comes installed on mac. Running php -v shows me running on 7.1.16, but the brew installed version was 7.2+. I have PHP-FPM running on localhost:9000.
I've checked my php.ini files, but I only see extensions for mysqli and pdo_mysql, which I've tried to enable but still no luck.
Thanks for any help.
I've recentlly got a problem with my local virtual hosts after installing php 5.6 next to php 7.0. I'm using Ubuntu 16.04 with Apache, MySQL etc. configured for Laravel projects and everything was working perfectly fine with php 7.0 until I had to work with another project. This non-laravel project required php 5.6 to work, so I installed it next to php 7.0 together with some modules for phpmyadmin (as it didn't work after I switched server to php 5.6). So what I did after installing php 5.6 was:
sudo a2dismod php7.0
sudo a2enmod php5.6
sudo service apache2 restart
Added a new host for my php 5.6 project in /etc/hosts as 127.0.0.1 www.myhost.local.
Added a new config in sites-available, enabled it, restarted the server.
Installed few required by phpmyadmin modules to configure database for the new project.
Worked with my php 5.6 project.
When I wanted to switch back to my Laravel projects I made:
sudo a2dismod php5.6
sudo a2enmod php7.0
sudo service apache2 restart
And none of the laravel hosts worked. The error I get from Google Chrome is:
This site can’t be reached
www.myhost.local’s server IP address could not be found.
ERR_NAME_NOT_RESOLVED
And I DIDN'T CHANGE configs of Laravel projects! I didn't edit neither sites-availavle configs, nor etc/hotst except for adding the line with my php 5.6 project. I've tryed:
Checking /etc/apache2/mods-enabled where are php7.0.load and php7.0.conf enabled.
Checking service apache2 status and got Apache active (running).
Checking http://localhost/ and got the default apache page.
Checking http://localhost/php.info which showed me that server is running with php 7.0
Deleting php 5.6 host from etc/hosts and disabling same config in sites-available.
Adding < VirtualHost 127.0.0.1:80 > instead of < VirtualHost *:80 > in the beginning of my Laravel host config. Which made some inner pages work if loaded without www and home page still didn't and www was added to url every time I tryed to load it. However some inner pages began later to generate www too and nothing helped :(
Checking apache logs and got warnings only.
Some other minor things I can't remember now...
Can anyone help please? Or is it easier to reinstall php completely?
Thanks everyone! That was browser cache (although I've checked other browsers I never opened my projects in). So it finally worked in incognito window and after I cleared Chrome's and FF's cache.
I am using Ubuntu 17.04 and I have recently installed latest version of CakePHP. It works well on my localhost but not working on server. It just shows 500 Internal Error.
I already have CakePHP projects running on my server but only cakephp setups installed and uploaded from Ubuntu are not working on server.
Thanks in advance.
Before installing CakePHP3 we are needed to check some configuration in our server.
Make sure that you have the mbstring and intl extensions are enabled
in PHP.
Make sure that you have pdo_mysql enabled in PHP.
And php version should be 5.6 or greater.
For this go to cpanel and click Select php version and enable all
the required options from the list.
And Xampp
modification :
Open /xampp/php/php.ini
Change ;extension=php_intl.dll to extension=php_intl.dll (remove the semicolon)
You have to enable php-intl extension first
For Window Users (Xampp Server)
Path :- c:\xampp\php\php.ini
Uncomment :-
1. ;extension=php_intl.dll (Remove ;)
2. ;extension=php_mbstring.dll (Remove ;)
For Linux (Open terminal ctr+alt+t)
Run Command :- sudo apt-get install php-mbstring
sudo apt-get install php-intl
Now Run server bin/cake server
I'm using ubuntu Linux 12.04 LTS on my machine. I was using PHP 5.3.10 Now I upgraded to PHP 5.5.18 by using few commands on terminal. After I upgraded to latest PHP version I checked the version by using command php -v. It shown me the PHP version is 5.5.18.
But when I tried to access one directory from the folder "www" i.e. document root I'm getting error "Unable to connect" in browser. When I enter only localhost in address bar "It Works" is the message appearing.
So I tried to restart the apache server ny using following command :
sudo service apache2 restart
then I got following error :
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 214 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/httpd.conf: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
After reading this message I go to the file /etc/apache2/httpd.conf and checked line no. 214 there I got found following statement written :
Include httpd.conf
So can someone please help me in working the thing as it is like previous for me? Please suggest me the ways I can fix this issue.
Thanks on advance.
it also woked for me
sudo a2dismod php7.0
Module php7.0 disabled.
To activate the new configuration, you need to run:
service apache2 restart
mr#mr ~/Desktop $ sudo service apache2 restart
* Restarting web server apache2
just do this:
a2dismod php5
OR
a2dismod php7.0
Check if two symbolic link there for php same version [cd /etc/apache2/mods-enabled/]
php7.load -> ../mods-available/php7.load
php7.load -> ../mods-available/php7.0.load
I have removed one of them according to my requirement
Check available modes in [/etc/apache2/mods-available/]
Php7.0.load
Php7.load
I have removed one of them [php7.load] Enable on of the mode restart
apache server
After uninstalled IIS from the server, I installed Apache 2.4 64-bit on Windows Server 2008 R2. Additionally, I installed PHP 5.5.12 64-bit.
I followed the instructions on this this "How install Apache 2.4 and PHP"
Everything seems to be fine. But What I am having difficulty with is enabling the php_pdo_mysql. I uncommented both lines in the php.ini file located on c:/php/php.ini
extension=php_mysql.dll
extension=php_mysqli.dll
Then I rebooted the Apache server "for the services list" but the pdo_mysql extension is not loading it as it should.
here are some snapshots from my php info
More, this is the output on the
shell>php -m
here are the files from my server
What else do I need to do to enable pdo_mysql?
What else can I check for?
Thank you
I figure out the problem.
I need to add the following to windows environment variables
;c:\php;c:\apache24;c:\apache24\bin;
After that rebooted Apache and it worked with no issues.
You must load the PDO dll, not the default mysql extensions.
Add the following two lines to your configuration:
extension=php_pdo.dll
extension=php_pdo_mysql.dll
These lines load the PDO extensions. Your lines load the MySQL and MySQLi extension.