Jump to content

floridaflatlander

Members
  • Posts

    671
  • Joined

  • Last visited

  • Days Won

    1

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) "127.0.0.1"}; 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] => 127.0.0.1 )
  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. I changed the zone records on a website on the hosting service I use so I can use office 365 with my website's email. And it works like a charm when I send myself emails from regular accounts, ie. comcast and yahoo. However whether using phpmailer or php's mailto on my site, the emails just disappear when I send them from the domain that I set Office 365 up on. So emails from my-website.com wont go to my email account at me@my-website.com or members@my-website.com. They'll go to an email address like outlook.com but not my office accounts. I can't believe I'm the first with this issue and tried to find something on the web but had no luck. Any ideas? Thanks
  11. NEVER MIND, I FOUND OUT WHAT THE Issue is, sigh I have two different headers for mobile and desktop. Sorry, I've been looking at this for hours. Using chrome mostly but some firefox too I can't get my css to refresh on my android phone, on my desk and laptop it works perfectly There's supposed a white header at the top with an orange bottom border. but the old blue keeps showing up like the old css. I've tried adding a version # to the css ie: href="style.css?version=1" as described at http://stackoverflow.com/questions/2263096/css-file-is-not-refreshing-in-my-browser Also I put the new css in the main folder for a time but it too didn't refresh there either I cleared app cache and app data like described here https://www.cnet.com/how-to/how-to-clear-app-cache-and-app-data-in-android-6-0-marshmallow/ And cleared the cookies, cache, and history using the standard method on chrome https://www.accessc.com/articles/clear-history-cookies-cache-android.html Also I reset chrome on my phone but that didn't work either And there are no commands in htaccess limiting css upload Any ideas what I'm doing wrong? Thanks in advance
  12. I've looked and couldn't find a place to donate to this site. Is there a place or link to use for donations to phpfreaks? I thought there was at one time. Thanks
  13. Thank God and phpfreaks, I too missed the site. It was sad when I came here a few weeks and found the site down. It's one of those things that I, and maybe we, take for granted, until it's gone. Thanks again for being back
  14. Thanks maxxd, yes jquery is already included by my theme.
  15. Thanks fastsol I believe jquery is needed for the bootstrap menu and for hide divs to work although they seem to work without it. I use an if (is_page( 'gallery' )) to include it jquery in the header and (!(is_page())) to exclude it in the footer on the gallery page. Thanks again
  16. I'm using a plugin to include a photo gallery on a wordpress site. At the bottom of the page in the footer I include <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> just like the samples I look at do it here http://getbootstrap.com/getting-started/#examples The problem is that the plugin doesn't work when I include jquery. I posted the probelm here https://wordpress.org/support/topic/huge-it-doesnt-work-with-google-ajax-jquery And the reply was jQuery should not be called this way? That's the way the samples do it You try to call jQuery in no standard way? It's the same in every footer Sooo, how do you call jquery and what is the standard way? Thanks in advance
  17. If a vendor has receipts for monthly hosting from the last several years and you get audited by Mr. IRS, how do you prove that you spent money with that vendor? In the old days I would provide a hard copy for each and every expense. Now everything is on my hosting providers website and if they wanted a hard copy I'd have to wade through and print each receipt for the last several years.
  18. How do you guys keep bookkeeping records of transactions? An example is you pay for a domain name, monthly hosting or anything that you receive an email receipt for and a receipt is stored on the vendors website. Say up to 7 years.
  19. Most of the time my localhost works like a champ but occasionally I get ... mysqli_connect() [function.mysqli-connect]: (HY000/2005): Unknown MySQL server host 'localhost' (11001) On phpfreaks I've searched for "Unknown MySQL server host localhost " and didn't see an answer to this problem Then I googled and found this http://stackoverflow.com/questions/16580370/mysql-error-2005-unknown-mysql-server-host-localhost11001 However in this file the localhost ip is commented out and windows wont let me edit the file to uncomment it like it's done in the stackflow post. So, one is this the likely problem ... and if it is how do I edit a file in the Windows folder? As a note I do go into the file as the administrator using notepad Thanks
  20. Your right, I changed the definition to bread_crumb($id, $dbc) and called bread_crumb($item['id'], $dbc) and it worked. Thanks
  21. I have a single dimensional array of item characteristics called $item[ ], I get the above error when I try to define the functon parameters like this function bread_crumb($item['id'], $dbc) However when I change it to this the function works fine $id = $item['id']; function bread_crumb($id, $dbc) Can you use an array to define a function's parameters and if you can how do you do it? Thanks
  22. I keep getting an unknown column error and I've been staring at this for hours. I've checked and double checked the column names(all are lower case) even copied and pasted them from the table to the sql but I keep getting the same error. When I remove the referral_code = fa4cc5218dc647ee7345c84103938812 it works but I need that to update the right record. The sql is UPDATE emails SET joined = 1, id = 80 WHERE referral_code = fa4cc5218dc647ee7345c84103938812 AND mem_id = 26 error Unknown column 'fa4cc5218dc647ee7345c84103938812' in 'where clause Thanks in advance s
  23. Thanks I've google before but the one's I found looked like they had to many bells and whistles. I found this but can't get it to work. http://www.nimpkish.com/blog/simple-javascript-image-gallery I go to the correct board and try to get more info about it. Thanks again
×
×
  • 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.