473,395 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Learning PHP with Lighty and W3Schools

Cam
Hello group, I am new. I have a question that may be relatively easy
for someone to answer I hope.

I am running lighttpd on xp with php, perl etc. I am attempting to
teach myself PHP by going through the turoials on W3Schools.com. So
far it has been no problem and fun but I have recently hit a snag when
going through page. http://www.w3schools.com/php/php_file_upload.asp

The premise is it shows you how to select a file (restricted to jpg or
gif and file size of less than 20kb), and moves it to an /upload/
folder on the test server. If it is not a jpg or gif an larger than >
20kb it should give an error.

It works fine when uploading the small files, however when i am testing
it with a larger file image 100k or more the server seems to freak out.
The lighttpd error log shows this

(connections.c.1069) denying upload as opening to temp-file for upload
failed: /var/tmp/lighttpd-upload-2AGhiX No such file or directory

Firefox gives me 'The connection has been reset' message.

I am thinking there is maybe a setting in php.ini I should check? Not
sure, any ideas would be helpful. Thanks.

Dec 20 '06 #1
3 2755
Cam

Cam wrote:
Hello group, I am new. I have a question that may be relatively easy
for someone to answer I hope.

I am running lighttpd on xp with php, perl etc. I am attempting to
teach myself PHP by going through the turoials on W3Schools.com. So
far it has been no problem and fun but I have recently hit a snag when
going through page. http://www.w3schools.com/php/php_file_upload.asp

The premise is it shows you how to select a file (restricted to jpg or
gif and file size of less than 20kb), and moves it to an /upload/
folder on the test server. If it is not a jpg or gif an larger than >
20kb it should give an error.

It works fine when uploading the small files, however when i am testing
it with a larger file image 100k or more the server seems to freak out.
The lighttpd error log shows this

(connections.c.1069) denying upload as opening to temp-file for upload
failed: /var/tmp/lighttpd-upload-2AGhiX No such file or directory

Firefox gives me 'The connection has been reset' message.

I am thinking there is maybe a setting in php.ini I should check? Not
sure, any ideas would be helpful. Thanks.
I missed the main point, I was testing sending a larger than allowed
file to see if the error message "Invalid file" is displayed, it does
not when the file is huge. But the invalid file message does display
if it is not a proper extension.

Dec 20 '06 #2
Cam wrote:
I am running lighttpd on xp with php, perl etc.

(connections.c.1069) denying upload as opening to temp-file for upload
failed: /var/tmp/lighttpd-upload-2AGhiX No such file or directory
I am guessing that as you're using Windows XP, you don't have a directory
called "/var/tmp/". Probably you need to go through "php.ini" and check
all the paths listed there.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Dec 20 '06 #3

Cam schrieb:

It works fine when uploading the small files, however when i am testing
it with a larger file image 100k or more the server seems to freak out.
The lighttpd error log shows this

(connections.c.1069) denying upload as opening to temp-file for upload
failed: /var/tmp/lighttpd-upload-2AGhiX No such file or directory

Firefox gives me 'The connection has been reset' message.

I am thinking there is maybe a setting in php.ini I should check? Not
sure, any ideas would be helpful. Thanks.
Since small files work and big ones fail, these might be your problem:

- Your PHP script just takes too much time and finally gets stopped by
your server. Note, that PHP scripts have a predefined amount of time,
they
need to finish processing a request.

- Your PHP script probably isn't allows to upload files bigger than xxx
KByte.

Both properties are part of your php.ini settings. Review the php.ini
and probably
add more seconds or KBytes.

In case you'd like redefine a php.ini setting from within a PHP file,
have a look here: http://www.php.net/ini_set

Dec 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Andy | last post by:
Hello All, I'm currently getting into ASP and need some advice on any particular books or tutorials or websites that you can recommend so that I can get a good foundation on ASP as well as...
1
by: Jason Meyer | last post by:
Does anyone have and good resources(free possibly) for learning javascript? Jason
5
by: Declan Naughton | last post by:
Yo, I just completed work on www.themovievault.com (waiting for someone to add content). Now I am starting work on another site, and I suppose it would be a good time to give XHTML and CSS a...
2
by: Bhaskar | last post by:
Hai, I am new to .NET technology.I am little aware of Visual Basic.I would like to learn ASP.Net.Can someone help me out.
2
by: rich | last post by:
I'd like to improve my webdesign knowledge and learn how to write Javascripts. I have built my own website. I have javascripts on my site that I havent written. I download them and edit them where...
22
by: PSN | last post by:
Hi all, Can some one help me if it is possible to refresh a part of a page, without reloading the whole page. Let's say, i want to add a small message box to my webpage. After writing a message,...
5
by: sandy | last post by:
Does anybody know of any (free) online distance learning courses in web-development with php, targeting beginners, from the keyboard and text editor up? My first Google attempts turned up pages...
13
by: Godfather | last post by:
Please Show me the best way to learn PHP in 1 week.I want to manage a group of PHP Programmers.
2
jkmyoung
by: jkmyoung | last post by:
Here's a short list of useful xslt general tricks that aren't taught at w3schools. Attribute Value Template Official W3C explanation and example This is when you want to put dynamic values...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.