[PHP] database credentials with ini_set() question?
I know that phpinfo() will show the pass and username as plain text, but other than that what are the security reasons for not using ini_set() for database credentials? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Want to learn to work with Zend Framework?
NOw if they would cover the Zend Library I might pay a dollar. Daniel Brown wrote: On Thu, Mar 4, 2010 at 14:59, mrfroasty mrfroa...@gmail.com wrote: Looks expensive, definately NO Then do not reply. It was an offer to the community at large, not just you and the other top-poster. ;-P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Memory investigation
you could read this http://xdebug.org/docs/execution_trace and then parse trace files to get the memory usage create a global to store user functions, I think user function do not populate get_defined_functions(); until the function is called; $t = get_defined_functions(); $userFunctions = $t['user']; $file = xdebug_get_tracefile_name(); parse the file and then create a function to call the said variable. I think you can figure it out. la...@garfieldtech.com wrote: Currently it's mostly procedural with some components that are OO. I suspect most of the memory sinks are large arrays (we have a lot of them), but I am not certain of that. Hence my interest in more accurate investigation tools. --Larry Garfield dsiemba...@gmail.com wrote: couple questions Larry is this application composed of classes or straight up no holes barred procedural code? la...@garfieldtech.com wrote: That's not really what I'm after. Let me try an example: function foo($id) { static $foos = array(); if (empty($foos[$id]) { $foos[$id] = load_foo($id); } return $foos[$id]; } When load_foo() is slow (e.g., lots of DB traffic or remote-server calls or whatever), such caching can have a significant performance boost. Sometime after foo() has been called 15 times from 30 places in code, when I get to the end of the request (or just every time I call foo() would be fine) I want to be able to do something like: $cost = get_memory_used_by($foos); So that I can determine how much memory that caching is costing me over the lifetime of the page, and determine if it's a worthwhile trade-off. --Larry Garfield dsiemba...@gmail.com wrote: function check_memory_usage($memory) { $memory[] = memory_get_usage(); return $memory; } something like this? you can put it wherever you like and returns an array for further processing. You could optionally add a second argument to set the index to a name and check if the name exists to add 1 to the end of the name so your indexes stay maintained. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Want to learn to work with Zend Framework?
no Debbie Otterstetter wrote: Zend has an upcoming Framework: Fundamentals class that some of you may be interested in. You can find more information at this webpage: http://www.zend.com/en/services/training/course-catalog/zend-framework Class dates/times: March 15, 16, 17, 18, 19, 22, 23, 24 25 from 8-10am PST All classes are on-line and led with a live instructor. Please let me know if you have any questions. Debbie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Memory investigation
function check_memory_usage($memory) { $memory[] = memory_get_usage(); return $memory; } something like this? you can put it wherever you like and returns an array for further processing. You could optionally add a second argument to set the index to a name and check if the name exists to add 1 to the end of the name so your indexes stay maintained. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Database design
a good tool for mapping mysql databases is mysql-workbench. the real question is how much normalization is normal? http://wb.mysql.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Memory investigation
couple questions Larry is this application composed of classes or straight up no holes barred procedural code? la...@garfieldtech.com wrote: That's not really what I'm after. Let me try an example: function foo($id) { static $foos = array(); if (empty($foos[$id]) { $foos[$id] = load_foo($id); } return $foos[$id]; } When load_foo() is slow (e.g., lots of DB traffic or remote-server calls or whatever), such caching can have a significant performance boost. Sometime after foo() has been called 15 times from 30 places in code, when I get to the end of the request (or just every time I call foo() would be fine) I want to be able to do something like: $cost = get_memory_used_by($foos); So that I can determine how much memory that caching is costing me over the lifetime of the page, and determine if it's a worthwhile trade-off. --Larry Garfield dsiemba...@gmail.com wrote: function check_memory_usage($memory) { $memory[] = memory_get_usage(); return $memory; } something like this? you can put it wherever you like and returns an array for further processing. You could optionally add a second argument to set the index to a name and check if the name exists to add 1 to the end of the name so your indexes stay maintained. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php