php

Load functions dynamically into class from external file.

Is it possible in php to load a function, say from a external file to include in a class. I'm trying to create a loader for helper functions so that I could call: $registry->helper->load('external_helper_function_file'); after that it should be able call the function in file like this: $registry->helper->function(); Thanks for any ...

How do I design a web interface for browsing text man pages?

I would like to design a web app that allows me to sort, browse, and display various attributes (e.g. title, tag, description) for a collection of man pages. Specifically, these are R documentation files within an R package that houses a collection of data sets, maintained by several people in an SVN repository. The format of these f...

Missing Parameter in Web Service...

I am currently working on an Webservice to retrieve a pdf Document from an Crystal Report. As lonmg as there are no parameter Values in the Report, the service works fine. As soon as I use parameters in a Query the Reports can't be shown anymore and I retrieve an error like 'missing parameter values'. But there is only one Parameter and ...

layered png image using a PHP library

Hi there, Does anyone know about a PHP library which can produce layered PNG images? (I'm not sure, but I think that tiff image standard supports layers also) ...

securing a webpage without headers

I just read this article on tdwtf.com. Generally, it describes an archiving bot destroying things because it ignores headers. I then realized that I don't know how to do security in a page WITHOUT headers. Therefore my question is: What security measures can i take besides using headers? I develop mostly in php, so I'm familiar with he...

Problems with php-cli and mysql, why is mysql_pconnect() not available?

I've installed various PHP packages to be able to use PHP with Apache but also in the commandline. From both I need to be able to connect to MySQL databases. Pretty simple right? That's what I thought but with php-cli I receive following error: Fatal error: Call to undefined function mysql_pconnect() I have tried starting from scratch...

How must i save my Images in my Project?

This is what i want to do............ I am going to let each user upload multiple images into a folder called "pics". If the user upload say "MyImage.jpg" i will rename it "MyImage_UserID.jpg". Where UserID will be the User's unique ID of course. This way when i look for all the images of a user i will just look for the image name that...

CakePHP: How do i use Set::contains to compare subsets of Arrays to a given Array?

I have the following array, named $usergrouppermissions: Array ( [0] => Array ( [UserGroupPermission] => Array ( [group_id] => 1 [permission_id] => 4 ) ) [1] => Array ( [UserGroupPermission] => Array ...

Does the GPL license contaminate?

Quick Question. I am doing a conversion of JavaScript code licensed by GPL (and not created by me) into PHP. Does the original GPL stand or can i put any license on the converted code? I found this on SO, but wondering if it applies. ...

Is there a way to associate an elastic IP address with EC2 instance on startup?

Hi I am developing the code to start an instance of an EC2 image on Amazon Web Services, there are 2 steps 1) start the instance 2) allocate our Elastic IP address to the started instance Is there a way to carry out both of these in a single command? I will be running a .bat file to start the instance, and then when the instance is ...

User provided input SQL-escaping

Can you please give me advise? I searched for questions but did not found something similiar to mine. How do i make my user inputs automatically escaped when they are intended to use in SQL queries? I don't like in my code filled with something like $var_x = $DB->Escape($_POST['var_x']); $another_var = $DB->Escape($_POST['another_var']...

php header function produces an error when it shouldnt

Im working with PHP 4.3.11 and when I execute a header always responds with an error like this Warning: Cannot modify header information - headers already sent by (output started at d:\folder\file.php:1) in d:\folder\file.php on line 2 Warning: Cannot modify header information - headers already sent by (output started at d:\folder\file...

php on iis6 config question

I have never used php but have been asked to set up a site for some code we have inherited. I have configured php to run on iis6 sucessfully however there is one issue. This page will work properly... <?php phpinfo(); ?> But this will not... <? phpinfo(); ?> How do I get the latter to work? ...

Convert UTC to Unix Timestamp

Hi, I'm parsing an RSS feed which has the time and date as UTC, I need to convert this into a unix timestamp. Is there a simple way to do this? ...

Permission denied error calling fopen

Hi! I use XAMPP on Leopard. I'm trying to create cache files using fopen but I get Warning: fopen(/Applications/xampp/xamppfiles/htdocs/mysite/cache/index.php.cache) [function.fopen]: failed to open stream: Permission denied in /Applications/xampp/xamppfiles/htdocs/mysite/functions.php on line 26 I tried to change folder permissions u...

Detecting MMS stream in PHP?

We have three MMS streams that are in various states of use. I'd like to be able to promote the stream only when there is something coming through (and hide it when it's not). I haven't been able to find a way do this. Any ideas? Thanks! ...

Common email client user agent strings

Does anyone have a list of the common user agent strings that email clients use when opening HTML emails? I'm looking to do some pixel web bug detection using PHP on an email campaign. ...

How to generate a modular directory structure with Zend_Tool?

The only examples I've seen of generating a Zend Framework project with Zend_Tool create this directory structure: /application/controllers /application/models /application/views Does Zend_Tool have the ability to generate a modular directory structure (where each module has its own models, views, and controllers)? example: /applic...

What is a better design?

I have the following class: class User { public function setName($value) { ... } public function setEmailAddress($value) { ... } public function setUsername($value) { ... } public function getName() { ... } public function getEmailAddress() { ... } public function getUsername() { ... } public function isGroupAdministrato...

Is Zend Server just APC and Apache munched together into an install?

I am looking at the Zend Server (PE and CE) and am woundering if its just a frontend for php.ini and automatically has Zend Optimizer which basically is APC(right?) in it or if it would actually be interesting for our development machine. Basically does Zend Server have any special sauce I can't get from opensource caching software and w...