Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by floridaflatlander

  1. Yep, and maybe it was my fault googling but I find couldn't anything as simple as that answer.If I would have looked at the two places I used this function instead of just one this post would have never happened.
  2. Thank God you guys don't know me, you'd drive to my house and beat the .. out of me. I used the function mentioned above in two places, one for mobile and one for other. In the function used for mobile I used an array value, function($site_info['home']) as the input instead of the array causing the string offset. Sorry for the oversight and thank you for your input. Once again, sorry.
  3. also this h4 code is in a function join_us_non_mem ($site_info) {} so index.php includes config.php at top then it uses the function above is echo info. the <h4>
  4. 1. It lets me know if something is wrong by email 2. my_error_handler() is always on, it prints info locally and emails errors when online from error_log($message, 1, $webmaster_email); // Send email. As a note I went here https://stackoverflow.com/questions/15361392/how-do-i-correct-this-illegal-string-offset and used var_dump($site_info) like they instructed and got this. for local but all that changes online is the string aka paths array(20) {["home"]=> string(31) "http://localhost/ab-01.0102" ["https_home"]=> string(31) "http://localhost/ab-01.0102" ["debug"]=> bool(true) ["ip_admin"]=> string(9) ""}; And I used print_r($site_info) and got this Array ([home] => http://localhost/ab-01.0102 [https_home] => http://localhost/ab-01.0102 [folder] => /ab-01.0102 [debug] => 1 [ip_admin] => )
  5. 1. Yes the block of code in the first section is inside php tags it is in the config.inc.php file 2. The second block is in the /index.php which includes config.inc.php 3. config.inc.php is included at the beginning of /index.php. directly. 4. Sorry, I'm trying Also as a note, my error_log shows NO errors. I'm getting error notifications by email from this function in the config.inc.php file which is included at the top of every page function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) { global $debug, $webmaster_email; $user_ip = strip_tags($_SERVER['REMOTE_ADDR']); if($debug) {$br = '<br />';} else {$br = false;} // Build the error message. $message = "Coding error message \nSub Dictionary: ".htmlentities(dirname($_SERVER['PHP_SELF']), ENT_QUOTES).""; $message .= "\nfile: ".htmlentities(basename($_SERVER['PHP_SELF']), ENT_QUOTES).""; $message .= "\npath: ".htmlentities($_SERVER['REQUEST_URI'], ENT_QUOTES)."\n"; $message .= "\nAn error occurred in script '$e_file' on line $e_line: \n$br $e_message\n$br"; $message .= "\nFrom an ip at http://whatismyipaddress.com/ip/$user_ip"; date_default_timezone_set ('US/Eastern'); // Add the date and time. $message .= "\nDate/Time: " . date('n-j-Y H:i:s') . "\n"; if ($debug) { // Show the error and if local // added to show a more detailed message when get an error from google bot 140218 $message = $message .= "$br<pre style=\"background-color: white;\">" . print_r ($e_vars, 1) . "</pre>\n$br"; // Append $e_vars to the $message. // $message2 = $message .= "$br<pre style=\"background-color: white;\">" . print_r ($e_vars, 1) . "</pre>\n$br"; echo '<p style="background-color: white; color: black;">' . $message . '</p>'; } else { // Log the error: error_log($message, 1, $webmaster_email); // Send email. // Only print an error message if the error isn't a notice or strict. if ( ($e_number != E_NOTICE) && ($e_number < 2048)) { $php_db_error = '<p class="error">A system error occurred. We apologize for the inconvenience.</p>'; } } // End of $debug IF. } // End of my_error_handler() // Use my error handler: if (!$local) { set_error_handler ('my_error_handler'); }
  6. // In config file if($local) { /* if it's local */ $site_info['home'] = 'http://localhost/subfolder'; $site_info['https_home'] = 'http://localhost/subfolder'; $site_info['debug'] = TRUE; // its true on local $site_info['ip_admin'] = '**.**.**'; $site_info['https_home'] = 'http://localhost/'; } else { /* when online array values are */ $site_info['home'] = 'http://mywebsite'; // used only on index page and left column menu $site_info['https_home'] = 'https://www.mywebsite.com'; /* used everywhere else */ $site_info['debug'] = FALSE; // don't debug inline $site_info['ip_admin'] = '**.**.**'; $site_info['https_home'] = 'https://www.mywebsite.com'; } The error is in this line at mysite.com/index.php this page is http, that's where the error is coming from $site_info['https_home'] is on the index page and referrers to the $_GET file in the link below // In index file <h4 class="text-center"><?php echo '<a href="'.$site_info['https_home'].'/ab-member/index.php?action=register">Join us!</a>'; ?></h4>
  7. The actual path is on the actual php <h4 class="text-center"><?php echo '<a href="'.$site_info['https_home'].'/ab-member/index.php?action=register">Join us!</a>'; ?></h4> also talking about the things taken out that Guru referred to as a vague reproduction were stuff like if($local) { $site_info['local'] = TRUE; // or true $site_info['home'] = 'http://localhose/subfolder'; $site_info['debug'] = TRUE; // its true on local $site_info['ip_admin'] = '**.**.**'; } else { $site_info['local'] = FALSE; // or true $site_info['home'] = 'http://mywebsite'; $site_info['https_home'] = 'https://www.mywebsite.com'; $site_info['debug'] = FALSE; // its true on local $site_info['ip_admin'] = '**.**.**'; }
  8. The h4 is the line the the error reports I took some things out for brevity ie $site_info['local'] = FALSE; // or true $site_info['home'] = 'http://mywebsite.com'; $site_info['debug'] = FALSE; // its true on local $site_info['ip_admin'] = '**.**.**'; $site_info['css_path'] = http://www.mywebsite.com and yes the if statement is in the html and I am using /subfolder/index.php?action=.... . Not /?action=register Also I use this for my css path if on the /index page it uses $site_info['css_path'] = http://www.mywebsite.com and it doesn't use https path or if in /subfolder/member files or register in in this case it uses $site_info['css_path'] = https://www.mywebsite.com
  9. I keep getting Illegal string offset 'https_home' and I don't know why. I've googled but really can't understand what I'm doing wrong, to me this is so straight forward it should work. I have my local set up with ini_set('display_errors', 1) & error_reporting(E_ALL) but but nothing is displayed on local Online the error is entered in my log but the link works like a charm on the pages where it is echoed Local php 5.6.30 Online php 5.5 where the issues seem to be if ($local) ) { $site_info['https_home'] = 'http://localhost/'; } else { $site_info['https_home'] = 'https://www.mywebsite.com'; } /* so $site_info['https_home'] is always defined and as I understand it, the key is 'https_home' and the value is https://www.mywebsite.com. So both key and value always exist as strings */ <h4 class="text-center"><?php echo '<a href="'.$site_info['https_home'].'/?action=register">Join us!</a>'; ?></h4>
  10. You can figuratively create as many tables as you want per db. If I had to guess right of the top of my head you could probably put all the votes for all the articles in one table. To create a table for each article would be a pain. If the votes are important make user join your site before they can vote and you can then make sure(more or less) that there is only only vote per person. What I like about cookies and/or sessions is that it would be easier and almost as accurate. Average Joe's like me would have to go into the Firefox menu or IE's menu and delete their cookies to vote twice. I'm sure there are smarty pants out there somewhere that could make an automated system to delete their cookies and vote again but why would they do that for your site?
  11. If not very, use cookies/sessions and set them to expire in the distant future. Why would someone try to skew your voting? How many times would they do it? Most people would give it a one time try and if it didn't count again forget about it. They wouldn't go through the trouble of deleting cookies to vote again. Cookies would be alot easier and I'd use that unless it is for an important pole or info. As a note and for comparison I pretty sure my coppermine photo album uses cookies.
  12. How anal are you about the voting, if you want to make sure someone only votes once then you may need to register members but even this has flaws. As far as ip address some people's change often, my ip address(I have comcast) only changes very yr or so. You could also use cookies, it would be easier and if someone wanted to vote twice they'd have to delete their cookies and vote again.
  13. I like the first design, I run with the less is more crowd and I think the site looks good to great for your target market, people like me. You aren't selling software or design services, your selling fire wood. The only thing that I see is there may be someone like me who would type into a search engine a key phrase like hartford firewood, hartford firewood for sale or something like that. You can't cover all the bases but the main search phrase for your market in your area should be worked into the pages someway. I see your title(the one on the browser tab) says Hartford logs, I'd have it say Hartford Logs seasoned firewood for sale in Hartford or something like that, then make sure it's worked to the body someway. Build the content for the user first and when possible work your key phrase into that.
  14. I agree just put your photos in one file and let the database keep track of it. I've toyed with the same problem on my site my photos are never 60 days old so they're all in one folder. If I kept photos on for a longer time and depending on how many I would have I'd do like coppermine and wpress do and either have a yr folder and months inside of the year folder or just a year folder
  15. Sorry I read that but forgot about it when I was pondering the problem. I would think they should be the same width, 924pixals. Do you have firefire foxes firebug or can you use chrome to see if something else is a problem?
  16. I did the math wrong Total width is margin + border + padding + width + padding + border + margin So your table is 0 + 0 + 12 + 900 + 12 + 0 + 0 pixals wide for a total of 924pxs wide and it's forcing your 900px div to be 24pxs to wide
  17. Your table is making the main div wider. Total width is margin + border + padding + width So your table should be about 888px wide and have a padding of 12px for a div 900px width. or have table that's 900px with no padding. How are you giving your table padding?
  18. I like chevys & windows, the other guys that get suck all the time like fords and macs
  19. Jezz divs in the list sounds good. I would have never of thought of that, well "maybe" in a month or two from now when I was asleep and would wake up at 2:00am and would say to myself. I could use divs in list. Boy am I smart or dumb or slow depending or what ever on my mood. It's like I learn on here several weeks ago to use str_replace to place text in p tags so I could make it pretty with text-indent. I would have never have thought of that either.
  20. Soo basicly you have list with in list ?
  21. I use list for my css horizontal drop down menus and for vertical menus as well but it seems list would make it harder to do something like this with forms Column 1 Title 1:Column 2 select or enter this Column 1 Title 2:Column 2 select or enter that I just set column width if needed and add styles to my rows and cells with class divs In other words, nice straight columns
  • 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.