Mediawiki doesnt show images - mediawiki

I have restored an old mediawiki database from about 2013-2015 on an current Ubuntu with mysql. Everything works fine after the database update. My only problem is, that images on the page are not been shown. I get the message "Error creating the preview image: file is missing". But the images should come from the database. I have checked out the usual error sources like /usr/bin/ convert and $wgUseImageMagick = true;
Any suggestions?
BR
Axel

MediaWiki stores images not in the database but in the filesystem (see $wgUploadDirectory setting in LocalSettings.php). You have to restore it and make it readable and writeable to the web-server.

As Alexander mentioned, check and see if $wgUploadDirectory is set to a correct directory that contains images for your MediaWiki installation. If you haven't customized your Mediawiki much, it should be YOUR_MEDIAWIKI_INSTALL_DIR/images. You also need to set proper permission for the images so that thumbnails can be generated for an image. Usually, permission on images directory should be 755.

Related

Apache Webserver is not recognizing new Content

Hi I am running Jellyfin on my censored.de domain.
Last night I tried adding some Buttons to the Interface and it worked great, but at some point I replaced a file in the web Folder and now everything is broken.
(Only login screen works, but that's NOT false code! I put back the old file)
Login for you= User: "guest", Password: "guest"
To understand what I did:
I used Samba to connect from my PC to the server with the following permissions:
smb.conf
[*(Censored)*]
path = /
public = yes
writeable = yes
; browseable = yes
valid users = *(Censored)*
force user = root
force group = root
create mask = 0770
directory mask = 0771
force create mode = 0660
force directory mode = 0770
Then I edited a file locally and replaced the one in my website.
I changed the file permissions already because it wasn't the same as the other files.
Before I also failed to add my own logo and thought it might be the image type but now I realized any new file gets rejected. Thats why I guess it might be https related BUT when I connect via http I also have the same issue what keeps me guessing wrong I think.
The server is running behind a reverse Proxy and I certified it with certbot --apache.
PS: By the way, this is not a specific problem for this website. My other website running on this server has the same problem. Couldn't make the background show up... When I replaced the index.html file the page was not visible at all anymore and it is still not showing. Don't really know what to do but something about my configuration seems off.
I am pretty new and have no experience with webhosting, so please excuse me for my basic level of understanding :)
Thanks in advance for you help,
Simon Wolf
Finally understood, that actually my setup is fine. The jellyfin-web package needs to be built if you add/replace data to function properly.
Just be careful only to edit files, not to replace them...
Solution for me then was just uninstalling and reinstalling the apt jellyfin-web Package and it worked again!

styles.css resource not loading when on the server, works locally

I'm new to creating webpages, so perhaps this is really easy and I just can't see it. I have a HTML/CSS template that I am modifying for a new site. When I check the index.html file locally (in Dreamweaver or in browsers) it appears correct. When I uploaded them to the server then the website does not load the images and it appears that the styles.css file is not loading correctly. I have attached a few screenshots to get the ball rolling. As always thanks for your assistance.
Desired Output:
Current Output:
This is likely (later confirmed by asker in comment) a file and directory access right problem.
This can be verified by checking the access logs of the http server.
The solution is to update the ownership and permissions of any problem files so that the http server has rights to them. In this case, it is probably the easiest to examine the permissions of the index.html file and related folders and apply the same permission to the problematic files/folders.

MAMP htdocs phpinfo

I am trying to get a simple phpinfo() to print out on my local server (using MAMP). I made a new directory in /Applications/MAMP/htdocs (php_sandbox) and put a file in there named my_phpinfo with only phpinfo() in it. How can I view the contents of this file in my web browser?
Is it also advisable if I set the Apache document root to be in my home directory/sites? I will be mainly using this local server to test/host some small sites.
Thanks!
visit in your browser localhost/my_phpinfo/index.php assuming you named the file with
<? phpinfo();?> is in index.php. Also, make sure you are editing the correct php.ini in your MAMP directory by checking your mamp prefs and seeing what version of php MAMP is using.
Your in the right folder by default from what I remember. MAMP runs apache on port 8888 by default. You should be able to go to http://localhost:8888/ You can also get to this page via the control panel (should have a button to open home page). This page will also show you've configured MAMP's Apache to run on a different port.
Whatever you name your file; you'll want to give it a .php extension, so if you file is named my_phpinfo, add a .php so it becomes my_phpinfo.php. Make sure you function called is wrapped in php tags like so
<?php phpinfo(); ?>
If this file is directory in the htdocs folder you should be able to go to http://localhost:8888/my_phpinfo.php and get the PHP Info page.
As far is moving the directory. I normally do. Especially b/c it makes upgrading MAMP a little easier (already have to worry about MySQL). You might have to tweak the file permissions just a bit to make sure it runs correctly. I believe though you should be okay since it is running as your User.

html showing contents of folder

i am creating a web page to show the contents of a folder so that people can view the files and download them if needed.
Click here to view Folder
But i wanna do this without any coding what so ever, i found this code which lets me view files.
The problem i am facing is that when i double click the html page and open it this hyperlink works and i get what i need but when i access the page through a server (IIS 7) then the hyperlink does nothing ?
am i to set some permissions or what ?
can someone tell me what im doing wrong ?
The link will work when the file you want to download is on your own personal computer, which in your case is true if you're just showing the HTML file locally. It won't be true for users visiting your website from another computer though.
If you want to serve the file on a server, you need to link to the path on the server itself, that is, if the file is in C:\inetpub\wwwroot\test_pages, your A HREF looks like this:
Click here to view Folder
Offcourse, this will work for simple files. For folders, you need to enable the webserver to show directory contents by enabling Directory Browsing.
There are security implications of linking to a local file from an online source. It works when the page is held locally but when on a server it puts a stop to it.
You can also use linux build-in command Tree, in example below you can see that i only want to add files that are matching .tar.gz or .zip or .tar.bz2
tree -P "*.tar.gz|*.zip|*.tar.bz2" -h -D --dirsfirst -r -H . > index.html;
You can also add a custom css to the page for a better looking output.
Straighforward and highly secure since the result is only html
as you use windows you can use www.cygwin.com to emulate a linux environement

Cant access website/images under /var/www/

About a year ago I placed some media and some web pages under my
/var/www/
on my server(I am using ubuntu-server). I was able to access these web pages by going to
http://myipaddressgoedhere/pagename
recently, I have a need to store media in a folder in /var/www/images
when I went to go see if I could still access these web pages store under
/var/www/ I am unable to hit any of the web pages.
I dont remember changing anything that would allow me not to see .html files in this directory.
Am I doing something wrong?
Check if the dates on any of your .htaccess files have changed (there may be one in each directory) and remember filenames starting with . are hidden in ubuntu by default.
First check the obvious things:
Is (i assume) httpd running? Can you access any pages at all or some pages but not others.
Are the files still where you left them, have they been moved or deleted?
Check the rights of the files and ensure that apache can load them?