Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
"Fatal error: Cannot redeclare doarray()...txplib_misc.php on line 9"
“Fatal error: Cannot redeclare doarray() in /Applications/MAMP/htdocs/WFtext/textpattern/lib/txplib_misc.php on line 9”
I rebooted my computer (and MAMP) and now when I try to view the site, I get the above message. And that’s all.
Other Textpattern sites I have installed on this version Mamp work correctly.
Can anyone help with this? I hate to start over.
Thanks!Offline
Re: "Fatal error: Cannot redeclare doarray()...txplib_misc.php on line 9"
What happens if you comment out line 48 on /index.php (i.e., add two forward slashes to the start of the line containing include txpath.'/lib/txplib_misc.php';
)? (This is just a quick troubleshooting step, not a solution!)
Any other info along with the error message (other file names and/or line numbers, etc.)?
Code is topiary
Offline
Re: "Fatal error: Cannot redeclare doarray()...txplib_misc.php on line 9"
Thanks for the quick reply!
Here’s some more information which I should have included in the first post:
- The Mamp url of the site is http://localhost:8888/WFtext/
- The login page for the site is http://localhost:8888/WFtext/textpattern
- At the time of the first post, I was able to see the login page of the site, at http://localhost:8888/WFtext/textpattern. I could have added articles, images, and so forth as usual because that part of the site worked as usual.
- However, when I tried to see the front end of the site either by typing the url in the browser or by clicking on “view site”, I got the “Fatal error…..txplib_misc.php on line 9” message.
Per your suggestion, I commented out line 48 in index.php. The results are:
- Same error on the …/WFtext/ page in the browser.
- This error on the …WFtext/textpattern page: “Fatal error: Call to undefined function getmicrotime() in /Applications/MAMP/htdocs/WFtext/textpattern/index.php on line 55.”
However! And this is weird to me, although I don’t know that much about the backend of php/MySql stuff: after I tried your suggestion, I removed the comment lines from line 48 in index.php just for the heck of it. I was checking things out and I ended up typing “http://localhost:8888/WFText/index.php” in the browser and the site came back!
I restarted Mamp to see if it was stable, and it went back to the same error messages.
FYI, I had a couple of plugins installed but I deleted them: wet_linkinfo, zem_link and rcb_excel.
I still have upm_image plugin installed and activated. I don’t know if this plugin info is relevant, but there you go.
Also, I ran Diagnostics and got these two messages:
- Site URL preference might be incorrect: localhost:8888/WFtext
- clean_url_data_failed: <br />
Hope some of this info helps.
Ann
Offline
Re: "Fatal error: Cannot redeclare doarray()...txplib_misc.php on line 9"
bluepurl wrote:
- Site URL preference might be incorrect: localhost:8888/WFtext
- clean_url_data_failed: <br />
That looks closer to the mark. I suspect the issue is you have a sub-domain installation, possibly complicated by the existence of other Txp installations?
Apparently the problems are only on the public side? Sounds like you can log on and work in the admin side as usual.
I’m not very handy with .htaccess, but I’d start by uncommenting the #RewriteBase line (that is, remove the initial #) and trying
RewriteBase /Wftext/
Is your config.php correct?
Code is topiary
Offline
Re: "Fatal error: Cannot redeclare doarray()...txplib_misc.php on line 9"
I’ll try the RewriteBase tip tomorrow and keep you posted. Thanks!
Offline
Re: "Fatal error: Cannot redeclare doarray()...txplib_misc.php on line 9"
It’s working now, with your help.
I tried uncommenting and changing line #8 as you suggested. It didn’t completely work, but instead of getting the “Fail” message I got a browser message that the page wasn’t found. So that was progress.
And having worked in TXP for a while , I’ve seen quite a bit of dialog about messy urls and the .htaccess file. I realized that the .htaccess file probably needed more tweaking, so I read some more forum posts on the subject.
I fiddled with the .htaccess file until it worked. Yay! Thanks!
My .htaccess file now looks like this, fyi:
DirectoryIndex index.php index.html Options +FollowSymLinks Options -Indexes <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /WFtext RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) - [PT,L] RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*) index.php RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}] </IfModule> #php_value register_globals 0
I think when I upload the site to the actual server, I’ll have to tweak the .htaccess again
Again, many thanks for your help.
Ann
Offline