close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Redeclare of rel2abs()

Thread began 8/14/2010 6:42 am by cboyd269911 | Last modified 8/29/2010 6:23 pm by danielsebas | 4699 views | 17 replies |

cboyd269911

Redeclare of rel2abs()

I built a website using Site Sculptor and then attempted to add a framework plugin. This resulted in the following error:

Fatal error: Cannot redeclare rel2abs() (previously declared in /home/admin/public_html/webassist/framework/library.php:15) in /home/admin/public_html/WA_CMS/library.php on line 21

I attempted to rectify the problem by changing the following line in WA_CMS from

require_once("library.php");

to:

if (!function_exists('rel2abs') && !function_exists('abs2rel')) {
require_once("library.php");
}

That appears to get rid of the redeclare error, but now my plugin appears twice. Once in its proper location and again in the upper left hand corner of the page.

How can I correct this?

Many thanks!

Sign in to reply to this post

Ray BorduinWebAssist

I've opened a support ticket so that I can look into this problem with you directly. Please update your incident ticket with a good time and phone number where we can reach you.

Sign in to reply to this post
Did this help? Tips are appreciated...

superpac250441

Fatal error: Cannot redeclare rel2abs()

Hi there,

I am getting the same error message:

Fatal error: Cannot redeclare rel2abs() (previously declared in C:\xampp\htdocs\CMStest\webassist\framework\library.php:15) in C:\xampp\htdocs\CMStest\WA_CMS\library.php on line 21

The template used was from site sculptor using CMS. I note 2 library.php files, one in framework folder and the other in WA_CMS Folder so presume that is the cause of the redeclare rel2abs() although I am guessing
Please would the solution to earlier inquiry be posted here

Thanks

Sign in to reply to this post

Ray BorduinWebAssist

the solution is to wrap the function declarations in each of the library.php files with:

if (!function_exists('{functionname}')) {

//function goes here

}

where {functionname} is replaced by each function in that file, and each function is wrapped in this way.

We'll have to update powerCMS to account for this in the next update.

Sign in to reply to this post
Did this help? Tips are appreciated...

superpac250441

Error on Library files

Hi Ray, I have tried to use your code on the functions but I cannot get it to work. Would you be kind enough to take a look at the attched 2 library files and place the code in ot for me to look at so I can learn?
Many thanks

Sign in to reply to this post

Ray BorduinWebAssist

Open up the file and find the functions listed inside.

The will look like:

function functionname(arg1,arg2,etc) {

}

add code around them so that they look like:

if (!function_exists('functionname')) {

function functionname(arg1,arg2,etc) {

}

}

do this to the abs2rel and rel2abs functions in those two files. We'll be releasing an update to framework builder to address this issue as well as a handful of others reported since the release. That update should be available in the next week or two.

Sign in to reply to this post
Did this help? Tips are appreciated...

superpac250441

Many thanks Ray

Sign in to reply to this post

saf01

Hi after coverting site sculptor site to framework themem i get the rel2abs error and followed the instruction to fix the problem.

Now I get

Warning: strpos() [function.strpos]: Empty delimiter in C:\wamp\www\sitesculptor\webassist\framework\library.php on line 20

what am i doing wrong?

Sign in to reply to this post

Ray BorduinWebAssist

I have opened a support ticket so that we can investigate this issue further. I'll try giving you a call today in order to look into it with you directly.

Sign in to reply to this post
Did this help? Tips are appreciated...

saf01

Thanks Ray. Ive updated the ticket. Look forward to hearing from you.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...