Welcome, Guest
Guest Settings
Help

Thread: Zend components



Permlink Replies: 8 - Last Post: Jun 7, 2016 12:19 AM Last Post By: wijnaldum william Threads: [ Previous | Next ]
Radovan Antloga

Posts: 2
Registered: 4/17/01
Zend components
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 7, 2013 8:40 AM
I tried everything I can think of. I can't get to work with Zend components. I copied entire folder to rpcl. I copied just Zend folder to root or htdocs folder.

At first I get this message:
Warning: require_once(Zend/Session/Abstract.php): failed to open stream: No such file or directory in E:\Program Files\Embarcadero\HTML5 Builder\5.0\apache\htdocs\rpcl\Zend\framework\library\Zend\Session.php on line 28 Fatal error: require_once(): Failed opening required 'Zend/Session/Abstract.php' (include_path='.;%RPCLPATH%;%RPCLPATH%rpcl\PEAR;%RPCLPATH%rpcl\Zend\framework\library') in E:\Program Files\Embarcadero\HTML5 Builder\5.0\apache\htdocs\rpcl\Zend\framework\library\Zend\Session.php on line 28

I could not find any info on Zend deployment in H5B docs.
Ksenija Jereb

Posts: 1
Registered: 3/16/04
Re: Zend components
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 11, 2013 11:32 AM   in response to: Radovan Antloga in response to: Radovan Antloga
I had the same problem; the page, which uses Zend component works on local PC, but when I move it to web server, it reports error you described.

I found a solution; before line <require_once("rpcl/rpcl.inc.php"); > you should put

{set_include_path('rpcl/Zend/framework/library' . PATH_SEPARATOR . get_include_path());}

Ksenija

Radovan Antloga

Posts: 2
Registered: 4/17/01
Re: Zend components
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 12, 2013 3:46 AM   in response to: Ksenija Jereb in response to: Ksenija Jereb
Ksenija Jereb wrote:
I had the same problem; the page, which uses Zend component works on local PC, but when I move it to web server, it reports error you described.

I found a solution; before line <require_once("rpcl/rpcl.inc.php"); > you should put

{set_include_path('rpcl/Zend/framework/library' . PATH_SEPARATOR . get_include_path());}

Ksenija


I had to fix include_path in php.ini. Was set for development environment.
Alan E Christian

Posts: 1
Registered: 9/6/03
Re: Zend components
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 16, 2013 3:20 AM   in response to: Radovan Antloga in response to: Radovan Antloga
Radovan Antloga wrote:
I tried everything I can think of. I can't get to work with Zend components. I copied entire folder to rpcl. I copied just Zend folder to root or htdocs folder.
.....

At http://webapps.me.uk/cseForm2A.php there is article 'Enabling Delphi PHP Zend Components on Shared Web Hosting (1and1) with Zend Framework', to do with using Zend framework on (hosted) server for Delphi Zend components. Please see this article.
Leif Kåre Lende

Posts: 2
Registered: 11/13/99
Re: Zend components
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 20, 2014 11:05 PM   in response to: Radovan Antloga in response to: Radovan Antloga
Radovan Antloga wrote:
I tried everything I can think of. I can't get to work with Zend components. I copied entire folder to rpcl. I copied just Zend folder to root or htdocs folder.

At first I get this message:
Warning: require_once(Zend/Session/Abstract.php): failed to open stream: No such file or directory in E:\Program Files\Embarcadero\HTML5 Builder\5.0\apache\htdocs\rpcl\Zend\framework\library\Zend\Session.php on line 28 Fatal error: require_once(): Failed opening required 'Zend/Session/Abstract.php' (include_path='.;%RPCLPATH%;%RPCLPATH%rpcl\PEAR;%RPCLPATH%rpcl\Zend\framework\library') in E:\Program Files\Embarcadero\HTML5 Builder\5.0\apache\htdocs\rpcl\Zend\framework\library\Zend\Session.php on line 28

I could not find any info on Zend deployment in H5B docs.

If we assume that your Zend library is located in the directories /www/rpcl/Zend/, then you need to supplement the value of include_path in php.ini, as follows:
include_path = ".:../:/www:/www/rpcl/Zend/framework/library:/www/rpcl:/www/rpcl/PEAR"
When you do so, the entire Zend library is working fine in the original edition without having to change any of the files.

The most important part is actually getting the ../ as one of the include directories. On some servers it is also important to separate the directories with : instead of ; .

Another deficiency with Html5 builder is that it not always copies all necessary files from the Zend framework, when you deploy. I have found it advisable to copy the entire Zend directory from C:\Program Files (x86)\Embarcadero\HTML5 Builder\5.0\rpcl over to the /www/rpcl directory on the hosting Web server.

By the way, if your hosting server is a shared host, you may not have access to php.ini. But hopefully you have the possibility to put a .user.ini file into your /www directory. Then you can put the include_path directive into that file. The file may have another name, but you can figure out the name by looking up user_ini.filename in php.ini. Use phpinfo() to find it in the 'Local value' section of the output from phpinfo().
Eduardo Nunes

Posts: 4
Registered: 5/1/07
Re: Zend components
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 25, 2014 6:55 AM   in response to: Radovan Antloga in response to: Radovan Antloga
Hi,

I´m using include_path in this way, it´s working fine.

<?php

require_once("rpcl/rpcl.inc.php");
// my includes
require_once("config.php"); // my config.php includes $vPathlib, see it.

set_include_path(get_include_path() . PATH_SEPARATOR . $vPathlib);

// In some cases i have to omit get_include_path() becouse it´s became duplicate with php instalation
//set_include_path( PATH_SEPARATOR . $vPathlib);

require_once("dbModulo.php");

require_once("dbModulo.php");
require_once("funcoes.php");
use_unit("comctrls.inc.php");
use_unit("forms.inc.php");
.
.
.

Note that $vPathlib is a included variable that stays in my config.php

Here is my config.php

<?php

// PostgreSql database host
$DbHost = 'localhost'; // pode ser localhost ou ip
// porta do banco de dados
$DbPort = '5432'; // postgres8; mysql; ...
// PostgreSql database username
$DbUser = 'xxxx';
// PostgreSql database password
$DbPass = 'xxxxxxxx';
// database name
$DbName = 'DATABASENAME';
// database schema
$DbSchema = 'public'; // public = default
// database type
$DbType = 'postgres'; // postgres; mysql; mysqli; oracle ...
// Idioma do site
$DbIdioma = 'Portuguese (Brazil)'; // Sample: 'Spanish (Traditional Sort)' or 'Portuguese (Brazil)' or 'Spanish (Bolivia)' or 'English' or 'Afrikaans' or
// enviar e-mail / send e-mail
$DbSendMail = 'false'; // false // true
// encoding of database
$DbEncoding = 'iso-8859-1'; // database encoding utf-8 or iso-8859-1 or ....
// encoding of interface
$IntEncoding = 'iso-8859-1'; // interface encoding or utf-8 or iso-8859-1 or ....
// time zone - ini_set('date.timezone', 'America/Los_Angeles');
$vTimezone = 'America/Sao_Paulo'; // see
// set locale for date
//
// path para bibliotacas - please, do not change - favor nao alterar
$vPathlib = './rpcl/Zend/framework/library' .PATH_SEPARATOR . '/rpcl/PEAR';
.
.

Enjoy and share

Eduardo

Radovan Antloga wrote:
I tried everything I can think of. I can't get to work with Zend components. I copied entire folder to rpcl. I copied just Zend folder to root or htdocs folder.

At first I get this message:
Warning: require_once(Zend/Session/Abstract.php): failed to open stream: No such file or directory in E:\Program Files\Embarcadero\HTML5 Builder\5.0\apache\htdocs\rpcl\Zend\framework\library\Zend\Session.php on line 28 Fatal error: require_once(): Failed opening required 'Zend/Session/Abstract.php' (include_path='.;%RPCLPATH%;%RPCLPATH%rpcl\PEAR;%RPCLPATH%rpcl\Zend\framework\library') in E:\Program Files\Embarcadero\HTML5 Builder\5.0\apache\htdocs\rpcl\Zend\framework\library\Zend\Session.php on line 28

I could not find any info on Zend deployment in H5B docs.
Alexander B

Posts: 7
Registered: 3/4/13
Re: Zend components
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 27, 2014 7:47 PM   in response to: Radovan Antloga in response to: Radovan Antloga
Radovan Antloga wrote:
I tried everything I can think of. I can't get to work with Zend components. I copied entire folder to rpcl. I copied just Zend folder to root or htdocs folder.

At first I get this message:
Warning: require_once(Zend/Session/Abstract.php): failed to open stream: No such file or directory in E:\Program Files\Embarcadero\HTML5 Builder\5.0\apache\htdocs\rpcl\Zend\framework\library\Zend\Session.php on line 28 Fatal error: require_once(): Failed opening required 'Zend/Session/Abstract.php' (include_path='.;%RPCLPATH%;%RPCLPATH%rpcl\PEAR;%RPCLPATH%rpcl\Zend\framework\library') in E:\Program Files\Embarcadero\HTML5 Builder\5.0\apache\htdocs\rpcl\Zend\framework\library\Zend\Session.php on line 28

I could not find any info on Zend deployment in H5B docs.

Hi,Radovan!

My variant (replace double \ where is once \)

require_once("rpcl/rpcl.inc.php");

if (mb_strpos(ini_get("include_path"),"\rpcl\Zend\framework\library",0, 'UTF-8')===false)
ini_set('include_path', ini_get("include_path").";".getenv('DOCUMENT_ROOT')."\rpcl\Zend\framework\library");

//Includes
use_unit("forms.inc.php");

Edited by: Alexander B on Nov 29, 2014 3:35 PM

Edited by: Alexander B on Nov 29, 2014 3:43 PM
Alexander B

Posts: 7
Registered: 3/4/13
Re: Zend components
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 29, 2014 4:39 PM   in response to: Alexander B in response to: Alexander B
Alexander B wrote:
Radovan Antloga wrote:
I tried everything I can think of. I can't get to work with Zend components. I copied entire folder to rpcl. I copied just Zend folder to root or htdocs folder.

At first I get this message:
Warning: require_once(Zend/Session/Abstract.php): failed to open stream: No such file or directory in E:\Program Files\Embarcadero\HTML5 Builder\5.0\apache\htdocs\rpcl\Zend\framework\library\Zend\Session.php on line 28 Fatal error: require_once(): Failed opening required 'Zend/Session/Abstract.php' (include_path='.;%RPCLPATH%;%RPCLPATH%rpcl\PEAR;%RPCLPATH%rpcl\Zend\framework\library') in E:\Program Files\Embarcadero\HTML5 Builder\5.0\apache\htdocs\rpcl\Zend\framework\library\Zend\Session.php on line 28

I could not find any info on Zend deployment in H5B docs.

Hi,Radovan!

My variant (replace double \ where is once \)

require_once("rpcl/rpcl.inc.php");

if (mb_strpos(ini_get("include_path"),"\rpcl\Zend\framework\library",0, 'UTF-8')===false)
ini_set('include_path', ini_get("include_path").";".getenv('DOCUMENT_ROOT')."\rpcl\Zend\framework\library");

//Includes
use_unit("forms.inc.php");
wijnaldum william

Posts: 3
Registered: 6/6/16
Re: Zend components
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2016 12:19 AM   in response to: Radovan Antloga in response to: Radovan Antloga
We also provide a Composer repository. To use, add the following to your composer.json to enable our repository:
Adding the repository to composer.json:
{
"repositories": [
{
"type": "composer",
"url": "https://packages.zendframework.com"
}
]
}

[Informatica Training in Chennai |http://goo.gl/maoapk] | [Aws Training in Chennai|http://goo.gl/8Ur2QK]

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02