I'm trying to setup Zend Framework and Doctrine.
There is this previous discussion with ZF 1.8
http://stackoverflow.com/questions/973259/integrate-doctrine-with-zend-framework-1-8-app
That discussion doesn't take into account the AutoLoader / Bootstrap System.
If I generate an application skeleton with ./zh.sh how would I go about ...
How can you have only one declaration of the database connection variable, $dbconn?
My login script is based on the following procedure
If the user is not authenticated, he is thrown back to the login page
If the user is authenticated, he gets an $_SESSION["logged_in"] = true;
Then when the user is browsing the main page or other page...
I found the source of the problem #2. It is the use of *session_register(foo)*.
I put the following to my *handle_registration.php*.
session_register("foo");
session_register("foo2");
$foo2 = $_POST['email'];
$foo['email'] = $_POST['email']
The problem still persists, since no variables are stored to my session cookie.
This is th...
I have the following json string and I want to retrieve just the email address from it. How do I do it in php?
{"communications":{"communication":[{"@array":"true","@id":"23101384","@uri":"xyz/v1/Communications/1111","household":{"@id":"111111","@uri":"xyz/v1/Households/5465465"},"person":{"@id":"","@uri":""},"communicationType":{"@id"...
I've been getting completely random 404 errors when using the backend of WordPress. These errors are for completely legitimate admin pages. The workaround is to refresh the page – which usually works the second time around.
I've seen this problem reported elsewhere but no solution. Wondering if anyone here has good ideas.
...
ok, that's a bit odd but here's the situation:
I am working in an MVC context
I have a User class used as a library(User.php)
ANd then I have a controller class that handles input from the user(controller.php)
Here's how it goes:
user registers
registerhandler() is called in controller
registerhandler() calls register() method in U...
I am creating menu for a website. for each item (Home, Contact us, About us) I use Background color and text of size 125X30. In CSS, When i use float it works correct. But when i removed float, all individual item such as home, contact etc come down one by one. I need it left to right in a single line without float. Help me
...
I have reworked a website and now it is xhtml valid etc and using UTF8. Everything is fine, but if anywhere in the Database is a Euro-char it is just displayed as a questionmark.
What would be the right way to fix this?
As output is done by Typo3 i cant change much about that.
...
I was wondering if is there a way for php to check if a PDF file stored locally on the server is corrupted or not. We have a php application that deals with a lot of scanned documents converted in PDF and it would be nice to check which of them is corrupted to alert the user.
I tried to look around but with no luck.
...
Does anybody have the exact name of the function Drupal uses to turn the following string:
"Hello, how are you. Some more text."
into
"Hello, how..."
I.e. The function that's used to cut off a sentence after x words, and then add an elipsis. Alternatively, if anybody has a php snippet that does this, that would be great too!
...
I'm trying to match substrings that are enclosed in %'s but preg_match_all seems to include several at the same time in the same line.
Code looks like this:
preg_match_all("/%.*%/", "%hey%_thereyou're_a%rockstar%\nyo%there%", $matches);
print_r($matches);
Which produces the following output.
Array
(
[0] => Array
(
...
I am relatively new to Cake PHP framework and was trying few things in it. I have made a blog databse. I was trying to view an array of number of posts made in a particular year using the debug() function.
I wrote the following function in the post model.
function findByYear($year = null){
$date = $year.'-01-01 00:00:00';
$end...
I have a server with many customers on, when I develop I include my init.php in which I have an __autoloader() function that includes the file with dir_name(__FILE__)."/classes/".$className for instance.
But yesterday I saw that the server could not find the specific class, I restartat apache and then it worked again.
Every customer ha...
hi
i want to merge to images but the problem is one image is .PNG format and second one is .JPG format and after merging the output should be .PNG format but the transparency is not appearing .plz help
Thanks
...
Hi,
This question is related to a Windows install of PHP5.
Doing a file unlink() makes it difficult for recovery.
Instead I would like to move the file to the Recycle Bin (without doing an exec()).
Do you have any idea?
Thanks for your help.
...
Hi Folks,
does someone knows some good examples for an PHP Application using those 4 "Layers"
ServiceLayer
-> Model
--> DataMapper --> DAO
Iam not sure if it makes sense, when i use such a design i have to do the following to create a new Record in my Database :
$servcie = new Service(new Mapper(new Dao));
$service->save($data)
th...
I'm compressing a string using PHP's gzcompress() function:
http://us2.php.net/manual/en/function.gzcompress.php
I'd like to take the output from the PHP compression function and decompress the string in Java. Can anyone send me down the right path?
Thanks so much!
...
Assuming that the .php and .aspx extensions have been hidden from the URLs, are there any clues in the HTML that might suggest the site is coded in either php or asp?
Cheers.
...
Hello everybody,
Below is a working example of my OpenId implementation. I use hyves.nl as the OpenId provider but this also works with me.yahoo.com and probably other OpenId providers as well (but not Google).
So far so good. But now I want to fetch the nickname and/or fullname from my hyves profile. But when I set nickname and/or ful...
I am tring to get a form working on a new server but the captcha does not appear!
http://www.perfectclaims.com/ppiclaimsnew/
I know that the url for the captcha is right as it creates the session!
Does anyone know whats going on?
Thanks
...