how to have 64 bit integer on PHP?
does someone know how to have 64 bit integer on PHP? it seems like it is not by config file but rather it might be a compile time option and it depends on the platform? ...
does someone know how to have 64 bit integer on PHP? it seems like it is not by config file but rather it might be a compile time option and it depends on the platform? ...
I have a Zend_Form_Element_Multicheckbox and I want to put some of its elements in a readonly state, how do I do that? $colId = new Zend_Form_Element_MultiCheckbox('colId'); $colId->setLabel('Col ID') ->setMultiOptions(array_flip(array('sadda', 'asss')); ...
Hi guys, Can anyone please recommend the best and easiest way to include multiple Javascript files on a (PHP based) web page? I have a website that uses jQuery, and anything up to around 10 plugins on any one particular page. I'm not entirely sure of the best way to go about including all these files to make life simple for me as a dev...
Hi guys, I want to allow uploads of very large files into our PHP application (hundred of megs - 8 gigs). There are a couple of problems with this however. Browser: HTML uploads have crappy feedback, we need to either poll for progress (which is a bit silly) or show no feedback at all Flash uploader puts entire file into memory befor...
Hi All Hope you can advise. Im pulling my hair out on a query and hope you can advise. I have a table where I want to select MAX from an inner count between dates with an IN. View Table Here is what I have tried but with no luck at all. SELECT MAX(no_hits) from (SELECT count(hits) AS 'no_hits' ) FROM stats WHERE 'date' >= DATE_SUB(C...
Using PHP against a UTF-8 compliant database. Here's how input goes in. user types input into textarea textarea encoded with javascript escape() passed via HTTP post decoded with PHP rawurldecode() passed through HTMLPurifier with default settings escaped for MySQL and stored in database And it comes out in the usual way and I run un...
<? class AccountModel { public $form = array ( 'email' => 'email', 'password' => array ( 'alphaNumeric' => array ( 'on' => 'create', 'required' => false, 'error' => 'Alphabets and numbers only' ), 'alphaNumeric' => array ( 'on' => 'update', 'required' => false, 'e...
I want a certain action to happen when a user has visited X pages of a site Do I have to store the counter externally (in a txt file or db)? I can't think of a way to set the counter to 0, then increment it each page load. The counter would always get reset to 0, or am I missing something obvious? ...
I have a long-running script that seems to occasionally report the following NOTICE-level error: pg_send_query(): Cannot set connection to blocking mode It seems to continue to send queries afterward, but it's unclear if it successfully sends the query that generates the error. What is this a symptom of? Edit: There are no entries...
Looking for a property that will give me the number of rows returned on a query. ...
I am new to XML/XSL. I want to be able to pass a var in a rule string and have that return the correct data. Right now I have have this PHP: <?php $params = array('id' => $_GET['id']); $xslDoc = new DOMDocument(); $xslDoc->load("test.xsl"); $xmlDoc = new DOMDocument(); $xmlDoc->load("test.xml"); $xsltProcessor = new XSLTProcessor...
Hi I made a simple news system with comments using PHP and MySQL, and it worked great on my local Apache server, both on my Fedora 10 machine, and my Windows 7 one. Now I have a problem though, I uploaded it to a web host and it keeps returning all the ' and " as \' and \". I believe this is either the web host who by automatic adds them...
Long story short: why does Zend ACL support multiple inheritance among roles and not resources? I have a large tree of resources that I would like to be able to grant permissions on. In the past, what I have done to represent this is creating two different trees. The first one has a generic resource of each type in a tree. The second ha...
The following url works ok: http://localhost/index/index/ However, I am unable to _get$ variables when they come in like this: http://localhost/index/index/test/1234/test2/4321 -but- I can however, _get$ the variables these ways: http://localhost/index.php?test=1234&test2=4321 http://localhost/index?test=1234&test2=4321 h...
Regarding the php code smell detector at http://c2.com/cgi/wiki?DetectingCodeSmellsInPhp When I open it in my web browser, I get an error, but when I open it in my IDE, I don't. How to correct it? ...
Hello, I have a php script that reads one file through http(the file is on other domain). I would like to read this file only once or twice a day, instead of connecting to it every time the website is refreshed. Is there any other way than doing it with cron? I dont want to use cron cause I prefer to setup this behaviour in the script i...
I have $user = $this->Auth->user(); which retrieves the current user from the session. I want to make an admin user be able to 'act as' a customer. And I was hoping to be able to just replace the customer_id in the user session when they enter the customer interface. $user['User']['customer_id'] = 4; This doesn't work because I ...
I have been programming in PHP for a while but I still dont understand the difference between == and ===. I know that = is assignment. And == is equals to. So what is the purpose of ===? ...
I don't really want to call the Zend filter in my code after every getRequest->getParam('x') if I don't have to. Is there a lazy way of filtering everything inside getRequest magically? Edit: When I say filter, I mean, escapting tags, cleaning out the XSS, and escaping any sql escape characters. i.e: $myVar = $this->getRequest()->get...
I work for a school district in which the teachers submit their lesson plans to their principals online. They do this using an online form I wrote using PHP/MySQL and it uses TinyMCE for its textareas. One of the major features that was requested was for teachers to be able to save their incomplete forms as drafts to submit later. This ...