Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





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 Complete Forum Thread with Replies

Related Forum Messages:
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 !
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 & 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 !
Read File - Limit The Number Of Lines To Read
How can I open a file and then limit the number of lines I want to read? say I have a text file and I only want to read line one to get the title of the text within?

View Replies !
Read (and ONLY Read) A Multi-sheets Excel File With PHP.
I want to read (and ONLY read) a multi-sheets Excel file with PHP.
I found so many scripts on the net that I finally don't know what to choose
so... could experimented users help me to directly find the one that I need
?

Here are the two obvious things the script must match :
- free
- can read multi-sheets Excel 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 !
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 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 !
Implode - Read The Contents Of A File (servers) And Create A New File
I am trying to read the contents of a file (servers) and create a new file off of it with more information line by line. You will see the logic soon. I know how to do this via a script but not php.

The end result is servers2 should have (ssh root@$count 'echo $user|passwd --stdin root' ; done). The variable $count is the list of servers in the (servers) file, so it will have the line above for each server name. Code:

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 !
How To Read Out The Content Of A File Named Domain.com/file.php?X=ABC
I have a website where several pages are accessed through PHP-variables, such as:

http://domain.com/file.php?content=abc
http://domain.com/file.php?content=xyz
"abc" and "xyz" also being the .txt-files that contain the content

which is inserted into file.php through readfile().

So far so good. Now I'm working on a PHP-powered search script, which is supposed to read out the files and extract keywords. Therefore it has to open each file and get the contents into an array using file(). Code:

View Replies !
Read A Text File Then Find Keywords In That File
how do i make php read a text file then find keywords in that file and only display the results of what it found (i'm going to use wildcards with the keywords so i can sort data to different text files)that way it can only display the part of the text it found and write it to a new text file. i was wondering if anybody could give me an example of that or tell me what commands?

View Replies !
How To Read A File, Edit And Replace That File With New Changes?
I am making a enhancement to our helpdesk product. So we are using JSON for saving the Language defaults. Now I am Using PHP as a server based language. Now here is the logic of the program. Whenever our product is installed then a parser will create a HTML file which will have all the defaults from the JSON file. Now when a user changes the language then the parser will again Run and make the required changes in the JSON file and again create the HTML file and Replace it in that folder. I am not able to find a good solution for this.

Can someone help me building it. I am not able to get how to Open a file, Read it, make the changes and Replace that file.

View Replies !
Warning: File(): URL File-access Is Disabled In The Server Configuration
Does any one know how to work around this error on a web site?

Warning: file(): URL file-access is disabled in the server configuration ...

View Replies !
Access Button In HTML File Through PHP File
I’m new to PHP and I’m working on a code and having a problem .
The problem is that I’m having an HTML file like this :

////////////////////////////////////

<p>some text</p> <form action="/project/myfile.php" method="post"> <input type="button" name="mybutton.1" value=" mybutton "><input type="text" name="aaa" /> </form>

<p> some text </p> <form action="/project/myfile.php" method="post"> <input type="button" name=" mybutton.2" value=" mybutton "><input type="text" name="aaa" /> </form>

//////////////////////////////////////

I want to open a new HTML file to the user when he clicks on any of these buttons . I want to do this in the file named “myfile.php “ . What should I write in the file “myfile.php “ to get access to each button and open a new page when the user clicks on it? Is it correct to put " action="/project/myfile.php""? Should I put include the HTML file in my PHP file? I want also to remember which button the user clicks on.

View Replies !
Read Log File With PHP?
It turns out that opendir and a number of other cool PHP features are disabled by my host. I've had to deal with similar issues before and have worked around them (that's part of the fun.)

What I am trying to do is create a PHP file which will delete specific files from a directory that are more than 24 hours old. My question is this:

Is this possible without readdir and opendir? Can I use fopen and fread as alternatives in my solution?

The key problem that I see is that I can read the log file but where do I begin to parse the log file into file names and dates?

Typical entries in my log file would look like this:

2007/05/02 2:00:31 :
File http://www.example.com/myFile.zip
Sent to someone@example.com

2007/05/02 2:08:31 :
File http://www.example.com/myPic.jpg
Sent to someone2@anotherexample.com

I guess I would have to somehow define the format of each entry? If so how would I do this. Is this idea even realistic with PHP?

View Replies !
Read A File Name?
Is it possible to read a file name from inside a file, then set that name to a variable?

View Replies !
Can't Get Php To Read Ini File.
My configuration is Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.7d
PHP/5.0.4 on Solaris 10.

phpinfo() lists the location of php.ini as /usr/local/apache/conf and
my php.ini file is there but for some reason it does not appear to be
being read by php. I have defined things such as upload_tmp_dir in
that file yet even with restarting apache I am not seeing this
reflected in phpinfo().

View Replies !
Read An Xml File Using Php
i am trying to read an xml file using php and i am stuck at a place, below are my xml tags, i have to retrieve the attributes of the parent and the corresponding tags Code:

View Replies !
Php Read A File
I am using the following to read the contents of a file.

$Tp = fopen("./orders/T" . $oid , "r" );

This usually works, however the order directory is password protected making this code produce an error:

--Warning: file("./orders/T1166964955") - No such file or directory in...--

Is there any way whicj I can supply the usernameassword to this code : $Tp = fopen("./orders/T" . $oid , "r" ); or will I have to have the file T1166964955 in a non-secure area.

View Replies !
File Read
I have a file. I want to read in the first 64 bytes, as 8, 8 byte integers.

Does anyone know how to do this? It is a binary file, so I was thinking to open it up as binary, read($fp, , then convert it to a number somehow?

View Replies !
Read From File A Then Read From File B
I am try to read from file A then read from file B

I need to read all the words from file B and extract them from A

for instance File A = the boy ran down the road
file B = ran, road

the ouput should of A should be boy down road then output this to the screen, any takers I have this so far, but i need to subtitute the variable $Key with a file. Code:

View Replies !
How To Read The Utf-8 File By Php.
I have some japanese utf-8 files, translated from english..
how to read it use php program?

View Replies !
Read An 88.8MB File
i am trying to read an 88.8MB file (approx 466,312 lines) where each line will be stored in the database. Problem is, php stops reading at 56,000th line. I have tried it with smaller files and it works perfectly. What should I do to make it read til the end of file? Do I have to change my php config?

View Replies !
Read From One File
What I need to do is read from file A and then take what is read and place it in a certain spot in file B. Is there a way to do this with PHP? I know that a file can be read and then altered, but I have been unable to find a lot of information about reading from one file and writing to another.

View Replies !
Read Xls File
How do I read an xls file on linux platform?

View Replies !
Another Read File Question.
I have been trying to read portions of a text file into variables that will display on a page and confirm adding them to mySQL.

I have found the posts on how to read parts of a file when there is something that you can search for like PHP Code:

View Replies !
Read An Excel File ?
Does anybody know how to read a Microsoft Excel file from PHP?

View Replies !
Can Not Read URL Using File Command
I can not read URL using file command but i can read other files. Another question session does not work in my computer. To be able to do these two things what changes should i make in php.ini .

View Replies !
Read First 10 Lines From A File
I have an ASCII file with each data record on a separateline. Each field is
delimited with a TAB (ASCII 9) character.

Now i want to read the first 10 lines and show them on my site.

This is what i already have reading the first line:

$fname = "http://www.somedomain.com/file.txt";

$fd = fopen($fname, "r");
if ($fd) {
if (!feof ($fd)) {
$buffer = fgets($fd, 4096);
$field = split(chr(9), trim($buffer));
$field0 = "$field[0]";
$field1 = "$field[1]";
}
fclose($fd);
}

echo ("$field0 - $field1");

How can i do this voor the first 10 lines?

View Replies !
Read A File Of String Into What?
Pardon the simple question, but I have just begun to learn PHP. So far so
good - all the examples in my books actually work.

One thing that none of them address is how to read a file of strings (like
names or URLs or whatever) into something so that they can be deleted,
modified or a new one added. In a language like Perl/TK or Delphi a
listbox is used if you want to edit line by line or a memo box if you want
to edit like you are in Kwrite.

All the examples assume that I want to enter data into a Text area or
Listbox by keyboard, then read it back in. Never the other way around. I
can use a Fget routine and read the file to the screen, but not to
anything in which I can edit yet.

So far I have learned a ton of stuff trying, but haven't made it work yet.

Should I be reading the data into a Textarea, a Listbox or something else?

View Replies !
File Read Problems !
I am trying to read files from a remote location and only get part of the file. I do not get any errors but seem to not get the last few bytes. Why? I thought that it was because of magic_quotes, so I tried to set that right ...

set_magic_quotes_runtime(0);
$fd = fopen ($filelink,"rb");
$contents = fread ($fd, 100000);
fclose ($fd);
set_magic_quotes_runtime(get_magic_quotes_gpc());

View Replies !
Read File From Harkdisk
I want to know how to read file from HArd Disk (assume it is sequential file)or CD ROM
or any other drive on LAN (But not on web) What is the way to read Excel or Access file from HArd disk The profrom will be running on web and read data from Local Hard Disk or Cd ROM.

View Replies !
Trimming Everything Off Of A File After A Tag Has Been Read.
I am having now is that I have a sciprt so people can add news, only problem is that after it is added I get a bit of access writing on the end, <br> and other stuff different every time.

Can someone do an example of how to trim the end of the file after the it sees the tag [/NTBL]. The trick is there is more then one [/NTBL] tag and it needs to only trim everythign after the last time the tag is seen.

View Replies !
Need To Read The File Contents
I have a small problem.i need to read the file contents from the url.here is the desc of the problemthe file(local file with compelte path) name should pass thru url(no file upload option)so i need to read that file and store that content in the databasehere is the examplehttp://example.com/read.php?file="D://text.txt"Once i enter this url in the browser, i need to read that text.txt file and store the content of text.txt into DB.

View Replies !
Read From File Into Array
I see what my problem is but not sure what I need to change. I'm
reading a single number from a file that's fed into an array but the
array doesn't want to print out its output.

$oncall=array();

$oncall[1]="msims";
$oncall[2]="dtilbury";
$oncall[3]="jma";
$oncall[4]="jweaver";
$oncall[5]="cirwin";
$filename="oncall/.oncall";

$n=file_get_contents($filename);

echo "$oncall[$n]";

This prints nothing.
But when I comment out the file_get_contents and simply do $n="2" the
array prints out dtilbury like it should. My guess is the error lies
in how $n is being assigned from the file_get_contents. Any thoughts?

View Replies !
Read A File Below Root
How can I include a file from below the Root dir, other than using:
include "../../filename.inc.php";

View Replies !
Some Gzip File To Read
I have some gzip file to read.,I can able to read. But i need to edit the content of a gzip file, I can read the contents, and when i try to write it just create an another file. But i need it to be saved as the same file so that i can read from the same file in future...

View Replies !
Saving CSV File To Read From Php
Let me explain what I am trying to do first. I want to upload a .csv
file from a form page to the redhat server. Uploading is working fine, I could upload the .csv file to the server. But when I open the uploaded file using VI editor in the server, I see "^M" characters and all CSV formats are disappeared. Also "fgetcsv()"...

View Replies !
How Read ONLY Last Row ASCII File
PHP code .....

<?
//Open file.
$file=fopen("file.txt","r");
//read file so long when it isn't end.
while (!feof($file))
{
//read and print row + LF.
$rivi=fgets($file,1024);
print "$row<BR>";
}
//Close file.
fclose($file);
?>

.....is read file(ascii) and print it display.



View Replies !
Can PHP Still Read Contents Of The Zip File?
If a zip file is password protected, can PHP still read contents of the zip file?
I need PHP to check to make sure the zip file does have a password, and that the password is the correct password.

View Replies !
Read Msword Doc File
iam using linux server........how to read msword doc file and how to stores the data in a variable.....

View Replies !
Strpos(), Read A File Name
I am trying to read a file name. i want this code to check if the filename conatains a dash or not and i am trying strpos()

if((strpos($filename, " - ") === false) ¦¦ (strpos($filename, "-") === false)){
$splitby = "test";//do stuff if it does not contain a " - "
}
else{
if(strpos($filename, " - ") === true){
$splitby = " - ";
}
elseif(strpos($filename, "-") === true){
$splitby = "-";
}
}
echo $splitby;

nothing comes up for $splitby. Am I doing this correctly?

View Replies !
Read Data From Txt File
I wanted the script which works as a catalogue page but in php and use txt file as a database . Product name and description is stored in txt files . Result should be display as following

Product a
Product description

Product b
Product description

and so on

if pagination in this script is possible so it would be great. The structure of a file will be like this

Product A, Product A description
Product B, Product B description

View Replies !
Read Data From File
I need to read data from text file with 20 lines each line with some text
In the beging I want to read only the first 5 lines, and insert each line content into object. i.e

$line1 = first line
$line2 = secound line.......

Can someone help me with writing the code?

View Replies !
Read HTML Or TXT File
Does anyone know if this is possible? Script reads a HTML file or a TXT file and output the data to MySQL database.

View Replies !
Read A Certain Line From A File
How could you read a certain line from a file, so for example you have a file: Code:

row1column1|row1column2|row1column3|row1column4|row1column5
row2column1|row2column2|row2column3|row2column4|row2column5
row3column1|row3column2|row3column3|row3column4|row3column5
row4column1|row4column2|row4column3|row4column4|row4column5

I know you can read through the lines with fgets() but I want to know whether there is a way to get only a certain line without having to load the whole file (or any other rows) into php (imagine a file with 1000+ rows).

View Replies !
Read And Write File
I have a file like this:

name
city
435

I want to increase only the last row (example: 435 +1) and leave the others rows.

View Replies !
PHP.INI File Wont Seem To Read?
trouble getting my PHP extensions to work, since in phpinfo() I can see my extension path is set to "C:php5" which should be "C:phpext".

in php.ini I´ve changed to "c:phpext" but it still dont do nothing..?

phpinfo() shows that php.ini should be in C:WINDOWS which it is!


View Replies !
Best Way To Read In A Flat File DB?
I am writting a script that needs to read in a rather large flat file database (.txt). It is about 300k and contains approx 15,000 records (ie lines)

I was going to simply use include()
$db = include("flat-file.txt");

And then word with $db.

However, is there a better way to do this? [faster, more scalable] Such a fopen(), etc...

View Replies !
Read File With Html
I have a PHP program that throws some text into a file.

Later I display it using the code below (php and html).

But I'm trying to hop up the code a little and would like to bold/blink/underline just a few lines of the output.

I've inserted the
HTML Code:
<b> xx </b>
into the file along with the text at selected points.

When it reads it it just puts HTML Code:

</b> </i> </blink>

right onto the screen.

PHP Code: ....

View Replies !
Read Tags From An Xml File
i want a $variable to hold all text in an .xml file INCLUDING tags (<tag></tag>) but what ever function i use (file_get_contents, fread etc ) i dont get tags, I dont know how to solve this problem. In PHP documentation I found eregi().

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved