openvenues / php-postal

PHP bindings to libpostal for for fast international street address parsing/normalization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class 'Postal\Parser' not found

joebeaver89 opened this issue · comments

I have installed libpostal and php postal. I've followed the steps detailed in the readme but can't get the PHP bindings to work at all, I get message that the class is not found.

My PHP version is 7.2.24. My phpinfo() displays that postal is enabled:
image

When I use php on the command line with php -a I paste the code you have in the readme $parsed = Postal\Parser::parse_address("The Book Club 100-106 Leonard St, Shoreditch, London, Greater London, EC2A 4RH, United Kingdom"); but get the message:

Uncaught Error: Class 'Postal\Parser' not found in php shell code:1

I get the same result trying to use the same in a script. Have I done something wrong along the way?

Never mind, I'm an idiot :)

@joebeaver89 facing the same issue. What was the solution?

@joebeaver89 facing the same issue. What was the solution?

PHP on the command line uses a separate php.ini file so you need to enable the extension in that one too.