Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > builing php 4.0.5

builing php 4.0.5
Thread Tools
Cotton
Dedicated MacNNer
Join Date: Oct 1999
Location: sleep deprivation is fun!
Status: Offline
Reply With Quote
May 1, 2001, 07:10 PM
 
hi all,

i'm just having a little trouble installing the new php distro. configure goes fine, but it fails on make. here are the last few lines:

-DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c internal_functions.c
internal_functions.c:32: `#include' expects "FILENAME" or <FILENAME>
make[2]: *** [internal_functions.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

any ideas to let this build? this is on 10.0.2, btw... thanks,

cotton
     
David R
Junior Member
Join Date: Mar 2000
Status: Offline
Reply With Quote
May 1, 2001, 07:33 PM
 
I don't have an answer for you but I wanted to let you know that I have the exact same problem - same error. At least we now know it's not just an individual problem, but a problem with the distribution and OSX.

My eternal gratitude to whoever can solve this problem!
     
dogzilla
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status: Offline
Reply With Quote
May 1, 2001, 08:28 PM
 
I'm also seeing the same problem. Grabbed a copy of 4.0.4pl1 that I had kicking around, untarred and did the pear fix, and installed with only apxs and mysql. httpd won't start, something about missing compression symbols.

I canned all the original httpd files and rebuilt apache 1.3.19 from source. It compiles cleanly and installs, then refuses to serve pages and hangs terminal app when I try to kill it. Ugly.

I can't get PHP working with Apache now. Any suggestions would be greatly appreciated. I'm beating on this problem for the evening.
     
dogzilla
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status: Offline
Reply With Quote
May 1, 2001, 08:31 PM
 
Oh, and for what it's worth, I also saw the same problem under 10.0.1, so it's not Apple's update.

On the bright side, it looks like PHP has made a bunch of changes to the PDF code, so maybe we have hope of getting that working once this prob is resolved.
     
David R
Junior Member
Join Date: Mar 2000
Status: Offline
Reply With Quote
May 1, 2001, 08:59 PM
 
I got 4.0.4pl1 from the binaries for OS X I found on a website. It's working great on my system after some tweaking with the httpd.conf

I am just trying to get 4.0.5 compiled from scratch as a learning process for me. I'm emailing back and forth with someone who may be able to help me. I will post the steps once, and if, 4.0.5 compiles successfully.
     
dogzilla
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status: Offline
Reply With Quote
May 1, 2001, 10:06 PM
 
Originally posted by David R:
I got 4.0.4pl1 from the binaries for OS X I found on a website. It's working great on my system after some tweaking with the httpd.conf.
What's the URL? Does it have MySQL support? I thought there were a ton of these, but I can't find any now.
I am just trying to get 4.0.5 compiled from scratch as a learning process for me. I'm emailing back and forth with someone who may be able to help me. I will post the steps once, and if, 4.0.5 compiles successfully.
Please do.
     
David R
Junior Member
Join Date: Mar 2000
Status: Offline
Reply With Quote
May 1, 2001, 10:16 PM
 
You can find the binaries for 4.0.4pl1 (ie. the previous version) here http://homepage.mac.com/olav/FileSharing.html
     
dogzilla
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status: Offline
Reply With Quote
May 1, 2001, 11:14 PM
 
DavidR - thanks, but I think I may have found a solution to building 4.0.5. Check out http://www.stepwise.com/Articles/Wor...-03-24.01.html (if this link doesn't work, it's the first article at stepwise. But there still seems to be a bit of a problem with the file he gives. At line 32, of the internal_functions.c file that he provides, I noticed a run-on of includes, but this may have just been my file, or he may have fixed since as I can't notice it anymore in TextEdit or pico.

Anyway, try it. I'm compiling right now, so we'll see what happens.
     
David R
Junior Member
Join Date: Mar 2000
Status: Offline
Reply With Quote
May 1, 2001, 11:42 PM
 
Let me know if you get it to compile. I followed the instructions and I ended up stuck on the same step with the same error!
     
dogzilla
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status: Offline
Reply With Quote
May 2, 2001, 12:02 AM
 
Originally posted by David R:
Let me know if you get it to compile. I followed the instructions and I ended up stuck on the same step with the same error!
Which error? the undefined symbols when starting apache or the "Include expects file" error? If it's the latter, I can send you my modified internal_functions.c which seemed to get me past this issue.
     
David R
Junior Member
Join Date: Mar 2000
Status: Offline
Reply With Quote
May 2, 2001, 12:10 AM
 
The include problem. I followed the steps, which included downloading the corrected file, but it didn't seem to do anything for me...

If you'd like to try emailing it to me, my address is david AT renteria DOT net
     
Cotton  (op)
Dedicated MacNNer
Join Date: Oct 1999
Location: sleep deprivation is fun!
Status: Offline
Reply With Quote
May 2, 2001, 12:13 AM
 
what did you change in internal_functions.c? this line (32)?:

#include "ext/mysql/php_mysql.h"n#include "ext/pcre/php_pcre.h"n#include "ext/posix/php_posix.h"n#include "ext/session/mod_mm.h"n#include "ext/session/php_session.h"n#include "ext/standard/php_standard.h"n#include "ext/xml/php_xml.h"n

what did you change? you can reply or email me... thanks!
     
Cotton  (op)
Dedicated MacNNer
Join Date: Oct 1999
Location: sleep deprivation is fun!
Status: Offline
Reply With Quote
May 2, 2001, 12:18 AM
 
what did you change in internal_functions.c? this line (32)?:

#include "ext/mysql/php_mysql.h"n#include "ext/pcre/php_pcre.h"n#include "ext/posix/php_posix.h"n#include "ext/session/mod_mm.h"n#include "ext/session/php_session.h"n#include "ext/standard/php_standard.h"n#include "ext/xml/php_xml.h"n

what did you change? you can reply or email me... thanks!
     
dogzilla
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status: Offline
Reply With Quote
May 2, 2001, 12:20 AM
 
Originally posted by Cotton:
what did you change in internal_functions.c? this line (32)?:

#include "ext/mysql/php_mysql.h"n#include "ext/pcre/php_pcre.h"n#include "ext/posix/php_posix.h"n#include "ext/session/mod_mm.h"n#include "ext/session/php_session.h"n#include "ext/standard/php_standard.h"n#include "ext/xml/php_xml.h"n

what did you change? you can reply or email me... thanks!
Change the above line to look like this:

#include "ext/mysql/php_mysql.h"
#include "ext/pcre/php_pcre.h"
#include "ext/posix/php_posix.h"
#include "ext/session/mod_mm.h"
#include "ext/session/php_session.h"
#include "ext/standard/php_standard.h"
#include "ext/xml/php_xml.h"

Don't forget to remove that last trailing "n". Basically, all those "n"s should be return characters.

If this works for you guys, please let me know. I was able to compile, but then got undefined symbol errors when I started apache with PHP loaded. However, I may have fscked my apache libs, because I also get this using the 4.0.4pl1 binary that DavidR posted above. I'm trying an install over my existing 10.0.2 - yeah, I'm living on the edge (of Houston).
     
David R
Junior Member
Join Date: Mar 2000
Status: Offline
Reply With Quote
May 2, 2001, 12:29 AM
 
(edit - I ended up posting the same info as dogzilla, he was just faster than me!)

[This message has been edited by David R (edited 05-02-2001).]
     
Cotton  (op)
Dedicated MacNNer
Join Date: Oct 1999
Location: sleep deprivation is fun!
Status: Offline
Reply With Quote
May 2, 2001, 12:46 AM
 
it's working! thanks, guys... i'll let you know if it works w/ my new apache 1.3.19 installation.
     
David R
Junior Member
Join Date: Mar 2000
Status: Offline
Reply With Quote
May 2, 2001, 12:47 AM
 
YES! Everything is working properly. PHP4.0.5 is running fine under 0S X 10.0.2

Check out the info at: http://silver.renteria.net/phpinfo.php
     
dogzilla
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status: Offline
Reply With Quote
May 2, 2001, 12:50 AM
 
Originally posted by David R:
(edit - I ended up posting the same info as dogzilla, he was just faster than me!)

[This message has been edited by David R (edited 05-02-2001).]
LOL! Anyway, here's my resolution:

No matter what I did, I was still getting the undefined symbol errors whenever I loaded php. So, as I was backing up my user folders prior to resintalling OSX, I noticed an old PHP sit file I had created a while back and decided to give it a shot. Lo and behold, it works fine. This is PHP4.0.4pl1, built with the MySQL, XML, GD (image creation), and TTF (font support in the image creation), as well as the required support libraries. I'd put this aside because I had wanted PDF and Ming support, but thank god for 20gb HDs - this gives me everything I need for now.

I'm still interested in 4.0.5 as it includes better support for PDF creation and ming support is rolled in, both of which I'd really like in addition to imap/pop. I'm wondering if the problem I was seeing was related to the --with-mysql=/usr/local switch I was using. Maybe removing the path makes a difference.

At any rate, if anyone else wants my PHP build, I can email the sit file (no fancy dmg files for me). Drop me a line at [email protected] if you want it, or if you manage to get 4.0.5 working.

One last thing: thanks to all of you for the contributions. I was beginnig to lose faith in the Mac community after all the ranting and whining I read on the "General" board. The give and take we just had here is what I come to these boards for. Thanks all!
     
Cotton  (op)
Dedicated MacNNer
Join Date: Oct 1999
Location: sleep deprivation is fun!
Status: Offline
Reply With Quote
May 2, 2001, 01:05 AM
 
hey, check mine, too!!

http://cottonlt.homeip.net/phpinfo.php

[This message has been edited by Cotton (edited 05-02-2001).]
     
David R
Junior Member
Join Date: Mar 2000
Status: Offline
Reply With Quote
May 2, 2001, 01:07 AM
 
Like I posted above, I got 4.0.5 up and running successfully.

You do not need to add --with-mysql to do the configure because it's already included by default. So maybe you'll have less problems if you don't even mention it.

Well, it's late. I gotta work tomorrow. And I'll have to play with PHP some more tomorrow. PHP is awesome! Goodnight everyone! I'll check back here tomorrow.
     
dogzilla
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status: Offline
Reply With Quote
May 2, 2001, 09:11 AM
 
Originally posted by David R:
You do not need to add --with-mysql to do the configure because it's already included by default. So maybe you'll have less problems if you don't even mention it.
You're absolutely right. This was the problem. All better now and running on my system - but I've gone back to 4.0.4pl1 which has more functionality for me. I'll try adding GD etc. into 4.0.5 later.
     
matt_cecil
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Brookings, SD
Status: Offline
Reply With Quote
May 3, 2001, 01:26 PM
 
This was very helpful. Just to review, in order to install 4.05, you must:

1. Obtain the source from php.net
2. Run ./configure as usual, minus the enable mySQL command (since it's a default)
3. Edit main/internal_functions.c as described above to replace certain n's with returns.
4. Make
5. Make install

Worked for me on two computers so far. No problems if you follow those instructions. Thanks to everybody who posted for all the help.

     
timster
Dedicated MacNNer
Join Date: Oct 2000
Location: Washington, DC
Status: Offline
Reply With Quote
May 3, 2001, 01:53 PM
 
Just wanted to let you all know that PHP developers are aware of and have fixed this problem. I worked with a PHP developer last night who was taking care of this bug, and using the latest daily build of PHP, I was able to compile successfully on OSX without any need to patch anything.

The next released update of PHP should compile fine on OSX without any problems.

     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:57 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,