After upgrading phpmyadmin lots of warnings and notices is being shown while running any task. errors is shown below.
Deprecation Notice in .\vendor\twig\twig\src\Loader\FilesystemLoader.php#40
realpath(): Passing null to parameter #1 ($path) of type string is deprecated
Deprecation Notice in .\vendor\twig\twig\src\Markup.php#35
Return type of Twig\Markup::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Deprecation Notice in .\libraries\classes\Util.php#1936
Function strftime() is deprecated
For PHP 7.3+
Edit the following file : config.inc.php. It can be located in /etc/phpmyadmin/config.inc.php or in /usr/share/phpmyadmin/config.inc.php
$cfg['SendErrorReports'] = 'never';
I had the same issue after upgrading my PHP Version to 8.1 using MAMP's phpmyadmin 5. I could only find out a way to get rid of it thanks to this here:
Go to your phpmyadmin, even if it repeatedly logs deprecation warnings into your page
Select the Preferences Tab in your phpmyadmin interface (you have to be in your main phpmyadmin page for this tab to show up, and not have any table / db selected)
Select Functions and scroll down to Error Reports and select Never send and click on OK to save it. done!
I though that this should technically correspond to this:
$cfg['SendErrorReports'] = 'never';
But as it seems, there are additional steps involved. Anyway, working now!
I just used the standard update function from MAMP PRO itself. Menu MAMP PRO > Check for Updates… There i Run Install on the update phpMyAdmin5 5.1.0 -> 5.2.0. That worked for me.
From now you can turn off errors following these two steps:
Open /usr/share/phpmyadmin/themes/pmahomme/layout.inc.php
Add after <?php error_reporting(0);
Please note that this is not official information!
if you use a wamp server then you can put down the downloaded files from [https://www.phpmyadmin.net/downloads/] of PHPMyAdmin new version on apps folder. then go to alias folder and you have to change in
phpmyadmin.conf
Alias /phpmyadmin "d:/wamp64/apps/phpmyadmin5.2.0/" //change it here
<Directory "d:/wamp64/apps/phpmyadmin5.2.0/"> //change it here
then Save and Restart wamp services
I had the same error message on Debian 11 after switching from php7.4 to php8.1.
What solved the issue was upgrading phpMyAdmin to the latest version manually.
=======Steps to followed=====
Back up phpMyAdmin
You should back up your current phpMyAdmin folder by renaming it.
$ sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
Create a new phpMyAdmin folder
$ sudo mkdir /usr/share/phpmyadmin/
Change to the directory
$ cd /usr/share/phpmyadmin/
Download and Extract phpMyAdmin
$ sudo wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz
Now extract
$ sudo tar xzf phpMyAdmin-*-all-languages.tar.gz
Once extracted, list folder
$ ls
You should see a new folder phpMyAdmin-*-all-languages
We want to move the contents of this folder to /usr/share/phpmyadmin
$ sudo mv phpMyAdmin-*-all-languages/* /usr/share/phpmyadmin
Make a copy of /usr/share/phpmyadmin/config.sample.inc.php
$ sudo cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php
Now edit the config.inc.php
$ sudo nano config.inc.php
$cfg['blowfish_secret'] = 'Zbwen/BEAFv:HTbqOROrqakJ;KUMIpV:'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
$ Ctrl+x /* to save the file */
Go to your site/phpmyadmin check all error is cleared.
=================================================
YOU MAY ENCOUNTER THIS ERROR MESSAGE ON PHPMYADMIN /INDEX.PHP
IT MAY SAY SOMETHING LIKE:
The $cfg['TempDir'] (/usr/share/phpmyadmin/tmp) is not accessible.
phpMyAdmin is not able to cache templates and will be slow because of
this.
===SOLUTION==
$ sudo mkdir -p /var/tmp/phpMyAdmin
$ sudo chown www-data:www-data /var/tmp/phpMyAdmin
$ sudo chmod -R 700 /var/tmp/phpMyAdmin
Edit the config.inc.php again
$ sudo nano config.inc.php
add or replace this line
$cfg['TempDir'] = '/var/tmp/phpMyAdmin';
Cleanup --
You can now delete the tar.gz file and the empty folder.
$ sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-latest-all-languages.tar.gz
And if you’re certain your new phpMyAdmin install is working correctly you can delete the backup folder.
$ sudo rm -rf /usr/share/phpmyadmin.bak
Related
I am trying to install create a new app in Ruby on Rails and I cannot get passed this error:
$ gem install pg
ERROR: While executing gem ... (Errno::EACCES)
Permission denied # rb_sysopen - /Users/stormyramsey/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/pg-0.21.0/.gemtest
Its a permissions issue. You could fix it with this:
sudo chown -R $(whoami) /Library/Ruby/Gems/*
or possibly in your case
sudo chown -R $(whoami) /Users/stormyramsey/.rbenv/versions/2.3.2/lib/ruby/gems/*
What does this do:
This is telling the system to change the files to change the ownership to the current user. Something must have gotten messed up when something got installed. Usually this is because there are multiple accounts or users are using sudo to install when they should not always have to.
It's likely there's a permissions problem somewhere along the .rbenv path. You might try turning on write privileges for your user with:
$ chmod -R +w ~/.rbenv
That will recursively (-R) change the file mode (chmod) to write permission (+w) for all files and directories under your user's .rbenv path. There's no particular reason for not having files set to write.
For Mac M1 systems try,
Allowing full disk access to terminal.
Apple->systemPreferences->Security&Privacy->privacy(Tab)->'+' button, check in Terminal application.
Then Restart terminal
2.Try using,
sudo chflags noschg
Delete the pod folder, reinstall it again. If it doesn't work use this command:
sudo pod install --allow-root
It really doesn't matter on mac how you configure your eyaml create the dir and config manually, add some public key location to it, and its works just fine after adding full disk access to the terminal as Kewin suggested ^ ^. Thumbs up.
No need to change permission, just export GEM_HOME:
export GEM_HOME="$HOME/.gem"
please run:
sudo gem install pg
Running: macOS High Sierra Version 10.13.3, zsh w/ iTerm2
Trying to set up a local environment with xampp, which has worked just fine for me in the past. However, I'm now unable to access phpmyadmin after changing the root password via the phpmyadmin UI.
The tutorial I am following (which suggested doing this) pointed me to the config.inc.php file, where the password variable would also need to be updated. Unfortunately, I am unable to edit this file. I've seen other users in Stack Overflow complain of the same issue, but the answer that comes back always seems to involve editing via vi or nano, which doesn't work for me either. Here's an example of what happens when using nano.
I open file via nano
sudo nano config.inc.php
My terminal then prompts me for the system password.
Once in nano, I navigate to the password variable and enter it:
$cfg['Servers'][$i]['password'] = '[mypassword]';
I then attempt to save using ctrl+O, where I'm prompted:
File Name to Write: config.inc.php
and then after hitting ENTER receive the error from nano:
Error writing config.inc.php: Permission denied
I've also tried to editing the file via Sublime Text 3, where my machine prompts me to enter the user password. I receive no error message after doing that, but still cannot access phpmyadmin. I am unable to use chmod to edit permissions on the file, and restarting the mysql server after editing the config.inc.php file also does not work.
Why is nano throwing the "permission denied" error even after I've entered my system password?
Thanks!
I was able to resolve this by accessing the config.inc.php file via the terminal provided by xampp.
First things first, the xampp-provided terminal needed nano (to edit the file) installed.
apt-get update
apt-get install nano
I then navigated to the file:
cd ../opt/lampp/phpmyadmin
Then opened the file with nano:
nano config.inc.php
or try
sudo nano config.inc.php
This finally allowed me to edit the config.inc.php file and successfully save.
Great question. I had to work on this for an hour to figure it out too.
Open Xaamp and go to "Open Terminal" on the main page. Make sure the server is running.
You can run "apt-get update" like the other person said above me. The main one you want is "apt-get install nano"
Then do "cd .." so you can back out of the file. The other person said "cd ../opt/... " but that command didn't work for me. What worked was doing "cd .."
Then do cd again, type in "cd opt/lampp/phpmyadmin"
Then type "nano config.inc.php"
You should now be able to edit it. Hit control + o to save it.
It worked for me. It took me an hour to figure it out.
As I thought, I have the same issue as the above, I tried all the commands and I have changed the config.inc file into these settings :
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = '';
But I still end by the same error when I'm acceding to phpmyadmin
Any solutions please ??
Try this to edit the file:
Open terminal from Xampp -> enter apt-get update then -> enterapt-get install nano then -> navigated to the file cd ../opt/lampp/phpmyadmin -> open the file nano config.inc.php make changes as you like -> to save, press control + O and control + M and to exit -> control + X
You might not need to edit the file to solve the error. just try this:
Open terminal from Xampp -> enter apt-get update then -> enterapt-get install nano then -> navigated to mysql folder cd ../opt/lampp/var/mysql -> delete these files rm ib_logfile0 enter and -> rm ib_logfile1 enter
now restart Xampp.
I regularly get file permissions errors when I try to update composer or to clear cache of my symfony project.
Yet my files are set correctly according to the doc of symfony : http://symfony.com/doc/current/setup/file_permissions.html
I'am under linux, Manjaro Budgie edition (last stable version)
server apache last version
For example :
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
// Clearing the cache for the dev environment with debug true
[Symfony\Component\Filesystem\Exception\IOException]
Failed to remove file "/srv/http/PetitMur/var/cache/de~/annotations/1a/5b504d5c506c6174666f726d42756e646c655c456e746974795c41727469636c652474616773405b416e6e6f745d5d5b315d.doctrinecache.data": .
This file has this rights :
pierre $ la /srv/http/PetitMur/var/cache/de~/annotations...data
-rw-rw-r--+ 1 http http 234 29.09.2016 18:13 /srv/http/PetitMur/var/cache/de~/annotations...data
I know, this problem is recurrent. But I have already set the permission file according to the doc of symfony. Currently I have to run command on super user to make it work and this isn't normal.
You have an idea ?
edit :
php bin/symfony_requirements
Symfony Requirements Checker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> PHP is using the following php.ini file:
/etc/php/php.ini
> Checking Symfony requirements:
.............................WW......
[OK]
Your system is ready to run Symfony projects
Optional recommendations to improve your setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* intl extension should be available
> Install and enable the intl extension (used for validators).
* a PHP accelerator should be installed
> Install and/or enable a PHP accelerator (highly recommended).
Note The command console could use a different php.ini file
~~~~ than the one used with your web server. To be on the
safe side, please check the requirements from your web
server using the web/config.php script.
I suspect permission and possibly user group settings may be incorrect.
Go into your Apache httpd.conf file to check the User/Group settings. You'll see lines like this:
User apache
Group apache
The above was from my system which is CentOS 6, and httpd.conf is under /etc/httpd/conf/ folder. Yours may be in a different location and may be the user httpd instead (check it).
Then set the proper user/group for your Symfony3 project:
sudo chown -R apache:apache /srv/http/PetitMur
The above command sets the user:group both to apache, you may have to use httpd
Now delete your old cache files & logs, since they may have been created before with the wrong user:
sudo rm -rf var/cache/*
sudo rm -rf var/logs/*
Then run the setfacl again, make sure you cut & paste (there is a capital X) and use the correct user (either apache or httpd):
$ sudo setfacl -R -m u:apache:rwX -m u:`whoami`:rwX var
$ sudo setfacl -dR -m u:apache:rwX -m u:`whoami`:rwX var
Then test out your system and see it the problem got fixed.
I have try this "sudo chown -R http:pierre Myproject" and for the moment this works for clear the cache but not for composer.
I was struggling with apache2 already installed in ubuntu so I decided to return back to lampp..I have unistalled apache 2 mysql server and phpmyadmin.
The problem is that when I type sudo which php
I get nothing...
So I cannot request e.g. sudo composer create-project laravel/laravel.....
since php is missing for root user..
Although when I type which php I get /opt/lampp/bin/php..
Is it possible to make the root user use the same path..?
You can do this:
Switch to root user
sudo su -
Edit the .bashrc
vi ~/.bashrc
And add a new path to the current one:
export PATH=$PATH:/opt/lampp/bin
I am newbie in PHP. I have successfully installed PHP on Ubuntu, now I want start my first program. I am using gPHPEdit as IDE.
Where should I save .php files that I create? And how to run/test them?
Make sure you have LAMP installed. Do a sudo tasksel and select lamp then hit enter, its gotta be the most simple *amp install ever made. Its a good idea to install phpmyadmin: sudo apt-get install phpmyadmin. After that just copy the files to /var/www/ and then they will show up on http://localhost. I recommended using Eclipse PDT or the Netbeans build for PHP.
You should pick up a book or start following some good tutorials on the web.
If you are just scripting using php, you can save them anywhere and run the php on the terminal using the php command line interpreter.
If you are trying write web scripts (and I think you are), you need to install and configure a web server (typically apache) and save your scripts in the server's document root (typically /var/www). Also, I highly recommend you to read up a little about servers and HTTP and figure out how all this works on the inside before learning to building websites in php.
If you cannot save or copy to var/www/html, to run your php scripts on your browser. If you are using Ubuntu 14.04.
I followed these steps and it worked for me.
Execute sudo su on the terminal.
Enter your password
Execute sudo subl /etc/apache2/sites-available/000-default.conf on your terminal to open this file. Note you can change the subl to any text editor to open the file e.g sudo nano /etc/apache2/sites-available/000-default.conf.
Change DocumentRoot /var/www/html to /home/user/yoursubdir
Save the file and close it.
Execute sudo subl /etc/apache2/apache2.conf on your terminal to open this file.
Add the following to end of the file
<Directory /home/user/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Save and Close the file.
Execute sudo service apache2 restart
Go to your browser, type the URL of your script e.g 127.0.1.1/directory/document.php.
I hope this helps.
remove the index.html file from /var/www/
$ sudo rm index.html
create a new php file there:
$ sudo gedit /var/www/index.php
write in it:
<?php
print_r(phpinfo());
?>
Restart your Apache2 Server :
$ sudo service apache2 restart
OR
$ sudo /etc/init.d/apace2 restart
and point to yout localhost and /index.php
if err arises visit : http://www.allaboutlinux.eu/how-to-run-php-on-ubuntu/
https://www.php.net/manual/en/features.commandline.webserver.php
this is an easy way to test your files in php.
$ cd ~/public_html
$ php -S localhost:8000
then you can go to your browser and enter localhost:8000/myfile.php.