PHP version 5.3 has been released, and although it looks great, all my code already works fine. I don't see what this new version offers to justify upgrading and working through possible issues after the upgrade.
Should I upgrade anyway just for good practice, or is an upgrade not needed unless I am actually using the new features?
...
Currently I'm trying to install PHP 5.3.0 on some Linux testing server. As we've urgently waited for ext/intl we want to check out the features it provides.
I'm running configure successfully with the following arguments
./configure
--with-apxs2=/usr/local/apache2/bin/apxs
--prefix=/usr/local/php
--with-zlib-dir=/usr/local/z...
I have been using CakePHP for a few weeks now and its been an great experience. I've managed to port a site surprisingly quickly and I've even added a bunch of new features which I had planned but never got around to implementing.
Take a look at the following two controllers, they allow a user to add premium status to one of the sites l...
im new to regular expressions in php.
I have some data in which some of the values are stored as zero(0).What i want to do is to replace them with '-'. I dont know which value will get zero as my database table gets updated daily thats why i have to place that replace thing on all the data.
$r_val=preg_replace('/(0)/','-',$r_val);
Th...
When I use CakePHP Paging I get an url like this:
http://example.com/php/page:2
What do I have to change in the controller, the view and the routes.php to create a working url like this:
http://example.com/php/2
...
I have a scripts that retrieves huge data on a table. I want to create a mysqldump to insert data into another database table with different fields. I want the format of phpMyAdmin where it repeats the INSERT INTO Table VALUES(values1),(values2), ...(values100); if reaches certain amount of value sets depends on what you set.
ex: If I ...
Experienced programmers often rant against PHP. But so far I haven't come upon a summarized list of reasons. Anyone care to explain?
...
Using MySQL + PHP, I want to store several food_items for a single restaurant order in a MySQL database.
I have two tables: orders & food_items:
Many food_item_ids will be stored for a single order.
I'm just wondering, what's the best approach to storing the food_item_ids in the orders_table?
Should I store each food_item_id in a sep...
I try to create a PDF with multiple pages and need to calculate the height of each individual element (MultiCell) in advance to prepare for a page break. According to the documentation there are a couple of functions out there like GetCharWidth/GetStringWidth to support me in doing it on my own, but besides a potential performance lost I...
Hi,
I need to analyze a users' post and categorize it. For example: I have to categorize every post as a "buy" post or a "sell" post based on the text - "I'm looking to sell my house" is categorized as "sell". The problem is that often its not so simple - "I'm looking to get rid of my old house" also needs to be categorized as "sell". "...
Hi there,
I'm querying a mssql 2008 database via odbc and stubled upon a strange behaviour.
The following code is used...
$datefrom = "2009-06-01";
$dateto = "2009-07-01";
$clientno = "01";
$sth = $db->prepare("select count(*) from tbl WHERE v_valid_from <= ? and valid_from <= ? and (v_invalid_from >= ?) and (valid_to >= ? or valid_to...
I have to rewrite my code so that it will be iffecient when it comes to memory and execution time..
what the script does is creat a mysql dump wherein the data are get into huge data table and insert into another database.
The data that being process here is about 17 MB of table data and eating about 62 MB of Memory. any suggestion how...
I'm trying to do a system wide install of PEAR on my web server. When I execute go-pear.bat in the PHP installation folder from the command line I get the following error windows popping up:
---------------------------
php.exe - Unable To Locate Component
---------------------------
This application has failed to start because php_mbstr...
I'm working in a LAMP environment, so PHP is the language; at least i can use python.
As the title said i have two unordered integer arrays.
$array_A = array(13, 4, 59, 38, 9, 69, 72, 93, 1, 3, 5)
$array_B = array(29, 72, 21, 3, 6)
I want to know how many integers these array have in common; in the example as you see the result is 2...
Hi,
we have a modularized website built on the MVC pattern. We would like to create cronjob scripts which execute every 1, 15, 60 minutes and which execute daily. We -need- the cronjobs (to make sure nobody starts asking if we really need them).
Actions include finishing up orders for process every 15 minutes and accepting new user re...
Currently we are restoring MySQL connections in a $_SESSION in order to save round trip time to set up connection to MySQL,
but the problem is that the number of connections exceed the limit quickly,
so what's your guys' solution?
Do you create a new connection each time,and close that connection after using,or like me,restore it?
...
When using Zend_Form I find myself creating a lot of controller methods that look like this:
function editPersonAction()
{
$model = $this->getPersonModel();
$form = $this->getPersonEditForm();
if ($this->getRequest()->isPost() {
$data = $this->getRequest()->getPost();
//$form->populate($data); [removed in edit]
...
Situation:
I am creating a database user interface for a client's website. I know I could simply use phpMyAdmin, but it is too complex for my client. Instead, I though I could give some of the PEAR Packages a try. After doing some research and following tutorials I decided to go with the Structures_DataGrid package. I am currently follo...
Hello all,
Is it possible to re-write (Apache Mod-Rewrite) a URL from this:
http://www.example.com/view.php?t=h5k6 to this http://www.example.com/h5k6
The reason for this re-write is that the URL needs to be very short (a bit like a tiny URL service).
Would that new URL still hit my view.php page? Would it be able to still make use o...
I'm looking for a good way to get autocomplete and click-for-reference (whatever that's called) for libraries in codeigniter working in Zend Studio for Eclipse.
for instance, if i do
$this->load->library('dx_auth');
$this->dx_auth->get_user_id();
zend studio doesn't know what it is..
There is this sortof hacky way to do it (see below...