php

Couldn't locate driver named mysql in doctrine php....

My application was working perfectly on localhost. But when i uploaded the application on server i got an error. I made a test file to check databse connection, this is the error i am getting. Please hellp me how to fix this.. Fatal error: Uncaught exception 'Doctrine_Connection_Exception' with message 'Couldn't locate driver named mys...

Cookie slows down my website on first start, always like this?

As soon as I implemented only one cookie into my website, the entire website became very slow on first start. I guess it's because it is fetching the cookie information. But is this always the case? There is no heavy code behind fetching the cookie, just plain simple php like this: $arr = $_COOKIE['name']; // array maximum of 10 val...

Multi-level Array to a table

I am trying to convert a multi-level array to a table. However my code does not output what I want. It shows the last child, but not other child and grandchild. I appreciate your help. DB table CREATE TABLE IF NOT EXISTS `menus` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `shortdesc` varchar(255) NOT NU...

Editable grid php

I have found bunch of editable grids when on google. Which is the best free grid with add edit delete pagination sorting functionality? I have tried phpDataGrid 4.2.8. I think it's little slow. Thanks in advance!! ...

twitter api returning xml on one server, empty string on another

I have a php Twitter app which lets you mark tweets as favorite. I'm doing something like this: $fav = $twitter->createFavorite("xml", $get_id);//handles api call (using curl) $fav_result = new SimpleXMLElement($fav); On my localhost and on one online server all goes well: the tweet is marked as favorite, and the api call returns xml...

Help with moving codeigniter to a new server

Hi , I am having a bit of a problem. I am duplicating my website to a test environment on a new server with a new domain. I have it working fine with the database etc but here is my error. On the live site if I click suppliers it goes to the page fine If I click it on the test environment it does not work. These are two links h...

I can't solve this session related issue!

Hi there, I am using Zend Framework and 3rd party application written in php for file upload. Upload process is ajax like, and I have annoying problem probably caused by this app. Problem is that upload application somehow destroys my Zend_Session! Here is the error which I am getting (with firebug console): http://pastie.org/738834 ...

Decent RSS feed generator for PHP

Hi Guys, I need an RSS Feed generator; should I use a class or should I generate the feed myself? If I should generate it myself, where is a good place to get comprehensive specs of the standards? If not, are there any good classes out there to do it and do it quickly and do it well? ...

How to request extended permission from a facbook fan page tab

I am trying to request permission to publish photos from a facebook fan page tab(iframe). I am calling Facebook.showPermissionDialog('publish_stream'); before the upload(which doesn't seem to do much) But I keep on getting this error when I try to upload a photo **caught exception 'FacebookRestClientException' with message 'Permission...

onclick submit one of two same form

I included one file (containing a form) two times in php file.I want to submit one form with onclick function. both forms are same. i wrote onclick function document.formname.submit(); I want to do somthing like this document.this.form.submit(); please give some solution. ...

Get XML from https URL

I'm trying to get data from multiple XML feeds and copy that data to my local database. I've tried looking into SimpleXML and some other things I've found on the internet but I'm wondering what the best route to take with something like this. I'm looking for something that will not only get the XML from the secure location but also con...

How mapping of cities in a country-map is done? ( so users can search for ads nearby their cities )

I have a classifieds website. The users first have to specify their 'area of search'... I want to add a function where users also can check a checkbox to find ads 'close' to their selected 'area'. But I don't know how to 'mapp' or 'link' the areas together in a smart way. I need some advice on how to do this... For example, how is 'ra...

PHP include inside an include (different directory)

The structure for the current project I am working on is something like: root/index.php root/includes/php/first.php root/includes/php/functions.php So index.php includes first.php: <?php include_once("includes/php/first.php"); ?> Normally then my first.php would call functions like: <?php include_once("includes/php/functions.php"...

Get width and height of quicktime clip (.mov) with php?

I need to get the width and height of a .mov-file with php. How do I do that? ...

PHP/MySQL - Need help in correcting a PHP warning?

I found this script on about.com which I'm trying to learn from on how to create a rating system but the script gives me a warning that I listed below. I was wondering how can I fix this problem? And what part of the code do I need to change and where? Here is the warning below. Warning: Division by zero on line 43 Here is the scri...

PHP - How to suggest terms for search, "did you mean...?"

When searching the db with terms that retrieve no results I want to allow "did you mean..." suggestion (like Google). So for example if someone looks for "jquyer" ", it would output "did you mean jquery?" Of course, suggestion results have to be matched against the values inside the db (i'm using mysql). Do you know a library that can ...

Which PHP config is running when I forward from one directory to another?

I am testing an idea based on my last question, but I've run into a very interesting problem... My home directory is on one path of the server (where all home directories reside) and for reasons I can only guess at, the PHP config for that directory does not have IMAP turned on. However, my project directory, which exists on a test mir...

String Manipulation in PHP

How to take off 1 in "{1}" and use it? ...

Trying to filter a mysql table by date using a single query.

Hi there, i'm trying to request any records from a table that appear on or after todays date, using a single query. All the dates for each record are stored in seperate columns eg. - one for 'month', one for 'year', and one for 'day'. obviously i've been getting all records that occur after the year in today's date $sql = "SELECT * FRO...

Performance concerns on sanitizing all user input using PHP array_map

Hi, I'm running this function to sanitize all user input through out my site, but it worries me that it may be very performance intensive... // function for cleaning arrays, recursively for arrays held inside arrays function array_clean($array) { // if its an array, walk each element recursively if(is_array($ar...