-
Posts
15,274 -
Joined
-
Last visited
-
Days Won
432
Everything posted by requinix
-
But why redirect and then redirect again? Why not just have domain1.com redirect to the place you want instead of some other place you don't want?
-
Doesn't have to be. You can tell it to redirect however and wherever you want.
-
need help to set current GPS position in existing map
requinix replied to pmonstad's topic in Javascript Help
Not me, no. If you insist that you can't do it yourself then we have a place you can post your job offer, but frankly, if the problem is that your knowledge is "far too limited" then this would be a really good chance to try to do something about that. -
My first reaction would be "don't use syslog for regular logging". It's fine for important things, but miscellaneous info and error messages can get lost in the sea of other activity.
-
need help to set current GPS position in existing map
requinix replied to pmonstad's topic in Javascript Help
One step at a time. 1. Update the code so that you can place a marker at some coordinates. Don't bother trying to geolocate anything. Just hardcode some numbers in there. Make sure it can be placed sometime after the map has been already fully initialized and drawn. 2. Update the code so that you can move that marker to some new coordinates. Again, no geolocation, just hardcode another set of numbers. Start by putting the marker at the first location like before, then use setTimeout have the marker reposition somewhere else 30 seconds later. 3. Update the code so that you can get past the geolocation permission prompt to get the first position. Then use that first position to place the marker at its first location for real. 4. Update the code so that you can "watch" for geolocation changes. Just console.log or alert the new coordinates so you can see it working. 5. Update the code so that the geolocation changes will reposition the marker. IIRC you don't have to do any "get the location every 30 seconds" work because the browser can simply tell you when the position changes. -
What is the value of $first and $second?
-
Do you only need a hint in the right direction? You can get the first day of week #1 by asking strtotime for "January 2 last Monday". That works because a) If January 2 is on a Monday then "last Monday" will go back a week - which is what you want because Jan 1 would be Sunday and thus part of the previous week b) If January 2 is on Tuesday-Sunday (note that span is all within the same week) then "last Monday" will go to the previous Monday - which is going to be the same week that January 1 is because it is sometime between Monday-Saturday
-
How to format the data retreived from an sql query with php
requinix replied to affordit2's topic in PHP Coding Help
...using nl2br. -
That's not true, no. But your entire site should be over HTTPS anyway, so...
-
Like the kind you used to access this forum? A form that asks for a username/email and password? You know, the normal thing that you see on the internet.
-
Is escapeshellarg needed if passing serialized data?
requinix replied to NotionCommotion's topic in PHP Coding Help
Yeah, you definitely still need to use escapeshellarg. Escaping values isn't always about malicious data - sometimes it's simply about making sure that stuff doesn't get screwed up. But serialize? Ew. I'd rather have the other process read JSON through stdin. -
Xampp version 7.4.10 weirdness
requinix replied to CSS-Regex's topic in PHP Installation and Configuration
Not in this forum. The PHP Coding Help forum supports it as a sort of trial run-type thing, but we've had that running for so long we might as well apply it to the other forums too... -
Browsers will remember Basic authentication credentials and pass them along any time they think the website might want to have them. The session is essentially pointless. The "only" way to log out a user is to re-send a new 401 response so the browser will prompt for (new) credentials. An even better answer would be to forget Basic auth and set up a normal login system like every other website does instead.
-
It gives more control, but one feature it doesn't have is a way to wait for the process to close or a timeout to expire. So unless I missed something, that means having to poll the process every couple seconds to see if it's still going, then giving up and terminating it if the 120s has passed.
-
Xampp version 7.4.10 weirdness
requinix replied to CSS-Regex's topic in PHP Installation and Configuration
1. Live Server? Didn't you say you were using XAMPP? 2. Unless configured otherwise, .html extensions do not run PHP code. Use a .php extension. -
Xampp version 7.4.10 weirdness
requinix replied to CSS-Regex's topic in PHP Installation and Configuration
It has nothing to do with the IDE. Okay, AJAX, then: -
Effect of string starting with an ampersand
requinix replied to NotionCommotion's topic in PHP Coding Help
Note that PHP 8 changed string <=> number comparisons. -
It wouldn't have to be a second script. All you'd have to do is edit the main script right near the beginning so that it forks, does a timed (120s) wait while the child runs, then if the time expires it sends a term signal to the child. But don't bother. Use timeout(1) for the problematic command.
-
"Could not authenticate" could mean a variety of things. Start by checking the username and password you need to use for you mail server.
-
Telling us the file name and line number where a problem happened does not help us. I posted a link. Read it and follow its instructions.
-
Make sure you have your php.ini set up for development with these settings (restart WAMP if you change them): error_reporting = -1 display_errors = on Then look for error messages.
-
http://www.catb.org/~esr/faqs/smart-questions.html
-
I'm thinking either (a) the while loop Barand pointed out is returning more rows than expected or (b) the PHP script is executing twice. Both should be pretty easy to test.
-
Allowed memory exhausted...tried to allocate
requinix replied to ScorpioTiger's topic in PHP Installation and Configuration
The other common reason for PHP trying to allocate absurd amounts of memory is, unfortunately, a PHP bug. Exactly which version are you using? Was it upgraded recently? -
Wouldn't it be easier to have the data on the page when it loads instead of having to load the page and then load even more after that?
- 3 replies
-
- 1
-
-
- php
- javascript
-
(and 3 more)
Tagged with: