Search Results

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

Page 174/261 | < Previous Page | 170 171 172 173 174 175 176 177 178 179 180 181  | Next Page >

  • How to sanitize log messages in Log4j to save them in database

    - by Rafael
    Hello, I'm trying to save log messages to a central database. In order to do this, I configured the following Appender in log4j's xml configuration: <appender name="DB" class="org.apache.log4j.jdbc.JDBCAppender"> <param name="URL" value="jdbc:postgresql://localhost/logging_test" /> <param name="user" value="test_user" /> <param name="password" value="test_password" /> <param name="sql" value="INSERT INTO log_messages ( log_level, message, log_date ) VALUES ( '%p', '%m', '%d{yyyy-MM-dd HH:mm:ss}' )" /> </appender> This works fine, except some of the messages contain ', and then the appender fails. Is there an easy way to do this?

    Read the article

  • Zend not autoloading models

    - by Guy
    Ok, this is driving me nuts! I have a directory structure as follows: application - modules -- default --- controllers --- models ---- DbTable ---- Cachmapper.php --- views My config file looks like this [production] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.modules[] = The application seems to work, if I navigate to localhost, it correctly goes to the index controller. But, for some reason it refuses to load any models. Fatal error: Class 'Model_Cachmapper' not found in .............................../application/modules/default/controllers/IndexController.php on line 26 Ideas? Thanks

    Read the article

  • unable to install mysql completely on debian 5.0

    - by austin powers
    hi, its been a couple of days that I'm trying to install mysql on my vps which has debian 5.0 with 256mb ram. I've installed webmin also. here is the symptoms : after installing mysql using either webmin or apt-get I am trying to connect to mysql for changing root password but every time I cope with this error : ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) so I start to investigate and I understand there is no root user inside mysql database when I use : UPDATE user SET password=PASSWORD('newpassword') WHERE user="root"; it says 0 row affected I reinstall mysql for several times but the same problem still exits. please help me how can I install mysql-server as well as mysql-client correctly. regards.

    Read the article

  • install CakePHP on Mac osx: apache problems

    - by ed209
    First time cake user and I'm having real apache problems. For some reason the .htaccess is trying to find File does not exist: /Library/WebServer/Documents/Users but there is no such directory as Users. I have tried setting up the following also: /etc/apache2/extra/httpd-vhosts.conf <VirtualHost *:80 > DocumentRoot "/Users/username/Sites/mysite/app/webroot" ServerName mysite.dev ServerAlias www.mysite.dev mysite.dev *.mysite.dev <Directory "/Users/username/Sites/mysite/app/webroot"> Options Indexes FollowSymLinks AllowOverride All </Directory> </VirtualHost> /etc/hosts 127.0.0.1 mysite.dev /etc/apache2/users/username.conf <Directory "/Users/username/Sites/"> Options Indexes MultiViews FollowSymlinks AllowOverride All Order allow,deny Allow from all </Directory> That also hasn't worked, but with a different error Failed opening required 'cake/libs/cache/file.php' Although I'd rather not use virtual hosts, and just run it off localhost

    Read the article

  • Mysqldump create empty sql file? [php & mysql on Windows]

    - by mysqllearner
    Hi all, I tried to dump a database: <?php $dbhost = "localhost"; $dbuser = "XXXX"; $dbpass = "XXXXXXXX"; $dbname = 'testdb'; $list = shell_exec ("C:\wamp\bin\mysql\mysql5.1.33\bin\mysqldump.exe $dbname --user=$dbuser--password=$dbpass > dumpfile.sql"); ?> I tried both specified full path to mysqldump.exe or just use mysqldump, it still give me a 0kb dumpfile.sql Details: Programming Language: PHP Database: MySql 5.XX OS(server): Windows Server 2003. (currently testing on Windows Vista machine) EDIT @ Jeremy Heslop: I tried: shell_exec("C:\wamp\bin\mysql\mysql5.1.33\bin\mysqldump.exe --opt -h $dbhost -u$dbuser -p$dbpass $dbname > test.sql"); safe_mode = off Still no luck man.

    Read the article

  • java jdbc connection to mysql problem

    - by fatnjazzy
    Hi, I am trying to connect to mysql from java web application in eclipse. Connection con = null; try { //DriverManager.registerDriver(new com.mysql.jdbc.Driver()); Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost/db_name","root" ,""); if(!con.isClosed()) System.out.println("Successfully connected to " + "MySQL server using TCP/IP..."); } catch(Exception e) { System.err.println("Exception: " + e.getMessage()); } finally { try { if(con != null) con.close(); } catch(SQLException e) { System.out.println(e.toString()); } } I am always getting the Exception: com.mysql.jdbc.Driver I have downloaded this jar http://forums.mysql.com/read.php?39,218287,220327 import it to the "java build path/lib" the mysql version is 5.1.3 under. running: mysql 5.1.3 (db is up and running queries form PHP) windows XP java jee Thanks

    Read the article

  • Replicating Active Directory - testing scenarios

    - by Naeem Sarfraz
    Replicating a production server's Active Directory is possible through a number of approaches as mentioned here and here. I'm looking for a simpler approach if one exists. I have a mixed-mode authentication site that I need to test. Quite simply AD users (internal) will have more privilege's than someone who logs in via forms (external). We have a web service that cache's an AD structure (users & groups). I'm thinking of building a module (http handler I guess?) that will pick up my specially formed URL (http://impersonateduser@localhost/mywebapp) and use the bit before the @ as the username. That will be the username I use for any subsequent operations. How does that sound? Has anyone got other proposals for testing scenarios like this?

    Read the article

  • PHP getimagesize is not working when is called from a function in function.php (Wordpress)?

    - by janoChen
    PHP getimagesize is not working when is called from a function in function.php. function.php: add_action('wp_head', 'get_image_size'); function get_image_size() { global $width; // I thought this would solve the problem but it didn't global $height; // I thought this would solve the problem but it didn't list($width, $height, $type, $attr) = getimagesize($options['logo']); echo "Image width " .$width; echo "<BR>"; echo "Image height " .$height; echo "<BR>"; } $options['logo'] is returning http://localhost/wordpress/wp-content/uploads/2010/12/logo4.png so the image is being displayed. I also did var_dump to $width and $height but they didn't show up. Any suggestions?

    Read the article

  • Cannot resolve view when view is in subdirectory

    - by devzero
    We have a MVC 2.0 / c# 4.0 application that we develop visual studio. We have a part of the site (admin) that we have put in it's own sub directory and with its own routing rules: routes.Add("DomainRoute", new DomainRoute( ConfigurationManager.AppSettings["adminDomain"], // Domain with parameters "{controller}/{action}/{id}", // URL with parameters new { controller = "AdminPage", action = "Admin", id = "", isAdmin = true } We have all the views for the admin site inside an admin sub folder so that you get paths like: \views\admin\auth\login.aspx In the \controllers\admin\authController.aspx file I have a function called login: public ActionResult Login() { return View(); } This works just as it should, ie if i go admin.localhost\auth\login I go to the login page. But if I do a right click in visual studio and "go to view" i get an error "unable to go to matching view". Is there anyway to solve this?

    Read the article

  • Mocking imported modules in Python

    - by Evgenyt
    I'm trying to implement unit tests for function that uses imported external objects. For example helpers.py is: import os import pylons def some_func(arg): ... var1 = os.path.exist(...) var2 = os.path.getmtime(...) var3 = pylons.request.environ['HTTP_HOST'] ... So when I'm creating unit test for it I do some mocking (minimock in my case) and replacing references to pylons.request and os.path: import helpers def test_some_func(): helpers.pylons.request = minimock.Mock("pylons.request") helpers.pylons.request.environ = { 'HTTP_HOST': "localhost" } helpers.os.path = minimock.Mock(....) ... some_func(...) # assert ... This does not look good for me. Is there any other better way or strategy to substitute imported function/objects in Python?

    Read the article

  • Validation errors from Google App Engine Logout link

    - by goggin13
    I am making a web page using the Google App Engine. I am validating my pages, and found that the logout link that is generated by the call to the users api (in python) users.create_logout_url(request.uri) does not validate as XHTML 1.0 Strict. The href in the anchor tag looks like this: /_ah/login?continue=http%3A//localhost%3A8080/&action=Logout Including a link with this anchor text throws three different validation errors: *general entity "action" not defined and no default entity *reference to entity "action" for which no system identifier could be generated *EntityRef: expecting ';' Here is a dummy page with the anchor tag in it, if you want to try it on w3c validator.Dummy Page. The logout link wont work, but you can see how the page is valid without it, but the actual text inside the href tag breaks the validation. Any thoughts on whats going on? Thank you!

    Read the article

  • Problem using Javascript to redirect to a URL with a query string

    - by Jordan Pagaduan
    Javascript <script type="text/javascript"> function Edit(id) { if(confirm("Are you sure to edit?")==true) { location.href='employee_set.php&edit='+id; } } </script> PHP <?php if(isset($_GET["edit"])==false) { echo "no response"; } else { echo "link success"; } ?> My problem is the Javascript is OK. The location href example. http://localhost/employee_set.php&edit=30 ... The PHP code is not working. Error is not found.

    Read the article

  • Problem getting CodeIgniter working with WAMP

    - by musoNic80
    I've been developing a project based on CodeIgniter on my MacBook Pro. For reasons I don't need to go into I've now had to move my work onto a PC running Windows XP. I've installed WAMP and brought my existing project into the www folder. Unfortunately, when I try and access the project via localhost it throws up include errors. It seems that for some reason the constants APPPATH and BASEPATH seem to be incorrect. I've checked the index.php file and it all seems ok. I've also downloaded a fresh version of CodeIgniter and placed that in my www folder. I can access the welcome message without any problems. Any ideas?

    Read the article

  • What can cause a persistent "Reload the page to get source for" error in firebug?

    - by ripper234
    I'm trying to debug the javascript of a specific page, and I keep seeing Reload the page to get source for page.htm in Firebug. On Chrome, I'm mostly able to debug the js, but sometimes I also get a blank page. What can cause such issues? I believe I always see a blank page in Chrome if I reload while the JS console is open. If I open a new Chrome tab, load the page, and then open the JS console, everything is ok. The page I'm debugging is on a localhost server (Play Framework server), although I have seen this on other pages occasionally. This only happens with inline javascript ... js that is linked from the page is displayed fine.

    Read the article

  • When is a Google Maps API key required?

    - by Thomas
    Recently Google changed it's policy on the use API keys. You're now supposed to no longer need an API key to place Google Maps on your website. And this worked perfectly. But now I have this map (without API key) running on my localhost, which works fine. But as soon as I place it online, I get a popup saying that I need another API key. And on another page on that website, Google Maps does work. Could it maybe have something to do with that the map that doesn't work have a lot (30+) of markers on it? Actually using an API key wouldn't be a very nice solution to me, as this is part of a Wordpress plugin used on many websites.

    Read the article

  • How can I pass query string variables with NavigationService.Navigate?

    - by Mike Hildner
    Greetings, Searched for this, but no luck. I'm attempting to pass query string variables (and then retrieve them) in my Silverlight 4 app. First I tried this this.NavigationService.Navigate(new Uri("/LoanProductionRegion?Elvis=Alive&ImHungry=true", UriKind.Relative)); But HtmlPage.Document.QueryString doesn't pick them up because they come after the anchor (the full url looks like http://localhost:1076/Dashboard.SLTestPage.aspx#/LoanProductionRegion?Elvis=Alive&ImHungry=true). I tried to put the vars in front, such as this.NavigationService.Navigate(new Uri("?Elvis=Alive&ImHungry=true/LoanProductionRegion", UriKind.Relative)); this.NavigationService.Navigate(new Uri("/?Elvis=Alive&ImHungry=true/LoanProductionRegion", UriKind.Relative)); But both result in a "Page not found" error. Anyone know how to achieve what I'm after?

    Read the article

  • php with two class

    - by lolalola
    Hi Guys, my sample is good or not? I have a good connection to the database, or too should be in the class? Thanks <?php mysql_connect('localhost','root','admin'); mysql_select_db('test'); class UserDisplay { function getDisplayName() { $sql = 'select first_name, last_name, display_name from users where user_id = "3"'; $results = mysql_query($sql); $row = mysql_fetch_array($results); $this->user_id = $user_id; return $this->user_id; } } class UserInsert function InsertName($name) { mysql_query("INSERT INTO Persons (first_name)VALUES ('".$name."')"); } } $userD = new UserDisplay(); echo "User known as: " . $userD->getDisplayName() . "\n"; $userI = new UserInsert(); $userI->InsertName("Peter"); ?>

    Read the article

  • Is it possible to prevent a locally-running SWF (AS3) from downloading from my website?

    - by Matt
    I've got a crossdomain.xml file which allows SWFs running on only a certain few domains to download resources from my domain. However, one simple way around this is for a user to download the SWF to their local machine, and run it there (i.e. by double-clicking on it within Windows Explorer, not by running through http://localhost). It seems that when this happens, the crossdomain.xml file is ignored. I understand that in my actionscript, I can do this: if (Security.sandboxType.indexOf(Security.REMOTE) == -1) // running locally - don't allow However it is incredibly easy for someone to decompile the SWF and simply remove this line. Is it possible to do something on the server side to stop a locally running SWF to download from my site? I tried checking the referrer but this field often isn't populated. Does anyone have any other ideas? Thanks, Matt

    Read the article

  • SQLite REGEXP initializer not working in production on Heroku

    - by morcutt
    I am using this to create a REGEXP in SQLite with rails because SQLite does not support REGEXP. When running this app on Heroku rather than the localhost it does not work. Is the initializer not being run when the app launches? The log files are providing .. 2011-03-04T18:35:36-08:00 app[web.1]: ActiveRecord::StatementInvalid (PGError: ERROR: syntax error at or near "REGEXP" 2011-03-04T18:35:36-08:00 app[web.1]: LINE 1: ... "posts".* FROM "posts" WHERE (message REGEXP '(?... 2011-03-04T18:35:36-08:00 app[web.1]: ^ 2011-03-04T18:35:36-08:00 app[web.1]: : SELECT "posts".* FROM "posts" WHERE (message REGEXP '(?:^|\s+)/(\w+)' and user_id = 1)): Which are similar to what the development files produced if I had deleted the implemented code. It seems as though the REGEXP initializer is not being run at startup.

    Read the article

  • JSF tags not being rendered as HTML

    - by Toto
    I'm following the Java EE firstcup tutorial using Netbeans and Glassfish. When I execute the JSF web tier I've been instructed to code, the browser gets the same JSF markup coded in the .xhtml file, and the tags are not rendered as HTML tags. I know this by using the view source code in my browser. For example, for this code: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"> <h:head> <title>Page title here</title> </h:head> <h:body> <h2> <h:outputText value="#{bundle.WelcomeMessage}" /> </h2> </h:body> </html> The browser should get something like: <html ...> <head> <title>Page title here</title> </head> <body> <h2> the welcome message goes here </h2> </body> </html> Right? Well, my browser is getting jsf code (the first piece of code above) and not the html code (the second piece of code above). It seems to be a configuration problem in netbeans or glassfish but don't know what. Any ideas? This is my web.xml file: <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-value> </context-param> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/firstcup/*</url-pattern> </servlet-mapping> <session-config> <session-timeout> 30 </session-timeout> </session-config> <welcome-file-list> <welcome-file>greetings.xhtml</welcome-file> </welcome-file-list> </web-app> This is my faces-config.xml file: <?xml version='1.0' encoding='UTF-8'?> <!-- =========== FULL CONFIGURATION FILE ================================== --> <faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"> <application> <resource-bundle> <base-name>firstcup.web.WebMessages</base-name> <var>bundle</var> </resource-bundle> <locale-config> <default-locale>en</default-locale> <supported-locale>es</supported-locale> </locale-config> </application> <navigation-rule> <from-view-id>/greetings.xhtml</from-view-id> <navigation-case> <from-outcome>success</from-outcome> <to-view-id>/response.xhtml</to-view-id> </navigation-case> </navigation-rule> </faces-config> Moreover: The url I'm entering in the browser is http://localhost:8081/firstcup/ but I've also tried: http://localhost:8081/firstcup/greetings.xhtml I've checked Glassfish logs and there's no information about not being able to load FacesServlet

    Read the article

  • Is there a way in CXF to disable the SoapCompressed header for debugging purposes?

    - by Don Branson
    I'm watching CXF service traffic using DonsProxy, and the CXF client sends an HTTP header "SoapCompressed": HttpHeadSubscriber starting... Sender is CLIENT at 127.0.0.1:2680 Packet ID:0-1 POST /yada/yada HTTP/1.1 Content-Type: text/xml; charset=UTF-8 SoapCompressed: true Accept-Encoding: gzip,gzip;q=1.0, identity; q=0.5, *;q=0 SOAPAction: "" Accept: */* User-Agent: Apache CXF 2.2 Cache-Control: no-cache Pragma: no-cache Host: localhost:9090 Connection: keep-alive Transfer-Encoding: chunked I'd like to turn SoapCompressed off in my dev environment so that I can see the SOAP on the wire. I've searched Google and grepped the CXF source code, but don't see anything in the docs or code that reference this. Any idea how to make the client send "SoapCompressed: off" instead, without routing it through Apache HTTPD or the like? Is there a way to configure it at the CXF client, in other words?

    Read the article

  • Page doesn't post to the given URL

    - by Sri Kumar
    Hello All, I have the following HTML content. When i click the button, the page doesn't post to URL provided in action tag. The corresponding application is running, but still the page load of the CrossPage.aspx was not invoked. What could be the problem? <body> <form id="UploadForm" method="post" enctype="multipart/form-data" action="http://localhost:2518/Web/CrossPage.aspx"> <div> <input type="file" id="BtnUpload" /> <input type="button" id="BtnSubmit" value="Submit" /> </div> </form> </body>

    Read the article

  • Wordpress - Plugin - Administration - ?

    - by Goran
    Hi, I'm building a Wordpress plugin and I added a menu page which serves for management of "Vendor" entities that are kinda similar to the existing User entities. I have a list page similar to Users List, with Edit button for every record and when I click on the "Edit" button I should be taken to the "Edit Vendor" (which does not have its submenu item in the admin menu) page for that vendor. Everything is stored in the "plugins/wp_vendors" folder. Question: What URL should I use for opening that Edit page? How should a slug be registered for the Edit Vendor page? PS. Vendor List is added to the admin menu with add_menu_page('Vendors', 'Vendors', 8, 'C:\wordpress\wp-content\plugins\wp-vendors\vendors-list.php'); And I can open the List page with http://localhost/wp-admin/admin.php?page=wp-vendors/vendors-list.php Can anyone help me on this?

    Read the article

  • Stop Rails from unloading a module in development mode

    - by Gareth
    I have a module in my Rails app that lives in /lib module MyModule mattr_accessor :the_variable class << self def setup yield this end end end From my environments/#{RAILS_ENV}.rb file I can then set an environment-specific value for the_variable: MyModule.setup do |my_module_config| my_module_config.the_variable = 42 end This is lovely, and it seems to work (almost) fine. The problem is that in development mode, Rails via ActiveSupport::Dependencies unloads a load of modules, and reloads them in time for the new request. This is usually a great behaviour because it means you don't need to restart your localhost server when you make a code change. However, this also clears out my initialised the_variable variable, and when the next request comes in the initialiser (obviously) isn't run again. The net effect is that subsequent requests end up having MyModule.the_variable set to nil rather than the 42 that I'm looking for. I'm trying to work out how to stop Rails unloading my module at the end of the request, or alternatively find another way to cleanly provide environment specific configuration for my modules. Any ideas? :-/

    Read the article

  • JavaMe Bluetooth service registration

    - by NoGlue
    Hello, I am trying to develope an application that offers a service via bluetooth. Everything works fine in the emulator but as soon I install it on a real device (6120/X6 Nokia) the service cannot be found. If I search for already registered services such as OBEX they are found. So I think it has something to do with the registration. This is how I register the service, all of this happens in its own thread. try { LocalDevice.getLocalDevice().setDiscoverable(DiscoveryAgent.GIAC); } catch (BluetoothStateException e) { } try { notifier = (StreamConnectionNotifier) Connector.open(m_url); ServiceRecord sr = local.getRecord(notifier); StreamConnection conn = notifier.acceptAndOpen(); } catch (IOException e) { } And this is what m_url looks like: "btspp://localhost:" + 0x1116 + ";name=BlueMatch"; Thanks for your time. Best regards

    Read the article

< Previous Page | 170 171 172 173 174 175 176 177 178 179 180 181  | Next Page >