php

How to configure Zend_Auth to support multiple subdomains?

Hi I have two applications that both run separate instance of Zend Framework MVC application. They are hosted on different subdomains: news.mydomain.com member.mydomain.com I use Zend_Auth on member.mydomain.com to handle authentication. How do I configure ZF on news.mydomain.com to capture the auth info assigned in member.mydomain...

Online Flash Mp3 Player Music Button

So I have a website that queries a database with information about music, with id3 information and file location information. I would like to use THIS to add a little playable mp3 player beside each of the search results, but I can't figure out how to do this without generating the xspf file, which would mean I would need an xspf file f...

PHP converting date format

Duplicate Managing date formats differences between PHP and MySQL PHP/MySQL: Convert from YYYY-MM-DD to DD Month, YYYY? Format DATETIME column using PHP after printing date formatting in php Dear All, I have a PHP page where i wil be displaying some data from Mysql db. I have 2 dates to display on this page.In my d...

Errors compiling PHP with GD2 and Freetype on Mac Leopard 10.5.6

I'm compiling PHP5.2.9 on Mac OS X 10.5.6. Need some help to figure this out. I have PHP compiling and working with a basic config, and now I'm trying to compile with GD2. The problem I'm running into is that if I add the argument to build with Freetype, I get build errors. This is my minimum config to demo the problem. Also, I know tha...

How can I change the name of an element in DOM?

Hello, In PHP with DOM, I have a DomElement object which represents an <identity/> element. I have one case where I need to change this so its element name is <person/>, but keep the same child elements and attributes. What would be the simplest way of changing an element name of a DomElement and keeping its children and attributes? ...

Rotate png using PHP or Javascript

I'm trying to rotate a png that's based off a value in my database (1-360 degrees) however, I'm using it in conjunction with the google mapping api and if I use "header('Content-type: image/png');" my map does not show and only the image. Any ideas? ...

What is PHP like as a programming language?

I am not really familiar with PHP, but I get the impression that it is like JavaScript (syntax-wise). What are the benefits of a dynamically typed language, when compared to a strongly typed language like C# or Java, and how would this help in the context of web development? What would make a dynamically typed language so attractive? ...

'Encapsulate Field' tool for a PHP IDE

Does anybody know an PHP IDE that features a tool to encapsulate private variables, as Visual Studio does for C#/VB/etc? In fact any IDEs that support PHP and include code-generation tools would be of interest. ...

How do i do readable urls?

Assume I have the url http://example.com/user/me, where me is the user name. When the user types the url into the address bar, I want to reveal the details of the user. I do not want urls such as http://example.com/user.php?user=me Any help appreciated, working on LAMP ...

using the webclient to upload a file in post and the php to recive and handle file

how do i get the php to reconize that there is a file being uploaded to it by the vb webclient current php code is this if(count($_FILES)==1) { //move_uploaded_file ( $_FILES[0]["tmp_name"] , "./imgs/curdesktop.png" ); file_put_contents("./nin.txt",print_r($_FILES)); } all it does right now is check the FILE array an...

Create a webpage with Multilanguage in PHP

Hi friends I would like to develop a multilanguage page in PHP, for exemple english/german/japanese.. so when i click on german the page language will change to german, then i click english it change into english. Please guide me to do this . Thanks in advance.... ...

Adding a new view to the a Zend Framework site

We have taken on a site written in Zend framework, we didn't write the site and haven't use the Zend framework before so I'm interested in finding three things. How do I add new views to the site, adding in a new folder to the application/views/scripts directory seems to do nothing Are there any tutorials on how to add affiliate feeds ...

PHP IDE with vi key bindings

At the moment I'm using eclipse with viplugin. I also know about netbeans and its vi plugin. I find both of these IDEs don't really fit my tastes though. Too slow, bad remote editing support. I don't really have time at the moment to set up and try a vim based ide either. So, what other PHP IDE is available that supports vi key bindings...

Calendar in Zend Framework

Hello, I looking to create a custom calender with Zend Framework, I am hoping that it will be able to list all the days of the month for the coming years and then have a different bg color on the date if there is an event on this. I am however struggling to create this firstly because it needs to go into the layout view, rather than an...

Calling a SOAP method with PHP for a specific service.

Hi All, Sorry to have to do this, but I'm getting no love from the people who run this particular webservice. I've never used SOAP before. Here's the method I'm trying to call And here's the code I'm thinking should work public function soapTest(){ echo "start <br />"; use_soap_error_handler(true); $cl...

Is Quercus a viable replacement for PHP in Java environments?

For anyone stumbling upon this question who doesn't know what Quercus is - it is an implementation of PHP done in Java. For a project that I am currently working on we serve php pages via cgi over servlets (I know it is clunky, but it is a requirement to support legacy code). I was excited to discover the Quercus project because it look...

Database Error

I have a site that gets just about 100 people everyday but I got this error message when log in as a user: Warning: mysqli::mysqli() [mysqli.mysqli]: (42000/1203): User mexautos_Juan already has more than 'max_user_connections' active connections in /home/mexautos/public_html/kiubbo/data/model.php on line 26 Warning: mysqli::query() [m...

Replacing HTML attributes using a regex in PHP

OK,I know that I should use a DOM parser, but this is to stub out some code that's a proof of concept for a later feature, so I want to quickly get some functionality on a limited set of test code. I'm trying to strip the width and height attributes of chunks HTML, in other words, replace width="number" height="number" with a blank s...

Sorting an associative array in PHP

I have an array in this format: Array ( [0] => Array ( [text] => tests [language] => [advertiserCompetitionScale] => 5 [avgSearchVolume] => 7480000 [lastMonthSearchVolume] => 9140000 ) [1] => Array ( [text] => personality tests ...

Pass result of mysql_fetch_object() to a function does not work

I have the following problem: public function row2Partner($row){ echo $row->PartnerID; } public function main(){ $query = "SELECT PartnerID, PartnerName FROM Partner"; $result = mysql_query($query); $this->row2Partner(mysql_fetch_object($result)); } This gives me the error in row2Partner(): Trying to get property of non-objec...