The connection was reset
8,737
Do thisdomain.com
and dev.thisdomain.com
resolve to the same IP address in DNS?
Also, the NameVirtualHost
address should match both VirtualHost
addresses, i.e:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName thisdomain.com
# ...
</VirtualHost>
<VirtualHost *:80>
ServerName dev.thisdomain.com
# ...
</VirtualHost>
Related videos on Youtube
Author by
three3
Updated on September 17, 2022Comments
-
three3 almost 2 years
I need help getting the "this week" full date range in the following format: Y-m-d
I have successfully been able to get "this month" full date range but not the "this week" full date range.
This is my code for "this month":
//Functions for later use function firstOfMonth() { return date("Y-m-d", strtotime(date('m').'/01/'.date('Y').' 00:00:00')); } function lastOfMonth() { return date("Y-m-d", strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00')))); } //Setup the date_range variables $date_start = firstOfMonth(); $date_end = lastOfMonth();
Any help is greatly appreciated!
-
Jake Wilson over 14 yearsWow I feel really dumb for not checking that. They did in fact point to different IP addresses, which lead me to the conclusion that my client has a specific server already setup for dev.thisdomain.com. So upon randomly picking a completely different word instead of dev for my subdomain, it worked. Thanks!
-
Layton Everson almost 12 yearsWouldn't this only work for last week if its Monday now; if its Tuesday won't last Monday give yesterday?
-
laketuna over 10 years^ Yes. For last week's Monday, you need to do
$thisWeeksMonday = strtotime("last monday midnight"); $lastWeeksMonday = strtotime('-1 week', $thisWeeksMonday);
. Of course, you need to check if today is a Monday as well. Also, there is a typo in the answer. -
Niet the Dark Absol almost 10 years@FranVerona Thanks for the edit. I'm kind of amazed that 1) I made those errors and 2) they went unedited for such a long time!
-
Fran Verona almost 10 years@NiettheDarkAbsol I recently came to this question when I was looking for something like this on Google. Your welcome! :)