# Cannot open "/usr/local/lib/php/20060613-debug/eaccelerator.so"



## kenorb (Nov 10, 2010)

Another weird thing.
I'm trying to run php:

```
> php 
Failed loading /usr/local/lib/php/20060613-debug/eaccelerator.so:  Cannot open "/usr/local/lib/php/20060613-debug/eaccelerator.so"
PHP Warning:  Xdebug MUST be loaded as a Zend extension in Unknown on line 0
> ll /usr/local/lib/php/20060613-debug/eaccelerator.so
ls: /usr/local/lib/php/20060613-debug/eaccelerator.so: No such file or directory
```

Yes, that file doesn't exists there.

But I've different path in my configuration:
> grep extension eaccelerator.ini

```
; eAccelerator extension.
;extension="eaccelerator.so"
zend_extension="/usr/local/lib/php/20060613/eaccelerator.so"
;zend_extension_ts="/usr/lib/php/modules/eaccelerator.so"
;extension="eaccelerator.dll"
;zend_extension_ts="c:\php4\eaccelerator.dll"
;zend_extension="c:\php4\eaccelerator.dll"
> ll /usr/local/lib/php/20060613/eaccelerator.so
-r--r--r--  1 root  wheel  124527 Nov 10 18:16 /usr/local/lib/php/20060613/eaccelerator.so
```

Where this 20060613-debug came from?


```
> grep -R "20060613-debug" /usr/local/etc/php/
/usr/local/etc/php/xcache.ini:; zend_extension = /usr/local/lib/php/20060613-debug/xcache.so
/usr/local/etc/php/xcache.ini:; zend_extension_ts = /usr/local/lib/php/20060613-debug/xcache.so
```
I've everything commented out which pointing to that invalid path.


```
> php -i | grep eacc
Failed loading /usr/local/lib/php/20060613-debug/eaccelerator.so:  Cannot open "/usr/local/lib/php/20060613-debug/eaccelerator.so"
PHP Warning:  Xdebug MUST be loaded as a Zend extension in Unknown on line 0
/usr/local/etc/php/eaccelerator.ini,
eaccelerator.allowed_admin_path => no value => no value
eaccelerator.cache_dir => /var/tmp/eaccelerator => /var/tmp/eaccelerator
eaccelerator.check_mtime => 1 => 1
eaccelerator.debug => 0 => 0
eaccelerator.enable => 1 => 1
eaccelerator.filter => no value => no value
eaccelerator.log_file => /var/log/httpd/eaccelerator_log => /var/log/httpd/eaccelerator_log
eaccelerator.optimizer => 1 => 1
eaccelerator.shm_max => 0 => 0
eaccelerator.shm_only => 0 => 0
eaccelerator.shm_prune_period => 0 => 0
eaccelerator.shm_size => 0 => 0
eaccelerator.shm_ttl => 0 => 0
```
Looks like it's loaded, but from where this error could came?


----------



## kenorb (Nov 10, 2010)

ktrace when run php from cli

```
39987 php      NAMI  "/usr/local/etc/php/xhprof.ini"
 39987 php      RET   open 3
 39987 php      CALL  ioctl(0x3,TIOCGETA,0x7fffffffd9f0)
 39987 php      RET   ioctl -1 errno 25 Inappropriate ioctl for device
 39987 php      CALL  fstat(0x3,0x7fffffffc3a0)
 39987 php      STRU  struct stat {dev=98, ino=21906519, mode=-rw-r--r-- , nlink=1, uid=0, gid=0, rdev=87543684, atime=1289413650, 
stime=1289387686, ctime=1289387686, bir
thtime=1289387686, size=21, blksize=16384, blocks=4, flags=0x0 }
 39987 php      RET   fstat 0
 39987 php      CALL  read(0x3,0x80148f000,0x4000)
 39987 php      GIO   fd 3 read 21 bytes
       ";extension=xhprof.so
       "
 39987 php      RET   read 21/0x15
 39987 php      CALL  read(0x3,0x80148f000,0x4000)
 39987 php      GIO   fd 3 read 0 bytes
       ""
 39987 php      RET   read 0
 39987 php      CALL  close(0x3)
 39987 php      RET   close 0
 39987 php      CALL  sigprocmask(SIG_BLOCK,0x8008305a0,0x7fffffffe370)
 39987 php      RET   sigprocmask 0
 39987 php      CALL  open(0x80072c440,O_RDONLY,<unused>0x32)
 39987 php      NAMI  "/usr/local/lib/php/20060613-debug/eaccelerator.so"
 39987 php      RET   open -1 errno 2 No such file or directory
 39987 php      CALL  sigprocmask(SIG_SETMASK,0x8008305b0,0)
 39987 php      RET   sigprocmask 0
 39987 php      CALL  write(0x2,0x7fffffffdd90,0x83)
 39987 php      GIO   fd 2 wrote 131 bytes
       "Failed loading /usr/local/lib/php/20060613-debug/eaccelerator.so:  Cannot open "/usr/local/lib/php/20060613-debug/eaccelerator.so"
       "
 39987 php      RET   write 131/0x83
 39987 php      CALL  sigprocmask(SIG_BLOCK,0x8008305a0,0x7fffffffe370)
 39987 php      RET   sigprocmask 0
 39987 php      CALL  open(0x80072c440,O_RDONLY,<unused>0x2c)
 39987 php      NAMI  "/usr/local/lib/php/20060613/eaccelerator.so"
```


----------



## DutchDaemon (Nov 10, 2010)

It's probably in /usr/local/lib/php/20090626/eaccelerator.so (PHP 5.3.3 in my case), or whichever directory PHP is using under /usr/local/lib/php/. If you upgrade/downgrade PHP, you need to reinstall eaccelerator to make it pick up the right PHP installation (every time).


----------



## kenorb (Nov 11, 2010)

Tried already

```
> sudo portupgrade -f eaccelerator
...
install  -o root -g wheel -m 444 /usr/ports/www/eaccelerator/work/eaccelerator-0.9.6.1/modules/eaccelerator.so  /usr/local/lib/php/20060613
...
You have installed the eaccelerator package.
Edit /usr/local/etc/php.ini and add:
zend_extension="/usr/local/lib/php/20060613/eaccelerator.so"
...
===>   Registering installation for eaccelerator-0.9.6.1_1
> php
Failed loading /usr/local/lib/php/20060613-debug/eaccelerator.so:  Cannot open "/usr/local/lib/php/20060613-debug/eaccelerator.so"
PHP Warning:  Xdebug MUST be loaded as a Zend extension in Unknown on line 0
^C
> grep -R 20060613-debug /usr/local/lib/php/*
(nothing)
> php -i | grep 20060613-debug
Failed loading /usr/local/lib/php/20060613-debug/eaccelerator.so:  Cannot open "/usr/local/lib/php/20060613-debug/eaccelerator.so"
PHP Warning:  Xdebug MUST be loaded as a Zend extension in Unknown on line 0
```

It's loaded from proper path, but it's trying to load as well from this invalid path as well.


----------

