cancel
Showing results for 
Search instead for 
Did you mean: 

hOW TO Temp directory ?

hOW TO Temp directory ?

Hello - I'm having trouble installing Magento 2.0 - announces the following:

 
Warning: realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/ky015800:/usr/share/pear) in /home/ky015800/www_root/ceilingfan/vendor/magento/framework/Filesystem/DirectoryList.php on line 99

Warning: realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/ky015800:/usr/share/pear) in /home/ky015800/www_root/ceilingfan/vendor/magento/framework/Filesystem/DirectoryList.php on line 99

Warning: realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/ky015800:/usr/share/pear) in /home/ky015800/www_root/ceilingfan/vendor/magento/framework/Filesystem/DirectoryList.php on line 99

Fatal error: Uncaught exception 'Magento\Framework\Exception\LocalizedException' with message 'Can't create directory /home/ky015800/www_root/ceilingfan/var/generation/Magento/Framework/App/ResourceConnection/.' in /home/ky015800/www_root/ceilingfan/vendor/magento/framework/Code/Generator.php:103 Stack trace: #0 /home/ky015800/www_root/ceilingfan/vendor/magento/framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\\Framewo...') #1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\\Framewo...') #2 [internal function]: spl_autoload_call('Magento\\Framewo...') #3 /home/ky015800/www_root/ceilingfan/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\\Framewo...') #4 /home/ky015800/www_root/ceilingfan/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo...') #5 /home/ky015800/www_root/ceilingfan/vendor/magento/framewor in /home/ky015800/www_root/ceilingfan/vendor/magento/framework/Code/Generator.php on line 103
 
 
Administrator my hosting I recommended to adjust the path to the Temp directory - the problem is that I do not know what files are in it to be edited, could you please advise me? Thank you, Tony
6 REPLIES 6

Re: hOW TO Temp directory ?

Hello @alita_girls ,

 

 

You can find out solution here https://stackoverflow.com/questions/1846882/open-basedir-restriction-in-effect-file-is-not-within-th...

 

--
If my answer is useful, please Accept as Solution & give Kudos

Re: hOW TO Temp directory ?

Hi @alita_girls 

 

I just suggest you to run all these command in your Magento 2 root directory in same order.

 

sudo rm -Rf pub/static/frontend/* var/pre_processed/* pub/static/_requirejs/*
sudo rm -Rf var/generation/* var/di/* var/cache/*
sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento cache:clean
sudo php bin/magento cache:flush
sudo chmod -R 777 var/ pub/ generated/

it will fix definitely your error.

 

*Remove sudo if commands will not work.

 

Thanks

Re: hOW TO Temp directory ?

Hi PankajS_Magento.

 

I'm trying to fix the same error. I tried your commands but after "sudo php bin/magento setup:upgrade" or "php bin/magento setup:upgrade"

 

I get an error.

 

Import failed: Warning: Error while sending QUERY packet. PID=28148 in /public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228

 

What do you suggest?

Re: hOW TO Temp directory ?

Hi @elliottshane 

 

Here I found a link from@gelanivishal  answers might help you.

 

Thanks

--
If my answer is useful, please Accept as Solution & give Kudos

 

 

Re: hOW TO Temp directory ?

Thanks for the fast reply but didn't work.

 

my config file was at /etc/mysql/conf.d/mysql.cnf

 

I kept getting errors when restarting until I only had "max_allowed_packet=524288000" in the file.

Re: hOW TO Temp directory ?

Please follow the below to resolve this

 

For solution you can follow below link.
https://stackoverflow.com/questions/21511612/magento-open-basedir-restriction-in-effect-file-tmp-is-...

 

Let me know if any issues


If my answer is useful, please Accept as Solution & give Kudos