php5

lime vs phpunit

I don't see this answered any where on the web, amazingly. Unit tests in lime seem so much more simple to write than PHPUnit with all its extra boilerplate code. Are there any definitive reasons (besides "PHPUnit is the defacto standard") for choosing one over the other? ...

in oop php what does using an arrow operator -> after a method do?

Example: $this->getResponse() ->appendBody('Hello' . $name) In the previous example, I understand the use of the first arrow operator, but not the second, since I don't know whether what the second one does is similar to passing arguments to the function, in which case I wonder why it doesn't go inside the parenthesis. ...

How do I set columns/members in Kohana ORM v3

class Model_User extends ORM { // columns: UserID, Name // public $Name ; // this didn't work } Currently I create an object: $user = new Model_User() ; and access columns like: $user->Name = 'My Name'; I'd like to have my IDE show me all the columns in the data model to avoid misspellings and to now right away what fields I ca...

Fatal error: Nesting level too deep - recursive dependency?

I have a complex hierarchy of nested objects, with all of the child objects (stored an array of objects in the parent class) containing a property linking back to their parent: fairly simple and straightforward, with no real problems. If I do a var_dump of any object in the hierarchy, I'll get a recursive reference in the dump, exactly a...

1GB file upload using php

Hi, I am trying to upload a file of 1GB size using php script and it works perfectly if file size is less than 20MB, but when I increase the file size than after pressing upload button on website, it uploads the file (I guess as it takes few minutes) and after that, instead to execute upload.php, my firefox asks me to download upload.ph...

want to process files inside the folder subdirectories

How to process files inside the folder sub directories using php script. Actually I want the image files inside each sub directories residing in my server itself to process and save to another location and save the folder name & file name in the database. Can anyone help and give a sample script on how to operate this... the folder stru...

How to configure Context using PHP

Hi, Actully i am a java developer and new to PHP, I am using Code Ignitor as a frame work for my project.Setup site on my local machine. And accessing site using following URL. http://localhost/businesscaliber/index.php/home Where home is HomeController. here i want to context as http://localhost/businesscaliber rather than above UR...

good 3d Video carousel script

Can anyone get me a good script for video carousel. I want it to use it with my Joomla/php. ...

Simple File Upload, Facing Problem With Writing File (Also Weird $_FILES problem)

The file I'm uploading is either not getting written into the temporary folder or is it not getting processed by PHP properly.... Enctype - Check Name, Method - Check Form (syntax) - Check (Take it from me that the data is being passed by the form to the PHP) The PHP code - 0) { echo "Return Code: " . $_FILES["file"]["error"] ....

How can I track user visit in my website?

How can I track user visit in my website? ...

Uploadify to use to upload files from server itself

Is there a way to upload files directly from the server itself where the site is hosted. I really want to do that way cause all my old photo files are on the server and I want my uploadify to do grab those files directly from that server location specified. This will need frequently for my future use. please give a solutions if upload...

cakephp console issue : not able to set path

Hello all I am trying to create a controller in cakephp(1.3) using console. I am using windows XP and XAMPP. My current cake console settings below C:\xampp\htdocs\cake\apressblog\cake\console>cake ♀ Welcome to CakePHP v1.3.4 Console --------------------------------------------------------------- Current Paths: -app: console ...

Is it possible to specify more than one type hint for a parameter?

Is there a way to add more than one type hinting to a method? For example, foo(param) must receive a instance of string OR bar OR baz. Thank you. ...

Propel: newbie problems with a criteria. Trying to debug.

Hi, I have this criteria propel. public static function getPrenotazioniAttive($id_utente) { $c = new Criteria(); $c->add(self::USER_ID, 18793 ); $result = self::doSelect($c); } After that i add this: echo $c->toString(); that shows: Criteria: SQL (may not be complete): SELECT FROM `prenotazione` WHERE prenotazione.USER_ID=:p1 ...

PHPUnit : Fatal error handling

Hi all, I use PHPUnit for unit tests, but when a fatal error is triggered, the script dies and I have no correct PHPUnit output. I'd like that the PHPUnit output stays correctly formated, because it is read by a plugin for Eclipse. Actually the fatal error stops PHPUnit and in Eclipse the plugin can't interpret anything (because the PH...

php eval() returns

<?php $a = "a == a"; eval($a); This returns false. I thought it's supposed to return true. Any thoughts/ideas why this is so. ...

Using netBeans for PHP development (Apache)

I have a project to do in PHP (5) and I want to use netBeans (6.8) as the IDE (Linux). But after a little search I found out that netBeans doesn't have apache2 server. In that case: Can I use netBeans as my IDE for PHP development? If yes, I would be thankful if you can provide some examples. If not, what are the other alternatives? P...

you have chosen to open which is a : PHTML file FireFox error

Hi All, I followed this tutorial to start working with PHP and netbeans http://blogs.sun.com/netbeansphp/entry/ubuntu_php_netbeans and as I have created a .php file which has <?php phpinfo(); ?> as the only content, but what I refresh the page it says (in FF) you have chosen to open which is a : PHTML file from : http://12...

Global.asax for php

I've been a .Net developer and a Java developer and TBH I liked .Net more when it comes to web (Except that I had to use IIS). Recently I've learned php (Amazingly simple) but I was wondering if in php you could do something like the Global.asax in .Net. I'm just looking for someway to mimic the Application_Error event. Does anyone know ...

PHP, What do you need for a full Server manager?

I will soon be making a Debian-based OS and I was wondering what are the main things that a Server Manager would need to include? I already have a few ideas: Package Manager. Ability to restart. Manage: sites, users, pages, blog-posts, comments, etc. Email Manager. VM Manager -- If VMs is enabled in the Package Manager. Storage Manager...