Opened 16 years ago

Last modified 16 years ago

#2176 confirmed Bug

php connector: apache_lookup_uri failure not handled

Reported by: Dave Brondsema Owned by:
Priority: Normal Milestone:
Component: Server : PHP Version:
Keywords: Cc:

Description

In the php connector's io.php in Server_MapPath, apache_lookup_uri is used. If it fails for some reason, a warning is displayed and a wrong value is returned. This ends up with something like this:

<b>Warning</b>
:  apache_lookup_uri() [
<a href="function.apache-lookup-uri">function.apache-lookup-uri</a>
]: Unable to include '/../assets/pages/3076/Image/' - error finding URI in 
−
<b>
/home/myuser/web/mysite/common/fckeditor2.5.1/editor/filemanager/connectors/php/io.php
</b>
 on line 
<b>167</b>
<br/>
<Error number="1" text="Error creating folder "" (Can't create  directory)"/>

I am using this workaround which seems to work well:

		$info = @apache_lookup_uri( $path ) ;
		if ($info != null)
			return $info->filename . $info->path_info ;

Change History (1)

comment:1 Changed 16 years ago by Wojciech Olchawa

Keywords: Confirmed added
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy