GetDotted Domains

Viewing Thread:
"still have read/write permissions problems with freeola folders"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Thu 09/08/07 at 22:41
Regular
Posts: 12
ok this is my problem..

i have written the php code to upload pictures to my htdocs/images folder.

this works fine images are being sent to the folder and then a link is sent to my mysql so as to retrieve them with a mysql command.

the images folder has read/write permissions set to all users.

but this is this the problem....

images are not shown because when i right click and view image properties of the pictures in the images folder they are being uploaded with no read/write permissions.

When i change these to allow read/write they are then shown in my gallery page.

can anyone help please
Sun 19/08/07 at 19:35
Regular
"It goes so quickly"
Posts: 4,083
Hmmm:
"Perhaps all the Freeola formatting tags should be ignored within your [CODE] feature?"

Personally, I'd rather they keep the formatting within the [CODE] tag, but remove the ability for the lower-case letters to invoke it, seeing as the listings all show capital letters, as the [i] thing has caught me out a few times.

Also, how about an [h]heading[/h] tag for adding a slightly larger, bolded and underlined font for headings?
Fri 17/08/07 at 20:17
Regular
"Devil in disguise"
Posts: 3,151
Blah. :(
Well I thought I'd try and write something constructive for this board. I tried posting it, it was about 80 lines of code in total. In my opinion it looked worse than before. Formatting doesnt help a great deal it seems when line-wrapping occurs so much. And my formatting is quite conservative, I only use 2 spaces for an indentation.
Thu 16/08/07 at 12:57
Regular
"Devil in disguise"
Posts: 3,151
Thanks alot, Eccles. :-)
Thu 16/08/07 at 10:49
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
If you have a long string of code which contains brackets you can always insert spaces to get around the 50 character limit.

areallyreallyreallrealylongpieceofcode( 'test' );

There is a lot more that could be done with the posting of code but at the moment the volume of posts here doesn't really justify it.
Thu 16/08/07 at 09:59
Moderator
"Are you sure?"
Posts: 5,000
Can anything be done with the '50 character limit' when posting code? I had a nightmare getting the code to display for the first post in my 'Tips and Tools' thread.

Not only did the character limit mess things up, but the JasvaScript had [ i ] in it so kept invoking the italic formatting which both changes the text and removed the [ i ] from the code. Perhaps all the Freeola formatting tags should be ignored within your [ CODE ] feature?

Hmmm...
Just realised that if I type [spaceCODEspace] the spaces get removed leaving the text unchanged. Wish I knew that before!

Search Freeola Chat
Thu 16/08/07 at 09:51
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
Right, sorted out a few things.
If you post some text containing tabs them this will now be converted to 4 spaces (for example if you copy and paste code from somewhere). If your post contains space to indent something then this should now be maintained.
If this forum gets busy enough then we may look into introducing a code highlighting feature to make things even clearer.
Mon 13/08/07 at 19:39
Regular
"Devil in disguise"
Posts: 3,151
Had an experiment trying to do this before for here. Seems to me the easiest way to do it is to define a class with a fixed width, and overflow:auto and apply it to
 tags.  That way scroll bars deal with excessively long code lines.						
Mon 13/08/07 at 18:05
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
Already suggested that. It may get done. You'll always loose some formatting though due to width constraints here. There is also a small problem with having a 50 character limit for one word when posting some code. I'll have to see if there's a good way to get around that.
Mon 13/08/07 at 17:14
Regular
"Devil in disguise"
Posts: 3,151
Wouldnt it be so much nicer if there was a way to show code with its formatting. *hint hint*
Sat 11/08/07 at 17:52
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
After the upload has been checked, then add the chmod, like:


<?php

//This is the directory where images will be saved
$target = "images/";
$target = $target . basename( $_FILES['photo']['name']);

//This gets all the other information from the form
$name = mysql_real_escape_string($_POST['name']);
$email = mysql_real_escape_string($_POST['email']);
$phone = mysql_real_escape_string($_POST['phone']);
$pic=($_FILES['photo']['name']);
// Connects to your Database
mysql_connect("mysql.freeola.net", "sr------", "--------") or die(mysql_error()) ;
mysql_select_db("sr------") or die(mysql_error()) ;
//Writes the information to the database
mysql_query("INSERT INTO `employees` VALUES ('$name', '$email', '$phone', '$pic')") ;
if(move_uploaded_file ($_FILES['photo']['tmp_name'], $target)) {
//Tells you if its all ok
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory";
if(!chmod($target, 0644)) {
echo "Unable to change file permission of".$target;
}
}
else {
//Gives and error if its not
echo "Sorry, there was a problem uploading your file.";
}
?>

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Great services and friendly support
I have been a subscriber to your service for more than 9 yrs. I have got at least 12 other people to sign up to Freeola. This is due to the great services offered and the responsive friendly support.
Many thanks!!
Registered my website with Freeola Sites on Tuesday. Now have full and comprehensive Google coverage for my site. Great stuff!!
John Shepherd

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.