Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Search/Advanced Search not returning results

Search/Advanced Search not returning results

Views: 2,434

Results 1 to 12 of 12
9 Mar 2011, 11:05 PM
#1
scottfr avatar

scottfr

New Zenner

Join Date:
Mar 2011
Posts:
6
Plugin Contributions:
0

Search/Advanced Search not returning results

Have just had to migrate ZC after a bad hack & at the same time have added the 12leaves business template (recommended).
We cannot get any results to be returned using either std or advances search.
Can anyone give any suggestions on where to start looking....
Site is https://www.fotoriesel.com/shop

10 Mar 2011, 12:16 AM
#3
scottfr avatar

scottfr

New Zenner

Join Date:
Mar 2011
Posts:
6
Plugin Contributions:
0

Re: Search/Advanced Search not returning results

Please be patient - a PHP newbie.

One of the debug msgs -

[07-Mar-2011 05:01:12] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: open(/home/fotorie/public_html/shop/cache/sess_91aeff7a64de388e0df0d7802639f6d0, O_RDWR) failed: No such file or directory (2) in /home/fotories/public_html/shop/includes/functions/sessions.php on line 114
[07-Mar-2011 05:01:16] PHP Warning: session_write_close() [<a href='function.session-write-close'>function.session-write-close</a>]: open(/home/fotorie/public_html/shop/cache/sess_91aeff7a64de388e0df0d7802639f6d0, O_RDWR) failed: No such file or directory (2) in /home/fotories/public_html/shop/zcadmin/includes/application_bottom.php on line 13
[07-Mar-2011 05:01:16] PHP Warning: session_write_close() [<a href='function.session-write-close'>function.session-write-close</a>]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/home/fotorie/public_html/shop/cache) in /home/fotories/public_html/shop/zcadmin/includes/application_bottom.php on line 13

Code from above PHP file -

<?php /** * @package admin * @copyright Copyright 2003-2010 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: application_bottom.php 17049 2010-07-29 06:19:52Z drbyte $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } // close session (store variables) session_write_close(); if (STORE_PAGE_PARSE_TIME == 'true') { if (!is_object($logger)) $logger = new logger; echo $logger->timer_stop(DISPLAY_PAGE_PARSE_TIME); } I can see alot of learning coming up...
10 Mar 2011, 12:20 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Search/Advanced Search not returning results

scottfr:

[07-Mar-2011 05:01:12] PHP Warning: session_start() [function.session-start]: open(/home/fotorie**/public_html/shop/cache/**sess_91aeff7a64de388e0df0d7802639f6d0, O_RDWR) failed: No such file or directory (2) in ...
You've got your site set up to store sessions in files, but the /cache/ folder, where it stores that data, is set up in such a way that the software isn't being allowed to write to the files inside.

It's recommended that you use the database for session storage anyway. Make the appropriate changes in your configure.php files, or choose the "database" setting for that option during initial installation / reinstallation using zc_install.

10 Mar 2011, 1:03 AM
#5
scottfr avatar

scottfr

New Zenner

Join Date:
Mar 2011
Posts:
6
Plugin Contributions:
0

Re: Search/Advanced Search not returning results

Okay, If I change below -

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'file');
define('DIR_FS_SQL_CACHE', '/home/fotories/public_html/shop/cache');

to 'database' would be the best practice option?

10 Mar 2011, 1:35 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Search/Advanced Search not returning results

No, that's not the one I meant. That's for SQL caching. I'd still set that to 'database' though.

This is the one for session handling: define('STORE_SESSIONS', 'db');

10 Mar 2011, 2:18 AM
#7
scottfr avatar

scottfr

New Zenner

Join Date:
Mar 2011
Posts:
6
Plugin Contributions:
0

Re: Search/Advanced Search not returning results

That already seems to be set - ??

define('USE_PCONNECT', 'false');
define('shop_SESSIONS', 'db');
// for shop_SESSIONS, use 'db' for best support, or '' for file-based storage

I'll change over the SQL session to 'database' as suggested in the meantime.

10 Mar 2011, 3:26 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Search/Advanced Search not returning results

Zen Cart doesn't use a constant named "shop_SESSIONS".
It's called "STORE_SESSIONS".

What have you been doing with the original code? Why have you hacked it up with replacements of names in critical core system components?

10 Mar 2011, 3:46 AM
#9
scottfr avatar

scottfr

New Zenner

Join Date:
Mar 2011
Posts:
6
Plugin Contributions:
0

Re: Search/Advanced Search not returning results

Excuse the ignorance from this end.

We had the install done by another provider and the only thing I can think of is that it was changed because the ZC install is in a folder called "shop".

I've just changed that instance to 'STORE' and the site seems to work the same, including no search function.

10 Mar 2011, 4:12 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Search/Advanced Search not returning results

Sounds like the integrity of the files on your site is in question.

I suggest reinstalling or setting up another clean site with original uncustomized files and satisfy yourself that it does indeed work out-of-the-box on your server just like it does on thousands of others.

Or, you can identify and fix all the differences by hand: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues This is the step I'd take if I were investigating it myself.

10 Mar 2011, 5:13 AM
#11
scottfr avatar

scottfr

New Zenner

Join Date:
Mar 2011
Posts:
6
Plugin Contributions:
0

Re: Search/Advanced Search not returning results

Cheers for that. I'll look into it over the next 48hrs and post what happens.

6 Apr 2011, 5:08 AM
#12
shakes222 avatar

shakes222

New Zenner

Join Date:
Aug 2010
Posts:
10
Plugin Contributions:
0

Re: Search/Advanced Search not returning results

kobra:

What you have is a blank page issue

https://www.zen-cart.com/tutorials/index.php?article=82

I encountered a similar problem with the site I'm working on. The advanced search was outputting a php error only when no results were produced from a search. Using the debug logs I tracked it down to an extra functions file I had created for a section of my site. The error was being produced by just a few blank lines after the php closing tag (?>). I must have hit enter a few to many times :smile:

Just thought I'd throw this out there in case someone runs into a similar situation.