php

what to use for php db abstraction layer?

Hi, I have been using Creole for a year, but Creole project is dead now.. what are other good abstractions for php ? ...

php/javascript for calendar-start and date picker

I'm searching for php/javascript for calendar-start and date picker. Based on these date i need to retrieve the database cash and bank amount details. ...

I'm using Zend Studio for Eclipse and I'm trying to save my file but it failed!

Hi guys.. I'm new to PHP development and I just used Zend yesterday. One problem I'm having is saving the file in a directory that is read-only. I'm using Zend studio to develop PHP scripts. I have XAMPP installed in my Ubuntu in /opt/lampp/ directory. Now the /opt/lampp/htdocs directory requires privilege access. I can't save anythin...

is there a PHP library that handles URL parameters adding, removing, or replacing?

when we add a param to the URL $redirectURL = $printPageURL . "?mode=1"; it works if $printPageURL is "http://www.somesite.com/print.php", but if $printPageURL is changed in the global file to "http://www.somesite.com/print.php?newUser=1", then the URL becomes badly formed. If the project has 300 files and there are 30 files that appe...

Copy Image from Remote Server Over HTTP

I am looking for a simple way to import/copy images from remote server to a local folder using PHP. I have no FTP access to the server, but all remote images can be accessed via HTTP (i.e. http://www.mydomain.com/myimage.jpg). Example use: A user wishes to add an image to his profile. The image already exists on the web and the user p...

Rewriting a midsize application in OO.

What are some apraoches i can take to rewrite fairly large procedural php roughly 2000 lines of code app as an oo app. And should i even try to do so, or should i build on top of the existing app? I wrote it when i was learning programming and i now i want to expand it. ...

php5 won't load extensions through apache, but modules all show using php -m?

Hi! I've been trying to install PHP5-APC (http://uk.php.net/apc/). I used macports to get this far. When i run php -m , i get a list of lots of modules including apc, but the apache error log gives out: PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so' - (null) i...

on my local Windows machine, how do i write a script to download a comic strip every day and email it to myself?

on my local Windows machine, how do i write a script to download a comic strip every day and email it to myself? such as http://comics.com/peanuts/ Update: i know how to download the image as a file. the hard part is how to email it from my local Windows machine. ...

How to save the order for jQuery UI portlet plugin?

Hello I am using the portlet plugin from jQuery UI my question is: is it possible to save the order of the portlets in the database so when the user come back he can see his portlets sorted in the same order?How? Thanks ...

file_get_contents or readfile for displaying filesystyem image

can anyone advise on what the best PHP function is for displaying an image stored on the filesystem - file_get_contents or readfile. We are switching from displaying images stored in the database so we still need to call the images through a PHP file and cannot link direct to the filesystem. I've seen people recommending both functions b...

Asynchronous processing or message queues in PHP (CakePHP)

Hi all, I am building a website in CakePHP that processes files uploaded though an XML-RPC API and though a web frontend. Files need to be scanned by ClamAV, thumbnails need to be generated, etcetera. All resource intensive work that takes some time for which the user should not have to wait. So, I am looking into asynchronous processin...

trim ip address octet

I need to trim the last octet from an ip address using php. Basically I'm trying to just remove any digits after the third dot. I'm wondering if there is an out of the box solution for this? as my regex abilities are basic at best. Many thanks. ...

Accessing REMOTE_USER from PHP/CakePHP

I'm developing a CakePHP site for which I've just enabled VAS authentication using a .htaccess file: AuthType VAS AuthVasUseBasic On AuthVasRemoteUserMap local Require valid-user I'd expect to be able to find out who was logged in by using $_SERVER['REMOTE_USER'], but I'm finding that the key is missing from the $_SERVER structure: ...

Show product creation & last edit dates on Frontend in Magento

I've seen the two attributes in the MySQL database at table catalog_product_entity the fields are 'created_at' and 'updated_at' How do I get them to show up on frontend? ...

How to convert an HTML to PDF in PHP using FPDF Lib 1.6

I have a web page (XHTML 1.0 Transitional) which I want to convert to PDF on server and mail the same to an email id as attachment. The web page is dynamically loaded with information that comes from 4 different table from MySQL. So it is not a static HTML page. The solution should work on almost servers whether they are linux or windo...

Undefined variable error in PHP

Notice: Undefined variable: username in C:\xampp\htdocs\test_class.php on line 20 Notice: Undefined variable: password in C:\xampp\htdocs\test_class.php on line 20 I get the above error when i use this piece of code for checking down my username and password with my database. <?php class test_class { public ...

HTML Form Library for PHP 5

I am looking for QuickForm replacement. QF has perfoprmance issues with, for example with many optiion in combobox. I would also like something more object oriented, like Zend_Form, but without decorators and so much bloat. OF cource it should be also warning with E_STRICT. Any recomendations? ...

Help with mod_rewrite

Hi ALl I have folder home/admin. In this folder there is index.php. When i access to domain.com/admin/ my mod_rewrite rule redirects it my index.php in the home folder. I want mod_rewrite to skip existing folder or files, and special case for /admin/ folder, which contains index.php file. My rewrite rule is: <IfModule mod_rewrite.c> ...

PHP: Detect encoding and make everything UTF-8

Hello! I'm reading out lots of texts from various RSS feeds and inserting them into my database. Of course, there are several different character encodings used in the feeds, e.g. UTF-8 and ISO-8859-1. Unfortunately, there are sometimes problems with the encodings of the texts. Example: 1) The "ß" in "Fußball" should look like this i...

extract urls from text in PHP

Hello I have this text $string = "this is my friend's website http://example.com I think it is coll"; how can I extract the link into another variable I know it should be by using regular expression especially "preg_match" but I don't know how? Thanks ...