Comments (6)
@tienhsu, what did you do to fix this?
from captcha.
I have same problem, please tell how to fix this problem?
from captcha.
@tienhsu how can you fix this problem thanks!
from captcha.
@Zhenjas can you fix this promblem right now?
from captcha.
@tannerjcox @stevejobsii @Zhenjas found the php file in window is format utf8 with bom, just remove BOM format.
from captcha.
you can remove BOM with the following code:
public function CheckBomFile()
{
global $auto;
set_time_limit(1000);
if (isset($_GET['dir'])) { //Set the scan Directory
$basedir = $_GET['dir'];
} else {
$basedir = './../app/';
}
$auto = 1;
self::checkdir($basedir);
}
function checkdir($basedir)
{
if ($dh = opendir($basedir)) {
while (($file = readdir($dh)) !== false) {
if ($file != '.' && $file != '..') {
if (!is_dir($basedir . "/" . $file)) {
echo "filename: $basedir/$file " . self::checkBOM("$basedir/$file") . "
";
} else {
$dirname = $basedir . "/" . $file;
self::checkdir($dirname);
}
}
}
closedir($dh);
}
}
function checkBOM($filename)
{
global $auto;
$contents = file_get_contents($filename);
$charset[1] = substr($contents, 0, 1);
$charset[2] = substr($contents, 1, 1);
$charset[3] = substr($contents, 2, 1);
if (ord($charset[1]) == 239 && ord($charset[2]) == 187 && ord($charset[3]) == 191) {
if ($auto == 1) {
$rest = substr($contents, 3);
self::rewrite($filename, $rest);
return ("<font color="red">BOM found, automatically removed.");
} else {
return ("<font color="red">BOM found.");
}
} else
return ("BOM Not Found.");
}
function rewrite($filename, $data)
{
$filenum = fopen($filename, "w");
flock($filenum, LOCK_EX);
fwrite($filenum, $data);
fclose($filenum);
}
from captcha.
Related Issues (20)
- Captcha not working with Fortify Laravel 9 HOT 2
- How to get captcha code in test ? HOT 7
- Captcha not working in an iFrame
- Error 500 on reload captcha HOT 1
- install laravel 9 Error HOT 4
- PlainJS: Validation fails after refresh image in Laravel 9
- Unresolvable dependency resolving [Parameter #0 [ <required> $name ]] in class Illuminate\Session\Store
- validation error in ajax form HOT 1
- 404 Error!
- Hidden disable feature with v3.2.9 with a strange/broken default behavior HOT 1
- Validation is always successful regardless of the entered text HOT 8
- Security issue on 3.2.9 version
- Captcha validation issue on server HOT 4
- Framework-agnostic version?
- image fail return 0 pixel
- Captcha in a subdomain
- laravel 10 support HOT 15
- Any plans for Laravel 10 Support? HOT 1
- Multil captcha not working in a page HOT 3
- This happens when i send a POST request , any help ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from captcha.