php

Automation : Selenium - PHPUnit performance problem in linux

I am using the PHPUnit framework to write testcases for execution on the Selenium RC server. The PHP scripts and the selenium server are running in the same machine. I have written some functions like reading of XML files, command like parameters, XLIFF integration etc by extending the PHPUnit_Extensions_SeleniumTestCase class. But the p...

PHP: Condense array of similar strings into one merged array

Hi everyone. Working with an array of dates (opening times for a business). I want to condense them to their briefest possible form. So far, I started out with this structure Array ( [Mon] => 12noon-2:45pm, 5:30pm-10:30pm [Tue] => 12noon-2:45pm, 5:30pm-10:30pm [Wed] => 12noon-2:45pm, 5:30pm-10:30pm [Thu] => 12noon-2:45...

I'm trying to stop the PHP function which takes my form input value and rounds to the nearest Integer.

NOTE: This is from a Joomla component. The Problem: When I enter, say, 4.90 into the price input box and hit save the price becomes 5, etc. I need for the value to remain as entered. I've tracked down this block of code in the form.php looks like it might be the right one, but I can't figure out what needs to change: function toTran...

after .htaccess url rewrite, cannot perform logoff in some of the url rewrited page

Recently, I was doing .htaccess url rewrite, make all my php url into html, in some page, the logout button wont work properly. for example, in page ‘quotedetails/Q9999.html’ (rewrited from ‘quotedetails.php?quoteID=Q9999′), when I click logout button in this page, it wont do the trick, but when i use the old php url of this page, it wor...

Can one form have multiple actions?

I am wanting to submit a form to different places based on selections made in the form. I had originally been planning to to send all to a central file/location and have it determine where to go next. However, I would like to do without this extra step if I could. If the user wants to create/edit/delete elements go to page 1. If the use...

Are mysql_close and pg_close required ?

Possible Duplicate: using mysql_close() Are mysql_close and pg_close required ? In some script there aren't... why ? What happen if I don't use its ? ...

How can I concatenate these values and perform an md5 calculation

I have some values: $data1 $data2 $data3 I want to concatenate these variables and then perform an md5 calculation how is it done?? ...

curl_init undefined?

Hi I am importing the contacts from gmail to my page ..... The process does not work due to this error 'curl_init' is not defined The suggestion i got is to uncomment destination curl.dll copy the following libraries to the windows/system32 dir: ssleay32.dll and libeay32.dll copy php_curl.dll to windows/system32 After tr...

How to map (large) integer on (small in size( alphanumeric string with PHP? (Cantor?)

Dear all, I can't figure out how to optimally do the following in PHP: In a database, I have messages with a unique ID, like 19041985. Now, I want to refer to these messages in a short-url service but not using generated hashes but by simply 'calculate' the original ID. In other words, for example: http://short.url/sYsn7 should let me ...

Is there such a thing as an over use of PHP's include()?

I am using includes to pull in the various functions I am using, and I am now starting to use include to pull in chunks of HTML/PHP. Is there a point where I have overused includes? ...

PHP: How to create the uppercase MD5 value of the ASCII equivalent of a word?

I have a secret word (example. dirtydawg) And using PHP I want to create the uppercase MD5 value of the ASCII equivalent of the secret word. How do I do this???? ...

[jquery] multiple resizables acting strange

Hi there everyone, I'm trying to place multiple resizable and draggable div's on one page that move (vertically) inside their own parent div. you can take a look at http://bit.ly/bCutBE However, these div's act really strange when I want to resize them, especially from the north side, they kind of move out of the screen very fast, whil...

Calling controller methods from inside view in Codeigniter

Is there a way to call a method inside the controller from our view using codeigniter.I know it is a bad practice but, now I force to do this.Thank you ...

Preserve name of file using cURL to transfer files

I'm transferring files from an existing http request using cURL like so... $postargs = array( 'nonfilefield' =>'nonfilevalue', 'fileentry' => '@'.$_FILES['thefile']['tmp_name'][0] ); $ch = curl_init('http://localhost/curl/rec.php'); curl_setopt($ch,CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Window...

disable Virtual Directory Support in apache

hi, i am using php and apache for my local system. when i get my phpinfo details using phpinfo(), i got that my Virtual Directory Support | enabled how can i disable this... any one have idea about this? Thanks in Advance ...

Help creating md5 in php

I am trying to create an md5 value in php using the instruction given. I can't seem to get it right and would like you help understanding the instructions and the code. This is what the instructions say: The md5 is constructed by performing an MD5 calculation on a string built up by concatenating these fields. Specifically the MD5 has...

Overriding PEAR error handler

Hi everyone, I'm currently working on an application that requires lots of external libraries. My job right now is set a unique error handler that will manage every error. So far, I found 7 different types of PEAR errors: PEAR_ERROR_RETURN: PEAR_ERROR_EXCEPTION: PEAR_ERROR_CALLBACK: PEAR_ERROR_PRINT: PEAR_ERROR_TRIGGER: PEAR_ERROR_D...

How to create file download counter ?

Which is the most simple way to create code ( with PHP and SQL ) which will count the file downloads ? I already have an integer column in the base dedicated for this feature... ( link to some example will also be welcomed ) ...

Is there any other way to fetch the gmail contacts?

Hi I found the curl not working after all possible ways of debugging mentioned in php.net Even then the curl doesnt seems to work for me Is there any other method to import the contacts fronm gmail to php? ...

PHP: Formatting multi-dimensional array as HTML?

Hi everybody, I have tried to get my head around building a recursive function to handle formatting of a unknown depth multi-dimensional array to HTML and nested Divs. I thought that it should be a piece of cake, but no. Here's what I have come up with this far: function formatHtml($array) { $var = '<div>'; foreach ($array a...