Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CharlieS

Pages: [1]
1
EDIT: Thanks, I actually realized that when I was saving a file on my computer to upload it wasn't overriding the old one, stupid me. Works now :)

2
OK, but now I get this error:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /hsphere/local/home/allalias/allalias.net/includes/db_mysql.php on line 39

DB Error: Could not connect to the database server (, ).

NOTE: I first tried localhost as the dbhost but it didn't allow it, so I switched to the IP, and it "worked", but I got the above error.

3
I think so - they claim they do :?
EDIT: OK, nevermind, my host had the default PHP setting to off, didn't notice at first.

4
I did that and then uploaded the files and when I go to the page I get this:

Quote
template_extension)) { $template = ""; } else { $main_template = $template; } } else { $template = ""; } include(ROOT_PATH.'includes/page_header.php'); if (!empty($template)) { $clickstream = "url(ROOT_PATH."index.php")."\">".$lang['home']."".$config['category_separator'].str_replace("_", " ", ucfirst($template)); $site_template->register_vars("clickstream", $clickstream); $site_template->print_template($site_template->parse_template($main_template)); include(ROOT_PATH.'includes/page_footer.php'); } //----------------------------------------------------- //--- Show Categories --------------------------------- //----------------------------------------------------- $categories = get_categories(0); if (!$categories) { $categories = $lang['no_categories']; } $site_template->register_vars("categories", $categories); unset($categories); //----------------------------------------------------- //--- Show New Images --------------------------------- //----------------------------------------------------- $imgtable_width = ceil(intval($config['image_table_width']) / $config['image_cells']); if ((substr($config['image_table_width'], -1)) == "%") { $imgtable_width .= "%"; } $additional_sql = ""; if (!empty($additional_image_fields)) { foreach ($additional_image_fields as $key => $val) { $additional_sql .= ", i.".$key; } } $num_new_images = $config['image_cells']; $sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")." FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (".get_auth_cat_sql("auth_viewcat").") ORDER BY i.image_date DESC LIMIT $num_new_images"; $result = $site_db->query($sql); $num_rows = $site_db->get_numrows($result); if (!$num_rows) { $new_images = "
"; $new_images .= $lang['no_new_images']; $new_images .= "
"; } else { $new_images = "
"; $count = 0; $bgcounter = 0; while ($image_row = $site_db->fetch_array($result)){ if ($count == 0) { $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2; $new_images .= "
\n"; } $new_images .= "
\n"; $count++; if ($count == $config['image_cells']) { $new_images .= "
\n"; $count = 0; } } // end while if ($count > 0) { $leftover = ($config['image_cells'] - $count); if ($leftover >= 1) { for ($f = 0; $f < $leftover; $f++) { $new_images .= "
\n"; } $new_images .= "
\n"; } } $new_images .= "
\n"; show_image($image_row); $new_images .= $site_template->parse_template("thumbnail_bit"); $new_images .= "\n
\n \n
\n"; } // end else $site_template->register_vars("new_images", $new_images); unset($new_images); //----------------------------------------------------- //--- Print Out --------------------------------------- //----------------------------------------------------- $site_template->register_vars(array( "msg" => $msg, "clickstream" => $clickstream )); $site_template->print_template($site_template->parse_template($main_template)); include(ROOT_PATH.'includes/page_footer.php'); ?>


and in install.php

Quote
$val) { $array[$key] = (is_array($val)) ? addslashes_array($val) : addslashes($val); } return $array; } if (get_magic_quotes_gpc() == 0) { $HTTP_GET_VARS = addslashes_array($HTTP_GET_VARS); $HTTP_POST_VARS = addslashes_array($HTTP_POST_VARS); $HTTP_COOKIE_VARS = addslashes_array($HTTP_COOKIE_VARS); } if (@file_exists(ROOT_PATH."config.php")) { @include(ROOT_PATH.'config.php'); } if (defined("4IMAGES_ACTIVE")) { header("Location: index.php"); exit; } if (isset($HTTP_GET_VARS['action']) || isset($HTTP_POST_VARS['action'])) { $action = (isset($HTTP_GET_VARS['action'])) ? stripslashes(trim($HTTP_GET_VARS['action'])) : stripslashes(trim($HTTP_POST_VARS['action'])); } else { $action = ""; } if ($action == "") { $action = "intro"; } $lang_select = ""; $folderlist = array(); $handle = opendir(ROOT_PATH."lang"); while ($folder = @readdir($handle)) { if (@is_dir(ROOT_PATH."lang/$folder") && $folder != "." && $folder != "..") { $folderlist[] = $folder; } } sort($folderlist); for($i = 0; $i < sizeof($folderlist); $i++) { $lang_select .= " ".$folderlist[$i]." \n"; } closedir($handle); if (isset($HTTP_GET_VARS['install_lang']) || isset($HTTP_POST_VARS['install_lang'])) { $install_lang = (isset($HTTP_GET_VARS['install_lang'])) ? trim($HTTP_GET_VARS['install_lang']) : trim($HTTP_POST_VARS['install_lang']); } if (empty($install_lang) || !in_array($install_lang, $folderlist)) { $install_lang = "deutsch"; } $lang = array(); include(ROOT_PATH.'lang/'.$install_lang.'/install.php'); $db_servertype = (isset($HTTP_POST_VARS['db_servertype'])) ? trim($HTTP_POST_VARS['db_servertype']) : "mysql"; $db_host = (isset($HTTP_POST_VARS['db_host'])) ? trim($HTTP_POST_VARS['db_host']) : ""; $db_name = (isset($HTTP_POST_VARS['db_name'])) ? trim($HTTP_POST_VARS['db_name']) : ""; $db_user = (isset($HTTP_POST_VARS['db_user'])) ? trim($HTTP_POST_VARS['db_user']) : ""; $db_password = (isset($HTTP_POST_VARS['db_password'])) ? trim($HTTP_POST_VARS['db_password']) : ""; $table_prefix = (isset($HTTP_POST_VARS['table_prefix'])) ? trim($HTTP_POST_VARS['table_prefix']) : "4images_"; $admin_user = (isset($HTTP_POST_VARS['admin_user'])) ? trim($HTTP_POST_VARS['admin_user']) : ""; $admin_password = (isset($HTTP_POST_VARS['admin_password'])) ? trim($HTTP_POST_VARS['admin_password']) : ""; $admin_password2 = (isset($HTTP_POST_VARS['admin_password2'])) ? trim($HTTP_POST_VARS['admin_password2']) : ""; include(ROOT_PATH.'includes/constants.php'); if ($action == "downloadconfig") { header("Content-Type: text/x-delimtext; name=\"config.php\""); header("Content-disposition: attachment; filename=config.php"); $config_file = stripslashes(trim($HTTP_POST_VARS['config_file'])); echo $config_file; exit; } ?>

$val) { $lang[$key] = sprintf("%s *", $lang[$key]); } $action = "intro"; } else { ?>
connection) { $error_log[] = "No connection to database!"; } $site_db->no_error = 1; include(ROOT_PATH.'includes/db_utils.php'); $db_file = ROOT_PATH.DATABASE_DIR."/default/".strtolower($db_servertype)."_default.sql"; $cont = @fread(@fopen($db_file, 'r'), @filesize($db_file)); if (empty($cont)) { $error_log[] = "Could not load: ".$db_file; } if (empty($error_log)) { $cont = preg_replace('/4images_/', $table_prefix, $cont); $pieces = split_sql_dump($cont); for ($i = 0; $i < sizeof($pieces); $i++) { $sql = trim($pieces[$i]); if (!empty($sql) and $sql[0] != "#") { if (!$site_db->query($sql)) { $error_log[] = $sql; } } } $admin_pass_md5 = md5($admin_password); $current_time = time(); $sql = "UPDATE ".$table_prefix."users SET user_name = '$admin_user', user_password = '$admin_pass_md5', user_lastaction = $current_time, user_lastvisit = $current_time WHERE user_name = 'admin'"; if (!$site_db->query($sql)) { $error_log[] = $sql; } $sql = "UPDATE ".$table_prefix."settings SET setting_value = '$install_lang' WHERE setting_name = 'language_dir'"; if (!$site_db->query($sql)) { $error_log[] = $sql; } } if (empty($error_log)) { $config_file = ''; @umask(0111); $fp = @fopen('./config.php', 'w'); $ok = @fwrite($fp, $config_file); if (!$ok) { $cant_write_config = 1; } @fclose($fp); $msg = "

".$lang['install_success'].""; if (!isset($cant_write_config)) { $msg .= "

".$lang['install_success_login']; } else { $msg .= "

".$lang['config_download_desc']; $msg .= ''; $msg .= ''; } $msg .= "
"; } else { $msg = $lang['database_error']; $error_msg .= "
"; foreach ($error_log as $val) { $error_msg .= sprintf("
%s
", $val); } $error_msg .= "
"; } ?>


"; $db_types = array("mysql"); $handle = opendir(ROOT_PATH."includes"); while ($file = @readdir($handle)) { if (preg_match("/db_(.*)\.php/", $file, $regs)) { if ($regs[1] != "mysql" && file_exists(ROOT_PATH."data/database/default/".$regs[1]."_default.sql")) { $db_types[] = $regs[1]; } } } foreach ($db_types as $db_type) { $db_servertype_select .= "".$db_type.""; } $db_servertype_select .= ""; if (!empty($error)) { $lang['start_install_desc'] = $lang['start_install_desc'].sprintf("

%s *", $lang['lostfield_error']); } ?>


 

 

 

 

 

 

 

 
 

Powered by 4images
Copyright © 2002 4homepages.de

5
Discussion & Troubleshooting / Thumbnails [imagemagick]
« on: December 07, 2002, 10:26:14 PM »
I don't understand how you install ImageMagicK - I uploaded everything in ASCII and set the server path to the folder but it won't work. Help?

Thanks

You can also email me at charlie@allalias.com or catch me on AIM charliecss

Pages: [1]