New to OSSN and having trouble getting my profile picture and posted pictures to display.

Jessie Abernathy Posted in Technical Support 7 years ago

I am running Ubuntu Server 16.04 running LAMP Stack (I meet all the prerequisites for OSSN, it is installed and working for the most part).

I installed OSSN following instructions from this website:

https://www.vultr.com/docs/how-to-install-and-configure-open-source-social-network-on-ubuntu-16-04

I followed the instructions to the letter and got OSSN working several times but each time the pictures don't work (I don't know if they aren't uploading because of permissions or some other error like I said I am brand new to OSSN and hosting a social networking site on my own).

Here are some screen shots of what I am experiencing:

Screen 1
Screen 2

I apologize in advanced if my topic sounds vague or there isn't much information to go on, all I can really tell you is that I have scoured the forums and can not find a way to fix this issue and I know it's probably something that I'm not doing correctly because I'm a newbie (sorry for that as well hehehe)

Replies
mx Rubén Chavez Replied 7 years ago

I have the same problem!!! i installed my ossn in my host, but the images is broken.

i made everything that you said but it don't running

You know how i could repaired this problem?

Indonesian Arsalan Shah Replied 7 years ago

@Zet Man,

I think the issue with his installation is its missing back slash from end of path. Even its considered as directory but when writing files ossn_data acts as file in his case

So correct path is

$Ossn->userdata = '/var/www/ossn_data/';

@Jessie Abernathy
You should try to change path to above mentioned

German Michael Zülsdorff Replied 7 years ago

Okay,

[28-Oct-2017 13:55:03 America/LosAngeles] PHP WARNING: 2017-10-28 13:55:03 (PDT): "mkdir(): Permission denied" in file /var/www/html/ossn/classes/OssnFile.php (line 207)

is telling us that Ossn fails to create a subdirectory in your data directory.
Most likely you created /var/www/ossn_data as root, and apache - running under a different user id - has no permission to create files and directories. As a result your images can't be saved.

So, let's retrieve the owner of apache ... from your shell run the command

ps aux | grep apache

You'll get several lines of running apache processes with the owner shown in column 1

Ignore the first line which is the master process started by root. The owner of interest is shown on the following lines, by default this should be www-data

Assuming it IS www-data, your next commands will be

chown www-data:www-data /var/www/ossn_data

and

chmod 755 /var/www/ossn_data

Having changed the owner and permission of /var/www/ossn_data this way Ossn should be able to store its data now.

us Jessie Abernathy Replied 7 years ago

I apologize for the lack of information... I didn't even know how to enable OSSN's error reporting or where the logs are kept... I am brand new to all of this I'm sorry. I found my ossn.config.site.php file and found out how to enable the error reporting here are the two files -->

======= ossn.config.site.php ============
<?php
/**
* Open Source Social Network
*
* @package (softlab24.com).ossn
* @author OSSN Core Team <[email protected]>
* @copyright 2014-2017 SOFTLAB24 LIMITED
* @license Open Source Social Network License (OSSN LICENSE) http://www.opensource-socialnetwork.org/licence
* @link https://www.opensource-socialnetwork.org/
*/

$Ossn->url = 'http://www.hikesforhomelessness.org/';
$Ossn->userdata = '/var/www/ossn_data';

=======ossn.config.site.php ===========

====== error_log ========

[28-Oct-2017 13:55:03 America/LosAngeles] PHP WARNING: 2017-10-28 13:55:03 (PDT): "mkdir(): Permission denied" in file /var/www/html/ossn/classes/OssnFile.php (line 207)
[28-Oct-2017 13:55:03 America/Los
Angeles] PHP WARNING: 2017-10-28 13:55:03 (PDT): "fileputcontents(/var/www/ossn_dataobject/12/ossnwall/images/f3e201c40c52f1e2f2380993b8378111.jpg): failed to open stream: No such file or directory" in file /var/www/html/ossn/classes/OssnFile.php (line 229)

======== error_log ========

Indonesian Arsalan Shah Replied 7 years ago

Also if i remember, you have wrong path for ossn_data directory? can you list your ossn.config.site.php here?

German Michael Zülsdorff Replied 7 years ago

> I don't know if they aren't uploading because of permissions or some other error like I said

Okay, and that's why it is a good idea to enable Ossn's error reporting and provide your log file, the ossninfo page, etc.
(I had asked you already several times to follow the instructions outlined in 'How to report a bug' to no avail)