Fixing quirks with s9y on the Mac

[Related to: Use Mac as a Web Server]

Two issues may come up after installing s9y on the Mac.

1. Quicksearch Error

Attempt a search on the Quicksearch box and you may get this:
The search function did not work as expected. Notice for the administrator of this blog: This may happen because of missing index keys in your database. On MySQL systems your database user account needs to be privileged to execute this query:

CREATE FULLTEXT INDEX entry_idx on serendipity_entries (title,body,extended)

The specific error returned by the database was...

That's because the query was not run and the 'Fulltext Index' is not available. Time to pay Terminal a visit.

/usr/local/mysql/bin/mysql -u root -p
CREATE FULLTEXT INDEX entry_idx on serendipity_entries (title,body,extended)

Put your passwords in when asked, and just execute the query as root account as seen above. This should be all that's needed to have the quicksearch function working. Oh, and if somehow the database type is InnoDB instead of MyISAM for you, this will cause an error because Fulltext Index isn't supported on InnoDB. You need to convert the DB type first.

2. URL Rewriting Not Working

This one was a bit of a stumper, but it turned out to be Mac OS X's default Apache installation configuration issue. URL rewriting (s9y Administration - Configuration - Appearance and Options - URL Rewriting) gets you this nicely formed URL that gets rid of the index.php?/ blah blah. I checked to make sure that the mod_rewrite function was enabled on the Apache configuration file, so it was strange when enabling 'Use Apache mod_rewrite' option here didn't work.

Apparently, I needed to change this in the Apache configuration file (/etc/httpd/httpd.conf):
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
AllowOverride None

Open with something like Smultron and do searching for 'AllowOverride'. This is the second 'AllowOverride' option you'll come across the file. Do not touch the first one. The 'None' option needs to be changed to 'All' so that the .htaccess rules can work and thus s9y's mod_rewrite rules defined in .htaccess will work, too. Save the file after changing. You may get Authentication dialog box - enter your admin password to finish saving.

Restart the Apache server. Go to System Preferences - Sharing - Personal Web Sharing and press Stop. Then press Start shortly after. Now go back to the URL Rewrite menu and try the Use Apache mod_rewrite option. Press Check & Save. Pages should load without problems. The old URLs should still work, but the newer, simpler URLs should be the default now.


Trackback specific URI for this entry

This link is not meant to be clicked. It contains the trackback URI for this entry. You can use this URI to send ping- & trackbacks from your own blog to this entry. To copy the link, right click and select "Copy Shortcut" in Internet Explorer or "Copy Link Location" in Mozilla.

No Trackbacks


Display comments as Linear | Threaded

Sylvie on :

Hey, you just saved my life !

I got the very same problem on an old install, and that did the trick, thanks !
  • Link

  • Warning: Undefined array key "is_entry_owner" in /Users/Wes/Website/Documents/blog/templates_c/next_toolbox/50/11/8a/50118ab468ecea5f9b44a283f14ab4f275c0b22d_0.file.comments.tpl.php on line 81
  • Reply

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

Copyright (C) 1996-2023 Woo-Duk Chung (Wesley Woo-Duk Hwang-Chung). All rights reserved.