I ran into the exactly same situtation with my web site. However, it's possible (albiet nonoptimal) to get MySQL access in Perl via PHP...in sql.php:
<?php // This is a hack to get around F2S's limitation of only allowing PHP- +MySQL $connect = mysql_connect("db.account.f2s.com:3306", "account", "passwo +rd") or die(mysql_error()); $result = mysql_db_query("account", $query, $connect); while($row = mysql_fetch_array($result)) { echo "{\n"; while(list ($key, $value) = each($row)) { echo "\t$key => q[$value],\n"; } echo "},\n"; } ?>
Then in your Perl program:
sub sql_query { my ($query) = @_; my ($data_structure, @data); # Ugly kluge to get SQL to work via Perl instead of PHP $query = url_encode($query); # TODO: use standard function $data_structure = get("http://www.account.f2s.com/sql.php?query=$q +uery"); @data = eval "($data_structure)"; return @data; }
Hope this helps..oh and by the way, I believe Spaceports.com supports Perl and MySQL, though you have to request it (I requested a CGI account but they never received one, maybe you'll have more luck.)

In reply to Re: Perl vs. PHP: databases by Anonymous Monk
in thread Perl vs. PHP: databases by elusion

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.