1

(1 replies, posted in Programming)

Hi, it's me again, trying to get my head around MySQL, with great help of you all, of course :)

I've created MySQL user in PHPMyAdmin and I want to grant him ALL privileges (including creating new databases) EXCEPT modifying and reading one special database.

In other words, smth like that:

 
GRANT ALL PRIVILEGES ON * . * !exceptionDB TO 'user'@ 'localhost' WITH GRANT OPTION ...;

Please, help me with right syntax.

2

(10 replies, posted in Programming)

Also when I go to https://mydomain.net:81/mysql/ (webconfig web interface)
phpmyadmin asks for username and password, what should I enter here (root and MySQL password doesn't work)

Thanks!

3

(10 replies, posted in Programming)

Smartys, smile

 mysql> grant all privileges on databasename.* to any_user@localhost identified by secretpassword;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'secretpassword' at line 1

Should I write any_user or substitute it with actual username (what?) what about secretpassword it is some kind of reserved word or?

4

(10 replies, posted in Programming)

The first problem was solved (It's me to blame) ps showed system's mysql while I should run my own manually by #service mysqld start ... Anyway, that was stupid problem...

Smarty (or anyone), could you give me some hints on how to prepare it for punbb install (I need to create user, right?) and I think write mysqld start to rc.local to load it automatically (don't know exactly how).

Thanks in advance!

5

(10 replies, posted in Programming)

>>> Make sure MySQL is running

How? I've just showed ps -A output, there is mysqld_safe and system-mysqld, do I need smth else?

6

(10 replies, posted in Programming)

Hi!

I've used to creating data bases through webadmins, but now I need to create db user and so on in shell (webconfig is not available). And I don't know much...

Here's what I get: server running ClarkConnect Community Edition 4.0 (rpm-based router/firewall) the system has its own separate mysql install which it uses for webconfig (and I don't want to touch this) so I installed mysql with apt-get,

rpm -qa mysql
says:

mysql-4.1.20-2.cc

It seems that all mysql stuff is installed properly.

But when I try to set the root password for MySQL (or use mysqladmin) it says:

$ mysqladmin -u root password 'somepassword'

mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

/etc/my.cnf points to /var/lib/mysql/  but this dir is empty.

$ps -A | grep mysql

 29997 ?        00:00:00 mysqld_safe
30065 ?        00:00:47 system-mysqld

Any ideas?

7

(4 replies, posted in Programming)

Thank you Smartys, one hundred times Thank You! smile

I wonder how you can so easily understand such a complex (at least for me) sql queries. I wish I have as much experience as you do.

8

(4 replies, posted in Programming)

Hi!

I haven't enough php or sql experience to solve this problem just by googling php docs, so I'm asking you for help

You see, userstats mod allows admin to see most read (popular) topics, it shows a table like this

Topic                               Number of Views
        Topic Name                             10

All I want is to convert a string Topic Name to a link pointing to appropriate topic. If this script already can get topic subject (by somehow correlateing topic_id from statviews_all table with subject from topics table) then it should be easy to get topic id too.

This lines print topic subject and Number of Views

while($stat_topics = $db->fetch_assoc($result))  {
     echo '<tr>
     <td class="tc2" style="width:70%">'.$stat_topics['subject'] . '</td>
     <td class="tcr" style="width:30%;text-align:left">'.$stat_topics['topicct'] . '</td>
     </tr>';

$stat_topics['subject'] should be replaced by link like <a href='viewtopic.php?id=$stat_topics[topic_id]'>
$stat_topics['subject']  </a>

But I don't know how to trace associative array to see if it contains keys with topics id. How can I get something like exception when trying to get inexistent key? Instead of empty values.

And, after all, I doubt that $stat_topics array contains keys with ids.

Here is the $result query

$query = 'SELECT count(s.topic_id) as topicct, t.subject FROM '.$db->prefix.'statviews_all s INNER JOIN '.$db->prefix.'topics t ON s.topic_id=t.id WHERE logind >= \''.$start.'\' and logind <= \''.$end . '\' group by topic_id order by topicct DESC';
      $result = $db->query($query) or error('unable to fetch topic information', __FILE__, __LINE__, $db->error());

Please, help me to modify code, so it'll be able to produce links to topics.

9

(6 replies, posted in General discussion)

Merry Christmas & Happy New Year!

Congrats from Tux smile

The right question (as I think) is: how to change Timezone for guests?

[edit]

Shame on me smile
Search rules! - http://punbb.org/forums/viewtopic.php?id=9985

Looking forward to default timezone option to be added to  PunBB 1.3

You see, PMS mod is disabled for guests (i.e. not visible), thus in the very beginning it checks whether the user is logged in and tells him to do so if not.

if ($pun_user['is_guest'])
    message($lang_common['Login required']);

But, I've searched and didn't find entry 'Login required' in lang\English\common.php (or anywhere else)
I've updated common.php with this entry and forum failed with blank page (it failed to parse common.php to $lang_common I think)

Is it wrong to add lines to lang files?

Now I'm going to add Login  required entry to mod's lang file (pms.php) and refer to that like $lang_pms['Login required'].

Any suggestions?

what do you mean by slow? Like in any other language or thechnology anyone can write "slow" code, an infinite loop or a very heavy function that will waste systen resources, that doesn't mean that AVM is slow, look at one of my previous posts,

part of code from Flash AVM will  be used  to make JS in FireFox *faster*.

try looking here

http://www.punres.org/viewtopic.php?id=144

and here

http://www.punres.org/viewtopic.php?pid=4285

http://fubon.co.uk/ - works just right, check you flash player version. What do you exactly mean by "don't work properly"?

Yes, sites made entirely with flash isn't future.
I'm talking about *web apps* that connect to various remote services, etc , *not* about sites. Normal HTML sites is always better for distribution of  mainly textual information to people.

If you have about 10 minutes go and watch screencast of building a simple Flex app with Flex Builder. Ant then decide for yourself.

http://www.jamesward.org/wordpress/2006 … 1-minutes/

Jarkko, you are not forced to buy anything to develop flash applications, just go to Adobe's site and download free SDK with AS compiler and use editor or IDE of your choice to write AS3 and MXML code.

Actually several days ago Adobe has contributed code (135 KLOC) from ActionScript Virtual Machine (AVM2) to Mozilla Foundation's Tamarin project which goal is to implement a high-performance, open source implementation of the ECMAScript 4th edition (ES4) lang specification.

That means in future we'll be able to share algorithms and libraries between browser with it's own DOM and Flash with it's media oriented DOM. It is a little step but, standardization is always good smile

Just try to forget about that "interactivity" (we aren't designers after all, right?) and look closer at Flash platform and opportunities that it gives to web developer, of course there are ugly things made with Flash, it is the cost of popularity.

About back button in Flash: this problem isn't problem for several years by now! There are hundreds of tutorials for begginer flash developers describing how to enable back/forward buttons and history in browser, but many of them are just to lazy to implement this. Flash is going to desktop along with traditional HTML and AJAX/JS, try googling Apollo.

So, I wish you only best experience with whatever technology you are using, especially with Flash wink

CodeXP, I understand you, look,

CodeXP wrote:

you're just about saying that no website can be creative if it doesn't use Flash, although I do hope that's just due to your English language-skills.

Of course I didn't want to say that, using Flash isn't obligatory for building creative site or whatever. For designers Flash is just another cool technology that you can have fun with.

For people with disabilities Flash supports alternative text for screen readers.

CodeXP wrote:

Oh and another thing, have you ever tried browsing a Flash site on a handheld device?

Maybe that site wasn't designed for viewing on something other that desktop?
I've created several simple games and flickr photo search application for Flash Lite and tested them on mobile phones, and it wasn't that bad smile

CodeXP wrote:

P.S: In what way do you consider color schemes to be a technology?!

I just wanted to say that I hate to read red text on green background, etc, it's not tech, it's bad taste smile

I vote for DHTML, use of wrong color schemes, etc and overuse of JS.

People if you think that Flash is banners and animations and *nothing* more, then I'm really *sorry* for you.

Have you ever heard of Rich Internet Appplications? Don't you want to have one easy tool for building cross-platform (including mobile devices) web applications, with free SDK available powered by ActionScript 3 (OOP, strong typed java like language) and MXML.
Have a look at this examples.

Stop looking at stupid banners and realize flexibility and easiness that Flash platform gives you.

Rickard, navigation should be as easy and transparent as possible, that's right, but how do you imagine navigation for creative website, about art or games, movies and many others? Just dry html list, no? Check out this amazing use of flash animation and interactivity http://fubon.co.uk/  it's worth seeing even on slow connection.

If you don't like some Flash work in 99% of cases blame *developer/designer*, not technology!

Flash is one of the greatest thing that has happened to web ever!

Hmm, I asked it the wrong way smile

I know that I need webserver error log and I also know that Apache is the most widespread web server smile

You see, I have ftp access (there is /log directory in root containing access.log, ftp.log, mail.log and other kind of log archives) to my site and control panel

Where to look?

Thanks!

Rickard, thank you for answering, just one question (maybe dumb smile

What kind of error log do I need exactly and how do I know if I have acces to it.
I'm dealing with this kind of error for the first time (it is strange error), so just give a hint where to strart searching for error logs (PHP error log or what it is called?)

So you really think it is because of mod? How could it be? Gallery worked fine and then for no particular reason it returns an internal server error (not forum error). I think it is a hosting problem.

The question is what to do? smile

I have PunBB 1.2.14 with gallery mod running on 1and1 hosting for about a month and all worked perfectly, untill today

One user told me that he gets this when he hit Submit button on a gallery_post.php page:

Error 400!
INTERNAL SERVER ERROR
An internal server error has occured!
Please try again later.

I've tried to upload some photos myself and succeed (it worked like always). I've failed to reproduce that error.

Now, after several hours, I have that damn Error 400 sad

Forum works well, and nothing was changed for weeks (CHMOD on /img/gallery directory wasn't changed, etc.),  so I guess it is not forum problem, am I right?

It's a stab in a dark, but maybe some code in gallery_post.php (imagecreatefromjpg() functiond) may lead to that strange error, but how, it worked fine before!
Posting this in troubleshooting, because I don't believe that this is any mod's error.

PHP Version 4.4.4
GD Version     bundled (2.0.28 compatible)

Thanks!

?????? ??? ???? ????????????? ?????? ? ??? ????? ??? ?????? ?????? ???? ??????. ? Administration > Options > Forums > Edit

23

(5 replies, posted in Archive)

Right, but I'd like to mention two facts:

* I was glad to find Russian sub forum *here*, it was "+" plus for PunBB when I was comparing different board engines.
Of course, I speak English (not perfectly, though) like many other developers around the world, but you know it's sometimes better to use your own language, just more pleasantly smile

*

Rickard wrote:

are good only to the people who speak that particular language

With full respect to Swedish or Polish (and other) communities there are just so many Russian-spoken people, *not* only in Russia but also about 15 other countries (mainly ex-ussr). I, personally never been to Russia, but Russian is my mother tongue smile

Reading advices in English is hard mainly for beginners, but we all were newbies in the beginning.

Rickard wrote:

I have no idea what's going on in them

People still discussing problems, making corrections to translation of the forum, etc.

Maybe keep Russian sub forum for a while, it (with punbb.ru) perfectly supplement each other.

24

(5 replies, posted in Archive)

I'm really unhappy with that sad
Of course it's up to you, but this forum looked to me like "official" and punbb.ru more like complementary.

I've found here many helpfull ideas, so it looks more like step backward...
Or maybe information (in Russian) will be concentrating in one place, who knows...

I have a new PBB Gallery and about 700 photos to upload. You see, right, kind of boring job...

Where to start from making a script that will automate this process?

Even simpliest ideas are welcome smile