Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Originally posted by Choppaface
...also does anybody have a link to that 'double clickable' installer for mysql? I installed it a while ago to OS X and got lots of config warnings, but i never ran it so I never knew if it made a difference. i was wondering cuz this installer in question might have an OSX friendly config or something

It's in one of the articles I linked to above:
http://www.macdevcenter.com/pub/a/mac/2002/03/08/apache_mac_5.html?page=2

There is a compilable source there as well.
 
Originally posted by Rower_CPU


O'reilly has all the documentation I used for setting up PHP. It's simply a matter of uncommenting a couple of lines in the httpd.conf file for Apache.

OK, i'm resurrecting this not-quite-cold thread because I'm really, really dense. :D

Kishba has been kind enough to introduce me to PHP and MySQL, and I found out today that I can use them on my school servers, which means (hopefully) that I can recode some terribly complex websites that I manage and turn them over to the departments that they belong to.

The thing is, I want to learn how to use this stuff on my machine before have to upload stuff. SO... Rower, since you've figured it out, exactly which lines do I have to change in the Apache config file? Do you have the o'reilly link to the specific instructions (I can't find them on that site)? I've been at this all afternoon and am still at square one. :(
 
No prob, cleo.

This article show you which lines of the apache config file to modify:
http://www.macdevcenter.com/pub/a/mac/2002/01/04/apache_macosx_pt3.html

And this one walks you through the mysql setup/installation:
http://www.macdevcenter.com/pub/a/mac/2002/03/08/apache_mac_5.html

You may just want to go through them all, from the first one, just to familiarize yourself with the overall process, instead of just jumping in.

You'll learn a lot of really interesting stuff that's built into X!
 
isn't it amazing how simple users (which i used to be) switched from pc's to macs because they were less confusing... and now they're playing with linux-like config files and programming!

i love the mac and all apple has done for me... i've certainly expanded my skills in everything and my productivity is at an all-time high since i keep wanting to do more with my mac....

ain't it grand?
 
cool...

cool i have been wanting to use a database program for mac for a while now - i have been using asp with txt files as a database (ugh), damn osx rules!!!
 
I give up. I simply... give... up.

::Sigh:: Three hours with little to show for it. I got PHP running smoothly (thanks for the link, Rower!), but MySQL just has it out for me or something. I've tried installing it via package, via compiling, via binary distribution... two different builds... installing as root... and nada. It seems to have a massive problem with my mysql.sock in /tmp/, but the FAQ's aren't at all helpful (they say that the error message I receive when trying to start the server - 2002 - is because I already have an instance of mysql running and thus occupying the socket - but I most certainly do not!). I've given everybody permission to everything (well, just about ;)), and still no dice. I give up. Blah.

Unless someone here wants to help me....? :D
 
Weird. I haven't had any problems with installing it on X server or on X client.

Did you follow the directions for the double-clickable? Starting mysql, creating the user, etc?
 
Yup. And it runs just perfectly till I actually go to start the server.

[localhost:~] cleo% cd /usr/local/mysql
[localhost:/usr/local/mysql] cleo% sudo bin/safe_mysqld --user=mysql &
[1] 718
[localhost:/usr/local/mysql] cleo% Starting mysqld daemon with databases from /usr/local/mysql/data
020531 21:30:26 mysqld ended


[1] Done sudo bin/safe_mysqld --user=mysql
[localhost:/usr/local/mysql] cleo% mysql
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
[localhost:/usr/local/mysql] cleo%

Corresponding error log:
020531 21:30:25 mysqld started
020531 21:30:25 /usr/local/mysql/bin/mysqld: Can't create/write to file '/usr/local/mysql/data/localhost.pid' (Errcode: 13)
020531 21:30:26 /usr/local/mysql/bin/mysqld: Table 'mysql.host' doesn't exist
020531 21:30:26 /usr/local/mysql/bin/mysqld: Error on delete of '/usr/local/mysql/data/localhost.pid' (Errcode: 2)
020531 21:30:26 mysqld ended

I've chmod'ed absolutely everything to 777.
 
command line = bad

The fist time I tried to install php and mysql on os x it was with the command line. I failed when trying to connect to the database or start up the server and then gave up. Cleo, I would recommend visiting http://www.macosguru.de/us/download.html and download eSuite4xmySQl edition. It gives you a ten day trial, but more impotantly installs and configures mysql and php for you. I have had success doing this on 3 os x machines so far, without a single problem. Just make sure you set up a user named mysql first.
 
Re: command line = bad

Originally posted by macabre
The fist time I tried to install php and mysql on os x it was with the command line. I failed when trying to connect to the database or start up the server and then gave up. Cleo, I would recommend visiting http://www.macosguru.de/us/download.html and download eSuite4xmySQl edition. It gives you a ten day trial, but more impotantly installs and configures mysql and php for you. I have had success doing this on 3 os x machines so far, without a single problem. Just make sure you set up a user named mysql first.

Cool, thanks for the tip! Should I somehow try to remove the stuff I've already put on, first? And after the 10-day trial expires, is MySQL still functioning?
 
hmm.... i installed the double clickable thing on a clean install of X on my laptop and it worked perfectly... i can get to mysql with the terminal too... maybe something's up with your system?

::sigh:: i'm sorry this isn't working out too well... i can let you work with mysql & stuff off of kishba.com if you would like...
 
It's funny that you mention that you installed MySQL on a clean install of OS X. When I logged in as root yesterday, I noticed that everything seemed much snappier than it does under my normal login. I've also ben noticing a general slowdown of everything lately. I've run the Disk Utility that comes on the OS X CD, but it comes up clean. How difficult would it be for me to somehow start from scratch and wipe everything clean? I could easily back up my mp3's and other stuff in my Home folder. And, with 10.1.5 supposedly on the way, this would be a good time. What do you all think? How would I go about doing this?
 
What are your backup options? I'm not familiar with your system.

Do you have separate disks/partitions you can transfer files to?
Do you have a CD burner?
 
I'm on a G4 iMac 800, just 1 partition. I can easily backup mostly everything onto CD's... mp3's I'd just send over to my iBook temporarily via FireWire. So backup wouldn't be a big deal at all.

Is reinstalling a difficult thing to do? Would it be better to first try to defrag or something (although I don't have or know what ools I'd need for that, either)?
 
Re: Re: command line = bad

Originally posted by cleo


Cool, thanks for the tip! Should I somehow try to remove the stuff I've already put on, first? And after the 10-day trial expires, is MySQL still functioning?

I dont think you have to remove anything first, I didnt. After the trial MySQL works fine, its just the database manager software that expires. But you can work around that by temporarily setting you date back a year and then opening it. But thats not nice! Right now I am still trying to decide what software I like best, so I can say the ten day evaluation period was not long enough. I use the terminal mostly though. It helped when I was first learning to understand how to talk to the database.
 
Originally posted by cleo
I'm on a G4 iMac 800, just 1 partition. I can easily backup mostly everything onto CD's... mp3's I'd just send over to my iBook temporarily via FireWire. So backup wouldn't be a big deal at all.

Is reinstalling a difficult thing to do? Would it be better to first try to defrag or something (although I don't have or know what ools I'd need for that, either)?

Reinstalling isn't difficult to do, but if you've never done it, it can seem pretty daunting.

Backup your mp3s and other documents you may have on your machine. You may also want to back up your user folder, which contains many of your preference files, mailboxes, etc. OS X makes it very easy to backup and reinstall that way.

Once you're sure that you've backed everything up (double-check, I almost always find a file or two that I've foregotten), put the OS X install CD in and restart from CD by holding "c" down on startup (in case you didn't know).

Now you have some decisions to make. If you left the iMac the way it came from Apple (X and 9 on the same disk/parttion), you will just need to do a "clean install" of X. If you only have X on your drive, I would suggest reformmating the hard drive and then do a fresh install of X.

The process is fairly user firendly, in the usual Apple fashion, but certain terms and choices are not neccessarily obvious to someone who has never been through the process before.

I'm glad to help, so keep the questions coming. :)
 
wink wink, nudge nudge, say no more say no more
a winks as good as a nod to a blind bat....
oh, flying circus is so classic...i like british humour though....
monty python, douglass adams, terry pratchett....
maybe i should make a SQL batabase of all the cool british humour-ish stuff i find and then make a php page to acess it all then post the results on my web site....
or just sit back, laugh, and actually sleep sence school is almost out....
 
Originally posted by Rower_CPU



I'm glad to help, so keep the questions coming. :)

okay, a question for ya... (or anybody who can help... kishba, it sounds like you might be able to help with this too)

i've been going through the apache and terminal tutorials on macdevcenter.com, and have f**ked up a bit, i think.

in the terminal tutorial that teaches you how to activate SSI, I think i did something wrong.. and now apache won't start up. when i try, i get the message (in terminal) that:
"sudo apachectl start
Syntax error on line 1 of /etc/httpd/httpd.conf:
Invalid command '/etc/httpd/httpd.conf', perhaps mis-spelled or defined by a module not included in the server configuration
/usr/sbin/apachectl start: httpd could not be started"

AND I DIDN'T KEEP A BACKUP OF MY HTTPD.CONF

can anybody help? how do i begin to debug this without a backup?

macette xx
 
And also, how do i open a hidden file in BBEdit, like it says in the SSI tutorial? i opened my httpd.conf file in pico, because i could work out how to do it in BBEdit (even using the 'open hidden file' thing)

in fact, does anybody know of a good BBEdit tutorial or six on the web somewhere?
 
Originally posted by Macette
can anybody help? how do i begin to debug this without a backup?

macette xx

hmmm... i looked in my /etc/httpd folder and there are two older files called "httpd.conf.bak" and "httpd.conf.default" in there... maybe if you just rename one of those to "httpd.conf" (the command would be "cp httpd.conf.default httpd.conf") your problem would be fixed

you might have to fix php/mysql if they're broken, but it might be what you're looking for... as for BBEdit the "Open Hidden" works on my computer... i can see the linux folders such as "etc" by going to the root directory of the hard drive... you might want to check that you are logged in as an administrator (other than that i don't know what's wrong with the silly thing)

g'luck and if you continue to have some crappy problems post them, or e-mail me@kishba.com
 
ya I believe httpd.conf.bak is a backup copy of the default settings put there by the OS installation.

open hidden... works for me. you also might try getting Tinker Tool to reveal hidden items. that way you can see all the hidden folders and things right in the finder
 
What they said.:) Use your .bak file.

Also, if you're running the full version of BBEdit, you should be able to open files from the command line similar to the way you use pico. Just type "bbedit filename" and it should pop open...from what I've been told.
 
ah ha, the FULL version of BBEdit. i'm just running the demo - so that would be my problem (and the reason i had to use Pico last time)

thanks for your help.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.