Jump to content

girish.kc

Members
  • Posts

    45
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

girish.kc's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi, I have developer a PHP application which works fine in root directory [document_root]. No I have a situation that needs the application to work from any directory by changing few config parameters. I have used the root-relative links in allover the application. Is there any easy way to accomplish this? If not I have to change all the pages having the links. Please advice. Girish
  2. Yes . I tried without [L]. Same result.
  3. No.. It is creating the problem. When a POST request is sent, this 301 will redirect the request and the POST request becomes GET. So the POST value will be lost..
  4. Yes. I have the index.php in DirectoryIndex, But for the request "https://api.xyz.com/folder" I am getting the following response
  5. Hi, Is there a way to modify the incoming URL request with rewrite? In my case, I have an external application calling mine with the URL I want this to be rewritten as I tried the following .htaccess to do that. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^folder$ /folder/index.php [L] </IfModule> But the problem here is, this is a POST request and because of rewrite server is sending back the '301 Moved Permanently' status back to the requester. Is there any way I can skip sending 301 and redirect without loosing the POST data? Thanks, Girish
  6. Hi, In my application I have not used any folders to define the hierarchy. All file s are in a single folder. What is the easy way of creating the Breadcrumb. I am rewriting the URL from www.mysite.com/main.php/page=pagename&id=10 to www.mysite.com/main/pagename/id/10 Is it possible to use the re-written URL to create the breadcrumb? If yes I can define hierarchy in the URL and use the same to create breadcrumb.
  7. Thanks for the quick replay. I figured a way... I'll give the list of users to the Super Admin. Super User can select and click on 'Login AS' button which will reset the existing session and create a new session using the SELECTED user's credentials. Thanks
  8. My application has 3 user types. Admin , User and Super Admin. Users can register as either Admin or User. Each user type has different UI and functionality. The problem: If a particular type of user reports a problem/bug in his/her login, it is difficult to pin point to the exact problem. So if I could able to login as that user, then it will be very easy to point out the bug/problem. So I'm looking for some kind of master password. Using any username and the master password I should be able to login AS that user. Any suggestions..?
  9. Hi, I'm working on an application which interacts with an embedded device. Here I'm sending the time in EDT. The following code is used to send the time: $time = date_format(date_create(null, timezone_open("EDT")), "s,i,H,d,m,Y,w"); Here 'm' is from 01 to 12. But at the receiving end the firmware expects the month to be in the range 0-11 (C-style). Yes I can explode the "$time" and subtract 1 from month. But is there any better way to do that..? Thanks, Girish
  10. Sorry.. By mistake I posted the wrong code. Yes I know how mysql_pconnect() works. I am not using _pconnect.. I was just testing with it. Here is the actual code I'm using: /* establish connection, select database */ if (0 == $this->Link_ID) { $this->Link_ID = mysql_connect($Host, $User, $Password); if (!$this->Link_ID) { $this->halt("connect($Host, $User, \$Password) failed."); return 0; } } if (!@mysql_select_db($Database, $this->Link_ID)) { $this->halt("cannot use database " . $this->Database); return 0; }
  11. Hi I am using a php class to connect to the MySQL database, which uses the following code snippet. /* establish connection, select database */ if (0 == $this->Link_ID) { $this->Link_ID = mysql_pconnect($Host, $User, $Password); if (!$this->Link_ID) { $this->halt("pconnect($Host, $User, \$Password) failed."); return 0; } } if (!@mysql_select_db($Database, $this->Link_ID)) { $this->halt("cannot use database " . $this->Database); return 0; } Now I'm facing the mysql idle connections problem. The number of idle connection is growing rapidly even the max_used_connection is very less. I tried to set the variable wait_timeout and interactive_timeout to as low as 5. But there is no improvement. Need some help. Girish
  12. Hi, I am using web safe fonts in my application but still in Linux Firefox the font looks very thick. In windows it is perfectly fine. Here is my css code: font: bold 18px Trebuchet MS, Helvetica, sans-serif seems to be problem with only the bold. Need some advice. Thanks, Girish
  13. Hi silkfire, Very quick replay.. Thanks a lot.
  14. I am working on a report generation. Here I need to count the number of months involved in the selected date range. I need to apply the monthly charges accordingly. Example: If the user selects 25-08-2011 to 03-10-2011, it should return 3 as the number of months. Yes, the number of days are less than 60 but still the date range is spread across 3 months. Any solution.. Please. Girish
  15. Hi, Have a application which receives the status update every 3 mins from external device through http request. All these status are inserted into a table with date/time as gmdate(). Recently we were doing the server fail-over test. Which is basically switch the dns if primary server fails. While doing so, we found that there was an entry in the table with the 'server time' not with the gmdate(). Is there any chance of getting wrong date/time while gmdate() fetching it? Help needed. Thanks:) Girish
×
×
  • 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.