[opensuse-support] [Leap 15] Apache server on localhost - file ownership?
I want to make a copy of my Joomla website to run on my local machine here, so that I can experiment with new modules and settings in a safe environment before committing them to the active site. I have set up a LAMP server - It works! I have copied all the files from the remote server to /srv/www/htdocs/mydomain using wget. I have exported the mysql database with phpMyAdmin and imported it into the local mysql(mariadb) database server. I have edited the configuration files to suit the new environment (I don't rule out some errors here) When I try to visit http://localhost/mydomain in Firefox, I just get a white page (Object not found). Initially, I had root:root owning all the files, but when that didn't work I tried changing it to wwwrun:wwwrun. But that didn't help either. ISTR reading that in this situation, the Apache webserver should own the files, but I don't know what (s)he's called on Leap 15. Any suggestions? I've already googled and searched the Joomla forums. Many thanks Bob -- Bob Williams System: Linux 4.12.14-lp150.12.58-default Desktop: KDE Frameworks: 5.45.0, Qt: 5.9.4 and Plasma: 5.12.5
Op donderdag 9 mei 2019 17:53:00 CEST schreef Bob Williams:
I want to make a copy of my Joomla website to run on my local machine here, so that I can experiment with new modules and settings in a safe environment before committing them to the active site.
I have set up a LAMP server - It works! I have copied all the files from the remote server to /srv/www/htdocs/mydomain using wget. I have exported the mysql database with phpMyAdmin and imported it into the local mysql(mariadb) database server. I have edited the configuration files to suit the new environment (I don't rule out some errors here)
When I try to visit http://localhost/mydomain in Firefox, I just get a white page (Object not found).
Initially, I had root:root owning all the files, but when that didn't work I tried changing it to wwwrun:wwwrun. But that didn't help either.
You need wwwrun:www on openSUSE.
ISTR reading that in this situation, the Apache webserver should own the files, but I don't know what (s)he's called on Leap 15.
Any suggestions? I've already googled and searched the Joomla forums.
Many thanks
Bob You also have to take a look at Joomla's configuration.php in it's webroot. And at it's .htaccess Question: How did you setup the LAMP server? -- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team
-- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On Thu, 09 May 2019 18:43:08 +0200
Knurpht-openSUSE
You also have to take a look at Joomla's configuration.php in it's webroot. And at it's .htaccess Question: How did you setup the LAMP server?
I think I used the YaST software management pattern, but that bit was done a while ago and I didn't flag it as something to remember :( I've changed the file ownership to wwwrun:www but it's made no difference. I suspect the problem is in configuration.php. -- Bob Williams System: Linux 4.12.14-lp150.12.58-default Desktop: KDE Frameworks: 5.45.0, Qt: 5.9.4 and Plasma: 5.12.5
Op donderdag 9 mei 2019 19:10:07 CEST schreef Bob Williams:
On Thu, 09 May 2019 18:43:08 +0200
Knurpht-openSUSE
wrote: You also have to take a look at Joomla's configuration.php in it's webroot. And at it's .htaccess Question: How did you setup the LAMP server?
I think I used the YaST software management pattern, but that bit was done a while ago and I didn't flag it as something to remember :(
I've changed the file ownership to wwwrun:www but it's made no difference. I suspect the problem is in configuration.php. Can you show us the content of the apache host/vhost? Or put it on opensuse.paste.org and post the link here.
-- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On Thu, 09 May 2019 19:17:48 +0200
Knurpht-openSUSE
Op donderdag 9 mei 2019 19:10:07 CEST schreef Bob Williams:
On Thu, 09 May 2019 18:43:08 +0200
Knurpht-openSUSE
wrote: You also have to take a look at Joomla's configuration.php in it's webroot. And at it's .htaccess Question: How did you setup the LAMP server?
I think I used the YaST software management pattern, but that bit was done a while ago and I didn't flag it as something to remember :(
I've changed the file ownership to wwwrun:www but it's made no difference. I suspect the problem is in configuration.php. Can you show us the content of the apache host/vhost? Or put it on opensuse.paste.org and post the link here.
Hello, Am Donnerstag, 9. Mai 2019, 18:43:08 CEST schrieb Knurpht-openSUSE:
Op donderdag 9 mei 2019 17:53:00 CEST schreef Bob Williams:
When I try to visit http://localhost/mydomain in Firefox, I just get a white page (Object not found).
Can you please post the exact error message from the error log? As a sidenote - permission problems would probably give you a different error message.
Initially, I had root:root owning all the files, but when that didn't work I tried changing it to wwwrun:wwwrun. But that didn't help either. You need wwwrun:www on openSUSE.
Not really ;-) Apache runs as user wwwrun, and needs to be able to _read_ files as this user. As long as wwwrun can read the files, Apache doesn't care about the owner. The only exception are files that need to be _written_ by Apache or PHP. These files or directories really have to be owned by wwwrun (or group www + group write permissions). For everything else, using another user as file and directory owner is more secure because that means Apache or PHP can't modify the files. This is an important feature if your joomla/wordpress/... ever gets hacked ;-) Regards, Christian Boltz --
Die Systemuhr auf dem Rechner mit SuSE8.1 geht jeden Tag ca. 10 Minuten schneller. Stellt es eine Krankheit dar? Hattest Du den Rechner mal mit in Simbabwe? Buschfieber? [> Matthias Dort und Thilo Alfred Bätzig in suse-linux]
-- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
Op donderdag 9 mei 2019 19:26:05 CEST schreef Christian Boltz:
Hello,
Am Donnerstag, 9. Mai 2019, 18:43:08 CEST schrieb Knurpht-openSUSE:
Op donderdag 9 mei 2019 17:53:00 CEST schreef Bob Williams:
When I try to visit http://localhost/mydomain in Firefox, I just get a white page (Object not found).
Can you please post the exact error message from the error log?
As a sidenote - permission problems would probably give you a different error message.
Initially, I had root:root owning all the files, but when that didn't work I tried changing it to wwwrun:wwwrun. But that didn't help either.
You need wwwrun:www on openSUSE.
Not really ;-)
Apache runs as user wwwrun, and needs to be able to _read_ files as this user. As long as wwwrun can read the files, Apache doesn't care about the owner.
The only exception are files that need to be _written_ by Apache or PHP. These files or directories really have to be owned by wwwrun (or group www + group write permissions).
For everything else, using another user as file and directory owner is more secure because that means Apache or PHP can't modify the files. This is an important feature if your joomla/wordpress/... ever gets hacked ;-)
Christian, I stand corrected. If it's your development version it's better to run it as your own user, so you can edit your files. I forgot about this since I've found other means to develop, test and push. Where indeed I don't use the default webuser. -- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On Thu, 09 May 2019 19:26:05 +0200
Christian Boltz
Hello,
Am Donnerstag, 9. Mai 2019, 18:43:08 CEST schrieb Knurpht-openSUSE:
Op donderdag 9 mei 2019 17:53:00 CEST schreef Bob Williams:
When I try to visit http://localhost/mydomain in Firefox, I just get a white page (Object not found).
Can you please post the exact error message from the error log?
[Thu May 09 18:11:50.830057 2019] [php7:warn] [pid 12425] [client ::1:47636] PHP Warning: require_once(/srv/www/htdocs/brightonbelle.org/libraries/vendor/joomla/string/src/phputf8/mbstring/core.php): failed to open stream: No such file or directory in /srv/www/htdocs/brightonbelle.org/libraries/vendor/joomla/string/src/phputf8/utf8.php on line 60 [Thu May 09 18:11:50.830082 2019] [php7:error] [pid 12425] [client ::1:47636] PHP Fatal error: require_once(): Failed opening required '/srv/www/htdocs/brightonbelle.org/libraries/vendor/joomla/string/src/phputf8/mbstring/core.php' (include_path='.:/usr/share/php7:/usr/share/php7/PEAR') in /srv/www/htdocs/brightonbelle.org/libraries/vendor/joomla/string/src/phputf8/utf8.php on line 60 -- Bob Williams System: Linux 4.12.14-lp150.12.58-default Desktop: KDE Frameworks: 5.45.0, Qt: 5.9.4 and Plasma: 5.12.5
Hello, Am Donnerstag, 9. Mai 2019, 21:12:39 CEST schrieb Bob Williams:
[Thu May 09 18:11:50.830082 2019] [php7:error] [pid 12425] [client ::1:47636] PHP Fatal error: require_once(): Failed opening required '/srv/www/htdocs/brightonbelle.org/libraries/vendor/joomla/string/src/ phputf8/mbstring/core.php' (include_path='.:/usr/share/php7:/usr/share/php7/PEAR') in /srv/www/htdocs/brightonbelle.org/libraries/vendor/joomla/string/src/ phputf8/utf8.php on line 60
That's a clear indication that you miss a file - probably '/srv/www/htdocs/brightonbelle.org/libraries/vendor/joomla/string/src/ phputf8/mbstring/core.php' It could also be that your server has .../mbstring/core.php in its include_path (and the include_path could be different than what you have on your local machine). However, I'd _guess_ that this is unlikely because the path looks very joomla-specific. Please double-check if the requested file exists on the server (the base path probably differs). A quick search shows that both mentioned files are probably included in joomla: https://github.com/joomla/joomla-cms/tree/staging/libraries/vendor/ joomla/string/src/phputf8 Another wild guess is that these files might or might not be used based on the PHP extensions you have loaded. I don't know the joomla code, but maybe they are only used as a fallback if you don't have the mbstring extension installed. Comparing the output of <?php phpinfo() ?> might help to find out, or simply try zypper in php7-mbstring && rcapache2 restart on your local machine. Regards, Christian Boltz -- Die Signatur will nicht angezeigt werden. Die gewuenschte Signatur ist zur Zeit nicht verfuegbar. Moeglicherweise ist sie gerade im Urlaub oder hat einfach keine Lust angezeigt zu werden. Oder wollen Sie staendig beobachtet werden? -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On Thu, 09 May 2019 22:25:45 +0200
Christian Boltz
Hello,
Am Donnerstag, 9. Mai 2019, 21:12:39 CEST schrieb Bob Williams:
[Thu May 09 18:11:50.830082 2019] [php7:error] [pid 12425] [client ::1:47636] PHP Fatal error: require_once(): Failed opening required '/srv/www/htdocs/brightonbelle.org/libraries/vendor/joomla/string/src/ phputf8/mbstring/core.php' (include_path='.:/usr/share/php7:/usr/share/php7/PEAR') in /srv/www/htdocs/brightonbelle.org/libraries/vendor/joomla/string/src/ phputf8/utf8.php on line 60
That's a clear indication that you miss a file - probably '/srv/www/htdocs/brightonbelle.org/libraries/vendor/joomla/string/src/ phputf8/mbstring/core.php'
It could also be that your server has .../mbstring/core.php in its include_path (and the include_path could be different than what you have on your local machine). However, I'd _guess_ that this is unlikely because the path looks very joomla-specific.
Please double-check if the requested file exists on the server (the base path probably differs).
A quick search shows that both mentioned files are probably included in joomla: https://github.com/joomla/joomla-cms/tree/staging/libraries/vendor/ joomla/string/src/phputf8
Another wild guess is that these files might or might not be used based on the PHP extensions you have loaded. I don't know the joomla code, but maybe they are only used as a fallback if you don't have the mbstring extension installed. Comparing the output of <?php phpinfo() ?> might help to find out, or simply try zypper in php7-mbstring && rcapache2 restart on your local machine.
php7-mbstring is installed on my local machine, so I copied the missing files to the Joomla installation. As well as core.php, it also wanted ascii.php. This improved things to the extent that the white page now contains the single word 'Error'. The error log now reports: [Fri May 10 10:33:19.799343 2019] [php7:warn] [pid 30811] [client ::1:54624] PHP Warning: session_start(): Failed to read session data: user (path: /var/lib/php7) in /srv/www/htdocs/brightonbelle.org/libraries/joomla/session/handler/native.php on line 260 I have shared native.php here: https://pastebin.com/YEXn4afH I suspect it might reflect the state of the remote server instance at the time it was downloaded to my local machine, but I'm not fluent in php and wouldn't know what to edit. Many thanks for your help Bob -- Bob Williams System: Linux 4.12.14-lp150.12.58-default Desktop: KDE Frameworks: 5.45.0, Qt: 5.9.4 and Plasma: 5.12.5
Hello, Am Freitag, 10. Mai 2019, 11:47:54 CEST schrieb Bob Williams:
On Thu, 09 May 2019 22:25:45 +0200 Christian Boltz wrote:
Am Donnerstag, 9. Mai 2019, 21:12:39 CEST schrieb Bob Williams:
php7-mbstring is installed on my local machine, so I copied the missing files to the Joomla installation. As well as core.php, it also wanted ascii.php.
Just to be sure - are there more files missing?
This improved things to the extent that the white page now contains the single word 'Error'.
The error log now reports:
[Fri May 10 10:33:19.799343 2019] [php7:warn] [pid 30811] [client ::1:54624] PHP Warning: session_start(): Failed to read session data: user (path: /var/lib/php7) in /srv/www/htdocs/brightonbelle.org/libraries/joomla/session/handler/na tive.php on line 260
I have shared native.php here: https://pastebin.com/YEXn4afH
I suspect it might reflect the state of the remote server instance at the time it was downloaded to my local machine, but I'm not fluent in php and wouldn't know what to edit.
I can recommend to google for the error message - the search results include hints for - PHP version vs. joomla version - older joomla won't work with latest PHP, try updating to the latest version - session save path might be wrong, not writeable by PHP etc. - https://forum.joomla.de/thread/5193-nach-template-upload-nichts-geht-mehr/ might also be a reason (in german, use google translate to get the english version) In general, this looks like a joomla-specific problem, so you might have more luck in a joomla forum or mailinglist. I'm also not a joomla expert, and therefore run out of ideas ;-) Regards, Christian Boltz --
If power fails, you can't access your computer at all. I could get the generator out of a car, attach it to a room-bicycle, and generate electricity enough for my laptop :-) [> Per Jessen and Carlos E. R. in opensuse-factory]
-- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
Hello Christian,
Thanks for getting back.
On Sun, 12 May 2019 19:27:44 +0200
Christian Boltz
Hello,
Am Freitag, 10. Mai 2019, 11:47:54 CEST schrieb Bob Williams:
On Thu, 09 May 2019 22:25:45 +0200 Christian Boltz wrote:
Am Donnerstag, 9. Mai 2019, 21:12:39 CEST schrieb Bob Williams:
php7-mbstring is installed on my local machine, so I copied the missing files to the Joomla installation. As well as core.php, it also wanted ascii.php.
Just to be sure - are there more files missing?
This improved things to the extent that the white page now contains the single word 'Error'.
The error log now reports:
[Fri May 10 10:33:19.799343 2019] [php7:warn] [pid 30811] [client ::1:54624] PHP Warning: session_start(): Failed to read session data: user (path: /var/lib/php7) in /srv/www/htdocs/brightonbelle.org/libraries/joomla/session/handler/na tive.php on line 260
I have shared native.php here: https://pastebin.com/YEXn4afH
I suspect it might reflect the state of the remote server instance at the time it was downloaded to my local machine, but I'm not fluent in php and wouldn't know what to edit.
I can recommend to google for the error message - the search results include hints for - PHP version vs. joomla version - older joomla won't work with latest PHP, try updating to the latest version - session save path might be wrong, not writeable by PHP etc. - https://forum.joomla.de/thread/5193-nach-template-upload-nichts-geht-mehr/ might also be a reason (in german, use google translate to get the english version)
In general, this looks like a joomla-specific problem, so you might have more luck in a joomla forum or mailinglist.
I'm also not a joomla expert, and therefore run out of ideas ;-)
Regards,
Christian Boltz
I've hunted down all the missing files, and made some corrections in configuration.php and the site now loads, but not completely. My browser complains about the certificate. The remote host provides its own certificate, but as this is just a local installation (not publicly available) I don't need to bother with certificates. Or I need to provide my own, but that's another, different learning curve for me. So, nearly there but not quite. Regards Bob -- Bob Williams System: Linux 4.12.14-lp150.12.58-default Desktop: KDE Frameworks: 5.45.0, Qt: 5.9.4 and Plasma: 5.12.5
participants (3)
-
Bob Williams
-
Christian Boltz
-
Knurpht-openSUSE