valeryan
Hi,
I try to host my wiki on 110mb but does not manage to make it work properly.
The host is setting php safe_mode :
safe_mode On On
safe_mode_exec_dir no value no value
safe_mode_gid Off
So I set the php_safe_mode option to solve the creating file in the cache problem.
Now I encounter another problem : I've got the ftp error "FTP connection failed" whereas my information seems to be correct (maybe except the root directory).How can I check if the ftp connection is OK ? ? Where a the log file is there is one ?
Yann
valeryan
I tried the following php scritp which works whereas I still have my "ftp connection" error with the safe_mode :-( :
<?php
// set up basic connection
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// check connection
if ((!$conn_id) || (!$login_result)) {
echo "FTP connection has failed!";
echo "Attempted to connect to $ftp_server for user $ftp_user_name";
exit;
} else {
echo "Connected to $ftp_server, for user $ftp_user_name";
}
// upload the file
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}
// close the FTP stream
ftp_close($conn_id);
?>
valeryan
I made a bit of debug.
My problem comes from this call in io.php and I don't know why (due to my previous test which is ok) :
$conn = @ftp_connect($conf['ftp']['host'],$conf['ftp']['port'],10);
if(!$conn){
msg("FTP connection failed for ",-1);
return false;
}
Thks for your help!
Yann
andi
Try removing the @ in the connect call and see if you get any errors.
valeryan
I tried this and it did not work.
I even tried to copy/paste the working code in the io.php file and it neither worked!! :'(
valeryan
I changed my hosting solution but the problem is still there.
Nobody tried to host his wiki on 110mb ? At least you'll know you may encouter some troubles
Yann