Jump to content

roopurt18

Staff Alumni
  • Posts

    3,746
  • Joined

  • Last visited

    Never

Everything posted by roopurt18

  1. I'm anti social so not really. However, if there's any truth to some of the stories my great grandfather used to tell, then I'm a distant relative to some historically well known royal families. /shrug
  2. See attachment for a laugh. As for the actual topic, I don't see what difference it makes. Every culture has psychos, nuts, wackos, and cool people. Plus, all women are crazy, even the good ones. Just make sure you marry someone that isn't fat and can run fast. That way in the post-apocalyptic world you won't be bogged down by a chubby spouse while running from zombies. [attachment deleted by admin]
  3. And FTP information is sent in plain text from your machine to the server.
  4. Pretty much what TheFilmGod said. You should be developing on a local server that perfectly mimics the production server. Since the code changes are local there is no wait time between editing code, saving, testing, and repeating the process. When you are ready to upload the final code to the server, it should first be checked into version control and given a tag, such as v1.0.5. After committed to version control, export the code for a software release. Then zip the code and upload the final zip file to the server and extract it. Easy-peasy.
  5. Write a PHP program that you execute locally that uploads your entire project to your site. Shouldn't take long.
  6. I guess it depends on how they're looking at it and what they expect to see.
  7. I don't know what that has to do with tickets. Tickets are just numbers issued for requests, such as support tickets. What you've shown us is a recurring schedule. Anyways the simplest way to store those in a database is: id integer primary key schedule text not null last_run_tmz datetime null default null next_run_tmz datetime null default null created_tmz datetime not null modified_tmz datetime not null id should be self explanatory. created_tmz and modified_tmz are just used to keep track of when the database record was created and / or last modified. Instead of trying to create a database schema to match all of the possible things you can do with recurring schedules, just use a single text column called `schedule`. Store a serialized PHP object that holds the scheduling information within it. When you insert a record, insert the serialized object along with the date and time of the next time it should run (this goes in next_run_tmz. Then you set up a cron job / scheduled task to run a php script that queries this table for all records where NOW()>=next_run_tmz. The records returned will be the jobs that need to run. Run the job, update the last_run_tmz to NOW() and update next_run_tmz to the next time it should run.
  8. safemode could affect this I believe. Is safemode on?
  9. function arr_remove( haystack, needle ) { // terribly inefficient var new_arr = [], t; while( haystack.length > 0 ) { t = haystack.shift(); // or unshift, whichever takes off the first element if( t !== needle ) { new_arr.push( t ); } } return new_arr; }
  10. Run php -i and look for the loaded configuration file (probably /etc/php.ini) and also look for any additional PHP ini files that are loaded (possibly in /etc/php.d). In your main php.ini, you'll want to take note of where the extension_dir is: php -i | grep php.ini grep extension_dir /etc/php.ini cd /usr/lib/php/modules ls *mcrypt* That will tell you if mcrypt.so was made and installed. If not, try again with yum, maybe looking for php-mcrypt.
  11. Wherever you unzipped it to, just add that directory to your $PATH environment variable. You can access the $PATH variable by right clicking on My Computer -> Properties -> Advanced -> Environment Variables Just add c:\php; to the front of the existing value. Then if you open a command prompt (Start -> Run -> Cmd) you can type: php -v<enter> php -i<enter> php -m<enter> To see things about your installation.
  12. I'm too tired to say much that will help you with your actual problem, but I will point out that: if($location == ""){ echo ""; }else{ echo $location; } is equivalent to: echo $location;
  13. You don't count the number of rows by issuing a SELECT * and then using mysql_num_rows(). If you wan't to count records you use COUNT(*), like so: $q = mysql_query( "select count(*) as `n` from `the_table`" ); if( $q ) { $row = mysql_fetch_object( $q ); echo $row->n . ' rows!'; }
  14. I can't think of any reason to use separate columns for date and time. An appointment can not exist without both a patient and a physician so your query should be INNER JOINs and you should be using foreign key restrictions on the appointments table. I would also consider breaking the appointment times into a start_tm and end_tm. Appointments may vary in length due to the nature of the appointment. You can't just assume 8:15AM is available because the only other appointment available that day is 7:45AM. You might also consider the possibility that a facility will have a team of physicians with no particular physician tied to an appointment. In that case, perhaps your query will be a LEFT JOIN on the physician table. You may also want to provide the facility for physicians to mark slots of time as unavailable as well. Physicians are people too and have their own appointments, obligations, and vacations to see to. You wouldn't want a patient's appointment to be scheduled on top of a physician's vacation week.
  15. Do you mean to say that RiderID1_Position must also be greater than RiderId2_Position?
  16. # REDIRECT if www or not to www.domain.com RewriteCond %{HTTP_HOST} ^domain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule ^/?$ "http\:\/\/www\.domain\.com\/" [R=301,L] Is equivalent to: IF host IS domain.com OR host IS www.domain.com THEN REDIRECT www.domain.com END IF It needs to be: RewriteCond %{HTTP_HOST} ^domain\.com$ RewriteRule ^/?$ http://www.domain.com/ [R=301,L] You can think of .htaccess as being processed sequentially. One rule (or group of rules) is processed and applied if possible. If they are unable to be applied, then processing continues to the next set of rules. So to fix this we add a set of rules after the redirect-to-https rules. This new set of rules will redirect away from HTTPS for all non-applicable URIs. # REDIRECT w/ folder secureforms/forms/ to SSL RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} (/secureforms/forms//?)|(/secureforms/forms//.*)$ RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,QSA,R=301] # Now, if HTTPS is ON and the URI is not secureforms/forms, redirect away from HTTPS RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !(/secureforms/forms//?)|(/secureforms/forms//.*)$ RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI} [L,QSA,R=301]
  17. http://dev.mysql.com/doc/refman/5.0/en/select.html [sql_CALC_FOUND_ROWS] It's being ordered by `a`.
  18. Are you asking us to tell you where to download software illegally? Because that's not going to happen. If you know how to program, then look into ODBTP. It might set you straight.
  19. Get a better web host that doesn't insert crap into your pages.
  20. You have apache running as root, eh? Probably not a good idea to tell anyone which site you administer then.
  21. RewriteEngine on # HTTPS is off and # Requested URI contains special directory, # Redirect to HTTPS RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} (the_directory/?)|(the_directory/.*)$ RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,QSA,R=301] # Above - I believe 301 is moved permanently, double check yourself. You don't have to do anything in .htaccess for this as far as I know. If the user "hacks" the form and turns it into a method="get", then your PHP code will be looking for values in $_POST, won't find them, and won't do anything. That is if you programmed your PHP program correctly. <Limit GET> deny from all </Limit> AFAIK, that will block most of the traffic to your site. The two most common request types sent by the browser are GET and POST. Submitting a form with method="post" is a POST request, just about everything else is GET irrelevant of the existence of a query string. I could be mistaken here, but this is my understanding. As for your spam bots, it's mostly pointless to block them based on user agent as they can change it easily. I wouldn't even bother.
  22. Mardoxx, what did you use to generate that output? jamesxg1, you don't directly use the code you've shown. By installing the PHPIDS library into your application and using it, PHPIDS will use that code appropriately for you.
×
×
  • 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.