Search Results

Search found 693 results on 28 pages for 'xampp'.

Page 26/28 | < Previous Page | 22 23 24 25 26 27 28  | Next Page >

  • Help converting PHP eregi to preg_match

    - by Jason
    Hi all, I am wondering if someone could please help me convert a piece of PHP code that is now deprecated. Here is the single line I am trying to convert: if(eregi(trim ($request_url_handler[$x]),$this->sys_request_url) && $this->id_found == 0){ It is part of a function that return the configuration settings for a website. Below is the whole function. // GET CORRECT CONFIG FROM DATABASE function get_config($db) { global $tbl_prefix; $db->query("SELECT cid,urls FROM ".$tbl_prefix."sys_config ORDER BY cid"); while($db->next_record()){ $request_url_handler = explode("\n",$db->f("urls")); if(empty($request_url_handler[0])) { $request_url_handler[0] = "@"; $this->id_found = 2; } for($x=0; $x<count($request_url_handler); $x++) { if(empty($request_url_handler[$x])) { $request_url_handler[$x] = "@"; } if(eregi(trim($request_url_handler[$x]),$this->sys_request_url) && $this->id_found == 0) { $this->set_config($db,$db->f("cid")); $this->id_found = 1; } } if($this->id_found == 1) { return($this->sys_config_vars); } } $this->set_config($db,""); return($this->sys_config_vars); } Any help would be great ly appreciated. I only found the the eregi function was deprecated since I updated XAMPP to 1.7.3.

    Read the article

  • How to load an HTML file into an included PHP file from another PHP?

    - by Peter NGM
    i have 2 PHP file and 1 HTML. i want to include file2.php in file1.php. file1.php is: <html> <head>...</head> <body> ... <?php include("file2.php"); ?> ... </body> </html> i want to load an HTML file in file2.php: file2.php is: <?php $doc = new DOMDocument(); $doc->loadHTMLFile("sample.html"); echo $doc->saveHTML(); ?> and sample.html is: ... <b>Hello World!</b> ... my problem is this error: Warning: DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: I/O warning : failed to load external entity "sample.html" in C:\xampp\htdocs\project\file2.php on line 3 please help me to solve this problem.

    Read the article

  • WCF service with PHP client - complex type as parameter not working

    - by Matt F
    Hi, I have a WCF service with three methods. Two of the methods return custom types (these work as expected), and the third method takes a custom type as a parameter and returns a boolean. When calling the third method via a PHP soap client it returns an 'Object reference not set to an instance of an object' exception. Example Custom Type: _ Public Class MyClass Private _propertyA As Double <DataMember()> _ Public Property PropertyA() As Double Get Return _propertyA End Get Set(ByVal value As Double) _propertyA = value End Set End Property Private _propertyB As Double <DataMember()> _ Public Property PropertyB() As Double Get Return _propertyB End Get Set(ByVal value As Double) _propertyB = value End Set End Property Private _propertyC As Date <DataMember()> _ Public Property PropertyC() As Date Get Return _propertyC End Get Set(ByVal value As Date) _propertyC = value End Set End Property End Class Method: Public Function Add(ByVal param As MyClass) As Boolean Implements IService1.Add ' ... End Function PHP client call: $client-Add(array('param'=array( 'PropertyA' = 1, 'PropertyB' = 2, 'PropertyC' = "2009-01-01" ))); The WCF service works fine with a .Net client but I'm new to PHP and can't get this to work. Is it possible to create an instance of 'MyClass' in PHP. Any help would be appreciated. Note: I'm using PHP 5 (XAMPP 1.7.0 for Windows). Thanks Matt

    Read the article

  • Looking for Bugtracker with specific features

    - by Thorsten Dittmar
    Hi, we're looking into bugtracking systems at our firm. We're quite small (4 developers only). On the other hand we have quite a large number of customers we develop individual software for. Most software is built explicitly for one customer, apart from two or three standard tools we ship. To make support easier for us (and to avoid being interrupted by phone calls all the time) we're looking for a bugtracker that must support a specific set of features. We want the customers to report bugs/feature/change requests themselves and be notified about these reports by email. Then we'd like to track what we've done and how much time it took, notifying the customer about that per email (private notes for just us must be possible). At the end of the month we'd like to bill all closed reports according to the time it took to solve/implement them. The following must be possible: It must have a web based interface where the users must log in with credentials we provide. The users must not be able to create accounts themselves/we must be able to turn off such a feature. We must be able to configure projects and assign customer logins to these projects. The customers must only see projects they are assigned to, not any other projects. Also, customers must not "see" other customers. We would name the projects, so that standard tools are listed as separate projects for each customer. A monthly report must be available that we can use to get information about the requests we worked on per customer. I'd like to introduce some standard product like Mantis (I've played with that a little, but didn't quite figure out whether it provides all the features I listed above). The product should be Open Source and work on a XAMPP Windows Server 2003 environment. Does anybody have any good suggestions?

    Read the article

  • Image insert problem php sqlserver

    - by Termedi
    Hi I can not save image inside a sql server 2000 database. datatype is image here is the code: // Image Upload <?php include('config.php'); if(is_uploaded_file($_FILES['userfile']['tmp_name'])) { $fileName = $_FILES['userfile']['name']; $tmpName = $_FILES['userfile']['tmp_name']; $fileSize = $_FILES['userfile']['size']; $fileType = $_FILES['userfile']['type']; $size = filesize($tmpName); set_magic_quotes_runtime(0);//to desactive the default escape spacials caracters made by PHP in the externes files $img_binaire = base64_encode(fread(fopen(str_replace("'","''",$tmpName), "r"), $size)); $query = "INSERT INTO test_image (image_name, image_content, image_size) ". "VALUES ('{$fileName}','{$img_binaire}', '{$size}')"; odbc_exec($conn, $query) or die('Error, query failed'); echo "<br>File $fileName uploaded<br>"; echo "<br>File Size: $fileSize <br>"; } ?> // Image Show <?php include('config.php'); $sql = "select * from test_image where id =2"; $rsl = odbc_exec($conn, $sql); $image_info = odbc_fetch_array($rsl); //$count = sizeof($image_info['image_content']); //header('Accept-Ranges: bytes'); //header('Content-Length: '.$image_info['image_size']); //header("Content-length: 17397"); header('Content-Type: image/jpeg'); echo base64_decode($image_info['image_content']); //echo bindec($image_info['image_content']); ?> Error: Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Operand type clash: text is incompatible with image, SQL state 22005 in SQLExecDirect in C:\xampp\htdocs\test\upload.php on line 25 Error, query failed

    Read the article

  • How do I set an absolute include path in PHP?

    - by Nathan Long
    In HTML, I can find a file starting from the web server's root folder by beginning the filepath with "/". Like: /images/some_image.jpg I can put that path in any file in any subdirectory, and it will point to the right image. With PHP, I tried something similar: include("/includes/header.php"); ...but that doesn't work. I think that that this page is saying that I can set include_path once and after that, it will be assumed. But I don't quite get the syntax. Both examples start with a period, and it says: Using a . in the include path allows for relative includes as it means the current directory. Relative includes are exactly what I don't want. How do I make sure that all my includes point to the root/includes folder? (Bonus: what if I want to place that folder outside the public directory?) Clarification My development files are currently being served by XAMPP/Apache. Does that affect the absolute path? (I'm not sure yet what the production server will be.)

    Read the article

  • what makes a Tomcat5.5 cannot be "aware" of new Java Web Applications?

    - by Michael Mao
    This is for uni homework, but I reckon it is more a generic problem to the Tomcat Server(version 5.5.27) on my uni. The problem is, I first did a skeleton Java Web Application (Just a simple Servlet and a welcome-file, nothing complicated, no lib included) using NetBeans 6.8 with the bundled Tomcat 6.0.20 (localhost:8084/WSD) Then, to test and prove it is "portable" and "auto-deploy-able", I cleaned and built a WSD.war file and dropped it onto my Xampp Tomcat (localhost:8080/WSD). The war extracted everything accordingly and I can see identical output from this Tomcat. So far, so good. However, after I tried to drop to war onto uni server, funny thing happens: uni server Even though I've changed the war permission to 755, it is simply not "responding". I then copied the extracted files to uni server, the MainServlet cannot be recognized from within its Context Path "/WSD", basically nothing works, expect the static index.jsp. I tried several times to stop and restart uni Tomcat, it doesn't help? I wonder what makes this happen? Is there anything I did wrong with my approach? To be frank I paid no attention to a server not under my control, and I am unfortunately not a real active day-to-day Java Programmer now. I understand the fundamentals of MVC, Servelets, JSPs, JavaBeans, but I really feel frustrated by this, as I cannot see why... Or, should I ask, a Java Web Application, after cleaned and built by NetBeans6.8, is self-contained and self-configured so ready to be deployed to any Java Web Container? I know, I can certainly program everything in plain old JSP, but this is soooo... unacceptable to myself... Update : I am now wondering if there is any free Tomcat Hosting so that I would like to see if my war file and/or my web app can go with them without any configuration at all?

    Read the article

  • mysql row locking via php

    - by deezee
    I am helping a friend with a web based form that is for their business. I am trying to get it ready to handle multiple users. I have set it up so that just before the record is displayed for editing I am locking the record with the following code. $query = "START TRANSACTION;"; mysql_query($query); $query = "SELECT field FROM table WHERE ID = \"$value\" FOR UPDATE;"; mysql_query($query); (okay that is greatly simplified but that is the essence of the mysql) It does not appear to be working. However, when I go directly to mysql from the command line, logging in with the same user and execute START TRANSACTION; SELECT field FROM table WHERE ID = "40" FOR UPDATE; I can effectively block the web form from accessing record "40" and get the timeout warning. I have tried using BEGIN instead of START TRANSACTION. I have tried doing SET AUTOCOMMIT=0 first and starting the transaction after locking but I cannot seem to lock the row from the PHP code. Since I can lock the row from the command line I do not think there is a problem with how the database is set up. I am really hoping that there is some simple something that I have missed in my reading. FYI, I am developing on XAMPP version 1.7.3 which has Apache 2.2.14, MySQL 5.1.41 and PHP 5.3.1. Thanks in advance. This is my first time posting but I have gleaned alot of knowledge from this site in the past.

    Read the article

  • Parse error: syntax error, unexpected T_STRING in...

    - by rabidmachine9
    I' making this class to catch twitter posts but I get the error : Parse error: syntax error, unexpected T_STRING in /Applications/XAMPP/xamppfiles/htdocs/classTest/Twitter.php on line 29 I cant find what's wrong...any ideas? class TwitterGrub{ function twitterCapture($user = 'myUsername',$password = 'myPass') { $ch = curl_init("https://twitter.com/statuses/user_timeline.xml"); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch,CURLOPT_TIMEOUT, 30); curl_setopt($ch,CURLOPT_USERPWD,$user . ":" . $password); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); $result=curl_exec ($ch); $data = strstr($result, '<?'); $xml = new SimpleXMLElement($data); return $xml; } function twitterDisplay($twitNum){ $xml = this->twitterCapture(); for($i= 0; $i<$twitNum; $i++){ echo "<div class='curvebox'>".$xml->status[$i]->text."</div>"; } } }

    Read the article

  • Javascript: How to test JSONP on localhost

    - by hqt
    Here is the way I test JSONP: I run XAMPP, and in folder htdocs I create a javascript folder . I create json1.json file contain some data to process. After that, I run this html file locally, and it will call a function in "other machine" (in this case is localhost) Here is my code : <head> <script> function updateSales(sales) { alert('test jsonp'); // real code here } </script> </head> <body> <h1>JSONP Example</h1> <script src="http://localhost:85/javascript/json1.json?callback=updateSales"></script> </body> But when I run, nothing happen. But if change to other real json on the internet, it will work. It means change line : <script src="http://localhost:85/javascript/json1.json?callback=updateSales"></script> to line: <script src="http://gumball.wickedlysmart.com/?callback=updateSales"></script> It will work smoothly. So, I don't know how to test JSONP by using localhost, please help me. Thanks :)

    Read the article

  • php error reporting - having trouble matching local & web server settings

    - by Andrew Heath
    I'm trying to add a custom error handler to my site, but in doing so have discovered that my webhost's PHP error reporting settings and those of my localhost (default XAMPP) vary considerably. While I thought I was programming to E_STRICT like a good little boy, adding the error handler to my webhost revealed craploads of Runtime Notices. Example: Runtime notice strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CST/-6.0/no DST' instead In /home/... Clearly this isn't a red-alert, showstopping error. But what bothers me is that it doesn't show up on my localhost. I'd certainly like to improve my code by addressing these sorts of issues if I could see them! I've looked through both php.ini files, and my webhost's setting is error_reporting = E_ALL & ~E_NOTICE whereas mine was error_reporting = E_STRICT, which I had thought was better. However, changing mine to match and rebooting the server doesn't seem to have accomplished anything. Could someone please point me in the right direction?

    Read the article

  • Passing jquery JSON from Codeigniter controller to view

    - by dede
    I've been struggling to make it work, but cannot pass the inserted data from the controler to the view in CI using JSON. The input value from the form is successfully inserted into the database, but cannot make it appear in the view. This is my view file ajax_view.php: <script type="text/javascript" src="<?php echo base_url(); ?>js/jquery-1.4.2.min.js"></script> $(document).ready(function(){ $("#submit").click(function(){ var inp = $('#inp').val(); $.post("ajax/ajax_input", { 'send' : inp }, function(data){ alert(data.input_text); }, "json"); }); }); </script> </head> <body> <form id="form1" method="post" action=""> <label for="inp">Text</label> <input type="text" name="inp" id="inp" /> <label for="submit"></label> <input type="submit" name="submit" id="submit" value="Submit" /> And this is the ajax_input method of the ajax.php controller: <?php // Initializing controller ..... // ............................. //ajax method function ajax_input(){ $var_1 = trim($this->input->post('send')); $array = array('input_text' => $var_1); echo json_encode($array); $this->db->insert('ajax',$array); } Trying to debug it with Firebug, it gives me that data.input_text is empty. What am I doing wrong? EDIT: I'm using XAMPP on Win, so is it posible that json configuration is the problem?

    Read the article

  • php: autoload exception handling.

    - by YuriKolovsky
    Hello again, I'm extending my previous question (Handling exceptions within exception handle) to address my bad coding practice. I'm trying to delegate autoload errors to a exception handler. <?php function __autoload($class_name) { $file = $class_name.'.php'; try { if (file_exists($file)) { include $file; }else{ throw new loadException("File $file is missing"); } if(!class_exists($class_name,false)){ throw new loadException("Class $class_name missing in $file"); } }catch(loadException $e){ header("HTTP/1.0 500 Internal Server Error"); $e->loadErrorPage('500'); exit; } return true; } class loadException extends Exception { public function __toString() { return get_class($this) . " in {$this->file}({$this->line})".PHP_EOL ."'{$this->message}'".PHP_EOL . "{$this->getTraceAsString()}"; } public function loadErrorPage($code){ try { $page = new pageClass(); echo $page->showPage($code); }catch(Exception $e){ echo 'fatal error: ', $code; } } } $test = new testClass(); ?> the above script is supposed to load a 404 page if the testClass.php file is missing, and it works fine, UNLESS the pageClass.php file is missing as well, in which case I see a "Fatal error: Class 'pageClass' not found in D:\xampp\htdocs\Test\PHP\errorhandle\index.php on line 29" instead of the "fatal error: 500" message I do not want to add a try/catch block to each and every class autoload (object creation), so i tried this. What is the proper way of handling this?

    Read the article

  • Jquery Apache - IE problem

    - by Soldierflup
    I'm having a button tag on my page with a value. <button class='btn' value='value'>show value</button> I have this jquery code : $('.btn').click(function() { var w = 'value = '+$(this).val()+' / text = '+$(this).html(); alert(w); }); In FF, no problem the result is ok (display: value = value / text = show value). The problem comes with IE8 which displays a different results from my testing server and the production server. The testing server is my local machine with a standard XAMPP installation. The productionserver is a server based on linux with apache, php and mysql. Result from the testing server is ok (display like FF), the result from the production server is not good (displaying : value = show value / text : show value). Anyone an idea if it is apache that causes the error ? I know there are some issues with the use of val() because IE is considering it as an attribute and not a value. The problem is that changing the jQuery from val() to attr('value') is quit a lot of work (this implementation is already on a lot of pages) and I think it could be much easier to change something on the webserver.

    Read the article

  • youtube video downloaed succesfully on local, but on server(online) only 0 byte flv is downloading

    - by I Like PHP
    i m using php tube class to download youtube video. Video is automatically downloaded in a folder by submitting youtube video url. everything is working fine on local (XAMPP), but when i upload this to server(online), THEN ONLY 0 byte flv file is saved. i also debug the code both side( local and global ). i get the url like this( on local) http://www.youtube.com/get_video?video_id=1jNWCFwqPvM&=vjVQa1PpcFMyYCECyfmYENWklpwXGyhVgJpSFPgNAEc%3D whereas on server i got link like this http://www.youtube.com/ get_video?video_id=1jNWCFwqPvM&t=vjVQa1PpcFNS3SPxIXi8hy-NF4qZFFrScDXCjGLLrLc%3D when i copy the link getting from local and paste on browser then a download box appear on browser, whereas when i copy the link getting from server and paste on browser then only a blank page appears please solve my problem, where is the error??? how to know that pear is installed or not on server? on server side sometimes i get link like http://www.youtube.com/get_video?video_id=1jNWCFwqPvM&t=vjVQa1PpcFNS3SPxIXi8hy-NF4qZFFrScDXCjGLLrLc%3D but sometimes i get only http://www.youtube.com/get_video?video_id=&t= please guide me how to solve these? Thanks in advance to all my seniors

    Read the article

  • problem with joomla, php and json

    - by sebastian
    hi, i have a problem with a joomla component. i'm, unsing php and json for some dynamic drop down boxes. here is the code:` jQuery( function () { //jQuery.ajaxSetup({error : function (a,b) {console.dir(a); console.dir(b);}}); jQuery("#util, #loc").change( function() { var locatie = jQuery("#loc").val(); var utilitate = jQuery("#util").val(); if ( (locatie!= '---') && (utilitate!='---') ) jQuery.getJSON( "index.php?option=com_calculator&opt=json_contor&format=raw", { locatie: locatie, utilitate: utilitate }, function (data) { var html = ""; if ( data.success == 'ok' ) for (var i in data.val) html += "<option name=den_contor value ='"+ i+"' >" + data.val[i]+ " </option>"; jQuery("#den_contor").html( html ) } ) }) }); the query works, but only on one PC. we have exactly the same xampp server, exactly the same files. on one pc it works, and on a online server and on my pc it doesn't. EDIT: i have three drop down boxes, the first is populated directly from the database, the second has 4 predefined values. and the third is populated depending on combination of the first two. i have a test site online. http://contor.redxart.com must be logged in to use Calculator in the menu. you can make an new account :) "Adaugare Index" is the part that isn't working any ideas? thanks, sebastian

    Read the article

  • Database class is not correctly connecting to my database.

    - by blerh
    I'm just venturing into the world of OOP so forgive me if this is a n00bish question. This is what I have on index.php: $dbObj = new Database(); $rsObj = new RS($dbObj); This is the Database class: class Database { private $dbHost; private $dbUser; private $dbPasswd; private $dbName; private $sqlCount; function __construct() { $this->dbHost = 'localhost'; $this->dbUser = 'root'; $this->dbPasswd = ''; $this->dbName = 'whatever'; $this->sqlCount = 0; } function connect() { $this->link = mysql_connect($this->db_host, $this->db_user, $this->db_passwd); if(!$this->link) $this->error(mysql_error()); $this->selection = mysql_select_db($this->db_name, $this->link); if(!$this->selection) $this->error(mysql_error()); } } I've shortened it to just the connect() method to simplify things. This is the RS class: class RS { private $username; private $password; function __construct($dbObj) { // We need to get an account from the db $dbObj->connect(); } } As you can probably see, I need to access and use the database class in my RS class. But I get this error when I load the page: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\includes\database.class.php on line 22 The thing is I have NO idea where it got the idea that it needs to use ODBC as a user... I've read up on doing this stuff and from what I can gather I am doing it correctly. Could anyone lend me a hand? Thank you.

    Read the article

  • Apache crashes, probably because of this piece of php code. Can you have a look?

    - by Munim
    I am working on the development of a web based application on codeigniter. I wrote this function to get the timezone data for any city or address. function gettimezone($address) { $_url = 'http://api.local.yahoo.com/MapsService/V1/geocode'; $_url .= sprintf('?appid=%s&location=%s',"phpclasses",rawurlencode($address)); $_result = false; if($_result = file_get_contents($_url)) { preg_match('!<Latitude>(.*)</Latitude><Longitude>(.*)</Longitude>!U', $_result, $_match); $lng = $_match[2]; $lat = $_match[1]; $url = "http://ws.geonames.org/timezone?lat={$lat}&lng={$lng}"; $timedata = file_get_contents($url); $sxml = simplexml_load_string($timedata); return $sxml->timezone; } else return false; } I am working on Windows 7 and xampp 1.7 (php 5.2.8). Is there any possible scenario where this piece of code would crash Apache? The application runs fine almost everytime, but I think running this piece of code when there is no internet connectivity or very poor internet connectivity (thereby no access to either of the webservices I have used) brings down the server. Something like this happened a few times and I think it was due to loss of internet connectivity but I am not sure what exactly is going on. [ By the way, feel free to use this piece of code. Makes 2 web service calls so don't use to too often in your application. Consider storing the results in a database.]

    Read the article

  • odd url, and difficulty in following the php page flow

    - by sdfor
    I'm trying to understand code that I bought so I can modify it. In the index.php there are picture links: <a href="test10,10"><img title="" border=1 src="makethumb.php?pic=product_images/test101.jpg&amp;w=121&amp;sq=N" / ></a> I don't understand the href since it is not pointing to a page. test10 is an id of a picture. I assumed it was going back to the index.php and the code would extract the test10,10 from the url, but it's not. I know that because I put in trace code as the first line. The question is, where is the link going to? I know it that it somewhere in the process it executes a page called profile.php, but nowhere in the source code (doing a global search) is there an explicit call to profile.php. As a related question, is there a way to profile the code to see what pages it's calling without using xdebug, which for the life of me I can't get working after many hours of trying every suggestion I found here and else where. (I'm using xampp) thanks

    Read the article

  • Codeigniter .htaccess not working in subdirectory

    - by xzdead
    I have this codeingniter project structure webRoot | |/application | | | |/controllers | | | |/admin | |/public | | | |/admin | | | | | |/css | | |/img | |/css | |/img And this is my .htacess file, located in /public. I use this in every local project running xampp: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> <IfModule !mod_rewrite.c> # If we don't have mod_rewrite installed, all 404's # can be sent to index.php, and everything works as normal. # Submitted by: ElliotHaughin ErrorDocument 404 /index.php </IfModule> It works fine in localhost, but doesn't work in a dreamhost server. I always get "no input file specified". So after searching the web and trying lots of combinations, the best I got is this .htaccess file: Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] With this one, if I go to http://development.mydomain.com - I see the codeigniter welcome page But if I go to: http://development.mydomain.com/admin - I see the directory listing of /public/admin and doesn't execute the controller in /application/controllers/admin Again, if I go to: http://development.mydomain.com/admin/admin - I see the private area, it executes the controller and goes to the default controller defined in routes, "dashboard" This works fine too: http://development.mydomain.com/admin/dashboard I have set in my config file: $config['index_page'] = ''; $config['base_url'] = ''; $config['uri_protocol'] = 'AUTO'; I think that whatever is wrong in my .htaccess is causing other path issues I have with my project. Any help would be great. Thanks to all in advance EDIT: I removed this line: RewriteCond %{REQUEST_FILENAME} !-d because admin directory exists, that's why I see the public directory listing. But now I see the codeigniter welcome page when I go to http://development.mydomain.com/admin So now my .htaccess file looks like: Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] #RewriteRule ^(.*)$ /index.php?/$1 [L] I also tried with the commented RewriteRule but I get the same result.

    Read the article

  • Why doesn't this short php script send email?

    - by RoryG
    I can't seem to get my php script to send email. <?php echo "Does this page work?"; mail('my email address', 'test subject', 'test message'); ?> First, I have set the mail function settings in the php.ini file as follows: I checked my email account settings on outlook. It does not require authentication, its port is 25, and its type of encrypted connection is 'Auto'. Given this I configured my php.ini file accordingly: SMTP = ssl://smtp1.iis.com smtp_port = 25 Then I set: sendmail_from: my email address The echo statement prints out in the browser, so I know the php file is recognized and processed. But the browser also shows the following error: Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\mailtest.php on line 3 I have clearly set the sendmail_from so I don't know what else to do. I have also tried removing the 'ssl://' part from the SMTP setting in the php.ini file, and configuring the php5.ini file. Which of these .ini files should I be configuring anyways?

    Read the article

  • CSS3 Border Radius property doesn't work in localhost?

    - by user547969
    I'm having a very strange problem with css3 border radius property. My following CSS and html works fine with IE9 if i double click the file and open with the IE9 , however if the border property does not work in IE if i open the file through LOCALHOST (xampp insatlled on windows 7). The same file works fine on localhost with other browsers. How can i fix it? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <style media="all" type="text/css">@import "circle.css";</style> </head> <body> <div class="exampleborderradiusf">F</div> </body> </html> and the CSS is: .exampleborderradiusf { float:left; background-color: #464646; margin-top: 20px; margin-right: 40px; width: 70px; height: 70px; text-align: center; -moz-border-radius: 35px; border-radius: 35px; color: white; font-size: 20px; position: relative; top: 20px; } Thanks for the help.

    Read the article

  • Having trouble uploading a file

    - by neo skosana
    Hi I am having trouble uploading a file. First of all I have a class: class upload { private $name; private $document; public function __construct($nme,$doc) { $this->setName($nme); $this->setDocument($doc); } public function setName($nme) { $this->name = $nme; } public function setDocument($doc) { $this->document = $doc; } public function fileNotPdf() { /* Was the file a PDF? */ if ($this->document['type'] != "application/pdf") { return true; } else { return false; } } public function fileNotUploaded() { /* Make sure that the file was POSTed. */ if (!(is_uploaded_file($this->document['tmp_name']))) { return true; } else { return false; } } public function fileNotMoved($repositry) { /* move uploaded file to final destination. */ $result = move_uploaded_file($this->document['tmp_name'], "$repositry/$this->name.pdf"); if($result) { return false; } else { return true; } } } Now for my main page: $docName = $_POST['name']; $page = $_FILES['doc']; if($_POST['submit']) { /* Set a few constants */ $filerepository = "np"; $uploadObj = new upload($docName, $page); if($uploadObj->fileNotUploaded()) { promptUser("There was a problem uploading the file.",""); } elseif($uploadObj->fileNotPdf()) { promptUser("File must be in pdf format.",""); } elseif($uploadObj->fileNotMoved($filerepository)) { promptUser("File could not be uploaded to final destination.",""); } else { promptUser("File has been successfully uploaded.",""); } } The errors that I get: Warning: move_uploaded_file(about.pdf)[function.move-uploaded-file]: failed to open stream: No such file or directory in... Warning: move_uploaded_file()[function.move-uploaded-file]: Unable to move 'c:\xampp\tmp\php13.tmp' to 'about.pdf' in... File could not be uploaded to final destination.

    Read the article

  • Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in

    - by user1493540
    <html> <title>Title</title> <body> <link type="text/css" rel="stylesheet" href="css/bootstrap.css"/> </body> <center> <? mysql_connect ("localhost", "root","") or die (mysql_error()); mysql_select_db ("dbname"); $term = $_POST['term']; $sql = mysql_query("select * from items where name like '%$term%'"); while ($row = mysql_fetch_array($sql)){ echo '<table class="table - striped"> <theader> <tr> <th>ID</th> <th></br> Name</th></tr>'; echo ' <tbody><td>'.$row['id']; echo'</td>'; echo '<td>'; echo '</theader>' .$row['name']; echo '</td>'; echo ''; } ?> </center> <script src="js/bootsrap.js"> </script> </html> I'm, getting this error: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/runedev1/public_html/itemdb/search.php on line 19 When I run the code on localhost using Xampp, it works fine, when I upload it to the web-host, the error appears. Yes, I am changing the database name, user and password when putting it on the webhost.

    Read the article

  • opening word document contailning macros using textarea

    - by avani-nature
    Hai frnds i am avani here,actually 1.i amhaving one word document which contains macros i wann to open it in textarea.. 2.i am able to open the word document which is not containing macros 3.i am not able to open the document which contains macros 4.i am using below code 5.please do help me anyone i am thinking its some what impossible { //echo $aud; $filename = 'C:/xampp/htdocs/mts/sites/default/files/a.doc'; //echo $filename; if(isset($_REQUEST['Save'])){ $somecontent = stripslashes($_POST['somecontent']); // Let's make sure the file exists and is writable first. if (is_writable($filename)) { // In our example we're opening $filename in append mode. // The file pointer is at the bottom of the file hence // that's where $somecontent will go when we fwrite() it. if (!$handle = fopen($filename, 'w')) { echo "Cannot open file ($filename)"; exit; } // Write $somecontent to our opened file. if (fwrite($handle, $somecontent) === FALSE) { echo "Cannot write to file ($filename)"; exit; } echo "Success, wrote ($somecontent) to file ($filename) - Continue - "; fclose($handle); } else { echo "The file $filename is not writable"; } } else{ // get contents of a file into a string $handle = fopen($filename, "r"); $somecontent = fread($handle, filesize($filename)); $word = new COM("word.application") or die ("Could not initialise MS Word object."); $word-Documents-Open(realpath("$filename")); // Extract content. $somecontent = (string) $word-ActiveDocument-Content; //echo $somecontent; $word-ActiveDocument-Close(false); $word-Quit(); $word = null; unset($word); fclose($handle); } ? Edit file -------- ?

    Read the article

< Previous Page | 22 23 24 25 26 27 28  | Next Page >