Go Back   Pligg CMS Forum > Pligg Development > Bug Report

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-16-2008, 04:30 AM
New Pligger
 
Join Date: Feb 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Cannot redeclare class HTTPRequest

Pligg 9.9 Beta / php5

After i installed the script (worked fine) i wanted to log into admin. But i got an error Massage "Cannot redeclare class HTTPRequest" in lib/link.php.

My webmaster figured out the class name collides with the standard php5 http extension. We could work around the problem by deactivating the php5 extension.

My webmaster said that it would better to take more individual names for the classes like "PliggHTTPRequest" and "PliggLink".

There are some threads with users who seem to have the same problem:

Last edited by nealtz; 02-16-2008 at 04:35 AM..
Reply With Quote
  #2 (permalink)  
Old 02-24-2008, 01:43 PM
New Pligger
 
Join Date: Sep 2007
Posts: 11
Thanks: 0
Thanked 2 Times in 1 Post
Smile That solution worked for me

I renamed all calls to HTTPRequest to Pligg_HTTPRequest including the constructor. About 3 or 4 renames required and all in link.php (hope I got them all).

I have a few Pligg sites and the all went down at the same time for the same reason. My hosting service must have installed an upgrade.
Reply With Quote
  #3 (permalink)  
Old 02-25-2008, 09:45 PM
Casual Pligger
Pligg Version: 9.9.5
Pligg Template: dafault
 
Join Date: Feb 2008
Posts: 57
Thanks: 15
Thanked 1 Time in 1 Post
Smile

Quote:
Originally Posted by deals311 View Post
I renamed all calls to HTTPRequest to Pligg_HTTPRequest including the constructor. About 3 or 4 renames required and all in link.php (hope I got them all).

I have a few Pligg sites and the all went down at the same time for the same reason. My hosting service must have installed an upgrade.
HI,
My webhost solved my problem by doing the followings, They have updated PHP verstion from 5.1 to 5.2.

In order to resolve the problem they have added the following line in my .htaccess file, which will make my account use the previous version of PHP, i.e 5.1 instead of the new one (5.2):

AddHandler application/x-httpd-php51 .php .php3 .php4 .php5 .phtml

Thanks
Reply With Quote
The Following User Says Thank You to ruptan For This Useful Post:
  #4 (permalink)  
Old 06-18-2008, 10:52 AM
New Pligger
 
Join Date: Jun 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
it worked thanks ruptan
Reply With Quote
  #5 (permalink)  
Old 10-31-2008, 02:42 PM
New Pligger
Pligg Version: 9.9.5
 
Join Date: Oct 2008
Posts: 12
Thanks: 6
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by nealtz View Post
Pligg 9.9 Beta / php5

After i installed the script (worked fine) i wanted to log into admin. But i got an error Massage "Cannot redeclare class HTTPRequest" in lib/link.php.

My webmaster figured out the class name collides with the standard php5 http extension. We could work around the problem by deactivating the php5 extension.

My webmaster said that it would better to take more individual names for the classes like "PliggHTTPRequest" and "PliggLink".

There are some threads with users who seem to have the same problem:
Thank you! I tried the other option and it didn't work but this one did!
Reply With Quote
  #6 (permalink)  
Old Yesterday, 08:37 AM
New Pligger
Pligg Version: 9.9.5
 
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
No need for these things.
The error is because HTTPRequest is a standard function so u need to rename it in your links.php file
Search and replace "HTTPRequest" with "HTTPRequest1" in file links.php.
Worked for me!
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Fatal error: Cannot redeclare class User raviraja General Help 0 04-26-2008 05:25 AM
Installation error "Cannot redeclare httpRequest in /lib link.php" jaklyne Bug Report 0 03-20-2008 02:32 PM
differents class for sidebar module lacasuela "yget" 5 01-21-2008 02:32 PM
New module error(cannot redeclare) jdleung Modification Tutorials 0 10-23-2007 09:34 PM
Fatal error: Cannot redeclare class db in /homepages/16/d122491275/htdocs/libs/db.php amb Installation and Upgrade Help 3 05-26-2006 08:13 PM


Search Engine Friendly URLs by vBSEO 3.2.0