Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

sessions/tmp. warning


super2000

Recommended Posts

Reading thru a number of similar postings about sessions directory/tmp. and answers given I followed some guidelines on how to resolve the problem.

 

 

To be able to make changes to the catalog/includes/configure.php and

catalog/admin/includes/configure.php

I changed to chmod 777

viewed the files in notepad

added to the bottom of both the configure.php files

'mysql'

saved the changes reset the chmod to 644

 

Refreshed the osc catalog

 

and got these messages:

 

Warning: main(includes/application_top.php): failed to open stream: Permission denied in /home/httpd/vhosts/super2000.com/httpdocs/catalog/index.php on line 13

 

Warning: main(includes/application_top.php): failed to open stream: Permission denied in /home/httpd/vhosts/super2000.com/httpdocs/catalog/index.php on line 13

 

Fatal error: main(): Failed opening required 'includes/application_top.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/super2000.com/httpdocs/catalog/index.php on line 13

 

I went back to the configure.php files

 

and the changes i made are gone

 

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

?>

 

Certainly the 3 warnings are gone and I am back to the first one.

 

Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.

 

What if I just create a directory with the name tmp in catalog/tmp ? Will that take care of it?

 

In MyStore Administration under Sessions there are

Sessions Directory -- Value -- /tmp

Sessions Directory -- Value -- _private/tmp

 

Do these need to be changed?

Link to comment
Share on other sites

It appears that your "edits" are not saving.

 

Download them to your PC via ftp and edit locally - both files

 

catalog/includes/configure.php

catalog/admin/includes/configure.php

 

and set the define for the sessions to mysql. Then ftp them both back to your site.

 

HTH

Tom

Link to comment
Share on other sites

In MyStore Administration under Sessions there are

Sessions Directory -- Value -- /tmp

Sessions Directory -- Value -- _private/tmp

 

Do these need to be changed?

 

There should only be one entry, not 2. Is that entry entered twice in the database? Once that's figured out, then, yes, you can create a directory and define it there. It would be best to put the sessions directory outside of the web space. So, if catalog is stored at /usr/stuff/morestuff/you/public_html/catalog, make directory /usr/stuff/morestuff/you/sessions and then change the entry in admin->configuration->sessions directory = /usr/stuff/morestuff/you/sessions.

 

ed

Link to comment
Share on other sites

Thank you, your suggestion took care of the session directory/tmp problem, but now I am back to my 3 other messages who appear in catalog/admin.

 

Warning: main(includes/application_top.php): failed to open stream: Permission denied in /home/httpd/vhosts/super2000.com/httpdocs/catalog/index.php on line 13

 

Warning: main(includes/application_top.php): failed to open stream: Permission denied in /home/httpd/vhosts/super2000.com/httpdocs/catalog/index.php on line 13

 

Fatal error: main(): Failed opening required 'includes/application_top.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/super2000.com/httpdocs/catalog/index.php on line 13

 

I haven't done anything as yet, just downloaded the catalog/index.php to my PC and looked at it via phpEditorIDE.

Not that I know what to do with it, but on lin 13 it shows

 

require('includes/application_top.php'); the rest highlighted in green,

than it goes on

// the following cPath references come from application_top.php

$category_depth = 'top';

if (isset($cPath) && tep_not_null($cPath)) {

$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$cateqories_products = tep_db_fetch_array($categories_products_query);

if ($cateqories_products['total'] > 0) {

$category_depth = 'products'; // display products

} else {

$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else {

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

?>

 

It's pretty well all creek to me. I am sorry but to get into category/admin. I will have to fix it.

Link to comment
Share on other sites

Lotte,

 

Dumb question time.

Do you have a file called application_top.php in catalog/includes?

Are the permissions on the file set to Read-able?

 

ed

Link to comment
Share on other sites

There should only be one entry, not 2.  Is that entry entered twice in the database?  Once that's figured out, then, yes, you can create a directory and define it there.  It would be best to put the sessions directory outside of the web space.  So, if catalog is stored at /usr/stuff/morestuff/you/public_html/catalog, make directory /usr/stuff/morestuff/you/sessions and then change the entry in admin->configuration->sessions directory = /usr/stuff/morestuff/you/sessions.

 

ed

 

Hi Ed,

I just answered Tom about the same time you wrote this. You really got me there, I don't know how to get into the database, but that _private looks like it comes from FrontPage. Have no idea how it got there.

 

Whats all this /usr/stuff/morestuff/you/public_html/catalog, in english please!

Link to comment
Share on other sites

Lotte,

 

That was my way of describing your catalog's absolute path on the hosting server. If you know what it is, great. If not, try this. Go into admin, click on Tools, and then Server Info. There should be an entry called DOCUMENT_ROOT. It will give the absolute path of your hosting account. It will look soemthing like: /usr/stuff/morestuff/you/public_html/.

 

Public_html is your main web directory. Everything in there can be seen on the Web. Using your Control Panel or an ftp tool, create a folder at the same level as public_html called sessions. So it would be: /usr/stuff/morestuff/you/sessions/. Use that whole path when you set the value in Admin->Configuration->Sessions->Session Directory.

 

ed

Link to comment
Share on other sites

Lotte,

 

Dumb question time.

Do you have a file called application_top.php in catalog/includes?

Are the permissions on the file set to Read-able?

 

ed

 

Hi Ed,

 

Yes there is a file in catalog/includes/appication_top.php and it is set to 644; or should it be 444?

 

Actually all the folders and files when I first get on with ftp are set to 644. If I change one folder or file to 777 all of them are changed.

 

Is that normal?

 

Lotte

Link to comment
Share on other sites

Lotte,

 

That was my way of describing your catalog's absolute path on the hosting server.  If you know what it is, great.  If not, try this.  Go into admin, click on Tools, and then Server Info.  There should be an entry called DOCUMENT_ROOT.  It will give the absolute path of your hosting account.  It will look soemthing like: /usr/stuff/morestuff/you/public_html/.

 

Great! Never saw that one.  A day older and a whole lot smarter.

 

You mean this:

 

_SERVER["DOCUMENT_ROOT"] /home/httpd/vhosts/super2000.com/httpdocs

 

 

Public_html is your main web directory.  Everything in there can be seen on the Web.  Using your Control Panel or an ftp tool, create a folder at the same level as public_html called sessions.  So it would be: /usr/stuff/morestuff/you/sessions/.  Use that whole path when you set the value in Admin->Configuration->Sessions->Session Directory.

 

ed

 

 

Like this:

 

home/httpd/vhosts/super2000.com/httpdocs/sessions

 

That folder is now in the same level as catalog, right.

 

Lotte

Link to comment
Share on other sites

Lotte,

 

You might want to try setting it at /home/httpd/vhosts/super2000.com/sessions. That way it is outside of accessable Web space.

 

ed

Link to comment
Share on other sites

Only just noticed this thread.

 

If your root directory is (for instance) /var/www/html/ and you want to place a folder called 'tmp' in /var/www/ you are correct - you won't have permission to do so. So just contact your hosting company, tell them what you need to do, and ask them to create the folder for you and give you (site owner) access to load files to that folder.

 

Vger

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...