Re: [fw-general] Zend_Db_Mapper Proposal - Ready for Review

2009-01-28 Thread Benjamin Eberlei
Hello,

i don't have any source code to look at currently. Since this is still a 
proposal and final features can have a huge impact on how the query select and 
persist engine will look like.

I am trying to get a prototype and an example running for this proposal though 
to add some more advanced Use-Case snippets for public review.

greetings,
Benjamin

On Wednesday 28 January 2009 07:34:22 Ken Chau wrote:
> Do you have any source code laying around anywhere for us to look at? I had
> some aspirations to write an ActiveRecord component, but my recent
> experience with models (well, and PHP's lack of late static binding
> support) has led me searching for other model components. I would love to
> replace Zend_Db_Table with yours in my applications!
>
> beberlei wrote:
> > Hello everyone,
> >
> > I finished up a new proposal that would greatly enhance domain driven
> > development with the ZF: A generic data mapper component.
> >
> > http://framework.zend.com/wiki/display/ZFPROP/Zend_Db_Mapper+-+Benjamin+E
> >berlei
> >
> > Its a contrasting proposal to Zend_Db_Table, for handling the underlying
> > persistence of your application layer. Its aiming at enterprise
> > developers that need to do more than the usually siple BlogPosts <->
> > Comments <-> Tags
> > examples.
> >
> > The core concept is the Record (Entity Pattern) centric datastrcuture,
> > rather
> > than the SQL datastructure. You build your applications domain logic of
> > record
> > objects that communicate to each other and then persist them into the
> > database
> > at the end of your session with following a defined mapping scheme.
> >
> > This component therefore tries to achieve the separation of Business
> > logic from the underlying persistence.
> >
> > comments are greatly appreciated,
> > Benjamin
> >
> > --
> > Benjamin Eberlei
> > http://www.beberlei.de

-- 
Benjamin Eberlei
http://www.beberlei.de


RE: [fw-general] JotBug - A Project Management & Issue Tracker written 100% with Z F :-)

2009-01-28 Thread Jamie Sutherland
Hi Robert,

 

Projects looking good so far!

 

Just a few notes for the installation on Ubuntu 8.10 from a standard
LAMP installation you'll also require.

 

> sudo apt-get install php5-sqlite

 

Also you need to use the sqlite3 binary to create the database rather
than sqlite.

 

> sqlite3 jotbug.db3 < jotbug.sql

 

I'm sure it's simple things that most people will figure out for
themselves but through I'd mention it in case you want to include these
details in the installation page on the wiki.

 

If you want a place to host a demo give me a shout, I've got some spare
server space and I'm very interested in projects like this based on PHP.

 

I'll give more feedback when I've had a better chance to play about.

 

Cheers,

Jamie

 

 

 



From: Robert Castley [mailto:robert.cast...@macro4.com] 
Sent: 27 January 2009 23:37
To: till
Cc: fw-general@lists.zend.com
Subject: RE: [fw-general] JotBug - A Project Management & Issue Tracker
written 100% with Z F :-)

 

  
>>> Maybe you can install a demo somewhere? E.g., for JotBug itself? 

:-) 

If I could find a permenant home I would!  At the moment I am only able
to provide that facility when I am online at home as I can run it in a
VM without worrying about being hacked etc.  The URL for that is
http://rcastley.plus.com but it is NOT available 24hrs.

JotBug is real easy to install, as long as you have PHP (with PDO_SQLITE
enabled) & Apache you can run it. See
http://code.google.com/p/jotbug/wiki/Installation

As the code becomes more stable and public interest in the project
increases then I will eventually get professional hosting and use JotBug
to host itself.

- Robert 



This email has been scanned for all known viruses by the MessageLabs
Email Security Service and the Macro 4 plc internal virus protection
system.




[fw-general] Re: Zend_Captcha custom error message question

2009-01-28 Thread Deepak Shrestha
On Wed, Jan 28, 2009 at 3:23 PM, Deepak Shrestha  wrote:
> Ok,
>
>  I found a Warning displayed at top of my form after validation.
>
> The Message:
> =
> Warning: htmlspecialchars() expects parameter 1 to be string, array
> given in C:\WEB\myweb\library\Zend\View\Abstract.php on line 804
> 
>
> What does this mean?
>

If custom message is removed, form displays the error message "Captcha
value is wrong". I have tried addErrorMessage() and setErrorMessages()
with no luck.

Thanks again
-- 
===
Registered Linux User #460714
Currently Using Fedora 8, 10
===


[fw-general] Zend_amf and boolean values

2009-01-28 Thread Mark Hage
Hi,

I am trying to send a boolean from PHP to Flex.
In PHP I query a MySQL database which in a column returns a boolean.
In PHP I have class parameter where this boolean is saved.

I use Zend_AMF to communicate with my Flex app.

In Flex the PHP class is mapped to a AS class, which has the type Boolean
for this var.

Now all values are true, but not in my database.

How can this be? And how can I send the proper boolean variables?

Thanx,
Mark


[fw-general] build 3 sites on same codabase

2009-01-28 Thread johannesf

Hi

I plan to build 3 sites, based on the same controllers/models but different
views for the sites.

Like this:

/application
  /controllers
  /models
  /view
/site1
/site2
/site3


Is there anyone that have experiance in using ZF like this?

Is it a good idea or will it lead me in to big trouble ;-)


all the best/ johannes


---
Johannes - www.poetfreak.com
-- 
View this message in context: 
http://www.nabble.com/build-3-sites-on-same-codabase-tp21704318p21704318.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] DictionaryLoader.php - Uninitialized string offset: 17

2009-01-28 Thread Patrik Henningsson
Hi folks,

See task: http://framework.zend.com/issues/browse/ZF-5647

I have struggled with this one for 2 days now. Someone got an idea about
what's going on?


-- 
/Patrik


Re: [fw-general] build 3 sites on same codabase

2009-01-28 Thread Eugen_cro

does it have to be layout/views?
i would rather use some template engine in your case (smarty, dwoo.)


johannesf wrote:
> 
> Hi
> 
> I plan to build 3 sites, based on the same controllers/models but
> different views for the sites.
> 
> Like this:
> 
> /application
>   /controllers
>   /models
>   /view
> /site1
> /site2
> /site3
> 
> 
> Is there anyone that have experiance in using ZF like this?
> 
> Is it a good idea or will it lead me in to big trouble ;-)
> 
> 
> all the best/ johannes
> 
> 
> ---
> Johannes - www.poetfreak.com
> 


-
Regards, Eugen
-- 
View this message in context: 
http://www.nabble.com/build-3-sites-on-same-codabase-tp21704318p21704882.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] build 3 sites on same codabase

2009-01-28 Thread Marko Korhonen

Hello,

I have following setup in my Linux server:

/home
  /_applications
 /MyApplication
 /MyAnotherApplication
  /_library
 /Zend
 /ZendX
 /PHPExcel
 /MyZend
  /_sites
 /site1
/layouts
/cache
/logs
/user_data
/etc
config.ini
 /site2
you_know_it

So My sites "site1" and "site" are instances of "MyApplication"
site folders have the site configuration and own layouts.
There are also various folders concerning the site.


br, Marko



johannesf wrote:
> 
> Hi
> 
> I plan to build 3 sites, based on the same controllers/models but
> different views for the sites.
> 
> Like this:
> 
> /application
>   /controllers
>   /models
>   /view
> /site1
> /site2
> /site3
> 
> 
> Is there anyone that have experiance in using ZF like this?
> 
> Is it a good idea or will it lead me in to big trouble ;-)
> 
> 
> all the best/ johannes
> 
> 
> ---
> Johannes - www.poetfreak.com
> 

-- 
View this message in context: 
http://www.nabble.com/build-3-sites-on-same-codabase-tp21704318p21705354.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] build 3 sites on same codabase

2009-01-28 Thread Michel Morelli

johannesf ha scritto:

Hi

I plan to build 3 sites, based on the same controllers/models but different
views for the sites.

Like this:

/application
  /controllers
  /models
  /view
/site1
/site2
/site3

  
Views per single controller or for "view" you intend layout of the site 
(site1, site2, site3)?


M.

--
Michel 'ZioBudda' Morelli   mic...@ziobuddalabs.it
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 --  Fax: +39-0291390660

http://www.ziobudda.net ICQ: 58351764  
http://www.ziobuddalabs.it  Skype: zio_budda
http://www.ajaxblog.it			MSN: mic...@ziobuddalabs.it   
		JABBER: mic...@gmail.com




Re: [fw-general] build 3 sites on same codabase

2009-01-28 Thread Daniel Latter
appologies If I mis-understood the context in which "views" was initially
used, Marko's setup looks v.good!

Thank You
Daniel Latter


2009/1/28 Marko Korhonen 

>
> Hello,
>
> I have following setup in my Linux server:
>
> /home
>  /_applications
> /MyApplication
> /MyAnotherApplication
>  /_library
> /Zend
> /ZendX
> /PHPExcel
> /MyZend
>  /_sites
> /site1
>/layouts
>/cache
>/logs
>/user_data
>/etc
>config.ini
> /site2
>you_know_it
>
> So My sites "site1" and "site" are instances of "MyApplication"
> site folders have the site configuration and own layouts.
> There are also various folders concerning the site.
>
>
> br, Marko
>
>
>
> johannesf wrote:
> >
> > Hi
> >
> > I plan to build 3 sites, based on the same controllers/models but
> > different views for the sites.
> >
> > Like this:
> >
> > /application
> >   /controllers
> >   /models
> >   /view
> > /site1
> > /site2
> > /site3
> >
> >
> > Is there anyone that have experiance in using ZF like this?
> >
> > Is it a good idea or will it lead me in to big trouble ;-)
> >
> >
> > all the best/ johannes
> >
> >
> > ---
> > Johannes - www.poetfreak.com
> >
>
> --
> View this message in context:
> http://www.nabble.com/build-3-sites-on-same-codabase-tp21704318p21705354.html
>  Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


Re: [fw-general] Some widget issues

2009-01-28 Thread Daniel Latter
Hi,

Second thoughts I dont think you need that If your .htaccess file is as
Matthew stated initially, can you post your directory structure? maybe that
may shed some light.

Thank You
Daniel Latter


2009/1/28 Dele 

>  Thanks Daniel. Do I add it to the .htaccess on my root or the one I
> created on my images folder? Adding it to the root blocks out my stylesheet,
> images and js
>
>
>
> Thanks again for all your help
>
>
>
> Regards
>
>
>
> Dele
>
>
>
> *(C)** 071 673 4130  **(E)** d...@killerinstinct.co.za  **(S)** dee454*
>
> * *
>
> *"Start by doing what's necessary; then do what's possible; and suddenly
> you are doing the impossible. "- St. Francis of Assisi.***
>
>
> *Disclaimer: This email and any files transmitted with it are confidential
> and intended solely for the use of the individual or entity to whom they are
> addressed. If you have received this email in error please notify the system
> manager. This message contains confidential information and is intended only
> for the individual named. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and delete
> this e-mail from your system. If you are not the intended recipient you are
> notified that disclosing, copying, distributing or taking any action in
> reliance on the contents of this information is strictly prohibited.*
>
>
>
> *From:* Daniel Latter [mailto:dan.lat...@gmail.com]
> *Sent:* Wednesday, January 28, 2009 1:52 PM
>
> *To:* Dele
> *Subject:* Re: [fw-general] Some widget issues
>
>
>
> Hi,
>
>
>
> Try adding the following line to your .htaccess:
>
>
>
> RewriteCond %{REQUEST_FILENAME} !-f
>
>
>
>
> Thank You
> Daniel Latter
>
>  2009/1/28 Dele 
>
> HI Daniel,
>
>
>
> Using absolute URLs for those widget images in the stylesheet was same as
> using relative URls. They still don't show up on those Urls with parameters.
>
>
>
> Any more help? I will deeply appreciate it.
>
>
>
> Thanks
>
>
>
> Regards
>
>
>
> Dele
>
>
>
> *(C)** 071 673 4130  **(E)** d...@killerinstinct.co.za  **(S)** dee454*
>
> * *
>
> *"Start by doing what's necessary; then do what's possible; and suddenly
> you are doing the impossible. "- St. Francis of Assisi.*
>
>
> *Disclaimer: This email and any files transmitted with it are confidential
> and intended solely for the use of the individual or entity to whom they are
> addressed. If you have received this email in error please notify the system
> manager. This message contains confidential information and is intended only
> for the individual named. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and delete
> this e-mail from your system. If you are not the intended recipient you are
> notified that disclosing, copying, distributing or taking any action in
> reliance on the contents of this information is strictly prohibited.*
>
>
>
> *From:* Daniel Latter [mailto:dan.lat...@gmail.com]
> *Sent:* Tuesday, January 27, 2009 10:21 PM
>
>
> *To:* Dele
> *Subject:* Re: [fw-general] Some widget issues
>
>
>
> ok then, a quick fix would be to use absolute urls in your stylesheet to
> reference the images.
>
>
>
> eg: http://domain/images/animage.gif
>
>
>
>
> Thank You
> Daniel Latter
>
> 2009/1/27 Dele 
>
> Thanks for the clarification. I added the .htaccess file as suggested to
> the images folder that houses the tundra theme assets. As well as the folder
> that house the css style. No effect. Widget images still not showing
>
>
>
> Regards
>
>
>
> Dele
>
>
>
> *(C)** 071 673 4130  **(E)** d...@killerinstinct.co.za  **(S)** dee454*
>
> * *
>
> *"Start by doing what's necessary; then do what's possible; and suddenly
> you are doing the impossible. "- St. Francis of Assisi.*
>
>
> *Disclaimer: This email and any files transmitted with it are confidential
> and intended solely for the use of the individual or entity to whom they are
> addressed. If you have received this email in error please notify the system
> manager. This message contains confidential information and is intended only
> for the individual named. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and delete
> this e-mail from your system. If you are not the intended recipient you are
> notified that disclosing, copying, distributing or taking any action in
> reliance on the contents of this information is strictly prohibited.*
>
>
>
> *From:* Daniel Latter [mailto:dan.lat...@gmail.com]
> *Sent:* Tuesday, January 27, 2009 10:03 PM
>
>
> *To:* Dele
> *Subject:* Re: [fw-general] Some widget issues
>
>
>
> Sorry, you need to keep your original .htaccess file, create a new one with
> the contents:
>
>
>
> RewriteEngine off
>
>
>
> Then put t

Re: [fw-general] Some widget issues

2009-01-28 Thread dele454

http://www.nabble.com/file/p21706098/struc.gif 

-
dee
-- 
View this message in context: 
http://www.nabble.com/Some-widget-issues-tp21686243p21706098.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_amf and boolean values

2009-01-28 Thread wadearnold


Questionmark wrote:
> 
> In PHP I query a MySQL database which in a column returns a boolean.
> In PHP I have class parameter where this boolean is saved.
> Now all values are true, but not in my database.
> 

can you find out what the variable thinks it is on PHP. 

echo gettype($boolFromDB);

I have not seen this error. If you hard code the variable as a boolean false
is it coming back to your flex application properly? 


-- 
View this message in context: 
http://www.nabble.com/Zend_amf-and-boolean-values-tp21704223p21707241.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Form / Zend_File Upload to DB not working

2009-01-28 Thread maxarbos

Thank you. I am now able to get the file to upload, but now stuck as to how
to get it to display within ZF.

When I make the call to the code to show the image, I am just getting the
characters of the source of the image and not the image itself. I used to do
something like this when I was able to call a specific page that sent
headers and such, but with ZF and Ajax calls, it doesnt seem to work the
same.

Is there something I am missing/forgetting to get the image to display?

Thank you.



thomasW wrote:
> 
> Look at my blog.
> There is an example for file uploads.
> http://www.thomasweidner.com/flatpress/2008/11/01/file-transfer-hashing-and-other-news/
> 
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Form---Zend_File-Upload-to-DB-not-working-tp21693984p21707673.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] gzip compression for AMF server?

2009-01-28 Thread wadearnold

I was wondering what the best practices where for adding gzip compression
support to ZF Servers such as SOAP, XML-RPC and in my case AMF. Right now no
headers are sent from the Zend_Amf_Server and the bootstrap just returns a
string which is the AMF data and the bootstrap echo's out the data. From a
design decision my gut tells me that the best place to handle if gzip
compression should be used is in the bootstrap after a result is received
from Zend_Amf_Server. I also don't want to add 15 lines of code that users
of Zend Amf have to keep copying into their bootstrap just to get the
envelope compressed. In that case I thought that I could add a
Zend_Amf_Server->setGzipCrompression(true). Adding this now makes a ZF
Server set output headers? Torn on where I should release this code and
would appreciate any feedback! 

Wade Arnold
-- 
View this message in context: 
http://www.nabble.com/gzip-compression-for-AMF-server--tp21707841p21707841.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] setMultiOptions strange behaviour

2009-01-28 Thread PHPScriptor

Hello,

searching on this for hours but can't find the problem.

code
$test[0] = 1;
$test[1] = 2;
$test[2] = 3;
$formElements[] = self::createElement('select', 'test')
->setRequired(true)
->setLabel('Label')
->setMultiOptions($test);

output:



3


So the problem is that I can't use option "1" and "2". if I change it to
e.g. $test[0] = 4 $test[1] = 5 it's going fine... 

everything goes fine until $this->options[$option] = $value. if a do a
var_dump of $this->options just after this the values are wrong. Just before
the $this->options[$option] = $value the $option and $value are still
correct...

public function addMultiOption($option, $value = '')
{
$option  = (string) $option;
$this->_getMultiOptions();
if (!$this->_translateOption($option, $value)) {
$this->options[$option] = $value;
}
return $this;
}

-
visit my website at  http://www.phpscriptor.com/ http://www.phpscriptor.com/ 
-- 
View this message in context: 
http://www.nabble.com/setMultiOptions-strange-behaviour-tp21708125p21708125.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Re: Zend_Captcha custom error message question

2009-01-28 Thread Deepak Shrestha
Hi, me again

it is solved now by doing this

==
$captchaimg->setMessage("My Custom Message", 'badCaptcha');
==

This came to my mind only after I did some digging around and had a
look at the code
'Zend/captcha/Word.php' (ancestor class)

Where the message template and keywords are defined

=
const MISSING_VALUE = 'missingValue';
const MISSING_ID= 'missingID';
const BAD_CAPTCHA   = 'badCaptcha';
/*...@-*/

/**
 * Error messages
 * @var array
 */
protected $_messageTemplates = array(
self::MISSING_VALUE => 'Empty captcha value',
self::MISSING_ID=> 'Captcha ID field is missing',
self::BAD_CAPTCHA   => 'Captcha value is wrong',
);

==

Thanks anyway


-- 
===
Registered Linux User #460714
Currently Using Fedora 8, 10
===


Re: [fw-general] Some widget issues

2009-01-28 Thread Daniel Latter
Thank You
Daniel Latter



2009/1/28 Daniel Latter :
> ok, Ive just put together a quick test and I couldn't replicate the
> issues you are having, here is what I have, and did:
>
> Step 1:
>
> my /public/.htaccess file looks like: (yours will be public_html/.htaccess)
>
> # Rewrite rules for Zend Framework
> RewriteEngine on
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule .* index.php
>
> Step 2:
>
> In my bootstrap (index.php) file I add the Zend_Dojo helper path using:
>
> // set up dojo
> $view = Zend_Layout::getMvcInstance()->getView();
> $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
>
> Step 3:
>
> I have a created a controller called ContactController.php. (name
> doesn't matter)
>
> Step 4:
>
> In this controller I have an action called lightbox:
>
> function lightboxAction() {
>// we need the Lightbox.css file
> 
> $this->view->headLink()->appendStylesheet('/zf-tutorial/public/js/dojox/image/resources/Lightbox.css');
> // your path will obviously be different and will probably be
> something like /public_html/js/dojox/image/resources/Lightbox.css
> }
>
> Step 5:
>
> In the view script for the lightboxAction
> (views/scripts/lightbox.phtml) I have the following:
>
>  $this->dojo()->enable()
>  ->setDjConfigOption('parseOnLoad', true)
>  ->requireModule("dojo.parser")
>  ->requireModule("dojox.image.Lightbox")
>  ->addOnLoad('initLightbox'); // this comes into play in the next 
> step.
> ?>
> 
> 
> 
>  src="/zf-tutorial/public/images/arrow_anim.gif" alt="56 x 42 cm"
> />
> 
>
> The above html adds a thumbnail of an image, and once clicked will
> launch a lightbox
>
> Step 6:
>
> I am using Zend_Layout so in my layout.phtml file, in the 
> section of the file I put (in this order):
>
> 
> var initLightbox = function(){
>dojo.query(".thumbs li a").forEach(function(node, index, arr){
>var lb = new dojox.image.Lightbox({title:"A Test", 
> group:"group2",
> href:"/zf-tutorial/public/images/arrow_anim.gif"
> ,style:'padding:40px;'});
>lb.startup();
>dojo.connect(node,'onclick',function(e){
>e.preventDefault();
>lb.show();
>});
>});
> }
> 
>
> dojo()->isEnabled()){
>$this->dojo()->setLocalPath('/zf-tutorial/public/js/dojo/dojo.js')
> ->addStyleSheetModule('dijit.themes.tundra');
>echo $this->dojo();
>   }
> ?>
>
> The initLightbox function adds the click handler to the thumbnail
> images to launch the lighbox.
>
> This example works fine for me and if you cant get any pointers from
> the steps above let me know and Ill send you the code to try for
> yourself.
>
> BTW: my folder structure looks like:
>
> /application
> /config
> /library
> /public
>  /css
>  /images
>  /js
>/digit
>/dojo
>/dojox
>  .htaccess
>
> Also, notice how i use the absolute paths for dojo resources above.
>
> Well I hope this works for you!
>
>
> 2009/1/28 Dele 
>>
>> Thanks I just posted it to the forum as an image insert.
>>
>>
>>
>> Here is it for you :
>>
>>
>>
>>
>>
>> Regards
>>
>>
>>
>> Dele
>>
>>
>>
>> (C) 071 673 4130  (E) d...@killerinstinct.co.za  (S) dee454
>>
>>
>>
>> "Start by doing what's necessary; then do what's possible; and suddenly you 
>> are doing the impossible. "- St. Francis of Assisi.
>>
>> Disclaimer: This email and any files transmitted with it are confidential 
>> and intended solely for the use of the individual or entity to whom they are 
>> addressed. If you have received this email in error please notify the system 
>> manager. This message contains confidential information and is intended only 
>> for the individual named. If you are not the named addressee you should not 
>> disseminate, distribute or copy this e-mail. Please notify the sender 
>> immediately by e-mail if you have received this e-mail by mistake and delete 
>> this e-mail from your system. If you are not the intended recipient you are 
>> notified that disclosing, copying, distributing or taking any action in 
>> reliance on the contents of this information is strictly prohibited.
>>
>>
>>
>> From: Daniel Latter [mailto:dan.lat...@gmail.com]
>>
>> Sent: Wednesday, January 28, 2009 3:52 PM
>> To: Dele
>> Subject: Re: [fw-general] Some widget issues
>>
>>
>>
>> can you post your dir structure?
>>
>> Thank You
>> Daniel Latter
>>
>> 2009/1/28 Dele 
>>
>> Same story ;) not showing still
>>
>>
>>
>> Regards
>>
>>
>>
>> Dele
>>
>>
>>
>> (C) 071 673 4130  (E) d...@killerinstinct.co.za  (S) dee454
>>
>>
>>
>> "Start by doing what's necessary; then do what's possible; and suddenly you 
>> are doing the impossible. "- St. Francis of Assisi.
>>
>> Disclaimer: This email and any files transmitted with it are confidential 
>> and intended solely for the use of the individual or entity to whom they are 
>> addressed. If you have received this email in error please notify the system 
>> manager. This message cont

Re: [fw-general] gzip compression for AMF server?

2009-01-28 Thread Matthew Weier O'Phinney
-- wadearnold  wrote
(on Wednesday, 28 January 2009, 07:22 AM -0800):
> 
> I was wondering what the best practices where for adding gzip compression
> support to ZF Servers such as SOAP, XML-RPC and in my case AMF. Right now no
> headers are sent from the Zend_Amf_Server and the bootstrap just returns a
> string which is the AMF data and the bootstrap echo's out the data. From a
> design decision my gut tells me that the best place to handle if gzip
> compression should be used is in the bootstrap after a result is received
> from Zend_Amf_Server. I also don't want to add 15 lines of code that users
> of Zend Amf have to keep copying into their bootstrap just to get the
> envelope compressed. In that case I thought that I could add a
> Zend_Amf_Server->setGzipCrompression(true). Adding this now makes a ZF
> Server set output headers? Torn on where I should release this code and
> would appreciate any feedback! 

Typically, I'd implement compression at the server level -- in apache,
this would be mod_gzip or mod_deflate depending on whether or not you're
using apache 1 or 2. With this approach, you tell the server what
content types should be compressed, and the server does it transparently
to your application.

Now, if you need to _accept_ gzipped content, that's another story, and
by all means, that type of support should be added. However, I'd
encourage you to create a proposal for this support, so that others can
weigh in on the design choices.

-- 
Matthew Weier O'Phinney
Software Architect   | matt...@zend.com
Zend Framework   | http://framework.zend.com/


Re: [fw-general] mod_rewrite and SSL

2009-01-28 Thread Chris Weldon
Your rewrite rule is a bit long, but there is a way to do what you are wanting:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteRule ^.*/css/(.*)$ css/$1
RewriteRule ^.*/images/(.*)$ images/$1
RewriteRule ^.*/js/(.*)$ js/$1
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

The way this would operate is as follows:

1. If the site is not https, then immediately redirect to https
2. If the request is for css, images, or javascript, remap the request
relative to the directory .htaccess is located.
3. If the request is for a valid file, symlink, or directory, open
that requested file, symlink, or directory, respectively.
4. Otherwise, route the request through index.php

What this allows me to do (especially step 2) is that I can define my
css, images, or javascript URLs relatively instead of absolutely. e.g.
I don't have to use  I can do  and it should work regardless of the request
and regardless of whether the application is installed at the root of
a web site (www.chrisweldon.net/) or in a subfolder
(www.chrisweldon.net/application).

You'll of course need to addon to mine to check for other media
content that you are checking for (xml, avi, etc.), but the premise
remains the same.
--
Chris Weldon

On Mon, Jan 26, 2009 at 7:24 PM, spaceage  wrote:
>
> I'm somewhat new to mod_rewrite and am hoping somebody here has already
> solved this problem.
>
> I use an .htaccess in my root dir as follows:
>
> RewriteEngine on
> RewriteRule !\.(js|ico|gif|jpg|png|css|swf|xml|avi|flv|mov|mp3|wav|pdf)$
> index.php
>
> I want to add another condition which requires/forwards to https for any
> request which has a URI of /checkout.
>
> I have full access to the apache server, so I can insert any directives
> necessary...
>
> Is it possible to chain the two conditions (the one I am running for the
> front controller above + the new /checkout forward to https) in the
> .htaccess file, or does one (or both) of the conditions need to be in a
>  or  block?  Or maybe a  block for
> /checkout?
>
> TIA!
> --
> View this message in context: 
> http://www.nabble.com/mod_rewrite-and-SSL-tp21677891p21677891.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>



-- 
Christopher Weldon
http://chrisweldon.net
ch...@chrisweldon.net


[fw-general] Zend_Db_Select::union() behaving

2009-01-28 Thread kirpit
Hi,

I'm using ZF 1.7.3 and first time tried to union with ZF. In phpDoc section
it says;
/* The first parameter $select can be a string, an existing Zend_Db_Select
object or an array of either of these types. */

And what it does on the first a few lines of function is;
if (!is_array($select)) {
  $select = array();
}

Even i pass the zend_db_select object in an array, it produces sql query in
a logic like;
SELECT t1.fields*
*SELECT t2.fields* *
FROM t2
WHERE t2.conditions
FROM t1
WHERE t2.conditions

I'm using mysqli connection type with version 5.1.11


Re: [fw-general] Zend_Form / Zend_File Upload to DB not working

2009-01-28 Thread Michael Crumm
Make sure you are setting headers that match the type of image data being
stored.
Here's a controller i've used in the past for displaying image data.  This
particular example gets its data from a file on the filesystem, but the same
would hold true for data from the database.

One thing to note:
Watch your closing tags.  Worst case, make sure there is no trailing
whitespace or newlines.  Best case, just omit the closing tag completely.
Additional whitespace can cause issues with the image data being rendered.

Hope this helps!

_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();
}
}


On Wed, Jan 28, 2009 at 9:13 AM, maxarbos  wrote:

>
> Thank you. I am now able to get the file to upload, but now stuck as to how
> to get it to display within ZF.
>
> When I make the call to the code to show the image, I am just getting the
> characters of the source of the image and not the image itself. I used to
> do
> something like this when I was able to call a specific page that sent
> headers and such, but with ZF and Ajax calls, it doesnt seem to work the
> same.
>
> Is there something I am missing/forgetting to get the image to display?
>
> Thank you.
>
>
>
> thomasW wrote:
> >
> > Look at my blog.
> > There is an example for file uploads.
> >
> http://www.thomasweidner.com/flatpress/2008/11/01/file-transfer-hashing-and-other-news/
> >
> > Greetings
> > Thomas Weidner, I18N Team Leader, Zend Framework
> > http://www.thomasweidner.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Zend_Form---Zend_File-Upload-to-DB-not-working-tp21693984p21707673.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Michael Crumm
mcr...@gmail.com


[fw-general] hashed_directory_level problem.. help me~

2009-01-28 Thread song7749

I'm English not well.

I not understand hashed_directory_level problem.
code : 


$frontendOptions = array(
   'lifetime' => 60, 
   'automatic_serialization' => true,
'write_control' => true
);


$backendOptions = array(
'hashed_directory_level' => 2,
'cache_dir' => "../product"
);


   $cache =
Zend_Cache::factory('Core','File',$frontendOptions,$backendOptions);

window system  : APM (apache+php+mysql) 
backend option very well :  'hashed_directory_level' => 2,

but linux system not well. (apache+php+mysql)

I think this problem permission.

error message :
Fatal error: Call to undefined function hash() in
/ZendFramework/library/Zend/Cache/Backend/File.php on line 884


set  'hashed_directory_level' => 0 , no problem..

please help me ~

think you.

-- 
View this message in context: 
http://www.nabble.com/hashed_directory_level-problem..-help-me%7E-tp21721824p21721824.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] hashed_directory_level problem.. help me~

2009-01-28 Thread Brenton Alker
song7749 wrote:
...
> 
> I think this problem permission.
> 
> error message :
> Fatal error: Call to undefined function hash() in
> /ZendFramework/library/Zend/Cache/Backend/File.php on line 884
> 
> 
> set  'hashed_directory_level' => 0 , no problem..
> 
> please help me ~
> 
> think you.
> 

It sounds like you are missing the Hash extension.

http://php.net/manual/en/book.hash.php

"The Hash extension requires no external libraries and is enabled by
default as of PHP 5.1.2. It may be explicitly disabled by using the
--disable-hash switch to configure."

So, either your installation is very old, or it has been explicitly
disabled.

-- 

Brenton Alker

http://blog.tekerson.com/



signature.asc
Description: OpenPGP digital signature