Current time: 06-17-2024, 12:50 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP 5.3 и ошибка 500
Author Message
anarking Offline
Junior Member
*

Posts: 29
Joined: Nov 2009
Reputation: 0
Post: #15
RE: PHP 5.3 и ошибка 500
any clues or things to look at? i can spend some time trying to fix it. it kind of looks like it is in how it gets the IDs from the database to choose where to put the uploaded file. one of the problems anyways...

i think in this section of software_upload.php, but i don't know the rest of the system well enough yet to figure it out...

Code:
if ($success == 1) {
        $user_id = $_SESSION['user_id'];
        $upload = 1;
        if($file == 0) {
            $fname = $_FILES['sw_file']['name'];
        } elseif($file == 1) {
            $fname = substr($_POST['sw_wget'], (strrpos($_POST['sw_wget'], '/')+1));
        }
        $filename = substr($fname, 0, -7);
        $extension = substr($fname, -7);
            $query="
                INSERT INTO
                    `web_software`
                (
                    `reseller_id`, `software_name`, `software_version`, `software_language`, `software_type`, `software_db`,
                    `software_archive`, `software_installfile`, `software_prefix`, `software_link`, `software_desc`, `software_status`
                ) VALUES (
                    ?, ?, ?, ?, ?, ?,
                    ?, ?, ?, ?, ?, ?
                )
            ";
        $rs = exec_query($sql, $query, array($user_id, "waiting_for_input", "waiting_for_input", "waiting_for_input", "waiting_for_input", "0", $filename, "waiting_for_input", "waiting_for_input", "waiting_for_input", "waiting_for_input", "toadd"));
        $sw_id = $sql->Insert_ID();
        if ($file == 0) {
            $dest_dir = $cfg->GUI_SOFTWARE_DIR.'/'.$user_id.'/'.$filename.'-'.$sw_id.$extension;
            if (!is_dir($cfg->GUI_SOFTWARE_DIR.'/'.$user_id)) {
                @mkdir($cfg->GUI_SOFTWARE_DIR.'/'.$user_id,0755,true);
            }

i think however it is getting the "user_id" is incorrect, wrong table/column, but I haven't found its origin yet
(This post was last modified: 08-29-2011 01:28 PM by anarking.)
08-29-2011 12:39 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
PHP 5.3 и ошибка 500 - DragonZX - 02-12-2011, 06:10 AM
RE: PHP 5.3 и ошибка 500 - beliy - 02-13-2011, 06:46 PM
RE: PHP 5.3 и ошибка 500 - DragonZX - 02-16-2011, 03:52 AM
RE: PHP 5.3 и ошибка 500 - webspy - 02-23-2011, 10:41 PM
RE: PHP 5.3 и ошибка 500 - DragonZX - 03-04-2011, 06:23 PM
RE: PHP 5.3 и ошибка 500 - DragonZX - 03-21-2011, 07:35 AM
RE: PHP 5.3 и ошибка 500 - Vrungel - 03-25-2011, 02:07 PM
RE: PHP 5.3 и ошибка 500 - DragonZX - 03-25-2011, 06:57 PM
RE: PHP 5.3 и ошибка 500 - rosibota - 03-25-2011, 02:34 PM
RE: PHP 5.3 и ошибка 500 - Vrungel - 03-30-2011, 04:49 PM
RE: PHP 5.3 и ошибка 500 - DragonZX - 03-30-2011, 06:43 PM
RE: PHP 5.3 и ошибка 500 - anarking - 08-29-2011, 05:24 AM
RE: PHP 5.3 и ошибка 500 - DragonZX - 08-29-2011, 06:31 AM
RE: PHP 5.3 и ошибка 500 - anarking - 08-29-2011 12:39 PM
RE: PHP 5.3 и ошибка 500 - DragonZX - 08-29-2011, 05:22 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)