web serving (apache and php)

i found that if i just type 'apachectl start' the original apache will start up instead of the one i installed. and of course it will use all the old conf files, document root, and original configurations. to remedy this i start apache by either going into the /bin directory inside my apache directory and typing './apachectl start', or by just typing the entire path: '/usr/local/apache/bin/apachectl start'

 
oh yeah, this is because of the pathways setup in your user profile (i dont think you can change it from aqua, you have to use niutil or edit your profile script). One of the paths points to the directory that holds the original apache binaries. you can change this by editing(creating) a profile script that is read each time you start a new shell session.

i have not yet gotten around to doing this myself, and am using zsh instead of the default tcsh so the line i add will be a bit different - maybe i will go do that now and report back later ...
 
ok, edited my profile to include the new apache/bin directory - here is the line I added to my startup script (.zshrc):

path=(/bin /usr/bin /usr/local/apache/bin /sbin .)

it will be a different format for tcsh, but same idea. you can check paths by typing 'echo $PATH'

hope all this helps...
 
How do you know where to install mySQL and PHP in right path? Does it automatically install in right path for us?

I am dumb in unix.
 
MacFreak -

generally, you use the --prefix argument when configuring a program. for example, to set up apache (httpd) in a new folder at the top level called www, you would do something like this.

(while in the apache source/binary directory)
$ ./configure --prefix=/www

another usual one is

$ ./configure --prefix=/usr/local/apache

or some such thing. same with mysql and php. just go to the configure scripts (within the proper directory) and use the prefix argument.

when installing php with apache, you need to know the directory of where you are. you can always use the command 'pwd' to Print the Working Directory (where you currently are).

example:

my apache is in my root download folder which i made, so when i 'pwd' in that directory, it prints this out

$ pwd
/private/var/root/downloads/apache-1.3.12

so with php i would do this

$ ./configure --with-apache=/private/var/root/downloads/apache-1.3.12

and then add whatever else needs to be there.

hope this helps
 
I'm trying to follow your install HOWTO, which is somewhat similar to the Install PHP on Unix chapter in P. Dubois MySQL excellent book (New Riders).

The first problem I encounter is that issuing the "./configure" command returns me a "Command not found".

I'm logged in as root, my working dir is apache_1.3.12, and configure is x enable.

So where is the error ?
------
The Apache folder had been corrupted by StuffIt!
A new download, a clean gunzip and everything comes right.
configure script is executed.

By the way I had error -50 when StuffIt uncompress the tar file. Is it a bug ?

[Edited by dfour on 09-28-2000 at 06:00 AM]
 
i don't know what the -50 error is all about, but stuffit really likes those errors when trying to un(stuff/zip/tar) .gzip.tar files. i am sure it will be addressed at some point. until then, stick with gunzip and tar from the command line.
 
Thanks to yout precise "HOWTO" install Apache with PHP, all is now working on my G3.
I have just run the phhinfo function and get all the variables and configuration of PHP fine.

But, the CSS for the HTML page is for a Windoze platform and the layout is bad. Did you checked it. It's hardly readable.
Should we complain to Zeev ?

I have now to install MySQL.
 
I see that some of you have installed a new Apache server. Why isn't the standard one enough ?

Aside from PHP, is there anything else missing in the OS X PB version of Apache ?

Why is PHP so important ?
 
(in homer voice...) mmmmmmmm - php - aaaaaahhhhhhh.....

php does stuff that microsoft asp does, but cooler. and its not microsoft. and its free. and it has perlish syntax, with some javaish syntax as well. (another homer: mmmmmm, multiline comment.... ahhhhhh)

it can do the simplest stuff like redirects (frikkin fast!!! about 100 times faster than an html meta redirect!!), and includes (write one menu file and include it in all the pages).

as well as complex stuff like querying mySQL databases (and many other DBs as well...), filesystem functions (this is what i mainly use it for..) such as reading files in a directory and printing them to html output

the list goes on and on. PHP SHOULD be included with os X!!!

<a href=http://php.net>check it out...</a>
 
I need PHP to access MySQL database. It's the main strength of this scripting language. It runs server-side and is secure.

But I heavily use Javascript on the client-side for HTML layout and form validation. PHP and Javascript mix finely and have a very similar syntax (a la C) with object-oriented features.

Apache + PHP module + MySQL + Javascript + DHTML (+ XML) give you a very powerfull development environement.
 
Do you think it is stable enought???

I've finished to compile the mysql 3.22.32
(15hours to compile sql_yacc.cc! cool),
but it dont work better than your version.

I'd like to improve my ext_pthread.a but,
I dont want to break my HD by compiling
sql_yacc.cc again ;-)

*alex*
 
Originally posted by sollaires
/www/bin/apachectl start.
i am sure there is someway to make the installed apache start while booting, but this is beyond my knowledge. anyone else played with this?

Actuallly i do.
Instead of turning apache off in the /etc/hostconfig.
Edit the /System/Library/StartupItems/Apache/Apache script. In here you have to change it thus, that it cd's in the directory in which you installed it. and let it do ./apachectl start

Now test the script before you reboot
type cd /System/Library/StartupItems/Apache
./Apache
And check with the processviewer if it starts up.

Do not reboot when this didn't work, cause i already had a lot of trouble with MOSX not booting because of a broken startup script. I had to put the disk in my other (OS9) mac and edit the file from there. You don't want to experience that.

I don't garantuee a thing.
For the people who want to install a new Apache in the MOSX directory's go to this post.
 
I am curious if anyone has tried and/or succeeded in getting Postgres to work with OS-X?... Obviously MySQL has some *serious* problems for any real database sort-of work (which, respectfully do not seem to be apriority for the MySQL folks for some really strange reason..)...

It would be nice to have a database server for OS-X that is more then a fancy filesystem that can be queried...

- Greg
 
ok, so this is a little plug for my page. I thought it would fit in here since it uses what we have been discussing in this thread.

It is a freely downloadable php/apache web page template that has discussion forums, articles, and article connection to the discussions. Most of the work for it was done with Darwin, php4, and apache.

No DB required, the page uses flat files and is not meant for high traffic sites.

thats all.

http://ncaikido.org/hotani
 
Well, you're right! I also spent some time on
postgresql with the *same* success...
The standard dl library was replaced by a *dyld*
library that seems to do the same thing.
The port should be easier but I'm very late on my
job.
So I installed FrontBase that has php support,
and works on MacOS Xpb until I find some free time.

iPLouis


Originally posted by devnul
I am curious if anyone has tried and/or succeeded in getting Postgres to work with OS-X?... Obviously MySQL has some *serious* problems for any real database sort-of work (which, respectfully do not seem to be apriority for the MySQL folks for some really strange reason..)...

It would be nice to have a database server for OS-X that is more then a fancy filesystem that can be queried...

- Greg
 
Back
Top