dowat Posted July 31, 2004 Posted July 31, 2004 I have recently installed osCommerce on my site, but I keep getting a message when I open the store index page. It says Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created. I have tried putting a directory called tmp in various locations in my site, but I still get the same message. I have also noticed that the images appear to be missing from the store page. I have not moved them since I installed osCommerce. How do I tell the 'store' where the images are or where should they be?? Any suggestions??
Guest Posted August 1, 2004 Posted August 1, 2004 You can edit catalog/includes/configure.php - for the session problem use this setting (right down the bottom of the file): define('STORE_SESSIONS', 'mysql'); Your image problem is most likely due to the filesystem path setting being incorrect here: define('DIR_FS_CATALOG', 'your_file_path'); 'your_file_path' is usually something like '/home/you/public_html/catalog/' If you browse to admin->tools->server info it will show DOCUMENT_ROOT under the 'Environment' info - mine is DOCUMENT_ROOT /home/suomedia/public_html - so for osCommerce I would use /home/suomedia/public_html/catalog/ Matti
jbrolin Posted August 1, 2004 Posted August 1, 2004 Hello! the problem you are describing can easily be solved with this little row: define('DIR_FS_CATALOG_IMAGES', $_SERVER["DOCUMENT_ROOT"] . DIR_FS_CATALOG . 'images/'); adding the $_SERVER["DOCUMENT_ROOT"] . resolves the root of your web so even if the root is somethinng like "'/home/you/public_html/catalog/" it will work. Hope this is usefull [email protected]
dowat Posted August 1, 2004 Author Posted August 1, 2004 I tried the line as you suggested define('DIR_FS_CATALOG_IMAGES', $_SERVER["DOCUMENT_ROOT"] . DIR_FS_CATALOG . 'images/'); but should this not be define('DIR_FS_CATALOG',$_SERVER["DOCUMENT_ROOT"]. DIR_FS_CATALOG_IMAGES, 'images/' I have tried them both, but still no difference. Suggestions
jbrolin Posted August 1, 2004 Posted August 1, 2004 Hello again! My solution was actualy to another line, which I had problems with. I saw Johsons reply and it is better/easier to resolve the root path with $_SERVER["DOCUMENT_ROOT"] You could try this for the DIR_FS_CATALOG: define('DIR_FS_CATALOG', $_SERVER["DOCUMENT_ROOT"] . 'catalog/'); That should do the trick. Regards Jonas
jbrolin Posted August 1, 2004 Posted August 1, 2004 In addition to the above I can also mention that $_SERVER["DOCUMENT_ROOT"] . can be used in other lines where needed for example: define('DIR_FS_CACHE', $_SERVER["DOCUMENT_ROOT"] . '/tmp/'); /J
dowat Posted August 2, 2004 Author Posted August 2, 2004 I've tried define('DIR_WS_IMAGES',$_SERVER["DOCUMENT_ROOT"] . 'images/'); and it made no difference!! I've looked at the source code produced when I view /catalog in IE explorer, and there are lines like <img src="/home/.sites/64/site41/webimages/oscommerce.gif" I do not know where the webimages folder is being produced from as it doesn't exist!! Suggestions??
jbrolin Posted August 2, 2004 Posted August 2, 2004 Hi! my suggestion is that you make a new php file on your server which says: <?php echo $_SERVER["DOCUMENT_ROOT"]; ?> to check what result you get view the file in internet explorer. I suppose you get "/home/.sites/64/site41/web" if so it should work by adding a "/" before 'images/". That is: define('DIR_WS_IMAGES',$_SERVER["DOCUMENT_ROOT"] . '/images/'); /J
dowat Posted August 2, 2004 Author Posted August 2, 2004 Thanks for that!! I did exactly as you said. What I got was /home/.sites/64/site41/web which is as you thought. I changed the images line to read define('DIR_WS_IMAGES',$_SERVER["DOCUMENT_ROOT"] . '/catalog/images/'); as the images are in /web/catalog/images. But guess what?? It made not difference!!! :angry:
jbrolin Posted August 2, 2004 Posted August 2, 2004 Hello again... I am almost oout of clues... have you checked that the permissions of the images folder is set correctly? check and set it with an ftp program, the attributes ought to be 755. ...otherwise i am totaly out of suggestions. Regards J
Guest Posted August 2, 2004 Posted August 2, 2004 Check that the images exist :P BTW - Sometimes files may appear to be there, but are zero bytes. Set: define('DIR_FS_CATALOG', '/home/.sites/64/site41/web/catalog/'); Reset you image path to the default setting (this should never be touched unless you rename your images directory) Matti
dowat Posted August 3, 2004 Author Posted August 3, 2004 The images which should be appearing are oscommerce.gif, corner_left.gif, header_account.gif to name but a few. These images are listed in the images directory and are not shown as 0 bytes when I look at the in WS-FTP Pro. I have changed back the line define('DIR_FS_CATALOG', '/home/.sites/64/site41/web/catalog/'); as you suggested, but it made no difference. If you don't believe me, have a look at http://www.nav-e-gate4less.co.uk/catalog
dowat Posted August 3, 2004 Author Posted August 3, 2004 Immediately after I posted the last message, the images appeared. I had forgotten to change back another line which defined the catalog path. But, there are still some images missing - the quick search icon and the languages images. Suggestions???
jbrolin Posted August 3, 2004 Posted August 3, 2004 Hi again! I had a similair problem with the attbributes on some directories was wrong when I transfered to a new server... set the permissions on all images and subdirectories including images to 755... ... But I checked your site and it looks alright except the stylesheet does not seem to work!? Check if the stylesheet file exists and has info in it. regards Jonas ---- my previous message... Hello again... I am almost oout of clues... have you checked that the permissions of the images folder is set correctly? check and set it with an ftp program, the attributes ought to be 755. ...otherwise i am totaly out of suggestions. Regards J
dowat Posted August 3, 2004 Author Posted August 3, 2004 There is a style sheet in the catalog directory and there does appear to be text in it. Unfortuately, I don't have a Style Sheet Editor, so I can't tell if the contents of the file are ok or not. I have tried replacing the style sheet file with the one stored on my PC - ie the one which was originally unpacked when I unzipped osCommerce, but that made no difference!! :(
jbrolin Posted August 3, 2004 Posted August 3, 2004 Hi again! I took the liberty to go into your admin area... hope that is ok? In the catalog/includes/configure.php you have a serious error on line 23: define('DIR_FS_CATALOG', '/home/.sites/64/site41/web/catalog/'); should be: define('DIR_WS_HTTP_CATALOG', '/home/.sites/64/site41/web/catalog/'); and delete the next line which sets DIR_WS_HTTP_CATALOG to empty, maybe this will solve some things..? Regards Jonas
dowat Posted August 3, 2004 Author Posted August 3, 2004 I did exactly that. I'm not seeing any images!! Back to where I started!! :(
jbrolin Posted August 4, 2004 Posted August 4, 2004 hi! if i now look at properties in explorer on the images I come up with http://www.nav-e-gate4less.co.uk//home/.si...pixel_trans.gif which is wrong, try setting it back to: define('DIR_WS_HTTP_CATALOG', 'catalog/'); and maybe change also: define('DIR_FS_CATALOG', 'catalog/'); /J
dowat Posted August 4, 2004 Author Posted August 4, 2004 I did that and it appears to work!!! At last!! Thank you very much for your help. Just one other thing. How do I set a password for the admin area, so that only I can get into it??
jbrolin Posted August 4, 2004 Posted August 4, 2004 Hi! Great it works! It could be abit tricky to set the password for the admin area. there are some contributions out there but it all depends on how your server works. I have modified a script to work on my server (and most others I think). You can download it from http://www.datorverkstan.com/tools/makepw.zip Unzip it and upload the php file to the admin directiory, follow the rest of the instructions in the php file. good luck! J
dowat Posted August 4, 2004 Author Posted August 4, 2004 Did that and got Warning: fopen(.htaccess): failed to open stream: Permission denied in /home/.sites/64/site41/web/catalog/admin/makepw.php on line 37 Warning: fputs(): supplied argument is not a valid stream resource in /home/.sites/64/site41/web/catalog/admin/makepw.php on line 40 Warning: fclose(): supplied argument is not a valid stream resource in /home/.sites/64/site41/web/catalog/admin/makepw.php on line 42 OK! Help??
Guest Posted August 4, 2004 Posted August 4, 2004 hi! if i now look at properties in explorer on the images I come up with http://www.nav-e-gate4less.co.uk//home/.si...pixel_trans.gifwhich is wrong, try setting it back to: define('DIR_WS_HTTP_CATALOG', 'catalog/'); and maybe change also: define('DIR_FS_CATALOG', 'catalog/'); /J If this works (which it appears to) it is still incorrect - it only works because there is a trailing slash (which shouldn't be there) in the server path - the latter will cause problems elsewhere. Matti
jbrolin Posted August 4, 2004 Posted August 4, 2004 Hello Ross! Regarding the errors you got from the makepw open the makepw.php in an editor and read the instructions, do not forget set the permissions back to what you had before! Regards J
dowat Posted August 4, 2004 Author Posted August 4, 2004 Thank you both for your replies. When I look at the properties of the images I get http://www.nav-e-gate4less.co.uk/catalog/i.../oscommerce.gif which does not have a // in it. The lines you mention both have 'catalog/' I tried taking out the / at the end of http://www.nav-e-gate4less.co.uk, but the properties of the images say http://www.nav-e-gate4less.co.ukcatalog/im.../oscommerce.gif which is wrong and I am back to the images not being present again. Re the makepw.php file, I have opened the file in an editor, and I have followed the instructions to the letter. I did a chmod to 777 of the makepw file, went to www.nav-e-gate4less/catalog/admin/makepw.php. I get the enter user name and password boxes. I then press make and I get the same error messages Suggestions??
jbrolin Posted August 4, 2004 Posted August 4, 2004 Regarding the makepw, you have to chmod the whole admin catalog. It will create a .htaccess file and a .htpasswd file so the server asks for a password. change back the chmod after you run the makepw. /J
Recommended Posts
Archived
This topic is now archived and is closed to further replies.