SnippetMaster Support Forums

General => General Discussion & Support => Topic started by: Ickii on September 02, 2002, 06:55:37 AM



Title: Almost got it
Post by: Ickii on September 02, 2002, 06:55:37 AM
Ok, I have been playing with this for hours, I am a slooooow learner  :roll:

I have finally got the login page to work but the only pages it shows that can be changed are the default sample pages.

What do I need to set in order to see the pages I want to be able to change?

Update - I finally got it to work IF the page to edit is in a folder within my html dir. How can I set it to allow editing of pages within my html dir ( not in a seperate folder )

ickii  :roll:


Title: Almost got it
Post by: admin on September 02, 2002, 04:05:57 PM
1.  Make sure the $IGNORE variable located in the config.inc.php file does NOT include your html directory.  Basically, any folders listed in this array will NOT be searched for snippetmaster tags.

2.  I'm not sure I understood what you wrote in blue text.  I assume the "html" directory is your web root?  SnippetMaster should be able to read any file located in any directory UNDER your web root, as long as the folder is not listed in the $IGNORE variable as specified in my point above.

Let me know if you still need some help.

Cheers!


Title: Almost got it
Post by: Ickii on September 02, 2002, 06:09:43 PM
Here is the problem Im having.

The full path to my html file is this -

/home/virtual/site11/fst/var/www/html

If I use that in the config I get an error message saying

/home/virtual/site11/fst/var/www/html/templates/login.html does not exist. (or something like that LOL) I forget the exact message.

If I use... /home/virtual/site11/fst/var/www/html/snippetmaster
it works but does not see anything outside of the snippetmaster folder. Does that make sense?

Maybe I am doing something else wrong? I don't think the main html folder is listed in the ignore variable. I think I will delete everything and start over  :shock:

This looks really usefull, I hope I can get it to work.

Thanks for the help.

ickii


Title: Almost got it
Post by: admin on September 02, 2002, 07:22:33 PM
I think I might know what is causing this problem for you.  If you could post the contents of the config.inc.php file that would help.

(Be sure to change the username/password before you do, though..)

Cheers!


Title: Almost got it
Post by: Ickii on September 02, 2002, 07:31:20 PM
This is what the config file looked like when it sorta worked.

<?php

// This is the FULL path to the directory where the SnippetMaster program files
// are located.
// NOTE: If you put SnippetMaster in your "web root" directory, the $ROOT and
//       $PATH settings will then be the same. DO NOT add a trailing slash.
   $PATH = "/home/virtual/site11/fst/var/www/html/snippetmaster";

// This is the FULL path to the directory where your website files are
// located on your server (Your web root). DO NOT add a trailing slash.
   $ROOT = "/home/virtual/site11/fst/var/www/html";

// Set to the full url to access the value you set for $ROOT
   $PREVIEW = "http://www.mydomain.com";

// Set to the full url to access the value you set for $PATH.
   $URL = "http://www.mydomain.com/snippetmaster";

// Specify a list of folders to ignore when browsing for SnippetMaster files.
   $IGNORE = array("stats","images","includes","cgi-bin","Templates","download","polls","forums","newsletter","location1","location2");

// What kind of file types should be visible to the users when browsing for
// images using the WYSIWYG editor?  (The extensions you specify MUST be
// for an image filetype or you will get javascript errors.)
   $VALID_IMAGE_FILE_TYPES =  array("gif","jpg","jpeg","png");

// What kind of file types should be visible to the users when browsing for
// links using the WYSIWYG editor?
   $VALID_LINK_FILE_TYPES =  array("html","htm","doc","pdf","xls","ppt","txt","jpg","gif","png");

// Set to 1 to use authentication, otherwise set to 0.
// NOTE: If  you don't need password protection, set AUTH to 0.
   $AUTH = 1;
   $USER = "demo";
   $PASS = "demo";

// Set the email address to be used for error reporting.
// NOTE: (Must be set, even if $REPORT is set to 0)
   $EMAIL = "your_email@domain.com";

// To turn off SnippetMaster errors from appearing in your email inbox,
// set to 0.
   $REPORT = 1;

// What is the maximum size of an editable file in bytes?
   $MAXSIZE = 1000000;

// Set to 1 to enabling printing of WYSIWYG debug messages, otherwise
// set to 0
   $DEBUG = 0;

// You can specify an unlimited number of upload locations for your users. To
// add more locations, just follow the variable pattern.  (Be sure to increment
// the array number for each new location.)
// PATH - The _full_ path to the destination directory. (DO NOT add a trailing
//      slash.) This directory MUST already exist and have permissions of 777.
// NAME  - The text users will see in the Upload window for this location.
// OVERWRITE - For this location, allow files that already exist to be
//             overwritten? For yes, set to 1; for no, set to 0.
// If you don't want to use at least three locations, just delete the lines you
// don't need.  (They are for example only, anyway..)
   $UPLOAD_INFO[1][PATH] = "/home/snippetm/public_html/location1";
   $UPLOAD_INFO[1][NAME] = "Upload Location #1";
   $UPLOAD_INFO[1][OVERWRITE] = 1;
   $UPLOAD_INFO[2][PATH] = "/home/snippetm/public_html/location2";
   $UPLOAD_INFO[2][NAME] = "Upload Location #2";
   $UPLOAD_INFO[2][OVERWRITE] = 0;
   $UPLOAD_INFO[3][PATH] = "/home/snippetm/public_html/location3";
   $UPLOAD_INFO[3][NAME] = "Upload Location #3";
   $UPLOAD_INFO[3][OVERWRITE] = 1;

// Do you want to limit the acceptable extensions of uploaded file types?
// To enable set to 1; to disable change to 0.
   $LIMIT_UPLOAD_FILE_TYPES = 1;

// If enabled, specify a list of acceptable file types for the upload function.
   $VALID_UPLOAD_FILE_TYPES =  array("gif","jpg","jpeg","png");

// Do you want to set a size limit for uploaded files?  
// To enable set to 1; to disable change to 0.
   $UPLOAD_FILE_SIZE_LIMIT = 1;

// If enabled, specify the size limit (in bytes) for uploaded files.
   $UPLOAD_FILE_MAX_SIZE = 200000;

?>

Thanks again for the help


Title: Almost got it
Post by: admin on September 02, 2002, 07:39:26 PM
Hmmm.. interesting.  From what I can see, everything should be working.

From the error you posted, it looks like the "snippetmaster" folder is being removed from the path.. so the included template file (login.html) is not being found.

This is strange because the command to find the file simply takes the $PATH variable, and then adds "includes" and "login.html" to it.  So if you $PATH is set as you described, then it should work.

If you're interested, I can try an install myself to get it working.. Fire me off an email with the ftp address and login info and I can take a crack at it.

Cheers!


Title: Almost got it
Post by: Ickii on September 03, 2002, 04:36:51 AM
Update - I deleted snippetmaster and started over....now I get the login in page but after entering user / pass I get this

SnippetMaster v1.0 ERROR
Unable to change directories to "/home/virtual/site11/fst/var/www/html" (permissions denied), check your permissions and your ROOT setting in "includes/config.inc.php"
FUNC: directoryDropDown().

How should premissions be set for my main html dir? Or is this something else?

Electric - I appreciate the offer to install for me, if I can't get it working I will take you up on the offer.  :D

ickii


Title: Almost got it
Post by: admin on September 03, 2002, 10:33:17 AM
The html directory should be set to permissions of 755.  (This is pretty standard permissions for all directories.)


Title: Almost got it
Post by: Ickii on September 04, 2002, 08:23:20 AM
arrrrgggg :oops:

I give up, cant get it to work, Electric Im sending you the info, can you give it a try when you have time, no hurry  :D

ickii


Title: Almost got it
Post by: admin on September 04, 2002, 11:40:36 AM
You betcha.  Just fire any info off to henri@snippetmaster.com

I'll take a crack at it as soon as possible.   (I'll email you before I do anything, just so you know.  And if you provide an IM number I can try to contact you via messanger or whatever first..)

Cheers!


Title: Almost got it
Post by: sikter on September 04, 2002, 01:09:21 PM
If you find the answer please put it here.

I have the same problem and only difference is that my html files are under:
home/endeavor/public_html
and shippet is here
home/endeavor/public_html/editor


Thanks.


Title: Almost got it
Post by: admin on September 04, 2002, 06:19:07 PM
Quote from: sikter
If you find the answer please put it here.

I have the same problem and only difference is that my html files are under:
home/endeavor/public_html
and shippet is here
home/endeavor/public_html/editor

Thanks.


Sikter, does your public_html directory have permissions of 755?


Title: Almost got it
Post by: sikter on September 05, 2002, 06:49:30 AM
Quote from: electric
Quote from: sikter
If you find the answer please put it here.

I have the same problem and only difference is that my html files are under:
home/endeavor/public_html
and shippet is here
home/endeavor/public_html/editor

Thanks.


Sikter, does your public_html directory have permissions of 755?


Yes, it has 755 permission by default.


Title: Almost got it
Post by: skilgore on September 05, 2002, 02:55:22 PM
I'm Having the same issue as sikter. All of my folders (that I can get to, I'm on a shared host) are chmod 755.

UPDATE & Question

I have tried this with the new versiojn (*1.01) and still have the problem. Could this have to do with other directories above my site (shared server) having different permissions?


Title: Almost got it
Post by: admin on September 05, 2002, 08:40:45 PM
Quote from: skilgore
Could this have to do with other directories above my site (shared server) having different permissions?


I don't think so... (maybe, but I doubt it).  Can you post the exact error message that is being displayed?

Thanks!


Title: Almost got it
Post by: skilgore on September 05, 2002, 09:41:11 PM
Sure Thing!

Quote
SnippetMaster v1.0 ERROR
Unable to change directories to "/home/virtual/site8/fst/var/www/html" (permissions denied), check your permissions and your ROOT setting in "includes/config.inc.php"
FUNC: directoryDropDown().


If you want to try it out, and see if its just me
 http://www.westernequipmentco.com/snip

Im Using WinXP and IE 6.0.2600
TIA!


Title: Almost got it
Post by: admin on September 05, 2002, 10:09:40 PM
Hmm.. As long as the folder (/home/virtual/site8/fst/var/www/html) is chmodded to 755 or higher, then the script should be able to read the directory.  

The php function that is producing the error is this:

Code:
chdir("/home/virtual/site8/fst/var/www/html")


Are you any good at PHP?  If you are, then try creating a new file called "test.php" and put the following code into it:
Code:
<?php

$directory 
"/home/virtual/site8/fst/var/www/html";

if&
#40;!@chdir&#40;$directory&#41;&#41; &#123; echo "Unable to change directories to <b>$directory</b>.";
else &#123; echo "Success!"; &#125;

?>


Then upload the file up to your website and try to run it.  Let me know what text is displayed.  Basically, this will simply try to change directories into the one specified.. a way to isolate the problem, hopefully.

Cheers!


Title: Almost got it
Post by: skilgore on September 05, 2002, 11:04:34 PM
hrmmm...

Quote
Parse error: parse error in /home/virtual/site8/fst/var/www/html/dirtest.php on line 6


Line 6 is

Quote
Parse error: parse error in /home/virtual/site8/fst/var/www/html/dirtest.php on line 6


I'm fairly new to PHP, so I cdon't know how to fix that line. Ideas?

Thanks!
BTW, i refuse to support Paypal... is there any other way to donate?

I already rated you with 5 and 10's for an awesome idea, your working implementation, and your quick support response.;)


Title: Almost got it
Post by: admin on September 05, 2002, 11:08:49 PM
Whoops!  I forgot to close one of the brackets.. duh.   :oops:

Here's the corrected code:
Code:
<?php 

$directory 
"/home/virtual/site8/fst/var/www/html"

if&
#40;!@chdir&#40;$directory&#41;&#41; &#123; echo "Unable to change directories to <b>$directory</b>."; &#125; 
else &#123; echo "Success!"; &#125; 

?>


Sorry about that!  And if you prefer, you can donate by sending cash in the mail (email me and I'll send you my address) or I can set you up with a different credit card page that doesn't use paypal.  Mind if I ask why you don't like paypal?

Cheers!


Title: Almost got it
Post by: Ickii on September 06, 2002, 04:35:45 AM
Since I am having the same problem I tried the test and got this

Unable to change directories to /home/virtual/site11/fst/var/www/html.

skilgore - are you on a server using ensim? Just curious if this might be the problem?

ickii


Title: Almost got it
Post by: skilgore on September 06, 2002, 07:24:43 AM
ickii : Actually, yes, I am using Ensim.

electric: thanks for the fix, this is the error i get now:

Quote
Unable to change directories to /home/virtual/site8/fst/var/www/html.


About Paypal : Me and my friends have all had some sort of issue, e.g. wrong amount of funds transferred, random (small) charges appearing, and they always blew me off when i contacted them about it, so I just canceled my account a while ago. It's not that I dislike them, I just dont like to deal with it.

Expect an email later today.

THANKS!


Title: Almost got it
Post by: admin on September 06, 2002, 08:22:08 AM
Quote from: skilgore
ickii : Actually, yes, I am using Ensim.

I'm not if using Ensim would make any difference.. I personally use CPanel, but I don't see why it would matter unless Ensim is messing with the directory permissions.

Quote from: skilgore

electric: thanks for the fix, this is the error i get now:

Quote
Unable to change directories to /home/virtual/site8/fst/var/www/html.


Basically, what this message is telling me (since you got it from that little php script I provided above) is that the problem is nothing to do with SnippetMaster.  The problem is either:

1. The path specified (/home/virtual/site8/fst/var/www/html) is not valid in some way.

2. The directory doesn't have correct permissions set.  What that little php script is trying to do is simply change into the directory.  Since the permissions are set too low, the script fails and produces the error message.

This pretty much tells me that the problem is with the permissions on one of those directories.  Try chmodding them all, one at a time, starting from html, to 755 and see what happens.  There's no need to test the SnippetMaster script anymore.. you can just run that little php script until we figure out what is wrong.

If you'd like, I can log into your account and take a look myself.  If this is ok, just email me your username/password and I can check things out.  Alternatively, we could chat on Instant Messanger or something in realtime and figure things out..  Send me your IM address and we'll hook up eventually.

Cheers!


Title: Almost got it
Post by: Ickii on September 18, 2002, 07:00:41 AM
:D  Yaaaahoooooooo!

Downloaded the current evaluation and tried again, everything worked first try.

Thanks Electric - I am showing this to a user today, if he likes and wants to implement into his site I will be back to register/purchase the current edition.

-side note - Has anyone made you a template or design for your pages?

Ickii


Title: new problem
Post by: Ickii on September 18, 2002, 10:19:56 AM
Ok, this seems to be working fine for me using ie5.5, I can edit, preview, save pages without any problem. But....

When I had someone else try from another location using ie6.0, save and preview do not work. When either of those buttons are clicked it reloads the login page.

The pages are chmod 666 - I've checked 3 times.

Any ideas?

 :roll: ickii


Title: Almost got it
Post by: admin on September 18, 2002, 05:16:01 PM
If you PM me your snippetmaster username/login info I can take a quick look..

Basically, you're saying the the preview/save work on one browser (ie 5.5), but not on another (ie 6)?

Cheers!


Title: oops
Post by: Ickii on September 18, 2002, 06:20:50 PM
:oops:

Found the problem, the other user had cookies blocked.

Looks like everything is working.

Now to demo for a customer and if it fits his needs I will be back to purchase.

Thanks for the help and the work you've put into this, its great.

ickii  :P


Title: Re: oops
Post by: admin on September 18, 2002, 06:58:18 PM
Quote from: Ickii
:oops:

Found the problem, the other user had cookies blocked.

Looks like everything is working.

Now to demo for a customer and if it fits his needs I will be back to purchase.

Thanks for the help and the work you've put into this, its great.

ickii  :P


Awesome!  I hope it's exactly what your customer is looking for.. and that they want 300 copies of it!   :D

Cheers.


Title: Almost got it
Post by: Ickii on September 21, 2002, 11:18:32 AM
Ok new question....

Has anyone experienced any problems with a user on aol? They are using ie5.5 outside of aol but connected thru aol.

Everything is working but the save is not being saved. It looks to have saved the change but when previewed it shows the old page.

Refreshing the page has not helped.

My last hurdle.

Ickii


Title: Almost got it
Post by: admin on September 21, 2002, 12:01:20 PM
Quote from: Ickii
Everything is working but the save is not being saved. It looks to have saved the change but when previewed it shows the old page.

Refreshing the page has not helped.


Hmm.. so they click the "Save" button, and then what happens?  Is there an error displayed?  When the user clicks save, the program will (should) try to save the file and then it will display a "page saved" type of message..

If the program is unable to save, then an error will (should) be displayed.  If the program is not executing the save altogether.. then perhaps some of the code was modified in some way?

Let me know exactly what happens when the save button is clicked.

Thanks!


Title: Almost got it
Post by: Ickii on September 21, 2002, 12:36:42 PM
The user says - when the save button is clicked it loads the page that reads, changes have been saved and gives the option to view in new window or return to the editor. When he clicks the view in new window or when he opens a new window and browses to the page it is still the old page.

I haven't changed any of the code except what is required in the config file.

It works perfectly for me at home, work and two other tester both at home and work. We have tested on at least 6 computers at different locations, different connections. The aol account is the only problem child. LOL

Another solid reason for dumping aol!  :lol:

The only reason I asked if this could somehow be an aol thing is when the user used ie that is intergrated into aol he got all kinds of error messages, but when he opened ie seperately everything worked up to the save part.

I have him double checking his ie version just to be sure its 5.5 or higher.

ickii


Title: Almost got it
Post by: admin on September 21, 2002, 12:48:35 PM
OK.. from what you have explained, I can pretty confidently say that the page IS actually getting updated.  (Otherwise there would be an error message for permissiones, or whatever..)

I suspect that AOL is somehow caching the original page, so when the preview is displayed, the cached version is shown rather than the new page.  I've had this problem before with some ISP's that don't have their proxy servers set up correctly.

I'm not sure what to suggest, other than maybe putting a meta tag in the page itself that tells any caching mechanism not to cache..  

I wish I could help more, but if it's working everywhere else except with AOL.. then there's not much I can do.  Maybe someone has a suggestion on how to work around this problem?

I wonder if there's some code I can do to detect AOL and then do a workaround.. I've never used AOL before, so I have no idea where to even start!

Sorry...


Title: Purchasing now
Post by: Ickii on September 22, 2002, 02:29:15 PM
I am off to purchase, customer loved the idea of updating from his office without risk of damaging his layout.

Another question -

Is it possible to change the folder name from snippetmaster to something else? I tried a generic name for the folder but got errors.

Not extremely important but he would like to change the folder name to updates or something unique.

ickii


Title: Re: Purchasing now
Post by: admin on September 22, 2002, 06:27:10 PM
Quote from: Ickii
I am off to purchase, customer loved the idea of updating from his office without risk of damaging his layout.

Another question -

Is it possible to change the folder name from snippetmaster to something else? I tried a generic name for the folder but got errors.


Thanks for purchasing the program and helping me out!  I'm glad you like it.

Yes, you should be able to change the folder to anything you prefer.  Just make sure to change the appropriate variables in the config.inc.php file to point to the new folder name.

For example:

// This is the FULL path to the directory where the SnippetMaster program files
// are located.  DO NOT add a trailing slash.
$PATH = "/home/theclova/public_html/snippetmaster";

(The bold part needs to be changed.. and then make sure you change any other variables that used the old folder name)

Let me know if you need a hand and I can help.

Cheers!