Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #35073 : failed to open stream: Illegal seek
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 8th June 11:09
sniper
External User
 
Posts: 1
Default #35073 : failed to open stream: Illegal seek



ID: 35073
Updated by: sniper@php.net
-Summary: failed to open stream: Inappropriate ioctl for device
Reported By: marrtins at hackers dot lv
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: Linux libc.2.3.2
-PHP Version: 5.0.5
+PHP Version: 5CVS-2005-11-03 (snap)
New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.


Previous Comments:
------------------------------------------------------------------------

[2005-11-03 11:45:18] marrtins at hackers dot lv

a bit better!
../configure script told me i must upgrade to newer libxml2 (did it) and
now results is as follows:

fopen() reports `failed to open stream: Illegal seek`

dba_open now works fine!


[Modules]
ctype
dba
ftp
gd
gettext
iconv
mbstring
mysql
openssl
overload
pcre
posix
session
sockets
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
zlib

------------------------------------------------------------------------

[2005-11-02 23:53:43] sniper@php.net

Please try using this CVS snapshot:

http://snaps.php.net/php5-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5-win32-latest.zip

------------------------------------------------------------------------

[2005-11-02 22:38:51] marrtins at hackers dot lv

Description:
------------
As i migrated from php4 (4.3.9) to php5 (5.0.5, 5.0.4) every file
system function (fopen, dba_open, etc) cannot read/write files. Empty
file can be created - but can`t write any byte there.

Not using any loaders or encoders or similar modules.

When recompiled back to 4.3.9 all works fine. The same happens when
compiled as apache module - 4.3.9 works fine, 5.0.5 and 5.0.4 not.

Reproduce code:
---------------
Example can be found here - http://paste.php.lv/2785

compile script:
export LDFLAGS=-liconv && ./configure
make
make install

Linux libc-2.3.2

gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/specs
Configured with: ../gcc-3.3.4/configure --prefix=/usr --enable-shared
--enable-threads=posix --enable-__cxa_atexit --disable-checking
--with-gnu-ld --verbose --target=i486-slackware-linux
--host=i486-slackware-linux
Thread model: posix
gcc version 3.3.4

Expected result:
----------------
Expecting file `haha` to be created with contents `aa`. Also db4
database with some entries.

Actual result:
--------------
fopen() reports `failed to open stream: Inappropriate ioctl for
device`

dba_open() reports `Driver initialization failed for handler: db4`


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35073&edit=1
  Reply With Quote


  sponsored links


2 8th June 11:10
php-bugs@lists.php.net (marrtins at hackers dot
External User
 
Posts: 1
Default #35073 : failed to open stream: Illegal seek



ID: 35073
User updated by: marrtins at hackers dot lv
Reported By: marrtins at hackers dot lv
-Status: Feedback
+Status: Open
Bug Type: Filesystem function related
Operating System: Linux libc.2.3.2
PHP Version: 5CVS-2005-11-03 (snap)
New Comment:

I found that fopen() part was not working by my fault. I was specified
open mode as `c` no `w`.

PHP example: http://paste.php.lv/2797/nonum
Result:
Warning: dba_open(test.db,n): Driver initialization failed for handler:
db4: Invalid argument in /data2/src/php5-200511030730/sapi/cli/test.php
on line 3

using db-4.3.29 (http://www.sleepycat.com)

I felt back to db-4.2.52 and recompiled now working fine. Is there
problem with db-4.3.29 package?


Previous Comments:
------------------------------------------------------------------------

[2005-11-03 21:46:13] sniper@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

------------------------------------------------------------------------

[2005-11-03 11:45:18] marrtins at hackers dot lv

a bit better!
../configure script told me i must upgrade to newer libxml2 (did it) and
now results is as follows:

fopen() reports `failed to open stream: Illegal seek`

dba_open now works fine!


[Modules]
ctype
dba
ftp
gd
gettext
iconv
mbstring
mysql
openssl
overload
pcre
posix
session
sockets
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
zlib

------------------------------------------------------------------------

[2005-11-02 23:53:43] sniper@php.net

Please try using this CVS snapshot:

http://snaps.php.net/php5-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5-win32-latest.zip

------------------------------------------------------------------------

[2005-11-02 22:38:51] marrtins at hackers dot lv

Description:
------------
As i migrated from php4 (4.3.9) to php5 (5.0.5, 5.0.4) every file
system function (fopen, dba_open, etc) cannot read/write files. Empty
file can be created - but can`t write any byte there.

Not using any loaders or encoders or similar modules.

When recompiled back to 4.3.9 all works fine. The same happens when
compiled as apache module - 4.3.9 works fine, 5.0.5 and 5.0.4 not.

Reproduce code:
---------------
Example can be found here - http://paste.php.lv/2785

compile script:
export LDFLAGS=-liconv && ./configure
make
make install

Linux libc-2.3.2

gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/specs
Configured with: ../gcc-3.3.4/configure --prefix=/usr --enable-shared
--enable-threads=posix --enable-__cxa_atexit --disable-checking
--with-gnu-ld --verbose --target=i486-slackware-linux
--host=i486-slackware-linux
Thread model: posix
gcc version 3.3.4

Expected result:
----------------
Expecting file `haha` to be created with contents `aa`. Also db4
database with some entries.

Actual result:
--------------
fopen() reports `failed to open stream: Inappropriate ioctl for
device`

dba_open() reports `Driver initialization failed for handler: db4`


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35073&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666