简体   繁体   English

从gmail复制客户端数据并提交表单时,PHP抛出403禁止错误

[英]PHP throws 403 forbidden error when copying client data from gmail and submitting the form

I saving this specific data into my form, but i am getting 403 我将此特定数据保存到表单中,但得到403

Forbidden You don't have permission to access /edit-booking on this server. 禁止您无权访问此服务器上的/ edit-booking。 Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. 此外,在尝试使用ErrorDocument处理请求时遇到403禁止错误。

here is the data of the client. 这是客户端的数据。

 Day 1 : Katra On arrival at Jammu Airport catch the cab and then proceed to Katra Hotel. Proceed to Katra. On arrive Check into The hotel. Proceed to local Sightseeing in Katra. Dinner and Overnight stay at the hotel Katra. Day 2 : Katra Sightseeing Today Morning After having Breakfast, Proceed to Katra- Vaishodevi Darshan. Dinner & Overnight stay at Katra. Day 3 : Katra - Amritsar Today Morning After having Breakfast, Check out From the Hotel & Proceed to Amritsar . On arrive Check into The hotel. Proceed to local Sightseeing in Amritsar . Dinner and Overnight stay at the hotel Amritsar Day 4 : Amritsar Sightseeing Today Morning After having Breakfast, Proceed to Amritsar - Wagha Border & visit Golden Temple. Dinner & Overnight stay at Amritsar. Day 5 : Amritsar Drop Today Morning After having Breakfast, Proceed to Amritsar Airport Drop 

when ever i am trying to save this particular details. 每当我尝试保存此特定详细信息时。 i am getting 403 forbidden error. 我收到403禁止错误。 Also changed the source from notepad,wordfile,pdf docx. 还从记事本,wordfile,pdf docx更改了源代码。 still given me the same error if i copy this data and save it to my form. 如果我复制此数据并将其保存到表单,仍然会给我同样的错误。 enter image description here 在此处输入图片说明

i thaught maybe some special characters are creating this problem so i used preg_replace to eliminate all the specials characters. 我想也许是一些特殊字符造成了这个问题,所以我用preg_replace消除了所有特殊字符。 but still get this error 但仍然出现此错误

here is my php code for this. 这是我的PHP代码。

 $b_itinerary = filter_var($_POST['b_itinerary'],FILTER_SANITIZE_STRING); $b_itinerary = preg_replace('/[^A-Za-z0-9\\n ]/', '', $b_itinerary); mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); try { $stmt = $mysqli->prepare("UPDATE rmt_bookings SET b_itinerary=?"); $stmt->bind_param("ss",$b_itinerary,$b_bkid); $stmt->execute(); if($stmt->affected_rows === 0) $msg = "Booking Updated Successfully"; $stmt->close(); } catch (Exception $e) { echo "Error : ".$e; //use in development error_log($e); //use in production echo 'Error:'.$e; $msg = "Error".$e; } 

What is causing the problem. 是什么引起问题。

Here is the Screen Short of 2 Client data, With working and other throwing Error enter image description here 这是缺少2个客户端数据的屏幕,有工作错误和其他抛出错误,请在此处输入图片描述

You had a mod_security problem. 您遇到了mod_security问题。 your ip is blocked for some reason. 您的IP由于某种原因被阻止。 as your hosting provider to unblock your ip from there the problem occurred for me. 作为您的托管服务提供商,从那里解锁您的IP就是我所遇到的问题。 something in your string must have matched the mod rule, if it was a false positive. 如果它是误报,则字符串中的某些内容必须与mod规则匹配。 the support team will unblock your ip. 支持团队将取消阻止您的IP。 Do it. 做吧

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM