php

PHP + AWASP

Who here is using WASP (http://wasp.sourceforge.net/content/) to in real world applications? What impressions do you have? Good? Bad? If you can provide any inputs, how good it is comparing with rails for example. I'm really looking for MVC frameworks for PHP Thanks, Victor UPDATE: This comparation that i found today is good http://w...

Do htmlspecialchars and mysql_real_escape_string keep my PHP code safe from injection?

Earlier today a question was asked regarding input validation strategies in web apps. The top answer, at time of writing, suggests in PHP just using htmlspecialchars and mysql_real_escape_string. My question is: Is this always enough? Is there more we should know? Where do these functions break down? ...

Saving information in "sub" model in CakePHP

I've got a simple CakePHP site (1.2). I've got a page where you can edit and save a Person. So I have a Person model and controller. Each Person has none or more comments, in the comment table. So I have a Comment model, and I have a hasMany association on my Person model to the Comment model. View is working great. My question is, on ...

Best graph and diagram toolset for PHP

What do you think is the best diagram and graphing toolset for PHP that also look good? I know that there are some open source graphing tools for PHP out there, but they are not really visually appealing to me. ...

In need for a site that explains how to use PHPUnit

I am searching for a tutorial (optimally with Zend Framework) on how to use PHPUnit. I have found a couple on google but have not quiet understood it yet. ...

PHP parse configuration ini files

Is there a way to read a module's configuration ini file? For example I installed php-eaccelerator (http://eaccelerator.net) and it put a eaccelerator.ini file in /etc/php.d My PHP installation wont read this INI file because the "--with-config-file-scan-dir" option wasn't used when compiling PHP Is there a way to manually specify a p...

php: output[] w/ join vs $output .=

I'm modifying some code in which the original author built a web page by using an array thusly: $output[]=$stuff_from_database; $output[]='more stuff'; // etc echo join('',$output); Can anyone think of a reason why this would be preferable (or vice versa) to: $output =$stuff_from_database; $output .='more stuff'; // etc echo ...

How can I get the svn revision number in PHP?

I want to have my PHP Application labeled with the revision number which it uses, but don't want to use CruiseControl or update a file and upload it everytime. How should I do it? ...

How can I detect, using php, if the machine has oracle (oci8 and/or pdo_oci) installed?

How can I detect, using php, if the machine has oracle (oci8 and/or pdo_oci) installed? I'm working on a PHP project where some developers, such as myself, have it installed, but there's little need for the themers to have it. How can I write a quick function to use in the code so that my themers are able to work on the look of the sit...

php.ini & SMTP= - how do you pass username & password

My ISP account requires that I send a username & password for outbound SMTP mail. How do I get PHP to use this when executing php.mail()? The php.ini file only contains entries for the server (SMTP= ) and From: (sendmail_from= ). ...

Calculate text diffs in PHP

Are there any libraries (3rd party or built-in) in PHP to calculate text diffs? ...

How do I enable multimode emacs to program PHP without messing up my indents?

Whenever I indent HTML in PHP mode, emacs (22.1.1, basic install on Redaht Linux over Putty-SSH) pops up a frame and tells me to get MUMODE or somesuch extra add-on. I installed PHP Mode without a big hassle, but I don't know how to get this multi-mode rolling. I'd like to know 2 things How to install and configure multi-mode How to ...

Possible to use multiple/nested MySQLi statements?

Is it possible to have a MySQLi prepared statement within the fetch() call of a previous statement? If not, what's the best way around it? Example code: if($stmt = $link->prepare("SELECT item FROM data WHERE id = ?")) { $stmt->bind_param("i", $id); $stmt->execute(); $stmt->bind_result($item); while( $stmt->fetch() ) { /* ...

PHP performance considerations?

I'm building a PHP site, but for now the only PHP I'm using is a half-dozen or so includes on certain pages. (I will probably use some database queries eventually.) Are simple include() statements a concern for speed or scaling, as opposed to static HTML? What kinds of things tend to cause a site to bog down? ...

Whats the best way to pass html embed code via rss feed to a rss parser in php?

Im trying to put an html embed code for a flash video into the rss feed, which will then be parser by a parser (magpie) on my other site. How should I encode the embed code on one side, and then decode it on the other so I can insert clean html into the DB on the receiving server? ...

Keeping my PHP pretty

I am creating a site in which different pages can look very different depending upon certain conditions (ie logged in or not, form filled out or not, etc). This makes it necessary to output diferent blocks of html at different times. Doing that, however, makes my php code look horrific... it really messes with the formatting and "shape...

Role Based Access Control

Are there any open source PHP-based role-based access control system that can be used for a codeigniter framework? ...

PHP webpage doesn't launch unix command even after updated sudoers

Hi everyone, Basically I am trying to restart a service from a php web page. Here is the code: <?php exec ('/usr/bin/sudo /etc/init.d/portmap restart'); ?> But, in /var/log/httpd/error_log, I get unable to change to sudoers gid: Operation not permitted and in /var/log/messages, I get Sep 22 15:01:56 ri kernel: audit(12220...

Date to timestamp (PHP)?

How do I get timestamp from,for example : 22-09-2008 ...

Free supportticket software

I am searching for a better alternative to osTicket. Can you give any advise? [Update] I would want it not to be overfilled with features, since I want to be able to use it without having to get into it alot ...