php

Zend Framework: Handling of multiple database records in one form as checkboxes

Hi everyone, I'm new to zend framework but have made my first steps with it successfully. Until now I have created some Zend_Forms which are mapping single records of my model to the form fields. I have handled the forms with form classes for each case. This works all very well until now. Now I have the situation that I have to asign...

php post password routines?

Hi, I am very interested to find out how to keep php passwords secure. Main question is: How do I post the password as a secured string from the login form? I have been checking how other sites do this e.g. facebook. When I log in to facebook I dont see my password posted at all, it just seems like a long encrypted string. How do I c...

Facebook application framework

I am new to facebook application. I am a ASP.NET developer but also have knowledge of PHP. I just want to know if i have to choose facebook application API/framework, which one i should choose ASP.NET or PHP. One of my friend suggest that Facebook itself build in PHP and they officially support PHP API, so use PHP facebook application AP...

zend framework : how to add the new file

i want to build new project with zendframe work and mvc application.. already i build the project using framework.zend.com. further more i would like to include new php file to the project. automatically index file created by zend frameworkd for this project. so i want to include another php file to this project.. i dont know how to...

mysql php connection problem in windows 7

i install windows7 ultimate and php 5.3.1 and mysql server 5.1 mysql server work fine from mysql> and if see phpinfo(); i get the following table mysql MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version mysqlnd 5.0.5-dev - 0811...

How to Import Bookmarks from Browsers (Firefox, Safari, Opera, Chrome) into your Application?

Hello all, As a feature of the application I am creating - I wish to enable the importing of bookmarks from different browsers. I have two questions, the first is a bit silly: Is it possible to import bookmarks from the browser using JavaScript - I am guessing no? Does anyone know of any pre-written classes that I can make use of to a...

PHP Packaging/Deployment

What is a good way to package a web application in PHP for easy deployment? Currently, I am using make to generate a gzipped tar file. In Java, most people use Maven and build WARs. I wonder if there is a similar standard practice in PHP world. There is a Maven for PHP. I wonder if it's the way to go. ...

Problem storing blob values with Doctrine

Hi, I'm using Doctrine 1.1.2 as my ORM framework in combination with Zend Framework and a MSSQL server back-end. What I am trying to do is to store a blob to the database, but Doctrine is throwing me errors when I try. The column in the database is of type varbinary(max), and the model in Doctrine is configured as follows: $this->hasCo...

problem with wp_query->query_vars[' ']!

Hello, I added a parameter in the URL ('lang') that sets the language in which displays the contents of the post. wp_query-> query_vars [ 'lang'] is set on the home page but not in the individual post. Why? Thanks!!!! ...

PHP how to get value from array if key is in a variable

Yes I know... I'm new.. anyways I have a key stored in a variable like so: $key = 4; I tried to get the relevant value like so: $value = $array[$key]; but it failed. Help. ...

mysql 'WHERE' with 500 'OR's ?

Is it ok to have a WHERE statement with a lot of OR's? I imagine the most could ever be 500. I am dealing with a facebook app. Understandably (but annoyingly) they do not allow app developers to store friend relationships. As a result I can not do a sensible JOIN tblfriend or something along those lines. To get a list of friends you ca...

PHP: Where I would save the php file that can I run it in browser.

Hi friend I am php learner, I don't have any idea about where I would save the php file to run on the localhost in browser. If you have any idea please suggest me. Thanking you Shailendra singh ...

Html Parser for PHP like Java

I have been developing Java programs that parse html source code of webpages by using various html parsers like Jericho, NekoHtml etc... Now I want to develop parsers in PHP language. So before starting, I want to know that are there any html parsers available that I can use with PHP to parse html code ...

Transaction rollback doesn't work

Hi all! I have made a database wrapper with extra functionality around the PDO system (yes, i know a wrapper around a wrapper, but it is just PDO with some extra functionality). But i have noticed a problem. The folowing doesn't work like it should be: <?php var_dump($db->beginTransaction()); $db->query(' INSERT INTO test (data) VA...

Debugging PHP Memory Corruption with Valgrind

Hi. I'm encountering what seems to be a memory corruption issue with PHP. I have a large code base that I am porting to the 5.3 runtime. I get segfaults and "zend_mm_heap corrupted" errors, but the backtraces from those points are not useful. The backtraces always lead back to various core PHP functions such as variable assignment or co...

I have alot of "IF/ELSE" statements, should I write this differently?

This is what I have: (category=="Ljud & Bild")?byId("nav_sub_ljud_bild").style.display='block' : byId("nav_sub_ljud_bild").style.display='none'; (category=="Datorer")?byId("nav_sub_datorer").style.display='block' : byId("nav_sub_datorer").style.display='none'; (category=="Telefoner & Fax")?byId("nav_sub_telefoner").style.display='bloc...

Regular Expression Help, simple string pattern

Hey Guys, I'm having problems creating a regular expression which will fix a valid string. The string will be in the format: any alpha-numerical character 3 to 5 times, followed by a comma if there are more characters after else its the end of the string Example Strings: A401,CR56,4U9Y,MO16,ECZGB,A7DC,9LN5,D52PU,UT95,YBPB0,2JWA,AAMW,K...

Executing ffmpeg from php running in apache

I was executing ffmpeg from php running inside apache. I used to get the error " error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory". It used to work perfectly if the php script was executed from the command prompt or ffpmeg was directly invoked from the command prompt. I ...

[PHP]: json_encode/json_decode - returns stdClass instead of Array

Hi, Observe this little script: $array = array('stuff' => 'things'); print_r($array); //prints - Array ( [stuff] => things ) $arrayEncoded = json_encode($array); echo $arrayEncoded . "<br />"; //prints - {"stuff":"things"} $arrayDecoded = json_decode($arrayEncoded); print_r($arrayDecoded); //prints - stdClass Object ( [stuff] => things...

PHP array multiple sort - by value then by key?

I have an array of string keys with numeric values for use in a list of tags with the number of occurances of each tag, thus: $arrTags['mango'] = 2; $arrTags['orange'] = 4; $arrTags['apple'] = 2; $arrTags['banana'] = 3; this is so i can display the tag list in descending occurance order thus: orange (4) banana (3) mango (2) apple (2) ...