0

This morning while trying to create a new laravel project I got the error

/c/xampp/php/php: line 13: /opt/php/bin/php: No such file or directory

I can still update composer, however most other commands throw the same error. And haven't had any problems with composer till this morning.

after having a look at one of the files I (think I) found the culprit at the bottom

#!/bin/bash

# Gets the directory of this script file, also resolving symlinks:
# (reference: Dave Dopson, http://stackoverflow.com/questions/59895/can-a-
bash-script-tell-what-directory-its-stored-in )
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a 
symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative 
symlink, we need to resolve it relative to the path where the symlink file 
was located
done
__DIR__="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

/opt/php/bin/php "-c$__DIR__/stdlib" "$@"

Other links suggest smylinking to the directory where php is, however I'm a little confused as wouldn't that lead to the /c/xampp/php/php referring back to itself?

Any help would be greatly appreciated

Update

Fresh copy of php solved the issue

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
craig-sen
  • 776
  • 5
  • 6

1 Answers1

1

A fresh copy of php solved the issue.

craig-sen
  • 776
  • 5
  • 6