Author Topic: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)  (Read 29176 times)

0 Members and 1 Guest are viewing this topic.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Hi,

I code new MOD-Plugin for ACP. Admin add SQL file in form and submit. SQL file is use for SQL command.
After upload file, file is delete auto.

So, if install MOD from someone and need to add SQL command - no more need for phpmyadmin. You can use from ACP. ;)
Note: Always use 4images_ for prefix. No matter if is no same for gallery you use (in publish MOD) - MOD is detect for right prefix use. This is test in 4images v1.74. ;)

// Step 1

In includes/constants.php file,

find:

Quote
define('DATABASE_DIR', 'data/database');

add after:

Code: [Select]
define('SQL_PATCHES_DIR', 'data/sql_patches');

// Step 1.1

In data folder, create folder: sql_patches . Set CHMOD 777 for write.

// Step 2

In lang/english/admin.php file,

find:

Quote
$lang['save_settings_success'] = "Settings saved";

add after:

Code: [Select]
//-----------------------------------------------------
//--- SQL Patches -------------------------------------
//-----------------------------------------------------
$lang['sql_patches_title'] = "SQL Patches";
$lang['sql_patches_could_not_load_message'] = "Could not load: ";
$lang['sql_patches_success_install'] = "<font color=\"green\">Success !</font> - <b>{success_install_file}</b> file has just been added into the database.";
$lang['sql_patches_select_sql_file'] = "<b>Select SQL file:</b> ";
$lang['sql_patches_go_back'] = "<span class=\"smalltext\">[ Go back ]</a>";
$lang['sql_patches_backup_database_message'] = "<span class=\"smalltext\">Use <b>Backup database</b> link first !</span>";
$lang['sql_patches_expert_add_command'] = "<span class=\"smalltext\">Add SQL command here:</span>";
$lang['sql_patches_expert_success_install'] = "<font color=\"green\">Done !</font>";
$lang['sql_patches_expert_mode_link'] = "[ Expert mode ]";

// Step 3

In admin/plugins folder, create file: sql_patches.php .

Add:

Code: [Select]
<?php // PLUGIN_TITLE: SQL Patches

$nozip 1;
define('IN_CP'1);
define('ROOT_PATH'"./../../");
require(
ROOT_PATH.'admin/admin_global.php');

show_admin_header();

if (
$action == "") {
    
$action "show_sql_patches";
}

if (
$action == "exec_sql_patches") {
    
    if (isset(
$HTTP_POST_FILES['sql_file']['tmp_name'])) {
        
$HTTP_POST_FILES['sql_file']['tmp_name'] = (stripslashes(trim($HTTP_POST_FILES['sql_file']['tmp_name'])));                
    }   
        
        if (!isset(
$HTTP_POST_FILES['sql_file']['tmp_name']) || empty($HTTP_POST_FILES['sql_file']['tmp_name'])) {            
            
$action "show_sql_patches";
        }
        
        if (!
preg_match("/\.sql$/"$HTTP_POST_FILES['sql_file']['name'])) {
            
unlink ($HTTP_POST_FILES['sql_file']['tmp_name']);
            unset (
$HTTP_POST_FILES['sql_file']['tmp_name']);
            
$action "show_sql_patches";
        }
        
        if (isset(
$HTTP_POST_FILES['sql_file']['tmp_name']) && !empty($HTTP_POST_FILES['sql_file']['tmp_name']) && $HTTP_POST_FILES['sql_file']['error'] == && preg_match("/\.sql$/"$HTTP_POST_FILES['sql_file']['name'])) {
            
            if (@
file_exists($HTTP_POST_FILES['sql_file']['tmp_name'])) {
                @
move_uploaded_file($HTTP_POST_FILES['sql_file']['tmp_name'], ROOT_PATH SQL_PATCHES_DIR "/" $HTTP_POST_FILES['sql_file']['name']);
            }
            
            include(
ROOT_PATH.'includes/db_utils.php');
            
            
$db_file ROOT_PATH SQL_PATCHES_DIR "/" get_file_name(basename($HTTP_POST_FILES['sql_file']['name']));
            
$cont = @fread(@fopen($db_file'r'), @filesize($db_file));
            if (empty(
$cont)) {
                
$error_log[] = $lang['sql_patches_could_not_load_message'] . $db_file;
            }
            
            
$flag false;
            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;
                            
$flag false;
                        } else {
                            
$flag true;                            
                        }
                    }            
                }
            }
        
        if (
$flag == true) {
            
?>

            <table border="0" width="100%" cellpadding="0" cellspacing="0">
            <tr>
            <td width="100%">    
            <table border="0" width="100%" cellpadding="0" cellspacing="0">
            <tr>
            <td width="100%" class="tableheader" />&nbsp;<?php echo $lang['sql_patches_title']; ?></td>
            </tr>
            <tr>
            <td width="100%" class="tablerow" /><a href="<?php echo $site_sess->url("sql_patches.php"); ?>" class="link" /><?php echo $lang['sql_patches_go_back']; ?></a></td>
            </tr>
            <tr>
            <td width="100%" class="tablerow" />&nbsp;</td>
            </tr>
            <tr>
            <td width="100%" align="center" class="tablerow" /><?php echo str_replace("{success_install_file}"format_text(trim($HTTP_POST_FILES['sql_file']['name']), 2), $lang['sql_patches_success_install']); ?></td>
            </tr>
            <tr>    
            <td width="100%" class="tablerow" />&nbsp;</td>
            </tr>
            <tr>
            <td width="100%" class="tableheader" />&nbsp;</td>
            </tr>    
            </table>    
            </td>            
            </tr>
            </table>
            <?php
            
@unlink(ROOT_PATH SQL_PATCHES_DIR $HTTP_POST_FILES['sql_file']['name']);
        
        } elseif (
$flag == false) {
            
            if (isset(
$error_log) && is_array($error_log) && !empty($error_log)) {
                foreach (
$error_log as $key => $val) {
                    echo 
$val "<br />";
                }
                
$action "show_sql_patches";
            }            
        }        
    }
}

if (
$action == "exec_sql_expert_patches") {
    
    if (isset(
$HTTP_POST_VARS['add_sql_expert_patches'])) {
        
$add_sql_expert_patches = (isset($HTTP_POST_VARS['add_sql_expert_patches'])) ? un_htmlspecialchars(trim((string)$HTTP_POST_VARS['add_sql_expert_patches'])) : "";
    } else {
        
$add_sql_expert_patches "";
    }
    
    if (!isset(
$add_sql_expert_patches) || empty($add_sql_expert_patches)) {
        
$action "show_sql_expert_patches";
    }
    
    if (isset(
$add_sql_expert_patches) && !empty($add_sql_expert_patches)) {        
        
        if (!
function_exists('check_sql_queries')) {
            function 
check_sql_queries($add_sql_expert_patches) {
                global 
$site_db$table_prefix$valid$split_sql_queries;  
                if (!isset(
$split_sql_queries)) {
                    
$ids trim($add_sql_expert_patches);                    
                    
$ids preg_replace("/[\n\r]/is"" "$ids);
                    
//$ids = str_replace(",", " ", $ids);
                    
$ids preg_quote($ids);
                    
$ids str_replace('/''\\/'$ids);                    
                    
$split_sql_queries preg_split("/\s+/"$ids);
                }
                
$valid true;
                foreach (
$split_sql_queries as $key => $val) {            
                    if (
$val == "CREATE" || $val == "ALTER" || $val == "DROP" || $val == "DELETE" || $val == "UPDATE" || $val == "REPLACE" || $val == "INSERT") {
                        
$val preg_replace("/4images_/"$table_prefix$val);                                                                      
                        if (!
$site_db->query(stripslashes(stripslashes($ids)))) {
                            
$valid false;
                            break;
                        }
                    }                    
                }        
            }
        }
        
        
check_sql_queries($add_sql_expert_patches);
        
        if (
$valid == true) {
            
?>

            <table border="0" width="100%" cellpadding="0" cellspacing="0">
            <tr>
            <td width="100%">    
            <table border="0" width="100%" cellpadding="0" cellspacing="0">
            <tr>
            <td width="100%" class="tableheader" />&nbsp;<?php echo $lang['sql_patches_title']; ?></td>
            </tr>
            <tr>
            <td width="100%" class="tablerow" /><a href="<?php echo $site_sess->url("sql_patches.php"); ?>" class="link" /><?php echo $lang['sql_patches_go_back']; ?></a></td>
            </tr>
            <tr>
            <td width="100%" class="tablerow" />&nbsp;</td>
            </tr>
            <tr>
            <td width="100%" align="center" class="tablerow" /><?php echo $lang['sql_patches_expert_success_install']; ?></td>
            </tr>
            <tr>    
            <td width="100%" class="tablerow" />&nbsp;</td>
            </tr>
            <tr>
            <td width="100%" class="tableheader" />&nbsp;</td>
            </tr>    
            </table>    
            </td>            
            </tr>
            </table>
            <?php            
        
        
} elseif ($valid == false) {
            
$action "show_sql_expert_patches";            
        }
    }
}

if (
$action == "show_sql_expert_patches") {    
    
?>

    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%">
    <form action="<?php echo $site_sess->url("sql_patches.php"); ?>" method="post">
    <input type="hidden" name="action" value="exec_sql_expert_patches">
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" class="tableheader" />&nbsp;<?php echo $lang['sql_patches_title']; ?></td>
    </tr>
    <tr>
    <td width="100%" class="tablerow" /><a href="<?php echo $site_sess->url("sql_patches.php"); ?>" class="link" /><?php echo $lang['sql_patches_go_back']; ?></a></td>
    </tr>
    </table>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" align="center" class="tablerow" />&nbsp;</td>
    </tr>
    </table>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" align="center" class="tablerow" />
    <?php echo $lang['sql_patches_expert_add_command']; ?><br />
    <textarea name="add_sql_expert_patches" rows="20" cols="60" class="textarea" /></textarea><br /><br />
    <input type="submit" name="submit" value="<?php echo $lang['submit']; ?>" class="button" />
    </form>    
    </td>
    </tr>
    <tr>
    <td width="100%" align="center" class="tablerow" />&nbsp;</td>
    </tr>
    <tr>
    <td width="100%" align="center" class="tablerow" /><?php echo $lang['sql_patches_backup_database_message']; ?></td>
    </tr>
    <tr>
    <td width="100%" align="center" class="tablerow" />&nbsp;</td>
    </tr>
    <tr>
    <td width="100%" align="center" class="tableheader" />&nbsp;</td>
    </tr>    
    </table>
    </form>
    </td>
    </tr>
    </table>
    <?php    
}

if (
$action == "show_sql_patches") {
    
?>

    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%">
    <form action="<?php echo $site_sess->url("sql_patches.php"); ?>" method="post" enctype="multipart/form-data">
    <input type="hidden" name="action" value="exec_sql_patches">
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" class="tableheader" />&nbsp;<?php echo $lang['sql_patches_title']; ?></td>
    </tr>
    </table>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" align="right" class="tablerow" /><a href="<?php echo $site_sess->url("sql_patches.php?action=show_sql_expert_patches"); ?>" class="link" /><?php echo $lang['sql_patches_expert_mode_link']; ?></a>&nbsp;</td>
    </tr>
    </table>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" align="center" class="tablerow" />&nbsp;</td>
    </tr>
    </table>
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" align="center" class="tablerow" /><?php echo $lang['sql_patches_select_sql_file']; ?><input type="file" name="sql_file" class="input" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="submit" value="<?php echo $lang['submit']; ?>" class="button" /></td>
    </tr>
    <tr>
    <td width="100%" align="center" class="tablerow" />&nbsp;</td>
    </tr>
    <tr>
    <td width="100%" align="center" class="tablerow" /><?php echo $lang['sql_patches_backup_database_message']; ?></td>
    </tr>
    <tr>
    <td width="100%" align="center" class="tablerow" />&nbsp;</td>
    </tr>
    <tr>
    <td width="100%" align="center" class="tableheader" />&nbsp;</td>
    </tr>    
    </table>
    </form>
    </td>
    </tr>
    </table>
    <?php    
}

show_admin_footer();
?>


// Step 4

In includes/db_utils.php file,

find:

Quote
if (preg_match("/^CREATE/i", $line)) {

replace:

Code: [Select]
if (preg_match("/^CREATE/i", $line) || preg_match("/^ALTER/i", $line) || preg_match("/^INSERT/i", $line) || preg_match("/^UPDATE/i", $line) || preg_match("/^REPLACE/i", $line) || preg_match("/^DELETE/i", $line) || preg_match("/^DROP/i", $line)) {

// Step 5

Install this:

http://www.4homepages.de/forum/index.php?topic=19287.0

From step 3 - find:

Quote
if (!isset($add_sql_expert_patches) || empty($add_sql_expert_patches)) {
    $action = "show_sql_expert_patches";
}

add after:

Code: [Select]
if (function_exists('check_post_comment_valid_chars') && !check_post_comment_valid_chars($add_sql_expert_patches)) {
    $action = "show_sql_expert_patches";
}

Go in ACP - > SQL Patches link (in plugins tab) - and

Tala ! 8)

Again - is test in 4images v1.74 .
« Last Edit: August 27, 2011, 02:29:34 PM by thunderstrike »
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #1 on: November 02, 2007, 11:06:22 AM »
hi thunderstrike,
nice mod

but whatfor is "browse" for file when file have to be in folder /data/sql_patches/  ?
Quote
Could not load: ./../../data/sql_patches/test.sql

moving thread to releases.
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #2 on: November 02, 2007, 11:24:03 AM »
I no can create problem now but see before...

If have problem with path :

1 - You need edit: ROOT_PATH in file.
2 - You need set CHMOD 777 to sql_patches folder in data.

Is how I fix ...

3 - You move this MOD to release but no sticky (same for other MOD I post :!:)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #3 on: November 02, 2007, 12:57:14 PM »
okay...
on a linux machine that works fine.
on the windows machine error will be produced.. but no matter..

your post is now sticked, like all others..
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #4 on: November 02, 2007, 10:15:36 PM »
Ok - I check for windows problem with path later.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #5 on: November 02, 2007, 10:58:51 PM »
Ok - I edit code for step 3. Try to see if work.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #6 on: November 04, 2007, 07:35:16 AM »
Hi thunderstrike,

nice plugin for user without experiences  :wink:

One question:
Is it possible to work in your plugin also with a form and submit button, where i put the code in?
Like:
Code: [Select]
ALTER TABLE 4images_images ADD image_colorsearch_colors text;
ALTER TABLE 4images_wordmatch ADD colorsearch_colors_match TINYINT(1) DEFAULT '0' NOT NULL;


Kurt

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #7 on: November 04, 2007, 12:29:11 PM »
Well ... is same for enter ALTER command in SQL file and upload file. Correct ? ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #8 on: November 04, 2007, 12:34:47 PM »
yes,

but more steps for users without experiences...

Kurt

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #9 on: November 04, 2007, 12:38:46 PM »
Quote
but more steps for users without experiences...

And plugin is for easy task. If someone need help with command, I post (or other user welcome) and user paste in SQL file and upload file to server.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #10 on: November 04, 2007, 12:41:49 PM »
Thanks.

When i have more time, i code a addon to your plugin :wink:

Kurt

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #11 on: November 04, 2007, 01:26:57 PM »
For security - I post expert mode. I finish code now. Please do full step again (and is same rule for prefix - no use PHP define - is no work - use always 4images_ with table in code - Jan code convert to real prefix).

I fix step 3 for universal text.
I fix step 4 for SQL command match.
I add step 5 (for security).
« Last Edit: November 04, 2007, 01:43:41 PM by thunderstrike »
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Mr_LovaLove

  • Full Member
  • ***
  • Posts: 233
  • Unkown
    • View Profile
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #12 on: January 05, 2008, 04:04:18 PM »
Warning: main(./includes/functions.php) [function.main]: failed to open stream: No such file or directory in /home/alwasmy/public_html/143/image/global.php on line 132

and this is the line 132: include_once(ROOT_PATH.'includes/functions.php');

Warning: main() [function.include]: Failed opening './includes/functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/alwasmy/public_html/143/image/global.php on line 132

this is line 132: include_once(ROOT_PATH.'includes/functions.php');

Fatal error: Call to undefined function: get_basefile() in /home/alwasmy/public_html/143/image/global.php on line 327

this is line 327:   $url = get_basefile(getenv("HTTP_REFERER"));

i got this ??/

is this caused coz i integrated my site with vb

English Please :@

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #13 on: January 05, 2008, 05:02:49 PM »
Quote
is this caused coz i integrated my site with vb

1 - I no try integrate VB but, yes, is possible for problem of functions.php for no include right from global.php file ...
2 - Check in includes/functions.php file exist ... error is say: failed to open stream . Is mean - file no exist (or no found from ROOT_PATH).
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [MOD-Plugin] - SQL Patches - Add SQL file in ACP (for patch and MODs)
« Reply #14 on: February 18, 2008, 06:08:34 PM »
V2.0 publish (for expert mode). Replace step 3 (plugin file). Finish. ;)

// Description:

- Is check multiple line for SQL query (for one query) - e.g: CREATE TABLE.
- Is work windows and linux.
- Remove unlink for expert mode. No need.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?