0

I was having difficulty getting libphonenumber for PHP to run as per this question.
All I got was:

My output:

Warning: require(/var/www/phone/libphonenumber/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/phone/libphonenumber/index.php on line 2

Fatal error: require(): Failed opening required '/var/www/phone/libphonenumber/vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/php/PEAR:/var/www/cakephp/lib') in /var/www/phone/libphonenumber/index.php on line 2

What finally got it working was installing composer, and moving the generated composer.phar file into the libphonenumber folder, then running the install procedure. This step is missing from the docs, so I wanted to list it here. Thank you to @Simon_eQ for assisting me with this.

Community
  • 1
  • 1
SteveMc
  • 65
  • 1
  • 12

1 Answers1

0

Try this command:

php composer.phar dump-autoload

This will generate autoload files if not already present.

ciruvan
  • 5,143
  • 1
  • 26
  • 32