php

How to maintain a persistent http connection in php?

hi, i've a little web interface which uploads a file on a server and then dumps that file in oracle db. but there are about 7 million records in it and web server get time out while reading and dumping that file. can someone please tell me how can i keep that session alive so that it doesn't get timeout when uploading, reading and dump...

Doubt in Copying file and .htacess Rewriting

Now this is an example of a search on my website : http://engine.searchr.us/web-search.phtml?search=TEST+SEARCH Now,The first thing what i want to do is rewrite all the searches which are being done into something like this : (using .htacess) http://engine.searchr.us/web-search/search/TEST-SEARCH.html And the second thing is i want ...

Querypath and Malformed HTML

I'm using QueryPath to manipulate a pages DOM. The page I'm manipulating has some tags that QueryPath doesn't know how to interpret. I've tried passing the following as options but I still get errors: ignore_parser_warnings use_parser (html) I get the following errors with these enabled: Warning: DOMDocument::loadHTML() [domdocument....

php redirect not working with Nginx

Simple problem: I have conditions in php like so: if (!$authorized) show_site_404(); or like so for that matter if (!$logged_on) show_login_page(); These are obviously toll gates so that we don't have trespassers into parts of the system where only a specific user or only those that are logged on should be able to go. The ...

What is an approperiate content-type header for Javascript files

I am delivering a JS response from a PHP file, while setting the content-type header which value should I use, application/javascript or text/javascript ? whats the difference between two ? ...

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 (...

PHP session_start() fails to create session.

These are my first 5 lines in my index.php: <?php session_start(); if (!isset($_SESSION['cart'])) $_SESSION['cart']=''; $page = $_GET['page']; ?> and so on.. I'm looking at the sessions trough the firefox->firebug->firecookie plugin and a session is not created.(I am sure of it because the cart that worked yesterday doesnt work toda...

Want to audit my PHP security, will this PHP harm/modifiy/etc my system if run?

CODE_DESC: "This web-accessible script will list security recommendations after scanning available PHP configuration variables and functions for common exploit vectors." SOURCE_CODE: http://php-security-audit.com/scripts/view/php_security.php Will this PHP harm/modifiy/etc my system if run? ...

Slight problem getting mySQL SUBSTRING to work..

I know I am pretty close with this, as I have recieved some help on this topic earlier, but when it cam to making the same code work for another part of the site it seems I cannot get it working again. What I am doing is trying to get the first part of a string (which is broken by a - delimiter in the database) so the db entry slug woul...

How to implement CCAvenue Payment Gateway in my PHP Site?

Hello Everybody, I want to implement CCAVenue Payment gateway in my php site. Please help me regarding this. Thanks in advance. Kanji ...

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 ...

How to diagnose .htaccess speed issues via RewriteLog

We have .htaccess setup to handle URLs like: http://www.oursite.com/events/Health/Insectology/343/346.html But clicking from such a generated page to: http://www.oursite.com/events/Anything/Anything/abc/abc.html Seems to reload the page completely (and not use the cached images). (This question is related to http://stackoverflow.c...

query to imlement block list....

Hai all, I have two tables a and b as follows to implement a simple block list where users can block other users..... Table A +------------+--------------+------+ | Name | phone |userid| +------------+--------------+------+ | Mr Sasi | 01225 708225 | 1 | | Miss Brown | 01225 899360 | 2 | | Mr Black | 0138...

curl simple form, why session false

hi i tried many tutorials but all failed, i know for an experienced user it might be obvious, thx anyway. there is the simple form: https://www.shab.ch/shabforms/COMMON/application/applicationGrid.jsp?template=1&amp;view=2&amp;page=/COMMON/search/searchForm.jsp?MODE=SHAB here is my script which returns only the empty form instead of ...

How can I secure my plugin so only paying users can use it?

I'm developing some (wordpress) plugins and I'm planning to have a license fee for whoever want's to use it. Therefor I need a way to make sure that this plugin is not uploaded to a server where anyone can download it and use it for free. So I was thinking of using an API key. Valid API key = user can use the plugin. Invalid = plugin d...

PHP simpletest assertion

What is the equivalent of assertLessThan in simpletest? ...

PHP FFmpeg video aspect ratio problem [SOLVED]

Hello Friends, i compiled the new version of FFMPEG and the padding commands have been deprecated. As i try to get familiar with the new -vf pad= commands, i want to ask, how can i convert a video without changing it's aspect ratio. I've checked numerous solutions from stackoverflow, nothing seemed to work. Can someone, please post ...

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...

Jquery Post to external php

I want to post to an external php file and get the result. It a php that i have hosted in my server online. I want the static page in my localhost post by ajax and load the html in a div. But I'm not able to do this. $.post("http://www.site.com/index.php", { font: "panchami", input: "hi" } ); Is there anything wrong in this? ...

Doctrine: Complex JOIN problem

I have many-2-many relation between Property and Feature. I have to extract results from Property table, but only if both or more Features are related. Ie. Property #1 is related to 'Swimming Pool' and 'Garden'. Property #2 is related only to 'Swimming Pool'. So when I ask for properties that has both 'Swimming Pool' and 'Garden', it sh...