문제점이 있습니다. 서버 문제인지 또는 코딩 중인지 모릅니다. 문제는 내가 이미지를 업로드하는 것과 함께 데이터베이스에서 일부 변경 (삽입, 업데이트, 삭제)을하면 오류가 발생한다. [sitename]이 현재이 요청을 처리 할 수 없다는 것입니다. 그러나 이미지를 업로드하지 않고 트랜잭션을 만들면 모든 것이 잘됩니다.서버가 현재이 요청을 처리 할 수 없습니다.
그러나 또 다른 이유는 내가 혼란 스럽다. 내 사이트에는 관리 패널도있다. 이미지와 데이터를 업로드하면 모든 것이 작동하지만 이미지와 함께 데이터를 업로드하면 오류가 발생한다. 문제가있는 곳을 모른다. 그것은 서버 측 문제이거나 제 코드에 있습니다.
다음은 사용자 측에서 사용중인 코드입니다.
public function partner_register() {
$date = date('Y/m/d');
$this -> form_validation -> set_rules('contact', 'person contact', 'required|xss_clean');
$this -> form_validation -> set_rules('company', 'company name', 'required|xss_clean');
$this -> form_validation -> set_rules('ph', 'phone', 'required|xss_clean');
$this -> form_validation -> set_rules('email', 'email', 'required|valid_email|is_unique[partner.email]|max_length[100]|xss_clean');
$contact = $this -> input -> post('contact');
$email = $this -> input -> post('email');
$phone = $this -> input -> post('ph');
$name = $this -> input -> post('company');
$brand = $this -> input -> post('brand');
if($brand == null or empty($brand) or $brand == "") {
?> <script> alert('Select atleast one brand');
window.location = "<?php echo base_url('register'); ?>";
</script>
<?php
}
else if ($this -> form_validation -> run() == FALSE) {
?> <script> alert('Email already exists. Please try new email.');
window.location = "<?php echo base_url(); ?>";
</script>
<?php
}
else {
$info = $this -> Parts_Model -> partner_register([
'contact' => $contact,
'email' => $email,
'company' => $name,
'phone' => $phone,
'reg_date' => $date,
]);
if($info) {
foreach($brand as $key => $value) {
$brands = $this -> Parts_Model -> partner_brands([
'partner_id' => $info,
'brands' => $value,
]);
}
if($brands) {
?> <script> alert('Subscription successfull.'); window.location = "<?php echo base_url('register'); ?>"; </script> <?php
}
}
else {
?> <script> alert('Subscription failed.'); window.location = "<?php echo base_url('register'); ?>"; </script> <?php
}
}
}
여기 백엔드에서 사용되는 코드는 모두 거의 동일합니다. 여기
public function add_ads() {
$this -> header_template();
$this -> form_validation -> set_rules('link', 'ad link', 'required|xss_clean');
$this -> form_validation -> set_rules('schedule', 'start date', 'required|xss_clean');
$this -> form_validation -> set_rules('end_schedule', 'end date', 'required|xss_clean');
$link = $this -> input -> post('link');
$schedule = $this -> input -> post('schedule');
$end_schedule = $this -> input -> post('end_schedule');
$config['upload_path'] = 'ads/';
$config['allowed_types'] = 'jpg|jpeg|png';
$config['encrypt_name'] = true;
$this -> load -> library('upload', $config);
if($this -> form_validation -> run() == false) {
echo validation_errors();
}
else {
if(!$this -> upload -> do_upload('ad')) {
?> <script> alert('<?php echo $this -> upload -> display_errors(); ?>'); window.location = "<?php echo base_url('dashboard/ads'); ?>"; </script> <?php
}
else {
$data = $this -> upload -> data();
if($data['file_name'] and $data['full_path']) {
$file_name = $data['file_name'];
$file_path = $config['upload_path'].$file_name;
$info = $this -> Dashboard_Model -> add_ads([
'add_link' => $link,
'schedule' => $schedule,
'end_schedule' => $end_schedule,
'ads' => $file_path,
]);
if($info) {
?>
<script> alert('Added Successfully.'); window.location = "<?php echo base_url('dashboard/ads'); ?>"; </script>
<?php
}
else {
echo 'Error! While adding brands.';
}
}
}
}
}
그리고
이그리고 여기가 서버 로그 오류 오류 로그를 기반으로
메모리 제한 문제가 있으며 PHP가 메모리 사용량에 할당 한 것 이상인 것으로 보입니다. 이 링크를 확인하십시오. http://stackoverflow.com/questions/19508313/memory-limit-1024m-still-cannot-allocate-memory-couldnt-create-child-proce. – Perumal
어떤 종류의 메모리 디스크 스토리지 또는 무엇입니까? –
많은 메모리를 차지하고있는 지점을 확인할 수 있습니까 –