Helpful Information
 
 
Category: Development Articles
Building Apache, MySQL, and PHP on Mac OS X

Found some problems in the article.

1) Compiling MySQL.
I received errors when compiling with the settings provided.
"make[1]: ***No rule to make target "myinit.c", by my.init.lo. Stop.
Make *** [install recursive] Error 1"

I tried turing off assembler and it did compile. Ideas.

2)Compiling PHP
Your artilce quotes the location of the perl fix file wrong.
"...BuildingOnOSX/... not "...BuildingOnMacOSX/..."
I figured it out and got the file. But I am unable to run it.
At my user prompt it tells me "permission denied"
Using sudo I get "command not found"
I confirmed the fix_php.pl exists and contains the code listed.
I confirmed that perl in in /usr/bin/.
Ideas.

General===================================
Thank you for providing clear instructions an reasons why you use certain commands. I not entirely frustrated. Actually, it seemded to be easier to do in the public beta than the final version. I am sure this can be worked out so more OSX users can build powerful servers.

Thanks in advance for the assistance.

Running ./configure without the --enable-assembler flag should work just fine - it's an option that I like to include when I compile.

I am wondering why it doesn't work on your machine, however. Are you trying this on Mac OS X 10.0.3?


As for the problem with fix_php.pl, I left out a step. You need to add execute permissions to the script before you can execute it.

Type the following:
chmod +x fix_php.pl

Also, make sure that the fix_php.pl script is in the PHP source directory - it should be if you followed the directions exactly.

I am using 10.0.3.
got the fix_php.pl to work and PHP4.0.5 up and running.

Seems like the auto startup mysql isn't working. Can't find mysql in processes list, although it shows up in the startup console.

Tried sudo safe_mysqld and after using admin level password get the following...

Starting mysql daemon from /usr/local/var.... (Good!)
10522 the time and mysqld ended... (Bad!)

My guess is that it has either something to do with the previous version I had installed or the permissions on the directory.

Ideas?

Thank you once again for your quick response. I know that perl script thing will send a lot of people scratching.

very good resource to point confused individuals to. Great job, devshed (and thanks macaddict for pointing it out).

Thank you foran ecellent and easy to follow article.

I had a problem with mysql though. After installation which seemed to go OK the command


% chown -R mysql /usr/local/var

gave the response...
Permission denied
Operation not permitted
The following command to start MySQL gave a command not found.

The following installations went well. Interestingly the php info page did not display using MSIE 5.1 but did using OmniWeb.

when I enter http://localhost/phpinfo.php into my browser, I get a connection failure occurred error.

-Running 10.0.3 on G4 500 (DHCP T1)
-Installations went smooth, and as described (except for MySQL: chown -R mysql /usr/local/var; permission denied)
-removed # from /etc/httpd/httpd.conf for ServerName localhost
-checked /etc/hosts file for localhost
-checked and restarted all applicable services

Any suggestions/ideas?

Thank you

Thanks for the instructions. What's the next project?

Where I found instructions to compile mod_ssl in Mac Os X?

Thanks.

was it

sudo /usr/local/bin/safe_mysqld &

that gave the command not found?

As for
chown -R mysql /usr/local/var

try

sudo chown -R mysql /usr/local/var

Okay, found my own issue - I noted port 80 wasn't being used. Looked in the httpd.conf file, default port set to 8080 - DNS tried resolving the name, hence unable to connect - changed the port to 80, and all's well

-Jack

Thanks for the great tutorial. I was struggling to get MySQL running till I read this.

I've gone through it OK (though first time I used Apache 1.3.20) and when it came to getting Apache running I get this error:

/usr/sbin/apachectl start
dyld: /usr/sbin/httpd Undefined symbols:
_ap_ctx_get
/usr/sbin/apachectl start: httpd could not be started

If I use the GUI tool in system preferences - rather than the command line - to turn it on it greys out and never comes back. That error gets written to the console.

OK, I thought, I wouldn't be quite so smart and would use 1.3.19 - just like in the tutorial but it gives the same error.

I have 10.0.3 on a G3 400.

I'm stumped trying to get the gd libraries to work with PHP.

Has anyone gone down this path?

Basically I'm having trouble getting gd to find libjpeg6b.

Yours,

Gus

<p><pre><font color=#008000><xmp>[localhost:/tmp/apache_1.3.19] levinson% /usr/sbin/apachectl start</xmp></font></pre><p>
<!-- Code -->
<p><pre><font color=#008000><xmp>Processing config directory: /private/etc/httpd/users
Processing config file: /private/etc/httpd/users/levinson.conf
Processing config file: /private/etc/httpd/users/levinson.conf~
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl start: httpd could not be started</xmp></font></pre><p>

Run it like this:
sudo /usr/sbin/apachectl start

or start it from the Sharing control panel and it will work.

this is great, until now the best explanations where at www.macosxhints.com and over at webmonkey, but they are still dated.

this is by the best I've seen and easy to understand.

Thank you

1 question,
any reason why you didn't build with apache 1.3.20?

I did it under stupidity and probably didn't configure it correctly, hehe, gonna re-do apache this week.

Also, it seems that some php scripts are having problems with php 4.0.5, just a small warning to older script users.

thanks alot

i think i followed all of the steps exactly as they were described in the tutorial but obviously i missed something. the problem that i am having is that when i try to view any pages i built with the php extension, the browser just downloads the page. this only happens on pages that are here on my computer. if i'm viewing a .php page at any site, it always works fine. did i miss something while configuring apache?

When I execute:
<br />
sudo chown -R mysql /usr/local/var
<br />

<br />
I get the following error:
<br />
chown: mysql: invalid user name
<br />

<br />
as far as I can see, the user is as it should be in NetInfo
<br />
Cn anybody help me?

ok, i retried compiling and installing the php portion and now it works fine. so..... nevermind. :)

I need help.

I've managed to use MacDNS successfully with AppleShare IP for years. Now I'm migrating to OS X Server and cannot figure out how to get my reconfigured db.domains and name.config files into their respective folders on the server (I don't know how to log in as a root user). Because of this, I cannot test my DNS settings to see if I did it right—which is doubtful.

Once I figure out the access thing, I need help (like a template or something) in setting up the zone files and mx records for our server. Can someone provide me with advise or a place I can go to and get some instructions?

In the mean time, I'm going to run MacDNS in the Classic environment—hopefully this will work.

Thanks.
Dan

ok call me thick (your thick!) but can someone tell me why you need to download apache, webDAV & php (mySQL I can understand) when Apple tells me that php & apache are already installed on os x.??

infact correction, I know apache is there, and I can see three bins with something to do with php already there...(php-config phpextdist phpize )

a dumb question I guess from a dumb question-er.










privacy (GDPR)