Recent Topics

1 Jul 18, 2005 23:44    

Having some real problems getting the upload of anything to work.
Have read most of the other threads over the past few days and played with all sorts, the problem I'm getting is this:

1. Click on upload a file / image
2. New window pops up, fill in all details etc.
3. Click Upload
and I get the following in the popup window:


File uploaded !

Your file "" was uploaded successfully !

Here's the code to display it:

Image Details: 
Name: 
Size: 0 KB 
Type: 

This clearly shows that it's not been sucessfull and on the apache serve error log it has about 10 errors all starting from line 155 in b2upload.php

All of which are to do with the undefined variables img1_type, img1_name, img1_desc etc.

I'm assuming that the form post with appropriate variables has not worked but wanted to know if this has been seen before?

Running fedora core 4, php ver 5, and the latest version of b2evolution with the patch.

Any help would be really grateful! :'(

2 Jul 19, 2005 00:05

OK, found out that PHP 5 may be the issue, specifically the use of global variable when posting, HTTP_POST_FILES

Set the register_globals = On in the php.ini file, restarted the httpd process and hey presto it works.

This does give rise to a possible security risk.

Is there a work around such that the setting can be set to off, a more secure setting?

If not I'll try and work on one, my perl scripting is a bit wolley though! :-)

3 Jul 20, 2005 23:15

Turned the register_globals setting to off in the php.ini file.
Restarted HTTPD.

Then in b2upload.php replaced as follows:

$HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_POST_FILES in all files with $_GET, $_POST, $_COOKIE, $_SERVER and $_FILES respectively seems to have solved the problem.

This then complies with php 5.x and the use of global variables, not sure how many other places use this but a simple search and replace will cure that!

Happy Days...


Form is loading...