Jump to content

gotit

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gotit's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I made this file and named it error log and loaded it in a folder: PHP file <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <? include("../system/.htaccess"); ?> <? error_reporting(0);   $old_error_handler = set_error_handler("userErrorHandler");   function userErrorHandler ($errno, $errmsg, $filename, $linenum,  $vars)   {     $time=date("d M Y H:i:s");     // Get the error type from the error number     $errortype = array (1    => "Error",                         2    => "Warning",                         4    => "Parsing Error",                         8    => "Notice",                         16  => "Core Error",                         32  => "Core Warning",                         64  => "Compile Error",                         128  => "Compile Warning",                         256  => "User Error",                         512  => "User Warning",                         1024 => "User Notice");       $errlevel=$errortype[$errno];       //Write error to log file (CSV format)       $errfile=fopen("errors.csv","a");       fputs($errfile,"\"$time\",\"$filename:       $linenum\",\"($errlevel) $errmsg\"\r\n");       fclose($errfile);       if($errno!=2 && $errno!=8) {         //Terminate script if fatal errror         die("A fatal error has occured. Script execution has been aborted");       }   } ?> </body> </html>
  2. I found this in the Host web site: Creating own error logs for debugging php scripts. Since we dont provide access to Apache error logs on shared hosting packages for technical reasons, you can create your own error logs for debugging PHP Scripts. Please insert the following code in your PHP script (or create separate file and and add the code in it. Include the file using [b]"include()")[/b]    [color=orange]<-------------------This i don't know wha it means !!![/color]               error_reporting(0);   $old_error_handler = set_error_handler("userErrorHandler");   function userErrorHandler ($errno, $errmsg, $filename, $linenum,  $vars)   {     $time=date("d M Y H:i:s");     // Get the error type from the error number     $errortype = array (1    => "Error",                         2    => "Warning",                         4    => "Parsing Error",                         8    => "Notice",                         16  => "Core Error",                         32  => "Core Warning",                         64  => "Compile Error",                         128  => "Compile Warning",                         256  => "User Error",                         512  => "User Warning",                         1024 => "User Notice");       $errlevel=$errortype[$errno];       //Write error to log file (CSV format)       $errfile=fopen("errors.csv","a");       fputs($errfile,"\"$time\",\"$filename:       $linenum\",\"($errlevel) $errmsg\"\r\n");       fclose($errfile);       if($errno!=2 && $errno!=8) {         //Terminate script if fatal errror         die("A fatal error has occured. Script execution has been aborted");       }   }          
  3. [quote author=wildteen88 link=topic=119322.msg489141#msg489141 date=1166646036] Try that: [code]RewriteEngine on RewriteBase / RewriteRule ^system/listing/([0-9]+)$ /system/listingView.php?listingCode=$1[/code] Do you still get the internal server error? If you do check your servers error logs. It should be logged near the end of the log. Post it here. [/quote] I got error again, see above post. 74.96.71.69 - - [20/Dec/2006:23:07:36 -0500] "GET / HTTP/1.1" 500 - www.mywebsite.com "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" "-" 74.96.71.69 - - [20/Dec/2006:23:07:39 -0500] "GET / HTTP/1.1" 500 - www.mywebsite.com "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" "-" 74.96.71.69 - - [20/Dec/2006:23:07:45 -0500] "GET / HTTP/1.1" 500 - www.mywebsite.com "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" "-" 66.249.66.163 - - [20/Dec/2006:23:10:01 -0500] "GET /system/proCategory.php?mainCategory=106&subCategory=108 HTTP/1.1" 500 - www.mywebsite.com "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" "-" 66.94.237.181 - - [20/Dec/2006:23:10:44 -0500] "GET /tinc?key=VhV88EZb HTTP/1.0" 500 - mywebsite.com "-" "YahooFeedSeeker/2.0 (compatible; Mozilla 4.0; MSIE 5.5; http://publisher.yahoo.com/rssguide; users 0; views 0)" "209.131.37.237"
  4. [color=red]I did upload the new code, still getting error bellow.[/color]Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request I spoke to hosting many times, they insist that they support mode rewrite and something wrong with my script.
  5. Thanks, I loaded the file to system folder with this code. RewriteEngine on RewriteBase / RewriteRule ^system/listing/([0-9+])/$ /system/listingView.php?listingCode=$1 But i still get error I called the tech support and they say we do support mode rewrite, and the error looks like is from script and we don't provide script help. INTERNAL SERVER ERROR An internal server error has occured! Please try again later.
  6. I want to rewrite my dynamic URLs to static. this is the example that my host is giving: [color=red][font=Verdana]# Example for a rewrite rule: # (turns http://domain.com/xyz.html into http://domain.com/index.php?xyz) # RewriteEngine on RewriteBase / RewriteRule ^([a-z]+)\.html$ /index.php?$1 [R,L][/font][/color] This is the opposit of what I want to do. My urls read like this http://www.mydomain.com/system/listingView.php?listingCode=1053 I would like to change the code above given as a sample by the host to rewrite this URL into static.
  7. Any one can help with the above question?
  8. I didn't get it.
  9. What I am trying to do is to show a text from database in a format where returns are used at the end of the lines. for some reason the text from database for other strings show the way they were written, but this particular one just shows as notepad text only.
  10. what code would I use in order for it to work? If I want to rewrite these urls in a folder called System .com/system/listingView.php?listingCode=1041 .com/system/listingView.php?listingCode=1042    and so on.........
  11. [quote author=gotit link=topic=115271.msg469273#msg469273 date=1163722249] I need to rewrite my url. currently it reads like: /system/listingView.php?listingCode=1029 /system/listingView.php?listingCode=1030 .... /system/listingView.php?listingCode=1050 Spiders might read them all as one page... I prefere for the url to reflect some variables from the page like Listing_address and/or Listing_style I have very limited knowledge of html thanx [/quote] How can we get this done? Donie and LuckyBambu help me on this. I did everything according to the instructions..... see above posts.
  12. Yes I did, mine is the first package. One example 1and1 give is: [color=red]# Example for a rewrite rule: # (turns http://domain.com/xyz.html into http://domain.com/index.php?xyz) # RewriteEngine on RewriteBase / RewriteRule ^([a-z]+)\.html$ /index.php?$1 [R,L][/color] It seems to me that this code does the opposit of what I want. I want my PHP URL to change into html can u please check the example
  13. [quote author=doni49 link=topic=115271.msg469408#msg469408 date=1163736848] and take a look here as well. http://faq.1and1.com/scripting_languages_supported/configuring_apache_server_using_htaccess/4.html [/quote] This means we can use .htaccess in shared package. Does it? if yes why it's not working for me... :( code used: RewriteEngine On Rewriterule ^system/listing([0-9]+).html$ /system/listingView.php?listingCode=$1
  14. [quote author=doni49 link=topic=115271.msg469380#msg469380 date=1163733161] [quote author=gotit link=topic=115271.msg469367#msg469367 date=1163732476] One thing I don't understand is: when i creat the file past the code in it and then want to save as--- I simply past ".htaccess" in the file name with nothing following it. and this file shows as .htaccess on my pc, but once I load it it shows as ".htaccess.txt" on the server. Does that has to do anything with it. I also tried deleting that .txt on the server. I do have access to hosting control panel, but there is no option for me to creat a file these are the options categories: Domains E-mail WebMail Websites & Applications Web Space & Access FTP Account Quota Marketing Center Package Information Software & Downloads Order More Features [/quote] If they're that restrictive, they may very well have config'd their servers NOT to all the use of .htaccess files.  Who's your provider?  [/quote] 1and1 is the provider
  15. One thing I don't understand is: when i creat the file past the code in it and then want to save as--- I simply past ".htaccess" in the file name with nothing following it. and this file shows as .htaccess on my pc, but once I load it it shows as ".htaccess.txt" on the server. Does that has to do anything with it. I also tried deleting that .txt on the server. I do have access to hosting control panel, but there is no option for me to creat a file these are the options categories: 1and1  is the host
×
×
  • 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.