Thursday 27 September 2012

PHP.ini

So you have installed Joomla 2.5, 3.+ or 3.5+ and under "Extension Manager: Warnings" you get the following error:



The PHP temporary directory is not set
The PHP temporary directory is the directory that PHP uses to store an uploaded file before Joomla! can access this file. Whilst the directory not being set isn't always a problem, if you are having issues with manifest files not being detected or uploaded files not being detected, setting this in your php.ini file might fix the issue.

You can use one of the fixes below:

If you have access to your httpd.conf file

Add your temp directory to it, it will look something like this:

php_value upload_tmp_dir = /my/path/to/my/websites/home/dir/tmp

This is the full home directory path to your joomla site, with the '/tmp' added
Note: Replace my sample path with yours

If you have access to your php.ini file the add the following line:

Add your temp directory to it, it will look something like this:


upload_tmp_dir = /home/accountname/public_html/tmp

Note: Replace my sample path with yours



You are on a shared hosting environment and you don't have access to the http.conf file, or don't have a php.ini file, then do the following:




1. Create a php.ini file in the /administrator/ directory of your Joomla web site
2. Add your temp directory to it, it will look something like this:

upload_tmp_dir = /home/accountname/public_html/tmp

Replace my sample path with yours

3. Add a line to your .htaccess file telling your site to use the php.ini file. Add this line:

SetEnv PHPRC /home/accountname/public_html/administrator/

Note: Replace my sample path with yours


Now login to your admin panel, and the warning should be gone!

8 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Nice tutorial keep on writing
    jobs in burdwan

    ReplyDelete
  3. To increase your php upload limit, simply add this line to your php.ini file created earlier
    upload_max_filesize = 10M
    post_max_size = 10M
    this will get rid of any upload limit to small errors

    ReplyDelete
  4. hello, very important info. I have one issue though. When i apply these changes, the warning actually disappears but also the admin menus at the backend of joomla. Any idea please?what am i doing wrong?

    ReplyDelete
    Replies
    1. no ok i cleaned the cache and they appeared again.thanks a lot again...

      Delete
  5. Hi Nick, sorry I missed your message, I have had the same issue, glad to hear you got it solved, that damn Cache can be tricky at times!

    ReplyDelete