Adding picture to profile in edit profile

Adding picture to profile in edit profile

by Ray Lawrence -
Number of replies: 10

I can't get this to work on my own installation. Can you help?

I have tried just about everything I can find from the forums:

  • Tried both of the slasharguments options in variables
  • run phpinfo (shows GD installed 1.62 or higher)

I checked the site using my ftp program and noticed a directory "c:/moodledata", in here was a diectory named "3" with the image which had been uploaded. I moved the "3" folder to another folder called "moodledata" and deleted "c:\moodledata". Guess what? the user profile still shows the smiley face.

Whislt attempting to install moodle for the first time, I decided to try to install it locally at first and "c:\moodledata" was the entry I made in config.php (as per the instructions). Anticipating that the "c:\modledata" folder on the webserver was connected to this earlier action, the entry in config.php has been updated to "/moodledata". Still no joy.

Any ideas?

Average of ratings: -
In reply to Ray Lawrence

Re: Adding picture to profile in edit profile

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I suspect a problem with your dataroot definition in config.php. Exactly what error do you get when visiting the "Files..." link in a course?
Average of ratings: Useful (1)
In reply to Martin Dougiamas

Re: Adding picture to profile in edit profile

by Ray Lawrence -

ERROR: You need to create the directory /moodledata with web server write access


The site administrator needs to fix the file permissions

 

Thanks for the speedy response. Please see above for error message. The folder "/moodledata" is not present on the server (when viewed with my ftp program).

This is from my config.php file

// 4. DATA FILES LOCATION
//=========================================================================
// Now you need a place where Moodle can save uploaded files.  This
// directory should be readable AND WRITEABLE by the web server user
// (usually 'nobody' or 'apache'), but it should not be accessible
// directly via the web.
//
// - On hosting systems you might need to make sure that your "group" has
//   no permissions at all, but that "others" have full permissions.
//
// - On Windows systems you might specify something like 'C:\moodledata'

$CFG->dataroot = '/moodledata';

In reply to Ray Lawrence

Re: Adding picture to profile in edit profile

by David Delgado -
You have to set your dataroot variable in config.php to your mooodledata directory. If you have a hosting server, I am sure it cannot be at /moodledata.

Your home directory should be something like:

/home/user

where user is your username

A good place to create your moodledata directory is /home/user/moodledata

You have to set the directory permissions to 777 (drwxrwxrwx). You can do this in your Control Panel, selecting the directory name and then permissions at your right.

You have to extract your moodle files in your main web directory, that should be something like:

/home/user/public_html

Hope this helps.
Average of ratings: Useful (1)
In reply to David Delgado

Re: Adding picture to profile in edit profile

by Ray Lawrence -

Making progress!

I've now got a box with a red cross in it (2nd slasharguments option) or a black box (1st slasharguments option).

Any futher help gladly received.

In reply to Ray Lawrence

Re: Adding picture to profile in edit profile

by David Delgado -
Keep on using 1st slasharguments and change your gdversion to GD 2.x manually. I think that could work. Please, tell us if it does. Upgrading your PHP to the last version also could help.
In reply to David Delgado

Re: Adding picture to profile in edit profile

by Ray Lawrence -

No luck. I tried both slasharguments.

PHP is version

PHP Version 4.2.3

If this need updating, I haven't a clue how to do it. guidance would be appreciated.

In reply to Ray Lawrence

Re: Adding picture to profile in edit profile

by David Delgado -
Did you change gdversion to GD 2.x manually in admin/config/variables? That was the way I told you to fix it.

Latest PHP is 4.3.3, to upgrade PHP, Apache and MySQL, just take a look at the manuals, in the installation notes. That is, RTFM wink

Anyway, normally, it is just making a backup copy of your previous installation (specially the config files such as php.ini), and then install the new versions in the same places, with the same configuration.

In Red Hat Linux (most of Linux hostings), it is all by the packet manager: rpm , wich does a very good job.

For example:

rpm -Uvh php-4.3.3.rpm

In Windows, I think there is a install program por PHP that can upgrade previous installation.

Anyway, first of all, go to the web sites (PHP, Apache, MySQL) and read the install docs. First think, then work! wink
Average of ratings: Useful (1)
In reply to David Delgado

Re: Adding picture to profile in edit profile

by Ray Lawrence -

"Did you change gdversion to GD 2.x manually in admin/config/variables? That was the way I told you to fix it."

Yes.

Does this mean an upgrade is needed? RTFM, OK! smiley.gif but can this be done by a customer or only the web hosting company?

 

In reply to Ray Lawrence

Re: Adding picture to profile in edit profile

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
What do you see when you view the images alone?

eg like

You might see some errors that give you clues.
Average of ratings: Useful (1)
In reply to Martin Dougiamas

Re: Adding picture to profile in edit profile

by Ray Lawrence -

It's working! Hurrah!.

I fiddled with the paths in config.php - although I can't see that they are any different to when I tried this option before. I also changed the slasharguments variable to the first option (with GD1.x).

So, I still don't understand it, but it's working - so who cares?

Many thanks to Martin and David.

 

Now, onwards to the next task in my mission........ the mastery of Cron.........tongueout.gif