Read Cassandra is always taking 60 sec. Why? (cassandra ,thrift,php)
While i am retrieving data from cassandra using thrift and php, it alwas taking 60 sec. Why ...
While i am retrieving data from cassandra using thrift and php, it alwas taking 60 sec. Why ...
I'm coding a WYSIWYG editor width designMode="on" on a iframe. The editor works fine and i store the code as is in the database. Before outputing the html i need to "clean" with php on the server-side to avoid cross-site-scripting and other scary things. Is there some sort of best practice on how to do this? What tags can be dangerous?...
I was wondering if it's possible to pass a session coming from PHP by simply clicking a link from the PHP site from PHP site: Click here and then the ASP.NET site (www.123company.com) will get the value of id=1 and use it to validate an existing function. Is it possible? Comments and suggestions are welcome. Thanks ...
I have always had a problem with adding and subtracting time like for an example: 10h:34min + 07h:46min ----------- XX:XX ...
I am using Google Checkout for recurring payments (beta feature i beleive) and I cannot find any information on what the XML I post to google should look like in order to implement a trial period. At the moment I have something like: <?xml version="1.0" encoding="utf-8"?> <checkout-shopping-cart xmlns="http://checkout.google.com/schema...
I have this array: Array ( [page] => Array ( [0] => add [1] => edit [2] => delete [3] => search ) [category] => Array ( [0] => add [1] => edit [2] => export ) ) And I want it to be displayed as a html table l...
What is the best way to get the current visitors session id in Kohana v3? session_id() doesn't seem to work and only returns null for me.. At the moment Im using cookie::get('session'), but that doesn't work on the first time you access the site, which I need to do. I know you could do $this->session->id() in Kohana v2, but that doesn'...
Can someone point me in the correct direction for researching how to prevent users from breaking out of a php script with ctrl-z, ctrl-c? ...
Hi, when i go with the mouse pointer on the function it doesn't show the location, class... i have this problem in one of my projects. All is executed ok so the functions are there :). Build id: 20090920-1017 Any idea? Javi ...
I have a class method that deals with dates: public function setAvailability(DateTime $start, DateTime $end){ } Since item availability can have lower limit, upper limit, both or none, I'd like to make setAvailability() accept NULL values as well. However, the NULL constant violates the type hinting: $foo->setAvailability(NULL, $end)...
I have a simple view that feeds a home page. I have a custom module that registers some specific URLs in hook_menu that I pass into my module so I can pass them as arguments into the view. I can get the module to display the view all right, but it doesn't use the teaser/is_front view that outputs when I access the home page. I looked th...
Hi everyone, Is_numeric() as well as is_int() returns false if the value is 0. What can i do instead to verify that a specific value is numbers only in PHP? Are we heading straight for the Regular Expressions camp, or are there some nice, handy feature for this out there already? Thanks! ...
I'm having an odd issue with PHP's file_get_contents. In the past, file_get_contents on a remote file returns the text of that file regardless of the HTTP status code returned. If I hit an API and it sends back JSON error information with a status of 500, file_get_contents gives me that JSON (with no indication that an error code was en...
I am using the get_where() function in codeigniter, and I am getting mysql errors, dependent on what I set the limit and offset too, for example this code, $this->db->get_where('em_user', $whereArr, 30, 0)->num_rows() returns a mysql error that looks like this, Error Number: 1064 You have an error in your SQL syntax...
When I try to run this page (video.php), I get the following error: Parse error: syntax error, unexpected $end in /base/path/masked/inc/functions.php on line 37 The strange thing is "functions.php" has more than 37 lines... why is it detecting an end of file there? I don't think I'm missing any parens or brackets since each funct...
I want to get all midi (*.mid) files from a site that's set up pretty simple in terms of directory tree structure. I wish we had wget installed here, but that's another party.... The site is VGMusic.com and the path containing all of the midi files is: http://www.vgmusic.com/music/console/nintendo/nes/ I tried glob'ing it out, but I...
i just wonder, should one use symfony's lime or phpunit for testing? what are the pros and cons with each one? thanks ...
When I run phpinfo() and look by the Configuration category under PHP Core, I see a directive titled include_path, with a local value and a master value. In this case, my local value is set to .: ./include: ../include: /usr/share/php: /usr/share/php/smarty: /usr/share/pear and my master value is set to .: /usr/share/php: /usr/shar...
I usually use a classes destructor method __destruct() to persist objects to session or what have you. It is just very convinient, but I'm curious to if there are any other methods that are equally appealing. Do you know of such? The curiousity arose as I was to merge/utilize two frameworks that both made use of __destruct() for persist...
I have a user form where users can post comment on articles. i need to allow strong, em and span tags for user inputs. I know this can be achieved through strip_tags function but i also want the other tags not to stripped but be changed using say htmlspecialchars function so that tags can be seen in the page. I hope it made sense. ...