-
Posts
15,227 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
Different regular expression match result in PHP 7.4.11 and 7.4.12
requinix replied to ken678's topic in Regex Help
Most of the time, when you find an oddity like this that can't be explained any other way, the answer is going to be a JIT thing: PCRE isn't supposed to, but occasionally does behave in slightly different ways when JIT is on or off. ini_set("pcre.jit", 0); preg_match('/([^\.]|^)\s*a/', "a", $matches); But turning off JIT is not the best answer. Instead, do what kicken did and tweak the expression so it works. Anyway, that expression really should work even with JIT enabled, so feel free to file a bug report against PCRE2 about it. https://github.com/PCRE2Project/pcre2/issues -
I don't follow, partly because I don't understand what you mean by "combine" and partly because the code and samples you've posted don't fit together. You already have something that can count the number of times a "code number" is used. What does that code not do which you need?
-
Wrote php program in c drive. Not running when send to d drive
requinix replied to sonia1098's topic in PHP Coding Help
How to ask a programming question -
That's not an error. That's a link. Specifically, a link to https://goo.gl/Y0ZkNV. Pay more attention. Not if you want to do this from Javascript. But you should change to HTTPS regardless. To do it from PHP, if you can accept that you will not get an accurate location, you look up the remote IP address in some geolocation database - MaxMind's, for instance.
-
How to stop google from flagging my site as Dangerous/Fishing.
requinix replied to SiteNotWorking's topic in PHP Coding Help
If I plug your site into that reporting link I gave earlier, it says there's nothing wrong. And if I visit it in my browser, it has no complaints. Has the problem gone away? Because unless you can find out why the site is (was) marked as unsafe, it'll be hard to fix it to be safe. -
How to stop google from flagging my site as Dangerous/Fishing.
requinix replied to SiteNotWorking's topic in PHP Coding Help
Are you sure your site hasn't been compromised? Look through the files on the site and see if there are any that don't belong. -
How to stop google from flagging my site as Dangerous/Fishing.
requinix replied to SiteNotWorking's topic in PHP Coding Help
Have you tried looking into whether your assumption is correct? What do you get if you plug your site into their reporting tool? -
...you mean sorting?
-
include a php code within a forum description
requinix replied to Berserk's topic in PHP Coding Help
There are two approaches that aren't unreasonable: 1. Make your thing render as an image, and embed the image into the description (assuming it supports HTML). Then whoever sees the description will see the image. Not great for SEO or visually-impaired users. 2. Set up a cronjob that runs a script every X minutes (whatever makes sense to you). This script calculates what it needs, then goes into the database and manipulates the forum's description text. -
Congratulations: you've made this so much more complicated than it needed to be! https://stackoverflow.com/a/21064102
-
Because you tried to "get attribute" and CSS is not attributes.
-
1. Are you sure you don't mean to get the svg's width and height? Since that element actually has those two specified as attributes? 2. parentOfSVG is the same dimensions at its child. 3. getAttribute gets attributes defined on the element. You didn't define a width or height on the parent. 4. I think you want either clientWidth or offsetWidth.
-
By the way, if you ever want a submit button with a value that's separate from the label - or want a button that is more than just text - then <button> exists to help you out: <button type = "submit" name = "btnSub" value = "something" id = "zz">Select</button> where the btnSub value in $_POST will be "something".
-
I'll go ahead and say that typically one does not do that. Because the users on your site are not actually setting up a web app. When you signed up on PHPFreaks, you got an account. There's a "page" for you at https://forums.phpfreaks.com/profile/63588-i-am-obodo/ and you can create content in your personal space (so to speak). None of that came with actual system accounts. You don't have a database dedicated to you, let alone a database account. Because your ability to do those things is part of our application. You are not, in fact, setting up your own application. You're simply using ours. If you literally want people to set up applications and write code that lets them connect to databases, that's one thing. But that's not what it sounds like you're describing. What you're describing is basically like what happens on many other ecommerce sites: you sign up, you get a "store" you may or may not be able to customize (be that a URL or subdomain), and you start selling items. As a user, you don't want to spend your time dealing with databases, or installing WordPress, or updating extensions, or writing HTML, or really doing anything else except for putting items up for sale and fulfilling orders.
-
People typically don't like downloading attachments and having to sift through code looking for something. Especially when it's not clear what that "something" needs to be. What's the relevant portion of the code involved? And in case it's not obvious from reading it, what do you mean by adding another option?
-
What do you mean, "remove"? What "other operations"? You've managed to post a whole bunch of code, but wouldn't you know, when asking for help with a thing, giving a description of what you want to do is more important than the code itself! One-time password. Like those 6-digit numbers you get from SMS or "authenticator" apps that cycle every 30 seconds. Such as this algorithm, $acct_otp = substr(number_format(time() * rand(), 0, '', ''), 0, 6); (which is terrible and should never be used by anyone for any reason)
-
ODBC No Longer Working after TLS Encryption Update to Data Sources
requinix replied to bendavid's topic in PHP Coding Help
If your ODBC settings are correct, my first guess would be an outdated version of OpenSSL that doesn't support the TLS configuration you're trying to use. What version of OpenSSL do you have, and what do your connection settings say about TLS? -
No speed difference found when running exec(scp) in the background
requinix replied to tirengarfio's topic in PHP Coding Help
Those. The things you removed. Those parts. -
No speed difference found when running exec(scp) in the background
requinix replied to tirengarfio's topic in PHP Coding Help
Do you know what those parts do? -
Using row_number on attribute to only return 5 rows
requinix replied to webdeveloper123's topic in MySQL Help
WHERE rb.room_id IS NULL GROUP BY room_id WHERE row_num <= 5; If I point out those three lines on their own, can you see the problem? -
Ha, no. What makes administration easy is the experience and skills of the person/people administering it; drop a Windows person into a Linux environment and they won't do as well. Also no. Solaris is just another system out there. Business might adopt it because they hear "it's owned by Oracle" and think that's a good thing. Over and over, it's been proven that open-source software is more secure than closed-source.
-
Have you taken the email address you're trying to sign in with, queried the database manually to make sure there is a corresponding record, and checked that the password_hash stored in there looks like a hash?
-
Seems fine. What's the problem you're trying to solve? You didn't mention that. Can I assume it's not that you're unable to log in with a user that was created before you added the hashing?
-
And what about the code that inserts the user records - specifically, that deals with setting the password? Because that part and this part need to work together.