[PHP] What determines your use of the type of DB framework/abstract?

2011-09-22 Thread Jamie Krasnoo
Hey All,

I'm guessing that the subject probably doesn't fit the question I'm
asking here so I'll apologize in advance.

Lately I've been getting in to how I can streamline my development
after a bad experience with a contract. One of the areas I was looking
at is when it would be appropriate to use certain DB frameworks? What
I mean by frameworks is probably more like DB abstract, like Doctrine
or ZF's native Zend_Db. I know this isn't a black and white
explanation so I would like to know what influences your decision on
using a DB abstract framework. Whether to use one or not and if so
which one?

Jamie

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What determines your use of the type of DB framework/abstract?

2011-09-22 Thread Jamie Krasnoo
Sorry, not sure if the first part of the conversation made it to the list.

I will be looking in to Symfony. I'm well versed with ZF and Zend_Db.
I'm also somewhat versed with Doctrine and integrating it with ZF. My
question isn't whether Doctrine is a part *of* that framework but
rather on *what* and *when* it is appropriate to *use* or *substitute*
something like Doctrine instead of using straight pdo or mysqli or the
abstract that came with that particular framework. Substituting
Doctrine or some other abstract could complicate a project rather than
help.

Jamie

On Thu, Sep 22, 2011 at 10:52 AM, Slith slith...@gmail.com wrote:
 Have you looked into other PHP Frameworks like Symfony that includes
 Doctrine support?

 Not sure exactly what your requirements are but most PHP frameworks include
 some sort of DB abstraction based on Active Record/ORM.

 See also CodeIgniter, Zend Framework

 On 9/22/2011 10:46 AM, Jamie Krasnoo wrote:

 Hey All,

 I'm guessing that the subject probably doesn't fit the question I'm
 asking here so I'll apologize in advance.

 Lately I've been getting in to how I can streamline my development
 after a bad experience with a contract. One of the areas I was looking
 at is when it would be appropriate to use certain DB frameworks? What
 I mean by frameworks is probably more like DB abstract, like Doctrine
 or ZF's native Zend_Db. I know this isn't a black and white
 explanation so I would like to know what influences your decision on
 using a DB abstract framework. Whether to use one or not and if so
 which one?

 Jamie




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Complex (or not so) array data form submission?

2011-08-04 Thread Jamie Krasnoo
Hey all,

I get the basics of submitting a form and organizing the $_POST data within
arrays (name[], name[key], etc). But if I wanted to submit something like
multiple addresses and have it end up organized in array form like this from
submission is this possible?

$addresses = array(
0 = array(
'id' = '1',
'address1' = '...',
'address2' = '...',
'city'  = '...',
'state'= '...',
'zip'   = '...'
),
1 = array(
'id' = '2',
'address1' = '...',
'address2' = '...',
'city'  = '...',
'state'= '...',
'zip'   = '...'
)
);

For some reason I can't seem to come up with the right naming schema in
forms in order to get this structure.

Jamie


Re: [PHP] Complex (or not so) array data form submission?

2011-08-04 Thread Jamie Krasnoo
Thanks. I think what I got hung up on was that I was trying this:

name=addresses[][id]
name=addresses[][address1]
name=addresses[][address2]
name=addresses[][city]
name=addresses[][state]
name=addresses[][zip]

Which wouldn't have given the end result I sought, I don't think. Clear case
of not seeing the forest for the trees.

Jamie

On Thu, Aug 4, 2011 at 10:31 AM, Andrew Ballard aball...@gmail.com wrote:

 On Thu, Aug 4, 2011 at 1:18 PM, Jamie Krasnoo jkras...@gmail.com wrote:
 
  Hey all,
 
  I get the basics of submitting a form and organizing the $_POST data
 within
  arrays (name[], name[key], etc). But if I wanted to submit something like
  multiple addresses and have it end up organized in array form like this
 from
  submission is this possible?
 
  $addresses = array(
 0 = array(
 'id' = '1',
 'address1' = '...',
 'address2' = '...',
 'city'  = '...',
 'state'= '...',
 'zip'   = '...'
 ),
 1 = array(
 'id' = '2',
 'address1' = '...',
 'address2' = '...',
 'city'  = '...',
 'state'= '...',
 'zip'   = '...'
 )
  );
 
  For some reason I can't seem to come up with the right naming schema in
  forms in order to get this structure.
 
  Jamie

 It should be pretty straight foward. Your fields would have name such as
 these:

 name=addresses[0][id]
 name=addresses[0][address1]
 name=addresses[0][address2]
 name=addresses[0][city]
 name=addresses[0][state]
 name=addresses[0][zip]

 And so on.

 Andrew



Re: [PHP] How to install pecl_http into a web hosting service

2011-07-25 Thread Jamie Krasnoo
You should be using cURL for making requests.

No, you won't be able to install any pecl packages on your host. It's
a free account and I doubt they will be bending over backwards for you
anytime soon. If you want custom hosting, pay for a VPS account or a
dedicated server.

On Thu, Jul 21, 2011 at 8:52 PM, gato chalar dany...@gmail.com wrote:
 Hi list,

 I need to perform http requests (GET,POST) , I have readed about pecl_http
 package, so it seem to be what I need. Reading further I sow some ways to
 install this package to a server where you have all rights and privilegies,
 and that's the problem; I don't know if I will be able to install pecl_http
 in a php hosting service. Currently I have a free php hosting account. Is
 that posible?

 Thanks for the help.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to install pecl_http into a web hosting service

2011-07-25 Thread Jamie Krasnoo
Most hosting companies have cURL already installed and available
rather than pecl_http. I probably should have said try using cURL
instead of you should be using cURL. However most FREE hosting
companies probably won't even have that installed due to security
concerns.

Jamie

On Mon, Jul 25, 2011 at 11:16 AM, Andrew Ballard aball...@gmail.com wrote:
 On Mon, Jul 25, 2011 at 12:26 PM, Jamie Krasnoo jkras...@gmail.com wrote:
 [reordered and snipped]

 On Thu, Jul 21, 2011 at 8:52 PM, gato chalar dany...@gmail.com wrote:
 Hi list,

 I need to perform http requests (GET,POST) , I have readed about pecl_http
 package, so it seem to be what I need. Reading further I sow some ways to
 install this package to a server where you have all rights and privilegies,
 and that's the problem; I don't know if I will be able to install pecl_http
 in a php hosting service. Currently I have a free php hosting account. Is
 that posible?

 You should be using cURL for making requests.

 If the pecl HTTP extension is unavailable, cURL is the next simplest
 choice, but I've used HTTP when it was available and it worked just
 fine. I'm curious as to your reason (other than general availability)
 for stating that one *should* use cURL (as opposed to something else
 like HTTP).

 Andrew


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] APC problem with PHP

2009-02-10 Thread Jamie Krasnoo
Hey all,

I'm new to the list. I came here because I couldn't find the answer to
my question and I'm hoping I can find it here. I compiled the APC
plugin as a shared library and activated it through the php.ini. I ran
'make test' and it seemed to pass all but one (it skipped a test). I
thought all was well. Unfortunately it wasn't. In the middle of the
night I woke up to SMS messages from the monitoring that the server
was going down hard. I got the server back up and found that PHP was
segfaulting and puking core files everywhere and it filled up the
drive.

I removed all the core files and restarted the server and it happened
again. So I removed APC, restarted the server and the core files
stopped. So just to make sure I put APC back on and saw that PHP
started dumping again.

I'm not advanced enough to try and debug the core files but I do know
enough to try and see what is going on. I used gdb to peer in to a
core file and saw that libthread_db.1.so or something like that was
the culprit. Does anyone know what would cause PHP to start
segfaulting after APC was installed?

Thanks,

Jamie

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] APC problem with PHP

2009-02-10 Thread Jamie Krasnoo
Yes, I'm using Apache 2.2.11 and I do believe that threading could be
enabled. Apache was compiled through cPanel with Easy::Apache. I
didn't see any options to disable threading unless I missed it.

Jamie

On Tue, Feb 10, 2009 at 3:51 PM, Nathan Nobbe quickshif...@gmail.com wrote:
 On Tue, Feb 10, 2009 at 4:10 PM, Jamie Krasnoo jkras...@gmail.com wrote:

 Hey all,

 I'm new to the list. I came here because I couldn't find the answer to
 my question and I'm hoping I can find it here. I compiled the APC
 plugin as a shared library and activated it through the php.ini. I ran
 'make test' and it seemed to pass all but one (it skipped a test). I
 thought all was well. Unfortunately it wasn't. In the middle of the
 night I woke up to SMS messages from the monitoring that the server
 was going down hard. I got the server back up and found that PHP was
 segfaulting and puking core files everywhere and it filled up the
 drive.

 I removed all the core files and restarted the server and it happened
 again. So I removed APC, restarted the server and the core files
 stopped. So just to make sure I put APC back on and saw that PHP
 started dumping again.

 I'm not advanced enough to try and debug the core files but I do know
 enough to try and see what is going on. I used gdb to peer in to a
 core file and saw that libthread_db.1.so or something like that was
 the culprit. Does anyone know what would cause PHP to start
 segfaulting after APC was installed?

 are you using apache and if so, do you have threading enabled?

 -nathan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] APC problem with PHP

2009-02-10 Thread Jamie Krasnoo
I did compile Apache with mpm_prefork though. cPanel does have the
option to compile with all three mpm choices. What else would there be
in Apache that could be using threads? Oh, I failed to mention that
the PHP scripts that are segfaulting are scripts that exist and
haven't been changed for some time. They already exist and are not
using APC at all. As soon as APC is taken off they stop segfauting.

Jamie

On Tue, Feb 10, 2009 at 4:10 PM, Nathan Nobbe quickshif...@gmail.com wrote:
 On Tue, Feb 10, 2009 at 5:03 PM, Jamie Krasnoo jkras...@gmail.com wrote:

 Yes, I'm using Apache 2.2.11 and I do believe that threading could be
 enabled. Apache was compiled through cPanel with Easy::Apache. I
 didn't see any options to disable threading unless I missed it.

 a lot of php extensions are not thread safe, perhaps apc is one of them.
 most people compile apache w/ mpm_prefork rather than mpm_worker for this
 reason.

 i know next to nothing about cPanel, thankfully, but youll likely have to
 compile php w/ mpm_prefork in order to keep apc from melting down the engine
 :)

 -nathan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] APC problem with PHP

2009-02-10 Thread Jamie Krasnoo
Here's the modules I do have running:

extension=suhosin.so
extension=ffmpeg.so
extension=imagick.so
extension=magickwand.so
extension=memcache.so
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so

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


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

Does APC not play nice with any of these?

Jamie

On Tue, Feb 10, 2009 at 4:25 PM, Nathan Nobbe quickshif...@gmail.com wrote:
 On Tue, Feb 10, 2009 at 5:19 PM, Jamie Krasnoo jkras...@gmail.com wrote:

 I did compile Apache with mpm_prefork though.

 hmm, i doubt thats the problem then.  maybe another module not playing nice
 w/ apc, xdebug perhaps (just guessing now)?

 have you tried other caching solutions like eaccelerator to see if you
 encounter the same issue?

 -nathan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] APC problem with PHP

2009-02-10 Thread Jamie Krasnoo
Hmm, I'll try taking down the optimizer and seeing if it segfaults or
not. If that's what it is it's a crying shame that apc and
zend_optimizer can't get along.

On Tue, Feb 10, 2009 at 4:46 PM, Nathan Nobbe quickshif...@gmail.com wrote:
 On Tue, Feb 10, 2009 at 5:34 PM, Jamie Krasnoo jkras...@gmail.com wrote:

 Here's the modules I do have running:

 extension=suhosin.so
 extension=ffmpeg.so
 extension=imagick.so
 extension=magickwand.so
 extension=memcache.so
 extension=pdo.so
 extension=pdo_sqlite.so
 extension=sqlite.so
 extension=pdo_mysql.so

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


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

 Does APC not play nice with any of these?

 if i were to guess, those zend_optimizer ones, or less likely, suhosin.

 afaik, zend_optimizer and apc arent buddies,

 http://www.webdeveloper.com/forum/showthread.php?t=178217

 -nathan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] APC problem with PHP

2009-02-10 Thread Jamie Krasnoo
Ok, so I removed zend_optimizer and activated apc. Guess what ... no
cores produced. So it is zend_optimizer. I searched around the
archives and there seems to be a consensus that it really doesn't do
much or maybe even not anything at all. So it's gone. I would have
started seeing core files all over the place if it had been something
else.

Jamie

On Tue, Feb 10, 2009 at 4:53 PM, Jamie Krasnoo jkras...@gmail.com wrote:
 Hmm, I'll try taking down the optimizer and seeing if it segfaults or
 not. If that's what it is it's a crying shame that apc and
 zend_optimizer can't get along.

 On Tue, Feb 10, 2009 at 4:46 PM, Nathan Nobbe quickshif...@gmail.com wrote:
 On Tue, Feb 10, 2009 at 5:34 PM, Jamie Krasnoo jkras...@gmail.com wrote:

 Here's the modules I do have running:

 extension=suhosin.so
 extension=ffmpeg.so
 extension=imagick.so
 extension=magickwand.so
 extension=memcache.so
 extension=pdo.so
 extension=pdo_sqlite.so
 extension=sqlite.so
 extension=pdo_mysql.so

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


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

 Does APC not play nice with any of these?

 if i were to guess, those zend_optimizer ones, or less likely, suhosin.

 afaik, zend_optimizer and apc arent buddies,

 http://www.webdeveloper.com/forum/showthread.php?t=178217

 -nathan




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php