私は問題に直面していますが、これはサーバーの問題か私のコーディングでどちらか分かりません。問題は、私が[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
どのようなタイプのメモリディスクのストレージですか? –
私は多くのメモリを取っているどの時点でそれを確認することができます –