php

special characters (ö) in ezpdf document

Im creating a PDF document with ezPDF (version 0.9). The data I insert in the document is from a MySQL database with encoding: "latin1_swedish_ci". Special characters (especially ö, which matters the most now) are displayed like Greek pre historical algabra (literal) in the document. What I have tried so far: iconv(); htmlspecialchar...

asynchronous processing with PHP - one worker per job

Consider a PHP web application whose purpose is to accept user requests to start generic asynchronous jobs, and then create a worker process/thread to run the job. The jobs are not particularly CPU or memory intensive, but are expected to block on I/O calls fairly often. No more than one or two jobs should be started per second, but due ...

Create grid in custom admin module

I've create a custom admin module, but now, i wannna have a grid just like the Manage Customers, with the same funcionality, this is for maintaining a standard between everything in the backend, i find the more I look less...please, need a hand here ...

why my search code does not work on internet explorer

hello all i have the following code for search from database show return result to the page and show them with jqgrid, my code works fine with firefox but its not work on ie, when i use of utf8 like arabic letters, i set both of encoding of ie, and firefox to unicode(utf8) its html code first name: <input type="text" id="firstname" ...

Automatic space after fgets' result?

Hi there, it seems as if fgets puts a space after everything it returns. Here's some example code: <?php Echo "Opening " . $_SERVER{'DOCUMENT_ROOT'} . "/file.txt" . "...<br>"; $FileHandle = @Fopen($_SERVER{'DOCUMENT_ROOT'} . "/file.txt", "r"); If ($FileHandle){ Echo "File opened:<br><br>"; While (!Feof($FileHandle)){ $L...

How does memory usage work in PHP when saving images?

I'm workin on a script that list all images in one directory and then resize and save in another directory. In my shared server, I receive this message: Allowed memory size of 67108864 bytes exhausted (tried to allocate 600 bytes) in... The question is: If PHP can free the memory after each image creation using image_destroy(), why t...

Security with PHP form processing with "not required" field confirm submit

I'm noob about form best practices... The goal: Solution for processing not "required fields" which are, for lack of better term, "soft required". When the form is submited, and required fields are OK, there is a soft-require check asking the user "Are you sure you don't want the undercoating?" How I plan to do it: Three pages. (1) the...

Doctrine: How to combine 3 of the table, with the attitude of many to many

There are 3 tables: catalog product product2catalog Table product2catalog consists of the following fields: catalog_id product_id How to get goods within the directory? How to rebuild the connection to be able to do so: $CatalogTable = CatalogTable::getInstance(); $Catalog = $CatalogTable->find( $id ); var_dump( $Catalog->product ...

Read returned XML by function with SimpleXML

This is sort of confusing to explain, so thank you ahead of time for bearing with me. I am using Kohana PHP framework to develop an application. I have a model function that accepts parameters for a search, and should return an XML styled page. I need this to be read by the controller with SimpleXML. Any ideas how to do this? $o = ...

how to refresh the page after successful fbconnect login

Hi, I am trying to run the basic fb connect example provided here http://developers.facebook.com/docs/guides/web#login Everything works fine except page does not gets refreshes after log in. How can I achieve that? ...

Authenticate MS-Sharepoint user using PHP

Hi all, I was told in the 'case-of-monday' meeting that I am going to integrate MS-sharepoint authentication to a existing PHP site. The idea is a MS-sharepoint user can login via the PHP site which has permission to query a sub set of the Sharepoint resources (generic documents i.e. employee manual). I need something to get started. A...

Magento - Programmatically reorder

Hello, I am currently making a module that requires me to take an order object and make it reorder itself.. thus, creating a new order in the backend with the exact same items and credentials. This is the code that i have thus far… it doesn’t seem to reorder the item or create and add another backend order. $personsOrder = Mage::getMo...

Converting date From one format to another

iam having the date format stored in database as "20100723"(YYYYMMDD) and how do i convert it into "23-JUL-2010" ...

Need Help with this smarty

Hello, I am newbie & trying smarty for Gravatar plugin like this. <img src="{gravatar email="[email protected]"}"> But to get value of email I need to use {$client.email} So My final code look like <img src="{gravatar email="{$client.email}"}"> Which is not working. Where I am going wrong ? Thanks ...

Just one PHP page won't run - it wants to download

Hi All PHP pages are all running just fine on my site, except for one for which Firefox says "You have chosen to open checkpage.php which is a PHP script" and then wants me to select an application with which to open it. The site is running PHP Version 5.2.10 on Centos 5.5. I'm using exactly the same code on another site (PHP Version ...

Magento custom admin module is blank

I've create a custom admin module but i can't put a content in it, it always is blank i'm trying with a simple code for test, but nothing seem to work public function indexAction() { $this->loadLayout(); $this->_addContent($this->getLayout()->createBlock('adminhtml/template')->setTemplate('uhmaadmin/contactos.list.phtml')->toHt...

replace all smileys by enumeration in php

Is there any fast (regex-based?) method to replace all smileys in a text, each by an unique corresponding identifier? For example, the first occurrence of :) should be replaced by smiley1, the :)) by smiley2 and another occurrence of :) by smiley1 again? Furthermore, the identifyier should be the same using different text for input Any ...

Dedicated login.php page vs index.php checking for login data

Okay, so I'm not 100% sure what the best way to implement this is. I want to create my own little webapp that requires a login to work. I know how to authenticate, that's not the problem. Either my index page redirects to a login.php page and allows you to log in then redirects you back to index or the index page detects that you're not...

where to keep temporary data?

Hi Guys, I'm doing a system with Codeigniter , this is my first system with CI, and i'm also novice to PHP too. I'm doing this for a hospital, in this i have the following problem junior doctor first check the 1st visit patients and then if he can't handle them he refer them to the senior doctor from registration room some patients ...

OpenSSL PHP Function doesn't work

Hi, I'm looking for days how to translate this command to OpenSLL php function: $ openssl pkcs8 -inform DER -in aaa010101aaa_CSD_01.key -out AAA010101AAA.key.pem Enter Password: a0123456789 This work perfect, but I can't (I don't know) use the correct function of PHP OpenSSL http://www.php.net/manual/es/ref.openssl.php I have made th...