PHP4 on Mac OS X 10.0 ???

nukeem247

Registered
Has anyone been able to get PHP to install on their OS X 10.0 machine yet. There used to be a .pkg created by Lightyear Design but it no longer works in OS X 10.0. If anyone has accomplish this please let me know how, I would like to get my webserver functioning the same as it did in the PB.
 

hotani

Registered
i installed 10.0 on top of public beta and everything still works; apache+mysql+php4....

I have heard php is included in 10.0 as a DSO module, which means all you have to do is enable it... I have never used php in this manner so I don't know how well that works...

my php4 was compiled into apache (one I downloaded, not the built in version) back when I only had darwin :)

 

Casey

Registered
PHP 4 is included with OS 10.0.... sort of.

/usr/libexec/httpd/ contains the DSO for Apache... and you can add the needed LoadModule, Addmodule, and AddType directives to /etc/httpd/httpd.conf. At this point the webserver tires to interpret PHP documents... but, mine at least, errors at the first line of every file (PHP error message). At first I thought it was a Mac line break issue... nope.

I'm curious why Apple included PHP... help system? It would be fun to get the included copy working rather than install an additional copy.

Various PHP support files are located at
/System/Library/PHP
/usr/lib/php

also note the tantalizing but poorly documented:
/usr/bin/php-config

any ideas?



 

Fragger

Lorem Ipsum
yeah.. I just added all the junk to the httpd.conf file and apache didn't want to do much about it. Here is what i added:

LoadModule php4_module libexec/httpd/libphp4.so
AddModule mod_php4.c

and much farther down

#
# And for PHP 4.x, use:
#
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

it seemed like the logical thing to do.. but it won't even attempt to execute the code when i request index.php... god save us all when one can't use php.

~graham~

----------------
g4 agp 2x450: 256: OSX 10.0
included apache package
cool hairdoo
----------------
 

Fragger

Lorem Ipsum
never mind i do get parse errors... stupid me. I don't know maybe 10.0.1 will solve some problems, I think i will go ask some apple forum guys about it however

graham
 

Fragger

Lorem Ipsum
yeah.. I just added all the junk to the httpd.conf file and apache didn't want to do much about it. Here is what i added:

LoadModule php4_module libexec/httpd/libphp4.so
AddModule mod_php4.c

and much farther down

#
# And for PHP 4.x, use:
#
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

it seemed like the logical thing to do.. but it won't even attempt to execute the code when i request index.php... god save us all when one can't use php.

~graham~

----------------
g4 agp 2x450: 256: OSX 10.0
included apache package
cool hairdoo
----------------
 

stovak

Registered
Did you restart apache after you added the mimetypes? Because I had literally NO PROBLEM with the stepwise article.... As far as I'm concerned they are the authority on all technical things MacOSX.
 

JohnMurden

Registered
Ccheck out: http://www.stepwise.com/Articles/WorkBench/2001-03-24.01.html
<br><br>
This worked great for me. You need to use Terminal some, but it isn't too difficult if you are new to it. A fast connection to the internet makes this easier, too.
<br><br>

tip: If you get to the part where you are editing the httpd.conf file and you can not save any changes, that means that your login doesn't have permission to do so. You will need to login as someone who can.
 

fleveneur

Registered
The previous URL does not work because workbench contains a capital.

This url should work:

http://www.stepwise.com/Articles/Workbench/2001-03-24.01.html

Let me know if you manage to install PHP correctly under osX 1.0.

 

Fragger

Lorem Ipsum
well.. thanks to stepwise i got it done last night.. I have to say the make took a damn long time though. So much for that .pkg someone had on his iDisk. Php now parses correctly but I haven't had a chance to test mysql. Thanks guys,

later,
graham
 

Casey

Registered
Your stepwire article talks about building PHP from scratch. I'm more interested in the copy of PHP that comes with every OS 10 install.

Am I the only one curious why Apple included the PHP DSO?

-cs-
 

Fragger

Lorem Ipsum
the osx php files don't do much.. trying to use php with those files yields nothing but parse errors; since osx in incomplete on a few minor levels i assume they intended to build in php but just didn't get around to it since they were rather busy working on dvd support. My guess is as good as anyone's ...
fragger
 

vic

RRRrrrRRRrrrRRrrr
i installed php the stepwiseway, but it still gave me :

Parse error: parse error in /Library/WebServer/Documents/php.php on line 5

why?
 

Fragger

Lorem Ipsum
did you make sure to enable php processing in httpd.conf? I wouldn't imagine that could be the cuase anyways... It worked fine with me.. all I can suggest is compiling and setting up apache 1.3.19; stepwise has instructions...

happy coding,
fragger
 

catneck

Registered
Originally posted by vic
i installed php the stepwiseway, but it still gave me :

Parse error: parse error in /Library/WebServer/Documents/php.php on line 5

why?
what's at line 5 of /Library/WebServer/Documents/php.php? looks like it's parsing the file and finding a php code error ..
 

Mikan

Registered
I've been through the full install from stepwise, gotten apache and php4 installed and working, and then about a little while of use, it suddenly stops accepting connections, I try to restart and it says okay, and still doens't accept connections, I stop it, and it says its not running. So I went and checked the apache error log and get the following error:

[Mon Apr 9 14:34:56 2001] [info] mod_unique_id: using ip addr 127.0.0.1
dyld: /usr/sbin/httpd Undefined symbols:
l_r_ex

Has anyone else gotten this error? Or have anything similar that might help me solve it? Getting somewhat desperate here, I need this working.
 

vic

RRRrrrRRRrrrRRrrr
yup i got something lie that and u know what i did? i reinstalled os x and erased everything else on my hd, thaen i procede to get cgi working, after i did so, i dloade the new apache the stewwise way. than i installed php and got it running with the help of gareth (ithink) from the apple website forum and his i disk, and macwrite, and stepwise , all in all, you have to full aroud a bit to get it woking for me it was about a weeck from when i got osx and about 6 to 8 houers a day of reading forums downloading and compiling and testing, writing perl and htmll pages so, good luck.
 

soachs

Registered
PHP to send form data is a no brainer but this issue has been scratching my head. On my Linux (Mandrake) box form email via PHP takes about a second to process then returns a thank you page. On OSX, the EXACT same php files take as long as 20-30 seconds. It does finally complete and send the data, and present the thank you page but it takes much longer.

I thought it might be that php was not using sendmail so I changd MAILSERVER=-NO- to MAILSERVER=-YES- in the etc/hostconfig file. No success.

Anyone have this problem, fix this problem, have any ideas?

TIA
 

Andrew Hill

Registered
Hi,

There is a HOWTO on getting PHP / apache installed (with the iODBC Driver Manager) on Mac OS X, at http://www.iodbc.org.

The iODBC Driver Manager allows you to drop in ODBC drivers, so you can use back-end data from local or remote relational databases in your PHP apps served from your OS X box.

HTH!

Best regards,
Andrew
--------------------------------------------
Andrew Hill - OpenLink Software
Directory of Technology Evangelism
Internet Data Integration Technology
http://www.openlinksw.com
 

TommyWillB

Registered
I did everything they said in the StepWise document, but either they left something out or I did something wrong.

They say that the PHP install is supposed to uutomatically add the LoadModule and AddModule lines into the the httpd.conf file, but it did not.

What do I add here?
 
Top