Xepher.Net Forums

Xepher.net => Technical Support => Topic started by: golden-crystals on June 12, 2006, 11:54:26 PM

Title: PHP help?
Post by: golden-crystals on June 12, 2006, 11:54:26 PM
Does this topic belong here?

Anyway, I'm sure this is a common question, and probably very trivial, but so far (to my knowledge) I've loaded PHP and unzipped, sorted, changed, folded, and pressed everything in the right places and everything is pretty much where it should be to work. But I'm hung up on one little detail.

To test if ActiveScript is working, create a new file, named test.wsf
   (the extension is very important) and type:


 



   Save and double-click on the file. If you receive a little window
   saying "Hello World!" you're done.

~ 'Install.txt' for PHP

So my question is this: 'New file' what? And how?

I tried notebook, and after that obvious failiar I had to go to bed because it was 4 in the morning and I was going crazy. Would someone please help me with this? I have no friends that understand computer speak.
Title: PHP help?
Post by: Xepher on June 13, 2006, 12:31:51 AM
I don't know what "PHPScript" is, but it's different than regular PHP. PHP is serverside, while whatever you're messing with looks to be client side (and likely to not work for a lot of people.) You shouldn't need to mess with "installing" anything related to PHP. If you install anything, it would be a script package, like Walrus, to help you manage your comic, or a forum like this one, PunBB.
Title: PHP help?
Post by: golden-crystals on June 13, 2006, 05:35:12 AM
....so.....all that reading, and rereading of slender font on the bright computer screen giving me headaches...fruitless?! Ugh, I'm beginning to think that I'm a waste of life, lol

How, then, do I make it so my index page is PHP compatable without installing stuff? I found PHPMyAdmin, I assume that's how? Is there something I can read on that or do I have to fiddle with it myself? Or is that it at all. Oh boy, now I'm just so confused, lol, my weekend was a lie, ha ha
Title: PHP help?
Post by: Xepher on June 13, 2006, 06:03:23 AM
No... just, as the directions at on the Help & Info page point out, you just have to save your page as a php file. So, instead of "index.html" save it as "index.php" PHP ignores everything outside of it's own tags, so the rest just gets treated like a normal web page. You add the snippet of code for the newsbox (note that it includes php tags) and that's the only bit that will be treated as PHP (unless you add more code on your own.)
Title: PHP help?
Post by: Databits on June 13, 2006, 05:21:35 PM
Actually, the , are always available. The other two are short tags and ASP style tags, and can be turned on and off from the php.ini configuration file. As such, while some people find short tags and ASP style tags convenient, they are less portable, and generally not recommended.
Title: PHP help?
Post by: golden-crystals on June 13, 2006, 08:26:47 PM
Quote from: DatabitsMake sure that if you're reading any php documentation, it's for PHP4 and/or PHP5.
The document I was reading from was an installation guide that unzipped with the PHP thing I downloaded. It included directions for 4 and 5 versions of it. But hopefully I won't have to worry anymore about that. ...please oh please oh please don't let me have to worry about that again! lol


Quote from: XepherNo... just, as the directions at on the Help & Info page point out, you just have to save your page as a php file. So, instead of "index.html" save it as "index.php" PHP ignores everything outside of it's own tags, so the rest just gets treated like a normal web page. You add the snippet of code for the newsbox (note that it includes php tags) and that's the only bit that will be treated as PHP (unless you add more code on your own.)
Wow, I'm glad it was so simple. If you couldn't tell already, I tend to make mountains out of molehills. I changed my index to 'index.php', inserted the newsbox, ran it into FTP, fixed privileges and stuff. But when I bring up my page, it gives me a 500 error. Is there another obvious thing I'm missing?
Title: PHP help?
Post by: Munerift on June 13, 2006, 08:31:38 PM
You have to RESET THE FILE PERMISSIONS.

You do that by going to the main site (xepher.net) and singing in under the member's section, then once you're logged in you'll see a list of links to the left hand side, one of those will say like "Fix Permissions." When you click on that you'll see a button you'll need to push, and in about 5 minutes your site will be broadcasted.
Title: PHP help?
Post by: Xepher on June 13, 2006, 10:26:54 PM
What Mune said. That tool will set permissions on ALL of your files to what I consider safe (and useful) defaults. In the future though, if you're just uploading/changing one file, sometimes it's easier to change it directly yourself. Most FTP programs let you right click on a file and choose "properties" look for something about permissions. For php files, you want to give full permissions (read, write, and execute) to yourself (owner) and remove all permissions from both group and world (somtimes called "other.") If your FTP client doesn't support that, try winscp instead of FTP. http://winscp.sourceforge.net

If that's too much trouble, then ya, just fall back to what Mune said. Run that "Fix Permissions" tool after you're done uploading. Sometimes it can take a couple minutes before the changes happen, so have patience if it doesn't seem to work right away.
Title: PHP help?
Post by: golden-crystals on June 14, 2006, 04:07:29 AM
Quote from: MuneriftYou have to RESET THE FILE PERMISSIONS.

You do that by going to the main site (xepher.net) and singing in under the member's section, then once you're logged in you'll see a list of links to the left hand side, one of those will say like "Fix Permissions." When you click on that you'll see a button you'll need to push, and in about 5 minutes your site will be broadcasted.
I did do that. By 'privileges' I meant 'permissions'. I waited 5 minutes and came up with the error, then proceeded to write my previous post. But, I did it again, and hey, now it works. ^^ I guess the second times a charm, and it's my lucky day!
Title: PHP help?
Post by: Munerift on June 14, 2006, 04:14:29 AM
Yeah, it's been finicky on me too before... =P
Title: PHP help?
Post by: golden-crystals on June 14, 2006, 06:08:33 AM
Is that all it is? Just being finicky? Because it did it again, and if it is just finicky, then I'm glad it's not me, lol
Title: PHP help?
Post by: Xepher on June 14, 2006, 06:56:06 AM
Finnicky? Hmm... I haven't gotten any error messages. It's designed to email anytime it doesn't make a successful run, and I have recieved no notices. Maybe it's something with the browser, not quite completing the request or some other upstream problem. After you hit the button for "fix permissions" are you getting a page that says the request recieved (or whatever red letter acknowledgement I wrote)?
Title: PHP help?
Post by: golden-crystals on June 15, 2006, 04:38:26 AM
Yup. and it says something about being in 5 minutes. The error I recieve is on my actual webpage, a 500
Title: PHP help?
Post by: Xepher on June 15, 2006, 07:54:24 AM
Are you sure you ran the fix permissions tool after your last upload or edit on a file? Because the permissions on index.php were not set right. I ran fix permissions, and now it works just fine.
Title: PHP help?
Post by: golden-crystals on June 16, 2006, 03:18:49 AM
Yeah, that's how I thought was the only way to see what had been done (beside loading files into FTP)
Title: PHP help?
Post by: Munerift on June 16, 2006, 01:50:40 PM
Is there a way Xeph to mayhap HAVE THE OPTION for us unadvanced people who dont custom tweak the permissions, to like click a checkbox somewhere and have the server fix permissions AUTOMATICLY each time you reupload a PHP file???? Hmmmmm?
Title: PHP help?
Post by: Xepher on June 17, 2006, 04:39:20 AM
Hmmm... Not that I can think of offhand. At least, not a way that wouldn't be a huge load on the server. The script I have right now, basically scans all your files, and then changes the permissions on all of them. That's fine to do once in a while when people push the button for it, but I couldn't just have that running full time, or it would chew up all the cpu's go-juice. :-)

The problem is that there isn't an easy way to trigger it or "know" when a file has been changed or uploaded without just scanning all the time. I will keep it in mind though, and see if I can't figure something out. For now though, I'd say use winscp, as it's actually AWARE of file permissions, and I believe it lets you pick default permissions for uploads.
Title: PHP help?
Post by: golden-crystals on June 17, 2006, 07:36:47 PM
I don't mind having to go in and push something. It's kind of gratifying, lol 'There, I'm done!'