[PHP] Mysql 5.5 and PHP Mysql API Version 5.1.41

2011-02-15 Thread Matthias Laug
Hey there,

I've just migrated to Mysql 5.5 from source and it works like a charm. Still 
every now and then (in intervals of approximatly an hour) I get the following 
error:

Error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2013] 
Lost connection to MySQL server at 'reading initial communication packet', 
system error: 110' in 
/home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php:129
 Stack trace: #0 
/home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php(129):
 PDO-__construct('mysql:port=6664...', '#', '#', Array) #1 
/home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Mysql.php(96):
 Zend_Db_Adapter_Pdo_Abstract-_connect() #2 
/home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Abstract.php(448):
 Zend_Db_Adapter_Pdo_Mysql-_connect() #3 
/home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php(238):
 Zend_Db_Adapter_Abstract-query('SET NAMES 'utf8...', Array) #4 
/home/ydadmin/build/lieferando.de/11720/application/Bootstrap.php(99): 
Zend_Db_Adapter_Pdo_Abstract-query('SET NAMES 'utf8...') #5 
/home/ydadmin/build/lieferando.de/11720/library/Zend/App in 
/home/ydadmin/build/lieferando.de/11720/library/Zend/Db/Adapter/Pdo/Abstract.php
 on line 144

It is like any queue is running full and this is the result, but actually no 
clue. My first guess is the API Version of the mysql client I am using with the 
precompiled php binaries (Ubuntu 10.10 Server, PHP 5.3.2-1ubuntu4.7 with 
Suhosin-Patch (cli) (built: Jan 12 2011 18:36:55))

Does anyone else have the same problems?

Thanks for any help,
Matthias
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Time Problem: always ten past xx

2009-10-06 Thread Matthias Laug

Hey everybody,

I've got a strange problem. Using PHP5.3 on my MacBook.

There is a script, which handles input from user, in this case a date  
and time.


So I get for example 10:30 and 06.10.2009. Standard german time  
format. Now I try to get the correct timestamp:


$time = strtotime(06.10.2009 10:30);
var_dump($time);
var_dump(strftime(%d.%m.%Y %H:%m,$time));

But the result is as

int 1254817800
string '06.10.2009 10:10' (length=16)

The minutes are always 10, no matter what time I get.

Anyone a clue?

Thanks, Mattes

P.S.: default timezone is set to

date_default_timezone_set('Europe/Berlin');



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Time Problem: always ten past xx

2009-10-06 Thread Matthias Laug

argh, why do I always stick to the stupid questions :( sorry

Am 06.10.2009 um 10:03 schrieb Mert Oztekin:


You also write the answer

var_dump(strftime(%d.%m.%Y %H:%m,$time));

there are 2 %m  you see? %m is month :)

for minute use %i


-Original Message-
From: Matthias Laug [mailto:matthias.l...@gmail.com]
Sent: Tuesday, October 06, 2009 10:53 AM
To: php-general@lists.php.net
Subject: [PHP] Time Problem: always ten past xx

Hey everybody,

I've got a strange problem. Using PHP5.3 on my MacBook.

There is a script, which handles input from user, in this case a date
and time.

So I get for example 10:30 and 06.10.2009. Standard german time
format. Now I try to get the correct timestamp:

$time = strtotime(06.10.2009 10:30);
var_dump($time);
var_dump(strftime(%d.%m.%Y %H:%m,$time));

But the result is as

int 1254817800
string '06.10.2009 10:10' (length=16)

The minutes are always 10, no matter what time I get.

Anyone a clue?

Thanks, Mattes

P.S.: default timezone is set to

date_default_timezone_set('Europe/Berlin');



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


  
Bu mesaj ve ekleri, mesajda gönderildiği belirtilen kişi/kişilere  
özeldir ve gizlidir. Size yanlışlıkla ulaşmışsa lütfen  
gönderen kisiyi bilgilendiriniz ve mesajı sisteminizden siliniz.  
Mesaj ve eklerinin içeriği ile ilgili olarak şirketimizin herhangi  
bir hukuki sorumluluğu bulunmamaktadır. Şirketimiz mesajın ve  
bilgilerinin size değişikliğe uğrayarak veya geç ulaşmasından,  
bütünlüğünün ve gizliliğinin korunamamasından, virüs  
içermesinden ve bilgisayar sisteminize verebileceği herhangi bir  
zarardan sorumlu tutulamaz.


This message and attachments are confidential and intended for the  
individual(s) stated in this message. If you received this message  
in error, please immediately notify the sender and delete it from  
your system. Our company has no legal responsibility for the  
contents of the message and its attachments. Our company shall have  
no liability for any changes or late receiving, loss of integrity  
and confidentiality, viruses and any damages caused in anyway to  
your computer system.


Matthias Laug
Schillerstraße 36
10627 Berlin

Tel.: 0176 / 20 14 21 63
eMail: matthias.l...@gmail.com





[PHP] Re: Curl fiel Upload

2009-01-21 Thread Matthias Laug
thanks!

2009/1/21 Manuel Lemos mle...@acm.org

 Hello,

 on 01/20/2009 09:10 PM Matthias Laug said the following:
  I've got a problem using curl to upload a file. I want to send it to a
 form
  written with the Django Framework.
 
  Post Request are processed correctly, with one anomaly.
  This piece of code works fine
 
  curl_setopt($process, CURLOPT_POSTFIELDS, http_build_query($data));
 
  But if i provide only an array no data is send to the form
 
  curl_setopt($process, CURLOPT_POSTFIELDS, $data);
 
  I have read somewhere that curl sends formdata with
 enctype=form/mulitpart
  only if I provide an array not a string.
 
  If I add @filename to the $data variable (string or array) it does not
  send the file to the form.
 
  Each example I have found in the internet so far did not work.

 I do not use the Curl functions directly. When possible I use fsockopen
 as alternative and use this HTTP client class to submit any kind of HTTP
 requests. Take a look at the test_http_post.php to see how simple is to
 submit form with one or more file uploads.

 http://www.phpclasses.org/httpclient



 --

 Regards,
 Manuel Lemos

 Find and post PHP jobs
 http://www.phpclasses.org/jobs/

 PHP Classes - Free ready to use OOP components written in PHP
 http://www.phpclasses.org/




-- 
Matthias Laug
Schillerstr. 36
10627 Berlin
http://www.mconcepts-online.com/


[PHP] Curl fiel Upload

2009-01-20 Thread Matthias Laug
Hello everybody,

I've got a problem using curl to upload a file. I want to send it to a form
written with the Django Framework.

Post Request are processed correctly, with one anomaly.
This piece of code works fine

curl_setopt($process, CURLOPT_POSTFIELDS, http_build_query($data));

But if i provide only an array no data is send to the form

curl_setopt($process, CURLOPT_POSTFIELDS, $data);

I have read somewhere that curl sends formdata with enctype=form/mulitpart
only if I provide an array not a string.

If I add @filename to the $data variable (string or array) it does not
send the file to the form.

Each example I have found in the internet so far did not work.

Any support or idea?

Thanks for anything

Mattes