Jump to content

TheCanadian

Members
  • Posts

    70
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://

Profile Information

  • Location
    Ontario, Canada

TheCanadian's Achievements

Enthusiast

Enthusiast (6/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

1

Reputation

  1. You did it! The errors have stopped! Thanks a bunch Balakrishnan!!
  2. Thanks for the reply. I just tried it on one of my sites and it is still happening: [07-Oct-2017 12:16:18 America/Detroit] PHP Warning: Module 'imagick' already loaded in Unknown on line 0 My server is OSTEGO
  3. This is the problem I've encountered, and I'm wondering if anyone else here is seeing the same thing. I program PHP/MySQL sites, and since my TCH server was migrated to the new cPanel & PHP versions in February, I have been using the cPanel MultiPHP INI Editor (as I was told this was the new way of doing it after all my sites broke) to set my PHP version and configure specific PHP variables I needed for my site - like file_uploads, upload_max_filesize and a custom error_log so I can have one central file stored outside the public_html to collect any scripting errors. All was fine until last night around 9:20pm. Suddenly, in all sub-folders containing PHP scripts of all the sites I have on the server, I'm getting a generated "error_log" file with an error generated on every single script execution: [03-Oct-2017 21:21:38 America/Detroit] PHP Warning: Module 'imagick' already loaded in Unknown on line 0 I contacted support about this, and was able to resolve it on one site, but the solution isn't ideal as it means changing the setup of every site I have. They suggested to bypass the cPanel MultiPHP INI Editor of the site by modifying my .htaccess file to reference a custom php.ini file using suPHP_ConfigPath, then upload a full php.ini file with the modifications I need. Yes, this seems to solve the problem, but now I have to convert all my sites back to the method that was in place *before* the server upgrade in February. Yet everything was peachy until last night - so I'm thinking this is relating to a cPanel software update and not due to a coding change on my part since it is even occurring on sites I haven't edited in weeks. Is this happening to anyone else? Does anyone know why, or how to stop the deluge of error_log files popping up in every sub-folder? I'm just trying to figure out what is the best approach to this before I spend the time converting all my sites back to custom php.ini files.
  4. When the switch occurs, what PHP version will existing accounts be defaulted to - 5.4, 5.5, 5.6 or 7.0? If 7.0, is there something I can do to set things before the switch to ensure a prior version is used? I ask because I know for a fact many of the scripts I use are not PHP 7.0 compatible. They are 5.6 compatible though.
  5. I just subscribed to the service on a couple of accounts I manage. It is catching spam (and some legitimate email), but there is still a lot of junk mail coming through. In http://nospam.totalchoicehosting.com/ I can see how to Whitelist senders or move an incorrectly identified message back to the inbox, but how would I tell it that certain messages it let through to my inbox are actually spam?
  6. Relating to the same issue, but from the perspective of the server's root certificate store, I would just like to verify if the following (taken from PayPal's recent letters of compliance checks) would be true for all TCH servers:
  7. I have just noticed something really odd start happening on pretty much all my sites. The folder modified dates are being changed whenever a visitor just accesses the folder - yet nothing in the folder is being changed! I have several scripts that rely on the modified file/folder dates to determine when portions of the site were last updated, and now it thinks everything is in a constant state of update because the dates are changing whenever a web visitor just accesses the index file in the folder! This seems to be happening exclusively with folders that have a PHP index file. I tried creating the two folders and files detailed below as a test: /test/index.phtml <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <?PHP print "<head><title>TEST</title>\n"; print "</head><body>\n"; print "<div id=\"Content\">\n"; print "TEST"; print "</div>\n"; print "</body>\n"; ?> </html> /test2/index.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head><title>TEST</title></head> <body> <div id="Content">TEST</div> </body> </html> Both files essentially output the same thing, yet when I access the /test/ folder in a web browser, then modified date of the /test/ folder is changed. When I access the /test2/ folder in the web browser, the folder date is not changed. Why is PHP modifying the folder date when nothing is being written into the folder?
  8. Something else I ran into with this upgrade is that the PHP virtual() command no longer works wince PHP is now being run in CGI mode instead of Apache mode. If you were using it to include text, html or PHP files inside your PHP script, try using require() or include() instead. If you were wanting to execute another script (like a Perl script), then you'll have to use passthru().
  9. Question... is it possible that before this change, files uploaded/created by scripts running on the server as user "nobody" were not being calculated in the web space quota shown in CPanel and WHM? Because I had one site bloat by 100megs overnight, and I can't find anything on it that has significantly changed since the other day.
  10. As far as I know, this is how to do it... Look in your Apache folder for httpd.conf (might be in the "conf" subdir). Edit the file in a text editor and search for the line: Listen 80 Change it to whatever port you like, then restart Apache. Or, if you are wanting to make the server accessible to the Internet on a non-standard port, if you have a router then just port map whatever external port you like to the internal port of 80 on the server. That way locally you can access it normally, and only when accessing from outside do you have to use the non-standard port. Oh - and regarding the initial error you were getting, it looks like just a warning and not an actual error. Chances are your PHP install is showing verbose errors to the browser whereas the install here wouldn't do that by default (would get messy really quick!) I think it's just warning you that when you are running the script, because you don't check if the variable exists and are just assigning it, it's warning you the variables are empty. If you actually posted to the script, it wouldn't say that. Try it. It's good to have that enabled for testing scripts to look for all possible glitches and warnings before posting it online.
  11. Oh!! I'm getting somewhere! I checked and the server is using Pro-FTPd. HELP says it supports SITE UTIME. Docs for Pro-FTPd says this is used to modify the file dates. So I looked up how to use SITE UTIME, and found: http://www.proftpd.org/docs/contrib/mod_si...html#SITE_UTIME So I tried: >SITE UTIME 200711010000 "November 2007.pdf" And I get a response of "500 UTC Only". So I'm getting close, just missing something I think. UPDATE: Got it!!! Man, this took some heavy Googling... I found that some implementations of SITE UTIME work totally differently, letting you change the creation date, modification date and access date. So I tried changing the command: >SITE UTIME November 2007.pdf 20071101000000 20080211000000 20080211000000 UTC And holy crap, it worked! I also had to remove the quotes because it didn't work with them (they weren't needed).
  12. I tried it by using PHP to run the command: >exec("touch -t 200711010000.00 'November 2007.pdf'") but it didn't seem to do anything. I think the issue of the PHP script running as "nobody" is the problem again. My account doesn't have SSH access so I can't login to run the command directly. I think I'd pretty much need a way to run a command under my user instead of the nobody user. OJB: SmartFTP must be using an FTP command to do that. Do you know what command it is? I can run custom commands with my FTP client. I tried >MDTM 20071101000000 "November 2007.pdf" but it gave me an error: "Can't check for file existence", so I assumed the TCH FTP server I'm on doesn't support using MDTM to change the file date. I can't find another FTP command that is designed to do that.
  13. The documents are named by date, but not a numerical date (eg. "November 2007 Gazette.pdf" or "Summer 2008 Meeting.pdf") so there is no way of showing them in the correct order. Changing all the filenames to something like "2007-11 Gazette.pdf" is not an option. Is there any way to change the date of an uploaded file? Through FTP maybe? Perhaps some way to run a Unix touch command under my user id instead of the "nobody" user through cpanel somewhere? UPDATE: Found a simple solution! Since the problem was that the file was my user and the PHP touch command executed from the web runs as user "nobody", I tried uploading the file through a PHP script instead of FTP. So now my "nobody" script has the permission to modify my "nobody" file. Sweet! That will work!
  14. I have a script which loads a list of PDF newsletters in a directory and displays them according to the date they were originally uploaded. Unfortunately, on occassion I need to fix a goofed up file and reupload, which now updates the modified date and goofs up the order of the newletters. I need to be able to change the date on the file to put it back in the right order. The files are uploaded by me via FTP, so they are set to my user and not "nobody". I have tried setting the chmod to 666 and using the PHP touch command, but it tells me I'm not allowed to perform that function. How can I do this?
  15. Because of the double-slash problem that showed up, I'm guessing it's just piggy-backing on the default rule instead of overriding it, so it's redirecting to non-www, then redirecting back to www. That causes the password protected area to spit out a 401 error. I *think* it's because the switch to non-www happens first, then the authentication is processed, then the switch back to www happens. I'm not sure though - that's just a guess based on what I've found about the order of events in the htaccess files. So far this is the only code I've been able to get to reliably work: >RewriteEngine On RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_URI} !/$ RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301] It only works if I put it in the htaccess within the password protected folders, and after the authentication section of the htaccess file. I had to change the !-f to -d because it was trying to put a / on the end of requests for missing files too. So it seems to be working, even though I'm still confused as to why the rewrite rule was initially spitting out the server path instead of the URL.
×
×
  • Create New...