Problems, need help? Have a tip or advice? Post it here.
8 posts Page 1 of 1
I've been trying to set up a webserver with couch, using apache, php, mariadb and couchcms. I've done all the required configuration to get php to run in apache - I made a test file called info.php with
Code: Select all
<?php phpinfo(); ?>
and this ran fine when i visited <mysite>/info.php.

However, visiting <mysite>/couch (in my case, its localhost/couch) just shows a page listing the contents of the couch/ directory.
Visiting a specific file like localhost/couch/login.php just shows a white screen.

I've been folllowing the steps on ... -site.html up to the point where you visit <site>/couch and login. (so I've done all the database login setting stuff in config.php, although I don't think that would be the root of this problem)

What am I doing wrong here?

Thank you

Please check the 'couch' folder to make sure there is an 'index.php' file in it (web-servers fall back to listing a folder's contents if there is no index file in that folder).

If the file is present, please try visiting it by explicitly specifying its name i.e. as localhost/couch/index.php.
This should begin the installation.

If that does not happen, please try finding your web-server's 'error log' - that should show you exactly what the problem is. Feel free to share it with us if you need help in decoding the error message.

Thank you very much for your reply.
I am currently away but I will try that as soon as possible, hopefully it works


I have now tried your suggestions - index.php does exist, but visiting localhost/couch/index.php does nothing. I've looked at the apache error logs but found only an internal server error

Code: Select all - - [25/Jul/2022:15:45:54 +0100] "GET /couch/index.php HTTP/1.1" 500 -

/var/log/httpd/error_log is not giving me any errors.

However, in the php error logs, its giving me this:
Code: Select all
[25-Jul-2022 10:54:03 America/New_York] PHP Fatal error:  Uncaught Error: Undefined constant "MYSQLI_BOTH" in /srv/http/couch/includes/mysql2i/mysql2i.func.php:8
Stack trace:
#0 /srv/http/couch/includes/mysql2i/mysql2i.class.php(531): include()
#1 /srv/http/couch/header.php(193): include_once('...')
#2 /srv/http/couch/index.php(7): require_once('...')
#3 {main}
  thrown in /srv/http/couch/includes/mysql2i/mysql2i.func.php on line 8

I feel like this is something I've not configured correctly; do I need to set MYSQLI_BOTH somewhere?

Thank you

That error would explain the behavior you have been witnessing.
Basically, your installation is missing the 'mysqli' extension (and also the older plain 'mysql' extension - which almost never happens on any proper host; one of the two is always present).

Anyway, since you are using a local stack, you'll need to activate the extension yourself.
For XAMPP the procedure is as follows (should also work for other stacks) -
1. Place phpinfo(); in any PHP file and visit that file. The output will, amongst several other things, show the php.ini file being used with the path to it. You'll also notice that MySQL / MySQLi would be missing from the list of extensions shown.
2. Find that php.ini file and edit it and uncomment (by removing the leading semi-colon)-
Code: Select all

3. Restart Server.

The phpinfo() output should now show MySQL extensions being loaded.
This should, hopefully, solve the issue.

Hope this helps.

Thank you very much, this worked. For reference, in my case I needed to uncomment
Code: Select all

I couldn't find the mysql.dll or mysqli.dll lines; but it still works now anyway so thats all good.

However, visiting localhost/couch still shows the directory index; i have to go to localhost/couch/index.php to access the dashboard. Is there any way of fixing this?

EDIT: to fix the above problem with having to specify couch/index.php, i made sure this line was in /etc/httpd/conf/httpd.conf (i use apache):
Code: Select all
<IfModule dir_module>
    DirectoryIndex index.html index.php

I am glad to know it worked :)

i have to go to localhost/couch/index.php to access the dashboard. Is there any way of fixing this?

I am sure there must be a way but I'd suggest you please disregard the inconvenience for the time being and move on with the development proper - local stacks are known to exhibit flaky behavior; the final destination for the site is going to be a proper online host and you won't face any such problems there.
Yes, I agree - currently I'm just using a LAMP stack locally for testing; hopefully this problem will sort itself out when I move to using a proper host.

Thanks again for all the help :)
8 posts Page 1 of 1