php

What is the best way to handle photo uploads?

I'm doing a website for a family member's wedding. A feature they requested was a photo section where all the guests could go after the wedding and upload their snaps. I said this was a stellar idea and I went off to build it. Well there's just the one problem: logistics. Upload speeds are slow and photos from modern cameras are huge (2...

Php error_reporting, Best setting for development? E_STRICT ?

Typically I use E_ALL to see anything that php might say about my code to try and improve it. I just noticed a error constant E_STRICT, but have never used or heard about it, is this a good setting to use for development? The manual says: Run-time notices. Enable to have PHP suggest changes to your code which will ensure the best in...

Form library

Zend_Form has a few problems for my use cases. HTML_QuickForm2 looks dead (frozen in alpha for almost a year). What is a good standalone alternative to these? ...

What, in your mind, is the best PHP MVC framework?

There are quite a few PHP frameworks out there, from CodeIgniter to Zend to CakePHP to symfony.. which do you think is the best? I'd prefer answers that say why, rather than just which. Which features make your preferred framework stand out as the best? ...

PHP Tutorial for OpenId and OAuth

Is there a good tutorial for implementing OpenId and OAuth together in PHP? All of the OpenId tutorials I've seen on the official OpenId site haven't been as helpful or as simple as they could have been. I don't think I've seen any tutorials on using both of them together. (For OpenId, I'd want to be both a provider and a consumer.) If t...

Easy expanation of setting up Openssl on Windows.

Hi, I really want to get the google Calendar Api up an running. I found a great article about how to get started. I downloaded the Zend GData classes. I have php 5 running on my dev box and all the exetensions should be loading. I cant get openssl running and recieve the following error when I try to run any of the example page which...

binding variables to parameters in ADOdb for PHP

does binding variables to parameters in ADOdb for PHP prevent SQL injection in any way? I thought ADOdb also did data sanitation or escaping within the same functionality by default. Or am I just confusing it with Code Igniter's built-in processes? ...

Best php/ruby/python e-commerce solution

I'm looking for an easy to skin and customize e-commerce package. I've been reading good reviews about Magento, but it seems to have problems with performance. I've tried osCommerce before and found it to be pretty painful to modify, but I hear zenCart is better... but the latest release of zenCart is nearly a year old, so not sure how...

Advice on building a distributed CMS?

I'm in the process of designing a PHP-based content management system for personal use and eventually to be distributed. I know there are a lot of CMS's already out there, but I really haven't found one that meets my all of my needs and I also would like to have the learning experience. Security is a large focus, as are extensibility and...

What is the best way to handle sessions for a PHP site on multiple hosts?

PHP stores its session information on the file system of the host of the server establishing that session. In a multiple-host PHP environment, where load is unintelligently distributed amongst each host, PHP session variables are not available to each request (unless by chance the request is assigned to the same host -- assume we have n...

Which is faster, python webpages or php webpages?

Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php? I know that serving a python base webpage via cgi is slower than php because of its long start up every time. I enjoy using pylons and I would still use it if it was slower than php. But if pylons was faster than php, I...

PHP Deployment to windows/unix servers

We have various php projects developed on windows (xampp) that need to be deployed to a mix of linux/windows servers. We've used capistrano in the past to deploy from windows to the linux servers, but recent changes in architecture and windows servers left the old config not working. The recipe works fine for the linux deployment, but ...

How can I use the PHP File api to write raw bytes?

I want to write a raw byte/byte stream to a position in a file. This is what I have currently: $fpr = fopen($out, 'r+'); fseek($fpr, 1); //seek to second byte fwrite($fpr, 0x63); fclose($fpr); This currently writes the actually string value of "99" starting at byte offset 1. IE, it writes bytes "9" and "9". I just want to write ...

How to quickly theme a view?

I've defined a view with the CCK and View 2 modules. I would like to quickly define a template specific to this view. Any tutorial or information on this ? What are the files I need to modify ? Here are my findings: (Edited) In fact there are two ways to theme a view : the "field" way and the "node" way. In "edit View", you can choos...

PHP: $_SESSION - What are the pros and cons of storing temporarily used data in the $_SESSION variable

One thing I've started doing more often recently is retrieving some data at the beginning of a task and storing it in a $_SESSION['myDataForTheTask']. Now it seems very convenient to do so but I don't know anything about performance, security risks or similar, using this approach. Is it something which is regularly done by programmers ...

Filling PDF Forms with PHP

Is there a way to fill PDF forms and then save (flatten) them to PDF files from within PHP? Which library would you recommend? ...

Is there a difference between apache module vs cgi (concerning security)?

E.g. Is it more secure to use mod_php instead of php-cgi? Or is it more secure to use mod_perl instead of traditional cgi-scripts? I'm mainly interested in security concerns but speed might be an issue if there are significant differences. ...

Reasons why PHP would echo errors, even with error_reporting(0)?

What are some reasons why php would force errors to show, no matter what you tell it to disable? I have tried error_reporting(0) and ini_set('display_errors',0) with no luck. ...

How to install php-gtk in the Acer Aspire One?

I have an application that works pretty well in Ubuntu, Windows and the Xandros that come with the Asus EeePC. Now we are moving to the Acer Aspire One but I'm having a lot of trouble making php-gtk to compile under the Fedora-like (Linpus Linux Lite) Linux that come with it. ...

How to create a DOM from a User's input in PHP5?

I can't seem to find any decent info about this on the web. Any advice? ...