Web Hosting Forum | Lunarpages

Recent Posts

Pages: [1] 2 3 ... 10
1
PHP and MySQL Support / Re: Frustrated with PHPMailer
« Last post by MrPhil on Today at 04:43:28 AM »
I take it you've properly set up and tested your subdomain http://sfkornyek.szabadsagharcos.org/HelloWorld.html, where HelloWorld.html is in /home/***/public_html/sfkornyek/. You used the cPanel or LPCP function to set up a subdirectory "sfkornyek", and didn't simply create the subdirectory? Assuming the subdomain is working...

public_html/sfkornyek/
   PHPMailer/
       PHPMailerAutoload.php   et al.

If smtp.php is installed in PHPMailer/, you would use require 'PHPMailerAutoload.php'; in the smtp.php file, and call it with http://sfkornyek.szabadsagharcos.org/PHPMailer/smtp.php

If smtp.php is installed in a directory below PHPMailer/, such as PHPMailer/mail/smtp.php, you would use require '../PHPMailerAutoload.php'; and call it with http://sfkornyek.szabadsagharcos.org/PHPMailer/mail/smtp.php

If smtp.php is installed at the same level as PHPMailer/ (public_html/sfkornyek/smtp.php) you would use require 'PHPMailer/PHPMailerAutoload.php'; and call it with http://sfkornyek.szabadsagharcos.org/smtp.php

Let's take care of that, and I think it will fix the class issue.

The "404 Not Found" error could be cleared up by creating your own "error documents" such as /404.shtml. If you're on cPanel, I think they still have a function to create a basic set, or you can write them yourself, or see http://www.catskilltech.com/FreeSW/faqs/index.html#errorpages. Since you're in a subdomain, you might have to create a set of error documents (error pages) under sfkornyek/. Try getting the smtp.php working and see if you still need a custom 404.
2
PHP and MySQL Support / Re: Frustrated with PHPMailer
« Last post by Bandi on September 24, 2017, 09:57:45 PM »
Sorry for the lack of more details. Reading this section of Lunarforums, I got the feeling that all know PHPMailer inside out and tried to minimize verbiage :)
The following may clear this up.

The PHPMailer folder resides in CPanel's public_html/sfkornyek

-------------
The content of PHPMailer folder is
Folders:
github
examples
extras
language
Files:
class.phpmailer.php
class.phpmaileroauth.php   
class.phpmaileroauthgoogle.php
class.pop3.php
class.smtp.php
composer.json
composer.lock
get_oauth_token.php
LICENSE
PHPMailerAutoload.php
VERSION
CPanel Permissions, folders 0755, files 0644
-------------     

All of the folder content came from PHPMailer-5.2-stable.zip originating in https://github.com/PHPMailer/PHPMailer/releases and straightforward copied to folder PHPMailer.

Smtp.php is a program (taken from examples folder for the test and is running in public_html/sfkornyek). PHPMailer is a folder.

Smtp.php calls PHPMailerAutoload.php in PHPMailer folder, using
 require '/home/***/public_html/sfkornyek/PHPMailer/PHPMailerAutoload.php';

Then (I am guessing) PHPMailerAutoload.php calls class.phpmailer.php in this same folder
(Also see NOTE at the bottom)
-----------------------------------------
This is the complete PHPMailerAutoload.php code
Code: [Select]
<?php
/**
 * PHPMailer SPL autoloader.
 * PHP Version 5
 * @package PHPMailer
 * @link [url=https://github.com/PHPMailer/PHPMailer/]https://github.com/PHPMailer/PHPMailer/[/url] The PHPMailer GitHub project
 * @author Marcus Bointon (Synchro/coolbru) <[email]phpmailer@synchromedia.co.uk[/email]>
 * @author Jim Jagielski (jimjag) <[email]jimjag@gmail.com[/email]>
 * @author Andy Prevost (codeworxtech) <[email]codeworxtech@users.sourceforge.net[/email]>
 * @author Brent R. Matzelle (original founder)
 * @copyright 2012 - 2014 Marcus Bointon
 * @copyright 2010 - 2012 Jim Jagielski
 * @copyright 2004 - 2009 Andy Prevost
 * @license [url=http://www.gnu.org/copyleft/lesser.html]http://www.gnu.org/copyleft/lesser.html[/url] GNU Lesser General Public License
 * @note This program is distributed in the hope that it will be useful - WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.
 */

/**
 * PHPMailer SPL autoloader.
 * @param string $classname The name of the class to load
 */
function PHPMailerAutoload($classname)
{
    
//Can't use __DIR__ as it's only in PHP 5.3+
    
$filename dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
    if (
is_readable($filename)) {
        require 
$filename;
    }
}

if (
version_compare(PHP_VERSION'5.1.2''>=')) {
    
//SPL autoloading was introduced in PHP 5.1.2
    
if (version_compare(PHP_VERSION'5.3.0''>=')) {
        
spl_autoload_register('PHPMailerAutoload'truetrue);
    } else {
        
spl_autoload_register('PHPMailerAutoload');
    }
} else {
    
/**
     * Fall back to traditional autoload for old PHP versions
     * @param string $classname The name of the class to load
     */
    
function __autoload($classname)
    {
        
PHPMailerAutoload($classname);
    }
}

PHPMailer folder and content was and is installed as shown above in sfkornyek.
Smtp.php had no installation instructions. I also tested it by moving it to PHPMailer folder, but it seems to indicate installation in one directory up from PHPMailerAutoload.php location,, so I moved it:

---------------------------------------

This is the pertinent part of the original smtp.php code
Code: [Select]
<?php
/**
 * This example shows making an SMTP connection with authentication.
 */

//SMTP needs accurate times, and the PHP time zone MUST be set
//This should be done in your php.ini, but this is how to do it if you don't have access to that
date_default_timezone_set('Etc/UTC');

require 
'../PHPMailerAutoload.php';

//Create a new PHPMailer instance
$mail = new PHPMailer;
...
NOTE

My domain is szabadsagharcos.org. A Hungarian community website.

Index.html is my main program that needs webmail. Once the error messages are solved, it will activate an html form that passes the mail to PHPMailer package.
 
I will have 2 more standalone webmails. All 3 will replace FormMails that LunarPages still recommends but which have real problems with the server after a decade of no problems. LunarPages support recently recommended php based mailprogram.

Moving smtp.php to PHPMailer folder
then calling smtp.php from index.html in sfkornyek folder with
http://sfkornyek.szabadsagharcos.org/PHPMailer/smtp.php
results in 2 error messages:
Code: [Select]
The requested URL /PHPMailer/smtp.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

calling smtp.php from sfkornyek folder with
../PHPMailer/smtp.php
gets the same error messages

<remove account name -- Mod.>
3
Web Hosting Help and Troubleshooting / Re: Jetpack won't connect
« Last post by Sire on September 22, 2017, 07:55:01 PM »
Thanks for the reply. I didn't want to bother support just yet. I'm sure they have more important things to do. I know they've been great helping me in the past.

I posted it here in the hope that someone else had come across the problem that had found a solution.

I'll keep looking and update this post at a later date.
4
Lunar Chit Chat / Re: Rather Surprised that Lunar Pages is still using SMF 2.0.11
« Last post by MrPhil on September 22, 2017, 08:31:27 AM »
I couldn't tell you why they are three releases behind. I did remind them of this several months ago, but I don't know what their schedule is (I'm not on the side of the fence that takes care of these things). Perhaps it's a low priority, and as long as it doesn't break, they want to leave well enough alone. I don't think they've had any significant problems with 2.0.11. I expect to eventually see them upgrade to 2.0.14+. I wouldn't expect a jump to 2.1 any time soon, unless PHP 7 doesn't work with 2.0.

I don't mind keeping my SMF at the latest level (2.0.14), and have had no problems with the one-button upgrade, even though I have half a dozen mods installed and a dozen or so custom code changes (including putting the last DB error timestamp in a separate file, so Settings.php never gets mangled, and member-selectable timezone rather than just an hours offset). Of course, I take a file and DB backup first, in case anything goes wrong.
5
Lunar Chit Chat / Rather Surprised that Lunar Pages is still using SMF 2.0.11
« Last post by LunarpagesClient on September 22, 2017, 07:16:07 AM »


Greetings:


I have been using the SMF software for over a decade. I started with probably  1.0.11

The current production version is SMF 2.0.14, which they have reworked almost totally. I had to rebuild my site from the ground up, and somehow the release of SMF 2.0.14 coincided with that, so I simply scrapped the old site totally and started afresh. Been almost 6 months and haven't had a single issue. 

Is there some special reason Lunar Pages still uses 2.0.11

6
PHP and MySQL Support / Re: Frustrated with PHPMailer
« Last post by MrPhil on September 21, 2017, 04:20:45 PM »
Uh, let's back up to the beginning. First of all, are smtp.php and PHPMailer two separate products, or are they installed together? You didn't misread /PHPMailer/Autoload.php as /PHPMailerAutoload.php, right? PHPMailer is the basic product, and smtp.php is an example program supplied by PHPMailer that uses PHPMailer? Where was PHPMailer originally installed... in /sfkornyek? Did the instructions for smtp.php say anything about where to install smtp.php, such as in PHPMailer? Did you move anything in the process?

If smtp.php is supposed to make use of PHPMailer, it would have to know where PHPMailer is. If, say, PHPMailer is in /sfkornyek/PHPMailer/, and the smtp.php example is installed in /sfkornyek/, I would think that it would look for PHPMailerAutoload.php in
Code: [Select]
require 'PHPMailer/PHPMailerAutoload.php';not ../.

If smtp.php was installed in a new directory under PHPMailer (say, /sfkornyek/PHPMailer/examples/), then
Code: [Select]
require '../PHPMailerAutoload.php';would be correct. Re-read the smtp.php example instructions and see if you missed anything about where it's being installed.
7
PHP and MySQL Support / Re: Frustrated with PHPMailer
« Last post by Bandi on September 21, 2017, 10:04:11 AM »
Thank you for your help.
I did nothing to include_path for now.

smtp.php resides in
home/***/public_html/sfkornyek/

PHPMailerAutoload.php location was
home/***/public_html/sfkornyek/PHPMailer/PHPMailerAutoload.php';
and I moved it to
home/***/public_html/sfkornyek/
The warnings are the same as listed originally

I then moved PHPMailerAutoload.php to
home/***/public_html/
and got
Fatal error: Class 'PHPMailer' not found in /home/***/public_html/sfkornyek/smtp.php on line 18
line 18 is $mail = new PHPMailer;

I continue scratching my head. Path should indicate where to look for a dependent file unless somehow a default location is built into php <- am I far off?

<***-out account name -- Mod.>
8
Web Hosting Help and Troubleshooting / Re: Jetpack won't connect
« Last post by MrPhil on September 21, 2017, 07:29:12 AM »
I am not aware of Wordpress.com being specifically blocked, but then, it could depend on what kind of "connection" they're looking to make. That's why I suggested opening a support ticket with more specific information. This is not official Lunarpages support, only a community helping each other, so a support ticket may be needed to get specific and official answers.

As I said before, a "404" suggests that they can't even find what they're looking to connect to, much less being denied permission to "connect". So, your first task would be to check just what page or file they're looking to work with, and make sure it exists, is not being redirected away in .htaccess, and has normal permissions for web access. Note that it's possible that if a page or file actually exists, that control will jump directly to that page and its local .htaccess, bypassing the chain of .htaccesses that are supposed to be processed. That's how my LP server is configured, and this can cause very odd problems. It may mean that you have to add an .htaccess file to that directory and do some processing there.

Is it Wordpress.com (a blog hosting service) that's trying to connect, or Wordpress.org is trying connect to update your WP files or something? Are you going to the right domain for whatever you're trying to do?

Thank you for your cooperation in removing the non-LP-hosted sites from your signature.
9
Web Hosting Help and Troubleshooting / Re: Jetpack won't connect
« Last post by Sire on September 20, 2017, 10:01:52 PM »
I don't know the answer to that. I only installed the plugin on those sites and so it's never worked.

have not switched to SSL.

Like I said in my comment above the error message specifically asked, "Ask your web host if they allow connections from WordPress.com" which is why I posted it here.

Also, I noticed if I do anything in the wordpress dashboard the resource usage goes up. Is that normal?

Peter

ps fixed the signature. Didn't realise that was not allowed.
10
Web Hosting Help and Troubleshooting / Re: Jetpack won't connect
« Last post by MrPhil on September 20, 2017, 06:49:02 AM »
What kind of "connection" is it looking to make? Did it work for a period, and then stop working? Can that be correlated with a server or PHP upgrade? You may need to open a support ticket with more specific information. A 404 code suggests that it's looking for the wrong address -- did you move anything around, or rename it, recently? Did you switch to https (SSL) and forget to update your link? If you use SSL, your .htaccess should be updated to automatically redirect http to https, although that might not affect whatever method Jetpack is trying to connect with.

And please remove non-LP-hosted sites from your signature, or we will need to take action to block your signature or even remove your posts. We do not permit non-LP-hosted sites to be promoted here in signatures, and only allow mention in posts where they provide a useful contribution to a discussion. Thank you.
Pages: [1] 2 3 ... 10
Share |