Warning message

  • The subscription service is currently unavailable. Please try again later.
  • The subscription service is currently unavailable. Please try again later.

Php

Php usage

Showing the usage statistics and market share data of PHP on the web.
http://w3techs.com/technologies/details/pl-php/all/all

Downgrade to php 5.2

Posted by: 
Dominique De Cooman

Running cron from cli in drupal will result in.

PHP Warning:  include_once(): Failed opening './includes/bootstrap.inc'

Running cron from cli is useful when your behind external authentication and crontab is not available over http. Because normaly you would put something like:

0 * * * * wget --spider <a href="http://yoursite/cron.php
">http://yoursite/cron.php [/geshifilter-codes]

Posted by: 
Dominique De Cooman

In terminal:

First install libevent:

cd /usr/local/src/
wget <a href="http://monkey.org/~provos/libevent-1.3e.tar.gz
tar">http://monkey.org/~provos/libevent-1.3e.tar.gz
tar</a> zxpfv libevent*
cd libevent*
./configure
make install

Download and install memcached:

cd /usr/local/src/
wget <a href="http://www.danga.com/memcached/dist/memcached-1.2.4.tar.gz
tar">http://www.danga.com/memcached/dist/memcached-1.2.4.tar.gz
tar</a> zxpfv memcached*
cd memcached*
./configure
make install

Posted by: 
Dominique De Cooman

I was trying to post to a webservice and was getting the 60 error code: Peer certificate cannot be authenticated with known CA certificates. .
The webservice I was trying to reach was over https.
The solution is very simple.
You need to set curl not to verify the ssl peer. You can do this by setting an option.

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

Posted by: 
Dominique De Cooman

The whole thing did not work without this line.

ftp_pasv($conn_id, true);

Apparently with some ftp accounts you need to transfer in passive mode. As usual not documented by the client.

Subscribe to Php