Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Of course its a pain, because its the wrong way to go about it. Surely you already have the id of each user stored along with there comment and the id of the thing they are commenting on?
  2. So that means the Include directive wasn't working properly? Actually, now that I think of it, the vhost file might night have had the right permissions. What is the output of: ls -l /etc/apache2/sites-available/ ?
  3. Sorry, but that part doesn't make sense? If you want to save an array in a file so you can re-use it later serialize & unserialize are your friends.
  4. Have you tried writing any code? This wreaks of poor database design in the first place but... <?php function stupidcount($str, $except) { $arr = explode('), (', trim($str, '()')); $cnt = 0; forreach ($arr as $v) { if ($v != $except) { $cnt++; } } return $cnt; } $str = '(1), (2), (13), (111)'; echo stupidcount($str, 13);
  5. What exactly do you plan on doing with this string afterwards? Have you looked at using serialize instead?
  6. $new_comment_notification = mysql_query("SELECT * FROM comments WHERE ob_id='$ob_id' AND from_id!='".$_SESSION['id']."' GROUP BY from_id "); $ids = array(); while($notify = mysql_fetch_array($new_comment_notification)) { $ids[] = $notify['from_id']; } $ids_string = implode(' ', $ids); $quer = mysql_query("INSERT INTO comments VALUES('','$ob_id','$session','$ids_string', '$comment', '$date')") or die('There was an error connecting to the database at this time.');
  7. I'm not sure where there's any tutorial specific to Debian/Ubuntu but the process is simple. Create your vhost file and place it within /etc/apache2/sites-available. Then execute the a2ensite command, or simply make a link from /etc/apache2/sites-available/<vhost>.conf to /etc/apache2/sites-enabled/<vhost>.conf Make sure all directories defined within your vhost file exist (including any log file directories), then restart Apache... sudo /etc/init.d/apache2 restart As you can see its much the same setup as what you have now. You should take a look at the Apache error logs for a hint on what the trouble might be.
  8. I don't use any of the control panels but it would be easy enough to do using simple shell scripts. Just ssh into each box, and list (or count) all the vhost files.
  9. I don't bother with any of these admin panels. They play around with the configurations too much for me. I find it allot easier to use a terminal and the tools provided, and if I need to, I script certain parts.
  10. Sorry, your main config is /etc/apache2/apache2.conf, so its all good. Do you have any other vhosts setup? Can we see them?
  11. Then I would say that Webmin has broken Debian's Apache configuration. Take a look in your main httpd.conf file and make sure that somewhere within it (it should be near the bottom) is a line that includes your vhosts. It should look something like.... Include /etc/apache2/sites-enabled/*
  12. I'm pretty sure its the use of the wildcard. Change.... ServerAlias *.maskedarmory.com to ServerAlias www.maskedarmory.com And restart apache.
  13. Is there a link to maskedarmory.com.conf within /etc/apache2/sites-enabled ?
  14. trq

    my vps has asp?

    Are you talking to me? I don't use web control panels, I despise them.
  15. trq

    my vps has asp?

    If its a Linux server it won't have the traditional asp as that requires IIS. It may have another implementation though, asp is just a framework which can be ran in a few different languages. There was both Python & Perl implementations kicking around a while ago that would run on Apache servers. Yours may very well have the perl version. See http://www.apache-asp.org for details.
  16. This would be much better off being handled via mod_rewrite not php. Something like: RewriteCond Host: (?:www\.)?french\.com RewriteRule (.*) french_index.php?p=$1 [i,L] RewriteCond Host: (?:www\.)?english\.com RewriteRule (.*) english_index.php?p=$1 [i,L]
  17. Make sure its set first. if (isset($_GET['do'])) { if ($_GET['do'] == 'login') { // do login } }
  18. Providing url wrappers are enabled copy will suffice.
  19. This example I posted a long while ago should get you started.
  20. If you escape your data properly no slashes end up in your data. If using mysql_real_escape_string is leaving slashes in your data you must already have magic quotes enabled. Disable it.
  21. ps: You really shouldn't need stripslashes to display data.
×
×
  • 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.