php

php 5.3.2 version

I have downloaded a php 5.3.2. (.zip) from offical website. In directory 'php/ext' ,there are no files php_mssql.dll,php_pgsql.dll,php_curl.dll lybaries. where can i find it? Is it supported Php 5.3.2 ? other libary are ok.(mysql) PHP Warning: PHP Startup: Unable to load dynamic library 'c:/webserver/php/ext\\php_curl.dll' - The ...

Incorporate Wordpress into Kohana 3

I now need to make a Kohana 3 site have a Wordpress blog. I've seen Kerkness' Kohana For Wordpress, but it seems to be the opposite of what I want. Here are the options I have thought of Style a template to look exactly like the Kohana site (time consuming, non DRY and may not work) Include the blog within an iframe (ugly as all hell...

Getting empty result within PHP when in browser I get the JSON exception

I have this code: $url="https://graph.facebook.com/me/friends?access_token=".$access_token."&fields=id,first_name,last_name&limit=10"; $content=file_get_contents($url); Whenever I use this on a non authenticated user I should get feedback of OAuthException, which doesn't show up in the PHP the $content is empty. While if I cop...

HTTP header for sending PDF, problem in Firefox

In windows when i save a pdf with firefox adobe reader plugin ocurs this problem. The file saved is: http://www.example.com/opendocument.php_doc=._docs_doc01 My headers are: header('Content-type: application/pdf'); //header('Content-Disposition: inline; filename=doc01.pdf'); header("Content-Transfer-Encoding: binary"); header("Content...

Zend without Database

Hi, i googled for an hour now but maybe my Google-Fu is just too weak, i couldn't find a solution. I want to create an application that queries a service via JSON requests (all data and backend/business logic is stored in the service). With plain PHP it's simple enough since i just make a curl request, json_decode the result and get wha...

Relationship problem?

I have four tables Tag=>id,tag_name Image=>Id,Image_name TagImage=>Id,tag_id,Image_id ImageStudent=id,Image_id,student_id And I want to find a record using student id and tag name. What relationship do I use? ...

Find the nearest campground by postal code

I have a database of Postal Codes in Canada and the scripting to do my searches. But for some reason I am not get the nearest campground based on a Postal Code search. I am doing something wrong with my SQL Query as when I am selecting the campgrounds it displays a business within range by not the nearest. When I run the SQL Query to ge...

MVC, Service Layer and file upload/storage

Hello, I'm a using a layered architecture with Zend Framework. I have MVC with : Controllers > (DTOs) Services (Service Layer) > (DOs) Repositories > Persistance Now i have to handle image galleries. The upload process is handle by the front, but what part is responsible for the thumbs generation ? Do i have to store pictures to a ...

Echoing variable construct instead of content

I'm merging two different versions of a translations array. The more recent version has a lot of changes, over several thousand lines of code. To do this, I loaded and evaluated the new file (which uses the same structure and key names), then loaded and evaluated the older version, overwriting the new untranslated values in the array wi...

Inheriting database connection in PHP OOP

My abstract class Database is made for database interaction and any child of this class (UserDatabase, ActionDatabase, EventDatabase) inherits its database connection which is defined as static. abstract class Database { public static $connection; public function __construct( ) { ... $this->connecti...

PHP - How to SUM and GROUP BY a multidimensional ARRAY by a key?

I have a multidimensional array and am trying to group by a value of one the keys. So Array ( [0] => Array ( [name] => Edward Foo [desc_topic] => Array ( [0] => Apple [1] => Banana [2] => Orange ) [qt...

PHP: Need a double check on an error in this small code

I have this simple Select box that is suppose to store the selected value in a hidden input, which can then be used for POST (I am doing it this way to use data from disabled drop down menus) <body> <?php $Z = $_POST[hdn]; ?> <form id="form1" name="form1" method="post" action="test.php"> <select name="whatever" id="...

Failed to save data at the server from memcached program

hi i want to know why i cant store multi dimensional(array size is more than 1000) $memcache = new Memcache; $memcache->connect('localhost', 11211) or die ("Could not connect"); the above s working correctly... the below one have error... $memcache->set('key', $sear, false, 60) or die ("Failed to save data at the server"); i...

exec a command on each file in a phing target

how can execute a command in phing on each file of a fileset target for example: <exec command="cat {$filepath}"> <fileset dir="."> <include name="*.php"> </fileset> </exec> ...

PHP GD Allowed memory size exhausted

I'm trying to process a directory of JPEG images (roughly 600+, ranging from 50k to 500k) using PHP: GD to resize and save the images but I've hit a bit of a snag quite early in the process. After correctly processing just 3 images (30K, 18K and 231K) I get a Allowed memory size of 16777216 bytes exhausted PHP Fatal error. I'm cycling ...

PHP: Implementation Question with Dynamic dropdown menus

This is what I want my site to do: 1. User fills in some drop down menus 2. User clicks "Update Button" 3. Old Drop downs are disabled (but still visible), and new drop downs appear below with options based on the first drop down menus (in a way that i specify) 4. Repeat 1-3 a few times 5. User submits Data My starting point I have...

Regex to check if exact string exists including #

New question As suggested by Asaph in previous question: Regex to check if exact string exists I am looking for a way to check if an exact string match exists in another string using Regex or any better method suggested. I understand that you tell regex to match a space or any other non-word character at the beginning or end of a string...

Replacing values using preg_replace

I have a Joomla plugin (not important in this context), which is designed to take an input with a load of numbers (within a paragraph of text) and replace them with a series of s. My problem is that I need to do a preg_replace on my $article->text, but I don't know how to then apply the changes to the matched terms. I've seen the preg_r...

Redirecting to frontpage after 404 error in PHP

I have a php web page that now uses custom error pages when a page is not found. The custom error pages are included in PHP. So when somebody types in an URL that does not exists I just include an error page, and the error page starts with: <?php header("HTTP/1.1 404 Not> Found"); ?> This also tells crawlers that the page does not ex...

Parse livescores from web site

Hi all, I was thinking of parsing live scores from a web site via PHP and them use them for an application I am planning to implement, so my question is is it legal to do that, parse info from web site and use it ? If I quote the source if the info ? ...