php

Do any ORM frameworks support cross-database/cross-server joins?

I have two servers: Server A: MySql Table A key-a foreign-key-b Server B: MsSql Table B key-b foreign-key-a Presumably I have two objects with methods that handle the relationships: TableA->getRelatedTableB(); TableB->getRelatedTableA(); This is easy to implement in most ORMs. But what if I want to get a large set of objec...

how to pick the best type of hosting

Hi, I'm developing a project, and I'm debating if I should get plain old regular hosting, or something more expensive, like VPS. Here are my needs: Zend Framework Sphinx Search jQuery ImageMagick/GraphicsMagick/GD PHP 5 + MySQL At what point do I need VPS? I'd rather obviously to pick the cheapest option.. Thanks. ...

What's the best way to create a master-slave configuration for a web app?

I'm creating a server management interface for a few of my servers (which host virtual servers) and I wanted to know the best way to implement a master-slave configuration for said interface. The master server should connect to all the slave servers in order to retrieve information (provide a high level overview) and send them commands ...

PHP Image Resize / Relocate - Speeding it up

I've written a little function to take a url, and resize the image and store it on my local, however the script is taking about .85 seconds to run when it needs to create the folder, and .64 seconds on a resize. I currently have JPEG and PNG supported as seen below. I'm wondering if there is a quicker method or something I'm doing that...

how to setup url friendly in yii framework automatically ...

I just learning yii framework and read this tutorial about yii how to setup url but I have no idea, suppose i have 10 controllers, should I define one by one controllers in the config file ? is there a better way to setup url friendly like www.yoursite.com/yourController/yourAction/yourID for all controller ? I think codeigniter did ...

How to use dates on x axis with google chart api

This question has already been addressed but I would like to see some PHP code on actually doing this and also because I did not have the ability to comment so I was asked to 'restart' the thread. I am trying to plot dates on the x-axis but my dates do not have the same frequency. Here are some sample data points to have as an example:...

php copying array elements by value, not by reference

I have the following code: $data['x'] = $this->x->getResults(); $data['y'] = $data['x']; //some code here to modify $data['y'] //this causes (undesirably) $data['x] to be modified as well I guess since all the elements of $data are themselves references, modifying $data['y'] also modifies $data['x']..which is NOT what I want. I w...

Should posting one of two forms in a page post all fields in both forms, or have I got a bug in my code

I have two forms in a page. Have decided to update my post with more realistic code from the page itself... <form action="test.php" method="POST"> <strong>Details of work carried out</strong> <textarea name="detailsOfWorkCarriedOut"></textarea> <strong>Materials used</strong> <textarea name="materialsUsed"></textarea> <input type=...

Looking for a nice image library

Update: I'm not looking for a wordpres plugin. I'm currently developing an application which is just using Wordpress as a CMS. I need a standalone function to upload images, and resize them to the sizer I need. I need a library for uploading and resize iamges. I want to store the images in folders, and store image reference in databa...

When would I need session_cache_expire and session_cache_limiter?

Looking over the manual pages for session_cache_expire and session_cache_limiter, I'm a bit confused as to what these could possibly have to do with sessions. It seems to be that these control the hints sent to the browser as to how long to read a page from the local cache before re-requesting it, but how does that effect sessions? ...

How to show yesterdays date in this format?

I know there is a lot of info on the neton how to show yesterdays date but I am unable to get any of them to work in this format How do you show yesterdays date if todays date is in this format date('F jS, Y') ? July 27th, 2009 should show July 26th, 2009 //Does not work $yesterday = date('F jS, Y', mktime(0, 0, 0, date("F") , date("...

How do you match 12 hour time hh:mm in a regex?

How could you match 12 hour time in a regex-- in other words match 12:30 but not 14:74? Thanks! ...

How can I make comments like on stackoverflow?

How can I make comments like on stackoverflow? What I mean more specificly, I use php/mysql how would I add a comment without reloading the page, I know this is a simple process of using AJAX but when you post a comment on SO it also has the option to delete it right away, when I insert comments into my DB there ID number is auto increm...

https javascript and firefox

Hi all, I have some javascript which calls some php functions to track webstats (piwik.org) Everything works fine on http sites, from every browser it is all tracked I have one site that is https - it will track visits from ie, but not from Firefox or Chrome Does anyone know of anything I need to do or set or use to make it work on ...

Cache Object in PHP without using serialize

I have a complex object that I create in a PHP script. I am looking for a way to store this object such that subsequent requests do not have to recreate it, or spend time unserializing and rebuilding it. Using xdebug I find that I spend half of the entire request time building this object. Even when I store the object explicitly in APC (...

Is there a tutorial for inserting messages into MSMQ 3.0 using PHP over HTTP?

Background: The MSMQ is hosted on Windows 2003. The queue that will receive the messages is a public queue. I have installed MSMQ HTTP Support on the server. From some of the white papers on MSDN, it appears that you can insert messages into MSMQ using SOAP/XML. The process, however, of just finding the WSDL endpoint is not clear t...

Comet & PHP: How to use Comet with a PHP Chat System ?

I have to build a simple chat system in PHP using Comet. I don't know what would be the best approach to this project. What is the best technique (cross-browser would be nice) to use, and how to implement it? What libraries can I use that already have comet support. (I don't want to use the Bayeux Protocol) I already have a PHP backen...

How to Get Form Field Value, Then Use to "Stuff" URLs Behind Buttons?

On my PHP web page, I want to have an input field where the user can enter a web address. I want to do a quick validation to make sure it actually looks like a web address. If good, I want to append that web address to the URL behind some buttons the user can click. For example, maybe I want to create something that lets the user en...

I'd like to send a "Fire and Forget" query to a PHP page.

I'm implementing various PHP & ASP.NET web apps for a client. I'd like to install a very low overhead user tracking system. (It has to be on the intranet, this is an internal system only). I'd like to do something like the following: line 1 normal code line 2 normal code line 3 Send Request/Query/Info to http://internal-IP/userTra...

php open gzipped xml

Hi, I am struggling to read gzipped xml files in php. I did succeed in reading normal xml files, using XMLReader() like this: $xml = new XMLReader(); $xml->open($linkToXmlFile); However, this does not work when the xml file is gzipped. How can I unzip the file and read it with the XMLReader? ...