Last friday, after updating from PHP 5.5.6 to PHP 5.5.7, Pydio (formerly AjaXplorer) wasn’t working anymore.
I’m using nginx 1.4.4 + PHP 5.5.7 and when I tried to open Pydio I only got 502 Bad Gateway or the following error:
2013/12/13 12:40:24 [error] 21628#0: *85 FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to a member function cloneNode() on a non-object in /var/www/site.nl/core/classes/class.AJXP_Plugin.php on line 276" while reading response header from upstream, client: 193.x.x.x, server: site.nl, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "site.nl"
I have been searching for a solution for hours, but even installing a fresh copy of Pydio wouldn’t work (I couldn’t get to the installer page, same error).
After a long time searching on Google and the PHP changelog I asked for help on the Pydio forums. Someone told me to downgrade PHP, but that’s the last thing I would try.
Pydio still didn’t work after trying many things. Then, after looking at the PHP changelog again, I disabled PHP’s built-in opcache, and Pydio was working again!
So, if you have the same problem, just disable PHP’s built-in opcache. I don’t know if this is a bug in PHP or Pydio, but I’ll just try to enable opcache again in PHP 5.5.8.
Update 08-02-2014 – It seems to work normally again with PHP 5.5.9 (changelog).
Today I made a new PHP script using the TransIP API to update DNS entries. This way it’s possible to automatically update your (dynamic) home IP address for example.
To use this script you need a server with a static IP address and PHP support. If you don’t have a server with a static IP address, free hosting will do the job.
Follow these steps to install this script:
- Download the TransIP API to your server
- Go to the TransIP CP (My account > API settings)
- Enable the API and add your server’s IP address to the list
- Add a new Key Pair and copy the key to your clipboard
Transip/ApiSettings.php and set
$privateKey (the key you just copied)
Alternatively you can set this in the script itself, see this comment
- Download the script below to your server (
- Edit the settings in
dns.php (domain, key, and records to update)
This key is used to identify the client, this way the DNS won’t be updated with the IP address of someone else
Do NOT use the same key as your TransIP API key, the use of a 25 characters long A-Z a-z 0-9 key is recommended
- Now, on the client, access
dns.php on the server to update the DNS entries
On Linux you can create a cronjob with the following command (don’t forget to replace the key):
wget --spider http://example.com/dns.php?key=69l67Le20e819360d3YHO1175
You’re done. You can test if the script works by openening the URL in your browser and then check if the values are updated in the TransIP CP.
// The domain to edit
// The authentication key
// The DNS entries to update (name => content)
// This script will NOT add new entries
$newValues = [
'www' => $_SERVER['REMOTE_ADDR'],
// Exit if the key does not match
if($_GET['key'] != KEY) exit();
// Include the required files from the API
// Get the current DNS entries from TransIP
$dnsEntries = Transip_DomainService::getInfo(DOMAIN)->dnsEntries;
// Check every DNS entry
foreach($dnsEntries as $dnsEntry)
// Check if the entry has to be updated and update it
if(array_key_exists($dnsEntry->name, $newValues)) $dnsEntry->content = $newValues[$dnsEntry->name];
// Commit the changes to the TransIP DNS servers
echo 'DNS updated.';
// An error occured
echo 'DNS not updated. ' . $f->getMessage();
When using phpMyAdmin earlier today I noticed it was connected to MySQL through an UNIX socket.
UNIX sockets are faster than TCP/IP connections and if there is an UNIX socket and a TCP/IP connection available the UNIX socket should be selected by default (when using localhost as host).
However, how can you be sure this is the case?
If you only use your MySQL server locally you can force MySQL to only create a UNIX socket by adding
skip-networking to your my.cnf
. I also commented out
bind-address = 127.0.0.1, just in case.
Restart your MySQL server and check if MySQL is not listening on TCP/IP anymore by executing
Now check if all your websites/applications can still access your MySQL server and you’re done.