TweezerMan
Members-
Posts
1,763 -
Joined
-
Last visited
Everything posted by TweezerMan
-
Welcome to the forums, JustWade!
-
Welcome to the forums, weiyang123!
-
The 'page' directory (which isn't a real directory) is used by your mod_rewrite rule to construct a URL where whatever follows 'page' in the original URL is rewritten to be a 'page' URL parameter. Your rewrite rule takes the following URL: >http://lazytiger.com/page/whatever ...and rewrites it to the following: >http://lazytiger.com/index.php?page=whatever If you didn't want to use the 'page' directory in your URLs, you'd need to change the mod_rewrite rule so it's not looking for it in the original URL: >RewriteRule ^([^/\.]+)/?$ index.php?page=$1 [L] Depending on what other mod_rewrite rules you have in place, this change could break your site though.
-
From what I understand, it should not be happening. I'd be curious to know what user owns the files, what user owns the directory containing the files, and the permissions on that directory.
-
Phpbb Admin Login Takes Me To Delphiforums.com
TweezerMan replied to ufcwyjst's topic in Scripting Talk
Welcome to the forums, kodo! I'm not sure exactly where the problem is, but something in your forums isn't set up right. When I click on the "Log in to check your private messages" link: >http://www.kodoclan.com/forums/privmsg.php?folder=inbox ...that script is returning a redirect to the following URL: >http:///forums/login.php?redirect=privmsg.php&folder=inbox I believe Internet Explorer quits here with "Cannot find server or DNS Error", as 'http:///forums' isn't a valid URL or domain. Firefox continues however, by deciding to help you find the page you're looking for by submitting a search request for 'forums': >http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=forums The URL passed to Google is an "I'm feeling lucky!" query - Google searches for "forums" and you are instantly taken to the first link in the search results. That link happens to be the Delphi Forums. That's about all I can tell you, as I don't really know that much about phpBB forums. -
Welcome to the forums, AnnasAttic!
-
Welcome to the forums, Tigertrader!
-
I don't see anything obviosly wrong, but the problem could be with one of the files you're including. What problem are you having when you try to run the script on the server?
-
Basically, the issue is that you're expecting to be able to read a cookie from a user's machine in the same request that you set it in, and cookies just don't work that way. There is one transmission of data from your machine to the server (containing the page request, form data, and any cookies stored for your site), which is then followed by one response from the server to your machine, containing the page to be displayed and any new cookies to be set. 'fetch CGI::Cookie;' does not literally fetch a cookie from the user's machine. When you click the submit botton (actually, when you request any page from the web server), the browser automatically sends any cookies it has to the server. The server holds them in memory and provides them to your script when it calls 'fetch CGI::Cookie'. In your second instance, when your script calls 'fetch CGI::Cookie;', it is reading the cookie your browser sent at the time you clicked the submit button - not the cookie you just sent to your machine. This is what's occurring when you run your script: # script instance 1 (first page load) Your machine: - Browser requests page - No form parameters sent - Cookie value '0' sent Server: - Server sees cookie value '0' sent by browser - Script sees no form parameter - Script sends page with form back to browser You then click the 'on' button & submit the form... # script instance 2 Your machine: - Browser requests page - Form parameter 'on' sent - Cookie value '0' sent again Server: - Server sees cookie value '0' sent by browser - Script sends (sets) cookie value '1' to your machine - Script reads sent cookie with 'fetch CGI::Cookie' and sees sent cookie value of '0' - Script sends page with form back to browser You then click the 'on' button & submit the form... # script instance 3 Your machine: - Browser requests page - Form parameter 'on' sent - Cookie value '1' sent Server: - Server sees cookie value '1' sent by browser - Script sends (sets) cookie value '1' to your machine - Script reads sent cookie with 'fetch CGI::Cookie' and sees sent cookie value of '1' - Script sends page with form back to browser In a nutshell, I'd recommend restructuring your script code so that it first reads any cookies first sent by the browser. If no cookie was found, then create one. Then test for your form parameter (on/off). Set the now existing cookie with appropriate value if necessary, and send it to browser (set cookie). Test cookie value, and have script perform whatever actions you want and send page to browser. Hope this helps...
-
You may be able to delete the file by first setting the permissions on the directory containing the file to 0777. (Don't forget to set the directory permissions back to what they were after deleting the file.)
-
Welcome to the forums, vryce!
-
Welcome to the forums, moonlit801!
-
Welcome to the forums, Nirenjan!
-
Connecting To A Mysql Database
TweezerMan replied to devilish's topic in CPanel and Site Maintenance
On the server with the MySQL database, in CPanel / MySQL Databases, you need to add the servers you want you want to have access in the "Access Hosts" section (near the bottom of the page). These servers should be added as "serverXX.totalchoicehosting.com", where "XX" is the server number. -
Welcome to the forums, jpjayhawk1993!
-
You should be able to upload an entire folder with your FTP program.
-
I'd suggest first giving it 5 minutes or so to see if it's just a temporary issue or not. If the issue persists, I'd then suggest submitting a ticket to the Help Desk and have them look into it. I suspect the MySQL may just need to be restarted (but it could be something else).
-
Not really. You'll wipe out your configuration file (config.inc.php) and stand a good chance of wiping out your albums as well if the upgrade instructions are not followed.
-
Welcome to the forums, Wilba!
-
Statistics Software Configuration
TweezerMan replied to lawrencemok's topic in CPanel and Site Maintenance
I've never seen it, but it sounds to me like something that wasn't meant to be used on TCH servers, or it isn't set up correctly on your server. Either way, I'd suggest submitting a ticket to the Help Desk and asking them about it. -
The first step is to make sure your form is actually passing an array of checkbox values to your PHP script. In your form, your checkboxes should have name="CheckBoxname[]" (not just name="CheckBoxname") to indicate they are part of an array. Once the form is passing an array correctly, it should be relatively easy to have your script iterate through the array's values.
-
Welcome to the forums, Fruity!
-
Welcome to the forums, shoister!
-
Welcome to the forums, visualcreative!
-
Welcome to the forums, John!
