Jump to content

OJB

Members
  • Content Count

    362
  • Joined

  • Last visited

Everything posted by OJB

  1. I'm a PHP developer (note: not someone who works for PHP, but someone who works in PHP) and to be honest I don't think I have used an ereg in about 2 years now. All my PHP regular expressions are written using preg, but in response to cubtler's post even if TCH as a whole objected to deprecating the ereg functions there is nothing they could do about it. A single company complaining to the php developers wouldn't do anything. This sort of thing will continue to happen as PHP matures and develops as a language. I mean think back to when register globals was enabled by default and how many people will have coded relying on that functionality. Then PHP realised it was a security risk and disabled it by default (can't remember which version that was) and I'm pretty sure it will be removed at some point too. Unfortunately as the language evolves so must the developers.
  2. The reason you wouldn't be able to change permissions is because when you create file from PHP it creates them with 'owner' being 99 (which I believe is 'apache'). You will not be able to delete or chmod a file created by PHP from within FTP. I had this issue with one of my sites when I was dynamically creating directories from within PHP. The solution for me was to use PHP's FTP commands to use FTP to create the directories (the owner would then not be apache) and I could then manage them via FTP. I also use this method when I want to allow PHP to create files in directories which do not have 777 permissions. I FTP in (via PHP) chmod the directory to 777, create the file, chmod the directory back to 755 or whatever it was, and close the FTP connection. I feel this is a much safer way than leaving directories open with 777 permissions.
  3. Have you had a look under 'disk space usage' in cpanel to see which directories it is that are consuming all your file space? I don't know if access logs count against the disk space usage (maybe you got nailed by a load of hits?) , I know awstats do, don't know if there is a way of clearing those?
  4. mooredn, as Thomas says you will need to install it in the public_html directory (either in the root of the public_html directory or a subfolder of it) because anything above the public_html is not publically accessible via the internet. Essentially http ://www.yourdomain.ext resolves to the root of your public_html directory
  5. That seems very very odd indeed. I cannot see why Unix would reset a session variable because it has the same name as a local variable. How big is the array being stored in session? If I ever store arrays in session which I dont have to do very often I usually serialize them first too: $_SESSION['new_array'] = serialize($whatever_array); Then when you want to retrieve that array from session: $diff_array = unserialize($_SESSION['new_array']); I have to say I have never experienced an issue with $_SESSION variables being overwritten though. Very odd. I can't see a reason why that would possibly happen, but I am glad you got it working!
  6. You might not be seeing any visual failings because you aren't catching your exception and dealing with it.... you need a try and catch i think.. like so: >try { $result = new mysqli("localhost", "username", "password", "table"); if(mysqli_connect_error()) { $text = 'Could not connect to database server [W-m]'; throw new Exception($text); } } catch(Exception $e) { var_dump($e->getMessage()); } plus shouldn't it be 'schema' not 'table' in the mysqli construct?
  7. Any chance you can post more of the code, like the HTML form and the PHP which extracts the values from the POST or GET array? When I use checkboxes I personally do something like this: >if(isset($_POST['checkbox-name']) && $_POST['checkbox-name'] == 'on') { //logic here } I personally hate this, I think checkboxes being either 'on' or not passed in the $_POST array is crap, but you deal with what you get. If you are having issues with your $_POST array then debug it with a print_r($_POST) to make sure you are receiving the values you expect.
  8. have you set up a database and a database user ready for your wordpress installation? If so, make sure that the database you are using is cpanel-username_databasename and the user you are using is cpanel-username_username Also make sure that in the mysql databases section of cpanel that you have granted permissions to that user to that database. Near the bottom of the page there is: Add User To Database - grant all the necessary permissions to the user in the screen that follows (SELECT, INSERT, DELETE etc - whichever that user will require) If you have done all that, what is the error you are getting?
  9. Thanks for the help, Bruce. I have advised those who are having connection issues to try using OpenDNS and also the next time they get any issues to do a trace route so I can see if there are any issues with the routing. As for the trojan warning the weird thing is... If i download the home directory backup with ESET NOD32 enabled, it will stop the transfer due to a potential HTML/Phishing.gen trojan... but if I disable the antivirus whilst I download, then reenable it and scan the file it comes up clean. I asked the help desk to give the account a once over but they said they don't/can't do scans on the linux systems and the files are my responsibility. Which is true and fair enough. So now I am a bit confused as to my next step...
  10. Hey guys, I don't often like posting questions in here, I usually just go straight to the helpdesk if it is something I cannot work out for myself but something has me baffled at the minute and I just wanted some advice/ideas from you. Recently (apparently since the reseller server I am hosted with had the apache upgrade) people on my site have been complaining that every day they are getting connection issues with the site. Pages timing out in IE and firefox and refusing to load. This is odd to me because even though there are 10 or so regular users at my site complaining of this, there are just as many who are saying they are facing no problems. Including myself. I rarely have issues connecting to the site and I even have people talking to me on MSN saying 'Is the site down? I cannot access it', but it isn't down for me. So I have explained that if there are people who can access it then the site isn't down and there must be an issue somewhere else, possibly ISP DNS servers, possibly en-route to my domain host - to be honest it could be loads of things. But the fact they say it is ONLY my site they get this issue and its not just a one off case as there are various people who are getting it makes me think maybe there could be something this end. I don't really know. Have you guys got any ideas what it could be? As for the title of this thread, some of the people who are getting the connection issues are also getting warnings from their antivirus software of a potential trojan on my forum. I have downloaded a home directory backup and scanned it with Eset NOD32, AdAware and Spybot S&D and nothing comes up, so I don't know what to do. I get no warnings when trying to load the page myself either. What is the best way to test if a site has this sort of thing. Thanks in advance, OJB
  11. I don't really get what you mean by a link to the cpanel file manager. You cannot do this. CPanel is a secured area that requires authentication to access. If however all you are wanting to do is to is link to photos on your personal store zen cart then just use an absolute link as the image source, instead of a relative. i.e instead of: <img src="/images/your-image.ext" alt="image info" /> use <img src="http://your-zen-cart-doman.ext/images/your-image.ext" alt="image info" /> Obviously I don't know your domain or where your images are on your server but you can display images from your other site using absolute paths, providing you don't have image hotlinking disabled (or enabled, i can never remember which way round STOPS people hotlinking)
  12. Thanks for the additional info. Good to know we are in safe hands and you guys are ready to take the hard decisions when necessary for the greater good of the rest of your customers.
  13. Thanks for the update, Bill. This has got me thinking though, is there any way to avoid this sort of attack? What would happen if a shared or reseller account was targetted?
  14. Have a read of this thread: http://www.totalchoicehosting.com/forums/i...showtopic=37886 Will tell you what needs to be changed.
  15. Seems odd that an Apache upgrade would completely deprecate a command like that so that any sites with those commands that update will all cause internal server errors. Surely a better idea from apache would have been to kill it gracefully and just ignore the command and phase it out?
  16. Yes I had this this morning... The fix was commenting out: SecFilterEngine Off from my web root .htaccess
  17. I am not sure you can use REDIRECT 301 with an entire subdomain in the way you have... I think to do a subdomain you have to do this: >RewriteCond %{HTTP_HOST} ^myspace\.mbstia\.com RewriteCond %{HTTP_HOST} ^graphics\.mbstia\.com RewriteCond %{HTTP_HOST} ^retouch\.mbstia\.com RewriteCond %{HTTP_HOST} ^webdesign\.mbstia\.com RewriteRule ^(.*)$ http://mbstia.com/$1 [L,R=301]
  18. If i go to the link you provided in the first post i get a 404 page not found.... As for imageshack things I can only imagine it would be due to the version upgrade of your forum, it wouldn't be anything TCH side. 500 error sounds like a .htaccess rule error to me! Have you got a backup of your old forum? If so inspect the .htaccess file and see if it differs to the new one.
  19. The reason it is not working is because the CSS style for your "current" class is being overridden by other values. Take note that CSS works both on 1) last rule takes precedence and 2) more specific rule takes precedence so if for example you have something like this: ><ul id="menu"> <li class="current"> <a href="#">BLAH</a> </li> <li> ... </li> </ul> and you have the following rules: >ul#menu li{color: #ffff;} ul#menu li a{color: #999;} li.current {color: #ccc;} despite li.current being further down the css the ul#menu li a will take precedence because it is more specific what i suggest you do is change your li.current style to: >#stripedown li.current a {color:#0B4F6D;} i hope you catch my drift as for IE6, yes it is a pain, yes I hate coding for it every day, however there are still a lot of people using it, not as many as IE7, so I still make sure everything I do works in IE6.
  20. I just tried to access your site and the forum appears to not be installed anymore, at least not in the /forum directory so I can't really comment on that. As for getting 'this page cannot be displayed' that can be down to a number of things. It can be down to server side issues (which TCH support said there were none, so take that off the list) It can be down to client side issues (your internet connection dropping out, or your DNS cache messing up) It can also be down to your ISP (their DNS servers might have messed up or something else) I get the 'page cannot be displayed' issue now and again and 99% of the time it is either client (me) side or my ISP. Eventually as you said the site comes back as if nothing was wrong. I can't really comment on the imageshack.us issue because I don't know the ins and outs of SMF or imageshack.
  21. What do you mean by 'highlighted' I can't seem to replicate the issue? Can you explain the steps you take to get this issue?
  22. Seems to be working fine for me in firefox, try clearing your cache: CTRL + F5 (if you are on a PC)
  23. Can you post a link to your new version so I can inspect it when I am at work?
  24. yes you can use CSS classes i.e. ><ul> <li class="current"><a href="#">HOME</a></li> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/about_us.html">ABOUT US</a></li> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/contact.html">CONTACT</a></li> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/period_one.html">1º-2º E.P.O</a></li> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/period_two.html">3º-4º E.P.O</a></li> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/period_three.html">5º-6º E.P.O</a></li> <li><a href="http://www.primaryteachingresources.net/teaching%20resources/html/links.html">LINKS</a></li> </ul> just add class="current" to which ever page link you are on, then in css: >li.current{background-color:#B0C7D1;color:#0B4F6D;}
  25. You will possibly be getting an internal server error because your redirects cannot have spaces in them e.g. Redirect 301 /web-design/myspace -custom-profiles.html http://www.example.com/ this has a space in between /web-design/myspace and -custom-profiles.html thats my guess anyway
×
×
  • Create New...