Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Install Geeklog on OS X 10.2 UNIX
Given that I run this site on Geeklog, and have been doing so for nearly two years, I figured it was time to publish a hint explaining how to install it on Mac OS X. The newest release of Geeklog (1.36) has some great features, and it will (soon) be making an appearance here. Here's how to get it running on your local OS X box.

The following hint assumes that you've already got both MySQL (configured with a user and password) and PHP running on your machine (visit Marc Liyanage's site if you don't; he's got the easiest instructions and packages that I've found anywhere). Although the Geeklog installation instructions explain all of the following steps, they can be more than a little confusing due to the folder structure of the Geeklog distribution.

This hint also assumes that you want to serve the Geeklog database out of the /Library -> WebServer -> Documents folder, and that you don't currently have another site running from that same directory (the install gets a bit more complicated if you have to use sub-folders). If you have an existing web site installed in that directory, you may overwrite some of its files during this installation (if they have the same name) -- consider yourself warned! Finally, it assumes you haven't done any fancy remapping of your localhost domain as it relies on "127.0.0.1" as the local IP address.

After downloading the source (geeklog-1.3.6.tar.gz), expand the .tgz file. Once exapnded, open the new Geeklog folder, and open another Finder window pointing to /Library/WebServer/Documents.

In the Geeklog folder, open the public_html folder and select all the files and drag them into the Documents folder. Now select everything at the top level of the Geeklog folder except for the public_html folder, and drag it to the /Library/WebServer folder.

Now you need to open the Terminal to issue a couple of commands. Launch MySQL by typing mysql at the prompt and then type create database geeklog; and hit Enter. This will create the initial blank database; you can name it whatever you like, but you'll need to remember the database name a bit later. Type exit to quit MySQL and return to the command line.

Before proceeding, you need to set some file permissions, so type these commands:
 % cd /Library/WebServer
% chmod -R 775 logs/
% chmod -R 775 Documents/backend/
% chmod -R 775 Documents/images/articles
% chmod -R 775 Documents/images/userphotos
The next step is to edit the config.php file in the /Library/WebServer folder (where you're Terminal should currently be sitting). You can use a GUI text editor for this, but make certain that it does not use Mac line breaks. BBEdit Lite or jEdit are good options; it may be easier to just edit it in the Terminal.

Once you have the config.php file open, you need to find the section with the definitions for $_DB_name, $_DB_user, and $_DB_pass. Enter the proper values for your database name ("geeklog" in this example), as well as the user name and password required to access your MySQL installation. Once edited, it should look something like this:
 $_DB_name         = 'geeklog';
$_DB_user = 'mysql_username';
$_DB_pass = 'db_password';
A little farther down the file you will come to the path definitions section. This is where 99% of Geeklog installations go bad, so read the following lines carefully. The first two path lines should look like this after you've edited them:
 $_CONF['path']              = '/Library/WebServer/';
$_CONF['path_html'] = $_CONF['path'] . '/Documents/';
A bit further down is the last path line, which needs to look like this:
 $_CONF['site_url']          = 'http://127.0.0.1';
You can also change your site slogan, email, etc., if you wish at this point. Save your changes and quit the editor. Type cd Documents to move into the actual HTML files, and then and open lib-common.php in your favorite UNIX text editor. Look for this line:
 require_once( '/path/to/geeklog/config.php' );
Change it to read:
 require_once( '/Library/WebServer/config.php' );
Save your changes and quit the editor.

That should be all the pre-configuration information that is required. Now just open your browser and point it to http://127.0.0.1/admin/install/install.php and follow the directions. When the install script finishes, make sure you follow the directions and delete the install.php program. If all went well, you should be greeted with the default Geeklog new installation screen when you load http://127.0.0.1/ in your browser. There's also a reasonably good set of HTML documentation in /Library -> WebServer -> docs, so give them a read if you get stuck.

Note: There may be a couple of minor omissions in the details of these instructions, but they shouldn't be material in nature. They have been "beta tested" with one user, and worked OK for that install. If you have any troubles, feel free to post a question and I'll try to answer it.
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[22,703 views]  

Install Geeklog on OS X 10.2 | 25 comments | Create New Account
Click here to return to the 'Install Geeklog on OS X 10.2' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Great hint
Authored by: 47ronin on Oct 07, '02 02:43:50AM

I'm currently running 1.3.5 on Jaguar.. but I plan to upgrade to 1.3.6 soon. I'm just not sure about a safe, efficient way of upgrading the custom pages and my data. I started with one included theme then changed the logos and a few static pages and icons..

Any advice? Oh, and since Jaguar includes a MySQL user with different permissions and no shell, I haven't been able to use a symbolic link to the mysql databases like with 10.1.5 ...I used to have my databases stored on a separate drive but now I'm forced to keep them on the system drive in /usr/local/mysql (in Jaguar you can't make a symbolic link be owned by the mysql user)



[ Reply to This | # ]
Great hint
Authored by: robg on Oct 08, '02 09:35:05PM

You wrote:

>>I'm just not sure about a safe, efficient way of upgrading the custom pages and my data. I started with one included theme then changed the logos and a few static pages and icons..

I would probably install the new version in its own directory, and then compare files and move things across as needed. You can install the new one in a "gl136" directory, for example, and then just look at both sites in your browser and move files in the Finder/Terminal as necessary.

-rob.



[ Reply to This | # ]
Geeklog
Authored by: area51 on Oct 08, '02 07:02:36PM

I just installed geeklog a few days ago for the first time and it worked flawlessly. I then installed it on another site and ran into some geeklog administration problems that were solved by adding a php.ini file (I can post more details if anyone wants to know).

However, I was wondering if you could (if and when you get a chance) post some hints on how to hack/modify geeklog. I like how the maxosxhints site looks better than any of the preconfigured layouts that come with geeklog. The problem is there seems to be too many files and images in too many places that need to be modified.



[ Reply to This | # ]
Geeklog Problem with php.ini
Authored by: Terbor on Oct 08, '02 08:17:52PM
I am having the same problem with the php.ini file. Specifically:
Warning: You have register_globals = Off in your php.ini. However, Geeklog requires register_globals to be on. Before you continue, please set it to on and restart your web server.
What did you do?

[ Reply to This | # ]
Answer to: Geeklog Problem with php.ini
Authored by: Terbor on Oct 08, '02 08:24:44PM

Nevermind, I figured it out

add a directory /usr/local/lib
now add a file php.ini that includes the following line;

register_globals = On

save the file and restart your webserver with: sudo apachectl graceful



[ Reply to This | # ]
Modifying Geeklog...
Authored by: robg on Oct 09, '02 12:58:03AM

Unfortunately, my hints are not much help as they are all focused on GL 1.1, which had a MUCH different structure! In GL 1.36, most modifications are easier - work in the "Themes" directory. You can add custom PHP functions in lib-custom, but I still find that I need to hack the source to get certain things the way I want them to be...

Maybe once I'm done modifying GL 1.36 for the new macosxhints roll-out I can post some of the stuff I did...

-rob.



[ Reply to This | # ]
Problem with install
Authored by: jwyoung5 on Oct 08, '02 09:33:49PM

When I click the 'Next' button on the first web page i.e "http://192.168.1.100/admin/install/install.php", I get this message:

Parse error: parse error, unexpected ':' in /Library/WebServer/config.php on line 68

Fatal error: Failed opening required 'databases/.class.php' (include_path='.:/usr/local/lib/php') in /Library/WebServer/system/lib-database.php on line 105


I had to add the php.ini file mentioned above. Anyone have an idea as to what I'm missing?
Thanks, john



[ Reply to This | # ]
Problem with install-fixed
Authored by: jwyoung5 on Oct 08, '02 09:42:30PM

Sorry. An extra space crept into the config.php file and uncommented a line. All fixed now.



[ Reply to This | # ]
Similar problem with install
Authored by: aschmidtm on Jan 03, '03 01:48:19PM
I keep getting-
Warning: fopen("/Library/WebServer/logs/error.log", "a") -
Permission denied in
/Library/WebServer/Documents/lib-common.php on line 1424

[ Reply to This | # ]
Similar problem with install
Authored by: robg on Jan 03, '03 09:19:31PM

Make sure you read the install.html page regarding the "chmod" commands for the log directory. You may have to use "777" permissions to get it to work...

-rob.



[ Reply to This | # ]
Can't post comments or submit stories
Authored by: john_e on Oct 09, '02 08:45:44AM

Hi. Everything went smoothly until I ran into a wall. As an Admin user I can post stories but not make comments. As a normal user I can't do anything - neither submit stories or make comments.
I've done some things suggested to me like disabling enctype="multipart/blawhatever" and also checked in php.ini to make sure that register_globals is On. It is.

Also went through permissions on all files etc and after a while set all to be owned by www:www instead of www:staff, so now I can't edit them as easily. I'll probably set the permissions back though, since it didn't help.

Strange that I can post articles as Admin but NOT make comments. A normal user can get rights to post if I include him in such a group, but normally User posting should be submitted for reviewing right. Well, nothing at ALL gets posted.
No comments for ANYONE.

This is really frustrating and I can't understand what's wrong. I've went through the config-files several times, but can't find anything wrong.

Please, could someone help?

/John



[ Reply to This | # ]
Hmm...
Authored by: robg on Oct 09, '02 10:05:15AM
I just double-checked and my install is working fine for all users in both comments and stories. I'd recommend two routes for better help than I can provide: 1) The Geeklog IRC channel (Geeklog on OpenNet); the devs hang out there fairly regularly and are usually pretty good about helping out (just be nice with the question ;-). 2) Post a story on geeklog.sourceforge.net explaining the problem and then check back for comments. -rob.

[ Reply to This | # ]
Fixed it
Authored by: john_e on Oct 09, '02 05:25:42PM

The problem was that I had made my own language-file, with special characters in button names. Geeklog is flawed in the way it depends on the names on buttons. Since GET/POST smashed special characters to pieces geeklog doesn't know what to do, since it compares it with the language file.

So, for everyone creating their own language-files: Don't use special characters in buttons(what is displayed in the button).

/John



[ Reply to This | # ]
SQL error
Authored by: michno on Oct 09, '02 09:11:35AM

Having followed the hint to install Geeklog, the install.php-file gives the following error in the third screen:

1050: Table 'gl_access' already exists

I have created the (empty) geeklog database as instructed. Anybody know what's wrong?



[ Reply to This | # ]
database not empty...
Authored by: robg on Oct 09, '02 10:01:28AM

It seems the GL database isn't empty -- take a look at it with phpmyadmin or the mysql command line interface ... if there are tables in there, you can just drop the database and re-create it.

-rob.



[ Reply to This | # ]
geeklog
Authored by: guillemain on Oct 13, '02 09:21:06AM

I followed the instructions and get to the third point where I get

1062: Duplicate entry '1-3' for key 1

I droped the geeklog database and create a new one, many times, it does not
help, I always get to this point of the install with the browser .

Any help ?



[ Reply to This | # ]
Problem w/ install.php
Authored by: incanus555 on Dec 16, '02 12:47:32PM

During install, after the second step, I get an error:

Warning: Access denied for user: 'mysql@localhost' (Using password: YES) in /Library/WebServer/system/databases/mysql.class.php on line 104

Warning: MySQL Connection Failed: Access denied for user: 'mysql@localhost' (Using password: YES) in /Library/WebServer/system/databases/mysql.class.php on line 104
Cannnot connect to DB server

Can anyone help?

Thanks!



[ Reply to This | # ]
Problem w/ install.php
Authored by: robg on Dec 31, '02 06:10:46PM

The username and password entered in your config.php are not correct -- you need to make sure they match what you use at the command line to get into mysql...

-rob.



[ Reply to This | # ]
geeklog install
Authored by: strachan on Feb 02, '03 09:40:13PM

$_DB_user = 'mysql_username';
$_DB_pass = 'db_password';

Need to be what? is it the root, or my username & pass (like the login) or is it the mysql username & password?

The only username & password I set for mysql is the root@localhost per Marc L. instructions on install. (I haven't gotten into setting the other permissions yet). I can open a terminal and type 'mysql' and be at the mysql prompt. I'm running Jaguar 10.2.3

I'm a super newbie for serving anything so be kind :-)


Thanks



[ Reply to This | # ]
Error
Authored by: ckier on Feb 10, '03 03:26:00PM
When I try to finish running the installer script I get the following error:

error selecting database

What should I do?

Thanks in advance,
Christopher Kiernan



[ Reply to This | # ]
Error
Authored by: ckier on Feb 10, '03 03:37:07PM

Nevr mind I solved this problem.



[ Reply to This | # ]
Install Geeklog on OS X 10.2
Authored by: strachan on Feb 17, '03 02:51:18PM

Hey

Thanks for turning me onto such a time waster! :-)

I'm learning the serve my own web pages and using geeklog is one way to admin a dynamic site.

Right now I've got two different CMS' (geeklog & tikiweb) running on my TiBook (so I can learn). I use phpMyAdmin for my mysql databases.

Anyway, can you talk about the security issues of using OS X, php, apache, & geeklog? Such as what settings, owners, group, (of the files/directory) etc. should be? What to look for, what to watch out for, etc? How would the settings need to be changed if you were serving from a host or from home like me? Would these settings still be valid if you were serving from another pltaform?

Right now, I have all files/directories in 'WebServer/Documents/' owned by www, group by admin.

Btw, after updating to OSX 10.2.4 'WebServer/Documents/' is owned by root and can't be written too.



[ Reply to This | # ]
Install Geeklog on OS X 10.2
Authored by: robg on Feb 18, '03 01:28:50AM
Hmm, that's not really my area of expertise! I rely on my site admin for the hosted site, and my router and firewall for sites served at home. You might try asking on the Geeklog site, though they won't be much help on the Mac side of the question...

-rob.

[ Reply to This | # ]
Install Geeklog on OS X 10.2
Authored by: ruebenschuss on Apr 10, '03 09:25:35AM

Hi there,

I got GL installed pretty easy on my Apple TiBook running OS 10.2 and
like it quite a lot.

I have some difficulties with email though: First, nothing worked and
users could not receive their first password. Then I configured and
started the OS X built-in SMTP and this did the job. Everything worked
fine.

But now I am concerned about having an open SMPT-Server running on
my machine and I tried to restrict access to it to prevent abuse. This
crashed the SMTP and I couldn't reanimate it yet.

My question is: Do I really really need to run the SMPT-Server on my
machine? I set up an other GL-Site on Windows and just put the SMTP of
my ISP in the php.ini. Unfortunally this did NOT work on OS X.

Any suggestions? Any help would be appreciated.



[ Reply to This | # ]
Install Geeklog on OS X 10.2
Authored by: kenbotwinick on Nov 09, '03 10:53:31AM

Hi,

I'm looking to hear from anyone that is trying to host their home page on their home mac using Geeklog.

I get an average 5 second page creation time with a default install of 1.3.8-1sr2 using Complete Apache 2 2.0.47, Complete MySQL 4.0.15, Complete PHP 4.3.2r2 on a 400Mhz G4 Mac OS X 10.3 machine with 640Mb of RAM.

Is this all I can expect with my hardware? Is there any customization I need to do to improve this? Are there any PHP acceleration packages for OS X?

Thanks for any info.

KenBotwinick@mac.com



[ Reply to This | # ]