Search Results

Search found 6517 results on 261 pages for 'localhost'.

Page 171/261 | < Previous Page | 167 168 169 170 171 172 173 174 175 176 177 178  | Next Page >

  • Deploy CakePHP to a subfolder

    - by mgroves
    I have created a CakePHP 2 app, and now I'm trying to deploy it to a production web server. My app uses the default folder structure (app/lib/plugins/vendors), default htaccess, default routing, nothing special. I've been developing locally as if the app were in the root folder of the site (e.g. http://mycakeapp.localhost/ takes me to the site). But I'm deploying to a site (shared hosting) where that will not be the case (e.g. http://www.somedomain.com/mycakeapp). It doesn't work (I didn't really expect it to), so I assumed I had to tweak one or more htaccess files. I tried modifying the root .htaccess as suggested in this post, but that only partially worked (the link to the CSS didn't work, for instance): <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^mycakeapp$ mycakeapp/app/webroot/ [L] RewriteRule ^mycakeapp/(.*)$ mycakeapp/app/webroot/$1 [L] </IfModule> So what should I do to all the htaccess files to make this CakePHP site work in a subfolder?

    Read the article

  • Using a remote PHP service with Flex (Flash Builder) AIR Application?

    - by Chrisc
    Hello, I'm developing a Adobe AIR application using Flash Builder 4. This app needs to access a remote PHP service which is being hosted on a remote web server. I am having troubles figuring out how to add a PHP data service which uses a remote service. I can add the PHP data service in Flash Builder as a service hosted on localhost, but given that this will not be feasible when the application is deployed, will not work. Does anyone know how to connect a Flash Builder (Flex) project to a remote PHP data service? Thanks, Chris

    Read the article

  • Regex: absolute url to relative url (C#)

    - by splatto
    I need a regex to run against strings like the one below that will convert absolute paths to relative paths under certain conditions. <p>This website is <strong>really great</strong> and people love it <img alt="" src="http://localhost:1379/Content/js/fckeditor/editor/images/smiley/msn/teeth_smile.gif" /></p> Rules: - If the url contains "/Content/" I would like to get the relative path - If the url does not contain "/Content/", it is an external file, and the absolute path should remain Regex unfortunatley is not my forte, and this is too advanced for me at this point. If anyone can offer some tips I'd appreciate it. Thanks in advance.

    Read the article

  • css cache google chrome

    - by Daniel Garcia
    I'm having problems with cache, I think. I have a website in Joomla, and I have some .css (layout.css, position.css, .... ) and I have at home of the website, 3 buttons, I tested in localhost, and when I see the home well, I upload everything to production, to my server. Now, I just edited some styles of these buttons, for example, the width, in order to see them better...but I'm having a problem with the cache, because sometimes I see them with new changes, but other times I see with the old styles.....I realized that this happens especially with chrome Could you help me, please? Best regards, Daniel

    Read the article

  • testing .mobile mime format with capybara / rspec

    - by Chris Beck
    For detecting and responding to mobile user agents, I'm using Mime::Type.register_alias "text/html", :mobile and the approach I'm wondering what is the best approach to test with capybara. This article suggests setting up an iphone driver with Capybara.register_driver :iphone do |app| http://blog.plataformatec.com.br/2011/03/configuring-user-agents-with-capybara-selenium-webdriver/ but I'd like a more flexible approach where the mime type is set via the url extension localhost/index.mobile and where I can do this visit user_path( format: :mobile) Rails understands the extension and sets the format in the params hash, but how do I get the url helper methods to add that to all urls as a file extension?

    Read the article

  • How to set up virtual hosts properly on a windows machine using Zend Community CE ?

    - by Scott F
    I have set up Zend Server CE on a windows machine and am having the hardest time setting up virtual hosts. No matter what I do, links on my local machine are showing "localhost" in the path causing all images and links to not work properly. I have the following in my vhosts file and while the site loads up, most links show "local host in them". Please help. NameVirtualHost *:80 DocumentRoot D:\zend_server_ce\Apache2\htdocs\domain.dev ServerName www.domain.dev ServerAlias www.domain.dev *.domain.dev domain.dev UseCanonicalName Off #CustomLog D:\zend_server_ce\Apache2\htdocs\domain.dev\logs\access.log # ErrorLog D:\zend_server_ce\Apache2\htdocs\domain.dev\logs\error.log Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all

    Read the article

  • facebook FDT 3.0, asp.net get permission of all thing geting error

    - by AjmeraInfo
    i can't access the facebook application from another account. i can only use my application from my own account. i am use facebook application from http://localhost:81/ so it is any problem. i want one full example of facebook application with do most all thing cover. please lots of post are avaible in stackoverflow but i can't implement on it. please give full example of facebook application devlopment. everythings.... in advance thank you.

    Read the article

  • ruby on rails adding new route

    - by ohana
    i have an RoR application Log, which similar to the book store app, my logs_controller has all default action: index, show, update, create, delete.. now i need to add new action :toCSV, i defined it in logs_controller, and add new route in the config/routes as: map.resources :logs, :collection = { :toCSV = :get }. from irb, i checked the routes and see the new routes added already: rs = ActionController::Routing::Routes puts rs.routes GET /logs/toCSV(.:format)? {:controller="logs", :action="toCSV"} then ran ‘rake routes’ command in shell, it returned: toCSV_logs GET /logs/toCSV(.:format) {:controller="logs", :action="toCSV"} everything seems working. finally in my views code, i added the following: link_to 'Export to CSV', toCSV_logs_path when access it in the brower 'http://localhost:3000/logs/toCSV', it complained: Couldn't find Log with ID=toCSV i checked in script/server, and saw this one: ActiveRecord::RecordNotFound (Couldn't find Log with ID=toCSV): app/controllers/logs_controller.rb:290:in `show' seems when i click that link, it direct it to the action 'show' instead of 'toCSV', thus it took 'toCSV' as an id...anyone know why would this happen? and to fix it? Thanks...

    Read the article

  • Using java applet to send request with the client ip

    - by mike
    hi, i need to send a request to a website when a user submits their url, i tried using curl but it uses server ip which i dont want i have seen a website that is doing a similar job by using applet, users need to open a popup which contains the applet after they leave it open allow it to run it uses a port and then uses the localhost ip like so 127.0.0.1:64653 to send request and basicly curl by the user ip. i decompiled the applet the website was using and they were using java.net.ServerSocket and some other java code but i do not know anything about java. I would to know how this can be done.

    Read the article

  • How to strip a GET property from the URL using PHP

    - by James
    I have the following function that get's the current page URL: <?php // get current page url function currentPageUrl() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } echo $pageURL; } ?> Which prints: http://localhost/gallery.php?id=23&type=main I want to remove "&type=main" which is present in the url. So before echoing $pageURL I add the following line: $pageUrl = preg_replace("&type=main", "", $pageURL); But it still returns the full url including type=main. How can I get rid of that from the url?

    Read the article

  • Profile:Object reference not set to an instance of an object

    - by sallalman83
    Hi, i just lunch my web site i used the asp.net routing technology on it, and its work fine in my localhost but when i moved the project to the hosting server(Godaddy.com) its just work fine when there is no virtual sub directories like this(havebreak.com) but when u click on this link (havebreak.com/Registration/) or any other links that contain a virtual sub-directories its give Object reference not set to an instance of an object error on the profile object if (!Profile.IsAnonymous) Line 18: mlvRegistratioin.ActiveViewIndex = 1; i check my IIS settings and found it using the "Integrated pipeline" as recommended (at least at my knowledge), i checked the httpModules and httpHandlers tags under the system.webServer (since my hosting plan use the IIS7) and under the normal tag and every thing is fine then i used the url-rewriting instead of URL-Routing and the same problem exist and i notice that the session also not working in the virtual sub-directories too and by the way the ASP.NET routing work fine with my site its just the profile and session objects that not workin any help will be appreciated

    Read the article

  • MySQL INSERT data does not get stored in proper db, only temporary?

    - by greye
    I'm having trouble with MySQL or Python and can't seem to isolate the problem. INSERTs only seem to last the run of the script and are not stored in the database. I have this script: import MySQLdb db = MySQLdb.connect(host="localhost", user="user", passwd="password", db="example") dbcursor = db.cursor() dbcursor.execute("select * from tablename") temp = dbcursor.fetchall() print 'before: '+str(temp) dbcursor.execute('INSERT INTO tablename (data1, data2, data3) VALUES ("1", "a", "b")') dbcursor.execute("select * from tablename") temp = dbcursor.fetchall() print 'after: '+str(temp) The first time I run it I get the expected output: >>> before: () after: ((1L, 'a', 'b'),) The problem is that if I run it again, the before comes out empty when it should already have the entry in it and the after doesn't break (data 1 is primary key). >>> before: () after: ((1L, 'a', 'b'),) >>> before: () after: ((1L, 'a', 'b'),) >>> before: () after: ((1L, 'a', 'b'),) If I try running the insert command twice in the same script it will break ("Duplicate entry for PRIMARY KEY") Any idea what might be happening here?

    Read the article

  • mongoid with rails - Database should be a Mongo::DB, not NilClass"

    - by Adam T
    Greetings I am trying to get Mongoid to work with my Rails app and I am getting an error: "Mongoid::Errors::InvalidDatabase in 'Shipment bol should be unique' Database should be a Mongo::DB, not NilClass" I have created the mongoid.yml file in my config directory and have mongodb running as a daemon. The config file is like so: defaults: &defaults host: localhost development: <<: *defaults database: ship-it-development test: <<: *defaults database: ship-it-test production: <<: *defaults host: <%= ENV['MONGOID_HOST'] % port: <%= ENV['MONGOID_PORT'] % database: <%= ENV['MONGOID_DATABASE'] % All of my specs fail with the above error. I am using rails 2.3.8. Anyone have ideas?

    Read the article

  • google search engine api not produce exact live search

    - by Bharanikumar
    Hi , The google search engine api not render the first result , Example, function google_search_api($args, $referer = 'http://localhost/test/', $endpoint = 'web'){ $url = "http://ajax.googleapis.com/ajax/services/search/".$endpoint; if ( !array_key_exists('v', $args) ) $args['v'] = '1.0'; $url .= '?'.http_build_query($args, '', '&'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // note that the referer must be set curl_setopt($ch, CURLOPT_REFERER, $referer); $body = curl_exec($ch); curl_close($ch); //decode and return the response return json_decode($body); } $rez = google_search_api(array( 'q' = 'dl03', )); print_r($rez); the result for the above snippet little differ compare to live google search, the above snippet not render first result , that is in google live search first result not displaying the above snippet , AMy i know, what should i have to do now, Regards

    Read the article

  • Extending mysqli and using multiple classes

    - by Mikk
    Hi, I'm new to PHP oop stuff. I'm trying to create class database and call other classes from it. Am I doing it the right way? class database: class database extends mysqli { private $classes = array(); public function __construct() { parent::__construct('localhost', 'root', 'password', 'database'); if (mysqli_connect_error()) { $this->error(mysqli_connect_errno(), mysqli_connect_error()); } } public function __call($class, $args) { if (!isset($this->classes[$class])) { $class = 'db_'.$class; $this->classes[$class] = new $class(); } return $this->classes[$class]; } private function error($eNo, $eMsg) { die ('MySQL error: ('.$eNo.': '.$eMsg); } } class db_users: class db_users extends database { public function test() { echo 'foo'; } } and how I'm using it $db = new database(); $db->users()->test(); Is it the right way or should it be done another way? Thank you.

    Read the article

  • How to use atmosphere-spade-server in combination with atmosphere-pubsub.war

    - by Alfred
    I would like to play with atmosphere-spade-server.jar + pubsub.war. First of I have maven installed, but to be honest Maven is kind of new to me. Could please someone please explain me how to use it correctly. What I have tried Download atmosphere-spade-server + pubsub.war from there site. java -jar atmosphere-spade-server-0.6.0-20100329.142039-1.jar -a atmosphere-pubsub.war curl http://localhost:8080/atmosphere-pubsub/myAtmosphereTopic <html><body><h1>Resource Not> Found</h1></body></html> I would just have a guided tour of how to use Atmosphere.

    Read the article

  • Google's OpenID identifier is different depending on the "consumer" domain name. How to avoid potent

    - by JohnnyO
    I'm currently testing an OpenID implementation, and I'm noticing that Google sends a different identifier for different consuming host name / domain name, even for the same user. For example, Google sends a different identifier when the requesting site is localhost, compared to the identifier they send when the requesting site is 127.0.0.1 for the same user. Note: I haven't actually tested this using public domain names, but I can't see why the behavior would be any different. My concern with Google's behavior is that if we ever choose to change our website domain name in the future, then users will no longer be able to log in to the website using Google's OpenId as the identity provider. This seems to be a big problem. Am I missing something, or are all OpenID consuming sites faced with this potential problem? I've also tested this with MyOpenId, but the identifier that MyOpenId creates is fixed, so this wouldn't be a problem with them. Thanks.

    Read the article

  • OptionParser python module - multiple entries of same variable?

    - by jduncan
    I'm writing a little python script to get stats from several servers or a single server, and I'm using OptionParser to parse the command line input. #!/usr/bin/python import sys from optparse import OptionParser ... parser.add_option("-s", "--server", dest="server", metavar="SERVER", type="string", help="server(s) to gather stats [default: localhost]") ... my GOAL is to be able to do something like #test.py -s server1 -s server2 and it would append both of those values within the options.server object in some way so that I could iterate through them, whether they have 1 value or 10. Any thoughts / help is appreciated. Thanks.

    Read the article

  • asp.net mvc custom routes with multiple submit buttons

    - by dangerisgo
    So I have a custom route as such: routes.MapRoute( "Wizard", // Route name "Wizard/{page}", // URL with parameters new { controller = "Wizard", action = "Index" } // Parameter defaults ); and have the following on my View: <% Html.BeginForm("Continue", "Wizard"); %> <input type="submit" value="Continue" name="Continue" /> <% Html.EndForm(); %> In which I want to call this function: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Continue(string Number, string Rev) { (...) } but in turn when that button is pressed always calls the postback Index rather than the one I want. If I remove the custom route, it calls my function, but what I want to be displayed in the address bar is: localhost:xxxx/Wizard/1 where the number at the end is the page (div shown) of the wizard either 1, 2, 3, or 4. So is there something I'm missing or can it not be done? Thanks.

    Read the article

  • Flex Debugger wont launch - Only on particular project.

    - by John Isaacks
    When trying to launch Flex debaugger on my project, it does not launch and I get an error instead. Every other project in different workspaces launches just fine. This is the only one giving me an issue. Here is the error: Process terminated without establishing connection to debugger. Command: "C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\bin\adl.exe" D:\fromLapTop\lapDocs\Flex\Workspaces\MothersRings\MothersRingsAir\bin-debug\MothersRingsAir-app.xml D:\fromLapTop\lapDocs\Flex\Workspaces\MothersRings\MothersRingsAir\bin-debug Output from command: PreloadSwf paths must be local trusted: D:/fromLapTop/lapDocs/Flex/Workspaces/WebRequestNotifier/.metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf?host=localhost&port=9999error while loading initial content Anyone have any ideas on how I can fix this? Thanks!

    Read the article

  • php curl post parameters not passed to server

    - by user121196
    <?php $data = array('name' => 'Ross', 'php_master' => true); $url="http://localhost/test.php"; $handle = curl_init($url); curl_setopt($handle, CURLOPT_POST, true); curl_setopt($handle, CURLOPT_POSTFIELDS, $data); curl_exec($handle); ?> the $_POST variable on server side is empty, I also tried using java servlet, request.getParameterNames() is also empty. why are the post parameters lost?

    Read the article

  • AppEngine dev_appserver.py not showing any outputs

    - by shin
    I installed Python2.6 and Google App Engine (GAE). I realized that GAE does not run on 2.6, so I installed 2.5 as well. Now I have a very basic code as follows and it does not show on the localhost:8080 I typed the following in cmd.exe under my dir testapps. c:\Users\myname\testapps"\Program Files\Google\google_appengine\dev_appserver.py" helloworld I am hoping someone lead me to the right direction. helloworld/helloworld.py print 'Content-Type: text/plain' print '' print 'Hello, world!' helloworld/app.yaml application: helloworld version: 1 runtime: python api_version: 1 handlers: - url: /.* script: helloworld.py

    Read the article

  • How can I debug this web service http handler?

    - by baron
    Hello everyone, I am building a Httphandler following these instructions here It manipulates HTTP POST and HTTP GET. I have a client with two buttons two POST and GET. After i've tested and happy everythings working I move it from localhost to IIS. Now when I do this I get an exception in the POST handler code. How on earth can I debug this code line by line? I managed to do this awhile ago, I thought it was by attaching to process but I can't work it out. I can emulate GET just by typing address in browser, post im not sure about. I've tried telnetting and sending it from there but haven't had any luck.

    Read the article

  • How to enforce a namespace in wsdl for inner elements

    - by wsxedc
    I am looking at an example WSDL <definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://mypackage/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://mypackage/" name="HelloService"> <types> <xsd:schema> <xsd:import namespace="http://mypackage/" schemaLocation="http://localhost:8081/HelloWebService/HelloService?xsd=1"> </xsd:import> </xsd:schema> </types> <message name="sayHello"> <part name="parameters" element="tns:sayHello"></part> </message> <message name="sayHelloResponse"> <part name="parameters" element="tns:sayHelloResponse"></part> </message> <portType name="Hello"> <operation name="sayHello"> <input message="tns:sayHello"></input> <output message="tns:sayHelloResponse"></output> </operation> </portType> <binding name="HelloPortBinding" type="tns:Hello"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding> <operation name="sayHello"> <soap:operation soapAction=""></soap:operation> <input> <soap:body use="literal"></soap:body> </input> <output> <soap:body use="literal"></soap:body> </output> </operation> </binding> <service name="HelloService"> <port name="HelloPort" binding="tns:HelloPortBinding"> <soap:address location="http://localhost:8081/HelloWebService/HelloService"> </soap:address> </port> </service> and the referenced xsd is <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:tns="http://mypackage/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://mypackage/"> <xs:element name="sayHello" type="tns:sayHello"></xs:element> <xs:element name="sayHelloResponse" type="tns:sayHelloResponse"> </xs:element> <xs:complexType name="sayHello"> <xs:sequence> <xs:element name="arg0" type="xs:string" minOccurs="0"> </xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="sayHelloResponse"> <xs:sequence> <xs:element name="return" type="xs:string" minOccurs="0"> </xs:element> </xs:sequence> </xs:complexType> </xs:schema> When I use SoapUI to generate a request message, it looks like this <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:myp="http://mypackage/"> <soapenv:Header/> <soapenv:Body> <myp:sayHello> <arg0>?</arg0> </myp:sayHello> </soapenv:Body> </soapenv:Envelope> My question is, why doesn't arg0 need a namespace like ?? I am just using this as an example as the element that are children of soapenv always have a namespace prefix, however, the children of these children do not have any prefix. This is the case with soapUI and message sent by Axis2 generated stubs. My questions are: 1. Why aren't there any namespace for arg0? 2. Is there a way to enforce myp prefix on arg0 from WSDL? If so, how? If not, why can't it be done?

    Read the article

  • How do I echo out something different when reached last row?

    - by Josh Brown
    I am wanting to not echo out the comma at the end of the echo after the last row. How can I do that? Here is my code: <?php header("Content-type: application/json"); echo '{"points":['; mysql_connect("localhost", "user", "password"); mysql_select_db("database"); $q = "SELECT venues.id, venues.lat, venues.lon, heat_indexes.temperature FROM venues, heat_indexes WHERE venues.id = heat_indexes.venue_id"; $res = mysql_query($q) or die(mysql_error()); while ($point = mysql_fetch_assoc($res)) { echo $point['lat'] . "," . $point['lon'] . "," . $point['temperature'] . ","; } mysql_free_result($res); echo ']}'; ?>

    Read the article

< Previous Page | 167 168 169 170 171 172 173 174 175 176 177 178  | Next Page >