Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache Post Problem??

Status
Not open for further replies.

Mebane2

IS-IT--Management
Jun 15, 2003
4
US
I have tried 3 different PHP programs for creating image galleries online which let you send an image that is stored in a database directly from a web form. In all cases I get the same result. Nothing. Don't get an error, but it doesn't show up ether. I have even contacted the author of one of the PHP scripts and we tried several things to get it to work until he finally gave up.

In looking around the internet I have found 2 things. One, that there is or was some kind of security issue relating to the post form action, and also that a few other people have had the same problem. However none had anyone replied with a solution. It seems as if my Redhat Linux/Apache/MySQL/PHP server is blocking post from working. But letting things like forums, and web calendars run just fine.

I am a n00b when it comes to this area. My experitse over the last 7 years has been Windows/IIS/Access,MS SQL/Cold Fusion. The main file of the one application I primarily want to work is rather lengthy to say the least. So posting it here might be a bit of spam. It software the guy wrote is called PIGMySql.

Any ideas would be greatly appriciated, and any pardoning of my inexperiance would be too. :)


 
Are you sure your php.ini settings are correct for alowing file upload (and its max size)?

Good Luck

Laurie.
 
I agree with tarn. I run Gallery from menalto and that's about all I had to do to allow http uploads... well besides setting the permissions on the directory. :)
 
Cool. Progress. Now I get error messages :D Always better to have errors and error messages then just errors :)

I looked into the php.ini file and saw the HTTP uploads were disabled. So I enabled it and restarted the apache service. Now when I try and add a image I get the following errors. (BTW the post size is set at 8M and the upload size is set at 2M and I tried to upload a 800K file)


Warning: fopen("none", "rb") - No such file or directory in /var/ ... /main.php on line 675

Warning: stat failed for none (errno=2 - No such file or directory) in /var/ ... /main.php on line 675

Warning: Supplied argument is not a valid File-Handle resource in /var/ ... /main.php on line 675
 
Oh. And it is currently set to use the default directory for uploads (what the path is I do not know), nor do I know exactly what permissions to give the directory if I can find it.

Or would it be easier to just define my own directory instead of the default?

I am guessing one upload directory will work for as many installs of the gallery as I need (IOW same server, different sites)

Thanks
 
Unfortunatly the only ref I can locate for PIGMySql is Italian and I'm not about to download source from a site I can't translate, so I cant see what file line 675 is looking for ......

I'll have to guess here that this application has a configuration file (where you define your settings?) and this would/should specify where your download directory is.

To test with its easyer to use /tmp as a download directory as most anyone can write into here.

As your error at line 675 says Warning: fopen("none", "rb") - No such file or directory in /var/ ... /main.php on line 675 ..... this would indicate that you need to study the code as this statment is saying open file ("filename", with options "r=readonly + binary" ) so a filename of "none" seems a little strange!

Good Luck
Laurie.
 
Once again I agree with tarn. It sounds like the problem is with the code that handles the uploaded file. In most cases a tempfile is used until the transfer is complete then the file gets moved to the target directory and renamed. As tarn says you're going to have to study some code and see if you can figure it out. If you are not up to this, there may be another way. I hate to have people give up and start over but if you are still looking for a nice gallery, check this one out. They have plenty of help through forums. You will find help with everything from installation problems to costomizing Gallery. There are even scripts that let you have random photos from your gallery on your home page or can have it show the ltest updates. I'm starting to sound like a commercial now so I'll quit, but you may want to take a quick peek at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top