ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Do a search without submitting a form?

December 08, 2007 9:58am

Subscribe [7]
  • #16 / Dec 12, 2007 7:57am

    Mark Huot

    587 posts

    Hum, I’m also running MAMP on OS X with PHP5. I’ll try it with 4 to see what kind of results I get. If I could bug you with one more question, could you run the following MySQL query from the Admin » Utilities » MySQL Manager » Query From within EE?

    SELECT action_id AS id FROM exp_actions WHERE class="Search" AND method="do_search"
  • #17 / Dec 12, 2007 8:46am

    Mark Bowen

    12637 posts

    Hi Mark,

    I ran the query and I get back ‘19’ as the result. That being the same number as the ACT variable appended to the end of the URL.
    It still re-directs to

    <a href="http://localhost:8888/index.php/search/for/getting/?ACT=19">http://localhost:8888/index.php/search/for/getting/?ACT=19</a>

    instead of going to a results template though. I definitely have one of those set in the settings. The URL I am trying to get the results with is below :

    localhost:8888/ee/index.php/search/for/getting

    Hope that helps?

    Best wishes,

    Mark

  • #18 / Dec 12, 2007 9:07am

    Mark Bowen

    12637 posts

    Hi Mark,

    As a quick update I tried running MAMP with V4 of PHP instead of V5 which it is currently on and still no joy I’m afraid. Still coming back with the same URL.

    Thanks.

    Mark

  • #19 / Dec 12, 2007 11:33am

    Mark Huot

    587 posts

    Woohoo (sort of). I think I’ve nailed down the cause of your problem to the port number. If you switch to port 80 everything seems to work fine. This must have something to do with the php header function, but I’m not sure what yet. I’ll let you know more when I nail this down.

  • #20 / Dec 12, 2007 12:01pm

    PXLated

    1800 posts

    Mark B…Is there a reason you’re running MAMP on port 8888 instead of changing it to 80?

  • #21 / Dec 12, 2007 12:05pm

    Mark Huot

    587 posts

    Or, is there a reason that php’s `header(“Location: ...”)` function won’t work with a port of 8888?

  • #22 / Dec 12, 2007 12:06pm

    Mark Bowen

    12637 posts

    Hi Mark,

    Will try this now but just to let you know that I did try this on a live server and not on a localhost but it didn’t work either so hopefully you can get this one sorted as it seems like a really nice idea.

    Best wishes,

    Mark

  • #23 / Dec 12, 2007 12:07pm

    Mark Bowen

    12637 posts

    Ah Px,

    Sorry just noticed your post. I mustn’t have refreshed the thread correctly. I only use 8888 as that is what MAMP came pre-installed with. I didn’t realise that this shouldn’t be set to 8888 I thought you could use whatever you liked there?

    Is there a reason to use port 80 on a dev install then?

    Best wishes,

    Mark

  • #24 / Dec 12, 2007 12:27pm

    PXLated

    1800 posts

    I changed to port 80 simply because you don’t have to include a port number in the URL. So instead of localhost:8888 it’s simply localhost. I have several subfolders in MAMP for the various dev sites and by modifying the apache config and the hidden etc/hosts file you can get cleaner URLs… dev.site1/ ... dev.site2/ ... or even something closer to ones live environment.

    Edit-Add: Just realized when I installed Leopard it wiped out my ect/hosts file. Drats!
    Revised: The wonderful world of Archive/Install saved me.

  • #25 / Dec 12, 2007 3:10pm

    Mark Bowen

    12637 posts

    Hi Px,

    Ah I see now. I didn’t realise you could do that. Thanks for the tip. Have you managed to get this to work at all?

    Mark I have tried changing MAMP to port 80 but still no joy I’m afraid. It still re-directs me to the same place.

    Best wishes,

    Mark

  • #26 / Dec 12, 2007 3:12pm

    Mark Huot

    587 posts

    Huh, this is troubling because the redirect is correct. You are on a search page, where I set some fake $_POST vars and then EE should interpret those and show you the results. I’m having a tough time figuring out why EE isn’t seeing the posted vars correctly.

  • #27 / Dec 12, 2007 3:14pm

    Mark Bowen

    12637 posts

    Hi Mark,

    It isn’t actually taking me to the correct page though.

    If I go to :

    http://localhost:8888/ee/index.php/search/for/getting

    it takes me to :

    http://localhost:8888/index.php/search/for/getting/?ACT=19

    The ee bit is missing every time.

    Best wishes,

    Mark

  • #28 / Dec 12, 2007 3:16pm

    Mark Huot

    587 posts

    AHHHH I never caught on to that. Ok, this shouldn’t be to bad then. I’ll whip up a fix and get it back to you as soon as I can!

  • #29 / Dec 12, 2007 3:26pm

    Mark Bowen

    12637 posts

    Hi Mark,

    You are definitely the man!!! Thanks a lot.

    Looking forward to seeing this in action as I believe it is truly going to be brilliant!

    Best wishes,

    Mark

  • #30 / Dec 12, 2007 4:20pm

    PXLated

    1800 posts

    Mark B… Here’s a MAMP thread you may be interested in. I just updated it.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases