Localhost

Post your Click counter digestion problems here
Post Reply
SBenoit
Posts: 11
Joined: Mon Dec 10, 2018 3:56 pm

Localhost

Post 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.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: Localhost

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
SBenoit
Posts: 11
Joined: Mon Dec 10, 2018 3:56 pm

Re: Localhost

Post by SBenoit »

Perfect! It works! Thanks again.
Post Reply