Page 1 of 1

Localhost

Posted: Thu Feb 10, 2022 5:44 pm
by SBenoit
Script URL:
Version of script: 2.2.0
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:
Hello,
I'm trying to make some tests in a local environment (MAMP) and something is stoping me from creating new links. The warning : Enter a valid URL address. is displayed. Do you know what could cause that? My URL is nothing special : http://host-4:8888/medias/myfile.pdf
Thanks again for your precious help.

Re: Localhost

Posted: Fri Feb 11, 2022 12:37 pm
by Klemen
Looks like the regex CCount uses doesn't "like" this URL format...

Try this:
1. backup existing files
2. open file "inc/common.inc.php" in a powerful text editor, such as the free Notepad++
3. find this exact code in line 70:

Code: Select all

preg_match('/^https?:\/\/+(localhost|[\w\-]+\.[\w\-]+)/i',$url)
4. replace it with this exact code:

Code: Select all

filter_var($url, FILTER_VALIDATE_URL)
5. save and test

Re: Localhost

Posted: Fri Feb 11, 2022 12:52 pm
by SBenoit
Perfect! It works! Thanks again.