php5

how to set php Cookies for long period of time

how to maintain the cookies for a long duration of time even if the user logout from the site and when user login next time the earlier set of cookies should be there ...

PHP scripts are not executing on some of the pages

One of my php website is not working fully. Its showing me only home page and when i try to open up any present link it shows me the php code of the file that is called in for that link. PHP is installed properly. Same server is hosting more than 10 other websites of PHP. No .htaccess parameters etc.. Same site is working on some other ...

Cakephp returns empty but sql query has results

I have been fighting with this code: function getNextActionFObyBalance($when) { $theQuery = $this->find('first', array( 'fields' => array( 'Contract.id', 'Contract.start_balance' ), 'conditions' => array( 'AND' => array( 'Status.next_action_by' => 'frontoffice', 'Status.status_type' => 'active', ...

Multidimensional Array Help

I have this array that I am having trouble traversing: print_r($menu) gives this: [Dashboard] => Array ( [uri] => dashboard [access_level] => Full ) [Web Site] => Array ( [uri] => website [access_level] => Full ) [Pricing] => Array ( [uri] => pricing [access_level] =...

Joomla Random Image

I have been searching a plugin/module for Joomla where: Loads random image on page refresh Have each image have their own URL Has to work with Joomfish (multilingual) Let me know if you have found any alternative component or module for this type of usability. The reason why I wanna keep it as a module is I want the client to actual...

is there any simple php/mysql shopping cart

Hi, I need to use some sopping cart for selling "Scripts" online. Is there any simple and clean php/mysql shopping cart integrated with paypal that can be used free. Feature that I require is, a link will be dynamically generated for certain days and sent it to the user who paid so that they can instantly download the script as soon as...

PHP functions inside HEREDOC - returned to a tab layout

I have a php function that dynamically queries a database, and returns 6 tables. I want to store each of these tables as a php array element, pass the array back via JSON/AJAX, and display each table as a seperate on a page. I wrote test code to do all of this. The test code takes an array of HTML strings and passes them back. The prob...

how to Store User's Last Page Visited using session in php5?

how to Store User's Last Page Visited using session in php5? when user come to my website & when he login then he will redirect to user panel of my site. but if user is not active more than 5 min then session will expire that time if user will active then it will redirect to login page. now i want when user relogin then he will redirec...

how to know whether window is opened - PHP/Javascript ?

There is a chat button, and when users click on that chat button a new window will be opened and both the users can chat how can i know, whether chat window is still open or not, when any of the user logged out from the application ? and give a message, "chat window still open" and close the chat window... name of the chat window : ch...

Compress GIF Images Quality in PHP ?

How would one compress GIF image file in PHP5 ? I know that its possible to do with JPG like this imagejpeg($resource, $filename, $quality) according to http://us.php.net/manual/en/function.imagejpeg.php ...

How to respond to password prompts with exec()

Hi people, I know the title of the question is a bit odd. But I don't know what the thing I am trying to do, is called. So, here it goes -- I'm working on a simple ADOBE AIR app generator, After generating all the necessary files and signing the application using the file adt I'm supposed to - generate the actual .air file. Which, af...

what are the main differences between require, require_once, include and include_once in PHP

Hi, what are the main differences between require, require_once, include and include_once in PHP ...

PHP - What does this do?

What does this do? $running = null; { curl_multi_exec($mh,$running); usleep(100000); } while ($running > 0); Also: curl_setopt($ch, CURLOPT_TIMEOUT, 8); Its PHP and curl. ...

How to join table with itself in doctrine 2

is there any way using DQL write a query that joins table with itself? ...

How do you compile a PHP extension on windows with cygwin/mingw?

I am trying to build the RabbitMQ PHP wrapper and the AMPQ PHP wrapper on Windows (64) using Cygwin. I have successfully built the underlying C library (librabbitmq.dll) but I am stuck at the 'phpize' step: phpize && ./configure --with-rabbit && make && sudo make install If I understand correctly, there is no 'phpize' on windows, so ho...

Get only declared methods of a class in PHP

Hello I need to get only the methods declared in a class, and not the inherited methods. I need this for cakePHP. I am getting all the controllers, loading them and retrieving the methods from those controllers. But not only are the declared methods coming, but also the inherited ones. Is there any method to get only declared methods. ...

php simplexml - extract large number on cdata

I have the following part of my xml: <book number="AB 123" type="SCI"> <info> <type code="FIC"><![CDATA[Fiction]]></status> <publish-time><![CDATA[20090110214000]]></publish-time> </info> </book> If i do: echo $key->info->type; I get nice and easy "Fiction" BUT if i do: echo $key->info->publish-time; I get "0". I thought i has to do ...

How to make this in php?

Possible Duplicate: How to build multi oop functions in PHP5 Hey, I've seen this kind of code in a couple of forum systems but I can't find any examples like this: $this->function()->anotherfunction(); You can see a similar example in PDO: $pdo->query($sqlQuery)->fetch(); I don't know how this type of coding is called i...

PHP - OOP new class with agrument ?

class Dictionary { private $translations = array(); private $dictio; private $type; function __construct( $type, DictionaryIO $dictio ) { $this->type = $type; $this->dictio = $dictio; } // ... } $en = new Dictionary( "En", new DictionaryIO() ); $en->dictio = null; i saw something like above co...

How to create auto Dynamic Text Box in PHP?

Hi guys! I have a question regarding the creation of Auto Dynamic text boxes within PHP. The scenario is like this: I have 2 tables in a MySWL database. The 2 tables (students/teachers) have different number of fields Teachers = 8 fields / Students = 5 fields A page for inserting new data into the tables is created. So now there is a...