How to confirm correct $log_path and $tmp_path?

Joomla version 1.5 is end-of-life and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
hmflb
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu May 01, 2008 8:38 pm
Location: Sweden

How to confirm correct $log_path and $tmp_path?

Post by hmflb » Thu May 01, 2008 9:49 pm

Hi!

My environment is:
Joomla! version 1.5.2 Production/Stable on a shared host running:
* FreeBSD
* Apache 1.3.39
* PHP 5.2.5
* MySQL 5.0.45

I have problems setting up the $log_path and $tmp_path in the configuration.php. One part is to have the right write-permisssions in suitable directories, but that's just setting right owner, group and mode, and that I can do. The other part is to choose correct values and confirm that they are OK, and that is mor tricky for me...

Are the paths absolute/relative to the filesystem or relative to the Joomla!-driectory?

How can i confirm I have the correct paths and permissions?
(I.e. Are there any error messages I can pick up? Are there any actions I cantake that will produce log files? Are there any function that will success or fail dependeing on a functioning tmp directory?)

I have searched the installation documentation and the forum, but I wasn't able to find a answer that way...

Kind regards
/hmflb

felixkat
Joomla! Intern
Joomla! Intern
Posts: 70
Joined: Sun Oct 28, 2007 2:07 pm

Re: How to confirm correct $log_path and $tmp_path?

Post by felixkat » Fri May 02, 2008 12:09 am

Hi,

absolute/relative to the filesystem. This is from my configuration.php

var $log_path = '/home/xxxx/public_html/Joomla/logs';
var $tmp_path = '/home/xxxx/public_html/Joomla/tmp';


Hope this helps. A phpinfo file may assist if you looking for the paths.

hmflb
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu May 01, 2008 8:38 pm
Location: Sweden

Re: How to confirm correct $log_path and $tmp_path?

Post by hmflb » Fri May 02, 2008 7:13 am

Thanks for your answer... Now I have a clue how to use the parameters.

Are there any way of confirming I have done right (including permissions)?

/hmflb

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14704
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: How to confirm correct $log_path and $tmp_path?

Post by humvee » Fri May 02, 2008 7:49 am

Check the System Information=>PHP Information tab of the Help menu and compare the entries with the entry in the configuration listing.

hth

Andy

hmflb
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu May 01, 2008 8:38 pm
Location: Sweden

Re: How to confirm correct $log_path and $tmp_path?

Post by hmflb » Fri May 02, 2008 8:58 am

I don't know what to look for in the PHP-info page. But nothing seems to handle Joomla settings...

How can i confirm the function of the directories the "hard" way, i.e. what events will write to the log directory
and what action require the tmp directory to be configured correct?

/hmflb

felixkat
Joomla! Intern
Joomla! Intern
Posts: 70
Joined: Sun Oct 28, 2007 2:07 pm

Re: How to confirm correct $log_path and $tmp_path?

Post by felixkat » Fri May 02, 2008 12:15 pm

hmflb wrote:I don't know what to look for in the PHP-info page. But nothing seems to handle Joomla settings...

How can i confirm the function of the directories the "hard" way, i.e. what events will write to the log directory
and what action require the tmp directory to be configured correct?

/hmflb

I'm guessing, (because I don't know :-[ ), that it won't be easy to identify all items that use the tmp & log directorys. Certainly when you install packages the tmp directory is used..... The best route is to fix the problem rather than working around it.


Go into your Admin Panel, and then go to HELP ---> System Info.

This is bring up a few pages of Jargon. :)

Scroll down or do a FIND on a title called Apache Environment

Underneath this should be an entry something like DOCUMENT_ROOT /home/server/public_html

The actual /home/server/public_html will be different on your server but this is your absolute path.

If your Joomla directory is in the root than the following is required in your configuration.php file

var $log_path = '/home/xxxx/public_html/logs';

If it's in a subdirectory then it would be

var $log_path = '/home/xxxx/public_html/subdirectory/logs';

The same for /tmp


Just as an addition.... I had to also put var $ftp_root = '/'; i.e my ftp root as /

Good luck 8)

hmflb
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu May 01, 2008 8:38 pm
Location: Sweden

Re: How to confirm correct $log_path and $tmp_path?

Post by hmflb » Fri May 02, 2008 4:39 pm

felixkat wrote: Just as an addition.... I had to also put var $ftp_root = '/'; i.e my ftp root as /
I created an FTP account for Joomla with the Joomla directory as root, and after about 1½ hr trying, I figured out that I needed to put '/' as my $ftp_root and not the servers full path. So maybe i should have asked about that too to save me some time...
felixkat wrote: I'm guessing, (because I don't know :-[ ), that it won't be easy to identify all items that use the tmp & log directorys. Certainly when you install packages the tmp directory is used..... The best route is to fix the problem rather than working around it.
I know it's the servers full path to put in log and tmp. How can I confirm that the ownership and permissions are OK?

I'm not asking for all actions/events that use tmp and log, just one each... Will a package install fail, if I haven't got the right ownership/permission for tmp?

/hmflb

felixkat
Joomla! Intern
Joomla! Intern
Posts: 70
Joined: Sun Oct 28, 2007 2:07 pm

Re: How to confirm correct $log_path and $tmp_path?

Post by felixkat » Fri May 02, 2008 5:19 pm

Hi,

Yes it's likely that an install package will fail if you have an incorrect path for tmp. I had an error message of "Cannot find install package" or something similar. The error message disappeared after I corrected my paths.

I'm not sure about the log file though as I've never seen anything in the directory, even after switching logging on. Somebody else may be able to advise on that one.

sf51177
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Jun 27, 2009 2:13 am

Re: How to confirm correct $log_path and $tmp_path?

Post by sf51177 » Sat Jun 27, 2009 2:43 am

Thanks felixkat.

I had the same problem and I got it fixed, thanks to your post.

Shawn

vjtemplates
Joomla! Explorer
Joomla! Explorer
Posts: 314
Joined: Sat Dec 27, 2008 6:16 am
Location: LA
Contact:

Re: How to confirm correct $log_path and $tmp_path?

Post by vjtemplates » Sun Jun 28, 2009 4:37 pm

felixkat wrote:Hi,

Yes it's likely that an install package will fail if you have an incorrect path for tmp. I had an error message of "Cannot find install package" or something similar. The error message disappeared after I corrected my paths.

I'm not sure about the log file though as I've never seen anything in the directory, even after switching logging on. Somebody else may be able to advise on that one.
$tmp_path is the absolute path of your Joomla installation. It's something like this:

'/home/xxxxxx/public_html/tmp';
Joomla Templates & VirtueMart Themes

http://www.vjtemplates.com

TheHarald
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Tue Jun 09, 2009 2:30 am

Re: How to confirm correct $log_path and $tmp_path?

Post by TheHarald » Tue Aug 04, 2009 12:35 pm

xxxx is that my url?

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14704
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: How to confirm correct $log_path and $tmp_path?

Post by humvee » Tue Aug 04, 2009 2:36 pm

no it is the sequence of folders on your web server to the joomla_directory/ and the tmp/ directory

Daniel_Arnolf
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Sep 02, 2009 5:57 pm

Re: How to confirm correct $log_path and $tmp_path?

Post by Daniel_Arnolf » Wed Sep 02, 2009 6:12 pm

In windows servers the set up format looks a bit different:

Code: Select all

	var $log_path = 'C:\\HostingSpaces\\xxxx\\xxxx\\wwwroot\\logs';
	var $tmp_path = 'C:\\HostingSpaces\\xxxx\\xxxx\\wwwroot\\tmp';

LANWANMAN
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Dec 24, 2009 2:59 pm

Re: How to confirm correct $log_path and $tmp_path?

Post by LANWANMAN » Fri Dec 25, 2009 8:22 pm

I wish I would have found these posts three hours ago. Please excuse the length of this post and my stating what has already been stated. I still don't no why we might have to modify permissions in the case of Windows Server. So far I'm getting by OK with the Joomla FTP layer enabled. Security seems to be OK this route; any thoughts?

To test, I used this hello world component: http://www.vojtechovsky.net/joomla/com_helloworld.zip

Install Problem Solved: Joomla 1.5.15 Joomlashack Templates Pro

Client Side: Windows Vista 32-bit Multiple Browsers IE8 FF v3.5.5 (not a browser problem)
Server Side: Remote Windows Hosting at GoDaddy.com, Windows IIS 7 PHP 5.2.5

Problem Description: Joomla 1.5.15 - Purchased JS Community, downloaded and unzipped to desktop as per instructions. Extensions > Install/Uninstall > Browsed to C:\Users\username\Desktop\js_community.zip and clicked the "Upload File and Install" button.

Error Messages (File js_community.zip did upload to /tmp directory before install failed):

JFTP::mkdir: Bad response

Cause: Path problem. In Joomla, Help > System Info > Directory Permissions showed Log Directory ($log_path) and Temp Directory ($tmp_path) Unwritable.

Solution: In Joomla go to Media Manager to determine absolute path of site. Path is listed under "Files" over top the search box. If absolute path is not there, go to hosting control panel or call hosting support. Note: $log_path is not cause of problem, but might as well fix it anyway. Must fix $tmp_path

Modify Joomla configuration.php your computer and upload to server.

Example with Joomla in site root:

WAS: var $log_path = '/var/logs';
CHANGED TO: var $log_path = 'D:\Hosting\there-is-a-number-here\html\logs'; (no idea where "var" came from)

WAS: var $tmp_path = '/tmp';
CHANGED TO: var $tmp_path = 'D:\Hosting\there-is-a-number-here\html\tmp';

Example with Joomla in site sub-domain/sub-folder:

WAS: var $log_path = '/var/logs';
CHANGED TO: var $log_path = 'D:\Hosting\there-is-a-number-here\html\joomla\logs';

WAS: var $tmp_path = '/tmp';
CHANGED TO: var $tmp_path = 'D:\Hosting\there-is-a-number-here\html\joomla\tmp';

Example other systems:

var $log_path = '/var/logs';
var $tmp_path = '/tmp';

var $log_path = '/home/xxxx/public_html/Joomla/logs';
var $tmp_path = '/home/xxxx/public_html/Joomla/tmp';

Related Issue Joomla 1.5.15: 1) This path problem is also one cause of failed Joomla 1.5.15 Browser installs. Installation routines cannot find the needed files.

Non-related Issues Joomla 1.5.15:

1) Without FTP layer configured and set to "Yes", could not save changes to configuration.php

2) Global Configuration > SEO Settings > Search Engine Friendly URLs set to "Yes" results loss of CSS paths and CSS all pages except front page.

Item 2 not resolved, stopped using Search Engine Friendly URLs.

Item 1 enabled FTP layer (This way I did not have to modify server-side permissions, thus, putting server at risk):

var $ftp_enable = '1';
var $ftp_host = 'mydomainname.com';
var $ftp_port = '21';
var $ftp_user = 'myusername';
var $ftp_pass = 'mypassword';
var $ftp_root = '/';

Or for sub-directory: var $ftp_root = '/joomla/';

Ron aka LANWANMAN, Ocala, Florida USA

"No matter how much you know today, you'll have to know more tomorrow" (source unknown).

kubel-junior
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Jul 13, 2011 11:27 am

Re: How to confirm correct $log_path and $tmp_path?

Post by kubel-junior » Fri Jul 22, 2011 6:38 am

<?php
exec('pwd', $out);
foreach ($out as $line)
echo"<br/>$line\n";
?>

create file pwd.php and run on your serwer

nesly
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Aug 25, 2011 4:25 am

Re: How to confirm correct $log_path and $tmp_path?

Post by nesly » Thu Aug 25, 2011 4:32 am

felixkat wrote:
hmflb wrote:I don't know what to look for in the PHP-info page. But nothing seems to handle Joomla settings...

How can i confirm the function of the directories the "hard" way, i.e. what events will write to the log directory
and what action require the tmp directory to be configured correct?

/hmflb

I'm guessing, (because I don't know :-[ ), that it won't be easy to identify all items that use the tmp & log directorys. Certainly when you install packages the tmp directory is used..... The best route is to fix the problem rather than working around it.


Go into your Admin Panel, and then go to HELP ---> System Info.

This is bring up a few pages of Jargon. :)

Scroll down or do a FIND on a title called Apache Environment

Underneath this should be an entry something like DOCUMENT_ROOT /home/server/public_html

The actual /home/server/public_html will be different on your server but this is your absolute path.

If your Joomla directory is in the root than the following is required in your configuration.php file

var $log_path = '/home/xxxx/public_html/logs';

If it's in a subdirectory then it would be

var $log_path = '/home/xxxx/public_html/subdirectory/logs';

The same for /tmp


Just as an addition.... I had to also put var $ftp_root = '/'; i.e my ftp root as /

Good luck 8)
i have to working with this thing for 2 days.. and spent my 5 minute to register an account just to post a compliment and a very big thank you to you felixkat..thankz..i mean it.

avantisis
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Aug 30, 2011 8:02 pm

Re: How to confirm correct $log_path and $tmp_path?

Post by avantisis » Tue Aug 30, 2011 9:10 pm

I'm stuck here too and feeling a little frazzled. I am trying to enable front end uploads for youtheme zoo everything works but image uploads.

Os: Windows Vista 32 bit
joomla:1.5.23
Database Type: mysql




When I try to upload images I get this error message:

JFolder::create: Path not in open_basedir paths
Warning: Failed to move file!

I have gone through this thread and a thread about the open_basedir paths and I just don't seem to be grasping the appropriate method of solving my problem.

In my joomla administrator help/system info/directory permissions, I get the following:

Log Directory ($log_path) /var/logs/

Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/var/logs) is not within the allowed path(s): (/home/xxxxxx/:/tmp:/usr/local/lib/php/) in /home/xxxxx/domains/xxxxxxxx/public_html/administrator/components/com_admin/admin.admin.html.php on line 289
Unwritable

How can I make this file writable, or where and how do I change the admin.admin.html.php file to enable the use of /var/logs in the open_basedir paths to enable me to upload image files from the front end of youtheme zoo?

I'm a total newb when it comes to javascript so any help is much appreciated.

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20651
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: How to confirm correct $log_path and $tmp_path?

Post by leolam » Wed Aug 31, 2011 4:54 am

To find out what your absolute path is, copy the following code into a text editor (i.e. JEdit, Notepad, etc), save the file as a .php naming it whatever you prefer (i.e anyfilename.php.).

Code: Select all

<?php 
 $path = getcwd();
 echo "Your Absoluthe Path is: ";
 echo $path;
 ?>
Using your FTP software, ftp the file you have just created to your root folder. (folder where Joomla is located (eg public_html or www)

Open your web browser and type in http://www.yourdomain.com/anyfilename.php. The result will show the absolute path!

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

avantisis
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Aug 30, 2011 8:02 pm

Re: How to confirm correct $log_path and $tmp_path?

Post by avantisis » Wed Aug 31, 2011 5:19 pm

@leo thanks for your reply. I posted my default $log_path and not what I had changed it to. Sorry for that. Most of this is new to me and I'm learning as I go. My absolute path is /home/xxxx/domains/xxxx.com/public_html/

There is a tmp and a logs folder in this location so in the $log_path I have this : /home/xxxx/domains/xxxx.com/public_html/logs/

is this incorrect? It works fine for my $tmp_path

Thanks again for taking the time to help.

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20651
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: How to confirm correct $log_path and $tmp_path?

Post by leolam » Thu Sep 01, 2011 3:11 am

avantisis wrote:@leo thanks for your reply.
There is a tmp and a logs folder in this location so in the $log_path I have this : /home/xxxx/domains/xxxx.com/public_html/logs/
is this incorrect? .
No it is not. Both /tmp and /logs should be without "slash" at the end so

Code: Select all

 /home/xxxx/domains/xxxx.com/public_html/tmp
and

Code: Select all

 /home/xxxx/domains/xxxx.com/public_html/logs
is the correct setting.

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

zarvan
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Mon Aug 29, 2011 12:55 pm

Re: How to confirm correct $log_path and $tmp_path?

Post by zarvan » Thu Sep 01, 2011 5:28 am

i have a problem with this the logs is full and its volum is high
and it take a lot of my hosting space how can i empaty it automaticly

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20651
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: How to confirm correct $log_path and $tmp_path?

Post by leolam » Thu Sep 01, 2011 6:27 am

Zarvan open your own thread and do not hijack someones else thread please

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

avantisis
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Aug 30, 2011 8:02 pm

Re: How to confirm correct $log_path and $tmp_path?

Post by avantisis » Thu Sep 01, 2011 6:40 am

leolam wrote:
avantisis wrote:@leo thanks for your reply.
There is a tmp and a logs folder in this location so in the $log_path I have this : /home/xxxx/domains/xxxx.com/public_html/logs/
is this incorrect? .
No it is not. Both /tmp and /logs should be without "slash" at the end so

Code: Select all

 /home/xxxx/domains/xxxx.com/public_html/tmp
and

Code: Select all

 /home/xxxx/domains/xxxx.com/public_html/logs
is the correct setting.

Leo 8)

I went from only not being able to upload images from the frontend to having all of my components not working properly. I tried unistalling the component after backing it up so that I could reinstall it and now I can't even do that. I haven't changed any of the php files and yet now all of a sudden nothing is working and my basedir is unable to move the files. I'm stuck and feeling in way over my head.

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20651
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: How to confirm correct $log_path and $tmp_path?

Post by leolam » Thu Sep 01, 2011 7:28 am

avantisis wrote:
I went from only not being able to upload images from the frontend to having all of my components not working properly. I tried unistalling the component after backing it up so that I could reinstall it and now I can't even do that. I haven't changed any of the php files and yet now all of a sudden nothing is working and my basedir is unable to move the files. I'm stuck and feeling in way over my head.
Post this (extended) http://forum.joomla.org/viewtopic.php?f=428&t=272481 (no worry we get you going)

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

avantisis
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Aug 30, 2011 8:02 pm

Re: How to confirm correct $log_path and $tmp_path?

Post by avantisis » Thu Sep 01, 2011 7:47 am

leolam wrote:
avantisis wrote:
I went from only not being able to upload images from the frontend to having all of my components not working properly. I tried unistalling the component after backing it up so that I could reinstall it and now I can't even do that. I haven't changed any of the php files and yet now all of a sudden nothing is working and my basedir is unable to move the files. I'm stuck and feeling in way over my head.
Post this (extended) http://forum.joomla.org/viewtopic.php?f=428&t=272481 (no worry we get you going)

Leo 8)

My problems just got much worse.....somehow my configuration.php file got stripped and my site is completely offline :'( So I've got a support ticket in with my hosting provider to help me fix the problem. Worse case scenario I start over from scratch in which case I still need to figure out why frontend image uploads were not working in any event thanks so much for your efforts I'll have a look at the link in the morning but for now I'll have to call it a night.

charleyhankins
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 233
Joined: Fri Oct 12, 2007 7:07 pm

Re: How to confirm correct $log_path and $tmp_path?

Post by charleyhankins » Wed Dec 10, 2014 5:33 pm

Thanks, leolam, for the code!

Exactly what I was looking for!

CH
:) :pop


Locked

Return to “Installation 1.5”