Search Results

Search found 6108 results on 245 pages for 'entry'.

Page 112/245 | < Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >

  • Write to windows share

    - by aidan
    I used to mount a windows share in Ubuntu server, with an entry in fstab: //data/SharedFolder /media/SharedFolder/ smbfs user,defaults,credentials=/root/.creds,uid=root,gid=root 0 0 /root/.creds is a text file with three lines, my username, password and domain. Users on the ubuntu server could write to this mount, but then I upgraded to 10.04 and now only root can write. Regular users can still read though. mount currently tells me: //data/SharedFolder on /media/SharedFolder type cifs (rw,mand,noexec,nosuid,nodev) How do I make it world writeable again? Thanks

    Read the article

  • Perl program not getting executed in xampp

    - by user1867151
    I am very new to CGI programming in Perl. In order to learn it i installed xampp 2 days back. But I am unable to execute my perl code . The code goes as folows: #!/usr/bin/perl use CGI; $co = new CGI; print $co->header, $co->start_html(title=>'CGI Example'), $co->center($co->hi('Subhayan welcome to CGI')), $co->end_html; Have saved the code in a text file named : Subhayan1.cgi and kept it in the folder cgi-bin under xampp folder in C drive. When i try to execute this through my web browser typing : "http://localhost/cgi-bin/Subhayan1.cgi" it comes up with a "Object not found page". I checked the apache configuration file under : xampp/apache/conf/httpd.conf. I checked the entry : ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/" It looks like pointing to the correct directory. What is the issue here can anyone help please???

    Read the article

  • How do I install and use Windows Virtual PC in Windows 8?

    - by KronoS
    I really like the integrated Virtual Machine that Windows had built-in with Windows 7 with Windows Virtual PC. I'm looking to install that again. I'd like to be able to install multiple machines as I did before (XP, Ubuntu, Etc,.) but I can't seem to find Windows Virtual PC for Windows 8 any more. Is it still available?, and if not was there something setup in place to replace it? How do I use it? NOTE TO ALL: While this is an accepted self posted answer feel free to edit, comment, or add an answer of your own. If your answer is better than mine, I will accept. This question was a Super User Question of the Week. Read the blog entry for more details or contribute to the blog yourself

    Read the article

  • Having many subdomains with SSL--best practices?

    - by jnunn
    I have a site that has many subdomains (one for each client). The content for each subdomain will be different, pulling different data, different layouts etc, so I don't think I can just alias one directory to many different sub domains. My question is, what's the best practice for doing this? Each subdomain will need SSL. My setup is Amazon EC2 (ubuntu) Wildcard SSL for my domain (*.mydomain.com) Apache 2 PHP (LAMP) Currently, I'm just creating a new entry into "/etc/hosts" and an appropriate spot in the web root (ie /var/www/abc.mydomain.com, /var/www/def.mydomain.com, etc). I've just discovered that I'll need a unique IP for each subdomain, and that's tricky with EC2 as they limit you to the number you can have (unless you jump through some hoops). Right now I have about 10 subdomains, which is manageable, but theoretically I could have thousands. Am I doing it the only way possible or is there a better way I should investigate?

    Read the article

  • How to set up Windows server 2008 to receive email?

    - by Saul
    First off apologies, I'm from a medical background not a networking one, but I've got roped into setting up a windows 2008 server. So far web server running, fixed IP address assigned (within a large private network of the National Health Service in the UK if that makes any difference) and the network team have assigned a DNS entry for me which works, so the server can be addressed as nww.myserver.nhs.uk I've only got ports open on the router for 80 and 443 (http and https) at the moment, so presume I need a different port to enable email services. My need is to be able to accept an email to the domain name like [email protected] in order to pick up a confirmation mail from an SSL issuer (Comodo) I guess to confirm that I control the domain. After that I don't actually need mail services on the server. I see lots of stuff about setting up SMTP services but thought that was about mail out and re-routing, but how do you get the server to "listen" for mail to the domain (assuming I open port xyz or whatever it is) ?

    Read the article

  • Can I force NFS automounts to use NFSv3?

    - by Steve
    I have a linux server that is exporting NFSv4 as well as NFSv3. I have a Fedora14 client that is defaulting to NFSv4 when automounting NFS shares off of the linux server, and it seems to be causing some problems. All my other linux clients on the network are mounting via NFSv3 without issue, so is there a way I can tell automount to mount the share via v3? I am pulling my automount maps via LDAP, with an entry in my /etc/auto.master file like so: +auto_master, so I assume it's a bit different than listing options with a regular automount map? (.i.e. /home --nfsvers=3 fileserver:/DATA)

    Read the article

  • Determine logged on user on Windows computer from Linux

    - by Justin
    How can I determine who is logged on to a remote Windows XP computer from Linux? I do not have administrator access on the domain or on the remote computer. I can do it from a separate Windows computer using PsLoggedOn -L \\computer from PsTools I've tried using nmblookup -A remotecomputer, but I only see entries for the computer and the domain, not a <03> entry for the user. I've also tried running PsLoggedOn under wine; I get an error: Connecting to Registry of \\computer.company.com... fixme:reg:RegConnectRegistryW Connect to L"computer.company.com" is not supported. I started looking into winexe, but it looks like I would need administrative rights on the remote computer to get it working.

    Read the article

  • how to portforward port 7300 from server A to server B

    - by Patrick van Hout
    hi, We are using Stunnel. But want to replace it is with an iptables entry if possible. 192.168.123.122:7300 need to be forwarded to 192.168.123.188:7300. So in iptables I set these two entries: [root@dev ~]# iptables -t nat -A PREROUTING -p tcp --dport 7300 -j DNAT --to-destination 192.168.123.188:7300 [root@dev ~]# iptables -A FORWARD -m state -p tcp -d 192.168.123.188 --dport 7300 --state NEW,ESTABLISHED,RELATED -j ACCEPT But it isn't working. I did check that /proc/sys/net/ipv4/conf/eth0/forwarding has the value "1" inside. Any tips or hints? thanks, Patrick

    Read the article

  • Dropdownlist post in ASP.NET MVC3 and Entity Framework Model

    - by Josh Blade
    I have 3 tables: RateProfile RateProfileID ProfileName Rate RateID RateProfileID PanelID Other stuff to update Panel PanelID PanelName I have models for each of these. I have an edit page using the RateProfile model. I display the information for RateProfile and also all of the Rates associated with it. This works fine and I can update it fine. However, I also added a dropdown so that I can filter Rates by PanelID. I need it to post back on change so that it can display the filtered rates. I'm using @Html.DropDownList("PanelID", (SelectList)ViewData["PanelDropDown"], new { onchange = "$('#RateForm').submit()" }) for my dropdownlist. Whenever it posts back to my HttpPost Edit method though, it seems to be missing all information about the Rates navigation property. It's weird because I thought it would do exactly what the input/submit button that I have in the form does (which actually passes the entire model back to my HttpPost Edit action and does what I want it to do). The panelID is properly being passed to my HttpPost Edit method and on to the next view, but when I try to query the Model.Rates navigation property is null (only when the post comes from the dropdown. Everything works fine when the post comes from my submit input). Get Edit: public ActionResult Edit(int id, int panelID = 1) { RateProfile rateprofile = db.RateProfiles.Single(r => r.RateProfileID == id); var panels = db.Panels; ViewData["PanelDropDown"] = new SelectList(panels, "PanelID", "PanelName", panelID); ViewBag.PanelID = panelID; return View(rateprofile); } HttpPost Edit: [HttpPost] public ActionResult Edit(RateProfile rateprofile, int panelID) { var panels = db.Panels; ViewData["PanelDropDown"] = new SelectList(panels, "PanelID", "PanelName", panelID); ViewBag.PanelID = panelID; if (ModelState.IsValid) { db.Entry(rateprofile).State = EntityState.Modified; foreach (Rate dimerate in rateprofile.Rates) { db.Entry(dimerate).State = EntityState.Modified; } db.SaveChanges(); return View(rateprofile); } return View(rateprofile); } View: @model PDR.Models.RateProfile @using (Html.BeginForm(null,null,FormMethod.Post, new {id="RateForm"})) { <div> @Html.Label("Panel") @Html.DropDownList("PanelID", (SelectList)ViewData["PanelDropDown"], new { onchange = "$('#RateForm').submit()" }) </div> @{var rates= Model.Rates.Where(a => a.PanelID == ViewBag.PanelID).OrderBy(a => a.minCount).ToList();} @for (int i = 0; i < rates.Count; i++) { <tr> <td> @Html.HiddenFor(modelItem => rates[i].RateProfileID) @Html.HiddenFor(modelItem => rates[i].RateID) @Html.HiddenFor(modelItem => rates[i].PanelID) @Html.EditorFor(modelItem => rates[i].minCount) @Html.ValidationMessageFor(model => rates[i].minCount) </td> <td> @Html.EditorFor(modelItem => rates[i].maxCount) @Html.ValidationMessageFor(model => rates[i].maxCount) </td> <td> @Html.EditorFor(modelItem => rates[i].Amount) @Html.ValidationMessageFor(model => rates[i].Amount) </td> </tr> } <input type="submit" value="Save" /> } To summarize my problem, the below query in my view only works when the post comes from the submit button and not when it comes from my dropdownlist. @{var rates= Model.Rates.Where(a => a.PanelID == ViewBag.PanelID).OrderBy(a => a.minCount).ToList();}

    Read the article

  • Windows 7 randomly installs an "Unknown Device"

    - by Amazed
    Rarely (several days to weeks between occurrences,) and seemingly at random, I get a balloon notification from Windows 7 (x64 SP1 Home Premium) that it is installing hardware for me. However, no new hardware has been installed or plugged in! When I click the balloon it doesn't give me any useful information: Looking in the event log, I find this entry: Event ID: 20001 Source: UserPnp Task Category: 7005 Message: Driver Management concluded the process to install driver FileRepository\usb.inf_amd64_neutral_153b489118ee37b8\usb.inf for Device Instance ID USB\VID_0000&PID_0000\6&3AF9A177&0&0060&&02 with the following status: 0x0. It appears to be USB related. My motherboard has both USB 2.0 and 3.0 controllers. My keyboard and mouse are plugged into the 2.0 slots and the data/recharge cable for a tablet (but not the tablet itself) was plugged in to the 3.0 slot. No other USB devices have been attached for several days/reboots. Why is Windows doing this?

    Read the article

  • Problem with Google Calendar API invocation at server side

    - by Raffo
    Hi guys, I have problems with the invocation of the Google Calendar API. I downloaded the library for java and I added as external JAR in eclipse the following files: gdata-core, gdata-calendar, gdata- calendar-meta, gdata-client-meta, gdata-client. Then, I created a the method as it follows: import com.google.gdata.client.calendar.CalendarService; import com.google.gdata.data.calendar.CalendarEntry; import com.google.gdata.data.calendar.CalendarFeed; import com.google.gwt.user.server.rpc.RemoteServiceServlet; public class GCalServImpl extends RemoteServiceServlet implements GCalServ { @Override public String RetrieveCalendars() { // TODO Auto-generated method stub // Create a CalenderService and authenticate try{ CalendarService myService = new CalendarService("taskR"); myService.setUserCredentials(***username***, "***password***"); // Send the request and print the response URL feedUrl = new URL("http://www.google.com/calendar/feeds/default/ allcalendars/full"); CalendarFeed resultFeed = myService.getFeed(feedUrl, CalendarFeed.class); System.out.println("Your calendars:"); System.out.println(); String s = ""; for (int i = 0; i < resultFeed.getEntries().size(); i++) { CalendarEntry entry = resultFeed.getEntries().get(i); s=entry.getTitle().getPlainText(); System.out.println("\t" + s); return s; } }catch(Exception e){ e.printStackTrace(); } return null; } I then call it from the client side doing a basic async invocation. If I try to launch the program I got the following errors: WARNING: Error for /taskr/cal java.lang.NoClassDefFoundError: com/google/gdata/client/calendar/ CalendarService at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java: 428) at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java: 339) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: 51) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: 122) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:349) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:938) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) Caused by: java.lang.ClassNotFoundException: com.google.gdata.client.calendar.CalendarService at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:315) at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java: 151) at java.lang.ClassLoader.loadClass(ClassLoader.java:250) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398) ... 33 more What can I do??

    Read the article

  • SSL FTP fails on Windows 7 but not Windows XP clients

    - by Andrew Neely
    We currently use a free SSL-FTP client called Move-It-Freely to transmit data from a custom data entry program at over forty facilities scattered around the state to our central server. Under XP, it works flawlessly. Some facilities have upgraded to Windows 7. On these machines, uploads (transfers to us) work, downloads (transfers from us to them) fail. Replacing the Windows 7 machine with an XP machine solves the problem. We have also verified that the network firewall settings have not changed. This problem persists even if Windows firewall is not running. We were able to remote into one of the Windows 7 machines to verify that the Windows firewall was indeed turned off. We cannot replicate the problem on our own Windows 7 machines, and are at a loss of how to fix this feature for our customers. The data contain health-related information, and needs to be encrypted (hence SSL-FTP.) Despite hours spent on Google, we cannot find a solution.

    Read the article

  • Simulating an UNC path with a leading dot

    - by Uwe Keim
    Being a C# .NET Windows Forms developer, some customers are running our applications on an Apple OS X Mac inside a Parallels virtual machine. Parallels presents host folders to the guest Windows as UNC paths with a leading dot like \\.psf\Home\Some\More\Folders Now an application of us cannot handle the leading dot correctly when accessing files from these kind of shares ("Invalid URI, cannot analyze host name" exception). I want to debug and fix this issue, unfortunately I do have no Mac and Parallels around here to test it. My question is: Is there a way to "simulate" this kind of share on a normal Windows server or client so that I'll be able to debug my application with Visual Studio? What I tried so far: I already tried to edit my HOSTS file to contain an entry like # ... 127.0.0.1 .psf # ... but Windows just seems to not recognize the share at all.

    Read the article

  • Will Software RAID And iSCSI Work For A SAN

    - by Justin
    I am looking for a SAN solution, but can't afford even entry level solutions. Basically, the SAN is for development and a proof of concept product. The performance doesn't have to be amazing, but needs to be functional. My buddy says we should just setup sotware RAID and software iSCSI in Linux. Essentially I have a spare server with dual Xeon processors, 4GB of memory, and (2) 500GB 7200RPM drives. It's a bit old but working. I am sure there is reason people don't do software RAID and iSCSI, but will performance be usable? Thinking of configuring the drives in RAID 0 (for performance).

    Read the article

  • SQL Azure Federation - how much data before performance benefits?

    - by Donald Hughes
    To avoid premature optimization, I don't want to implement SQL Azure's Federation too early. Is there a rule of thumb for how much data a table would need to have before seeing performance benefits from sharding? I know there won't be a precise answer as there are too many variables to consider, especially with much of SQL Azure's resources being hidden/unknown. To put it into several, more concrete examples, would Federation improve performance in any of the below table scenarios: 100,000 rows (~ 200 MB) 1,000,000 rows (~ 2 GB) 10,000,000 rows (~ 20 GB) 100,000,000 rows (~ 200 GB) For the sake of elaboration, we can assume this is the largest table that would be federated, which consists of order details, which is joined to an orders table with a 'customer_id' foreign key, which would be the distribution key. This is a fairly standard multi-tenant, CRUD order entry system, with a typical assortment of reporting needs (customer order totals by day/month/year, etc).

    Read the article

  • EBS+RAID10+XFS slower than EBS+RAID10+EXT3 using MySQL?

    - by Johann Tagle
    We're currently using EC2 with 16 EBS volumes in RAID10 configuration for our MySQL data. I know some people don't recommend to put EBS volumes to RAID but that's not what I'm concerned about at the moment. Current format is ext3, but we're experimenting with moving to xfs, given many reports that it is faster. However, we're actually experiencing a performance degradation when the partition was converted to xfs - a benchmark run with inserts, updates, selects and deletes was more than 10 seconds slower using xfs. Any idea what could be the problem? Below is the fstab entry (really only changed ext3 to xfs). Database tables are innodb and we are using innodb_file_per_table. /dev/mapper/vg_data-lv_data /data xfs noatime 0 0 Thanks.

    Read the article

  • Org-mode lags in highlighting source

    - by quanticle
    I'm using org-mode to maintain my programming notes. This means I have lots of source code blocks, as follows. #+begin_src <language name> <code> #+end_src One thing I've noticed is that when I write the #+end_src, emacs doesn't color the source code as such. Yet, if I quit emacs and reopen the notes file (or force a refresh with the Org-Refresh/Reload-Refresh setup current buffer menu entry) the source is colored grey if I'm using the GUI or green if I'm using emacs in the terminal. Is this an inherent limitation of emacs, or am I doing something wrong in setting up my code blocks that's preventing emacs from going back and recoloring the source code that I've entered?

    Read the article

  • Running a defect php file cause error 500

    - by John Brunner
    When I address a PHP file, I always get an error 500. I've looked up the logs of my Apache server, and this displays that some includes etc. in the PHP file address files which don't exist on the server. They don't exist because I'm just testing my PHP file. But could it be achieved that the server runs the php file in every case, even when something is wrong? Every 30 seconds an entry is made in the error_log file which says [Sat Jun 09 17:55:07 2012] [error] [client 10.224.55.160] File does not exist: /var/www/html/index.html ... but there IS an index.html?!

    Read the article

  • SQL Server 2000 + ASP.NET: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

    - by Rick
    I just migrated a development workstation FROM: Windows XP Pro SP3 with IIS 6 TO: Vista Enterprise 64bit with IIS 7 Since the move, one of my pages that accesses an SQL Server 2000 database is receiving the following error from my ASP.NET 2.0 web page: "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'." I have: enabled Windows Authentication in IIS and web.config disabled Anonymous Authentication in IIS set up Impersonation to run as the authenticated user verified that the logged in user (in this case, me) has access to the appropriate database on the SQL Server verified that my login and impersonation information is correct in the ASP.NET page by checking User.Identity.Name and System.Security.Principal.WindowsIdentity.GetCurrent().Name (both display my username) My connection string using SqlConnection is "Server={SERVER_NAME};Database={DB_NAME};Integrated Security=SSPI;Trusted_Connection=True;" Why is it trying to login with NT AUTHORITY\ANONYMOUS LOGIN? I have to assume it's some setting or web.config entry specific to IIS7 since it worked fine before the migration. NOTE: The SQL Server is Windows authentication only - no mixed mode or SQL only.

    Read the article

  • disable "SSL 2.0+ upgrade support" in nginx

    - by Bhargava
    I evaluated the SSL credentials of my server with qualsys ssl page ( https://www.ssllabs.com/ssldb/index.html ) and found the entry "SSL 2.0+ upgrade support" being marked as yes. I want to disable this sslv2 handshake too. I searched around and found http://forum.nginx.org/read.php?2,104032m, which points to creating a openssl.cnf file. Have a naive question here. After creating the file, does one need to re-key his certificate for this to work ? Are there any other steps to follow ? I use nginx 1.0.11 and openssl "OpenSSL 1.0.0e-fips 6 Sep 2011". I have set ssl_ciphers in nginx to SSLv3 TLSv1;

    Read the article

  • xkb layouts not working (in KDE?) after upgrade from Ubuntu 9.10 to 10.04

    - by Alan
    I customised my keyboard layout in 9.10 by editing the appropriate /usr/share/X11/xkb/symbols/ file. After upgrading to 10.04 I noticed it had overwritten all my modifications, so I recovered the layout and overwrote the symbol file's base entry. Sadly KDE (and, presumably, the entire OS) seems to ignore the files altogether. The help files don't mention anything about modifying layouts anyway (and the layout switcher seems to be using setxkbmap, which uses the above path according to its man page), so I'm at a bit of a loss. Do I need to compile this into some other format somehow or how do I get it to work?

    Read the article

  • How do I uninstall Office Live Add-in 1.4 after installing Office 2010?

    - by Shevek
    Last night I upgraded to Office 2010 RTM from MSDN. I'm now trying to uninstall the Office Live Add-in that I used with Office 2007 as this functionality is built in to Office 2010. When I run the uninstall from control panel I get the following message: Microsoft Office Live Add-in cannot be installed because you do not have the right version of Microsoft Office installed on your computer Google has pointed to 2 solutions, both of which are pretty useless: Use the MS Windows Installer Cleanup - this is not good because all it does is remove the Installer entry from the registry, leaving all the installed files behind Uninstall Office 2010, uninstall Add-in, reinstall Office 2010 - that is just ridiculous, but typical MS response So, can I get this off my system without resorting to option 2?

    Read the article

  • How to enable extension when running Firefox for the first time?

    - by spektom
    I need to run Firefox each time in a new profile directory with my extension enabled. What I do is the following: Create temporary directory for storing profile (/tmp/profile.123) Create extensions directory (/tmp/profile.123/extensions) Create extension proxy as described here (/tmp/profile.123/extensions/[email protected]) My command line looks like this: firefox -no-remote -profile /tmp/profile.123 -url http://www.google.com The problem is that my extension starts disabled, and I'm forced to enable it manually and restart the Firefox. Is it possible to make it start enabled in first place? Thanks! Workaround I've found: Create extensions.sqlite database file in the newly created profile folder. This file must contain my extension entry under the "addon" table.

    Read the article

  • PHP: Writing non-english characters to XML - encoding problem

    - by Dean
    Hello, I wrote a small PHP script to edit the site news XML file. I used DOM to manipulate the XML (Loading, writing, editing). It works fine when writing English characters, but when non-English characters are written, PHP throws an error when trying to load the file. If I manually type non-English characters into the file - it's loaded perfectly fine, but if PHP writes the non-English characters the encoding goes wrong, although I specified the utf-8 encoding. Any help is appreciated. Errors: Warning: DOMDocument::load() [domdocument.load]: Entity 'times' not defined in filepath Warning: DOMDocument::load() [domdocument.load]: Input is not proper UTF-8, indicate encoding ! Bytes: 0x91 0x26 0x74 0x69 in filepath Here are the functions responsible for loading and saving the file (self-explanatory): function get_tags_from_xml(){ // Load news entries from XML file for display $errors = Array(); if(!$xml_file = load_news_file()){ // Load file // String indicates error presence $errors = "file not found"; return $errors; } $taglist = $xml_file->getElementsByTagName("text"); return $taglist; } function set_news_lang(){ // Sets the news language global $news_lang; if($_POST["news-lang"]){ $news_lang = htmlentities($_POST["news-lang"]); } elseif($_GET["news-lang"]){ $news_lang = htmlentities($_GET["news-lang"]); } else{ $news_lang = "he"; } } function load_news_file(){ // Load XML news file for proccessing, depending on language global $news_lang; $doc = new DOMDocument('1.0','utf-8'); // Create new XML document $doc->load("news_{$news_lang}.xml"); // Load news file by language $doc->formatOutput = true; // Nicely format the file return $doc; } function save_news_file($doc){ // Save XML news file, depending on language global $news_lang; $doc->saveXML($doc->documentElement); $doc->save("news_{$news_lang}.xml"); } Here is the code for writing to XML (add news): <?php ob_start()?> <?php include("include/xml_functions.php")?> <?php include("../include/functions.php")?> <?php get_lang();?> <?php //TODO: ADD USER AUTHENTICATION! if(isset($_POST["news"]) && isset($_POST["news-lang"])){ set_news_lang(); $news = htmlentities($_POST["news"]); $xml_doc = load_news_file(); $news_list = $xml_doc->getElementsByTagName("text"); // Get all existing news from file $doc_root_element = $xml_doc->getElementsByTagName("news")->item(0); // Get the root element of the new XML document $new_news_entry = $xml_doc->createElement("text",$news); // Create the submited news entry $doc_root_element->appendChild($new_news_entry); // Append submited news entry $xml_doc->appendChild($doc_root_element); save_news_file($xml_doc); header("Location: /cpanel/index.php?lang={$lang}&news-lang={$news_lang}"); } else{ header("Location: /cpanel/index.php?lang={$lang}&news-lang={$news_lang}"); } ?> <?php ob_end_flush()?>

    Read the article

  • php-fpm start error

    - by Sujay
    I am using php-fpm. I recently recompiled php for including imap functions. But on php-fpm start it gives the following error: Starting php_fpm Error in argument 1, char 1: no argument for option - Usage: php-cgi [-q] [-h] [-s] [-v] [-i] [-f ] php-cgi [args...] -a Run interactively -C Do not chdir to the script's directory -c | Look for php.ini file in this directory -n No php.ini file will be used -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -f Parse . Implies `-q' -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -q Quiet-mode. Suppress HTTP Header output. -s Display colour syntax highlighted source. -v Version number -w Display source with stripped comments and whitespace. -z Load Zend extension ................................... failed What could be the problem? Is it in php-fpm.conf or php.ini.

    Read the article

< Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >