1. Euphoria CGI Success

Hi there,

I've been trying to get Euphoria working on a webserver for simply ages 
now. I thought I'd tried everything and just about given up due to lack 
of expterise.. I kept getting the dreaded 500 Internal Server error 
message. I'm pleased to report its all going well now, fine and dandy.

For anyone who has been in the same position as me, I found out the 
problem was having "write" file permissions for the file (I naively 
thought changing the file permissions to 755 would make it more likely 
to execute) -- this was in fact exactly the source of the problem.

Many servers are set up to consider 755 *too * much access for a remote 
user.

And I've traced that to 3 different webservers now. They don't like 
executing 3rd party programs which allow the write bit set in 
permissions in case that program has a bug which can be exploited.. etc etc.

I am so god damn happy I'm ready to throw PHP out the window!!!!

Cheers

new topic     » topic index » view message » categorize

2. Re: Euphoria CGI Success

> I am so god damn happy I'm ready to throw PHP out the window!!!!

IMHO, every tool has its purpose. Even after I got Euphoria working
for CGI, I kept having to re-invent the wheel when it came to simple
CGI i/o, database connections, and form processing. I've been using
PHP for a year now, and it works better than Euphoria, mainly because
it's designed for CGI. I have, however, come to despise the semicolon.

I bid you good luck in your endeavors with Euphoria and CGI.

~Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: Euphoria CGI Success

Greg Haberek wrote:
> 
> > I am so god damn happy I'm ready to throw PHP out the window!!!!
> 
> IMHO, every tool has its purpose. Even after I got Euphoria working
> for CGI, I kept having to re-invent the wheel when it came to simple
> CGI i/o, database connections, and form processing. I've been using
> PHP for a year now, and it works better than Euphoria, mainly because
> it's designed for CGI. I have, however, come to despise the semicolon.
> 
> I bid you good luck in your endeavors with Euphoria and CGI.
> 
> ~Greg
> 
> 

I agree.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Euphoria CGI Success

FD(censored) wrote:
> 
> Hi there,
> 
> I've been trying to get Euphoria working on a webserver for simply ages 
> now. I thought I'd tried everything and just about given up due to lack 
> of expterise.. I kept getting the dreaded 500 Internal Server error 
> message. I'm pleased to report its all going well now, fine and dandy.
> 
> For anyone who has been in the same position as me, I found out the 
> problem was having "write" file permissions for the file (I naively 
> thought changing the file permissions to 755 would make it more likely 
> to execute) -- this was in fact exactly the source of the problem.
> 
> Many servers are set up to consider 755 *too * much access for a remote 
> user.

It took me awhile to get eu cgi working, too, mainly because of that same
problem.
 
> And I've traced that to 3 different webservers now. They don't like 
> executing 3rd party programs which allow the write bit set in 
> permissions in case that program has a bug which can be exploited.. etc etc.
> 
> I am so god damn happy I'm ready to throw PHP out the window!!!!
> 
> Cheers

I never learned PHP. I started looking at the documentation once, and I decided
it was not for me! After using Euphoria, PHP looked like a mess to me. smile

C.K. Lester has some nice euphoria-powered websites
(http://www.cklester.com/euphoria/ and http://www.myprayerlist.org/). He seems to
know what he is doing. I also have a euphoria-powered website
(http://fluidae.com/).

I know it can be difficult to make a website with euphoria because you have to
do alot from scratch. Oh well.

~Ryan W. Johnson

Fluid Application Environment
http://www.fluidae.com/

[cool quote here, if i ever think of one...]

new topic     » goto parent     » topic index » view message » categorize

5. Re: Euphoria CGI Success

Vincent wrote:
>>Have you ever tried to open an EDB file with 50 process
>>(no threads on Eu, yet!) simultaneously and write it?

I've had no problems with EDS and I've tested it (with apache on my 
local computer) with heaps of simultaneous write requests and it works 
fine. Just let only one process write to it at once and have a queing 
mechanism like mysql or a timeout mechanism.

FYI Mysql does not let a record be written to by 50 processes all at 
once either, but it has a more sophisticated queuing mechanism than EDS. 
For simple databases like user login, the write request should take no 
longer than 0.x seconds anyway.

A very simplistic way to use EDS for the web would be to fail if it 
can't get an exclusive lock.

A more realistic way would be to wait and keep trying for a bit, and 
give up and error out after a set period has expired. (this should still 
work fine for 50 users if you are only updating the record rather than 
writing copious quanitites of data each hit).

A more complicated way would be to employ a database server which queues 
write requests appropriately like mySQL.

I agree with one point that a web library would be needed, not 
necessarily to standardise but to implement common web things (like 
hashing passwords) that new web programmers might not know about.

 > Yes I know Eu is very fast compared to PHP. However that is not what
 > we need for websites. Moreover, who wants to use PHP for doing sieve?
 > If sieve were really needed, one could use C and call the sieve
 > function from Eu or PHP and that will be faster.

It depends on what you do with websites. As Rob pointed out PHP would 
grind to a halt when processing truly massive amounts of data. Mysql is 
not too flash either all the time. I volunteered innocently to create a 
website for a regular IRC channel, and was duly delegated the 
responsibility of programming a page which could draw stats and graphs 
for *any* period since the channel had begun. How? they gave me the 500 
megabytes of logs that had accrued since 1997. Now it's completely 
possible to do this, ie create dynamic graphs from a web form with this 
much data - it usually involves indexing the log files into a more 
binary form and storing it in a database. How long does PHP take to 
index new log files ? more than 10 times longer than euphoria. And half 
of that's spent on IO requests anyway which should close the speed 
difference between the two languages.

Now I completed this stats page with PHP and mysql (before I got 
euphoria working). It takes about 1.4 seconds to render a page for a 
long period, showing say average daily load between period x and period 
y for weekdays, weekends, total, etc. Because PHP is so slow for 
language contructs and loops it was quicker to issue each mysql request 
seperately and then just dump the data to a graph. Asking mysql to poll 
the database 3 times was quicker than grabbing * once and selectively 
parsing it with PHP. With euphoria it's much quicker to pull everything 
from the database and  parse it then and there. I can make the same page 
in Euphoria render in under half the time I could get it to with PHP 
mysql. And that's the end of my wee web programming story.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu