insert/edit image returns absolute path?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

maorui
Posts: 5
Joined: Thu Feb 10, 2011 11:42 am

insert/edit image returns absolute path?

Post by maorui »

I got an issue of phpmyfaq 2.6.13. I tried to add an image in record. But after I selected an image, the path returned by image selector was http://10.10.10.1/opt/phpmyfaq/images/image.jpg. But I expected http://10.10.10.1/phpmyfaq/images/image.jpg. The phpmyfaq was installed in /opt/phpmyfaq. So how to make it return relative path not absolute path here?
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: insert/edit image returns absolute path?

Post by Thorsten »

Hi,

did you tried 2.6.15?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
maorui
Posts: 5
Joined: Thu Feb 10, 2011 11:42 am

Re: insert/edit image returns absolute path?

Post by maorui »

I just tried, still same problem.
Mike-Sabs
Posts: 8
Joined: Thu Feb 24, 2011 3:32 pm

Re: insert/edit image returns absolute path?

Post by Mike-Sabs »

Same issue here.
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: insert/edit image returns absolute path?

Post by Thorsten »

Hi,

I'll take a look at it.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: insert/edit image returns absolute path?

Post by Thorsten »

Hi,

I checked it and it works for me. Which PHP version do you use? Do you use the builtin image manager?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
maorui
Posts: 5
Joined: Thu Feb 10, 2011 11:42 am

Re: insert/edit image returns absolute path?

Post by maorui »

My PHP version is 5.2.17. And yes, I use the build-in image manager.
Mike-Sabs
Posts: 8
Joined: Thu Feb 24, 2011 3:32 pm

Re: insert/edit image returns absolute path?

Post by Mike-Sabs »

This is my config.

Code: Select all

phpMyFAQ Version
    phpMyFAQ 2.6.15
Server Software
    Apache
PHP Version
    PHP 5.2.16
Register Globals
    off
Safe Mode
    off
Open Basedir
    off
Database Server
    Mysql
Database Client Version
    5.0.77
Database Server Version
    5.0.77
Webserver Interface
    APACHE2HANDLER
PHP Extensions
    date, libxml, openssl, pcre, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, session, iconv, posix, pspell, Reflection, standard, shmop, SimpleXML, SPL, sockets, exif, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, apache2handler, fileinfo, dbase, dom, gd, imap, json, ldap, mbstring, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, xmlreader, xmlwriter, xsl, zip 
I use ajaxfilemanager, the built-in image manager.
Bye
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: insert/edit image returns absolute path?

Post by Thorsten »

Hi,

interesting, both PHP 5.2 installations. I'll try to look for a test VM to test it.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
pt20100201
Posts: 134
Joined: Mon Feb 01, 2010 2:11 pm
Location: Porto . Portugal
Contact:

[Also w different config.]Re: insert/edit image...absolute p

Post by pt20100201 »

[The same situation with a different configuration] Re: insert/edit image returns absolute path?
.
Dear Thorsten

Our FAQ system doesn’t have many pictures – and they were inserted long time ago.

However, recently this problem was also reported by one of our users.

Meanwhile we made some updates to phpMyFAQ, PHP and MySQL versions. The problem remains.

At the moment we are using:

- phpMyFAQ 2.6.15
- Apache/2.2.3
- PHP 5.3.6
- Mysql
. Database Client Version : 5.1.54
. Database Server Version : 5.5.10

Note
PHP 5.3.6 has many security - and other - enhancements and fixes.
More information at
. http://www.net-security.org/secworld.php?id=10761
and, obviously,
. http://www.php.net/


Kind regards
2011-03-23
pt20100201
.
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: insert/edit image returns absolute path?

Post by Thorsten »

Hi,

okay, I'll check it again.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: insert/edit image returns absolute path?

Post by Thorsten »

Hi,

I need your help. Please open admin/editor/plugin/ajaxfilemanager/inc/config.base.php and goto line 112. Is it possible to add your document root here?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
maorui
Posts: 5
Joined: Thu Feb 10, 2011 11:42 am

Re: insert/edit image returns absolute path?

Post by maorui »

it works! Thx!
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: insert/edit image returns absolute path?

Post by Thorsten »

Hi,

did you use $_SERVER['DOCUMENT_ROOT] or the "hard" path?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
maorui
Posts: 5
Joined: Thu Feb 10, 2011 11:42 am

Re: insert/edit image returns absolute path?

Post by maorui »

I didn't change the DOCUMENT_ROOT but used alias.
Alias /phpmyfaq "/opt/phpmyfaq"
Post Reply