Re: [fw-general] display images

2008-12-08 Thread ankuraeran

Dear Mike,

First of all thanks for your reply.

Actually, the code you mentioned works well for setting http headers but I
do not want to set header. I just want to browse the image from a location
out side of Apache's Document root. In my case I put all user uploaded
images in application_dir/data/uploads. 

It is bit strange that using the following code I can see the image in IE
but somehow it doew not display in firefox.


public function uploadAction()
{
$this->view->headTitle('Home');
$this->view->title = 'Upload image';
$this->view->bodyCopy = "Please fill out this form.";

$form = $this->getUploadForm();;

if ($this->_request->isPost()) 
{
$formData = $this->_request->getPost();
if ($form->isValid($formData)) 
{
// success - do something with the uploaded file
$uploadedData = $form->getValues();
$fullFilePath = $form->file->getFileName();
$this->view->filePath = $fullFilePath;
$this->view->isFileUploaded = 1;
$this->view->img  = APPLICATION_PATH . 
'uploads/'.$uploadedData['file'];
}
else 
{
$form->populate($formData);
}
}
$this->view->form = $form;
}

and upload.phtml contains:
isFileUploaded) :  ?>
 '' alt="restra image" >

form->render(); ?>


Am I making any mistake?

With regards,
Ankur


Michael Crumm wrote:
> 
> Ankur,
> 
> If by 'path ambiguity' you mean that your image files are stored outside
> your webroot, then i think i can at least lead you in the right direction.
> 
> I use a controller action to output an image from the file system.  The
> easiest way to do this is to grab ahold of the response object from within
> your controller action and set the appropriate headers and content for the
> media you want to output.
> 
> Here's my controller file:
> 
>  class ImageController extends Zend_Controller_Action
> {
> public function indexAction()
> {
> $this->_helper->layout->disableLayout();
> $this->_helper->ViewRenderer->setNoRender();
> 
> $file = '/path/to/file';
> 
> $info = getimagesize($file);
> $mimeType = $info['mime'];
> 
> $size = filesize($file);
> 
> $data = file_get_contents($file);
> 
> $response = $this->getResponse();
> $response->setHeader('Content-Type', $mimeType, true);
> $response->setHeader('Content-Length', $size, true);
> $response->setBody($data);
> $response->sendResponse();
> die();
> }
> }
> 
> 
> I purposefully included the beginning php tag so that you would see that I
> omitted the closing tag.  This is good practice all the time, but
> invaluable
> here.  An additional whitespace following a closing tag in this instance
> would result in the image not appearing in the browser.
> 
> getimagesize(), filesize(), and file_get_contents() you are most likely
> already familiar with.  If not, take a quick trip to php.net for some more
> info.  (fyi, the name getimagesize is misleading.  it does more than
> that.)
> 
> Hope this helps.
> 
> -Mike
> 
> The only rea
> 
> On Mon, Dec 8, 2008 at 1:20 AM, ankuraeran <[EMAIL PROTECTED]> wrote:
> 
>>
>> I am newbie to ZF. I could successfully create file upload action but due
>> to
>> some path abbiguity I am unable to display that uploaded image in browse.
>> The path where I put the uploaded image is
>>
>> /data/uploads/
>>
>> Will anybody please guide me how to access the image in template.
>>
>> Regards,
>> Ankur
>> --
>> View this message in context:
>> http://www.nabble.com/display-images-tp20890555p20890555.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/display-images-tp20890555p20909531.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] ZF 1.7 and getParam charset problem

2008-12-08 Thread Kononov Ruslan


Matthew Weier O'Phinney-3 wrote:
> 
> Can you create an issue in the tracker for this? I had another report
> while at php|works this week of a location where htmlentities() is
> called without the encoding argument, and these all need to be fixed.
> 
> 

I'm post issue to Zend Jira
http://framework.zend.com/issues/browse/ZF-5191


-- 
View this message in context: 
http://www.nabble.com/ZF-1.7-and-getParam-charset-problem-tp20495479p20909310.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Routing: actions as first element of path

2008-12-08 Thread rutt

This seems like something that should be easy to do, but I can't figure it
out, and I haven't had any luck with forum searches.  I want to set up the
following routing structure:

/ : controller => RootController, action => index
/about : controller => RootController, action => about
/contact : controller => RootController, action => contact
/blog : controller => BlogController, action => index
/blog/recent : controller => BlogController, action => recent
/blog/archive/year/2007 : controller => BlogController, action => archive,
params => {year => 2007}

Basically, if the first element of the path is a valid controller, then the
request should be dispatched to that controller.  If not, it should be
dispatched to RootController.  I want to make adding a static page as simple
as possible, so I'm overriding RootController::__call() to render view
scripts based on the action name.  With that in mind, I don't want to use
static routes; I should just be able to drop a view script in the right
directory, and the new page will be accessible.

It just feels like I'm missing something about the standard routing, because
I imagine this is a common routing pattern.  Extending the ZF routing
classes seems excessive.  I guess I could catch EXCEPTION_NO_CONTROLLER in
my ErrorController, and then forward the request to RootController, but
again, that seems excessive.

Thanks for your help.

-- 
View this message in context: 
http://www.nabble.com/Routing%3A-actions-as-first-element-of-path-tp20908784p20908784.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] 'Normalising' of Controller and Action names

2008-12-08 Thread Matthew Weier O'Phinney
-- Tim Nagel <[EMAIL PROTECTED]> wrote
(on Tuesday, 09 December 2008, 11:19 AM +1100):
> I am trying to create a basic content serving controller where user created
> data is served using the action name as a name specified by the user.
> (Overridden __call in the controller).
>  
> I have hit a bit of a snag in that it looks like Zend is normalising
> (lowercasing and doing funky stuff with camelcase and underscores) action
> values which isnt ideal for my situation. Is there a way to turn this 
> behaviour
> off? Or even a poke in the right direction of where its occuring? I havent had
> a chance to delve into the router/front controller/dispatcher but my quick 
> look
> didnt uncover anything.

The ViewRenderer action helper includes a Zend_Filter_Inflector instance
that performs this normalisation. You can modify the rules used by
pushing your own inflector into the ViewRenderer, or modifying the one
present.

$viewRenderer = 
Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
$inflector = $viewRenderer->getInflector();

As an example, the current rules are setup using the following:

$inflector->setRules(array(
':module' => array('Word_CamelCaseToDash', 'StringToLower'),
':controller' => array('Word_CamelCaseToDash', new 
Zend_Filter_Word_UnderscoreToSeparator('/'), 'StringToLower', new 
Zend_Filter_PregReplace('/\./', '-')),
':action' => array('Word_CamelCaseToDash', new 
Zend_Filter_PregReplace('#[^a-z0-9' . preg_quote('/', '#') . ']+#i', '-'), 
'StringToLower'),
));

For more information on the inflector, see:

http://framework.zend.com/manual/en/zend.filter.inflector.html

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] How to test downwardly compatible Methodes with PHPUnit

2008-12-08 Thread Matthew Weier O'Phinney
-- Sebastian Hopfe <[EMAIL PROTECTED]> wrote
(on Tuesday, 09 December 2008, 01:07 AM +0100):
> i know that this function is added since a long time. This was only an
> example.
> But how i could write a PHPUnit test - so that i get a CodeCoverage by 100%
> and the test is solved complete?
> 
> I mean - the ZF is solicited with a 100% Code Coverage.

No, it's not. We require 80% coverage for acceptance to trunk, and
recommend 90%. There are some cases, such as this type, that you simply
can only trigger by testing in specific environments (PHP version, OS,
presence/absence of an extension, etc.).

> How this should work at following issue?
> 
> http://framework.zend.com/issues/browse/ZF-5091

I've resolved it as "Won't Fix", due to the fact that it is filed
against 1.7.0, and is specific to a version less than our required
minimum PHP version.


> thanks for spending time in my question.
> 
> Best regards
> Sebastian
> 
> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von till
> Gesendet: Montag, 8. Dezember 2008 23:41
> An: Sebastian Hopfe
> Cc: fw-general@lists.zend.com
> Betreff: Re: [fw-general] How to test downwardly compatible Methodes with
> PHPUnit
> 
> On Mon, Dec 8, 2008 at 11:24 PM, Sebastian Hopfe <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> >
> >
> > i want to open a discussion about PHPUnit. First of all – I love PHPUnit –
> > but i see some problems by testing methodes which providing downwardly
> > compatible.
> >
> >
> >
> >  The function „file_gets_content" is in old php versions not available. We
> > should check this with function_exists() – if these is false we should
> write
> > an alternative function.
> >
> > This is only an example.
> 
> Added in 5.0.0. :P
> 
> > But how we could test this with PHPUnit?
> 
> On a more serious note...
> 
> I'm not sure how to do that with PHPUnit, but you can run PHPT tests
> with PHPUnit as well, and in PHPT you can do the following:
> 
> --TEST--
> This is an example test.
> --SKIPIF--
> if (!function_exists('file_get_contents')) die('SKIP
> file_get_contents() does not exist');
> --FILE--
>  $resp = @file_get_contents('http://domain.tld');
> var_dump($resp);
> ?>
> --EXPECT--
> bool(false)
> 
> 
> You can run this test with pear run-tests foo.phpt, but also use an
> extension which is bundled with PHPUnit to include phpt's in the usual
> phpunit AllTests.php run.
> 
> For example:
>  rkup>
> 
> Cheers,
> Till
> 

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] How to set up dependant dropdowns in form

2008-12-08 Thread Cameron
I have spent WAY too much time getting this exact scenario working using
Zend Dojo forms and an MVC environment, and I plan on building an extensive
article explaining it all soon, but for now, here's the really quick and
dirty version. I haven't gotten my version perfect yet, I'm still not happy
with the URLs I'm calling to retrieve the data, but that's not a huge deal.
Anyway, on with the show.

First of all, here's your two form elements.

$this->addElement('FilteringSelect', 'fk_client_id', array(
'label'=> 'Client:',
'storeId' => 'clientStore',
'storeType'=> 'dojo.data.ItemFileReadStore',
'storeParams' => array( 'url' =>
'/clients/autocomplete/format/ajax?autocomplete=1&str=*',),
'autoComplete'   => 'false',
'hasDownArrow'   => 'true',
'id' => 'fk_client_id',
));

$this->addElement('FilteringSelect', 'fk_client_contact_id', array(
'label'=> 'Client contact:',
'storeId' => 'clientContactStore',
'storeType'=> 'dojo.data.ItemFileReadStore',
'autoComplete'   => 'false',
'hasDownArrow'   => 'true',
'id' => 'fk_client_contact_id',
));

Now for the javascript, this has to appear somewhere on the page that
contains the form.

dojo.connect(dijit.byId('fk_client_id'), 'onChange', function () {
dijit.byId('fk_client_contact_id').store = new
dojo.data.ItemFileReadStore({ url:
"/clientcontacts/autocomplete/format/ajax?autocomplete=1&fk_client_id=" +
dijit.byId("fk_client_id").value });
});


As for the URLs for the Datastores, they are kind of an exercise for the
reader, other than to say they obviously should filter correctly on the
passed parameters, and they have to return JSON. This part was pretty
annoying, but I eventually found that a function like this returns the
correct JSON format:

public function prepareAutoCompletion($data) {
$items = array();
foreach ($data as $key => $value) {
$items[] = array('label' => $value, 'name' => $value, 'key' =>
$key);
}
$final = array(
'identifier' => 'key',
'items' => $items,
);
return $this->encodeJson($final);
}


You pass in to the function an array of id => value pairs, and it will
output the correct JSON for the FilteringSelects. If you use the built in
AutoCompleteDojo helper, it won't use the id from your table as the value
that the form submits, which is pretty much useless.

Oh, and one more trick, for the Edit action, you are going to need to
include something like this:

$form->populate($row);
$form->getElement('fk_client_contact_id')->setStoreParams(array( 'url' =>
'/clientcontacts/autocomplete/format/ajax?&autocomplete=1&fk_client_id=' .
$form->getElement('fk_client_id')->getValue() ));

So that it prepopulates the form correctly.

I promise I'll write up a really impressive document that spells this whole
thing out in painstaking detail, I'm just absolutely flat out until
christmas, I haven't had any time!


On Tue, Dec 9, 2008 at 10:58 AM, Ace Paul <[EMAIL PROTECTED]> wrote:

>
> I have a form, which I would like to use dependent drop downs in. I can't
> seem to find anything about it hear, after looking all morning trying to
> work it out.
> I have one field "race_country"
> when an option is selected I would like to show the cities in that country.
> The following is what I have currently in the form, which will show all
> countries and all cities.
> Any help would be great. thanks
>
> $table = new Country();
> foreach ($table->fetchAll() as $c) {
>$country->addMultiOption($c->country_id, $c->country_name);
> }
>  $this->addElement( $country);
>
>  $city = new Zend_Form_Element_Select('race_city');
> $city->setLabel('City')
> ->setRequired(true);
>
> $table = new City();
> foreach ($table->fetchAll() as $c) {
>$city->addMultiOption($c->city_id, $c->city_name);
> }
>  $this->addElement( $city);
> --
> View this message in context:
> http://www.nabble.com/How-to-set-up-dependant-dropdowns-in-form-tp20907379p20907379.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


[fw-general] How to set up dependant dropdowns in form

2008-12-08 Thread Ace Paul

I have a form, which I would like to use dependent drop downs in. I can't
seem to find anything about it hear, after looking all morning trying to
work it out.
I have one field "race_country"
when an option is selected I would like to show the cities in that country.
The following is what I have currently in the form, which will show all
countries and all cities.
Any help would be great. thanks

$table = new Country();
foreach ($table->fetchAll() as $c) {
$country->addMultiOption($c->country_id, $c->country_name);
}
 $this->addElement( $country);
  
 $city = new Zend_Form_Element_Select('race_city');
$city->setLabel('City')
 ->setRequired(true);
 
$table = new City();
foreach ($table->fetchAll() as $c) {
$city->addMultiOption($c->city_id, $c->city_name);
}
 $this->addElement( $city);
-- 
View this message in context: 
http://www.nabble.com/How-to-set-up-dependant-dropdowns-in-form-tp20907379p20907379.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] 'Normalising' of Controller and Action names

2008-12-08 Thread Tim Nagel
I am trying to create a basic content serving controller where user created
data is served using the action name as a name specified by the user.
(Overridden __call in the controller).

I have hit a bit of a snag in that it looks like Zend is normalising
(lowercasing and doing funky stuff with camelcase and underscores) action
values which isnt ideal for my situation. Is there a way to turn this
behaviour off? Or even a poke in the right direction of where its occuring?
I havent had a chance to delve into the router/front controller/dispatcher
but my quick look didnt uncover anything.



Thanks

Tim


AW: [fw-general] How to test downwardly compatible Methodes with PHPUnit

2008-12-08 Thread Sebastian Hopfe
Hi till,

i know that this function is added since a long time. This was only an
example.
But how i could write a PHPUnit test - so that i get a CodeCoverage by 100%
and the test is solved complete?

I mean - the ZF is solicited with a 100% Code Coverage.

How this should work at following issue?

http://framework.zend.com/issues/browse/ZF-5091

thanks for spending time in my question.

Best regards
Sebastian

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von till
Gesendet: Montag, 8. Dezember 2008 23:41
An: Sebastian Hopfe
Cc: fw-general@lists.zend.com
Betreff: Re: [fw-general] How to test downwardly compatible Methodes with
PHPUnit

On Mon, Dec 8, 2008 at 11:24 PM, Sebastian Hopfe <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
> i want to open a discussion about PHPUnit. First of all – I love PHPUnit –
> but i see some problems by testing methodes which providing downwardly
> compatible.
>
>
>
>  The function „file_gets_content" is in old php versions not available. We
> should check this with function_exists() – if these is false we should
write
> an alternative function.
>
> This is only an example.

Added in 5.0.0. :P

> But how we could test this with PHPUnit?

On a more serious note...

I'm not sure how to do that with PHPUnit, but you can run PHPT tests
with PHPUnit as well, and in PHPT you can do the following:

--TEST--
This is an example test.
--SKIPIF--
if (!function_exists('file_get_contents')) die('SKIP
file_get_contents() does not exist');
--FILE--
http://domain.tld');
var_dump($resp);
?>
--EXPECT--
bool(false)


You can run this test with pear run-tests foo.phpt, but also use an
extension which is bundled with PHPUnit to include phpt's in the usual
phpunit AllTests.php run.

For example:


Cheers,
Till



Re: [fw-general] PHP version requirement

2008-12-08 Thread till
Zend_File seems to lead the list, but only with 5.2.1, not 5.2.4.

And if anyone cares, here are the version requirements per component
(tests not included):

Zend_Acl: 5.0.0
Zend_Amf: 5.0.0
Zend_Auth: 5.0.0
Zend_Cache: 5.0.0
Zend_Captcha: 5.1.0
Zend_Config: 5.0.0
Zend_Console: 5.0.0
Zend_Controller: 5.0.0
Zend_Currency: 5.0.0
Zend_Date: 5.1.0
Zend_Db: 5.1.0
Zend_Debug: 5.0.0
Zend_Dojo: 5.0.0
Zend_Dom: 5.0.0
Zend_Exception: 4.0.0
Zend_Feed: 5.1.1
Zend_File: 5.2.1 (!)
Zend_Filter: 5.1.0
Zend_Form: 5.0.0
Zend_Gdata: 5.1.0
Zend_Http: 5.1.0
Zend_InfoCard: 5.0.0
Zend_Json: 5.0.0
Zend_Layout: 5.0.0
Zend_Ldap: 5.1.0
Zend_Loader: 5.1.2
Zend_Locale: 5.0.0
Zend_Log: 5.0.0
Zend_Mail: 5.1.0
Zend_Measure: 5.0.0
Zend_Memory: 5.0.0
Zend_Mime: 5.0.0
Zend_OpenId: 5.2.0
Zend_Paginator: 5.0.0
Zend_Pdf: 5.0.0
Zend_ProgressBar: 5.0.0
Zend_Registry: 5.0.0
Zend_Request: 5.0.0
Zend_Rest: 5.0.0
Zend_Search: 5.0.0
Zend_Server: 5.0.0
Zend_Service: 5.0.0
Zend_Session: 5.0.0
Zend_Soap: 5.0.0
Zend_Test: 5.0.0
Zend_Text: 5.0.0
Zend_TimeSync: 5.0.0
Zend_Translate: 5.0.0
Zend_Uri: 5.0.0
Zend_Validate: 5.1.0
Zend_Version: 5.0.0
Zend_View: 5.0.0
Zend_Wildfire: 5.0.0
Zend_XmlRpc: 5.0.0

Cheers,
Till


Re: [fw-general] PHP version requirement

2008-12-08 Thread Jack Sleight
OK, thanks everyone.

2008/12/8 Thomas Weidner <[EMAIL PROTECTED]>:
> 5.1.4 < 1.7
> 5.2.4 >= 1.7
>
> All other things are not supported.
> For example IPv6 support and file progress need 5.2.4.
>
> But there is no collection of components as it would not be maintainable.
> Therefor when using < 5.2.4 stay with 1.6 else go with actual release.
>
> It could work, but we can not guarantee this.
>
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
>
> - Original Message - From: "Jack Sleight" <[EMAIL PROTECTED]>
> To: "Zend Framework General" 
> Sent: Monday, December 08, 2008 10:37 PM
> Subject: [fw-general] PHP version requirement
>
>
>> Hi Everyone,
>> Just a quick question. I noticed the required version of PHP has now
>> gone up to 5.2.4 (last time I checked it was 5.1.4). This isn't a
>> problem, but I'd just be interested to know which which components
>> actually require 5.2.4 to function correctly rather than 5.1.4?
>> Obviously 5.2.4 is better, and I always encourage people to upgrade to
>> the latest, but I want to know if my applications would still run
>> correctly on 5.1.4 using ZF 1.7.1.
>>
>> Thanks,
>> --
>> Jack
>



-- 
Jack


Re: [fw-general] Newbie question regarding parameters in the url

2008-12-08 Thread Michael Crumm
Julian,

I'm going to try and provide some help, please let me know if you need
further explanation.

First, from the API Docs:

Zend_View_Helper_Url

url (line 46)

Generates an url given the name of a route.

   - return: Url for the link href attribute.
   - access: public

 string url ([ $urlOptions = array()], [mixed $name = null], [bool $reset =
false], [ $encode = true])

   - array $urlOptions: Options passed to the assemble method of the Route
   object.
   - mixed $name: The name of a Route to use. If null it will use the
   current Route
   - bool $reset: Whether or not to reset the route defaults with those
   provided
   -  $encode

the value you are going to be interested in is '$reset'.  Set this to true
on links where parameters should not persist.

-
Example:

I persist params
So do I.
I don't

Hope this points you in the right direction!

-Mike


On Mon, Dec 8, 2008 at 11:41 AM, Julian102 <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> Im new to zend framework and i am having difficulty understanding how
> parameters are used in the url.
>
> Currently I am making urls using the following code -
>
>
> $this->url(array('controller'=>'controllername','action'=>'actionname','paramname'=>'paramvalue'))
>
> The problem is the parameter is staying in the url in everypage I go to
> following navigating to the page created using the previous code.
>
> I realise that this is probably a ridicuously simple question but I need to
> be certain that I understand why this is happening as its quite a
> fundamental part of the framework
>
> Any help would be greatly appreciated
>
> Thank You
>
> Julian
> --
> View this message in context:
> http://www.nabble.com/Newbie-question-regarding-parameters-in-the-url-tp20899971p20899971.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


Re: [fw-general] How to test downwardly compatible Methodes with PHPUnit

2008-12-08 Thread till
On Mon, Dec 8, 2008 at 11:24 PM, Sebastian Hopfe <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
> i want to open a discussion about PHPUnit. First of all – I love PHPUnit –
> but i see some problems by testing methodes which providing downwardly
> compatible.
>
>
>
>  The function „file_gets_content" is in old php versions not available. We
> should check this with function_exists() – if these is false we should write
> an alternative function.
>
> This is only an example.

Added in 5.0.0. :P

> But how we could test this with PHPUnit?

On a more serious note...

I'm not sure how to do that with PHPUnit, but you can run PHPT tests
with PHPUnit as well, and in PHPT you can do the following:

--TEST--
This is an example test.
--SKIPIF--
if (!function_exists('file_get_contents')) die('SKIP
file_get_contents() does not exist');
--FILE--
http://domain.tld');
var_dump($resp);
?>
--EXPECT--
bool(false)


You can run this test with pear run-tests foo.phpt, but also use an
extension which is bundled with PHPUnit to include phpt's in the usual
phpunit AllTests.php run.

For example:


Cheers,
Till


[fw-general] How to test downwardly compatible Methodes with PHPUnit

2008-12-08 Thread Sebastian Hopfe
Hi,

 

i want to open a discussion about PHPUnit. First of all - I love PHPUnit -
but i see some problems by testing methodes which providing downwardly
compatible.

 

 The function "file_gets_content" is in old php versions not available. We
should check this with function_exists() - if these is false we should write
an alternative function.

This is only an example.

 

But how we could test this with PHPUnit? 

 

Best regards

Sebastian

 



Re: [fw-general] PHP version requirement

2008-12-08 Thread Thomas Weidner

5.1.4 < 1.7
5.2.4 >= 1.7

All other things are not supported.
For example IPv6 support and file progress need 5.2.4.

But there is no collection of components as it would not be maintainable.
Therefor when using < 5.2.4 stay with 1.6 else go with actual release.

It could work, but we can not guarantee this.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: "Jack Sleight" <[EMAIL PROTECTED]>

To: "Zend Framework General" 
Sent: Monday, December 08, 2008 10:37 PM
Subject: [fw-general] PHP version requirement



Hi Everyone,
Just a quick question. I noticed the required version of PHP has now
gone up to 5.2.4 (last time I checked it was 5.1.4). This isn't a
problem, but I'd just be interested to know which which components
actually require 5.2.4 to function correctly rather than 5.1.4?
Obviously 5.2.4 is better, and I always encourage people to upgrade to
the latest, but I want to know if my applications would still run
correctly on 5.1.4 using ZF 1.7.1.

Thanks,
--
Jack


AW: [fw-general] PHP version requirement

2008-12-08 Thread Sebastian Hopfe
Hi,

i know that the php_ini_loaded_file() is supported since 5.2.4. This
function is used in Zend_Session (imho a core Class). But I think the Zend
Framework should be downwardly compatible to 5.2.0 Because in the most
production server - this should be the latest version.

I think at debian you could get 5.2.0-8 actually.
 

-Ursprüngliche Nachricht-
Von: Jack Sleight [mailto:[EMAIL PROTECTED] 
Gesendet: Montag, 8. Dezember 2008 22:37
An: Zend Framework General
Betreff: [fw-general] PHP version requirement

Hi Everyone,
Just a quick question. I noticed the required version of PHP has now
gone up to 5.2.4 (last time I checked it was 5.1.4). This isn't a
problem, but I'd just be interested to know which which components
actually require 5.2.4 to function correctly rather than 5.1.4?
Obviously 5.2.4 is better, and I always encourage people to upgrade to
the latest, but I want to know if my applications would still run
correctly on 5.1.4 using ZF 1.7.1.

Thanks,
-- 
Jack



Re: [fw-general] PHP version requirement

2008-12-08 Thread Matthew Weier O'Phinney
-- Jack Sleight <[EMAIL PROTECTED]> wrote
(on Monday, 08 December 2008, 09:37 PM +):
> Just a quick question. I noticed the required version of PHP has now
> gone up to 5.2.4 (last time I checked it was 5.1.4). This isn't a
> problem, but I'd just be interested to know which which components
> actually require 5.2.4 to function correctly rather than 5.1.4?
> Obviously 5.2.4 is better, and I always encourage people to upgrade to
> the latest, but I want to know if my applications would still run
> correctly on 5.1.4 using ZF 1.7.1.

Most applications should run with 5.1.4 still. However, there were some
functions we needed to use while unit testing that required 5.2.3 and
up, and there are some extensions and components used by OpenId,
InfoCard, and a few others that are only available in the 5.2.x series.

The decision on 5.2.4 was based on an evaluation of the supported PHP
version of a variety of leading linux and *bsd distributions. RHEL and
debian stable are some of the lone holdouts. A new version of Debian
stable (lenny) will be releasing any time now, and will support 5.2.6.
RHEL, on the other hand, still only suports 5.1.4, and a new version
will not be released until sometime in *2010*; holding back the minimum
required version for RHEL is simply not an option, as PHP changes too
much in the duration of an RHEL LTS version.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


[fw-general] PHP version requirement

2008-12-08 Thread Jack Sleight
Hi Everyone,
Just a quick question. I noticed the required version of PHP has now
gone up to 5.2.4 (last time I checked it was 5.1.4). This isn't a
problem, but I'd just be interested to know which which components
actually require 5.2.4 to function correctly rather than 5.1.4?
Obviously 5.2.4 is better, and I always encourage people to upgrade to
the latest, but I want to know if my applications would still run
correctly on 5.1.4 using ZF 1.7.1.

Thanks,
-- 
Jack


Re: [fw-general] How to add a comment into the Issue Tracker

2008-12-08 Thread Bart McLeod




You have to wait for the CLA to be passed...
-Bart

Sebastian Hopfe schreef:

  
  

  
  
  Hi,
   
  i think it’s a little problem. I want to add a
comment into
a issue as the Issue Tracker.
   
  http://framework.zend.com/issues/browse/ZF-5091
   
  How – i can add a comment to this issue? I
registered a
account at the Issue Tracker – but there is no button available. The
left
administration panel gives me an information:
   
  

  

Operations 

  

  
   
  

  

Voting: 
You have already voted in support of this issue. Unvote
if it is not important to you 

  
  

Watching:
You are watching this issue. You will be notified of all changes. Stop
watching. 

  
  

Worklog:
You don't have permission to work on this issue. 

  
  

Google
issue summary 

  

  
   
  Do i need special right for my action? I send
the CLA today.
Must i wait for the completion of this CLA progres?
   
  Best regards
  Sebastian
   
  


-- 

  

  Bart McLeod
  Space Web Internet Team
Middenlaan 47
6865 VN Heveadorp
The Netherlands
  t +31(0)26 3392952
  m 06 51 51 89 71
  @ [EMAIL PROTECTED]
  www.spaceweb.nl
  
  

  
  Bart McLeod is a Zend Certified Engineer.
  
  
  Click to
verify!
  
  
  

  






[fw-general] How to add a comment into the Issue Tracker

2008-12-08 Thread Sebastian Hopfe
Hi,

 

i think it's a little problem. I want to add a comment into a issue as the
Issue Tracker.

 

http://framework.zend.com/issues/browse/ZF-5091

 

How - i can add a comment to this issue? I registered a account at the Issue
Tracker - but there is no button available. The left administration panel
gives me an information:

 


Operations 

 


http://framework.zend.com/issues/images/icons/bullet_creme.gifVoting: 
You have already voted in support of this issue. Unvote
  if it is not important to you 


http://framework.zend.com/issues/images/icons/bullet_creme.gifWatching:
You are watching this issue. You will be notified of all changes. Stop
  watching. 


http://framework.zend.com/issues/images/icons/bullet_creme.gifWorklog:
You don't have permission to work on this issue. 


http://framework.zend.com/issues/images/icons/bullet_creme.gifGoogle
  issue summary 

 

Do i need special right for my action? I send the CLA today. Must i wait for
the completion of this CLA progres?

 

Best regards

Sebastian

 

<>

Re: [fw-general] display images

2008-12-08 Thread Michael Crumm
Ankur,

If by 'path ambiguity' you mean that your image files are stored outside
your webroot, then i think i can at least lead you in the right direction.

I use a controller action to output an image from the file system.  The
easiest way to do this is to grab ahold of the response object from within
your controller action and set the appropriate headers and content for the
media you want to output.

Here's my controller file:

_helper->layout->disableLayout();
$this->_helper->ViewRenderer->setNoRender();

$file = '/path/to/file';

$info = getimagesize($file);
$mimeType = $info['mime'];

$size = filesize($file);

$data = file_get_contents($file);

$response = $this->getResponse();
$response->setHeader('Content-Type', $mimeType, true);
$response->setHeader('Content-Length', $size, true);
$response->setBody($data);
$response->sendResponse();
die();
}
}


I purposefully included the beginning php tag so that you would see that I
omitted the closing tag.  This is good practice all the time, but invaluable
here.  An additional whitespace following a closing tag in this instance
would result in the image not appearing in the browser.

getimagesize(), filesize(), and file_get_contents() you are most likely
already familiar with.  If not, take a quick trip to php.net for some more
info.  (fyi, the name getimagesize is misleading.  it does more than that.)

Hope this helps.

-Mike

The only rea

On Mon, Dec 8, 2008 at 1:20 AM, ankuraeran <[EMAIL PROTECTED]> wrote:

>
> I am newbie to ZF. I could successfully create file upload action but due
> to
> some path abbiguity I am unable to display that uploaded image in browse.
> The path where I put the uploaded image is
>
> /data/uploads/
>
> Will anybody please guide me how to access the image in template.
>
> Regards,
> Ankur
> --
> View this message in context:
> http://www.nabble.com/display-images-tp20890555p20890555.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


[fw-general] Newbie question regarding parameters in the url

2008-12-08 Thread Julian102

Hello,

Im new to zend framework and i am having difficulty understanding how
parameters are used in the url.

Currently I am making urls using the following code - 

$this->url(array('controller'=>'controllername','action'=>'actionname','paramname'=>'paramvalue'))

The problem is the parameter is staying in the url in everypage I go to
following navigating to the page created using the previous code.

I realise that this is probably a ridicuously simple question but I need to
be certain that I understand why this is happening as its quite a
fundamental part of the framework

Any help would be greatly appreciated

Thank You

Julian
-- 
View this message in context: 
http://www.nabble.com/Newbie-question-regarding-parameters-in-the-url-tp20899971p20899971.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] generic view for Json contextSwitch

2008-12-08 Thread Ben Scholzen 'DASPRiD'
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

When you just want to send JSON, and not render a view, why don't you
simply use $this->_helper->json(); ?

Ben
...
:  ___   _   ___ ___ ___ _ ___:
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:::
: Web: http://www.dasprids.de :
: E-mail : [EMAIL PROTECTED]   :
: Jabber : [EMAIL PROTECTED] :
: ICQ: 105677955  :
:::


Ralikwen schrieb:
> Seems like this is an issue that has been unresolved for quite some time now
> - I found here a similar topic from August
> http://www.nabble.com/contextSwitch---AjaxContent-td18866597.html
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkk9UegACgkQ0HfT5Ws789B4pwCgxNn1JgaKQq3hle/vAmcDrUJY
rsEAnAk71qF4Lr7C1gqwNEBE/09Qn6wB
=6qS2
-END PGP SIGNATURE-


Re: [fw-general] generic view for Json contextSwitch

2008-12-08 Thread Ralikwen

Seems like this is an issue that has been unresolved for quite some time now
- I found here a similar topic from August
http://www.nabble.com/contextSwitch---AjaxContent-td18866597.html
-- 
View this message in context: 
http://www.nabble.com/generic-view-for-Json-contextSwitch-tp20631627p20898796.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] RE: Getting Zend_(Dojo)_Form to output variable forms

2008-12-08 Thread Jeremy Brown
Any ideas?


Jeremy Brown, ZCE
Senior Web Developer
Spear One
972.661.6038
www.spearone.com

From: Jeremy Brown [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2008 3:12 PM
To: fw-general@lists.zend.com
Subject: [fw-general] Getting Zend_(Dojo)_Form to output variable forms

I know how to create individual Zend_Form objects and display them in my view, 
error check them, etc.  Now what I am attempting to do though is have a form 
class that can be called via various methods and have different combinations of 
the form (output) be displayed.

If I only assign the first call of $form->assignToExisting() to my view, I get 
one form with one text field with the value of 'Test Field 1' as expected. If I 
have both calls though, I get two forms (as expected) but both have the same 
field of 'Test Field 2'. Am I not using clearElements() like I think it should 
be used?

Or is there a better way I should be approaching this?

Thanks!!


In my controller


$form = new forms_exception_assignPartnerAliases();

$this->view->form_assignToExisting   = $form->assignToExisting();
$this->view->form_createNew = $form->createNew();


Form Class
--

class forms_exception_assignPartnerAliases extends Zend_Dojo_Form
{
private $_request;

// Normally a definition here - saving space in this post
protected $_elementDecorators = null;

public function init()
{
// Get request object
$this->_request = 
Zend_Controller_Front::getInstance()->getRequest();

$this->setMethod( 'post' )
->setAction( 
'/manage/exception/assign/by/partner' )
->setName( 'assign' );
}

public function assignToExisting()
{
// Clear all previous elements since this form 
object is being used to display two different forms via shared code base
$this->clearElements();

$this->_addHiddenElements();

$this->addElement(
'text',
'description',
array(
'decorators'
=> $this->_elementDecorators,
'label' 
   => 'Test Field 1',
'value' 
  => 'test1',
)
);

return $this;
}

public function createNew()
{
// Clear all previous elements since this form 
object is being used to display two different forms via shared code base
$this->clearElements();

$this->_addHiddenElements();

$this->addElement(
'text',
'description',
array(
'decorators'
=> $this->_elementDecorators,
'label' 
   => 'Test Field 2',
'value' 
  => 'test2',
)
);

return $this;
}

private function _addHiddenElements()
{
$this->addElement(
'hidden',
'qualifier',
array(
'value'   => 
$this->_request->getParam('qualifier'),
)
);
}
}



Jeremy Brown, ZCE
Senior Web Developer
Spear One
972.661.6038
www.spearone.com



Re: [fw-general] Include directive..

2008-12-08 Thread Ralph Schindler


Hmm, I think you are confusing the apache config files with php files.

> 
> [CODE]
> 
> # To customize this VirtualHost use an include file at the following
> location
>  Include
> "/usr/local/apache/conf/userdata/std/2/domains/mydomain.co.za/me.conf"
> [/CODE]
> 
> And then me.conf looks like this:
> [CODE]
> Include "/home/domain/apps"
> Include "/home/domain/apps/models"
> Include "/home/domain/apps/lib"
> [/CODE]

What it is said that you need those paths in your application, you need to
put those directives (which would be written out as the following)

Set_include_path('/home/domain/apps' . PATH_SEPARATOR .
 '/home/domain/apps/models' . PATH_SEPARATOR .
 '/home/domain/apps/lib');

This would be done inside your index.php or your bootstrap.php files and NOT
inside your apache configuration files.

For a better understanding of where these types of things go, have a look at
the Quickstart guide and the quickstart application:

http://staging.framework.zend.com/docs/quickstart
 
-ralph


-- 
Ralph Schindler
Software Engineer | [EMAIL PROTECTED]
Zend Framework| http://framework.zend.com/




Re: [fw-general] Zend Lucene don't work with 64bit and Zend Optimizer. Zend or Zend Framework, take responsibility!

2008-12-08 Thread Ralph Schindler
Hey Joe,

> Why?
> We have Zend Search Lucene file with instruction if ($docStoreOffset
> != (int)0x)
> If you run this on 32bit or 64bit system it will work just fine.
> 
> Then you encode it with 32bit Zend Encoder (64bit Zend Encoder does not exist)
> When you run this encoded file on 64bit system it fails. Apparently
> during encode process the 64bit-sensitive instruciotn gets killed and
> on 64bit system it doesn't work.

I'll start looking into this, but just to confirm I guess I need to
understand the problem a bit more.

Which files are you encoding?  Your application, or the ZF library, or both?

Is there a simple test (with minimal code) that would demonstrate the
problem?  I am attempting to understand your code above, but I am not quite
sure what the value of $docStoreOffset is.

I have a Redhat 64bit machine at my disposal so I will attempt to confirm
and ask around the company.

-ralph


-- 
Ralph Schindler
Software Engineer | [EMAIL PROTECTED]
Zend Framework| http://framework.zend.com/




Re: [fw-general] unable to disable Dojo

2008-12-08 Thread Guillaume Oriol

Thank you Matthew.
Once again you've found the answer AND the solution.
--
Best regards


Matthew Weier O'Phinney-3 wrote:
> 
> -- Guillaume Oriol <[EMAIL PROTECTED]> wrote
> (on Thursday, 04 December 2008, 11:40 PM -0800):
>> Thank you Matthew for your answer
>> but I don't use Zend_Dojo_Form in my form, neither any Dijit.
>> My form extends Zend_Form.
>> 
>> Why would ZF enable Dojo in such a case?
> 
> I know what's going on.
> 
> There is a standard view helper, Form, and one of the same name in the
> Zend_Dojo_View_Helper tree. Because your view object has been
> initialized with the Dojo view helper path, it's finding the Dojo Form
> view helper and using that over the standard one.
> 
> The easiest way around this is to, in your form's render method, remove
> the Dojo view helper path:
> 
> public function render(Zend_View_Interface $view = null)
> {
> if (null === $view) {
> $view = $this->getView();
> }
> $loader = $view->getPluginLoader('helper');
> if ($loader->getPaths('Zend_Dojo_View_Helper')) {
> $loader->removePrefixPath('Zend_Dojo_View_Helper');
> }
> return parent::render($view);
> }
> 
> 
>> Matthew Weier O'Phinney-3 wrote:
>> > 
>> > -- Guillaume Oriol <[EMAIL PROTECTED]> wrote
>> > (on Thursday, 04 December 2008, 01:38 AM -0800):
>> >> Hi, I am facing a problem with Dojo: I set up Dojo to be disabled by
>> >> default
>> >> but it is still enabled in my login form.
>> >> 
>> >> 
>> >>  1. I've put in my bootstrap file those two lines (set up Dojo
>> >> environment but
>> >> disable it by default):
>> >  
>> >>  2. Then, in my authentication controller:
>> > 
>> >>  3. My form extends Zend_Form (NOT Zend_Dojo_Form). Furthermore, I
>> only
>> >> use
>> >> plain elements that are not Dijits : Zend_Form_Element_Text,
>> >> Zend_Form_Element_Password et Zend_Form_Element_Submit.
>> >>  4. My view script is very short:
>> > 
>> >>  5. And this view script is invoked by the layout where one can find:
>> >  
>> >> 
>> >> But, in the generated HTML page, I find in the HEAD tag:
>> > 
>> > 
>> > So, Zend_Dojo_Form utilizes the Dojo form view helper.. so rendering
>> > your form renders that helper. All Dijit view helpers, on
>> instantiation,
>> > enable the dojo() view helper. So, my recommendations are to either:
>> > 
>> >   * not use Zend_Dojo_Form if you're not actually using any
>> > dojo-specific elements
>> >   * Call $this->dojo()->disable(); after you render the form
>> > 
>> > -- 
>> > Matthew Weier O'Phinney
>> > Software Architect   | [EMAIL PROTECTED]
>> > Zend Framework   | http://framework.zend.com/
>> > 
>> > 
>> 
>> 
>> -
>> Guillaume ORIOL
>> Sofware architect
>> Technema
>> -- 
>> View this message in context:
>> http://www.nabble.com/unable-to-disable-Dojo-tp20830062p20849091.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>> 
> 
> -- 
> Matthew Weier O'Phinney
> Software Architect   | [EMAIL PROTECTED]
> Zend Framework   | http://framework.zend.com/
> 
> 


-
Guillaume ORIOL
Sofware architect
Technema
-- 
View this message in context: 
http://www.nabble.com/unable-to-disable-Dojo-tp20830062p20895715.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Lucene don't work with 64bit and Zend Optimizer. Zend or Zend Framework, take responsibility!

2008-12-08 Thread till
On Mon, Dec 8, 2008 at 12:50 PM, Joe Kramer <[EMAIL PROTECTED]> wrote:
> Hello,
>
> We're having this problem for almost a year soon.
>
> Zend Search Lucene uses large integer for index file offset.
> It was fixed so it works on 64bit system. But only on non-encoded files.
> If you're using Zend Optimizer it will not work.
>
> Why?
> We have Zend Search Lucene file with instruction if ($docStoreOffset
> != (int)0x)
> If you run this on 32bit or 64bit system it will work just fine.
>
> Then you encode it with 32bit Zend Encoder (64bit Zend Encoder does not exist)

You can't really expect this to work. Aside from all the bells and
whistles - it's a different architecture. ;-) See the requirements[1]
-- it's all 32bit.

A quickfix would be setting up a 32bit vm and running your code in there.

What you want/need is a 64bit Zend Guard (encoder) though. And in the
end, you need to take that issue to your sales@ contact at Zend. They
should fix this for you. Not the framework people. The framework
people have little to do with the commercial product. Many people who
contribute to the framework are not even employed by Zend.

And if Zend doesn't want to sell you a 64bit encoder, look for
alternatives, for example - check out Source Guardian[2]. They offer
32 and 64bit loader. So I'm assuming that their encoder supports 64bit
as well. There's also an encoder by Ioncube[3], but I have no idea
what the platform requirements are.

Till

[1]: http://www.zend.com/de/products/guard/system-requirements
[2]: http://www.sourceguardian.com/php_encoder.html
[3]: http://www.ioncube.com/sa_encoder.php


[fw-general] Include directive..

2008-12-08 Thread dele454

Hi,

I am modifying the apache config file on my domain to include the path to
the Zend Framework on a specified location outside the public folder.

So in my http.conf file i simply include the path to where the includes file
is to customise the virtual host:

[CODE]

# To customize this VirtualHost use an include file at the following
location
 Include
"/usr/local/apache/conf/userdata/std/2/domains/mydomain.co.za/me.conf"
[/CODE]

And then me.conf looks like this:
[CODE]
Include "/home/domain/apps"
Include "/home/domain/apps/models"
Include "/home/domain/apps/lib"
[/CODE]

But then i get this error:

[CODE]
Failed to generate a syntactically correct Apache configuration.
Bad configuration file located at
/usr/local/apache/conf/httpd.conf.1228614930
Error:
Configuration problem detected on line 277 of file
/usr/local/apache/conf/httpd.conf.1228614930:: Syntax error on line
1 of /usr/local/apache/conf/userdata/std/2/domain/mydomain.co.za/me.conf:
Syntax error on line 1 of /home/domain/apps/Bootstrap.php:
/home/maineven/apps/Bootstrap.php:1:  was not closed.[/CODE]

But i do have the http://www.nabble.com/Include-directive..-tp20893928p20893928.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend Lucene don't work with 64bit and Zend Optimizer. Zend or Zend Framework, take responsibility!

2008-12-08 Thread Joe Kramer
Hello,

We're having this problem for almost a year soon.

Zend Search Lucene uses large integer for index file offset.
It was fixed so it works on 64bit system. But only on non-encoded files.
If you're using Zend Optimizer it will not work.

Why?
We have Zend Search Lucene file with instruction if ($docStoreOffset
!= (int)0x)
If you run this on 32bit or 64bit system it will work just fine.

Then you encode it with 32bit Zend Encoder (64bit Zend Encoder does not exist)
When you run this encoded file on 64bit system it fails. Apparently
during encode process the 64bit-sensitive instruciotn gets killed and
on 64bit system it doesn't work.

We've been forwarded from Zend to Zend Framework guys many times,
neither of them takes the responsibility.

We can't hope that Zend will develop 64bit Encdoer or 32bit Encoder
with 64bit encoding option.
Zend Framework guys position that it's a problem with "another
product" not Zend Framework. So they can't/won't fix it. "Alien"
product form company called Zend? And they probably work in the same
room!
Apparently it's not possible to fix 64bit Zend Optimizer either
because it plays back 32bit encoded files that have the bug introduced
during conversion done by Zend Encoder.

There's no solution in this situation?
Zend can't fix interoperability with Zend product?

Thanks.


RE: [fw-general] 1.7.1 Zend_Controller_Request_Http Error

2008-12-08 Thread Marco Kaiser
Hi Steven,

you change a super global variable
>From any value to '' (empty String) so this warning is correct.
Change your Code !

-- Marco

-Original Message-
From: Steven Brown [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 08, 2008 12:42 PM
To: fw-general@lists.zend.com
Subject: [fw-general] 1.7.1 Zend_Controller_Request_Http Error

Hi guys,

I am getting the following in ZF 1.7.1:

Error Number: 2
Error Type: PHP WARNING
Error String: strstr(): Empty delimiter.
Error File: /path/to/my/site/library/Zend/Controller/Request/Http.php
Error Line: 393

The line is:

if (isset($_SERVER['HTTP_HOST']) && strstr($requestUri,
$_SERVER['HTTP_HOST'])) {

I am running a PHP file from the command line, it has:

$_SERVER['REQUEST_URI'] = '/transcode/';
$_SERVER['HTTP_HOST'] = '';
// Bootstrap code etc. etc.

This worked in 1.7.0...should I change my code or should ZF be changed?

Cheers,
Steven




[fw-general] 1.7.1 Zend_Controller_Request_Http Error

2008-12-08 Thread Steven Brown
Hi guys,

I am getting the following in ZF 1.7.1:

Error Number: 2
Error Type: PHP WARNING
Error String: strstr(): Empty delimiter.
Error File: /path/to/my/site/library/Zend/Controller/Request/Http.php
Error Line: 393

The line is:

if (isset($_SERVER['HTTP_HOST']) && strstr($requestUri,
$_SERVER['HTTP_HOST'])) {

I am running a PHP file from the command line, it has:

$_SERVER['REQUEST_URI'] = '/transcode/';
$_SERVER['HTTP_HOST'] = '';
// Bootstrap code etc. etc.

This worked in 1.7.0...should I change my code or should ZF be changed?

Cheers,
Steven