php5

Apache webserver crashing!

Hello, I am using a Wampserver 2.0 for database-web development. When i ran the following the php code which is embbeded in my html form, the server crashes meanwhile other php processes on different pages are responding effectively. I have checked my apache error log and saw the following message: [Fri Oct 22 11:37:04 2010] [error] [c...

zend framework posting json via rest

Hi guys, Im trying to build an authenticating api with rest and also post a large object. Im talking about posting number of items such as some information about a car and its owner and store the information at a db level. is rest the way to go with this or use soap ? and if so any ideas how i can post json objects ? Much appreciate it....

How to integrate icici payseal payment gateway in php?

Hi, I am using icici payseal payment gateway. I have read the manual and downloaded the sfa folder available on the merchant web interface. I have followed the steps as mentioned in the manual.Downloaded the php java bridge and run an example to test whether java is working or not, it worked but when i used it with the example given in ...

Translating default form validation error messages in Symfony 1.4

Hi there! I want to translate the default form validation messages in symfony, like 'required' => 'my own text' Is there a way to do this? I searched in google, but haven't find anything useful. The XLIFF files are not working for me. :( OR Is there a way, to set default validation messages for like 'required' fields? e' ...

change facet field in drupals apache solr module

Hey! I have installed the apache solr module in drupal. I have the search page returning the facets. What I need to do is to change html given by the module of one of the facets. I want to change it from checkboxes to sliders (using jquery) I know how to create the sliders. What I don't know is how to change the html generated for the...

PHP: Problems finding the most frequent character in a UTF-8 string (eg 唐犬土用家犬尨犬山桑)?

From an MySQL database I can extract the following utf-8 characters: "唐犬土用家犬尨犬山桑山犬巴戦師子幻日幻月引綱忠犬愛犬戌年成犬教条教義" I am trying to find the most frequent character in this string. I tried putting each as element into an array $arr and do array_count_values($arr); Unfortunately the array operations (or is print_r the culprit?) produce mis-encoded...

parsing/searching a beastly array filled with simple xml objects in php

Hi, So Im working on a Excel xml parsing class, and Im trying to search through an array of the header values of the file, to return the key integer. If I can get the key int, then I can grab an entire column by the value of the header in the file. I have tried using in_array, search_array and a bunch of other functions, but nothing is ...

Programatically download a file to memory php

Hi I would like to know how to download a file to a variable (or memory) with php. I have tried using file_get_contents and a few RSS feed php libraries with no output (even with var_dump). This is the url that I am trying to access: http://www.facebook.com/feeds/friends_status.php?id=MY_USER_ID&key=SECRET_KEY&format=rss20 MY...

Alternative to base64_encode

Are there any other encoding functions other than base64_encode for encoding text in PHP? Edit: The purpose of the encoding functions: To generate a string that can be used in a URL that can be used as an identifier. For example, instead of http://www.something.com/?id=4&category=books&type=20 I would like to have: http://w...

Access Variable variables with an object

Hello, I don't really know how to decribe this problem, so I'm sorry if the title is a bit unclear. I got an object with array fields. I got the name of these fields stored in a variable and I want to reach an element in one of those array fields. e.g. $field_name = 'array_field'; $object = new stdClass(); $object->array_field= array...

What are the security measures I need to follow if I implement website in intranet?

Hi Friends, Like this only but not in joomla and less than 10 users.We are going to give the demo of our web application on intranet and also we may implement in intranet only.So the concern is The source code and database needs to be secure(i.e.Not easily readable by clients) What are the security measures I need to follow in this...

MySQL select all missing a record

I have added a new record to a table using phpMyAdmin I then run select * within phpMyAdmin and it works listing all records. However if run the same select * from a PHP page the new record is missing. I am using PHP 5 and am not sure what is going on here. It used to work in PHP 4. .php files run as PHP 5 Apache module mode. ...

PHP: How to get name value in <form name="form1" />

Is there a way to get the value of the name attribute in the form tag? I'm using PHP and don't see it in $_POST. ...

Ajax methods - which is better?

I have a bunch of insert, update, and delete operations I need to execute via Ajax. Which of the following would be a better approach? Individual methods for each function (e.g. delete_foo, insert_foo, update_foo, delete_bar, insert_bar, update_bar, etc.) A "master" method and just pass a parameter to distinguish between operations. ...

php extract() function

i am trying to implement an extract function to grab data from my database and display it in a form so i cn update the database. the form is ok but the extract function.. this is what i have: $id = $_GET['id']; $qP = "SELECT * FROM test_mysql WHERE id = '$id' "; $rsP = mysql_query($qP); $row = mysql_fetch_array($rsP); extract($row); $...

How can I generate an automatic weather?

Hello, I have to create an automatic weather including rain, snow, clouds, fog and sunny. Depending on the season I need to set a percentage for all weather: the forecast will be updated 3 or 4 times during a day. Example: Winter | Rain: 30% Snow: 30% Sunny: 10% Cloudy: 10%, Fog: 20% I do not know how to implement a random condition ...

CakePHP - How I could receive related object?

I am trying get all commments relateed to my current post, I am doing it as following: $this->Post->Comment->find('all', array('conditions' => array('post_id' => $id))); but in my opinion, it is a little uncomfortably. Why I should give post_id? Isn't it obvious that I want Comment related to current Post? ...

How do i iterate through this type of array in php

array(2) { ["param"]=> array(1) { ["stuNBR"]=> string(5) "555555" } ["data"]=> array(3) { [0]=> array(6) { ["SEQNBR"]=> string(1) "2" ["CDE"]=> string(3) "MUG" ["NBR1"]=> string(1) "1" ["NBR2"]=> string(1) "0" ["NBR3"]=> string(3) "PAN" ["NBR4"]=>...

how to upload folder with php

Hello Is it possible to upload folder with browser? I search in google and find out that this is broswer limitation must use java applate or flash. Is there any way to upload folder with flash. i can not get any clue about this. Is there any way to get only folder path with browser ...

php Extends three class without interface

I have three class , called A,B,C and another class called X. In this X class I want to access a few function from A, B and C. I know if I want to access the function in one class, I can use: class X extends A { ... } Now I can access all A public functions, but now I want to access the B and C class functions as well. How do I acc...