Error (ERROR_BAD_PATH)

anth1977

Joined: 2002-08-06
Posts: 3
Posted: Sat, 2003-03-01 21:05

When I click on the Add Items button I receive the following message:

Error (ERROR_BAD_PATH)
in F:websitegallery2modulescoreclassesGalleryPhotoItem.class at line 113
in F:websitegallery2modulescoreItemAddChildren.inc at line 101
in F:websitegallery2main.php at line 102
in F:websitegallery2main.php at line 30

I have received this error for the last month using Apache/MySql/PHP and IIS/MySql/PHP on a Windows 2000 box. I am using the latest version of Gallery2.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2003-03-02 06:49

Can you try again with the latest code? Your stack trace shows that you're running a slightly older version of the code.

 
anth1977

Joined: 2002-08-06
Posts: 3
Posted: Sun, 2003-03-02 13:41

I grabbed the latest version this morning from http://www.fw2.net/files/gallery/

Here's the errors that occurred:

Error (ERROR_BAD_PATH)
in F:websitegallery2modulescoreclassesGalleryPhotoItem.class at line 119
in F:websitegallery2modulescoreItemAddChildren.inc at line 115
in F:websitegallery2main.php at line 130
in F:websitegallery2main.php at line 46

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2003-03-02 21:44

Ok, this is interesting. Looks like PHP is not handing off the uploaded tmp file to Gallery properly. What version of PHP are you using?

On line 82 of ItemAddChildren.inc, right after this line:

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
$file = $form['fileUpload'][$i];
</TD></TR></TABLE><!-- BBCode End -->

Add this:

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
print "<pre>";
print_r($file);
print "</pre>';
</TD></TR></TABLE><!-- BBCode End -->

That should give us more of a clue as to what's happening.

Do any other PHP scripts that use file-uploads work in your environment?
Also, can you give us a pointer to your G2 install so that I can see the problem occurring?
Thanks.

 
johnyb

Joined: 2002-09-22
Posts: 1
Posted: Mon, 2003-03-03 18:00

I got the same error, also on Windows 2000, with PHP 4.2.3
The path for the default upload directory used by PHP is garbled ( backslashes are stripped).

I could fix it by specifying the directory to be used in the php.ini file:

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> upload_tmp_dir = "c:/temp/"</TD></TR></TABLE><!-- BBCode End -->

 
Bobby
Bobby's picture

Joined: 2003-03-04
Posts: 1
Posted: Tue, 2003-03-04 17:52

Hello,

I done my first test of Gallery2 today.... :razz:
Win2k (sp3) / apache 1.3.24 - php 4.2.0 - mysql 3.23.49 (easyphp 1.6)

It looks cool.... :smile:

and I had the same error message: (ERROR_BAD_PATH)

I fixed it with the modif. given by johnyb in the php.ini: change the in / for the upload_tmp_dir.

It's bizarre, because, on the same machine, phpbb use it (the ) without problem...

Please, excuse my english, I am French... :wink: