Jump to content

simona6

Members
  • Content Count

    59
  • Joined

  • Last visited

Community Reputation

0 Neutral

About simona6

  • Rank
    Regular Member

Profile Information

  • Gender
    Male
  • Location
    Lincolnshire, UK
  1. "DUPLICATED VALUES TITLE TAGS" For / and non-slash.
  2. It's saying we have duplicate Title Tags, for the normal and / version of the same page.
  3. A Wordpress website has trailing slashes, and all is fine. But for some reason SEO software sees the homepage with and without the /. Causing duplication. Not all SEO software sees it. What is the HTACCESS code to add, to enforce, only on the homepage main domain URL, NO trailing slash? Thanks
  4. Hi there. Not sure if anyone here can help. We are on a Trial with GCH, but this morning we have severe issues with our database. Some pages load a bit, but mostly they don't. And if we try to get to wp-admin, or the hidden admin URL, it says there is an error establishing a database connection. When we go to the site's phpmyadmin and enter the details found in our wp-config file, it says there is no directory. Does anyone know a fix for this, such as a GCH restart or similar? GCH hosting has NO Tech support at the weekends, unless you pay a lot of money.
  5. I had someone ask me today about this. Should you tell the world about your client list, for fear of others checking the, and 'cold calling' them? We know of a company in the London area that provides high-end products to some big names, both on the high street and off it. While they do articles on their website about certain work they did for a company, they don't have an actual 'Portfolio' list. Part of this reason is to stop others trying to 'muscle in'. On one part of the argument it can help. Particularly if what you do is done by many. So it's good to say Company A and B both chose us!! How exciting. And from a Coding point of view, it gives those companies a good back link. But on the other side, do you want those companies to be cold called, to ask about a cheaper or (how they see it) better service? If the company in question doesn't supply pricing, it does put up part of that barrier though. Just keen to learn, in the world of Design and Hosting, what's the view on this. Should companies show their client list (or some of them), or should they no, and perhaps appear a little arrogant. I for one haven't found any design company that doesn't. Cheers.
  6. Resolved. It was the server setting in PHP. The Memory was left blank, and the File Uploads was on OFF for some bizarre reason. An update must have set those 'back end'.
  7. if (isset($updatephoto)) { define ("MAX_SIZE","5000"); function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } $errors=0; if($_SERVER["REQUEST_METHOD"] == "POST") { $image = $_FILES["profilephoto"]["name"]; $uploadedfile = $_FILES['profilephoto']['tmp_name']; if ($image) { $filename = stripslashes($_FILES['profilephoto']['name']); $extension = getExtension($filename); $extension = strtolower($extension); echo "test here $uploadedfile"; If I add the final line in this grab of the code, it does not show anything on screen. So it's as if $_FILES["profilephoto"]["name"] just isn't being seen.
  8. What errors? If you mean the one I have posted, I don't know what the fix is, and that is the issue here.
  9. <form method='POST' action='' name='signuprocess' enctype='multipart/form-data'> <input type='hidden' name='updatephoto' value='update'><div class='profile-photo'><h2><div class='profile-icon'><i class='fa fa-camera'></i></div> Profile Photo</h2><br/><div class='signup signup-title'><p><b>Please upload a photo of yourself, not your family.</p></div><div class='signup form-field'><input name='profilephoto' type='file' size='15' /></div> <input type='submit' value='Upload'></form> This is the form. It was working up until a few days ago, so I am suspicious of something changing on the server, through some auto update. It uploads the file fine, when running locally. Both are on PHP 7.2.
  10. Yes errors are turned on, but there aren't any. Only those I sent here in the Error Log file. This is an example of the errors, and they are pretty much all like this: mod_fcgid: stderr: PHP Notice: Undefined variable: profilephoto in /var/www/vhosts/site.net/httpdocs/includes/profile.inc on line 253, referer: https://www.site.net/profile
  11. adding photo,Array ( [name] => profilepic.jpeg [type] => image/jpeg [tmp_name] => C:\xampp\tmp\phpB923.tmp [error] => 0 [size] => 152127 ) Hi, We have been using this code for ages, but suddenly for some reason we cannot upload an image using the code below. When we try to Print_r the $profilephoto variable, I get this error. The filename is correct, but what is that [error]?? And how do I resolve it? Oddly it does upload it locally, but LIVE, it won't This is the code. if (isset($updatephoto)) { echo "adding photo,"; print_r($profilephoto); define ("MAX_SIZE","5000"); function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } $errors=0; if($_SERVER["REQUEST_METHOD"] == "POST") { $image =$_FILES["profilephoto"]["name"]; $uploadedfile = $_FILES['profilephoto']['tmp_name']; if ($image) { $filename = stripslashes($_FILES['profilephoto']['name']); $extension = getExtension($filename); $extension = strtolower($extension); if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif")) { echo "Unknown Extension..!"; } else { $size=filesize($_FILES['profilephoto']['tmp_name']); if ($size > MAX_SIZE*1024) { echo "File Size Excedeed..!!"; } if($extension=="jpg" || $extension=="jpeg" ) { $uploadedfile = $_FILES['profilephoto']['tmp_name']; $src = imagecreatefromjpeg($uploadedfile); } else if($extension=="png") { $uploadedfile = $_FILES['profilephoto']['tmp_name']; $src = imagecreatefrompng($uploadedfile); } else { $src = imagecreatefromgif($uploadedfile); echo $scr; } list($width,$height)=getimagesize($uploadedfile); $newwidth=600; $newheight=($height/$width)*$newwidth; $tmp=imagecreatetruecolor($newwidth,$newheight); imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height); $pic=($_FILES['profilephoto']['name']); $random = (rand()%99999999); $newname="$random"."$pic"; $filename = "images/profiles/". $newname; imagejpeg($tmp,$filename,100); imagedestroy($src); imagedestroy($tmp); }} } $query = ("UPDATE users SET profilephoto =:newname WHERE id =:userid"); $result = $pdo->prepare($query); $result->execute(array(':userid' => $userid, ':newname' => $newname)); echo "<script> window.location.replace('/profile/') </script>";}
  12. Goodness me. Well firstly apologies for the terminology I used. I thought it was a "listener". It does look to be extremely complicated.
  13. Something I have never done, but want to learn the best practice for doing so, is a listener script. Example: one of our websites is in bespoke PHP and has two links that shows if there are any noticeboard 'notifications' or any new 'messages'. Ideally I'd like to show 1, 2, 3... etc as a count of how many are remaining for Messages. So if a new one comes in while they are on a page, that number literally changes while they are on the page. I assume this is with Ajax, and not straight forward. I don't know any DOM code or Javascript. But would appreciate some help please. Simon
  14. Hi there. We are now setup as 'Developers' with Tokens and API to get 'number of followers' from handles on Twitter. Trouble is, there is no definite guide on the best way to do it. ie. a chunk of code, where you add your Token and API, enter the @handle, and use PHP to extract the number. Does anyone know the best means of doing it? I've looked at Twitter's Auth code but there are oodles of code there, and no definitive answer.
  15. $hashtags = strip_tags($row->uniquehashtag); $array = explode(' ', $hashtags); foreach ($array as $tag) { echo "<span class='gig-hashtags'>$tag</span>"; } Spot on - removes the <p> tag in the code too! Plus anything else they might have added. Thanks everyone.
×
×
  • 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.