php

Should I use a single or multiple database setup for a multi-client application?

Hi everyone, I am working on a PHP application that intends to ease company workflow and project management, let's say something like Basecamp and GoPlan. I am not sure on what the best approach is, database-wise. Should I use a single database and add client-specific columns to each of the tables, or should I create a database for eac...

How do you manage PHP Project Development Lifecycle?

Hello. I've worked on several PHP projects and always I have problems with organizing my work. Where do you develop your application - on localhost, remote server or maybe production one(!) ? When I work on my localhost after making some major path I send new files by ftp - but sometimes it happens to forget about one file and it is jus...

Tools to visually analyze memory usage of a PHP app.

Is there anything out there freeware or commercial that can facilitate analysis of memory usage by a PHP application? I know xdebug can produce trace files that shows memory usage by function call but without a graphical tool the data is hard to interpret. Ideally I would like to be able to view not only total memory usage but also wh...

Functions in mysql or php

Is it generally better to run functions on the webserver, or in the database? eg: INSERT INTO example (hash) VALUE (MD5('hello')) or INSERT INTO example (hash) VALUE ('5d41402abc4b2a76b9719d911017c592') Ok so that's a really trivial example, but for scalability when a site grows to multiple websites or database servers, where is it b...

What is the most secure method for uploading a file?

The company I work for has recently been hit with many header injection and file upload exploits on the sites we host and while we have fixed the problem with respect to header injection attacks, we have yet to get the upload exploits under control. I'm trying to set up a plug-and-play-type series of upload scripts to use in-house that ...

Is there an easy way to plot Polyline Area, i.e. service coverage area, and also check to see if visitor's address lies within that area using Google Maps API and PHP?

Hello. I am the owner of a business that is building a new website application. My partner is the programmer who is doing the development and neither one of us has any real in-depth experience with Google Map API or it's polyline/polygon area capabilities. We need an easy way to capture inputs within our user admin area where our locati...

Can anyone show me a good source to learn web services?

I currently don't know any thing about web services, except that they are used to allow an application to share its functions. Where & how to start? Does any book on web services work with me if I use PHP as my programming language? Does anyone know any IRC channel for help? Does anyone know of a directory for tutorials for a beginne...

How do i backup a SQL database using PHP?

How do i backup a SQL database using PHP. Is there a vendor agnostic way to do this that conforms to ANSI SQL? If not maybe you can list how to do it for each of the database vendors? ...

PHP datepicker control and event calendar needed

I'm looking for suggestions for a PHP: calendar control/widget that I can embed on a web page to enable users to select dates. A datepicker. calendar software that will provide weekly calendar view, similar to what Microsoft Outlook provides. It should display days of the week in columns and rows representing timeslots. Each cell wo...

Shortcuts for creating/modifying web forms in PHP?

I'm new to PHP and before I waste a lot of time doing things the hard way, I wanted to find out if there are shortcuts/techniques to creating PHP web forms apps. All this app will do is display web forms with data from 1 or more tables. In addition to displaying data, the user must be able to update the form and add new data to the for...

DES Encryption

Are DES Encryption called "One Way Encryption" or "two way Encryption" ? Are there a PHP class or method decrypt the DES Encryption ? thanks ...

How do I round a number up in PHP?

I need to round any non-integers up to the nearest integer, regardless of whether the number after the decimal place is >5 or not. Thanks! ...

How do I get a particular word from a string in PHP?

Say you have a string, but you don't know what it contains. And you want to replace all occurences of a particular word or part of a word with a formatted version of the same word. For example, I have a string that contains "lorem ipsum" and i want to replace the entire word that contains "lo" with "lorem can" so that the end result woul...

PHP: Can a function know if it's being assigned as a value?

In other words, can fn() know that it is being used as $var = fn(); rather than as fn();? A use case would be to echo the return value in the latter case but to return it in the former. Can this be done without passing a parameter to the function to declare which way it is being used? ...

Best PHP framework for an experienced PHP developer?

Okay, before I start this, I am well aware of how subjective this question is. For my case, I'd like to define the 'best' for me as: Rapid development "Pretty" URLs Data validation Good knowledge base available Not impossible to integrate other PHP software with This is a pretty generic definition, but all I'm looking for here is op...

How do you generate an RSS feed?

I've never done it myself, and I've never subscribed to a feed, but it seems that I'm going to have to create one, so I'm wondering. The only way that seems apparent to me is that when the system is updated with a new item (blog post, news item, whatever), a new element should be written to the rss file. Or alternatively have a script th...

C# to PHP base64 encode/decode.

So I have this c# application that needs to ping my web server thats running linux/php stack. I am having problems with the c# way of base 64 encoding bytes. my c# code is like: byte[] encbuff = System.Text.Encoding.UTF8.GetBytes("the string"); String enc = Convert.ToBase64String(encbuff); and php side: $data = $_REQUEST['in']; $raw...

php/Ajax - Best practice for pre-loading images

I have put together a script which is very much like the flickr photostream feature. Two thumbnails next to each other, and when you click the next or prev links the next (or previous) two images slide in. Cool! Currently when the page loads it loads the two images. The first time nxt / prv is used then the next two images or previous t...

IDE, SVN and pushing to sites!

Im thinking of updating my practices, and looking for a little help and advice! I do a lot of work on sites that run joomla, oscommerce, drupal etc and so I have created a lot of custom components/plugins and hacks etc. Currently each site has its own folder on my xampp setup. What I would like to do is have a default setup of (for exa...

Website version 2, keep in PHP or move to .Net?

I have a website built in PHP 4 with a framework made by hand by me. The code is 3 years old and I am limited (well it requires a lot of effort to make changes). I decided to do new version of this website. My knowledge has since increased, and now I know that a lot of frameworks exist and that IOC is there and ORM too... The problem is...