Read/write Access To All The Files
I recently made a php app for a company that spiders through a server and finds all files of a specified type (html, etc) and then opens the files and does specified things to them. So, the tool needs to be placed on the server and then it needs read/write access to all the files.
It works fine on my local server, but the client says that it fails (message is "failed to write to file" and then it stops). I told him to try it with ALL files and folders set to 777 just for testing purposes and he says that it's still not working. I have no idea what to suggest.
View Complete Forum Thread with Replies
Related Forum Messages:
Can I Use Php To Read From/write To Other Files On Server
I've got a news section on my page and I want people in the company to be able to fill out an online form to add new news stories so that the website looks constantly updated. all the news stories and scrolling abilities are currently in a javascript file which are written out to the page when a user loads the page. So preferably I'm looking to take in information from a form and write that information into my javascript file if that's possible. r if I can't do the above I want to take in information from my form and write to a database or new file then read that from my javascript file with php.
View Replies !
Read/write To Excel Or Same Type Of Files.
We need to be able to process invoices through the internet and have the customers be able to download these invoices. We are currently using Excel to do all the information. I was hoping to be able to use a third party program to generate these files, I have looked into .pdf, and xls files. From what I have read, it is pretty much impossible for me to get a script that will read an xls file, write data from a mysql database to it, then send the file to the customer for them to download/view with the new information. Is there a different program that works the same that I might be able to use.. or am I stuck trying to make alot of invoicing data look pretty through html tables?
View Replies !
Security Read Write Files And Folders
when i upload files to my webspace i set permission to my files and folders. Im wondering how im unsafe if i grand a folder or file with write permissions to all/everybody. In fact I have the intelligence to understand that ones can places files to my webspace and then execute them. But I dont have the knowledge how to implement it. How can i write to that folder and files?
View Replies !
Access/read Log Files That Are On Different Servers
I am trying to access/read log files that are on different servers (not web servers) to my scripts but don't seem to be able to access them. I get the following error: Warning: file("IP_Addressdredrent.log") - No such file or directory in c:inetpubwwwrootAutoreportslog_processingcheck_dre_query_log.php on line 15 I am using Windows 2000 and IIS. Code:
View Replies !
Email With Attachment - Annot Be Accessed. The File May Be Read-only, Or You May Be Trying To Access A Read-only Location.
It is a basic email with an attachment. The email and attachment are getting sent and received ok. When the recipient tries to open the attachment, the right application opens (eg. Excel) but then throws up an error. I am using base64 encoding. For example: .xls file with base64 encoding: 'testing.xls' cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding. .pdf file with base64 encoding: There was an error opening this document. The file is damaged and could not be repaired. so the file isn't being decoded right. I have tested on Yahoo and Outlook. PHP Code:
View Replies !
Read/Write
I have an admin page that adds events into a .dat file on the server as plain text. Code: <?php //format incoming form data $content = $eventname."|".$eventdate."|".$eventabout."|".$url."|".$date."|".$author."|".$id."|".$email."|".""; //rewrite data file with new data //place newly submitted post at the beginning. $eventsfile = "../events/events.dat"; $handle = fopen("$eventsfile", "r"); $contents = fread ($handle, filesize ("$eventsfile")); fclose($handle); $handle = fopen("$eventsfile", "w"); fputs($handle, $content.$contents); fclose($handle);?> The effect is to read the data from the file, put the new data at the beginning and rewrite the file. So I guess my Questions are: 1) If more than one person submit the form at the same time is there any chance for data loss? Does php que file requests? 2) Is there a better way to accomplish the task 3) Any and all suggestions on improvement are appreciated.
View Replies !
Dir Read / Write / Edit
I have some files in web server in a dir (e.g. /download/*.*) I don’t want any kind of database support. Objectives: - I want to upload files in that dir. - I want to see all files in that dir. - I want to delete/Edit the files. - I want to download the files. - When I click download the files, In case of Image files (or, any file types that the Brower can open) it open automatically open in to that window (But I want it to download only)..
View Replies !
Can't Read/write To MySQL
I recently upgraded from php4 to php5. I would of done it a long time ago but I always get problems with the conversion. Like this for instance. Now I cannot seem to read and write to MySQL what-so-ever. It works fine under the php4 environment but is just not wanting to work under php5. I can make the connection to the MySQL server and even to the MySQL database, but I cannot read or write to the tables! I'm sure it is just some minor detail that I am missing, but meh, I cannot figure it out. Here is my info: Code:
View Replies !
Text File Read / Write
im trying to make a poll that uses a text file for storing totals, and...well its not working. I have a text file with 5 values seperated by semicolons, like 1;2;3;4;5, and that file is poll1.txt. If I supply the script with an option, it will succesfuly read and show the contents of the file, but when I try to change one of the values and put it back, it fails. It writes to the file with loads of black squares and more semicolons than are in the $newresults variable. Follows is the incorrect code:
View Replies !
Fopen Read And Write Problem
I'm trying to write a script that will read from a text list of songs that I burned onto my CD (Albums011.txt), then write to the database text the new text made ready for inserting into a database. The entries from the Albums011.txt look like this: Wayne Newton - Wild Cool & Swingin' - 03 - But Not For Me.mp3 Wayne Newton - Wild Cool & Swingin' - 04 - Wives And Lovers.mp3 etc. and I want to manipulate it them to look in the database.txt like this: INSERT INTO `lists` VALUES ( "Albums012", "Wayne Newton - Wild Cool & Swingin' - 03 - But Not For Me.mp3 3.25MB 192k "); INSERT INTO `lists` VALUES ( "Albums012", "Wayne Newton - Wild Cool & Swingin' - 04 - Wives And Lovers.mp3 2.88MB 192k "); The non-working code I've written is below: <?php $filename = 'e:mircCDListsAlbums011.txt' $fp = fopen($filename, "r"); $contents = fread($fp, filesize($filename)); fclose($fp); $filename = 'e:mircCDListsdatabase.txt' $fp = fopen($filename, "a"); $string = $contents; foreach($string as $key=>$val){ $write = fputs($fp, "INSERT INTO `lists` VALUES ( "Albums011","$val"); "); } fclose($fp); ?>
View Replies !
Config File, Read And Write?
Does anyone know a function, class or library to easy edit configuration file? Like the XML functions but than for configuration files. Or should I write my own class for this?
View Replies !
Read And Write To Text File
I am trying to do a simple thing: read a line from a text file and write this line to another text file. The problem is: when I write the text into the new file there is an empty space between each characters. EG my original line is abcdef and the result is: a b c d e f . I tried and tried, searched google, but I am stuck... How can I read line n from one file and write it to another file exactly the same?
View Replies !
How To Read And Write Into A Word Document
I am working on a recruitment site and in that we have an option of cv upload. Either text, or word couments (.doc or .rtf) are allowed. I am able to upload the file successfully, but when I try to read that file and try to show in a textarea field I see some junk characters also getting displayed. Can anyone tell me what function should I use to suppress that junk and show only the text? What I am doing is open the file in read mode, read the entire contents of the file and display it.
View Replies !
Write A Function That Will Read In A Text Document
I'm trying to write a function that will read in a text document containing various bespoke tags which I then expand into the appropriate HTML. I've done most of them but was wondering if someone could help me with this particular one .. I'm guessing I should be using preg_replace but can't seem to get it to work. I have a variable called $rec_id which is an integer. The following is the conversion I want to perform: Code:
View Replies !
Read/Write Text File Manipulation
I have a script that writes a hit to a text file, but lately I have been noticing that the text file number is decreasing, instead of increasing or stay the same. Could some one be doing this and if so what is a good security measure to put into place to prevent this from occuring? I would prefer not to register the hits in a database; I would rather stick to a text file storage medium for this case.
View Replies !
P3P Compliant, Still Can't Read/write Cookies From IFRAME As 3rd Party Document
I have two sites, both with valid P3P policies that passed the W3C P3P validator, including the P3P compliant HTTP headers test. On one of the sites, Site A, I have a web page that loads a document from Site B in an IFRAME. In this context the web page on Site A is the "originating" document and the web page on Site B is a 3rd-party document (since it's from a different domain). I thought that having a valid P3P policy would make IE6 in the default Medim setting, allow cookies from my IFRAME document from Site B, but apparently it still does not. I am getting the dreaded "red-eye" and the document from Site B can't read/write cookies while in the IFRAME. Is this correct, that you can't read/write cookies from an IFRAME as a 3rd party document, even if you have a valid P3P policy that indicates no PII (Personally Identifiable Information) is collected? Or can I fix this somehow?
View Replies !
I Am Trying To Read Access Log File
My access log file is has more then 8 lakhs lines. I am trying to read the log file and populate the data in database. But due to long file I am not able to read the file after certain time. It is showing an error: Code:
View Replies !
Read & Full Access
We have a login page that we have people login to access information. We want to be able to deny access to a certain link depending on what password they enter. the login informatin is pulled from the DEALER_NUM and PASSWORD field in the table. I have created a field called PASSWORD2 which is what we will be using for the special access if thats what you want to call it. Code:
View Replies !
Restricting File Read Access To Users But Not Server
I`d like to know if it is possible to place a products.dat file on my website, yet restrict users so that they cannot see or d/l the file, but they can access it through a php file which is run by the web server which has the only access to the products file when browsing. Does this make sense?, its basically client server, but since my php knowledge isnt great yet, Im not sure if this is easy or not?
View Replies !
Read Data From MS Access Into MySQL In Real-time
I am currently working on a project that involves reading information from a inventory system into Access via ODBC and display the info on the web site using MySQL. I would like to create a live link between the MS Access(local) and MySQL (remote) whenever the inventory system is updated MySQL will be updated as well. I know that MyODBC will let me do the opposite of what I would like to accomplish by reading data in MySQL into Access. Is it possible to do the reverse way.
View Replies !
Try To Write Files
I am using SuSE 9.3, php5 and Apache2 on Linux. I try to write files to the hard drive using the following command: $filename = "test.txt"; if (!file_exists($filename)) touch($filename); if (is_writable($filename)) $myfile = fopen( $filename,'w+'); else { echo "Cannot write to file ($filename)"; exit(1); } The script neither creates a file nor open it for writing. When using the same script on Windows everything works fine so I think it is a permission problem.
View Replies !
Open And Write To Files
I am have problems with a php file I'm trying to write. It goes bad when I try to rename a file and open index.php and replace a string with another one. I get the error Warning: fwrite(): 3 is not a valid stream resource in run.php on line 10 Warning: fclose(): 3 is not a valid stream resource in run.php on line 11 I have no idea what 3 is that the errors are referring to. Can anyone see what is wrong? Code:
View Replies !
Ftp /unzip /write Files
I am wanting to be able to go from a php form and ask ftp details and transfer a zip file to a remote server, unzip it and then write 1 or 2 files on the remote server, something like a remote script installation - any tips?
View Replies !
Possible To Write Files Static On A Server Using IIS?
Is it possible to write PHP files static on a server using IIS? For example, this: http://www.domain.com/index.php?prod=Widget&cat=0 to something like this http://www.domain.com/index.php/prod/Widget/cat/0 BTW, I couldn't find this out on my own using site search so if you know how to do this OR can list any relevant links to threads.
View Replies !
PhP Can't Write Or Open Files In Suse Linux
I'm on Linux 10 and none of the file functions work in PhP. I get a permission denied error although I've even chmod the files and directories to 777. I was doing some research on this this and someone had the same problem in a Fedora box. It turned out to be a SElinux issue. Could there be anything in my SuSe that's similar to SElinux?
View Replies !
Changing Write Permissions Of Files And Folder
i want to make the files and folder in my server write protected. i want to change the file read write permissions dynamically so that i can change the write permission of the folder and upload files to it and again make the folder write protected.
View Replies !
Read All Files
I am trying to chmod all my images in one dir. but I cannot get it to work...How do I code the first part so it reads all my files I have in the dir? I want to change all my images cmod settings by running the script once. $file = all my files in my images folder or this directory $old = umask(0); chmod("$file", 0644); umask($old); // Checking if ($old != umask()) { die('An error occured while changing back the umask'); }
View Replies !
How To Read Pdf Files?
I have a batch of pdf files need to be convert to html. Is there good script or library can do that? I made some research, most of them only do another way (convert html to pdf)
View Replies !
How Can I Read .doc Files
Here is a small doubt with which iam struggling,The problem is how can i read .doc files and display content in browser in php.ok i have done it with file() and file _get_contents() but iam getting content with some meta characters like boxes etc. please solve this problem and reply me immediately it i surgent.
View Replies !
Read Log Files
I have a client doing some minor PHP development on my server, and they've asked for access to the apache error log to debug. I don't want to give them shell access, so I thought AJAX/PHP might be able to read and refresh the last 50 lines or so of the log file for them to view on the web.
View Replies !
PHP/IIS: File Read/Write OK, File Unlink Denied
I've got PHP running fine on IIS (OS: Server 2003, SP1; IIS: 6.0; PHP: 4.3.11). In PHP, the user uploads a file, which is then processed and the contents are inserted into a new file, created in PHP, onto the server. This bit works fine, the new file created by PHP is correctly stored. Later, once the user confirms the upload and PHP inserts the contents of the file into the DB, the code tries to remove the file created in PHP moments earlier, via the unlink() function. What I see on screen is the following: Permission denied I have made sure that the permissions for the Internet account that created (and is trying to delete) the file have full permissions over this particular folder and the files within it. But the user must have permission anyway, because they are able to create this file in the first place. I've looked at the permissions for the file in PHP, which read: 0666. So everthing *appears* ok to me; I can't see where the permission issue is coming from.
View Replies !
Write IPTC Data To Jpeg Files - Iptcembed()
I'm trying to do a photo album with php. The admins should be able to write comments, descriptions etc. into the jpeg files via a web form. I tried to implement this with the (still undocumented) function iptcembed() and I didn't get it working properly. After hours of debugging I found the following note in php.notes: "This function [iptcembed()] currently only works for images that have IPTC data embedded in them already." that's exactly what I've found out myself so far but now my assumption seems proofed. Does anybody know a different way to write IPTC-data to jpeg-files that do not aready have IPTC fields included? I haven't found anything in Google yet...
View Replies !
Can Php Read .xls Files Directly?
I'd like to be able to read a microsoft spreadsheet with php. I know that php can read mysql, so I was thinking that maybe it could read excel spreadsheets as well. Does anyone know if that can be done?
View Replies !
Read Multiple Files
I have a PHP script where I read parts of xml feeds from multiple web addresses and display data. Something like : for(){ $filedata = @file(url); parse xml -> display data } My problem : can I read more files at once (multithreading?) - because it seems to work very slow now.
View Replies !
Read Dirs And Files
I have this code which reads all the folders and files within the path. Code: $path = getcwd(); read_dir($path); } function read_dir($dir) { $path = opendir($dir); while (($element = readdir($path)) !== false) { if($element != "." && $element != "..") { if(is_dir($dir."/".$element)) { $dirs[]=$dir."/".$element; // put all folders in CWD into an array $folders[] = $element; } if(is_file($dir."/".$element)) { $files[]=$element; // put all files in CWD into an array } when reading the files.
View Replies !
|