From:             shri_sdm at yahoo dot com
Operating system: Linux
PHP version:      4.4.2RC1
PHP Bug Type:     *Directory/Filesystem functions
Bug description:  Unable to open file using fopen

Description:
------------
Hello,

I am facing a strange problem.. i want to open a simple test.txt file
using fopen in PHP. But i am unable to open file to write. I am desinging
a web site using LAMP ( Linux,Apache,MySql and Php. when i execute php
script in web browser fopen fails to open and echo "File Cannot be opened"
in the web page. But when i execute the same script in command promt fopen
successfully opens the file with some errors as followes:

PHP Warning:  Unknown(): Unable to load dynamic library
'/usr/lib/php4/msql.so' - /usr/lib/php4/msql.so: cannot open shared object
file: No such file or directory in Unknown on line 0

PHP Warning:  Unknown(): Unable to load dynamic library
'/usr/lib/php4/imap.so' - libc-client.so.0: cannot open shared object
file: No such file or directory in Unknown on line 0

PHP Warning:  Unknown(): Unable to load dynamic library
'/usr/lib/php4/mbstring.so' - /usr/lib/php4/mbstring.so: cannot open
shared object file: No such file or directory in Unknown on line 0

PHP Warning:  Unknown(): Unable to load dynamic library
'/usr/lib/php4/pgsql.so' - libpq.so.3: cannot open shared object file: No
such file or directory in Unknown on line 0

Please help me where i have made mistake. iam using Fedora core
3(linux),httpd-2.0.52-3(apache Server),mysql-3.23.58-16.FC3.1 and
php-4.3.11-2.8. please reply as soon as possiable

Thanking You,
Shrikant Upadhya  

Reproduce code:
---------------
//fileOpening.php
<?php

        $file = fopen("/var/www/html/Sample.txt","w");
        if(!$file)
        {
                printf("File Cannot be Opened\n");
                exit(0);
        }
        printf("File Opened Successfully\n");
        fclose($file);
?>

in browser i call this file as :

http://localhost/fileOpening.php

Expected result:
----------------
"File Opened Successfully"

Actual result:
--------------
File Cannot be Opened

-- 
Edit bug report at http://bugs.php.net/?id=35654&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35654&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35654&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35654&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=35654&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=35654&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=35654&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=35654&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=35654&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=35654&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=35654&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=35654&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=35654&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35654&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35654&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35654&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=35654&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=35654&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35654&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=35654&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=35654&r=mysqlcfg

Reply via email to