php5

PHP Chat Script.

Can anyone suggest some good php Script(or Weburl) to do chat part in my php system please... Thanks in advance:) ...

Zend_Form_Element_Hash problem (unclear documentation?)

It is written in the documentation that it is enough to include the Zend_Form_Element_Hash element in a form and that CSRF protection is handled automatically by Zend_Form. I have added the token like this: $token = new Zend_Form_Element_Hash('security_token_against_csrf'); $token->setSalt($this->_helper->randomString()); $form->addEle...

Update to PHP 5.3 on Debian 5.0-i386-default

Hello, I currently have PHP 5.0 installed on my Debian VPS and was wondering how I would be able to upgrade it to PHP 5.3 and keep all of my installed modules running. Thanks, Jake ...

How can I order a query result same as the id specified in the WHERE condition?

I have a query like this SELECT * FROM test JOIN test2 ON test.id=test2.id WHERE test.id IN (562,553,572) GROUP BY test.id Its results are ordered like this: 553, 562, 572... But I need the same order that I specified in the IN(562,553,572) condition. How can I do that? ...

How can I add custom path for validators?

Zend Framework defaultly looks for validators only in this path: Zend_Validate_: Zend/Validate/ How can I make it look also in, for example: My_Validator_: My/Validator/ I can't find anything about this problem in the documentation. ...

Enabled php5 on a windows server?

On a Linux server I need to add the following line to .htaccess file. AddHandler application/x-httpd-php5 .php Is there something similar for a windows server running php4? ...

How to Mix multiple RSS feed with PHP

I want to mix RSS feed with PHP Eg: Oursignal.com ...

Custom Zend_Form element disappearing after validation

I've created a custom form element that allows me to place text in an arbitrary location in my form: <?php class Plano_Form_Element_Note extends Zend_Form_Element_Xhtml { public $helper = 'formNote'; /** * Default decorators * * @return void */ public function loadDefaultDecorators() { if (...

URL decoding not working as expected

Hi All, My Browser shows URL with file name as http://www.example.com/pdf/204177_20090604_Chloorhexidine_DCB_oogdruppels_0%2C1%25.pdf Actual File name is 204160_20090604_Atropine_DCB_oogdruppels_0,5%.pdf After urldecode, it gives wrong file name as http://www.example.com/pdf/204177_20090604_Chloorhexidine_DCB_oogdruppels_0,1%.pdf ...

max value of attribute

I want to change the values of the @page attributes of <line/> that are descendants of <section type="cover"/> to (max(@page) + 1) of <section type="contents"/>. Basically I need the page number for the cover section to be 1 higher than the last numeric page number of the contents section. Note: <line/> nodes are not always siblings, ...

HTTP - 400 bad request while downloading file

Hi All, After further investigation on basis of previous question url encode/decode is working properly. Issue is something with Apache server (might be) which serves file download request Specially if my file name ends with % sign, it fails. For e.g. Original File name: 204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1,2%.pd...

php 5 constructor _construct does not work

Hi We have php 5.3.0 and I would like to use the constructor _construct. But somehow this constructor is not called when an instance of the class is made. And old constructor ( function ClassName() ) on the other hand works. Should not the new version (_construct) work with php 5.3.0 ? Another thing I would like to build an constructo...

How to add a txt file and create a ZIP in php

Possible Duplicate: Open file, write to file, save file as a zip and stream to user for download I have a txt file in uploads folder where i need to add this file and create a ZIP on fly and prompt the user to download the Zip file which should contain the text file .How do i do this and moreover what are the headers needed ...

PHP errors when changing hosts

I've recently inherited a website written in PHP and given the responsibility to move it from the current host to our own internal web servers. I succesfully copied the files and i can browse the site on our webserver (IIS7) however some, not all, of the PHP scripts do not appear to execute properly. For example, the following code l...

Howto run a php file from a other php file?

Is it possible to launch a php file from a other php file? I know that i can include a file but i don't mean this. Small example: i have a script which displays something from the database and a other script which get the latest data from a other site and update the database. When i include the update file, the first script will reques...

Is it possible to allow user to login into to the site based on IP address?

I stored the users IP address when they are registered.After that if they access the site from another Ip address I need to ask some security questions based on the registration.So is it possible to track the IP address.Otherwise the IP will change frequently?. p.s No need to bother about Proxies and IP spoofing. ...

Which is best encryption method base 64 or MD5?

I am currently using MD5 encryption for storing the password in database.Before we dont have the function for forgot password.But now we are implementing the forgot password.So I cant decrypt MD5 and send password to user.But I can do if it is encrypted in base64.Now I am little bit confused which is best encrption method. I already did ...

php getting array key column dynamically

Hi, I am trying to dynamically get a specific data array by using a function (parsing an excel file, so for instance, I can grab the fourth column of the file as follows): foreach ($obj->Worksheet->Table->Row as $row) { $rows[] = (string)$row->Cell[4]->Data; } My problem is im trying to dynamically specify the "cell" to get and ...

CakePHP: Containable behaviour doesn't work with find() even if contain() is called in beforeFind

Hello. My Problem: Linked to my Employees table I've got an Address table containing a virtual field called full_name (I guess you can imagine by yourself what it does). I added the Containable Behaviour and this function function beforeFind() { $this->contain('Address.full_name'); } to my Employees model, so that I don't have to...

zend framework rest controller question

Hi guys, I have a rest controller example im trying to run that is giving me a headache. My url im trying to access is localhost/books/edit/1 For some weird reason this route seems to call the getAction with the Controller instead of the editAction. And it throws errors saying that the object doesnt exist. The controller is, class B...