I have a table using Doctrine's Searchable behaviour, which works well for single word queries. However I've noticed that when a query includes a space, the page hangs and I can't get any response out of refreshing the page etc.
If I open Activity Monitor on my Mac, or SSH then 'top' in Ububntu, MySQL is running a process at up to 300% ...
I'm using strip_tags in PHP and after it has processed the string, the string now also contains no \n's..
Is this standard with strip_tags?
...
I am creating multiple select element like this and it is showed successfully on form:
$element = new Zend_Form_Element_Multiselect('clinics');
$element->setLabel("Clinics");
$element->setAttrib( 'style','width: 240px' );
$element->setMultiOptions( array( '1'=>'clinic1', '2'=>'clinic2' ) );
After rendering above element it shows the f...
I've been trying to write a script which grabs a page with two frames using CURL, but I haven't had any luck. The problem is that the urls of the two pages (to be displayed in the frames) are relative, and CURL ends up searching my server for the files, which obviously they aren't located on. As a result I get an error message saying the...
Earlier I managed to port some C++ CryptoPP Rijndael_128 CBC code to MCrypt PHP, but now I'm having problems with CFB mode. The C++ and PHP results do not match (well the first byte matches but this could be coincidence, everything else doesn't). With some diagnostics, it looks like PHP's mcrypt is not setting the key length correctly?
...
Hello friends,
I am trying to download file through ajax request.
I have below code in my php file to dowload
$filedata="File data here"
header("Content-type: application/octet-stream");
header("Content-Disposition:attachment; filename=report.txt");
header('Content-Transfer-Encoding: binary');
header("Pragma: public");
header("Expires: ...
Hello.
I'm documenting my CakePHP app using PHPdocumentor. As you might know, after CakePHP convention, the views are contained in .ctp files (e.g. app/views/addresses/index.ctp), which are basically normal PHP files just with a changed file extension. PHPdocumentor only recognizes .php files, and I cannot find an option in the config fi...
I have a feed with images in the description node. How can I parse out just the image URL and just the description text with no line break in between?
<description><img src='http://example.com/100915gignac-clement_g_70x70.jpg'&gt;&lt;/img&gt;&lt;br />(Source: Example.com) Québec annonce qu'une autorisation ministé...
Right now, I have Zend form elements wrapped in list-items. Form is validating or coughing up errors as it should. But I'd like to apply a class to the list-items of offending elements (but only to the list-items offending elements) on failed validation. Example:
This field has valid input
<li>
<input type="text" name="address2" id...
Hey everyone,
We have created a website using Drupal , but the problem ( good problem ) is that we are getting WAAAAYY too many hits on the server to the point where the traffic is brining the server down to its knees.
now we want to run the application off of 3 servers behind a load balancer, one to just serve mysql and the other 2 ...
I'm a little stuck. How do I remove multiple newlines which are in a row with one newline. There could be anything up to 20 newlines next to each other. For example
James said hello\n\n\n\n Test\n Test two\n\n
Would end up as:
James said hello\n Test\n Test two\n
...
Hi,
I am using cakephp. And I have textarea field where users paste data, I using tinymce plugin to format text. I have warned users not to enter telephone number or email address inside the textarea. But, I dont want to take chances.
Is there a way I can extract the telephone number and email from textarea and replace it something li...
Hi Friends,
I have a text field for documentation, which is working good. Now the problem is whenever user enters some new text into it. I need a date in format(dd.mm.yy), that should be attached to it automatically, with the time stamp.
For example, when the user first enters, "Problem with production". then clicks save then it shoul...
Hi
Im looking to create a web application using ASP.NET MVC or PHP (not decided yet!) and I want to use the local ActiveDirectory to register users. Can anyone point out how to do this on PHP or ASP.NET?
Would like answers on any of the technologies
Best regards,
David
...
A) If I have a java application which starts up and waits for socket connections on a specified port. Is there a way i could maintain a session connection in php after a user validates, i.e a persistent connection?
B) I mean, I'm trying to understand how its done with mysql and php. How does mysql or php know what the last opened connec...
Notice: Undefined index: subject in /var/www/mailer.php on line 12 Notice: Undefined index: message in /var/www/mailer.php on line 13 Notice: Undefined index: from in /var/www/mailer.php on line 14 Notice: Undefined index: verif_box in /var/www/mailer.php on line 15 Notice: Undefined index: tntcon in /var/www/mailer.php on line 23 no var...
I'm a .Net developer, I focus mainly on the system logic rather than UI stuff, and I actually know zero about PHP so please excuse any ignorance!
We are looking at using a marketing/SEO/design agency to aid us in launching a website, and they use Magento. However we have a completely bespoke order fulfilment system, which already exists...
I'm using Netbeans 6.9 to develop PHP code; testing happens locally on my PC (XAMPP); once done code is uploaded using Netbeans upload facility to the production web server.
I recall reading about Netbeans capabilities running scripts when "building" the project, and looking for a primer about it.
Particularly I'm looking for some ways ...
I've recently learned OOP in PHP,.. and I though I'd try to write a class in PHP that generates tags for forms i.e. something that lets you generate forms. Its probably been done a billion times before/ or isn't a very good idea. I'm just doing it as an exercise. Anyway, how would I go about planning this?
$form = new Form_Class($for...
I dont't want to use any framework, but I need a Frontcontroller,
Where I can get HELP
Thanks.
...