Jump to content

otuatail

Members
  • Posts

    961
  • Joined

  • Last visited

Everything posted by otuatail

  1. Wow you could have fun with that. Especialy to get you up the search engine rankings.
  2. Yes this is odd The following website is a recipe, however no matter how much or how little you copy and paste into notepad (getting rid of formatting) you get an extra line Read more: http://www.simplyrecipes.com/recipes/quesadilla/#ixzz4Lp5hmm6l In the method of cooking copy paragraph 1 2 and 3 seperatly. you always get the extra URL Read more... Read more is not in the text.
  3. Thanks for that. Simple error. Interesting to see what it evaluated to. cellpadding="1 > <tr> <td colspan="2" class="title" align="center">Event Log</td> Where does it stop? cellpadding="1 > <tr> <td colspan=" Thanks.
  4. Hi. It’s been a long day. I have made a minor change to a web page. All I did was changing the size of a table. The font has changed to elephant size font. I can’t see why it is so large. http://www.desmond-otoole.co.uk/info.php
  5. Hi. I have a website with lots of comedy scripts. I am happy for anyone to grab a script if they want to. The only thing I want is to know is which pages have been visited. I have php code that logs the information. However the full URL to the document is displayed and it could be accessed directly. I have a HTML5 page with the PDF document within a document object. I tried moving the document to a secure folder with .htaccess. The reason is it has to be accessed through the web page only. This doesn’t work. Any solution?
  6. Is there any decent php editor for Android? My editor on my PC is for windows.
  7. date_default_timezone_set("Europe/London"); This works ahead of the time(); Looks like I have to do it because some other sod might change it. I used $now = new DateTime(); echo 'Time now: ' . $now->format('Y-m-d H:i:s') ; but got Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in /vhost/vhost15/d/e/s/desmond-otoole.co.uk/www/banking/LogMe.php:64 Stack trace: #0 /vhost/vhost15/d/e/s/desmond-otoole.co.uk/www/banking/LogMe.php(64): DateTime->__construct() #1 {main} thrown in /vhost/vhost15/d/e/s/desmond-otoole.co.uk/www/banking/LogMe.php on line 64
  8. What I am doing is $value = time(); This is returning a GMT value; date('I'); which isn't documented in the manual returns 0 date('e') returns +0000 Any suggestions? I have also been told that as I am on a shared server anyone can mess around with the INI file. This is mad.
  9. The problem I have is that I want the summer time now not GMT. time(); is giving me a value of GMT.
  10. I don't have access to php.ini I don't own the server it is on.
  11. Hi I have used this for some time now everywhere on a website. (Very old) Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /vhost/vhost15/d/e/s/desmond-otoole.co.uk/www/Forum/LogMe.php on line 58 Is there a quick fix for this if it is outdated. Preferably for the UK and observing summertime. Thanks!
  12. otuatail

    HTML 5

    I have a HTML 5 page with an embedded PDF document in the same directory. What I want to do is put the PDF in a secure folder with a simple .htaccess. The reason is I don't want anyone to access the pdf document directly. I realise that the document could be downloaded anyway but I just want to log how many times it is looked at using PHP. The HTML document is actually a PHP file. Can this be done as I have made attempts to move it unsuccessfully.
  13. Ok this is partly html and I put it here because it was HTML5 and I thought that a HTML5 wiz kid could tell me better. I'll try the echo sugested by Psycho Thanks.
  14. Need to cancel this but can't find a button. Fatal error: Cannot redeclare myErrorHandler() (previously declared in /vhost/vhost15/d/e/s/des-otoole.co.uk/www/library/secure/SecureFunctions.php:68) in/vhost/vhost15/d/e/s/des-otoole.co.uk/www/library/secure/SecureFunctions.php on line 94 here is the function function myErrorHandler($errno, $errstr, $errfile, $errline) // ********** <- Line 68 { switch ($errno) { case E_USER_ERROR: $_SESSION['MyError'] = "Gotcha: <br>$errstr<br>$errfile<br>$errline"; mailtoX('Error', $errstr,$_SESSION['MyError']); $_SESSION[Error]= $errstr; $redirect = "Location: http://www.desmond-otoole.co.uk/myerror.php"; header($redirect); exit(0); break; case E_USER_WARNING: // echo ""; break; case E_USER_NOTICE: // echo ""; break; default: // echo ""; break; } /* Don't execute PHP internal error handler */ return true; } // ********** <- Line 94 $old_error_handler = set_error_handler("myErrorHandler"); Need to cancel this but can't find a button.
  15. Hi I am trying to replace fixed names of pdf documents with variables. This works <object data="Darth.pdf" type="application/pdf" width="950" height="800"> alt : <a href="Darth.pdf">test.pdf</a> </object> This fails when using a variable <object data=$doc type="application/pdf" width="950" height="800"> alt : <a href=$doc>test.pdf</a> </object> $doc = "Darth.pdf" How can I modify this HTML5 to work?
  16. I am having problems where I get website failed to respond or a page not found error. I am told by my host provider it is because I use a meta refresh. This is set to 60 seconds. Is there a reason for this.
  17. Hi This is a simple website. It doesn't use objects. I use time() and date() Also I may need to add this value into MySQL and I wouldn't know how to add a date object into the query.
  18. I wonder is there a forum for people having a nervous breakdown? I could not believe that when I uploaded a file with an extension of .doc or .pdf. The sever would change my extension to .desmond The hosts suggested that I move to a server with an older version of php. In doing so, they messed up the DNS. The server I am uploading to is difrent to the website. Ok what happened. I love writing comedy like only fools and horse’s. There is a completion where by up to 2,000 people will send there comedy’s in (God knows we need good comedy in the UK). I wrote a cloud based system in 2007 before Microsoft. What I did was using the time() php replace the left hand side and keep the extension. That way I can always go back to a previous version. The BBC, ITV and CH4 in there infinite wisdom declared that the name of the file has to be [Surname] . [First name] . Comedy name] . pdf When I fetch the name of the file to upload $_FILES["file"]["name"] I have too many dots. Hence otoole.desmond.caferoyal.pdf using explode and then value[1] ends up with desmond and not pdf. Can I fetch the last value in the explode statement which would guarantee the file extension. Help please
  19. Can you send yourself an email using different providers hotmail, google etc. Sounds like your code is fine to me it is the emailing providers that are the problem. If so that is an area you might be stuck on. Still could see the code itself.
  20. Would need to see the code around this. mail() is an funny thing. getting \n\r and the like. Also I have struggled with the likes of AOL. if you don't have a reverse DNS. I found a code snippet of mail separate and tested can show things up.
  21. move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $GetName); I have just spoken to easy space and they can't understand what has caused this. The only thing they suggest is that it is to do with an older version of PHP. Fast host put me on a modern server a year ago so I don't understand that. Could I rename the file back as the uploaded files are in a subdirectory of the website /upload? They are going to try moving me from php 5.4.45 down to a server php 4.3.9 This can only be around the code above. Has this upload function changed in anyway?
  22. No $real is a normal file name MyStory.docx $GetName = 1444374830.docx I replace the left part with a unix time stamp time() I want this to be the replacement name on the server. This worked when I had my website hosted on fast hosts for 8 years. The server seems to have stripped off my dotx and replaced it with my account name on the server. This is strange behaviour and makes life difficult
  23. No $real is not myfile.desmond.docx and that is not what is on the server. There is no .docx the extension has been removed and replaces with .desmond. I pic a file for example MyStory.docx I get a unix time stamp time() to make the files on the server unique. I end up with 1444374840.docx I am changing the file name on the (unix) server. $GetName It seems that the server has striped the dile extension .docx of and replaced it with my account name on the server giving me 1444374840.desmond. This never happened on the old company which I used this software for over 8 years. It worked for 8 years so it can't be a codeing error unless my php move_uploaded_file() is difrent.
  24. <?php require("../secure/SecureFunctions.php"); session_start(); Session_Init(); if(!isset($_SESSION["Pk"])) { header('Location: index.php'); exit; } $Pk = $_SESSION["Pk"]; if(KeyCheckX($Pk)== 0) { header('Location: index.php'); exit; } $User = $_SESSION["Uk"]; $Shelf = 0; connectDB(SUGARCAIN); $Meg = 1000000; $detials = $_POST["details"]; $FileSize = $_FILES["file"]["size"]; if (/* (($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/bmp") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/pjpeg") || ($_FILES["file"]["type"] == "application/pdf") || ($_FILES["file"]["type"] == "application/vnd.ms-powerpoint") || ($_FILES["file"]["type"] == "application/vnd.openxmlformats-officedocument.presentationml.presentation") || ($_FILES["file"]["type"] == "application/msword") || ($_FILES["file"]["type"] == "application/vnd.openxmlformats-officedocument.wordprocessingml.document") || ($_FILES["file"]["type"] == "application/vnd.ms-excel") || ($_FILES["file"]["type"] == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") || ($_FILES["file"]["type"] == "audio/mpeg") || ($_FILES["file"]["type"] == "text/plain") ) && */ ($FileSize < 20 * $Meg)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { $real = $_FILES["file"]["name"]; // $GetName = ServerName($_FILES["file"]["name"]); $x = explode('.',$real); $GetName = time() . "." . $x[1]; move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $GetName); $path_parts = pathinfo($GetName); $FileName = $path_parts['basename']; $hex = dechex($FileName ); $date = date('Y-m-d H:i:s' , $FileName); ConnectDB(SUGARCAIN); $sqlFtp = "INSERT INTO library (User,Shelf,ShelfMarker,RealName,Description,ServerName,Submitted,FileSize,Ref) VALUES ('$User',$Shelf,'03c2e7e41ffc181a4e84080b4710e81e','$real','$detials','$GetName','$date',$FileSize,'$hex')"; $query = mysql_query($sqlFtp); // // $result = mysql_affected_rows(); mailtoupload("Upload",$_FILES["file"]["name"],$_FILES["file"]["size"],$_FILES["file"]["type"],$detials); header('Location: acknowledge.php'); } } else { if($_FILES["file"]["size"] > 7000000) { mailtoupload("FAILED UPLOAD",$_FILES["file"]["name"],$_FILES["file"]["size"],$_FILES["file"]["type"],$detials . " Size"); header('Location: failure.php?id=1'); } else { mailtoupload("FAILED UPLOAD",$_FILES["file"]["name"],$_FILES["file"]["size"],$_FILES["file"]["type"],$detials . " Bad Type"); header('Location: failure.php?id=2'); } } ?> I created a cloud based system long before Microsoft. This worked fine on a server for 8 years. Recently I have subscribed to another company and my website is now there. When I upload a file myfile.docx it ends up on the server as 1444374830.docx I used the unix stamp time() to make it unique and keep the extension On the new server it is now 1444374830.desmond I have to download it and change the extension to .docx but the downloaded file is unusable. Can someone tell me what is wrong with the code or is it a server issue. $GetName = time() . "." . $x[1]; should end up as 1444374830.docx And the uploading code page Hope this can be fixed as I am using the site as a versioning backup of my word documents. Thanks.
  25. Hi. I have a field in a table `Comment` varchar(32). I enter the following text Food value £12.52, but when I back up the table and look at it in a text editor I get the following. Food value £12.52 I have a character ascii value 0194 before the pound sign. Can I correct this? I forgot to say that I don't see this character when I am looking at the web page.
×
×
  • 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.