php5

Strange Doctrine behaviour with double innerJoin()

Hello, I have a database schema like this: My database schema: http://i.imgur.com/vFKRk.png To explain the context: One user writes one message. He can send it to one or more users. I succeeded to get the title of message, the author for one user. However Doctrine, which I use for this project, do it with 2 queries. It's a little bi...

403 Forbidden with php in worker mode. Only to php files from browser

Hello First off let me start by saying that yes I have searched for this in google and in stackoverflow specifically, I have found many answers and tried them all. At this point I believe my only resource is posting the question myself, even if the scenario sounds repeated please be so kind as to try to help. The situation is quite b...

Which editor and tutorial is best for php5?

Hi ,Im new to php.I want to learn php5 tutorial.Which tutorial is best learn php5. Which editor is best to write php5 code. Please explain Zend framework. ...

How to integrate Wordpress and bbPress?

Hello Fellows, Can anyone explain me how to integrate Wordpress 3.0.1 and the bbPress 1.0.I just want to install bbPress with my previous Wordpress site (Url : mysite.com).I just want to install it on mysite.com/forum . I just tried doing it by creating a folder and installing bbPress there,( I skipped the wordpress integration ). When I...

Get the last insert id

Hello I am using cakePHP 1.3 and I am unable to retreive the last inserted row's id. I actually am using $this->Model->id to retreive the last inserted id but I am unable to get the id. When tried to check what is return type, it says as bool(false), which means nothing is returned. Here I am loading a different model in a different con...

[PHP5] What is the structure result of imap_fetchstructure() method and how can I use this with the imapfetchbody() method ?

Hello everybody, I'm actually developing a webmail written in PHP5 with the native IMAP library and the Symfony framework. I have some difficulty to understand the structure result of the imap_fetchstructure() method and how can I use this with the imap_fetchbody() method to retrieve the body message. The PHP5 documentation specify tha...

PHP 5.3: "Declaration of ... should be compatible with that of ..." error

After having upgraded to PHP 5.3, my application was inundated with "Declaration of ... should be compatible with that of ..." style errors. I understand the nature of these errors, but I wish to disable them. The "error_reporting" setting in php.ini is "E_ALL & ~(E_NOTICE | E_DEPRECATED)", but this error continues to show up. I assum...

content type may be?

I have an xml file saved and this is what I want to do, when some one click the link that contains an xml file, I want them to ask the question if they want to save or open the file. I know there is a way to do this using http header to send and trick your brower into using the application/octet-stream mime type, but I forgot how it wa...

tcp message incomplete

hi, I'm using html5 websockets, dev.w3.org/html5/websockets/, and php socket functions, php.net/manual/en/ref.sockets.php. My problem is that messages sent from the client using websockets to the server are being truncated to a maximum of 1449 bytes. When I set net.ipv4.tcp_timestamps to 0, a couple extra bytes are received. I am using ...

Why is PHP mysqli prepared statement working but inserting all NULL values?

What would cause this? Code follows: $m = new mysqli($host,$user,$pass,$db); if(mysqli_connect_errno()) die('Connect failed: ' . mysqli_connect_error()); $PrepSQL = "INSERT INTO Products (" . implode(',',$this->cols) . ") VALUES ("; $PrepSQL .= '?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; $stmt ...

development of php oop based project

I want to develop my php project using oop concepts.I read many tutorials.But i can't understand how to implement those are in my project. Plz help me. Thanks in advance Bhavyasri ...

Can I preview the XML that PHP SOAP wants to send before sending it?

As per the title, is it possible to output the XML that a new SoapClient has created before trying to run a __soapCall() to ensure it's correct before actually sending it to the SOAP server? ...

get_browser not showing ismobiledevice

get_browser() function does not display the ismobiledevice array as 1, i testing in iphone, Why it is not displaying the ismobiledevice as 1 , i have two page , form-mobile.php and form-pc.php , if user using pc means then it should redirect the page to form.pc.php , if user using mobile then it should redirect page to form-mobile....

SOAP not passing through multidimensional array

I have a multidimensional array, such as: $array = array( 'a' => 1, 'b' => 2, 'c' => array('42'=>'foo', '43'=>'bar'), 'd' => 4 ) I'm trying to feed it into a SOAP call as follows: $response = $client->SomeFunction($array); The XML request produced ignores 'c'. Why? ...

Enabling ZLib support in PHP

Hello, I'm installing a PHP script in my server and when I try to run the test page, I get an error saying "PHP needs to be compiled with ZLib support enabled (--with-zlib[=DIR])" ... how can I fix this on Apache? ...

forms data into datasheet through php

Hi all, i have form with a list of hotels,whenever that list pops up than there is an option to print datasheet,where all the data get printed in an rtf file.the data regarding each hotel shall be printed to that rtf. Please share your logic,as it seems pretty easy to do but the thing is i am not a php developer and i have...

How to upgrade PHP with PHP-FPM

I tried to upgrade PHP from 5.2.12 to 5.2.14 (FreeBSD 7) (by make install), but after installation 'php -v' in command line shows '5.2.14' and phpinfo() shows '5.2.12'. How can it be? Now I'm trying to install PHP patched with PHP-FPM, but get an error that says 'make deinstall' before. How can I properly install PHP now? And what happ...

how to access mysql link connection resource from zend mysql DB connection object

Here is how i am creating the zend db connection $DB = new Zend_Db_Adapter_Pdo_Mysql(array("host" => "localhost","username" => "root", "password" => "admin123", "dbname" => "user_management")); The problem i have is that in my model files mysql_query have been used to run queries. I want to pass the DB connection from the controller...

php, urldecode() and the umlaut - ö

Hi All, Using PHP 5.3.2, I'm having trouble with handling a request for a page whose name has an umlaut in it: ö Making the request using Firefox + Live HTTP Headers for the test_ö_test.htm page, I can see firefox automatically converts/encodes the umlaut when it makes a request: GET /test_%C3%B6_test.htm HTTP/1.1 Now, using http://...

PHP Optional Parameters - specify parameter value by name?

Hey, I was just wondering... I know it is possible to use optional arguments as follows: function doSomething($do, $something = "something") { } doSomething("do"); doSomething("do", "nothing"); But suppose you have the following situation: function doSomething($do, $something = "something", $or = "or", $nothing = "nothing") { } ...