Временная папка отсутствует в codeigniter

Я использую Codeigniter 3
и загружать файл, используя библиотеку загрузки в CodeIgniter, всякий раз, когда я загружаю файл, который он мне дает The temporary folder is missing,
Я смущаюсь, почему он выдает мне эту ошибку, потому что я загрузил свой проект на сервер, он отлично работает на этом сервере, но когда я загружаю те же файлы на другой сервер, он выдает мне эту ошибку, я не понимаю, почему.
Вот мой код

HTML

<div class="storecreatewrapper">
<div class="toptext">
<div class="container">
<div class="row">
<div class="col-md-12">
<p>Let's build your store at <span><?php echo PROJECT;?>!</span></p>
</div>
</div>
</div>
</div>
<div class="formwrapper">
<form action="<?php echo site_url('shop/addshop')?>" enctype="multipart/form-data" method="post" accept-charset="utf-8" id="adsp_09">
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="mianstoreform">
<div class="row">
<div class="col-md-12">
<div class="formtopimg">
<img src="<?php echo base_url('assets/images/logos/storepic.png') ?>" >
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="mainbasictxt">
<div class="bsichr"></div>
<div class="basictxt">
<p>Basic Shop Information</p>
</div>
</div>
<div class="form-group">
<?php c_error();?>
</div>
</div>
</div>
<div class="stformfields">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>Shop Name <span class="red">*</span></label>
<?php
$shopname = array(
'class' => 'form-control',
'id' => 'shopname',
'placeholder' => 'Shop Name',
'name'=>'shopname'
);
echo form_input($shopname);
?>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>Shop URL <span class="red">*</span></label>
<?php
$shopurl = array(
'class' => 'form-control',
'id' => 'fohopurl',
'name'=>'shpurl',
'placeholder' => 'Shop URL: www.'.PROJECT.'.com/shops/URL'
);
echo form_input($shopurl);
?>
</div>
</div>
</div>
</div>
<div class="custmhr"></div>
<div class="row">
<div class="col-md-12">
<div class="mainbasictxt">
<div class="bsichr"></div>
<div class="basictxt">
<p>Account Verification Detail</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="frmrads">
<div class="pull-left cusradhead">
Account Type:
</div>
<div class="pull-left">
<div class="radio">
<label>
<input class="act_9" type="radio" name="at" id="individual" value="individual" checked>
Individual Professional.
</label>
</div>
<div class="radio">
<label>
<input  class="act_9" type="radio" name="at" id="business" value="business">
Business (Selling On Behalf of a Business Entity).
</label>
</div>

</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="documtslt">
<div class="row">
<div class="col-sm-10 lftcolset">
<div class="form-group">
<select name="dcname" id="dcm_67">
<option selected="select">
Document (Please Select)
</option>
<option value="national id">National ID</option>
<option value="passport">Passport</option>
</select>
</div>
</div>
<div class="col-sm-2 rytcolset">
<input id="file-upload" type="file" name="ushplg" style="display:none"/>
<button type="button"  id="upfile1" class="btn cutsltbtn" for="file-upload">Image</button>
</div>
</div>
</div>
</div>
</div>
<div class="docfrmffl">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<?php
$shopurl = array(
'class' => 'form-control',
'id' => 'document_id',
'placeholder' => 'Document ID',
'name'=>'document_id'
);
echo form_input($shopurl);
?>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<p class="notetxt">
Note: English (a-z,A-Z), digits(0-9), - , spaces.
</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<?php
$shopurl = array(
'class' => 'form-control expiry_date',
'id' => 'datepicker',
'placeholder' => 'Expiry Date',
'name'=>'expiry_date'
);
echo form_input($shopurl);
?>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<p class="notetxt">
Note: JPEG, PNG or PDF only and 2MB file size.
</p>
</div>
</div>
</div>
<div class="custmhr"></div>

<div class="row">
<div class="col-md-12">
<div class="mainbasictxt">
<div class="bsichr"></div>
<div class="basictxt">
<p>Order Pickup Location</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="frmrads">
<div class="pull-left">
<?php if(is_logedin()): //if logedin ?>
<?php if(
$this->session->userdata('city_id') && $this->session->userdata('area_id') && $this->session->userdata('direction')
):
?>
<div class="radio">
<label>
<input class="loc_09" type="radio" name="location" id="shipping" value="shipping" checked>
Same as my shipping address
</label>
</div>
<?php else: // if loggedin and city area and direction not found. ?>
<div class="radio">
<label>
<input class="loc_09" type="radio" name="location" id="new_address" value="new_address" checked>
Register a new address
</label>
</div>
<?php endif; //checking if shipping addres set or not..?>
<?php else: ?>
<div class="radio">
<label>
<input class="loc_09" type="radio" name="location" id="new_address" value="new_address" checked>
Register a new address
</label>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="locations">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>City <span class="red">*</span></label>
<select  name="city" class="city_9 sada" disabled>
<option  value="none" selected="select">City</option>
<?php if($cities->num_rows() > 0):
foreach ($cities->result() as $city):
?>
<option value="<?php echo $city->c_id ?>">
<?php echo $city->city_name ?></option>
<?php endforeach;?>
<?php endif;  ?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>Area <span class="red">*</span></label>
<!-- <select name="area" id="area" class="sada" disabled>
<option selected="select">Select Area</option>
</select> -->
<span class="pslare">

</span>
<input type="text"  class="form-control caresshx" id="areasped" placeholder="Area" value="">
<input type="hidden" name="area" value="" id="ardix">
<!-- <select name="area" id="area" class="sada" <?php if($shop_info[0]['location'] == 1){ echo 'disabled';}?>>
<option selected="select">Select Area</option>
</select> -->
<ul class="ullist list-unstyled">

</ul>
</div>
</div>
</div>
</div>
<div class="docfrmffl">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<input type="text" class="form-control sada" name="street" id="street" placeholder="Street" disabled>
</div>
<div class="form-group">
<input type="text" name="build_num" class="form-control sada" placeholder="Building Name"  disabled id="build_num">
</div>
<div class="form-group">
<?php
$rft = array(
'class'=>'form-control',
'name'=>'rft',
'placeholder'=>'House Number'
);
echo form_input($rft);
?>
</div>
<div class="form-group">
<label>Direction <span class="red">*</span></label>
<textarea class="form-control" name="direction" rows="3" id="flladdrs" placeholder="Direction"></textarea>
</div>

<div class="form-group">
<a href="javascript:void(0)" id="shwnmap">Click here to choose from map</a>
</div>
<div class="form-group tsslid" id="opmap" style="display: none">
<div class="form-group">
<input id="address" type="text" placeholder="Enter an address" class="form-control">
<!--  <a href="javascript:void(0)" id="ncnmap" class="btn btn-primary">Cancel</a> -->
</div>
<div class="form-group">
<a href="javascript:void(0)" id="nmapok" class="btn btn-primary tbtn">Close map</a>
</div>
<div id="map"></div>
</div>
</div>
</div>
</div>
<div class="custmhr"></div>
<div class="row">
<div class="col-md-12">
<div class="mainbasictxt">
<div class="bsichr"></div>
<div class="basictxt">
<p>Contact Information</p>
</div>
</div>
</div>
</div>
<div class="docfrmffl">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>First Name <span class="red">*</span></label>
<?php if(is_logedin()): ?>
<input type="text" class="form-control" name="fname" placeholder="First Name" value="<?php echo get_session_element('fname');?>" readonly id="fname">
<?php else: ?>
<input type="text" class="form-control" name="fname" placeholder="First Name" id="fname">
<?php endif; ?>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>Last Name <span class="red">*</span></label>
<?php if(is_logedin()): ?>
<input type="text" name="lname" class="form-control" placeholder="Last Name" value="<?php echo get_session_element('lname');?>" readonly id="lname">
<?php else: ?>
<input type="text" name="lname" class="form-control" placeholder="Last Name" id="lname">
<?php endif; ?>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>Email <span class="red">*</span></label>
<?php if(is_logedin()): ?>
<input type="text" name="email" class="form-control" placeholder="Email" value="<?php echo get_session_element('email');?>" readonly id="email">
<?php else: ?>
<input type="text" name="email" class="form-control" placeholder="Email" id="email">
<?php endif; ?>
</div>
</div>
</div>
<?php if(!is_logedin()): ?>
<div class="row" class="lng" id="lng">
<div class="col-md-12">
<div class="form-group">
<label>Password <span class="red">*</span></label>
<input type="password" name="pass" id="pass" placeholder="Enter You Password" class="form-control" >
</div>
<div class="form-group">
<label>Confirm Password <span class="red">*</span></label>
<input type="password" id="cnpass" placeholder="Confirm Password" class="form-control" name="cnpass">
</div>
</div>
</div>
<?php endif; ?>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>Mobile Phone <span class="red">*</span></label>
<?php if(is_logedin()): ?>
<input type="text" name="mob" class="form-control" placeholder="Mobile Phone" value="<?php echo get_session_element('mobile');?>" id="mob">
<?php else: ?>
<input type="text" name="mob" class="form-control" placeholder="Mobile Phone" id="mob">
<?php endif; ?>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>LandLine <span class="red">*</span></label>
<?php if(is_logedin()): ?>
<input type="text" name="landline" class="form-control" placeholder="LandLine" value="<?php echo get_session_element('phone');?>" id="landline">
<?php else: ?>
<input type="text" name="landline" class="form-control" placeholder="LandLine" id="landline">
<?php endif; ?>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="agreementtxt">
<input type="checkbox" name="agreement" id="arg_098">
I have read and accepted terms and conditions of the agreement.
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="createbtndv">
<input type="submit" class="btn custmsubmit edupfl" value="Create Store" disabled="disabled" id="btnsb">
</div>
<div class="form-group snofd">

</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
echo form_close();
?>
</div>
</div>

PHP

$image_path = realpath(APPPATH . '../assets/images/usershop');
$config['upload_path'] = $image_path;
$config['allowed_types'] = 'gif|jpg|png';
$config['file_name'] = random_string('alnum', 16);

$this->load->library('upload', $config);
if (!$this->upload->do_upload('ushplg'))
{
$error = $this->upload->display_errors('<p>','</p>');

c_flash('alert-danger',$error,'shop/open');

}
else
{
$filename = $this->upload->data();
$data['doc_image'] = $filename['file_name'];
}
$add_n_shop = $this->mod_shop->add_new_shop($data);
if ($add_n_shop)
{
c_flash('alert-success','Your shop has been created but review by admin.','user/about');
}
else
{
c_flash('alert-danger','Your shop has not been created.','shop/open');
}

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы [email protected]