Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 04:59 am EST
Geeklog Forums
lib-common.php drastic error
EaglesFan
Anonymous
I wanted to add Google Analytics to my site, and using a solution I found in these forums added the google script code to the lib-common.php file. When I reloaded the site, my site was nothing but code line after code line. I reverted to the original lib-common.php file, and the error was not corrected.
Is there a way to correct the lib-common.php file without having to completely reinstall GeekLog, and create my site from scratch?
Here is my site: www.EaglesRoadTrips.com
And here is the solution I followed to add the GA code into the file: http://www.geeklog.net/forum/viewtopic.php?showtopic=60163
I attempted changing the header file, but GA did not recognize the installation. I then used the solution found near the bottom of the thread to modify the lib-common.php.
Please help...
Thanks.....
Is there a way to correct the lib-common.php file without having to completely reinstall GeekLog, and create my site from scratch?
Here is my site: www.EaglesRoadTrips.com
And here is the solution I followed to add the GA code into the file: http://www.geeklog.net/forum/viewtopic.php?showtopic=60163
I attempted changing the header file, but GA did not recognize the installation. I then used the solution found near the bottom of the thread to modify the lib-common.php.
Please help...
Thanks.....
9
7
Quote
EaglesFan
Anonymous
Just to be clear on what I did with the lib-common.php file -- after my site turned bad, I reverted to a saved version of the original php file and FTP'd it back into its original location.
8
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Are you sure you uploaded your old lib-common.php? And to the correct directory?
The surely is the code of lib-common.php that's currently showing up on your site, so the file is still defective.
bye, Dirk
The surely is the code of lib-common.php that's currently showing up on your site, so the file is still defective.
bye, Dirk
4
6
Quote
EaglesFan
Anonymous
Quote by: Dirk
Are you sure you uploaded your old lib-common.php? And to the correct directory?
The surely is the code of lib-common.php that's currently showing up on your site, so the file is still defective.
bye, Dirk
Yes, sure on both counts.
Because I saved it and edited it in Notepad, I notice that the original file now is a) not formatted like it was originally (meaning it's line and lines of text, and not formatted out like it was originally), and b) where the tabbed spacces used to be, I now have a rectangular shaped block inits place. Could those shapes be corrupting the file?
Is it possible to reload a lib-common.php file NOT from my site (like a generic one), and have that work? Or is it specific to my site?
Anything I can do to not re-do the site is the goal.
Thanks...
10
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Do you now (exactly!) which version of Geeklog you're running on? Then you can download the tarball of that version from the downloads section and use the copy of lib-common.php in there (after you edited that one line to point to your config.php, of course).
bye, Dirk
bye, Dirk
8
9
Quote
EaglesFan
Anonymous
Hosting through GoDaddy, and it says it's version 1.4 of Geeklog. After looking at the download section, I see there are multiple instances of 1.4 (each sr) -- how do I tell which version I downloaded through GoDaddy's Hosting Metropolis? Do I simply have to call them? Or is there a way to tell other than that?
8
9
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
In your config.php, near the end of the file (but above the list of US states) there's this:
define('VERSION', '1.4.1');
}
That should contain the exact version you're running on ('1.4.1' in the above example).
And since you mentioned that you've been using an autoinstall, let me repeat that you have to make one change in the file before you upload it: The first line that starts with require_once will have to contain the path to your config.php file (instead of the default path). You should be able to extract that from your old lib-common.php
bye, Dirk
Text Formatted Code
if (!defined ('VERSION')) {define('VERSION', '1.4.1');
}
That should contain the exact version you're running on ('1.4.1' in the above example).
And since you mentioned that you've been using an autoinstall, let me repeat that you have to make one change in the file before you upload it: The first line that starts with require_once will have to contain the path to your config.php file (instead of the default path). You should be able to extract that from your old lib-common.php
bye, Dirk
7
7
Quote
EaglesFan
Anonymous
Dirk,
You saved a fairly good website (in my opinion, at least) from dying prematurely.
Thank you for the help -- the site is back up and functional.
And for now, I think I'll be leaving Google Analyticals off my site, although it provides a nice feature set. If Geeklog comes up with a plug-in that will work well with GA, I'll re-visit.
Thanks again,
Richbo
You saved a fairly good website (in my opinion, at least) from dying prematurely.
Thank you for the help -- the site is back up and functional.
And for now, I think I'll be leaving Google Analyticals off my site, although it provides a nice feature set. If Geeklog comes up with a plug-in that will work well with GA, I'll re-visit.
Thanks again,
Richbo
6
10
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
I'm not sure why you are modifying lib-common.php for Google Analytics, it is easier to just insert the code in the header.thtml or footer.thtml template files. I have several sites running fine with Analytics. I put mine in the footer.thtml template file just before the close body tag (where google wants you to put it).
One of the Geeklog Core Developers.
One of the Geeklog Core Developers.
7
8
Quote
All times are EST. The time is now 04:59 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content