Installing Zend Framework on Cpanel Server
Another quickie for those of you wanting to install the Zend Framework on your Cpanel-powered Web servers.
I'm doing a bunch of updating to another set of Web sites I run (ahem OnlineGameHounds.com... PointlessGames.com, etc. cough) and needed to try out some modules that needed the Zend Framework. I'm not going to go into what that is (read for yourself, please) or why I need it (seriously, I need to get back to that work instead of writing this post! I shouldn't even be here at the bar with you blokes, I've got work to do!). If you need to know how to do this solution, you're likely only reading this because you're searching around for it on the Grand Googly-Moogly, et. al.
If you don't know what this stuff is, well... you're awful bored to be reading around on random posts about words like "Zend" that just look funny, aren't you??!? (Well, you're welcome here, for sure! Look around! :)
Hit the "read more"-type link to get at the problem/solution pair for this thing...
Problem:
How to install Zend Framework (with "Zend Engine", Zend Extension Manager and Zend Optimizer) onto my Cpanel server?
This Worked:
Looking all over for some quick help on how to first check if Zend is installed on my Cpanel-installed server (incidentally, my server is running Red Hat Enterprise Linux), you can just do a version check of PHP from the command prompt of your server: (likely need to log in as root for this, but not sure)
php -v
This should come up with something like this, depending on what was installed:
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd.
Well, it looks like I actually have the core Zend Engine installed. I need more though, so let's run a handy script that comes with Cpanel, eh? This script will install the Zend Engine as well as Zend Optimizer and the Zend Extension Manager, which might be something you need/want anyway. Run this command from your root SSH login:
/scripts/installzendopt
This puppy will download the current version of the Zend goodies and install it all with some defaults (also accepting the license agreement, so hopefully you don't mind others making decisions for you! Heh.) After running this script, here's my output of "php -v":
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd., and
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
Looks good to me! Happy days... that is, if this is really what I need to get going further on my chosen projects. We'll see about that when I get off of this site and back to my work at www.Bragfile.com... oh, and yes, that was another shameless plug. :P
You really should pay attention and record some of your own notes about the output from the script & Zend installation. For me, the key bit of info was the location that the Zend goodies were installed on the server (I need this info for the Drupal module I'm installing). For me, Zend is located here:
/usr/local/Zend
Another point to note regarding Zend (at least I think it's worth noting) is that Zend, for reasons I won't go into here, relocates the php.ini file (in my case, from /usr/local/lib) to /usr/local/Zend/etc. A symbolic link is created where php.ini was, so you'll still find that link where you're used to seeing the config file for PHP. Oh, btw, the original php.ini file is backed up to "/usr/local/lib/php.ini-zend_optimizer.bak", in case you need that for later... thanks.
That's about it for me on this issue. I've already taken way too much of a detour to write this much info... I really need to get back to this work.
Good luck with your own project!
- Login to post comments
Comments
I haven't seen to many cheap
I haven't seen to many cheap hosting having this as an option but you can usually install it your self and email the admins.Zend Framework and Zend
Zend Framework and Zend Optimiser are NOT the same thing.Your question appears to be asking about Zend Framework, yet your answer is about Zend Optimiser.
Zend Framework and CPanel/WHM
Hey Hoza, I'm having similar issue's to yourself and I was hoping that perhaps you had worked this out?! I have managed to get our hosting providers to setup the ZF libaries to /usr/local/bin/Zend. However, when I work through the quickstart application I see references to: QuickStart/ application/ controllers/ views/ scripts/ library/ public/ Which to be honest doesn't make much sense to me! All I know about cpanel folders is what i see in ftp: cpanel_account/public_html So do you think you could help me setup the quick start apps, but one that works (under cpanel)?? Or maybe just offer some advice to try and understand these paths, in context to cpanel? Thanks in advance.Sorry I'm so late on reply!
Hi ncoded,
Very, very sorry I'm so slow replying. The little app that's supposed to email me when new comments drop is apparently not working. (Grrrr!) I'll figure that out asap.
Anyway, I'm really not more familiar with The Way of Zend other than what I posted. I just got mine running by doing what I mentioned in my first comment. In my case, just putting the Zend library files into the subdirectory for the module (it was a Drupal module I was using on another site) got things rolling great for that case. I think that's too specific of a case to be relevant to you though?
In your case, I'm guessing you need to put those library files in a subdirectory inside ./public_html, like:
You want everything inside ./public_html/ in a Cpanel site, unless you're doing something more advanced. You then set up your scripts to access the path from there.
For instance, when you're doing file reference from the root of your web site, your root (/) location is actually /public_html/ to Cpanel. Thus, I'd start out thinking you should set up the Zend/library directory with those library files and then access them from your scripts like that.
Other than these quick observations, I'm not really sure what else to say. Unfortunately, I don't have any time to do my own research of the Quick Start stuff for Zend and give you further info. I'd appreciate if you report back about any findings, though!
If I can help more, I will. Sorry again about the delay. I guess I need to go check the comment notification stuff and find out why that's not working now!! :)
Cheers.
Installing just the Zend libraries for site-specific needs
Well, I may have overshot what I needed to get my particular project running... yay. Not only do I do too much research, I post this big article detailing how I did it. I'll hope that others out there find use out of my article so it wasn't just a waste of time!! Ugh. Anyway, what it turns out I needed was to simply download the library files and put them in a specified folder for my particular site. This required no editing of php.ini or anything... just a simple folder upload and specification of the path where it was uploaded. Easy. You can get the library files here (requires a free registration at Zend to actually download): Zend Framework Downloads. In my case, I just went to Latest Zend Framework Releases and snagged the "Minimal" download since I only want the libraries and I'm not interested in getting into doing anything else with Zend at the moment. I'm leaving this issue at this point. If people want more info, either do some research elsewhere or drop me a line and I'll let you know if I can help (or if I have time to help.) Cheers, Hoza