-
Posts
15,227 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
Case of deprecated warning with PHP 8.1 and APCUIterator
requinix replied to NotionCommotion's topic in PHP Coding Help
That would be a PHP source code file and line number, but the error happened on APCUIterator::current which is internal code so there is no file or line number. But errors do need to report some location, thus that. -
Don't hijack threads. What code have you tried so far, what has it done, and what did you expect it to do?
-
Session information sharing on different subdomains
requinix replied to Emsanator's topic in PHP Coding Help
There's no "tapping into" or "breaking into" here. If the code running on both subdomains can access the same source of session data (probably files) then they can share the same sessions. This sort of setup happens all the time. If the sessions are files then it's easier to have the sites on the same server - naturally. If the sites weren't, or were "in the cloud" or otherwise distributed, then a database would be better/easier. -
Have you checked php-fpm's own error logs?
-
Case of deprecated warning with PHP 8.1 and APCUIterator
requinix replied to NotionCommotion's topic in PHP Coding Help
APCUIterator is part of the apcu PECL extension. According to the changelog, you need to have version 5.1.21+ for PHP 8.1 support. -
Session information sharing on different subdomains
requinix replied to Emsanator's topic in PHP Coding Help
If you're sure that the user can browse the other site perfectly fine, with the same session information as the first site, then the problem will be somewhere in the code that gets the member ID and stores it in the database... -
What you originally described doesn't seem to match up with what you've posted. I can't tell what is supposed to be what. Can you throw an example into a fiddle? To the question, fixed positioning is the basic answer. Sticky could work too. They both require some setup but either one should do what you want.
-
Session information sharing on different subdomains
requinix replied to Emsanator's topic in PHP Coding Help
You talk about a member ID not being "registered" and post some code that deals with session cookies. I have no idea if the two things are supposed to be related. When the page on the second subdomain handles the form data, either it can access the session data or it cannot. If it can't then you have cookie and/or session data problems, and if it can then you have some problem getting the ID into the database (I guess?). It's hard to tell without knowing your application(s) and having a more detailed explanation of what you're seeing and what you expected to see. -
There are more efficient methods than creating a massive regular expression. For instance, 1. Have the text file be sorted by domain 2. Get the domain from each email address 3. Do a binary search inside the file for the domain
-
It is all PHP code, though. You could go through their code looking for the place where it sends a request through Guzzle, then insert a bit of code to log it or something.
-
I don't know. Can you get the SDK to show you exactly what request it's sending? Maybe it's doing something unexpected. I already complained about the lack of documentation, right?
-
Now that you've fixed the $operationsObject stuff, what does the code look like?
-
Nearly every adult site nowadays includes technical information in the response headers or the HTML source that identifies it as such. Research what I'm talking about and detect that, and rather than try to block them entirely, all you have to do is not publish results for those sites publicly.
-
And what line is 141? Is it the one where you try to echo $response? You can't just output objects like that. Try print_r. But you've got a pretty big bug here: when you create $operationsObject, $operations is an empty array. You add to $operations later but that's too late because $operationsObject has already been created. Move that line until after the array is ready to be used.
-
Yes, you mentioned that already. What do you mean that porn sites are "indexing on your PHP script"?
-
FYI it doesn't have to be a PHP object: PHP's arrays will serialize into a JSON object when they are associative (have keys). So you can remove the (object) typecast. Having that array looks right to me. You're definitely passing $operationsObject to the API, right, and not $operations? What's your full code look like now?
-
Why are porn sites "indexing" your site? That doesn't make sense.
-
...Why are you adding a json_decode? Read the docs: the request body is an object containing an "operations" key whose value is an array of the operations to perform. You have the array of operations to perform already. What you don't have is them inside an object.
-
The Mailchimp SDK isn't the smartest thing around. When you give it requests to execute, you have to match exactly what the API says you're supposed to use. Here, the API wants the request body to be an object with an "operations" key that is the array of operations. You almost but not quite have that.
-
All you'll be able to find on Google is people saying that it's as simple as looking at the hierarchy your var_dump() output is showing you: array(16) { <--- this is $cert ... ["extensions"]=> <--- this is $cert["extensions"] array(9) { ... ["subjectAltName"]=> <--- this is $cert["extensions"]["subjectAltName"] string(32) "email:boyd.hanalei.ako@gmail.com"
-
SSL_CLIENT_CERT is a string value containing the certificate data. It is not a file.
-
I'm not sure you understand how users work. Or at least what "users" it is that you need. If you don't want the "competition" to see things then there are a few options, but none of them involve creating users on the server or changing file ownerships or permissions. For instance, if you want something really easy to set up and that it's not something you'll need to change often, then htpasswd-style authentication is quick. Example
-
Which file was not found? What are you doing to get that error? Is it coming from the webserver or from PHP? Why do you have all those users and why are they owning these files? What are the file permissions?
-
I believe the SSL_CLIENT_CERT value is the cert as a string, so try plugging that into what gizmola showed. Beyond that, if you have problems getting code to work, then posting that code would make it a lot easier for us to help fix it.