php5

How to install php 5.3.2 on debian from the command line?

Hi, i want to upgrade my php version on debian from the command line. Anyone knows how to do it? ...

Amazon S3 Integration

Amazon Integration I have my own CMS which has a file manager. A lot of the files and formats which people can create are stored locally in a database. These are trivial examples like CSS files, basic content etc. The file manager can do all the things thats docs.google.com does. I actually based the entire methodolgy and design aroun...

Zend_Session uncaught exception

So I have this in my index.php: Zend_Session::start(); Then in one of my controllers in the init method I do: if (false === isset($this->defaultNamespace->tree)) { $this->defaultNamespace->tree = array(); } Which still works. But then in action in the same controller I write this: unset($this->defaultNamespace->tree); // I tri...

Parse php image data to an OpenCV function

Is there a way to parse image data in a php variable to an opencv function? I want to do this without writing image to the hard disk using php and then reading it back to feed OpenCV function. This is related to this question ...

PHP global declaration.

I'm using PHP's global declaration to make an array available to a number of functions in a script. The variable is declared at the top of the script and is referenced with global in each of the functions which uses it, as follows: <?php $myarray = array(1, 2, 3); function print_my_array() { global $myarray; print '<ul>'; ...

Set custom event items dynamically for each log call using Zend Framework

We're using the Zend_Log class to update a few different "watchdog" database tables (that log different events: Batch scripts running, new data being processed, files generated, etc.). Here is my current code (before the issue I'm looking into fixing.) $writer = new Zend_Log_Writer_Db($db, 'watchdog', array( 'priority' => 'priorit...

How do you map an array in php?

I have two array K = {"a", "b", "b"}; V = {"1", "2", "3"}; from these two array I want to got the result like this $display = "a: 1; b: 2; c: 3;" echo $display; output "a: 1; b: 2; c: 3;" Anybody here please give me the idea? thanks ...

How do you get PHP5 scripts to work under gentoo linux?

I ran "emerge apache" "emerge php" "emerge mysql" I set apache + mysql to run at launch I set the use flags for PHP, CGI, APACHE, MYSQL I went into httpd.conf and added "-D PHP" PHP scripts will not run. The contents of the script are just sent back to the web browser. That is the result of retrieving "test.php" from a web-brow...

Can't handle errors in PHP's SoapServer->handle() method

I've created a WSDL-based SOAP web service using PHP 5.3. I'm using Zend Framework to handle the service, and ZF in turn is layered atop PHP's built-in SoapServer class. In testing with SoapUI, I discovered that passing a parameter of invalid type (e.g., passing a string when an integer is defined by the WSDL) resulted an empty response...

Programatically installing & activating Wordpress plugins

Is it possible, somehow to programmatically install plugins? So I can send my client one file they unpack, go to some installplugins.php file and that installs + activates them? Only way I found for doing that is really rancid lowlevel; I'm hoping someone here knows better methods. ...

One to One Chat Component with (PHP MySQL)

Hi, I want to add one to one chat component in my PHP based website with mysql. Just like a online help providing services. But I don't have any idea from where I can get such plugin/component. May anyone guide me ..? Thanks.. ...

why in some scripts they omit the closing php tag ?>

in some scripts I see that they omit writing a closing tag ?> for the script .. I don't know why .. Can someone tell me why and if I should do this as well. (I'm sure they have not forgotten it ;) , lol ) edit: thank you guys :) , I got it now ...

pregmatch separate number and character

Hi this is my keyword BC1024 , AB124 , CBC2548 , using preg match to separate the number and character , For that i tried this preg match expression , but its not working greatly , preg_match_all('/(?P\w+): (?P\d+)/', $flight_code_no, $matches,PREG_PATTERN_ORDER); i want output as Array ( [0] => BC1024: 2008 [name] =>...

Character encoding error!

Hi! I try get the content this URL: http://www.chromeball.com, but the character encoding is not good. I have this code: $url = 'http://www.chromeball.com'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $data = curl_exec($ch); curl_close($ch); $dom = new DOMDocu...

Zend_Db subquery

Hi Everyone, I've been trying to construct a sql query with ZendFW, but I cant seem to get it to function like I want to (or function at all). This is the query that works that I'm trying to build with zend_db select() SELECT tc.trip_title, td.ID, td.trip_id, (SELECT count(*) FROM 'trips_invites' ti WHERE ti.destination_id=td.ID ...

Flags not displaying using PHP

Hello, I am trying to display a country flag based on the user's IP address. Previously, I had it working fine, but I think I accidentally did something wrong. After hours of debugging, I can't seem to find what's causing the error. It's not throwing any errors, but its simply not displaying any flags or any of the 'echo' statements. Doe...

Is there a php.ini directive that enables stack traces on errors?

Is there a php.ini directive that enables stack traces on errors? I already looked here: http://php.net/manual/en/ini.core.php. My shared-hosting does not have Xdebug installed for some reason. I tried putting these in .htaccess: php_value track_erors On php_value report_zend_debug 1 but no stack trace. ...

dynamic row creation php and html

i want to make a table from a mysql query where the table should show like pic1 pic2 pic3 name1 name2 name3 ------------------------- pic4 pic5 pic6 name4 name5 name6 please say how it is possible by using php and html? ...

Can you solve this in brief code??

there are 10 variables. say $var1, $var2, $var3, $var4,....$var10 and a $count variable. what I am looking for is if all variables are set then $count = 10+1 or if 9 variables only set then $count=9+1 or if 8 variables only set then $count=8+1 and so on last up to 1 variable(for one variable is set then $count = 1+1). I know do this w...

Can you solve this in brief code with different variables

Please refer to my previous questions ...