Jump to content

gizmola

Administrators
  • Posts

    5,879
  • Joined

  • Last visited

  • Days Won

    139

Everything posted by gizmola

  1. Well that\'s a partition of your harddrive. Whatever filesystem is mounted there is full. Note the filesytem mount that\'s displayed as Mounted on. You\'d have to delete files from the filesystem to clear up space if you needed to write more data there. MySQL databases are a series of files, so if MySQL is configured to write it\'s data on that mount, you\'re going to get an error.
  2. I agree 100% with what Shivabharat advised. A few things I would add though: With the more current versions of php you suppossedly don\'t need to seed rand with srand. I would select min(quoteid), max(quoteid) from yourtable first, then use those values to pass to rand: $randid = rand($minval, $maxval); Then as Shiv suggested just do a select quote from yourtable where quoteid = $randid
  3. You need to install postgresql on your box, and then recompile/configure php so it supports that. Details should be on the postgresql and php.net sites.
  4. Now, i am not root when i start the webserver, but when i become root and run it, everything works fine. So, my guess is that i don\'t have permission to open up port 80. Does anybody know how to fix this error? Someone told me that you can\'t open port 80 when you aren\'t root, so you have to run apache as root. This is really bad because i do not want to run apache as root, since that is a major security problem. Thanks for your help. Although you start Apache as root, it immediately forks children as the user you specify in the apache http.conf file. This is most typically set to be nobody.
  5. Try changing your host to localhost. Most servers are set up that way as a security measure.
  6. Install phpmyadmin. It\'s web based so you can stick it under your webspace. http://www.phpmyadmin.net/
  7. There should be a pgsql section, btw.
  8. It sounds like postgresql support was not installed with your current version of php. create a file called: phpinf.php which contains this: [php:1:169120ff86]<?php phpinfo(); ?>[/php:1:169120ff86] Point your browser to this file and examine the information it returns. I expect that this will provide verification that you will need to update your php installation to include postgresql support.
  9. Basically go into the scheduler which is under the accessories|system menu and add a new entry there that calls php.exe directly like so: php -q yourscript.php > scriptstatus.html You need to make sure that the php.exe was installed and not just the module. Write and test yourscript.php, and make sure it works first, accessing it through your browser though.
  10. I\"m not familliar with myPHP, is it a stats package? Well at any rate, windows does have the Task scheduler that you can use in a similar manner to cron.
  11. Try changing this line: $sql_8 = \"INSERT INTO user (userid, password, fullname, email, userlevel, webspace) VALUES (\'$username\', \'$password\', \'$fullname\', \'$email\', \'admin\', \'0\');\"; to: $sql_8 = \"INSERT INTO user (userid, password, fullname, email, userlevel, webspace) VALUES (\'$username\', \'$password\', \'$fullname\', \'$email\', \'admin\', \'0\')\";
  12. Within the controlling tags, you\'ll have an OPTIONS line. \"Indexes\" is what turns on the directory listing. See this: http://httpd.apache.org/docs/mod/core.html#options
  13. The other option is to not use a seperate data and seperate time column, but instead to use a Datetime column. It\'s also better not to use keywords as the names of your columns. I\'d suggest instead that you have a column called for example: created. When inserting a value it could be insert into yourtbl (col1, col2, created) values (\'blah\', \'blah\', now()); It\'s easy enough via either MYSQL or php to seperate the date and time components from a date/time. The added advantage of using a datetime, is that *if* you need to do selects via date, it will be much more efficient. For example, you might have a query like: select * from yourtbl where created > now()-1;
  14. Alas, Inserts on a Table locking transaction system with no contention isn\'t a very good test, although I commend your approach. Definately read this if you haven\'t. http://www.mysql.com/doc/en/Table_locking.html
  15. gizmola

    Login?

    You need a connection, name, password and database to use mysql. There\'s nothing more to it than that.
  16. WHen you start a string with a single tic it\'s interpreted to be a string literal by php. Use a double quote around the assignment instead, and php will do the variable replacement you expect. [php:1:501ca3e94d]<?php $sql = \"INSERT INTO `stocks` (`Title`, `ID`, `Value`) VALUES (\'$title\', \'$id\', \'$value\');\"; $query = mysql_query($sql); if ($query) { echo \"Success!\"; } else { echo \"ERROR!\"; } ?>[/php:1:501ca3e94d]
  17. Speaking of headaches, I have a huge one at the moment, and I must confess I\'m not up to the task of scrutinizing your code, but I do have a kneejerk reaction to this design. IMNSHO, I feel you should have a table called msgread. When a reader reads a message, insert a row into this table, as oppossed to your current design. The first and most obvious reason for this is: 1. WHen you start you have let\'s say 10 users. There\'s let\'s assume 500 messages in the forum. Now user 11 signs up. Are you going to have the system go out and add Didnotread rows for all 500 messages? Ouch. Based on the way forums are used, I think it\'s a much better design, not to mention, one that spreads the transaction load, to simply add a row to a readmsg table when someone pulls up a message.
  18. If you mean lookup values, I\'m prejudiced towards keeping that type of stuff in the database. This is what is generally referred to as having a \"data driven\" design. In general small tables like these should be cached by the database, and retrieval is as close to instantaneous as the database can be. There are many different things that can become a bottleneck in an application, and I\'ve found it\'s best to create the system first, then tune around the bottlenecks, rather than to assume you know what the bottlenecks will be and start making design decisions based around those assumptions.
  19. You just need to execute a simple query like this: UPDATE phpbb_users SET user_points = 5 where user_posts >= 5 I\'ll leave it to you, to figure out how to get php to execute that for you
  20. gizmola

    mysql problem

    It could be a number of different problems. Check the mysql.err file to see if there\'s more info there.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.