Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 2757  / 1 Year ago, sat, march 18, 2023, 8:49:34

Environment:




  • Ubuntu 14.04 (local dev machine running under VirtualBox)

  • Apache/2.4.7 (Ubuntu)

  • phpMyAdmin 4.0.10deb1



I'm getting the below error. I've been reading the manual and searching posts but none of the suggestions are helping. I'm pretty new to Linux and Apache so I could just be not understanding something.



Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/) in Unknown on line 0

Warning: File upload error - unable to create a temporary file in Unknown on line 0

No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16


The error is coming form phpMyAdmin. I have tried to upload via the command line and it just hangs until I quit.



I made the following changes to /etc/php5/apache2/php.ini



post_max_size = #>db size = 60M
memory_limit = #>post_max_size = 256M
upload_max_filezise = #<post_max_size 20M


And have tried




  1. Changed DocumentRoot in /etc/apache2/sites-available/000-default.conf

  2. tried setting php.ini - upload_tmp_dir

  3. tried adding the folder the .sql file is in to apache.conf php_admin_value open_basedir - this only changed the error message.



One thing I did a long time ago was to have apache run under my user account. I'm wondering if this isn't the problem.


More From » apache2

 Answers
5

See first link in @Litizia comment above for the post that helped me solve the problem.



Specific changes to /etc/phpmyadmin/apache.conf that solved the problem for me are:



under <IfModule mod_php.c>


First:




change

php_value include_path .
to:

php_value include_path .:/usr/share/php:/usr/share/pear




Second:




Change

php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/

to:

php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php:/tmp/



[#24373] Sunday, March 19, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
uestred

Total Points: 464
Total Questions: 104
Total Answers: 112

Location: Israel
Member since Wed, Apr 14, 2021
3 Years ago
;