|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-12-13 08:51 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 03:00:01 2025 UTC |
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