1
DonXoop
PHP error in raw logs about blank.gif

I get this error almost every day in my raw server logs:
PHP Warning:  readfile(XOOPS_UPLOAD_PATH/blank.gif): failed to open streamNo such file or directory in /home/spda/public_html/image.php on line 35


If the specified location is /uploads (appears to be) then I indeed have a blank.gif with proper read privs.

2
Dave_L
Re: PHP error in raw logs about blank.gif
  • 2005/3/18 16:03

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Quote:
XOOPS_UPLOAD_PATH


That constant should be getting translated to an actual path. It's defined in include/common.php:

define("XOOPS_UPLOAD_PATH"XOOPS_ROOT_PATH."/uploads");


XOOPS_ROOT_PATH is defined in mainfile.php.

----
edit

Hmmm ... I see that image.php references that file on line 35, as the error message indicates:

readfile(XOOPS_UPLOAD_PATH.'/blank.gif');


But image.php doesn't include common.php.

3
DonXoop
Re: PHP error in raw logs about blank.gif

My files are as they should be. I can run a test custom block and get the full path returned for XOOPS_UPLOAD_DIR

I suppose if image.php is called directly then it won't resolve. That might be a clue, have to look further but right now I'm wondering if a direct call is being made instead of via xoops. I get direct calls for other files sometimes (including the ever popular formmail that I don't have...).

Time to dig deeper, it might not be an XOOPS issue but something else....

4
DonXoop
Re: PHP error in raw logs about blank.gif

A little more info. If you call image.php with a value that isn't found in the db or with no value at all (not too uncommon) it should return blank.gif but isn't because XOOPS_UPLOAD_DIR isn't resolved.

I confirmed that the logic in image.php is happening but XOOPS_UPLOAD_DIR isn't resolved (because common.php isn't included?). If I hardcode the path it works fine. Or if you create a directory called XOOPS_UPLOAD_DIR and put blank.gif in it it also works.

FYI, a little bug... And xoops.org seems to behave the same.

5
Dave_L
Re: PHP error in raw logs about blank.gif
  • 2005/3/18 18:44

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


What is image.php for?

6
DonXoop
Re: PHP error in raw logs about blank.gif

I believe it is for the core image manager. It looks like a bug. When the not found routine runs it returns a php not found error instead of the blank.gif. I made a work around to stop the error.

7
Dave_L
Re: PHP error in raw logs about blank.gif
  • 2005/3/19 2:37

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I reported it on the bug tracker.

Login

Who's Online

450 user(s) are online (71 user(s) are browsing Support Forums)


Members: 1


Guests: 449


ultraman147,

more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits