Php

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 http://yoursite/cron.php

In terminal:

First install libevent:

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

Download and install memcached:

cd /usr/local/src/
wget http://www.danga.com/memcached/dist/memcached-1.2.4.tar.gz
tar zxpfv memcached*
cd memcached*
./configure
make install

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);

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.

The full excerpt:

<?php
function exporter_vdab_ftp($file_path,$file_name) {
  
// set up basic connection
  
$file $file_path '/'.$file_name;
  
$ftp_server VDAB_FTP_SERVER;?>

Syndicate content