Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
July 31, 2010, 09:23:45 PM

Pages: [1]   Go Down
  Print  
Author Topic: Zend Framework Installation  (Read 1410 times)
lhkrishna
Newbie
*
Offline Offline

Posts: 5


« on: November 10, 2009, 04:40:30 AM »

I was wondering if anybody has successfully completed and installation of the Zend Framework. I am having problems whle doing this.
Just wanted to know if there are any tips to successfully install the zend framework in the lunar pages environment.
if anybody have the Zend Framework working please let me know.

Thanks
Krish
Logged
jimlongo
Intergalactic Superstar
*****
Offline Offline

Posts: 126



WWW
« Reply #1 on: November 10, 2009, 07:22:32 AM »

On my shared server it's installed and enabled by default.

Create a file with this content
Code:
<HTML>
<?php phpinfo(); ?>
</HTML>
and access it with your browser to see what is installed on your server.
Logged

KrisA
Trekkie
**
Offline Offline

Posts: 11



« Reply #2 on: November 10, 2009, 09:03:04 AM »

If you are on shared server, please take a look into this article :
https://support.lunarpages.com/knowledge_bases/article/317

It is installed on the server by default, but you will have to enable it in php.ini file  Smiling
Logged

jimlongo
Intergalactic Superstar
*****
Offline Offline

Posts: 126



WWW
« Reply #3 on: November 10, 2009, 02:27:08 PM »

I'm not  sure about that knowlegebase article.

My phpInfo says
Configuration File (php.ini) Path   /usr/local/lib/php.ini
and no matter what i change or delete the phpInfo will remain the same.

It seems to me it is set by the server admin in my case.
Logged

MrPhil
Professor in Nanotechnology
*****
Offline Offline

Posts: 4760



« Reply #4 on: November 10, 2009, 02:54:50 PM »

Did you put the line in .htaccess to tell PHP where to find php.ini? It sounds like you didn't do that.
Logged

jimlongo
Intergalactic Superstar
*****
Offline Offline

Posts: 126



WWW
« Reply #5 on: November 10, 2009, 08:29:02 PM »

If you're asking me, no I didn't, but it is enabled anyway according to phpinfo.
That's why I suggest it's hard coded in the /usr/local/lib/php.ini and one needn't follow the tutorial.

IonCube and Zend are enabled on my account whether suPHP_ConfigPath /home/username/public_html is in .htaccess or not
« Last Edit: November 11, 2009, 10:02:54 AM by jimlongo » Logged

Troy L
Support
Galactic Royalty
*****
Offline Offline

Posts: 406


Darkwolf


« Reply #6 on: November 11, 2009, 02:33:43 AM »

Generally the zend optimizer and Ioncube are preinstalled on the server, however in some cases where a custom php.ini is being used or using php5, I have seen some issues where it may not correctly work.

I would recommend contacting support at support.lunarpages.com or support@lunarpages.com to double check everything if you are experiencing issues enabling these zend optimizer or Ioncube.

USUALLY the following will fix it:

1. add to .htaccess in public_html:

suPHP_ConfigPath /home/cpanelusername/public_html/

2. add to php.ini in public_html folder:

(if using php4)
 [Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0
zend_optimizer.version=3.3.0
zend_extension="/usr/local/php5/IonCube/ioncube_loader_lin_5.2.so
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/php5/IonCube/ioncube_loader_lin_5.2_ts.so

(if using php5)

 zend_extension="/usr/local/php5/IonCube/ioncube_loader_lin_5.2.so"
zend_extension_ts="/usr/local/php5/IonCube/ioncube_loader_lin_5.2_ts.so"
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

If neither of the above work, you will then need to contact support regarding this issue.
Logged

scanman20
Master Jedi
*****
Offline Offline

Posts: 1448



WWW
« Reply #7 on: November 11, 2009, 05:56:18 AM »

Has anyone every used ionCube's online encoder? I just noticed it and it seems like a reasonable and inexpensive alternative to buying the other encoders that offer which start at $199. They even seem to have a testing mode that allows you to upload a PHP script and have it encoded for free. It expires after eight hours but for testing that's pretty nice.
Logged

Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP
lhkrishna
Newbie
*
Offline Offline

Posts: 5


« Reply #8 on: November 13, 2009, 06:21:08 AM »

Thanks to all.
I already have domain which is not using Zend Framework.
I have created a small program using Zend framework locally using apache and php5. When i have uploaded to a folder inside my domain , its not workig fine.
Here are the steps i have done.

1) I have created a Zend Folder structure
                    application
                    library
                    public
2)  Locally i have this .htaccess file.

RewriteEngine on
RewriteRule .* index.php
php_flag magic_quotes_gpc off
php_flag register_globals off

I have removed php_flags and included them in the php.ini file while uploading. Find below my php.ini file contents.

register_globals = Off

magic_quotes_gpc = off

zend_extension="/usr/local/IonCube/ioncube_loader_lin_4.4.so"
zend_extension_ts="/usr/local/IonCube/ioncube_loader_lin_4.4_ts.so"

[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3

zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

extension=php_mysqli.dll


and also find below my .htaccess contents ..

RewriteEngine on
RewriteRule .* index.php
suPHP_ConfigPath /home/cpanelusername/public_html/


My index file is in public folder inside the folder i have created .
public_html/xxxxx/public/index.php


When i try to access index page i get following error .

Bad Request

Your browser sent a request that this server could not understand.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Can any one correct me, I am very new to zend.

Thanks
Hari

Logged
MrPhil
Professor in Nanotechnology
*****
Offline Offline

Posts: 4760



« Reply #9 on: November 13, 2009, 10:19:19 AM »

Quote
2)  Locally i have this .htaccess file.

RewriteEngine on
RewriteRule .* index.php
php_flag magic_quotes_gpc off
php_flag register_globals off

I have removed php_flags and included them in the php.ini file while uploading. Find below my php.ini file contents.
I'm confused. Why are you saying you have php_flag in your .htaccess, and then say that you removed it? You will get '500' errors if you leave them in. Is it in there, or not?

Quote
suPHP_ConfigPath /home/cpanelusername/public_html/
You shouldn't have the trailing / on it. Change it to suPHP_ConfigPath /home/cpanelusername/public_html . Is that the directory that php.ini is in? And of course, "cpanelusername" is actually your account name, right?

Quote
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
You should set up your own Error Documents (error pages, or error handlers). cPanel > Error pages will give you the core of these files (/404.shtml, etc.). You can then embellish them with more HTML code to look consistent with your pages. This will stop clogging up your logs with unnecessary error messages. You should also have a /favicon.ico (16x16 pixel ICON format) for browsers to display, and /robots.txt (even an empty file) for search engines to grab.

Quote
Can any one correct me, I am very new to zend.
I don't know if you have your Zend entries set up correctly. Are you missing a [/Zend] tag?

If you still can't get it working, please list your entire .htaccess file(s) and your entire php.ini file(s), not little bits and pieces, as well as which directorie(s) they're in. Feel free to XXXX out any sensitive information, such as account names.

Note that you can check for yourself whether your php.ini entries are being processed. Just make the following phpinfo.php file and run it from the browser:
Code:
<?php phpinfo(); ?>
Run it before and after making a change to php.info and see if the change "took". Hide or remove the file when you're done (or give it a really strange, unguessable, name) so hackers can't use it to look inside your site.
Logged

lhkrishna
Newbie
*
Offline Offline

Posts: 5


« Reply #10 on: November 13, 2009, 02:10:57 PM »

Thanks phil,

Below are my .htaccess Content

Code:
RewriteEngine onRewriteRule .* index.php
suPHP_ConfigPath /home/XXXXX/public_html/shofit

Below are my php.ini Content

Code:
register_globals = Off

magic_quotes_gpc = off

zend_extension="/usr/local/IonCube/ioncube_loader_lin_4.4.so"
zend_extension_ts="/usr/local/IonCube/ioncube_loader_lin_4.4_ts.so"

[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3

zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

extension=php_mysqli.dll


I am just writing a simple program in zend to set it up . This program adds and deletes albums. It works fine locally.

Below is my code in index.php
Code:
<?php

error_reporting
(E_ALL|E_STRICT);

set_include_path('.' PATH_SEPARATOR './library'

PATH_SEPARATOR './application/models/'

PATH_SEPARATOR get_include_path());

include 
"/usr/local/Zend/Loader.php";

Zend_Loader::loadClass('Zend_Controller_Front');

Zend_Loader::loadClass('Zend_Config_Ini');

Zend_Loader::loadClass('Zend_Registry');

Zend_Loader::loadClass('Zend_Db');

Zend_Loader::loadClass('Zend_Db_Table');

// load configuration

$config = new Zend_Config_Ini('./application/config.ini''general');

$registry Zend_Registry::getInstance();

$registry->set('config'$config);

// setup database

$db Zend_Db::factory($config->db->adapter,

$config->db->config->toArray());

Zend_Db_Table::setDefaultAdapter($db);

// setup controller

$frontController Zend_Controller_Front::getInstance();

$frontController->throwExceptions(true);

$frontController->setControllerDirectory('./application/controllers');

// run!

$frontController->dispatch();




I have used your tips in the above post and tried it. But no luck.
I think i am not configuring it properly.

Thanks for the help
Hari




Logged
MrPhil
Professor in Nanotechnology
*****
Offline Offline

Posts: 4760



« Reply #11 on: November 13, 2009, 04:29:32 PM »

I'll assume that's just a typo that the first two lines of your /home/XXXXX/public_html/.htaccess are run together (is that where the file is?). Is the next file /home/XXXXX/public_html/shofit/php.ini? That's what your suPHP_ConfigPath points to. Have you run the phpinfo script to make sure your php.ini file is being properly processed?

I'm not familiar with Zend and will have to defer to someone else on whether you're missing anything or any lines are out of order. Are you on PHP 4 or PHP 5? I have heard that the various version numbers in the files are different between the two. I can't comment on whether your PHP code is correct or not.

I wouldn't think that a "Bad Request" (400) error (browser asked for something that the server didn't understand) would have anything to do with Zend, but that's just guessing. Just for grins, comment out the RewriteRule in your .htaccess so that there's no redirection taking place, and see if it makes any difference. Clear your browser cache or force a reload (Ctrl-F5) after any change to .htaccess.

You mentioned public_html/xxxxx/public/index.php in an earlier post. Is that the correct address (/home/xxxxx/public_html/xxxxx/public/index.php)? Is this index.php under any other .htaccess files below your root directory? Please list the full path of the .htaccess file and the php.ini file, to be sure. The php.ini can be located anywhere, but all the .htaccess file(s) from the root /home/xxxxx/public_html/ down the line to wherever your index.php is will be processed.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to: