Re: [fw-general] Connecting to a database, PHP Fatal error: Class 'Zend_Db_Adapter_Pdo_Mysql' not found

2010-06-28 Thread Nilesh Govindarajan

On 06/29/2010 12:26 PM, Chris Riesen wrote:

Hi Louie

Replace your "require_once 'Zend/Db.php';" line with these two:

require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();

And it will work. That way you can also autoload more than just the DB
components.

Alternatively, use the Factory method, by keeping all the code the
same ecept that one line where you get the $db object::

$db = Zend_Db::factory('Pdo_Mysql', array(
 'host' =>  '192.168.1.33',
 'username' =>  'dba',
 'password' =>  'pass',
  'dbname'   =>  'database'
));

Personally, I prefer the autoloader, as it does away with all those
require_once calls.

- Chris

On Tue, Jun 29, 2010 at 8:50 AM, Louie Miranda  wrote:

I am trying ZF as a loose class, but I am failing when connecting to a db.

I have added the ZF library on php.ini includes and created a file.

test01.php

  '192.168.1.33',
 'username' =>  'dba',
 'password' =>  'pass',
 'dbname'   =>  'database'
));

print_r($db);
?>

The error is, PHP Fatal error:  Class 'Zend_Db_Adapter_Pdo_Mysql' not found

I believe Zend/Db.php is trying to look for the adapater inside the
/test/test01.php directory? What should I do to correct this? and is this
proper?
--
Louie Miranda
- Email: lmira...@gmail.com
- Web: http://www.louiemiranda.com




This is the best. Autoloader. If you configure it, use ZF as you want, 
any class of ZF won't make such complaints :D


--
Regards,
Nilesh Govindarajan
Facebook: http://www.facebook.com/nilesh.gr
Twitter: http://twitter.com/nileshgr
Website: http://www.itech7.com
Cheap and Reliable VPS Hosting: http://j.mp/arHk5e


Re: [fw-general] Connecting to a database, PHP Fatal error: Class 'Zend_Db_Adapter_Pdo_Mysql' not found

2010-06-28 Thread Nilesh Govindarajan

On 06/29/2010 12:20 PM, Louie Miranda wrote:

I am trying ZF as a loose class, but I am failing when connecting to a db.

I have added the ZF library on php.ini includes and created a file.

test01.php

 '192.168.1.33',
'username' => 'dba',
'password' => 'pass',
'dbname'   => 'database'
));

print_r($db);
?>

The error is, PHP Fatal error:  Class 'Zend_Db_Adapter_Pdo_Mysql' not found

I believe Zend/Db.php is trying to look for the adapater inside the
/test/test01.php directory? What should I do to correct this? and is
this proper?
--
Louie Miranda
- Email: lmira...@gmail.com 
- Web: http://www.louiemiranda.com



require_once 'Zend/Db/Adapter/Pdo/Mysql.php';

--
Regards,
Nilesh Govindarajan
Facebook: http://www.facebook.com/nilesh.gr
Twitter: http://twitter.com/nileshgr
Website: http://www.itech7.com
Cheap and Reliable VPS Hosting: http://j.mp/arHk5e


Re: [fw-general] Connecting to a database, PHP Fatal error: Class 'Zend_Db_Adapter_Pdo_Mysql' not found

2010-06-28 Thread scs
Try putting this line before require line:
ini_set('include_path', '/your_full_path/to_your_/ZendFramework/library');

scs

On Tue, Jun 29, 2010 at 9:50 AM, Louie Miranda  wrote:

> I am trying ZF as a loose class, but I am failing when connecting to a db.
>
> I have added the ZF library on php.ini includes and created a file.
>
> test01.php
>
>  require_once 'Zend/Db.php';
> $db = new Zend_Db_Adapter_Pdo_Mysql(array(
> 'host' => '192.168.1.33',
> 'username' => 'dba',
> 'password' => 'pass',
> 'dbname'   => 'database'
> ));
>
> print_r($db);
> ?>
>
> The error is, PHP Fatal error:  Class 'Zend_Db_Adapter_Pdo_Mysql' not found
>
>
> I believe Zend/Db.php is trying to look for the adapater inside the
> /test/test01.php directory? What should I do to correct this? and is this
> proper?
> --
> Louie Miranda
> - Email: lmira...@gmail.com
> - Web: http://www.louiemiranda.com
>
>


Re: [fw-general] Connecting to a database, PHP Fatal error: Class 'Zend_Db_Adapter_Pdo_Mysql' not found

2010-06-28 Thread Chris Riesen
Hi Louie

Replace your "require_once 'Zend/Db.php';" line with these two:

require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();

And it will work. That way you can also autoload more than just the DB
components.

Alternatively, use the Factory method, by keeping all the code the
same ecept that one line where you get the $db object::

$db = Zend_Db::factory('Pdo_Mysql', array(
'host' => '192.168.1.33',
'username' => 'dba',
'password' => 'pass',
 'dbname'   => 'database'
));

Personally, I prefer the autoloader, as it does away with all those
require_once calls.

- Chris

On Tue, Jun 29, 2010 at 8:50 AM, Louie Miranda  wrote:
> I am trying ZF as a loose class, but I am failing when connecting to a db.
>
> I have added the ZF library on php.ini includes and created a file.
>
> test01.php
>
>  require_once 'Zend/Db.php';
> $db = new Zend_Db_Adapter_Pdo_Mysql(array(
>     'host' => '192.168.1.33',
>     'username' => 'dba',
>     'password' => 'pass',
>     'dbname'   => 'database'
> ));
>
> print_r($db);
> ?>
>
> The error is, PHP Fatal error:  Class 'Zend_Db_Adapter_Pdo_Mysql' not found
>
> I believe Zend/Db.php is trying to look for the adapater inside the
> /test/test01.php directory? What should I do to correct this? and is this
> proper?
> --
> Louie Miranda
> - Email: lmira...@gmail.com
> - Web: http://www.louiemiranda.com
>
>


[fw-general] Connecting to a database, PHP Fatal error: Class 'Zend_Db_Adapter_Pdo_Mysql' not found

2010-06-28 Thread Louie Miranda
I am trying ZF as a loose class, but I am failing when connecting to a db.

I have added the ZF library on php.ini includes and created a file.

test01.php

 '192.168.1.33',
'username' => 'dba',
'password' => 'pass',
'dbname'   => 'database'
));

print_r($db);
?>

The error is, PHP Fatal error:  Class 'Zend_Db_Adapter_Pdo_Mysql' not found

I believe Zend/Db.php is trying to look for the adapater inside the
/test/test01.php directory? What should I do to correct this? and is this
proper?
--
Louie Miranda
- Email: lmira...@gmail.com
- Web: http://www.louiemiranda.com


[fw-general] Suing Zend_Soap_Client with auth

2010-06-28 Thread robert mena
Hi,

I've managed to solve my problem with NULL return (changed from eaccelerator
to apc).   Now I am trying to consume a remote webservice that uses HTTP
authentication.   If I try using Zend_Soap_Client I get errors like these

PHP Fatal error:  Uncaught SoapFault exception: [HTTP] Unauthorized in
/Zend/Soap/Client.php:987
Stack trace:
#0 [internal function]: SoapClient->__doRequest(' 'x',  'password' => 'x');


Re: [fw-general] Re: Zend_Service_Twitter not working

2010-06-28 Thread Pádraic Brady
Yes, they are ;). Will have that rectified for the next release.

 Pádraic Brady

http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative






From: robert mena 
To: Pádraic Brady ; Justin Hart ; 
Zend Framework General 
Sent: Mon, June 28, 2010 5:01:27 PM
Subject: [fw-general] Re: Zend_Service_Twitter not working

Hi,

Well is seems that the docs are out of sync :)

I'll have a look at the oauth component.

On 6/28/10, Pádraic Brady  wrote:
> Just to clarify the change in 1.10.6, Twitter originally planned to disable
> password access during June. The Zend_Service_Twitter component was
> updated to meet this original deadline. However, Twitter then changed the
> deadline to August (they like torturing us ;)). From August password access
> to
> Twitter will be disabled and all client must use OAuth. The current version
> of
> Zend_Service_Twitter is capable of this but ergo had it's password
> functionality removed.
>
> If you must use password access, please revert to Zend_Service_Twitter as of
> ZF
> 1.10.5.
>
> Paddy
>  Pádraic Brady
>
> http://blog.astrumfutura.com
> http://www.survivethedeepend.com
> OpenID Europe Foundation Irish Representative
>
>
>
>
>
> 
> From: Justin Hart 
> To: Shaun Farrell 
> Cc: Jack Houghton ; robert mena ;
> Zend
> Framework 
> Sent: Mon, June 28, 2010 5:26:40 AM
> Subject: Re: [fw-general] Zend_Service_Twitter not working
>
> This is correct.
>
> I personally had to delay upgrading the Twitter component on Twitgoo until
> later
> because I still have clients logging in with username/password credentials -
> so
> a oauth-only solution was not feasible. This will be forced to change in a
> few
> weeks (http://dev.twitter.com/pages/oauth_faq says Aug16).
>
> You can find my interim twitter oauth extension
> here http://bitbucket.org/onyxraven/zend-contrib/src/tip/zs-Twitter-Oauth/ -
> I'll be moving that to git this week with an updated version, and will link
> back
> there as well..
>
>
> On Sun, Jun 27, 2010 at 8:26 PM, Shaun Farrell  wrote:
>
> Zend_Service_Twitter as of 1.10.6 requires oauth for logging in.
>>
>>
>>
>>Shaun J. Farrell
>>Washington, DC
>>
>>
>>
>>
>>On Sun, Jun 27, 2010 at 10:10 PM, Jack Houghton  wrote:
>>
>>Robert,
>>>
>>>Unfortunately, I may not be of that much help. I ran into the same issue
>>> and
>>>switched to using cURL for my twitter feed (without OAuth). I posted this
>>> to the
>>>list a month back and came away with the realization that
>>> Zend_Service_Twitter
>>>was simply broken and based on cURL working with the user/pass
>>> authorization I
>>>can confirm that OAuth is not yet required.
>>>
>>>Please let me know if you get anywhere with this.
>>>
>>>-Jack-
>>>
>>>
> 
>
>>>From:robert mena [mailto:robert.m...@gmail.com]
>>>Sent: Sunday, June 27, 2010 7:32 PM
>>>To: Zend Framework
>>>Subject: [fw-general] Zend_Service_Twitter not working
>>>
>>>Hi,
>>>
>>>I am trying to use Zend_Service_Twitter (ZF10.6.5 / PHP 5.3.2) but it
>>> always
>>>complains about the credentials even tough I've tested the
>>> username/password. I
>>>found a post somewhere that Twitter will/was no longer accept this and
>>> I'll be
>>>'forced' to use Oauth.
>>>
>>>Is this true?  In that case does anybody have a quickstart?  The manual of
>>>
>>>Zend_Service_Twitter does not cover that and I am unsure of how to add the
>>>
>>>capability for my app to post stuff automatically
>>>No virus found in this incoming message.
>>>Checked by AVG - www.avg.com
>>>Version: 9.0.830 / Virus Database: 271.1.1/2966 - Release Date: 06/27/10
>>>14:35:00
>>
>

-- 
Sent from my mobile device


[fw-general] Re: Zend_Service_Twitter not working

2010-06-28 Thread robert mena
Hi,

Well is seems that the docs are out of sync :)

I'll have a look at the oauth component.

On 6/28/10, Pádraic Brady  wrote:
> Just to clarify the change in 1.10.6, Twitter originally planned to disable
> password access during June. The Zend_Service_Twitter component was
> updated to meet this original deadline. However, Twitter then changed the
> deadline to August (they like torturing us ;)). From August password access
> to
> Twitter will be disabled and all client must use OAuth. The current version
> of
> Zend_Service_Twitter is capable of this but ergo had it's password
> functionality removed.
>
> If you must use password access, please revert to Zend_Service_Twitter as of
> ZF
> 1.10.5.
>
> Paddy
>  Pádraic Brady
>
> http://blog.astrumfutura.com
> http://www.survivethedeepend.com
> OpenID Europe Foundation Irish Representative
>
>
>
>
>
> 
> From: Justin Hart 
> To: Shaun Farrell 
> Cc: Jack Houghton ; robert mena ;
> Zend
> Framework 
> Sent: Mon, June 28, 2010 5:26:40 AM
> Subject: Re: [fw-general] Zend_Service_Twitter not working
>
> This is correct.
>
> I personally had to delay upgrading the Twitter component on Twitgoo until
> later
> because I still have clients logging in with username/password credentials -
> so
> a oauth-only solution was not feasible. This will be forced to change in a
> few
> weeks (http://dev.twitter.com/pages/oauth_faq says Aug16).
>
> You can find my interim twitter oauth extension
> here http://bitbucket.org/onyxraven/zend-contrib/src/tip/zs-Twitter-Oauth/ -
> I'll be moving that to git this week with an updated version, and will link
> back
> there as well..
>
>
> On Sun, Jun 27, 2010 at 8:26 PM, Shaun Farrell  wrote:
>
> Zend_Service_Twitter as of 1.10.6 requires oauth for logging in.
>>
>>
>>
>>Shaun J. Farrell
>>Washington, DC
>>
>>
>>
>>
>>On Sun, Jun 27, 2010 at 10:10 PM, Jack Houghton  wrote:
>>
>>Robert,
>>>
>>>Unfortunately, I may not be of that much help. I ran into the same issue
>>> and
>>>switched to using cURL for my twitter feed (without OAuth). I posted this
>>> to the
>>>list a month back and came away with the realization that
>>> Zend_Service_Twitter
>>>was simply broken and based on cURL working with the user/pass
>>> authorization I
>>>can confirm that OAuth is not yet required.
>>>
>>>Please let me know if you get anywhere with this.
>>>
>>>-Jack-
>>>
>>>
> 
>
>>>From:robert mena [mailto:robert.m...@gmail.com]
>>>Sent: Sunday, June 27, 2010 7:32 PM
>>>To: Zend Framework
>>>Subject: [fw-general] Zend_Service_Twitter not working
>>>
>>>Hi,
>>>
>>>I am trying to use Zend_Service_Twitter (ZF10.6.5 / PHP 5.3.2) but it
>>> always
>>>complains about the credentials even tough I've tested the
>>> username/password. I
>>>found a post somewhere that Twitter will/was no longer accept this and
>>> I'll be
>>>'forced' to use Oauth.
>>>
>>>Is this true?  In that case does anybody have a quickstart?  The manual of
>>>
>>>Zend_Service_Twitter does not cover that and I am unsure of how to add the
>>>
>>>capability for my app to post stuff automatically
>>>No virus found in this incoming message.
>>>Checked by AVG - www.avg.com
>>>Version: 9.0.830 / Virus Database: 271.1.1/2966 - Release Date: 06/27/10
>>>14:35:00
>>
>

-- 
Sent from my mobile device


Re: [fw-general] Zend_Service_Twitter not working

2010-06-28 Thread Justin Hart
Here's my github repo for Zend_Service_Twitter_Oauth, based on 1.10.5:

http://github.com/onyxraven/ZF-Zend_Service_Twitter_OAuth



On Sun, Jun 27, 2010 at 10:26 PM, Justin Hart  wrote:

> This is correct.
>
> I personally had to delay upgrading the Twitter component on Twitgoo until
> later because I still have clients logging in with username/password
> credentials - so a oauth-only solution was not feasible. This will be forced
> to change in a few weeks (http://dev.twitter.com/pages/oauth_faq says
> Aug16).
>
> You can find my interim twitter oauth extension here
> http://bitbucket.org/onyxraven/zend-contrib/src/tip/zs-Twitter-Oauth/ -
> I'll be moving that to git this week with an updated version, and will link
> back there as well..
>
>
> On Sun, Jun 27, 2010 at 8:26 PM, Shaun Farrell wrote:
>
>> Zend_Service_Twitter as of 1.10.6 requires oauth for logging in.
>>
>>
>> Shaun J. Farrell
>> Washington, DC
>>
>>
>>
>> On Sun, Jun 27, 2010 at 10:10 PM, Jack Houghton  wrote:
>>
>>>  Robert,
>>>
>>>
>>>
>>> Unfortunately, I may not be of that much help. I ran into the same issue
>>> and switched to using cURL for my twitter feed (without OAuth). I posted
>>> this to the list a month back and came away with the realization that
>>> Zend_Service_Twitter was simply broken and based on cURL working with the
>>> user/pass authorization I can confirm that OAuth is not yet required.
>>>
>>>
>>>
>>> Please let me know if you get anywhere with this.
>>>
>>>
>>>
>>> -Jack-
>>>
>>>
>>>  --
>>>
>>> *From:* robert mena [mailto:robert.m...@gmail.com]
>>> *Sent:* Sunday, June 27, 2010 7:32 PM
>>> *To:* Zend Framework
>>> *Subject:* [fw-general] Zend_Service_Twitter not working
>>>
>>>
>>>
>>> Hi,
>>>
>>>
>>>
>>> I am trying to use Zend_Service_Twitter (ZF10.6.5 / PHP 5.3.2) but it
>>> always complains about the credentials even tough I've tested the
>>> username/password. I found a post somewhere that Twitter will/was no longer
>>> accept this and I'll be 'forced' to use Oauth.
>>>
>>>
>>>
>>> Is this true?  In that case does anybody have a quickstart?  The manual
>>> of Zend_Service_Twitter does not cover that and I am unsure of how to add
>>> the capability for my app to post stuff automatically
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - www.avg.com
>>> Version: 9.0.830 / Virus Database: 271.1.1/2966 - Release Date: 06/27/10
>>> 14:35:00
>>>
>>
>>
>


Re: [fw-general] Zend_Service_Twitter not working

2010-06-28 Thread Pádraic Brady
Just to clarify the change in 1.10.6, Twitter originally planned to disable 
password access during June. The Zend_Service_Twitter component was 
updated to meet this original deadline. However, Twitter then changed the 
deadline to August (they like torturing us ;)). From August password access to 
Twitter will be disabled and all client must use OAuth. The current version of 
Zend_Service_Twitter is capable of this but ergo had it's password 
functionality removed.

If you must use password access, please revert to Zend_Service_Twitter as of ZF 
1.10.5.

Paddy
 Pádraic Brady

http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative






From: Justin Hart 
To: Shaun Farrell 
Cc: Jack Houghton ; robert mena ; Zend 
Framework 
Sent: Mon, June 28, 2010 5:26:40 AM
Subject: Re: [fw-general] Zend_Service_Twitter not working

This is correct. 

I personally had to delay upgrading the Twitter component on Twitgoo until 
later 
because I still have clients logging in with username/password credentials - so 
a oauth-only solution was not feasible. This will be forced to change in a few 
weeks (http://dev.twitter.com/pages/oauth_faq says Aug16).

You can find my interim twitter oauth extension 
here http://bitbucket.org/onyxraven/zend-contrib/src/tip/zs-Twitter-Oauth/ - 
I'll be moving that to git this week with an updated version, and will link 
back 
there as well..


On Sun, Jun 27, 2010 at 8:26 PM, Shaun Farrell  wrote:

Zend_Service_Twitter as of 1.10.6 requires oauth for logging in.  
>
>
>
>Shaun J. Farrell
>Washington, DC 
>
>
>
>
>On Sun, Jun 27, 2010 at 10:10 PM, Jack Houghton  wrote:
>
>Robert,
>> 
>>Unfortunately, I may not be of that much help. I ran into the same issue and 
>>switched to using cURL for my twitter feed (without OAuth). I posted this to 
>>the 
>>list a month back and came away with the realization that 
>>Zend_Service_Twitter 
>>was simply broken and based on cURL working with the user/pass authorization 
>>I 
>>can confirm that OAuth is not yet required.
>> 
>>Please let me know if you get anywhere with this.
>> 
>>-Jack-
>> 
>>


>>From:robert mena [mailto:robert.m...@gmail.com] 
>>Sent: Sunday, June 27, 2010 7:32 PM
>>To: Zend Framework
>>Subject: [fw-general] Zend_Service_Twitter not working
>> 
>>Hi,
>> 
>>I am trying to use Zend_Service_Twitter (ZF10.6.5 / PHP 5.3.2) but it always 
>>complains about the credentials even tough I've tested the username/password. 
>>I 
>>found a post somewhere that Twitter will/was no longer accept this and I'll 
>>be 
>>'forced' to use Oauth.
>> 
>>Is this true?  In that case does anybody have a quickstart?  The manual of 
>>Zend_Service_Twitter does not cover that and I am unsure of how to add the 
>>capability for my app to post stuff automatically
>>No virus found in this incoming message.
>>Checked by AVG - www.avg.com
>>Version: 9.0.830 / Virus Database: 271.1.1/2966 - Release Date: 06/27/10 
>>14:35:00
>


[fw-general] Translating urls

2010-06-28 Thread Саша Стаменковић
Hi.

I'm adding translated urls to my project. In app config I have some routes,
by adding @ I'm able to translate them, but, what to do with default route?
How to translate this urls? Do I have to define new default route with @
prefix?

Regards,
Saša Stamenković


[fw-general] Re: validator chains and context

2010-06-28 Thread Simon Plangger

Good day!

Very late, but i checked with my company and it's free to use. I don't know
if that qualyfies as "public domain" or "new-bsd" but i think so.

I just want to mention something i came across the last weeks: 
http://framework.zend.com/manual/en/zend.filter.input.html The
Zend_Filter_Input 

It features many functions as my above example like

- filtering
- validating

. Important for me is the attribute "allowEmpty" that allows fields to be
empty, even with validators. I don't know if the Zend_Filter_Input class can
be used for Zend_Form_Element_* but maybe its woth a look.

Have fun

Simon Plangger
-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/validator-chains-and-context-tp2130875p2270645.html
Sent from the Zend Framework mailing list archive at Nabble.com.