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




Catching "File Name Too Long" Errors


Is there a way to redirect on "file name too long" errors?

I'm using mod_rewrite to handle all unknown urls with an error page.
That's not working for this error. Apparently the "file name too long"
error occurs before mod_rewrite is invoked.

Setting up an ErrorDocument is also ignored, even though it looks to the
user (and listed in access.log) as a 403 error, it's not a normal 403
error.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Errors Won't Show Up Even With Error_reporting(E_ALL) And Ini_set("display_errors","1")
Here's my code:

<?php

error_reporting(E_ALL);
ini_set("display_startup_errors","1");
ini_set("display_errors","1");

wefw
wefwef=wefwe
2349023909()
;wrgwrg ====232

phpinfo(); ?>

I get a blank page.

If I take out the crap, it prints phpinfo() just fine.

PHP 4.3.something...

'echo "": No Such File Or Directory" Error Using "exec" To Pipe In PHP Script
[TCL]
set php {<? print_r("Hello World"); ?>}
puts $php; # PRINTS OUT <? print_r("Hello World"); ?>
puts [exec "echo '$php' | php -q"]
[/TCL]

When I try this within TCL I get the following error:

Parse Errors With "case "action":
I want to call an action that is in a file called "configm.php" but I get a parse error on line 8. (the bit that goes 'case "add":') Code:

Failed To Connect To Mailserver At "localhost" Port 25, Verify Your "SMTP" And "smtp_port" Setting In Php.ini
Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
verify your "SMTP" and "smtp_port" setting in php.ini

in php.ini I have:

SMTP = localhost
SMTP_PORT = 25
SENDMAIL_FROM = NULL
SENDMAIL_PATH = "H:WINNTsystem32" (this is where sendmail.dll is
sitting. H is the drive with w2k)

Other PHP code on that page is working.

What else should I check?

"Page Not Found" Because Script Takes Too Long?
I am developing an online calculator for my school district. Without going into too much education-ease, the idea is simply that the user puts in some numbers, and the system crunches those numbers. The form, and the form handler are contained in one script, using a hidden variable to tell the script to process the information upon submitting to itself...

Everything was working great, until I put in the various algorithms... They are not particularly numerous, lengthy, or complicated, but clicking on 'Submit' now yields a 'Page not found' error. When I commented out half of the math, the page loaded ok...so it seems to be 'timing out'... I'm baffled.... this script is simple, and short... what could be the problem????

Here is the math part of the script..

Echo "<!--#include File="top.html" -->";
I have a search script which returns a page of results, however I'd like the returned page to be in the same format as the rest of my site.
To do this I've tried adding the HTML for my site to my PHP page with echo" " commands. This works for the plain HTML, but my regular pages also use SSI to do other stuff (some of them even execute other PHP scripts to generate tables of data etc). I've tried

echo "<!--#include file="top.html" -->";
but it doesn't work as I get a parse error. My question is, how do I go about doing this properly? Is this possible at all? And if not have you guys got any suggestions to get around this?

Any File Size Limit In <PARAM Name="***" Value="***"> ?
I embed an applet in my php script which has a parameter providing an
input file for the jar. Does this file has size limit?

The code is as follows:
<APPLET ARCHIVE="myapplet.jar" WIDTH=372 HEIGHT=360 VSPACE=0 HSPACE=0
ALIGN=middle>

<?php echo "<PARAM NAME="data" VALUE="myfile.">";?>

when "myfile" is beyond 15M, my applet cannot load sucessfully, but
while this file is limited like 5M or 7M, it works well.

Does anybody know is the reason caused by php script limit, applet
mechanism, or by different browser?

I'm Getting "out Of Memory" Errors When Trying To Resize An Image
I've a jpeg image that is 514k, which doesn't strike me as very large.
Yet I'm running out of error when I try to resize it:

Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to
allocate 12288 bytes) in
/home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/resizeImageToSquare.php
on line 82

How can I protect against out-of-memory errors?

How Do I Do Something Like $color = ("red", "yellow", "blue")[$colornum]?
How do I take an index of a literal array, instead of a variable?

That is, say I want to get the short name of a month. Can I do
something like:

$monthname = ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec")[$month];

or do I always have to do:

$blah = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec");
$monthname = $blah[$month];

It seems a shame to have to create a variable specifically for this
one-shot purpose.

"Message Too Long"?
When fetching remote files with file($url), I frequently
encounter the Warning-level error message of the form:

Warning: file("http://etc.etc.") - Message too long in
whatever.php on line xxx

I have searched the php-manual web site for the phrase, but
found nothing.

Could someone be so good as to explain what that warning
message signifies?

Preventing Visitors Ability To "re-visit" A Page Via The "back Button"..
I have a rather complex registration/member sign up form.. which gets a little confused, when a visitor "backs" completely out of the form, then for whatever reason returns to the form. The form contains 'cancel' buttons, which naturally cancel the reg process and redirects them to the document just before they started.

JS provides us with the "location.replace()" method, but I can't seem to find a way to coordinate the use of location.replace() with the posting of the form values. In short, I want to "replace" the first step of the form with the "second step".

I think what's making this tricky, is that each step of the form are located within the "same" page (register.php). The document works like so: The first step is the "Member Agreement" when they click "agree" (submit) the system creates a new row in the temporary register table of the db.

It then issues a registration cookie, which carries the row id, and session value. in addition (for those cookie impared users) we carry the row id and session value in hidden elements. So far, as long as the user continues through the process all is fine, but if they (for whatever reason) back all the way out, and click 'agree' again, the process fails.

I guess I have to find a way to force a reload of the 1st step "if they've gone back" OR "replace()" the first step with the second, so as to prevent the user from going "back" to the 1st step of the register page.

Pagnation - Limit Number Of Pages Between "Previous" & "Next" Hyperlinks
Was hoping for some advice with a part of page navigation....

It works at the moment so there is a "Previous" & "Next" Hyperlink underneath the records. In between the Previous & Next links are the number of pages that there is of these records. e.g:

Previous 1234 Next

This is fine if there are only a few pages of records, but when there are hundreds of pages the numbers are listed and they take up half the web page with them.

How can i make it so only limited 10 numbers of pages say appear between the "Previous" & "Next" Hyperlink and as you progress through the pages they are as do the next 10 numbers of pages? Code:

[regex] Stripping Out "name" And "value" Values Out Of Tags, Aaargh
Searched through the site, but couldn't find the right regex syntax I was looking for.

the thing i want is, to extract with preg_match_all the given values in a tag...

ex.

$str = '<input type="text" name="name" value="value">'
$pattern = some magic stuff I need to know
preg_match_all($pattern, $str, $result);

And in result I want to have the values text, name and value AND it's important that the order doesn't matter
so structure of tags can be <input type =name= value=> or <input name= class= value= type=> etc, etc...

Group Mailing, Want To Suppress All The "to" Addresses In The "to:" Field
I want to do a mass emailing for a club.
I don't want all the clubs members to see all the addresses of the
other club members for privacy reasons.

How do I set up the php mail function to not display the recipients
email addresses, just to display something like, "U7 Soccer Club
Team"?

'Parse Error' Problem In "isset" And "empty"
I've been having some problems with a parse error that I can't figure
out (PHP 4.3.11 on Solaris9). Sample code:

<?php
// getting strange parse errors on this
class A {
var $value;
function A() {
$this->value = 1;
}

function getValue() {
return $this->value;
}
}

$a = new A();
if (!empty($a->getValue())) {
echo "success";
}
else {
echo "failure";
}
?>

The result of this is:

Parse error: parse error, unexpected '(', expecting ')' in
/foo/public_html/parse_errors.php on line 15

I also get the same effect with "isset", however, testing with "is_null"
or "is_int" produces the correct ("success"/"failure") result. Any ideas?

Multiple File Upload From Client Pc To Server Without Using <input Type="file"> Cont
I am working on a application which requires me to upload the contents of all the files from a particular folder in clent pc to the server.

In my code i just want to mention the folder name which may contain any number of files.Folder name will always be fixed.
I dont want to use <input type=file > control.

Is there any way i can achieve this using FTP or any other way in PHP.Any help will be greatly appreciated.

How To Do PHP "require()" Or TCL "source" In Bash Script
I can't figure out how to explain this any better than
this.

In PHP we have a command "require()" that obtains a file and logically
places it into another file.

I cannot figure out how to do this in bash script as the requirement
is necessary for a migration script to obtain the code from a .cfg
file and then be able for the "parent" script to run the code it
"imported" from the .cfg file, much like PHP's require() or TCL's
"source".

This is what I have so far and it fails:

if [ -f ivc.cfg ]; then
cat ivc.cfg
fi

Anyone really know bash script well please help, it's a barrier for me
not to be able to get just this one piece working.

Error In Page When Checking Http_get_vars("myvar") And "myvar" Was Not Passed In URL String
PHP, coming from ASP coding

if (HTTP_GET_VARS['b']==1){
print "Yes";
}else{
print "No";
}

when "b" is not passed via
(http://www.mydomain.com?b=1

an error occurs and the "NO" is printed but an error is printed too.

How can I check for the value of "b" so that no error occurs if b is
not passed??

example

http=www.mydomain.com

$myvar=HTTP_GET_VARS['b']

causes an error because
"b" does not exist (ie. its not passed in the URL string.

$myvar maybe evaluated as NULL or Empty but the error is printed in
the page, anyway.

Getting The Remote File Path From <input Type="file">
I'm using a form to upload a file to save in a mySQL database, however I need to store the original file path on the clients (the user uploading the file) computer.

The file path is shown in the field that selects the file, I just need to post it or save it in a session somehow.

Form "file" Field, Browse For Certain File Types.
I know I can't control the default browse when the user clicks browse next to a form file field. I.E *.pdf, *.jpg. Its just *.* - and I remember its something to do with security....but I cant remember the reasoning.

"failed To Open Stream No Such Directory Or File" Apache Suse 10.0
<<"failed to open stream no such directory or file>>

Avez vous trouve ? J'ai le meme genre de probleme en essayant
d'installer en local avec SuSE 10 apache2 php4 , il me semble qu'il
manque un package mais lequel ?

Quote:

"copy()" Function Not Working With File Upload
Below is a multiple-file upload script. The form input part works ok. The variables $FileType, $FileName, $FileSize, $TempName, and $FileError work fine. But just after $FileError (which does not output an error message) the script just stops. The problem appears to be with the "copy()" function. I can simplify the script, make it just a single file upload script, use the variable $userfile for the first part of the "copy() function, and it uploads the file just fine.

The problem is when I try to make it a multiple-file upload script like the one below - then the copy function won't work.

I would appreciate if anyone could spot the problem.

PHP Code:

$Admin[UploadNum] = "10";
if($FileUpload) {
for ($Number = 1; $Number <= $Admin[UploadNum]; $Number++){
if ($FileUpload) {
$FileType = $_FILES["userfile"."$Number"]["type"];
$FileName = $_FILES["userfile"."$Number"]["name"];
$FileSize = $_FILES["userfile"."$Number"]["size"];
$TempName = $_FILES["userfile"."$Number"]["tmp_name"];
$FileError = $_FILES["userfile"."$Number"]["error"];
echo "File Type: $FileType<p>"; // $FileType prints out fine.
echo "File Name: $FileName<p>
"; // $FileName prints out fine.
echo "File Size: $FileSize<p>
"; // $FileSize prints out fine.
echo "Temporary Name: $TempName<p>
"; // $TempName prints out fine.
echo "Error Message: $FileError<p>
"; // Does not output error message - appears to work fine.
// ------------ The script stops working right here ------------
if (copy ($_FILES['userfile'.'$Number']['name'], "users/".$_FILES["userfile"."$Number"]["name"]."")) {
    echo "Your file was successfully uploaded!<p>
";
} else {
    echo "Your file could not be copied.<p>
";
}
}
}
unlink ($userfile);
}else{
echo "<form action="$PHP_SELF" enctype="multipart/form-data" method="post">
";
for ($Number = 1; $Number <= $Admin[UploadNum]; $Number++){
echo "<input name="userfile"."$Number" type="file" size="25">
";    
}
echo "<input name="FileUpload" type="submit" value="Upload Files"></form>
";
}

Value Of Variable Shown As "Array" When From Included File
I have this statement to find the latest date that a row was inserted
________

$entry=mysql_query("SELECT contact FROM board ORDER BY contact DESC
LIMIT 1")or die ("Query failed:<br>$entry<br>Error: " . mysql_error());

while($myrow=mysql_fetch_array($entry)){
if (ISSET($myrow['contact'])){
$latest = date("d M y", ($myrow['contact']+50400));
}
}
________

This reports the value for $latest correctly if the statement is in the
document.

However when the statement is in an included file the reported value for
$latest is ... Array

Where am I going wrong?

Warning: File("") - Inappropriate Ioctl For Device In
any one come accross the following:-

Warning: file("") - Inappropriate ioctl ......

Wile trying to read in a file using file();

Include("....file.php") Doesn't Work (error 2039)
I have a problem with include. I am develloping a site www.mobiclips.net.
I have placed the php files dealing with the gui, getting the pictures and the
download all in seperate folders in the root. Now I want to include the header an db.php,which are in the root. I have to use something like this <?php
include("....dbconnect.php")since I grouped all php related to each other in one map which itsel is in the map called PHP.

It works fine on XP amd windows 2003, but it does not work on the webserver on
linux. Notthing shows up. A few test showed that .. go up a level doesn't work.
When I put Echo ERROR_ALL I get error 2039 ...

Validation Return Query? - Type="file"
When a user clicks submit on my form, it will return with a list of errors and will populate all the fields with the correct data that the user has already entered.
ie.. <input name="contact_name" type="text" value="<?print $contact_name; ?>">

... and so on throughout the form. This works fine except for when I try and populate a file textfield with the file the user has tried to upload.

<input style="width:200px; "  name="userfile" type="file"  id="menu_textbox" value="<?print $target; ?>" />

I am not sure how to approach this. When the user hits submit and  the form returns errors . . the files path will not be saved to the database. But as I dont know how to populate type="file" with the file the user already selected, when they hit submit again. obviously no file will be uploaded.

Coding "NEXT" And "PREVOIUS" Buttons
Hi

I am stuck here. I am doing a form which dispalys details of client companies. My query includes this statement:

.... WHERE CompanyName LIKE %$name% ....

What I need is following: if a query returns more then one result I what to "flip" through result with NEXT and PREVIOUS buttons.

Mysql/php - "LIMIT" And "ORDER"
In the following fragment of code, I am querying a database that in order to display a list of films. The list is very long and I would like to offer the possbility to restrain the range of results showned by page keeping in mind that the user should be able to browse forward or backward data if applicable. I know that I have to add the LIMIT method in the MySQL query but I have a hard time figuring how not to get lost in setting it dynamically in the PHP script.

Then I have a second question. Is there a more elegant / straightforward way to deal with the display order of the data (cf. $ot, $od and $oy)? Code:

Sticking "if" Or Changes Within A MySQL "where" Array?
I'm not exactly sure how to even ask the question, and I know my terminology
is not good as I'm a SQL beginner, but, here goes.

I need to find a way to make an if statement within an array...or, the
"while" portion of a recordset.

The best way I can ask is show what I mean.
http://oscarguy.mechphisto.net/awardbrowse.php
If you go there and select an award (like Best Picture), leave the year
field alone, and select YES and submit, you'll see a lot of results. And I
have HR's dividing each entry.

What I need to do is group all the entries of the same year, or at least
only put HR's between the blocks of years.
So, I'd have all the entries for 2002, an HR, then all for 2001, an HR, etc.

Here at the bottom I'll include my PHP code I'm using so far.
But I have no idea where to even start looking for an answer...if it's even
possible.
If someone can just give me the name of the function or process or
technique, then I can go Web/book searching myself...I just need a direction
of where to go.

PHP:------------------------------------------------------------------------
------
$query_RS_award = "SELECT * FROM $award WHERE id != &#391;' ORDER BY year DESC,
w DESC";
//$query_RS_award = "SELECT * FROM $award WHERE year =
"$year"";
$RS_award = @mysql_query($query_RS_award, $connection) or
die("Couldn't query: " . mysql_error());
$totalRows_RS1 = mysql_num_rows($RS_award);
while ($row_RS_award = mysql_fetch_assoc($RS_award)) {
$award_id = $row_RS_award['id'];
$award_tblid = $row_RS_award['tblid'];
$award_award = $row_RS_award['award'];
$award_year = $row_RS_award['year'];
$award_category = $row_RS_award['category'];
$award_won = $row_RS_award['w'];
$award_film = $row_RS_award['film'];
$award_nominee = $row_RS_award['nominee'];
$award_note = $row_RS_award['note'];
if (!($award_category)) {
$award_category = "n/a";
} else {
$award_category = $award_category;
}
if ($award_won == "1") {
$award_won = " - Award Winner";
} else {
$award_won = "";
}
$display_block_Award .= "YEAR:&nbsp;<span
class='normalText12White'>$award_year</span><br>FILM:&nbsp;<span
class='normalText12White'>$award_film</span><br>CATEGORY:&nbsp;<span
class='normalText12White'>$award_category</span><br>NOMINEE:&nbsp;<span
class='normalText12White'>$award_nominee</span><span
class='normalText12BoldWhite'>$award_won</span><br><blockquote><span
class='normalText12White'>$award_note</span></blockquote><hr>";
}

Cookies And "include" Or "require"
i'm having a problem with my setcookie() instructions. Although there are absolutely
no html tags in front of them,for some reason PHP3 sends me back the message "oops...php3_SetCookie called after header has been sent"...

I do however use two "require" calls, one to a file with a .php extension, and one to a file with an .inc extension. At the beginning of each files there's a Could the cookie failure and the include functions be related ?

In my text, I have even wiped out any HTML tags such as "bold, paragraph, line break" tags, even in "echo" commands, but to no avail what am i doing wrong ?

FTP_login + $pass="" And $user=""
I use the following scrit in an Intranet with the user name = "" and
the password = "" :

<?php
$ftp_server = "192.168.25.25";
$ftp_user = "";
$ftp_pass = "";

$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to
$ftp_server");

if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
echo "Connected at $ftp_user@$ftp_server
";
} else {
echo "Can't connect with $ftp_user
";
}
?>

I have the following message :

Connected to 192.168.25.25
Warning: ftp_login(): 'USER': Invalid number of parameters in
E:www est_ftp.php on line 26

I tried to : ftp_login($conn_id, "", "") but i have the same result...

Alphabetize Results Ignoring "and" And "the"
is there a good way to alphabetize results and ignore articles like "the", "and", "a", and "an" so that it will alphabetize by the next word? just wondering...

Why Use "Stripslashes" And "Addslashes" Function
Can someone let me know why one would use strip slashes or add slashes functions. I know what they do but cannot see the exact use for them e.g. if i have a textfield and encase it in an stripslashes function, it will escape any back slashes etc...

Saving An Image From A "file" Form?
How do I recieve a picture from a form off a website and save it to a directory? I use the "file" form to allow the user to browse their local drive but how do I get the actual picture so I couild use it later?

Calling "php -f [file]" From Within Perl Seems Broken
I've recently decided to switch from compiled Apache/PHP to RPM's of
both and I'm having a problem I can't seem to solve. I have a Perl
script called php_include.cgi that parses a PHP file for inclusion. It
does this by running "php -f [php include file]" but unfortunately it
no longer works with the RPM:

----------

Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This
means that a page will only be served up if the REDIRECT_STATUS CGI
variable is set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual
page for CGI security.

For more information about changing this behaviour or re-enabling this
webserver, consult the installation file that came with this
distribution, or visit the manual page.

----------

The RPM for PHP obviously compiles with --enable-force-cgi-redirect.
If I either set cgi.force_redirect = 0 in php.ini or set
$ENV{REDIRECT_STATUS}="200"; in my Perl script, this error goes away,
as expected.

The weird part is that I do something like this in my Perl:

print `/usr/bin/php -f /var/www/html/includes/footer.php`;

Which you would expect to parse and output footer.php. Oddly, it
prints the contents of php_include.cgi (the calling Perl script)
instead! If I run the exact same command in a shell (even as my apache
user) it works correctly. When called from the web, it displays the
Perl script, not the php.

I've confirmed this a bunch of different ways.

Yes, I know I could blame this on the RPM, but I'd like to move to a
"standardized" load if possible... Makes updates easier... Also, this
one's got my curiosity...

How To Delete A "readonly" File In Windows?
Got the following problem: PHP has no problem with deleting an ordinary file, but when it is marked as "Read-Only", I get such an error: Warning: unlink(Z:/home/localhost/www/***.html) [function.unlink]: Permission denied in z:homelocalhostwwwoddik est.php on line 45.

"not A Valid JPEG File"
I am trying to upload an image to a server, but I get this warning:

Warning: imagecreatefromjpeg(): 'filename' is not a valid JPEG file

The error occurs when I am trying to create a thumbnail from the image. I
can subsequently display the JPG image itself, but the thumbnail creation
fails. I have tried this with hundreds of other images from the same source
and they work fine.

I have looked around on Google and it seems that others have had this same
problem, but I have not been able to find a solution.

Is this a PHP bug? Is there a workaround? Should I just trap the warning
and tell the user (my users will upload their own images) that the file is
not valid? They will surely question this, because seemingly every other
image displayer has no trouble with it.

Reading A "live" Log File?
I have come across a situation where it would be useful to read new lines being added to a log file on the users system. I have never seen anything like this discussed before so was curious if anyone had any prior experience with something of this nature. I am familiar with reading and writing to text files but not in real-time constantly.

Writing "quotes" To A File...
I am currently working on right now requires me to output quotes into a text document.
How could I go about outputting quotes? (If i add quotes it finds it to be part of the syntax..I have something similar to this: PHP Code:

File Uploading; "image/jpg"
I've created a file upload for images, and would like to duplicate one for other files that do not include images, with limitations (i.e., I don't want people uploading .exes, .ppts, etc).

Is there a list of all of the file types and extensions?

Y'know, like "image/jpg", "image/png", etc?

The reason I'm asking is because I'm not sure what I should type before "/ext" ("movie/wmv"?), Word document ("word/doc"?), or other files.

Catching Errors?
I am having trouble wrapping my head around the general concept of catching errors. I have read the tutorials about exceptions on DevShed, as well as on Zend's website. It is still not clear to me. If I throw 5 exceptions, how come I need 5 catch phrases, and what does it mean when it travels up the stack?

Sorry I am just really confused with the catch phrases and how they work, although I am almost positive I completely understand the throwing of exception concept.

Purpose Of A ".inc" File?
If a file has a .inc extension, or if it has a .inc.php extension, is it
treated differently by the php interpreter? Or is it just a convention?

I've been calling my included files filename.php and it doesn't seem to
hurt anything. Is it wrong to do that?

Removing " ^@ " From A File
I have a file on my Linux box that has this strange control character
combination (^@) in it at the beginning of every line. I can only
remove this from VI. I have tried using sed, tr, and others to remove
it, but none work. How can I remove this control character sequence
via PHP??

^@^@
^@^@ DPCA ALIASI ALIASN/N24 CLLI LSN RC
APCA
^@^@ 208-000-000 ------- ----------- alias208000 bi403239 0
208-001-000
^@^@ bi403240 0
208-002-000
^@^@ cc403000 10
235-002-000
^@^@ 235-243-002 ------- ----------- ----------- bn403131 0
235-007-000
^@^@ bn403132 0
235-006-000
^@^@ cc403000 2
235-002-000
^@^@ 226-251-070 ------- ----------- vancbcxpgt0 bm403044 0
226-008-000

"No Input File Specified."
As an experiment I wrote a simple C program that invokes
PHP using system(), but I'm getting an error "No input file
specified.".

What I do is:

setenv ("REQUEST_METHOD", "GET", 1);
setenv ("QUERY_STRING", "abc=123", 1);

and then I invoke PHP thus:

system "/usr/local/bin/php myfile.php < dummyfile > foo";

where dummyfile is either empty or just contains the line
"abc=123".

Yet, I get this error. No finnagling is fix it.



Strip "-" Out Of File Name?
How do I strip out the - in a file name and add a space in its place? example:

123-456.php I want it to print on a browser as: 123 456

echo "<a href="$PHP_SELF/articles/credit_repair/$filename" target="_BLANK">".substr($filename,0,strlen($filename)-4)."</a> | ";

How To Count "Hit" And "View"
I would like to know when a user logs in, he clicks Mike's E-mail. It will count one which mean "Hit". So that I will be able to know how many times users click Mike's E-mail.

Like Sitepoint. When other users read other problems. Views will count 1. I would like to know how to do it. Could you explain with script?

"echo" Or "print" ?
Can tell me someone is some big different between "echo" and "print". What You prefer to use?

Upload File Error 3: "The Uploaded File Was Only Partially Uploaded"
I've a file that starts like this:

<form id="pdsForm" method="post" action="/mcControlPanel.php"
class="mcForm" charset="UTF-8" enctype="multipart/form-data" >

and it contains this input:

<input id="biopic" name="biopic" type="file" />

The script recieving it does this:

$biopic = $this->core->getVar("biopic");
if (is_array($biopic)) {
print_r($biopic);

I get:

Array ( [name] =L-monkeySmall.jpg [type] =[tmp_name] =[error] =>
3 [size] =0 )

Error 3 is "Array ( [name] =L-monkeySmall.jpg [type] =[tmp_name]
=[error] =3 [size] =0 )". As you can see, 0 kilobytes were
uploaded.

What should I look for? I've been looking on the web for awhile and so
far I've found little useful information about what Error 3 typically
indicates.

Make "blabla" Into Keywords As In "php.net/blabla"
I know this must be documented, but I cant seem to find it.

How would you transform the URL into values? Like how php.net does;

www.php.net/date
does a search for "date" in their database...

I have built a simple search function on my site, and I would like to do the same.. anyone who knows how? Or who has seen an article in the subject? Or has any other tips?


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