nottiestyle Published on February 21, 2009
by nottiestylepro

nottiestyle's blog

Browse posts
54 930 visits since 2007! btw SNS is New future or a passing fad?
Posted on August 26, 2009
2 comments (latest 3 months ago)
Noticed? We have a new iper slideshow now.
Posted on May 16, 2009
3 comments (latest 6 months ago)
Apple's Baby ...My next purchase
Posted on May 10, 2009
11 comments (latest 7 months ago)
3:00 am | If only I had 30 hours per one day!
Posted on March 13, 2009
6 comments (latest 7 months ago)
.htaccess made me crazy!!!
20 comments (latest 9 months ago)
Self-analysis....which of 9 is your character?
Posted on January 25, 2009
10 comments (latest 9 months ago)
Wish to join " iper international meeting" but.. Obstacle in front.
Posted on January 16, 2009
19 comments (latest 10 months ago)
The top Social Network in Asia, Friendster...?
Posted on January 11, 2009
2 comments (latest 11 months ago)
mini Slideshow Japan Group
Posted on January 3rd, 2009
2 comments (latest 11 months ago)

Keyword tags

work
sever
character
php
cgi
apache
WordPress
encoding

More information

This post is public
Attribution + non Commercial + share Alike
  1. Read 440 times

.htaccess made me crazy!!!

Saturday February 21, 2009 at 04:47PM

1:33 am on Sunday morning.
I am still awake.

Because .htaccess file has kept me from sleeping, REALLY!
A couple days ago, I've changed my server into the one in safe mode,which disturbs you re-write the files.

That server uses not a module edition PHP but CGI.

I use WordPress.


So I tried to make something "Move only a designated file by using PHP as CGI."
and put it into the same directry as "upload.php"
Because if all is moved as CGI, a start movement becomes slow.



And I wrote ".htaccess" and uploaded.

<files upload.php>
AddHandler application/x-httpd-phpcgi .php
</files>

I think I am smart.


But it didn't work.

....why?

...tried,again

....once more

....not again..



Finally I did it, almost over the midnight. pffff

Reason: wrong character encoding...that's all.

:))))))))))

PS. Mac OS is less useful when I want to make something special in my computer.

Ah....Tough day I need a holiday. Go out tomorrow.

20 Comments / add your comment?

Dirkpro says:
I totally hate htaccess! And it hates me! htaccess and i have an agreement: It just works if i set it up, and i don’t gonna set it up more often as necessary ;)

--
Seen in dirk home page (?)
Posted 9 months ago. ( permalink )
nottiestylepro replies:
hahaha...You hate it?
I found it more usual when I become more smart;-)
Because all I did was adding one htaccess file.


When do you use htaccess file?
You make "a vitual sever" in your computer?
Hey! you know? I can't make that one in my Mac.sad
Posted 9 months ago. ( permalink )
Dirkpro replies:
I use htaccess on my blog and on several websites, and all i do is defining a rule, that example.com/blah get wrapped to example.com/index.php?site=blah (and yes, i check, if this is okay and no stuff like “../../../somesystemfile”).

But i still don’t like it.

--
Seen in my account recent activity (?)
Posted 9 months ago. ( permalink )
nottiestylepro replies:
I sometimes visit your blog.(it takes long time to read,actually. You like coding and writing.)
Ah..what web site do you recommend to learn PHP or Ajax?
I think I try to make original templete for my blog this year.
Posted 9 months ago. ( permalink )
Dirkpro replies:
For me it was learning by doing: I decided to lern PHP because it’s so much easier to manage big websites with PHP instead with plain HTML. Then i made my way through php.net (thier function glossary is great!).

There are some newsgroups for PHP, too (most ISPs give newsgroup access with the internet acces contract, just ask them, so you maybe do not need to get one from another company).

MAking themes for WordPress is easy too, they have a good listing for all so-called “template tags” at thier “codex”-site at codex.wordpress.org

I always start new themes by taking the current “classic” theme shipped with wordpress (they use almost all available template tags in this theme, the “default” theme is just a shiny markeding theme with limited functionality *g*) and removing all html stuff, so that there are only the plain template tags and then i start to build my theme “around” the tags.

--
Seen in my account recent activity (?)
Posted 9 months ago. ( permalink )
nottiestylepro replies:
>For me it was learning by doing
This is great! I've seen some people say "we are not professionals so I can't make this" and never tried even simple coding.
But...each professonal starts from simple basic one?

I'll check “codex”-site at codex.wordpress.org
and sometimes posting some ideas what I want to do or see how iper poeople think about.
I would be glad if you add your comments (if you like)

Let's keep in touch with me smile
Posted 9 months ago. ( permalink )
Dirkpro replies:
There are always people saying “you cant’t do”, but eventually there will come someone. This person just does it, because he does not know, that he can’t do.

People should not be that anxious about the things. Especially in the IT i see this every day. If people have to use a computer they don’t know (well, not because it runs Linux, but only because it’s not her personal computer), they sometimes not even WANT to click the start menu button – Maybe they think, the start menu button on this computer has a special functionality, it not opens the start menu, it destroys all data *lol*

“Just click! It’s astart menu button and no end-of-the-world button! You know this from your PC at home!” ;)

And even in Linux you just can’t destroy data with one single click (well, you CAN actually: if you redirect the output of /dev/input/mice to /dev/sda while you’re root. If you use your mouse now, your harddisk gets screwed up …)

It’s the same thing with webdesign. If it not works, what will happen in worst case? Well, it could plain not work, or it will look not as expected. No one will die because of the tries for a new WordPress theme ;)

It’s an old slogan, but it’s still present: “just do it!” :)

--
Seen in my account recent activity (?)
Posted 9 months ago. ( permalink )
nottiestylepro replies:
I think you are one of positive person.
OK, I will do "create my own WordPress theme" laught

btw Have you ever tried FLASH? and...

+1 I ...think it doubtful whether UNIX is used for private use.
too much ...ah...too musch thing to do for one person to use home.
What for people use UNIX at home I am curious.
Posted 9 months ago. ( permalink )
nottiestyle edited this comment 9 months ago.
nottiestylepro replies:
Yes, you are right.
But...the coding editor for Mac is not flexible.
I met mi at last and found out my encoding is wrong.

And Apache usually works well at Windows but ...I am not sure it works at Mac.
This is a reply to mac and guido's comment.
Posted 9 months ago. ( permalink )
underflo says:
what text editor are you using for os x?

i recommend, textmate or coda.
Posted 9 months ago. ( permalink )
nottiestylepro replies:
I am using coda,too.
Coda is nice!!
Posted 9 months ago. ( permalink / translate )
nottiestyle edited this comment 9 months ago.
underflo says:
you should try textmate as well. i think i like it better than coda. either is fine though.
macromates.com
Posted 9 months ago. ( permalink )
nottiestylepro replies:
WOW! It looks nice! Thank you,I will have a try 30th trial.
Posted 9 months ago. ( permalink )
nottiestyle edited this comment 9 months ago.
Dirkpro replies:
Is an own server something special? :)

--
Seen in my account recent activity (?)
This is a reply to EinTon's comment.
Posted 9 months ago. ( permalink )
nottiestylepro says:
@EinTon
@Dirk
NO, No,I don't need my own sever in my house.
I said I changed more reasonable rental server (19.29 Euro per year) which is in safe mood due to protect itself from arranging by the cliants.
This server doesn't allow you to make an autmatic creating file, nor replacing nor adding new files.

Because on the server, I have PHP file which is,
<?php

if (is_uploaded_file($_FILES["upfile"]["tmp_name"])) {
if (move_uploaded_file($_FILES["upfile"]["tmp_name"], "files/" . $_FILES["upfile"]["name"])) {
chmod("files/" . $_FILES["upfile"]["name"], 0644);
echo $_FILES["upfile"]["name"] . "done";
} else {
echo "No, you can't upload the file";
}

?>

This PHP file is waiting you adding new files but that server does not allow you to do, "files" was empty all the time! DDDD:!
I asked the support but it was not much suggestion wothout paying extra.And I found out the new server applys CGI instead of a module edition PHP.
So I needed to "use PHP as CGI"

so I wrote the following on a text fime. (.txt)

AddHandler application/x-httpd-phpcgi .php

That's all.

The reason why I need a better script editor is....here in Japan, there is a lot of free, nice, simlple text editores for Win made by Uni students, Programmers but few for Mac.

TextMate is good one!! It has useful features as Dreamweaver but much more reasonable.smile

+1 Using Mac does not bother you just Editing text, scripts but you can't make "test environment" in your computer at home.

Hm now I know...in this situation, people might use UNIX OS. but..I don't think I need.
Posted 9 months ago. ( permalink )
nottiestyle edited this comment 9 months ago.
Dirkpro replies:
Have you tried “$_GET($_FILES);” instead of “$_FILES” only?

--
Seen in my account recent activity (?)
Posted 9 months ago. ( permalink )
nottiestylepro replies:
No, I haven't.
“$_GET($_FILES);”
Hm...is it useful? I think I need to learn more..;-)
Posted 9 months ago. ( permalink )
Dirkpro replies:
In PHP 5 they changed a lot of the handling. I didn’t use the files upload stuff since forever, but i know, that you need to use “$_GET” for accessing variables submitted via input form and the get-functionality or the post-functionality (in this case you need to use “$_POST”).

This gives access to an associative array (key names are derived from the input field names). If you have an input field “name” in your form, and submit in via the post functionality, you have to access the value of this field in the script via $_POST[name]. (and as you see, ( and ) are nonsense in my first post *g*).

Maybe the file handling is done in the same way?

--
Seen in my account recent activity (?)
Posted 9 months ago. ( permalink )
nottiestylepro replies:
I see.

I'll take your suggestion next time I make my own templete for WP.
I have more 5 days before I get start to new job so I'll have some time to be absorbed in this;-)

Thank you Dirk.
Posted 9 months ago. ( permalink )
nottiestyle edited this comment 9 months ago.
Dirkpro replies:
New job … mmmh … good luck and have fun!

--
Seen in my account recent activity (?)
Posted 9 months ago. ( permalink )

Add your comment

Reply to this comment

Edit your comment

Please sign in to post a comment Sign in now?


rss Latest comments – Subscribe to the feed of comments related to this post.

 

Català | Čeština nové | 中文 | Deutsch | English | Español | Esperanto | Ελληνικά | Français | Galego | Italiano | Nederlands | Português | More...