0
votes

I have a question concerning Zend Tool. I am trying to install Zend Framework on a shared hosting (bluehost if that matters). I have unpacked the latest Zend Framework into my public_html folder and added the path of the framework's library to php.ini include_path.

When I try to run zf.sh with any arguments (for example, zf show version) I get an error:

Action 'path_to_zf/bin/zf.php' is not a valid action.

What could be the source of the problem? Thanks.

2
You're on shared hosting and you're able to edit php.ini? - ceejayoz
Honestly, you shouldn't need and/or be using Zend_Tool on your production server. It's a tool for development and should be used locally. - Jeremy Harris
I have a php.ini file in my public_html folder, which, I assume, allows me to override some of the options from the general php.ini. At least get_include_path() reflects changes that I make in the local file. - kostya
I don't plan on using zend tool, I just tried to test the zend framework installation. Is there a better way? - kostya

2 Answers

0
votes

To run a Zend Framework website on a production server, you should use a development computer to create the website and then upload the website code to the production server using a deployment strategy such as capistrano, a phing script, rsync or even plain old FTP.

On your local development computer, you use zf.sh (or zf.bat on Windows) as per the instructions in the Quick Start. Once you are happy that it works locally, upload to your shared hosting.

To get a PHP environment on your local computer, consider installed WAMP or Zend Server CE.

0
votes

I just went through this (with BlueHost) myself.

You mentioned that you added the proper path to the include_path in public_html/php.ini. There are a few other things to check.

First: By default, BlueHost servers are configured to use a different php.ini file (located in /etc/) unless there is another php.ini file in the folder that you are running your script from. You can check by running <? php_info(); ?> and looking for the value for Loaded Configuration File.

In order to get every script in every folder to use the php.ini located in public_html/:

  1. From cPanel, under Software/Services click the PHP Info link
  2. Select PHP x.x (Single php.ini) for the same version as is already selected (to ensure compatibility).

Second: You'll want to make sure you've added an alias to your .bashrc file (see here)

At this point if your problem isn't solved, you'll want to consider a different method of checking whether or not Zend Framework will be available to your .php files:

Save Zend's Installation Checker file and upload it to the root path of your server. Then view it in your browser. It will tell you if you have installed zend framework correctly.

All tests pass for me, so I don't care that I still get the same error as you when testing through ssh via # zf show version.

More on installing Zend: https://developers.google.com/gdata/articles/php_client_lib#php-path-installation

More on BlueHost php config: https://my.bluehost.com/cgi/help/551