The PHP temporary directory is not set.. HELP!

General questions relating to Joomla! 1.5 There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
pghdesigner
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Aug 23, 2010 7:50 pm

The PHP temporary directory is not set.. HELP!

Post by pghdesigner » Mon Aug 23, 2010 7:58 pm

I'm very new to joomla. I'm a web designer that has never used joomla before and I've ran into an issue. When making my contact page I can't seem to get the emails to actually go to my account. I even tried adding an extension but I continue to get PHP errors. One error was this:

"Fatal error: Call to a member function getCfg() on a non-object in /home1/lizzieni/public_html/joomla/administrator/components/com_alfcontact/controller.php on line 136"

When I go to my Extension Manager Warning section I'm seeing this 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."

I'm not too great with PHP to mess with it. I'm assuming this is why every single contact page I've tried working with inside of joomla isn't working. Now I have my own portfolio site made mostly through Dreamweaver and the contact page on there works fine. It's through the same hosting which is host monster and the same domain. Does anyone know how to fix this error because I'm completely confused with it.

Thanks
Liz

dommaster
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Dec 20, 2010 12:06 pm

Re: The PHP temporary directory is not set.. HELP!

Post by dommaster » Wed Dec 22, 2010 5:33 pm

I would love to know the answer to this one...

User avatar
jvezina
Joomla! Ace
Joomla! Ace
Posts: 1060
Joined: Thu Apr 13, 2006 4:25 am
Location: Denver, Colorado, USA
Contact:

Re: The PHP temporary directory is not set.. HELP!

Post by jvezina » Wed Dec 22, 2010 8:24 pm

In the configuration.php file there's an attribute called $tmp_path. Set that to the temporary path that Joomla should use.

It's usually a subdirectory of the root called /tmp.

And I'd say that the problem is more likely the write permissions to that directory rather than the directory not existing.

jim

PS By the way, they frown on bumping threads. And personally, I look for posts with no responses with the assumption that if a post has a response. So typically I wouldn't read a post with a bump added to it.
Jim
website design, development, hosting and search engine optimization
http://www.IndustryWebHost.com

dommaster
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Dec 20, 2010 12:06 pm

Re: The PHP temporary directory is not set.. HELP!

Post by dommaster » Thu Dec 23, 2010 11:33 pm

Thanks for your reply

I checked and it looks ok public $tmp_path = '/usr/local/pem/vhosts/1xxx49/webspace/httpdocs/tmp';

And tested with set permissions to rwxrwxrwx

its timing out, can't read the error as it loads a blank browser page....

any ideas appreciated

Cheers DM

User avatar
jvezina
Joomla! Ace
Joomla! Ace
Posts: 1060
Joined: Thu Apr 13, 2006 4:25 am
Location: Denver, Colorado, USA
Contact:

Re: The PHP temporary directory is not set.. HELP!

Post by jvezina » Thu Dec 23, 2010 11:51 pm

If you have it set to use an FTP account to upload pictures (which is a good idea - I was so glad when they added that functionality), make sure the FTP account is valid and can upload files to that directory. It's probably OK, but worth a check.

If that doesn't do it, then I'll have to give it more thought on why it's not working for you.
Jim
website design, development, hosting and search engine optimization
http://www.IndustryWebHost.com

dommaster
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Dec 20, 2010 12:06 pm

Re: The PHP temporary directory is not set.. HELP!

Post by dommaster » Fri Dec 24, 2010 1:43 am

jvezina

Hi, i tried uploading a pic through the media manager module and it worked no probs.... also check my configuration.php against another site Im running and look ok.

I must come clean as the version I'm building is 1.6RC1 - i don't think its a problem with the version as the good guys at joomla have pass this simple issue i'm sure. so guessing its my setup but as said previously my other site is ok....

The only warning I can see is 'The PHP temporary directory is not set' in 'warnings' in 'install manager'

one other thing is different, i decided not to jos_ but another prefix...

im stumped, have been trying for a few days...

any ideas would be great

Cheers DM

User avatar
jvezina
Joomla! Ace
Joomla! Ace
Posts: 1060
Joined: Thu Apr 13, 2006 4:25 am
Location: Denver, Colorado, USA
Contact:

Re: The PHP temporary directory is not set.. HELP!

Post by jvezina » Fri Dec 24, 2010 4:21 pm

If you can install extensions and upload pictures, then I'd say don't worry about the warning. Perhaps it's a 1.6 issue that needs to get worked.

If you can't install extensions, I'm not sure what else to tell you. Perhaps checking out the 1.6 forum.
Jim
website design, development, hosting and search engine optimization
http://www.IndustryWebHost.com

dommaster
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Dec 20, 2010 12:06 pm

Re: The PHP temporary directory is not set.. HELP!

Post by dommaster » Tue Dec 28, 2010 11:00 am

Thanks for the help, ill do some more digging.... (can't install extensions)

rgds DM

Highlanderict
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Jan 02, 2009 2:26 pm

Re: The PHP temporary directory is not set.. HELP!

Post by Highlanderict » Mon Jan 03, 2011 6:04 pm

I had the exact same issue (J 1.6RC1) and came across this thread on my search for a solution .....

I too checked permissions in the folders, the $tmp_path value and such like but could not seem to get any extensions to install. I went to site > global configuration and disabled FTP and then a couple of extensions I was testing uploaded without any issues.

zabenoid
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Jan 19, 2011 12:32 pm

Re: The PHP temporary directory is not set.. HELP!

Post by zabenoid » Wed Jan 19, 2011 12:38 pm

I have same problem. Cannot install extensions because of that. HELP HELP!

User avatar
tjc-online
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Nov 26, 2008 9:49 pm
Location: Milton Keynes
Contact:

Re: The PHP temporary directory is not set.. HELP!

Post by tjc-online » Thu Feb 10, 2011 12:11 am

This *may* be caused by an issue trying to use FTP.
I've disabled FTP and then only have an error as the permissions on other directories within the hierarchy aren't correct (which I'm now fixing). I don't know if my error was my FTP user not correct, or something else.

One thing I have noticed, which may be unrelated, is that while trying to change settings, your SQL user must have LOCK_TABLES permissions when saving global configuration changes, otherwise you'll get an error doing that too.
TJC-Online.net, Milton Keynes, UK
UK based web hosting services
t: +44 (0) 7817 955078
e: [email protected]

User avatar
jvezina
Joomla! Ace
Joomla! Ace
Posts: 1060
Joined: Thu Apr 13, 2006 4:25 am
Location: Denver, Colorado, USA
Contact:

Re: The PHP temporary directory is not set.. HELP!

Post by jvezina » Thu Feb 10, 2011 12:37 am

Be sure the extensions actually support Joomla 1.6. A lot of the extensions haven't been updated yet. I checked on 5 that I often use and none have been upgraded yet.
Jim
website design, development, hosting and search engine optimization
http://www.IndustryWebHost.com

User avatar
hal9000_2001
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Wed Jun 21, 2006 12:21 am
Location: Melbourne Australia
Contact:

Re: The PHP temporary directory is not set.. HELP!

Post by hal9000_2001 » Thu Feb 10, 2011 6:52 am

I'm having the same issue, when I try to upload an extension I get a server error 500.

The extention warnings say's

"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."

But I have set this in php.ini and the php info in Joomla confirms this as /tmp.

I'm using Joomla 1.6.0 and I've tried both ftp on and off... same error.

What username:group + permissions should the /tmp directory be set to? So far I've tried the FTP credentials and apache:apache but same error every time.

NOTE: Joomla 1.5.22 installs without error and all extensions install AOK!

Thanks for reading this.
Look Dave, I can see you're really upset about this. I honestly think you ought to sit down calmly, take a stress pill, and think things over.

oneindelijk
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sun Feb 24, 2008 6:05 pm

Re: The PHP temporary directory is not set.. HELP!

Post by oneindelijk » Fri Feb 25, 2011 3:10 pm

Hi,

I came here through this same error msg "about the PHP temp directory"
But I, however, have no problems installing extensions.
They do however when I try to run them but originally implemented stuff in Joomla seems to work fine,
so my guess is that this error message is NOT the issue...

boizan
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 168
Joined: Mon Sep 14, 2009 11:18 pm

Re: The PHP temporary directory is not set.. HELP!

Post by boizan » Wed Mar 02, 2011 6:20 am

pghdesigner wrote:I'm very new to joomla. I'm a web designer that has never used joomla before and I've ran into an issue. When making my contact page I can't seem to get the emails to actually go to my account. I even tried adding an extension but I continue to get PHP errors. One error was this:

"Fatal error: Call to a member function getCfg() on a non-object in /home1/lizzieni/public_html/joomla/administrator/components/com_alfcontact/controller.php on line 136"

When I go to my Extension Manager Warning section I'm seeing this 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."

I'm not too great with PHP to mess with it. I'm assuming this is why every single contact page I've tried working with inside of joomla isn't working. Now I have my own portfolio site made mostly through Dreamweaver and the contact page on there works fine. It's through the same hosting which is host monster and the same domain. Does anyone know how to fix this error because I'm completely confused with it.

Thanks
Liz
Hello Liz, I am having the same warning. I am trying to install Kunena Forum 1.6 and it is failing.
I hope to find a solution soon.

User avatar
trauncher
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed May 19, 2010 8:05 pm

Re: The PHP temporary directory is not set.. HELP!

Post by trauncher » Fri Mar 04, 2011 8:46 pm

I found a workaround, but have had the same problem

copy the module or template to the tmp folder in the root of your joomla 1.6 directory. then use the "install from url" option in extension manager, and enter the full url to your module EG:

Code: Select all

"myJoomla16Site.com/tmp/mymodulefilename.tar.gz"
this works for me 100% of the time.

I'm running joomla 1.6 on a Mac Snow Leopard server, (verison 10.6.6) with the included PHP, Nysql, and Apache instances.

Hope this helps someone in need.

regards,
Traunch.

User avatar
trauncher
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed May 19, 2010 8:05 pm

Re: The PHP temporary directory is not set.. SOLUTION

Post by trauncher » Fri Mar 04, 2011 9:02 pm

Solved this.

you must enable overrides on apache (so that you can have httpd.conf files in your sites home dir that override values in your main apache config file.)

then add the line:

Code: Select all

php_value   upload_tmp_dir = /my/path/to/my/website's/home/dir/tmp
                                       ^--- This is the full homedir path to your 
                                            joomla 1.6 site, with the '/tmp' added
                                            Don't enter my sample path.. enter YOURS....
on my site, this looks like: upload_tmp_dir = /Library/WebServer/Documents/MySite/tmp
yours will be different.

when you have done this... you have to restart apache and php. then you MAY STILL HAVE warnings in extension manager because its looking at the main PHP.ini file parse... but it STILL WORKS.

ecweb
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Wed Feb 04, 2009 5:04 am
Location: Melbourne Australia
Contact:

Re: The PHP temporary directory is not set.. HELP!

Post by ecweb » Mon Mar 14, 2011 12:35 am

Thanks for your help Trauncher.
For those who cannot access httpd.conf there is a simpler method.
1. Create a php.ini file in the root folder of your Joomla web site
2. Add your temp directory to it. It will look something like this: upload_tmp_dir = /home/accontname/public_html/tmp
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
Yours,
EC WEB / Joomla Web Design Services Melbourne
http://www.easyjoomla.com.au

jfillian
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Sep 10, 2007 8:48 pm

Re: The PHP temporary directory is not set.. HELP!

Post by jfillian » Sun Mar 20, 2011 3:19 am

For what its worth, I don't have ftp enabled and I had the same problem with 1.6. I changed the tmp directory to the server tmp (/tmp) and the update function worked fine after that.

michaeldobritz
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Fri Jul 02, 2010 2:36 am

Re: The PHP temporary directory is not set.. HELP!

Post by michaeldobritz » Tue Apr 05, 2011 1:36 pm

I am using powweb and just looked up the php.ini file (very easy to find and to update with powweb).
There it says:

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

that means it is not necessary to specify the upload_tmp_directory or as Joomla! calls it, the PHP temporary directory, since there is a system default directory) If there is no system default, than you have to set this value to an existing directory on your server. Make sure the you set the correct path, read your server instructions carefully.

You may have to set a max upload file size here, too!

; Maximum allowed size for uploaded files.
upload_max_filesize = 64M

64 mb seems a little bit too much but that is what I found in somebody elses php.ini

You alse have to set this value, so that it matches the max upload size:

; Maximum size of POST data that PHP will accept.
post_max_size = 64M

Hope that helps!

jonathan_thewub
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Tue Feb 01, 2011 8:18 am
Location: Cape Town, South Africa
Contact:

Re: The PHP temporary directory is not set.. HELP!

Post by jonathan_thewub » Sat Apr 09, 2011 2:43 pm

I just want to thank trauncher for the suggestion above:
copy the module or template to the tmp folder in the root of your joomla 1.6 directory. then use the "install from url" option in extension manager, and enter the full url to your module
This is a great workaround, possibly for a number of issues. I've been having endless problems trying to install an extension on a local Joomla 1.6 install on Ubuntu and this is the only thing to work so far. So thank you!

michaeldobritz
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Fri Jul 02, 2010 2:36 am

Re: The PHP temporary directory is not set.. HELP!

Post by michaeldobritz » Sat Apr 09, 2011 4:08 pm

As you say: It's a great workaround.

If your server is properly set up it should work the way it is supposed.

SpenceK76
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Mon Apr 11, 2011 12:58 pm

Re: The PHP temporary directory is not set.. HELP!

Post by SpenceK76 » Mon Apr 11, 2011 7:02 pm

EDIT: Nevermind.

RocNrh
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Apr 29, 2011 6:07 am

Re: The PHP temporary directory is not set.. HELP!

Post by RocNrh » Fri Apr 29, 2011 6:31 am

If you manage your own server - in ubuntu - 10.10 maverick
create a tmp folder in: /var/www/ example:
sudo mkdir /var/www/tmp
sudo chown www-data:www-data /var/www/tmp (makes www-data the owner of the folder)

In /etc/php5/apahce2/php.ini set the following parameter in php.ini
upload_tmp_dir = /var/www/tmp (verify that the following two lines are the same value)

upload_max_filesize = 200M (your settings may vary, but they both have to be the same value)
post_max_size = 200M ( you never know when you might need to upload a large file)

/etc/init.d/apache2 restart (restart apache)

After doing this, the warning:
"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."

will go away.
roc

User avatar
Najatuk
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Sun May 08, 2011 1:22 am
Location: Mato Grosso do Sul, Brazil
Contact:

Re: The PHP temporary directory is not set.. HELP!

Post by Najatuk » Sat May 14, 2011 12:51 am

Tranchers work around didn´t work for me nor did changing the chmod on the tmp folder. What I was able to do is see and delete the file in the extensions manager>manage rather than the module manage once I deleted the module that I couldnt see in the module manager it uploaded fine in the conventional manner...this is on 1.6, and as the other poster note correctly the configuation file was set, the but the permmisions didnt let you write which is strange because I only had a problem uploading a module that I had deleted and reuploaded.

claratuckbones
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Fri Jul 01, 2011 10:05 am

Re: The PHP temporary directory is not set.. HELP!

Post by claratuckbones » Sun Jul 03, 2011 8:25 am

Sorry I'm very new to all this malarkey. Trauncher, it seems you have the answer but I'm afraid I don't know how to follow your instructions...
trauncher wrote:you must enable overrides on apache (so that you can have httpd.conf files in your sites home dir that override values in your main apache config file.)
How do I enable overrides on apache?
ecweb wrote: then add the line:

Code:
php_value upload_tmp_dir = /my/path/to/my/website's/home/dir/tmp
^--- This is the full homedir path to your
joomla 1.6 site, with the '/tmp' added
Don't enter my sample path.. enter YOURS....
In which file to I add this line and where?

Thanks

User avatar
dennisi
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Mon May 09, 2011 4:20 pm
Contact:

Re: The PHP temporary directory is not set.. HELP!

Post by dennisi » Sat Nov 12, 2011 1:25 am

ecweb wrote:Thanks for your help Trauncher.
For those who cannot access httpd.conf there is a simpler method.
1. Create a php.ini file in the root folder of your Joomla web site
2. Add your temp directory to it. It will look something like this: upload_tmp_dir = /home/accontname/public_html/tmp
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

:'( uh i love you!!! thank you!!! THIS IS THE ANSWER and an EASY FIX too!!!

aroehrl
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Nov 24, 2011 11:56 am

Re: The PHP temporary directory is not set.. HELP!

Post by aroehrl » Fri Nov 25, 2011 3:00 pm

It's actually related to the open_basedir config of the web server. if you have access to the root of your ftp and php is run as FastCGI you can add your custom php.ini to your virtual host which should contain the following information. I'm using parallels so this might be different for plesk.
In case you need to allow access with PHP scripts of a certain virtual host to additional folder(s), you should set up an option 'open_basedir' for the virtual host with the new path value, splitting the folder names with colons. This action can only be made by a user with root privileges on the domains’ vhost.conf or vhost_ssl.conf files (for SSL virtual host).

Code: Select all

open_basedir = /var/www/vhosts/domain-name/httpdocs:/tmp/
Once you have applied these changes, you should recreate Apache’s configuration files and restart the Apache service using the following command in the shell. If the vhost(_ssl).conf file is found, then it will be added automatically to the httpd.include file of the domain:

~# /usr/local/psa/admin/sbin/websrvmng -a -v

Since version 10.0:
~# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

NOTE: If you do not run the command above, vhost.conf or vhost_ssl.conf will not be included in Apache configuration and the changes will not take effect.
Source: http://kb.parallels.com/en/432

This will remove the error message from your joomla control panel in regards to your tmp folder. However, depending on the modifications and extensions you're using you may have to add additional folders to your open_basedir.

User avatar
intheair
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Wed Jan 25, 2012 8:59 am
Contact:

Re: The PHP temporary directory is not set.. HELP!

Post by intheair » Thu Feb 02, 2012 2:39 pm

Any solution for this using J 2.5 on Hostgator?

aaanativearts
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 203
Joined: Fri Aug 04, 2006 12:38 pm

Re: The PHP temporary directory is not set.. HELP!

Post by aaanativearts » Wed Feb 22, 2012 10:10 pm

If you can't upload ANY extensions, it's probably either permissions aren't set right, or it can't find the /tmp directory. On my server you have to set the full path to /tmp in the configuration file like
var/www/mydomain.com/html/tmp (the exact path will vary with your hosting, ask your host if you don't know what it is). Just /tmp doesn't work.

On servers running php as an Apache mod, 755 does not give write access, it must be 777. If your setup is like that, be sure to change it back as soon as you are done installing the extensions, because 777 isn't secure.

To tell if your write settings are correct for your server configuration, go to
Site->Global Configurations->Permissions. If all the files in that list aren't green (Writable), then your server requires some other setting than what you currently have set, to get full write permissions.


Locked

Return to “General Questions/New to Joomla! 1.5”