php

HTML / PHP form

I am trying to code an all in one HTML/PHP contact from with error checking. When I load this file in my browser there is not HTML. I am a newb php programmer so most likely forgot something pretty obvious. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html ...

Clone behaviour - cannot set attribute value for clone?

This code does not function as expected: // $field contains the name of a subclass of WMSInput. $fieldClone = clone $field; echo $fieldClone->getInputName(); // Method on abstract WMSInput superclass. $fieldClone->setInputName( 'name' ); echo $fieldClone->getInputName(); The WMSInput class: abstract class WMSInput { private $inp...

TV Guide PHP script / Database structure

Hello, I was looking for PHP TV guide scripts with it's Database structure. Or at least the Database Structure by itself. Any help or infomration would be really appreciated, I just don't want to start from scratch. Thank you, ...

500 Internal Server Joomla

Hi, I changed the file permissions on all my files and directories in my Joomla site and I am getting the 500 Internal Server error. What should be the right file permissions settings. Thanks ...

Setting up SSL on a local xampp/apache server

I'm trying to access a Active Directory from my local webserver. To do this I'm using the latest version of xampp and a PHP script called adLDAP. If I understand things right, I need to enable SSL to access https URLs. I've tried to google it but with no luck :( Could anyone link a tutorial or explain to me how to install SSL on xampp/ap...

Zend/PHP: Problem uploading/downloading file to/from MySQL's BLOB field.

I am uploading file(pdf for now) like this: (It is uploading content of file in blob field of mysql) $organizationModel = new Model_Organization_Object( organizationId ); $myFile = file_get_contents( '../path/to/my/file/filename.ext' ); $organizationModel->setOrganizationProfile( $myFile ); $organizationModel->save(); Now I want to ge...

PHP Getting XPath of a DOMNode

I am creating an XML document on the fly. and I need to know the XPath of the Node I've just created. I don't see any such function like DOMNode::calculateXPath(void):string and I am not willing to write one by my own. is there any known lite 3rd party Solution ?? ...

pass facebook connect session from php to javascript

I'm authenticating via PHP: // the php facebook api downloaded at step 3 require_once("facebook-client/facebook.php"); // start facebook api with the codes defined in step 1. $fb=new Facebook( 'XXXXXXXXXXXXXXXXXXXX' , 'a3eaa49141ed38e230240e1b6368254a' ); $fb_user=$fb->get_loggedin_user(); var_dump($fb_user); And the session is cre...

Gnope (PHP-GTK) - How to Drop a later version of php into the Gnope directory

I have installed the latest version of Gnope onto my PC See: http://www.gnope.org/download.php (Release 1.5.1) Gnope installs its own copy of PHP ( 5.1.4 CLI version). However, PHP version 5.1 is sooo old. I'd like to use a later version with gnope. I'm considering dropping a later version of PHP into that folder - but I am not sur...

How to get nth bit (from right) in a binary equivalent of an integer in PHP?

Suppose I want to find 2nd bit in binary equivalent of 13 (binary : 1101). It should return 0. ...

Validators are not working anymore in Zend Framework?

Eariler I happily used the following code for creating form elements (inside Zend_Form descendant): //Set for options $this->setOptions(array( 'elements' => array( 'title' => array( 'type' => 'text', 'options' => array( 'required'...

php file path of server

I am trying to get this script to work. it opens up a directry and lists the files in the directory. I have copied this code from somewhere else and the problem is that this php file is hosted on an apache server not my localhost. what is the correct $dir_name = "c:/"; to use? The file is in this directory /domains/domainxxxx.com.au/pub...

Using Barcode ID for Event Management

I have a barcode scanner and laptop (ofcourse :)), I'm looking for simple event management app that can process the input from the barcode scanner and keep attendance record for our frequent private meetings. I wonder if there's an open source software available that'd allow me to manage events using code 128 barcode id cards? Many th...

Need to find latitude and longitude of postcodes and store into my database

Hey guys, Ive got a database full of UK Postcodes, now i'd like to be able to store the latitude and longitude of these specific postcodes along with the record with the database. Is there anyway that i can obtain this data free without violating any T&C's? I know i could do this using google maps api for each postcode, but i have wa...

Get nested/hierarchical JSON from MySQL/PHP

I am using spacetree chart and I require JSON in hierarchical format. See sample required JSON format here. I have ID,ParentID,Name,Description fields in Mysql database table. Now How can I convert data in Hierarchical/nested JSON using PHP? I know json_encode($array). But, I require nested/Hierarchical php array for this. Let me know t...

Display one css style if IE and another if ff or chrome in .css using PHP

Hello, I have some CSS style that does not work in IE and that works on ff and chrome. I want to be able to use if else. But can PHP ifelse be included in the .css file for me to achieve? [edit] I dont want two .css files for the purpose Thanks Jean ...

How to find root cause for "too many connections" error in MySQL/PHP

I'm running a web service which runs algorithms that serve millions of calls daily and run some background processing as well. Every now and than I see "Too many connections" error in attempts to connect to the MySQL box" for a few seconds. However this is not necessarily attributed to high traffic times or anything I can put my finger o...

PHP DOMXml XPath of recursive Xpointer

My xml document reflects an Object. as referential Recursion is possible in objects and arrays. I need to reflect that in reproduced XML Structure too. Currently I am using Unique IDs to identify each node separately and a node like <recursion refer="IDREF"> and specifying the ID of the referenced Element. But in This way I need My Own C...

Pass value to an include file in php.

Hi, How do you pass a parameter into an include file? I tried the following but it doesn't work. include "myfile.php?var=123"; and in myfile.php, I try to retrieve the parameter using $_GET["var"]. include "myfile.php?var=123"; will not work. PHP searches for a file with this exact name and does not parse the parameter for that I al...

example of discount coupon generation and redemption in php

can someone please give me an example on the internet of how the system of discount coupon generation and redemption is implemented for a website where a purchase is made. Programming based on php. Any help appreciated. Regards SK ...