0 users online. Create an account or sign in to join them.Users

Search

Does anyone know how to do this?

I’d like to do it so I can use the “Export Ensemble” extension, but I have not a clue about how to do it because I never had to do it before. I looked out in google, but did not find any step by step tutorial for OS-X SnowLeopard.

Cheers!

The easiest way is to install the PHP package by Marc Liyanage, which I have even seen recommended on the Apple developer website.

Thank you very much michael-e.

I have to say it… I’m really impressed with this community. Answers and solutions really come quickly here!

Cheers!

Unfortunately I followed the instructions to install the package by Marc Liyanage and now my localhost is not working any more… :(

When trying to access http://127.0.0.1/~BrunoPinho I get “Forbidden - You don’t have permission to access /~BrunoPinho on this server.”

Looks like I’m in trouble… I already tried the solution on the Apple support section (http://support.apple.com/kb/TA25038?viewlocale=en_US).

Help anyone!!!

whilst not an immediate solution to your issue, you can try and get it running in MAMP by downloading this php-5-2-6 extension

Thanks Fazal…

For now I just “rolled back” to the default Apple PHP5 module and everything is back to normal… With no “ZipArchive” class enabled.

I’ll try MAMP later on.

Cheers!

Whilst you’re installing mamp, I think you should check out my screencast on how to get MAMP, Apache and Parallels working in parallel. Hope it helps some - may also answer the issue regarding your access problems.

I just read on the Entropy.ch Discussion Forums that the current Entropy PHP 5.3.0-3.pkg is not suitable for OS-X 10.6.2… Maybe thats why I can’t put it to run. ;)

@Fazal | I sure will give a try on MAMP… Nice screencast!

Cheers!

I just read on the Entropy.ch Discussion Forums that the current Entropy PHP 5.3.0-3.pkg is not suitable for OS-X 10.6.2… Maybe thats why I can’t put it to run. ;)

I am sorry, I didn’t know this. (At the moment I am working with the default PHP version on OS X 10.6.2.)

I installed everything via MacPorts on Snow Leopard without any troubles.

Thanks ya all!

I already made it work with MAMP & Greg Hughes MAMP extension. Works like a charm!

Cheers!

@michael-e | No problem!!! I’m the one that should have read the full documentation prior to the installation… ;)

Cheers!

I was disappointed with the fact that I was no longer able to export ensembles when I upgraded to some new Apple hardware. Since it was running Mac OS X 10.6 Snow Leopard, I needed to make some changes to my local development environment to get my several Symphony installs up and running again.

Snow Leopard ships with PHP 5.3, which means that the XSL extension is included by default. Great! However, the Zip extension is not included. Not so great, if you want to be able to create Symphony Ensembles. I’ve always done my development with the default Mac OS X installs of Apache, and I have a similar set up on my iMac G3, Mac G5, the Intel iMac at work and now my new MacBook Pro. Not wanting to now switch to MAMP, I was determined to find a way to get the ZIP extension installed for the default PHP install in Snow Leopard.

Here are the resources that helped me in my quest:

Adding the Zip Extension to PHP for Mac OS X 10.6 Snow Leopard

You will need to be familiar with command line tools in Mac OS X. I tend to prefer using Terminal in Coda. The following process also requires the latest Xcode Tools from Apple in order to compile the Zip extension from the PHP source code. If you’d rather skip the compile process, try downloading one of the zip.so files mentioned at the end of this post.

Install Xcode Tools

First, install Xcode 3.2 from the OS X DVD, or visit the Apple Developer Center to download the latest Xcode Tools:

Double-click on the Xcode.mpkg installer to install the Essentials, System Tools and UNIX Dev Support components of the Xcode tools. You may only need the UNIX Dev Support tools, but the bulk of the install is the 1.76 GB Essentials component, so it doesn’t hurt to include the rest of the components, except that I’ve skipped the Mac OS X 10.4 Support.

Download PHP Source

Next, download the PHP source code, which also contains the source for the extensions. We don’t need to recompile PHP, since all we’re going to do is add the extension file to the existing PHP install, configure the php.ini file and restart the server to enable the Zip extension.

Unpack the PHP source code. I’ve placed the unpacked directory in my home directory:

~/php-5.3.1

Prepare the Build Settings

Instruct our system to build universal binaries, that will work on both 32 and 64 bit systems by entering the following commands in a terminal console:

MACOSX_DEPLOYMENT_TARGET=10.6
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET

Compile the Zip Extension

One of the prerequisites for compiling the extension will be to have the pcre.h file available during the compile process, according to the instructions supplied by the one of the comments to copy this file:

sudo cp ~/php-5.3.1/ext/pcre/pcrelib/pcre.h /usr/include/php/ext/pcre/

Then, navigate to the Zip extension directory:

cd ~/php-5.3.1/ext/zip

And run the following commands to compile the zip.so file:

phpize
./configure
make

The extension file will be created here:

~/php-5.3.1/ext/zip/.libs/zip.so

Configure PHP

To add the extension to the default PHP install, copy the compiled zip.so file to the extensions library directory.

sudo cp ~/php-5.3.1/ext/zip/.libs/zip.so /usr/lib/php/extensions/no-debug-non-zts-20090626/

Ensure that the file is executable:

cd /usr/lib/php/extensions/no-debug-non-zts-20090626/
chmod +x zip.so

Then, configure PHP to include the extension by creating a php.ini file (if it has not already been created).

sudo cp /etc/php.ini.default /etc/php.ini

There are a couple settings that must be configured in the php.ini file to include the Zip extension. Tell PHP where to find the extensions library:

extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20090626/"

And tell PHP to include the Zip extension

extension=zip.so

I have included both these lines at the end of the php.ini file.

To check whether the extension has been successfully linked by the php.ini file, run the following command to list the available PHP extensions:

php -m

Here’s where you can see the results of trying to include an extension file that has been compiled for the wrong system architecture:

/usr/lib/php/extensions/no-debug-non-zts-20090626/zip.so: mach-o, but wrong architecture in Unknown on line 0

Configure the MySQL Socket for PHP

I found that the new php.ini file had defaults that differed from my local hosting environment. Having installed MySQL 5.1 using the package installer available from dev.mysql.com, I found that the new configuration file broke all connections to my databases. To fix this, I modified the following lines of the php.ini file to point to the correct location for the MySQL socket file. The default settings looked like this:

mysql.default_port =
mysql.default_socket = /var/mysql/mysql.sock

However, both of these lines needed to be changed to reflect that actual location of the socket file:

mysql.default_port = /tmp/mysql.sock
mysql.default_socket = /tmp/mysql.sock

Restart Apache

With the PHP settings properly configured, all that is necessary to enable the Zip extension is to restart the Apache server:

sudo apachectl graceful

Now, I find that everything is again working as it should, and I am able to export Symphony Ensembles again. Now I have my development environment back again, and I hope I can begin to continue to develop some of my experimental ensembles into useful applications.

For anyone who has the same architecture, I have attached the zip.so file, so you can skip the whole Xcode Tools download and extension compilation process. For those who have a different architecture, try the zip.so file provided by Greg Hughes.

Downloads

Resources

Attachments:
zip.so.zip

Great resources Fazal and Bauhause.
I am wondering, doesn’t one only use zip for packing ensembles to deploy sites from local machine to life server?
Can’t this be achieved with git? If so, anyone that only uses git, and no longer zip?

@newnomad: I use a Capistrano recipe to manage deployment to multiple environments. Much, much more efficient than using straightup git or installing ensembles each time.

I’ve been meaning to make it a little more generic and then share some info on how to use it, can bump it up the todo list if people are really interested.

@Makenosound
I forone would be really interested, I think efficient deployment is key to ‘our’ success.

Does your method involve installing system stuff on the recipient life server?
That might be a limiting factor for those of us with shared hosting. I can imagine that also being the reason some would use git for local versioning, but in the end can only deploy with an extension. Also, is a hosted Private Repositorie on github needed? Thats not free…

How would capify compare to a desktop application git-client? never used one, but can imagine they must be pretty simple to use.


What I like about MAMP is that it’s selfcontained. I like the idea that my complete development environment is ‘portable’ (not truly usbstick portable I guess,…) so I can move it from one user, or computer to another. Also for backup workflows, using system LAMP is inconvenient because it’s burried inside the system files, rather then user documents or apps. Even if this could be circumvented with aliases, moving to another computer still means enabling php and installing mysql (and whatnot) again

@newnomad: Cool, I’ll look at putting together the script/tutorial in the next couple of days. Capistrano is not dead simple, but once you get things up and running it’d much more robust deployment solution.

Basically all Capistrano does is let you build “recipes” that automate the deployment process for you. The only problems are, as you mention, people on shared hosting might miss out. To have it work properly you’ll need to have git (and potentially rsync) installed on the your server and you’ll ned SSH access. There are options for doing the deployment via scp but I probably won’t build that into my script.

That said, I use my standard cap recipe to deploy to a crappy Dreamhost account and it works fine.

Well currently I am stuck with shared hosting too. Does the entry dreamhost offer ssh then?

@Makenosound, I’d be very interested in the Capistrano script/tutorial. The database migration piece of the Symphony deployment process is something that I was hoping would be solved in a much more elegant way. I hadn’t realized that Capistrano wasn’t specific to Ruby on Rails.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details