Entropy.ch Discussion Forums Forum Index Entropy.ch Discussion Forums
Discussion forums about Mac OS X software development.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Universal Binary PHP5 Package 5.1.4-5
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Entropy.ch Discussion Forums Forum Index -> PHP on Mac OS X
View previous topic :: View next topic  
Author Message
liyanage
Site Admin


Joined: 22 May 2003
Posts: 1104
Location: Zurich, Switzerland

PostPosted: Sat May 20, 2006 23:15    Post subject: Universal Binary PHP5 Package 5.1.4-5 Reply with quote

Here's a new release of the PHP5 Universal Binary package based on PHP 5.1.4.

http://www2.entropy.ch/download/entropy-php-5.1.4-5.tar.gz

The new release adds support for two extensions, JSON and BCMath.


There is also a build for Apache 2 installed into /opt/apache2:

http://www2.entropy.ch/download/entropy-php-5.1.4-5-apache2.tar.gz

This can be either the Apache 2 version supplied by Apple on Mac OS X Server or one compiled according to the instructions at

http://www.entropy.ch/blog/2006/05/12/Universal-Binary-Apache-2-configure-Line.html

(you might have to try /usr/local/apache2 as value for --prefix=)

Note that the Apache 2 version will display an error message at the end of the install process, you can ignore that message. You will have to arrange for it to be loaded into Apache yourself, i.e. edit the /opt/apache2/conf/httpd.conf file by including this line:

Code:
Include /usr/local/php5/entropy-php.conf


Make sure that “Web Sharing” is disabled in the Sharing control panel.

Before you post to the forum with any issues, please read the important information about these new packages in these previous threads:

http://www.entropy.ch/phpbb2/viewtopic.php?t=2295
http://www.entropy.ch/phpbb2/viewtopic.php?t=2296
http://www.entropy.ch/phpbb2/viewtopic.php?t=2301


Last edited by liyanage on Wed Sep 20, 2006 21:24; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
kooshball



Joined: 18 May 2006
Posts: 7

PostPosted: Sun May 21, 2006 19:02    Post subject: Unable to download Reply with quote

Mark,

I get the following error when clicking either *.gz:

Not Found
The requested URL /download/entropy-php-5.1.4-5-apache2.mpkg.tar.gz was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
liyanage
Site Admin


Joined: 22 May 2003
Posts: 1104
Location: Zurich, Switzerland

PostPosted: Sun May 21, 2006 22:27    Post subject: Reply with quote

Sorry, copy/paste mistake with the links, they're fixed now.

Let me know if these packages work, I had to build them under, uhh, special circumstances Smile
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
kooshball



Joined: 18 May 2006
Posts: 7

PostPosted: Tue May 23, 2006 4:03    Post subject: unable to start apache Reply with quote

Mark,

After downloading and installing PHP, I get the following error:

httpd: Syntax error on line 464 of /usr/local/apache2/conf/httpd.conf: Syntax error on line 8 of /usr/local/php5/entropy-php.conf: Cannot load /usr/local/php5/libphp5.so into server: Symbol not found: _ap_unblock_alarms\n Referenced from: /usr/local/php5/libphp5.so\n Expected in: /opt/apache2/bin/httpd\n
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
kooshball



Joined: 18 May 2006
Posts: 7

PostPosted: Tue May 23, 2006 17:16    Post subject: Reply with quote

What I meant by
Quote:
After downloading and installing PHP
is the file:
entropy-php-5.1.4-5-apache2.tar.gz
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
liyanage
Site Admin


Joined: 22 May 2003
Posts: 1104
Location: Zurich, Switzerland

PostPosted: Tue May 23, 2006 18:42    Post subject: Reply with quote

It looks like you are using some apache2 in /usr/local/apache2, but you need one in /opt/apache2, as mentioned in my posting.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
kooshball



Joined: 18 May 2006
Posts: 7

PostPosted: Wed May 24, 2006 3:39    Post subject: still not working Reply with quote

Marc,

I still am unable to start apache2 with your PHP configuration. Still get the error message
Symbol not found: _ap_unblock_alarms\n Referenced from: /usr/local/php5/libphp5.so\n Expected in: /opt/apache2/bin/httpd Embarassed
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
liyanage
Site Admin


Joined: 22 May 2003
Posts: 1104
Location: Zurich, Switzerland

PostPosted: Wed May 24, 2006 6:43    Post subject: Reply with quote

Try to rebuild and reinstall Apache 2 *exactly* like described here:

http://www.entropy.ch/blog/Mac+OS+X/2006/05/12/Universal-Binary-Apache-2-configure-Line.html

That is the installation I used to build the PHP package.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
kooshball



Joined: 18 May 2006
Posts: 7

PostPosted: Thu May 25, 2006 2:38    Post subject: apache2 configuration error Reply with quote

Marc,

Quote:
Try to rebuild and reinstall Apache 2 *exactly* like described here:

http://www.entropy.ch/blog/Mac+OS+X/2006/05/12/Universal-Binary-Apache-2-configure-Line.html


After installing Xcode version 2.2.1 so that I get the Universal SDK, I get the following configuration error in the config.log file:

gcc version 4.0.1 (Apple Computer, Inc. build 5250)
configure:3508: $? = 0
configure:3510: gcc -V </dev/null >&5
gcc: argument to `-V' is missing
configure:3513: $? = 1
configure:3536: checking for C compiler default output file name
configure:3539: gcc -arch ppc -arch i386 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -L/usr/local/apache2/lib conftest.c >&5
/usr/bin/ld: for architecture i386
/usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: Undefined symbols:
___keymgr_dwarf2_register_sections
__cthread_init_routine
_atexit
_errno
_exit
_mach_init_routine
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccje7znS.out (No such file or directory)
configure:3542: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3581: error: C compiler cannot create executables
See `config.log' for more details.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
liyanage
Site Admin


Joined: 22 May 2003
Posts: 1104
Location: Zurich, Switzerland

PostPosted: Thu May 25, 2006 10:23    Post subject: Reply with quote

Oh I guess my instructions assume that you are building on an Intel Mac... There are ways around that on a PPC Mac, the involve the "-isyslib" option, but I don't have time to figure it out for you right now.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
john the artist



Joined: 24 Apr 2004
Posts: 14

PostPosted: Thu May 25, 2006 20:38    Post subject: Reply with quote

Ok, here's what's up:

- Fresh new install of Mac OS X 10.4.6 on a PPC G5.
- Installed your latest PHP package. (EDIT: entropy-php-5.1.4-5.tar)
- Can't view any PHP files: error in apache error log is this:

Code:
[error] PHP Warning:  Unknown:  Failed opening 'Library/WebServer/Documents/phpinfo.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in Unknown on line 0


Not sure where that's coming from. I'm never had a failure right out of the box before. It usually just works.

=)

EDIT:

Forgive me, I'm stupid.

Helps if www can read the files. For some stupid reason they were set to owner read only.
Back to top
View user's profile Send private message Send e-mail
kooshball



Joined: 18 May 2006
Posts: 7

PostPosted: Fri May 26, 2006 2:03    Post subject: Reply with quote

Marc,

I was able to build apache2 Universally on a PPC Mac with the following:

CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
sudo ./configure --prefix=/opt/apache2 --enable-mods-shared=all --enable-proxy-balancer \
--enable-proxy-ajp --enable-proxy-http --enable-proxy-ftp --enable-proxy-connect --enable-proxy

However, after installing PHP5 and starting up apache, I still got that same error:
Symbol not found: _ap_unblock_alarms\n Referenced from: /usr/local/php5/libphp5.so\n Expected in: /opt/apache2/bin/httpd


Do I need to do this on a clean Mac?

Is there anyway you could package up Apache2 like you did with PHP5?
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
liyanage
Site Admin


Joined: 22 May 2003
Posts: 1104
Location: Zurich, Switzerland

PostPosted: Fri May 26, 2006 9:36    Post subject: Reply with quote

kooshball wrote:
Symbol not found: _ap_unblock_alarms\n Referenced from: /usr/local/php5/libphp5.so\n Expected in: /opt/apache2/bin/httpd


I researched this symbol a bit and it turns out that it is in Apache 1.3, not 2.0. Is it possible that you downloaded the wrong package version? It looks like you downloaded the Apache 1.3 PHP package but you're trying to load it into an Apache 2 server.

Do you specifically *want* to use Apache 2?
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
kooshball



Joined: 18 May 2006
Posts: 7

PostPosted: Sat May 27, 2006 4:49    Post subject: GOT IT WORKING Reply with quote

Marc,

You were right in that I had the wrong PHP file.

Here are my steps to get the Universal Apache2 and PHP5 working on a PPC.
1) Download Apache 2
curl -O http://apache.seekmeup.com/httpd/httpd-2.2.2.tar.gz
gnutar -xzf httpd-2.2.2.tar.gz

2) Building and Installing Apache 2
CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
sudo ./configure --prefix=/opt/apache2 --enable-mods-shared=all --enable-proxy-balancer \
--enable-proxy-ajp --enable-proxy-http --enable-proxy-ftp --enable-proxy-connect --enable-proxy \
--enable-ssl --enable-so
sudo make
sudo make install

3) Download PHP5
http://www2.entropy.ch/download/entropy-php-5.1.4-5-apache2.tar.gz
After installing, I did get an error message and ignored it.

4) Load PHP5 into Apache2 by editing the /opt/apache2/conf/httpd.conf file to include the following:
LoadModule php5_module /usr/local/php5/libphp5.so
<IfModule php5_module>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.php
</IfModule>

5) Start up apache using

Quote:
sudo /opt/apache2/bin/apachectl


6) Start up MySQL 5.0.21 server using the 'MySQL' preference pane

7) Tested connection and successfully queried the database using
Quote:
mysqli



I am happy as a clam that I can finally start making my own web applications!!! Very Happy



Thank you, thank you, and thank you Marc for all your help and efforts to build PHP5 with for Apache2!!!!! Laughing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
liyanage
Site Admin


Joined: 22 May 2003
Posts: 1104
Location: Zurich, Switzerland

PostPosted: Sat May 27, 2006 13:57    Post subject: Re: GOT IT WORKING Reply with quote

kooshball wrote:
Here are my steps to get the Universal Apache2 and PHP5 working on a PPC.


Thanks for the update, I changed my blog posting accordingly...
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Entropy.ch Discussion Forums Forum Index -> PHP on Mac OS X All times are GMT + 1 Hour
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group