MonkeyZeus

1

votes
1

answer
26

views

math.js acting unexpectedly

Chrome 57.0.2987.110 (64-bit) math.js v3.10.0 Using the code below I get false. Am I not doing this right? math.config({'number': 'BigNumber'}); console.log(math.largerEq('120', '2')); https://jsfiddle.net/z2jmLndn/1/
MonkeyZeus
1

votes
1

answer
80

views

Apache redirect all child directories except one

So, I have the following URLs: www.example.com/parent/child1 www.example.com/parent/child2 www.example.com/parent/child3 www.example.com/parent/cool-feature www.example.com/parent/product etc... I need to redirect all children except for child2 to a new domain. So far I have come up with: RedirectMa...
MonkeyZeus
1

votes
1

answer
250

views

Maintain all values of duplicate keys when parsing .ini file

I have a php.ini file which contains the following lines: ; ...settings extension=pdo_mysql extension=pdo_oci ; settings... So I do this: var_dump( parse_ini_file( '/path/to/php.ini' )[ 'extension' ] ); But all I get is string(7) 'pdo_oci' so it looks like the parse simply maintains the final value...
MonkeyZeus
17

votes
3

answer
17.1k

views

Fully Understanding PDO ATTR_PERSISTENT

Question: What are the rules/logic behind persistent connection management when using PDO? Environment: Web Server Windows 7 x64 Dual-core with 16GB RAM Apache 2.2.17 PHP 5.3.5 Connecting through DSN string with IP address, port, service name, etc... No ODBC for DB conn (been trying to create one fo...
MonkeyZeus
5

votes
1

answer
142

views

Some chars encoded during POST while others are not

TL;DR CodeIgniters' Security Class directly manipulates your Globals such as $_POST and it finds file() and file () to be a threat so it HTML encodes it. // config.php from my apps folder is the culprit $config['global_xss_filtering'] = TRUE; Do-It-Yourself (the few, the brave) In CodeIgniter 2.1.4...
MonkeyZeus
2

votes
2

answer
43

views

Unexpected behavior when assigning multiple variables in if() block

In the spirit of seeing Short-circuit evaluation like Python's 'and' while storing results of checks I decided to see how this could be best solved in PHP but I've run into an issue. unexpected
MonkeyZeus
4

votes
1

answer
59

views

Simple try/finally vs. try/catch

With a simple function such as: function hello( $var ) { try { // do something with $var which may or may not throw an exception return $var; } finally { return $var; } } Is there any difference in regards to logic or processing if it was converted to: function hello( $var ) { try { // do something...
MonkeyZeus
3

votes
0

answer
47

views
1

votes
1

answer
1.4k

views

CURLOPT_VERBOSE not working

Windows 7 x64 PHP 7.2.2 x64 I am trying to view a simple request payload so I have created a PHP file per https://docstore.mik.ua/orelly/webprog/pcook/ch11_07.htm
MonkeyZeus
4

votes
3

answer
108

views

preg_replace() is replacing too much

I am working on a simple SQL debugger which will accept parameterized variables and try to replace them accordingly so that if a piece of SQL has an issue then I can copy+paste it directly into my RDBMS to work with the query and hopefully debug an issue quicker. So far I essentially have this, but...
MonkeyZeus
4

votes
1

answer
154

views

Namespacing with eval() and include() does not work as expected

I am just messing around and I've come across this: Doesn't work
MonkeyZeus
2

votes
1

answer
91

views

JavaScript object behavior

I do not get stumped often but I am just at a loss of words right now. Using Chrome 37.0.2062.120 m Can someone explain to me why my console.log(); is reporting these results? JS code var some_obj = {min:1}; var another_obj = {}; console.log(some_obj); another_obj['sometarget'] = some_obj; //
MonkeyZeus
11

votes
0

answer
361

views

LinkedIn directing people to SO? [duplicate]

This question already has an answer here: Is it acceptable to use Stack Overflow as a Q&A for a specific product? 1 answer https://developer.linkedin.com/blog/stacking-api-support-linkedin Is this really happening? Can we no longer provide comments to the effect of 'Take this up with the support te...
MonkeyZeus
47

votes
3

answer
780

views

What is the purpose of voting rings?

Inspired by Number of 'User was removed' increasing rapidly I would like to simply ask why do people go through the trouble of creating voting rings? What benefit does it bring them? Do these rings sell their voting services to new users that ask bad questions? Am I missing something obvious? Are th...
MonkeyZeus