Search Results

Search found 31657 results on 1267 pages for 'php'.

Page 27/1267 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • Enabling/disabling proftpd accounts with PHP and WHM

    - by Brett G
    I have a VPS with WHM/CPanel which is being used just by me. It's utilizing proftpd. I'd like to, via a PHP script, disable/enable a specific FTP account. I've done this by having PHP call a bash script which removes/adds the user account line to /etc/proftpd/USERNAME password file. However, in order to do this I have to give other write rights to /etc/proftpd/USERNAME. This isn't ideal, and I'd be willing to do it another way. It also seems like WHM is automatically resetting these permissions on a regular basis. Does anybody have any ideas on a better way to deal with this?

    Read the article

  • php application deployment to redhat [closed]

    - by Subhash Dike
    I am a .net background person with most of the work with Windows environment and IIS etc. I have been given a task to deploy one php application on RedHat Linux box. All I have is the credentials and the server IP of that box. Can someone help about how to get started creating a new website on Apache 2.0 on redhat box and then putting php code over to that. I do not have physical access to that server as well. I know it's very basis question, but I am in dark for these things. Even if you can point me to some documentation that's fine or else at least the analogy with IIS should also help to certain extent.

    Read the article

  • Convert Currencies Dynamically using PHP, Google and cURL [closed]

    - by LizO
    I want to be able to allow users to dynamically change the currency of the products prices in my webstore, right there on the page. For example, 300 USD will change to 221.61 EUR when the user selects Euros from a dropdown. I found a few sites with PHP code for a calculator/input format (user inputs value and converted currency is output.) http://www.chazzuka.com/blog/?p=104 http://www.pixel2life.com/publish/tutorials/1166/currency_conversion_in_php/page-3/ I was hoping someone could help me figure out how to modify the PHP script. Thanks in advance.

    Read the article

  • SEO effects of intermix of WP blog, custom PHP site and FB app game

    - by melbournetechlover
    We're a melbourne tech company in the process of building a custom site in PHP. We plan to launch a "pre-launch" page which is also custom coded (CSS3 on twitter bootstrap framework + HTML5 front end and PHP back end). On that site will be a link to a blog - the idea behind this is to build up ranking for a variety of relevant keywords prior to the full site going live (given the majority of the site is a member only community anyway so the blog is really the main way we'll be able to execute on-site SEO. Ideally, we would like to install wordpress in a subdirectory on our servers and just customise the header to look the same as the landing page of the website. But some questions and concerns... Is there any detrimental effect on SEO efforts in having two separate systems (one custom PHP, the other an installation of wordpress) to manage the blog vs the rest of the site? Are there any benefits or detriments to installing on a sub domain such as blog.sitename.com vs. sitename.com/blog. My preference would be sitename.com/blog as it feels neater - but open to suggestions based on knowledge of Google preferences. Separately, we are building a Facebook app which is under another site name. Again because we are launching this app first, from an SEO perspective, would it actually be better to run it from a sub domain on the main site - e.g. gamename.mainsitename.com instead of on app.gamename.com? Currently we have it on app.gamename.com, but if there are SEO benefits to moving it to the other domain and server then we'll do it. Basically we don't want to have our SEO efforts divided - will Google algorithms prefer two sites heavily referring traffic, or is it better to focus our efforts on one. I guess that's the crux of the issue. But the other one is - does Google care about traffic accessing a page built for the Facebook app iFrame - does that count toward rankings? Sorry I hope these questions aren't too complex - but we're in the tech world every day and still can't seem to find a good answer to these ones...hence I'm taking to the forums!! Free beer for whoever can give me a solid answer!

    Read the article

  • How relevant is PHP today for browser games?

    - by Bitgarden
    I was the lead developer of 2 moderately successful browser games quite a few years back, and plan on working on a new game soon. At the time, I wrote them in pure PHP (no template engine or anything of the sort). I'd like to start working on a new game, but have been out of the web development world for a while. Reading around, I hear a lot of good about Rails, Django, Node.js, etc., with which I have no experience (although I know my way around Python, Javascript, and the others quite well). So my question is the following- if I were to go in my old ways and go with PHP again, would I be making things hard for myself? Would picking something more "trendy" have a real impact on my development? In addition, does anyone have any pointers relating to specifically developing browser games with these more modern tools?

    Read the article

  • Why setter method when getter method enough in PHP OOP

    - by phphunger
    I am practicing OOP with PHP, and I am struck at setter and getter methods. I can directly access the class properties and methods with getter method then what's the use of setter method? See my example. <?php class MyClass{ public $classVar = "Its a class variable"; public function Getter(){ return $this -> classVar; } } $obj = new MyClass; echo $obj -> Getter(); ?>

    Read the article

  • Help with correct php syntax [migrated]

    - by Robert hue
    I was working on some php functions and I got confused with php syntax. Here is the function. Is this correct? to use add_filter inside function_exists check if ( ! function_exists( 'disable_password_reset' ) ) : function disable_password_reset() { return false; } add_filter ( 'allow_password_reset', 'disable_password_reset' ); endif; or this one is correct, to use add_filter outside function_exists check if ( ! function_exists( 'disable_password_reset' ) ) : function disable_password_reset() { return false; } endif; add_filter ( 'allow_password_reset', 'disable_password_reset' ); I was working on Wordpress if that matters.

    Read the article

  • Looking for PHP/MySQL-based ad manager

    - by user359650
    Could you recommend based on your experience a PHP/MySQL-based admin interface for managing your website ads? In order to be really useful, such application should have: -basic CRM functionality to track who is providing the ads -multilingual multi country support: have the ability to specify for the same ad, different versions for multiple languages/countries -predefined ad formats (google Ads, flash ads...) and sizes with corresponding PHP helpers so as to insert in the HTML code the necessary markup to properly integrate the ad. Ideally if that application could be desgined for Zend Framework that would be awesome (but I think I'm dreaming at this point).

    Read the article

  • A roadmap to learn PHP efficiently

    - by Goma
    I have been always confused when I want to start learning PHP. I got afraid of learning any bad habbits or things that could lead to unsecure applications. If you can help and hope you can, I would like to ask you experts in PHP to help me and put a roadmap for me from the beginning. It would be better if it is a series of books so when I finish a book I go to the next or a series of videos or whatever. No worries about how much the books may cost, most importantly that I will learn the right things. Thanks.

    Read the article

  • Hotel Reservation Request Booking Paypal PHP

    - by Robert
    I'm making a website for a small hotel in php. The hotel owners want a reservation system that uses paypal. They want people to see a calendar and choose a date to make a reservation. If the day has vacancy, they want the user to request booking a room. This would then require the hotel owner to accept the purchase. I have not worked on a project that has this "request to purchase" method of buying with paypal. Is this possible? Does anyone know of an open php system that handles this? THANKS :)

    Read the article

  • Using static in PHP

    - by nischayn22
    I have a few functions in PHP that read data from functions in a class readUsername(int userId){ $reader = getReader(); return $reader->getname(userId); } readUserAddress(){ $reader = getReader(); return $reader->getaddress(userId); } All these make a call to getReader() { require_once("Reader.php"); static $reader = new Reader(); return $reader; } An overview of Reader class Reader{ getname(int id) { //if in-memory cache exists for this id return that //else get from db and cache it } getaddress(int id) { $this->getname(int id); //get address from name here } /*Other stuff*/ } Why is class Reader needed The Reader class does some in-memory caching of user details. So, I need only one object of class Reader and it will cache the user details instead of making multiple db calls. I am using static so that it the object gets created only once. Is this the right approach or should I do something else?

    Read the article

  • Calling a parameterized javascript function from php [migrated]

    - by Ginger
    I need to call a javascript function from php, by passing a value in php variable. My code goes like this: echo '<tr class="trlight"><td onclick="callVehicle('.$qry_vehicleid.');"><label>Call Vehicle</label>&nbsp;</td></tr>'; And in javascript file I try to execute the following code: function callVehicle(vid) { alert('Call '+vid); document.getElementById("SearchResult").style.visibility="hidden"; } and an error test is not defined occurs. test is the value that I assigned to variable $qry_vehicleid. Can someone please point out what the mistake is?

    Read the article

  • Webmatrix fails to connect PHP website to MySQL

    - by Roni
    I downloaded the latest versions of Webmatrix and MySQL. I downloaded a PHP-MySQL Connector: http://dev.mysql.com/downloads/connector/php-mysqlnd/ In the "Databases" Workspace I pressed "New Connection" button and choose "MySQL Connection" In the Dialog box I filled-in all connection details -- It looks like the database was added. But then when I double-click on the database, I get a short error message saying it cannot connect. I tried everything, searched the web... I'm sure it's a very simple question, so please whoever can help I'll be grateful. I think best solution for me would be if someone could please just give me a link to download of: Webmatrix,MySQL,Connector; and instructions on how to install and then how to connect. This would be the safest way to help me.

    Read the article

  • Learning PHP MySQL [closed]

    - by Keith Groben
    I've been a designer for several year now. I'm now very interested in learning PHP, MySQL. I've read through W3Schools already and it helped me become familiar. I now want to know where I could go to start building some simple database and php applications so I could be come familiar with coding and start to improve. I think hands on application is the best way to learn. Since I'm a beginner, much of what I've found so far is sort of advanced to me.

    Read the article

  • Problems using PHP on a Plesk Windows dedicated server

    - by wpsmdouble
    I'm having a few issues with my dedicated Windows server that has a Plesk panel: 1.) I can't send e-mail via PHP's mail() function, it always returns the following error: SMTP server response: 550 Requested action not taken: mailbox unavailable or not local Which setting should I alter in order to enable sending mail? 2.) The exec() and passthru() PHP functions don't work; their outputs are blank even when I try to run simple commands such as dir. Is there an option that I can toggle in the control panel to enable this functionality?

    Read the article

  • Hosting a Small PHP/MySQL Project [closed]

    - by paulrehkugler
    I have a small PHP/MySQL project in the works and I'm looking for somewhere to host it. My criteria are: Ability to run PHP/MySQL (either natively, or contains the ability to install). Ability to manipulate the web server, so I can make pretty URLs. Not spammy (if you've ever looked for hosting, you know what I mean). Semi-professional - no ridiculous downtime or long response time. I obviously don't need anything spectacular (I'm not aiming to be the next Facebook) but something that doesn't seem cheap. Reasonably priced - obviously this is a side project for fun so I'm not planning on making or dispensing any sort of "serious" revenue.

    Read the article

  • When/how to use Node with PHP or Ruby [closed]

    - by mbuurman
    For fun, I am creating a sort of microblogging webapp where people can comment on certain things. The basic "What is your opinion on this?" should be easy doable with just PHP (input the data in the database). Along with that I want to create a statistics page, also easy doable with PHP. But what if I want to update that page in realtime? How would I integrate Node on that page? Or shouldn't I use Node for that? When would you use Node?

    Read the article

  • Handle php out of memory error

    - by PeterMmm
    I have a Drupal based web site on a relative small vserver (512MB RAM). Recently the website begins to return php out of memory messages like this: Fatal error: Out of memory (allocated 17039360) (tried to allocate 77824 bytes) in /home/... All php.ini memory limit parameters are set to off (-1). Propably the website has gained of complexity, content, etc. But I cannot interpret fine that message: Does that mean that the whole request has allocated 17MB(?) right now and cannot get 7MB(?) more from the OS. Has the web server spend all memory or has the OS no more memory to allocate ? I'm not shure if the memory overhead is coming from the web server or another service, because when I get the out-of-memoy message I can't get into the server with ssh. After a while all runs fine again.

    Read the article

  • Start of Career: with Java or PHP [closed]

    - by Anusha
    I am very new to this programming career. I am now doing job on PHP & MySQL (joined before 6 months) and working on e-commerce project. Simultaneously I am learning JAVA also just completed Adv. Java. I can code on both. I am good at SQL, Oracle and MySQL also. My Question is Where do I set my career on PHP or JAVA? Which has more scope and future security? Or also is there any job profile which includes both, if yes then is that good to work on both? I am confused a lot on this, please help me..

    Read the article

  • How much will be difference between building php sites with SVN and not using it

    - by user1315279
    I have been developing PHP sites for about 5 years but never used SVN. But i am going to start in new company and they use SVN. Tomorrow is my first day. I want to know that how site developement differes with SVN. WITHOUT SVN I make test account on Linux server via cpanel I make database tables Put all files in /home/user/public_html and i use PHP designer as IDE to edit files and i can see the results on test.mydomain.com I just want to know how much will be the difference with SVN. I mean what will be the steps

    Read the article

  • Would I benefit changing from PHP to Node.js (in context)

    - by danneth
    The situation: We are about to roll out what is essentially a logging service. As we are rather PHP heavy, the current implementation use it. We will have about 200 computers (most on the same network) that will each send, via HTTP POST, around 5000 requests/day. With each request containing about 300 bytes of data. The receiving end is hosted at Amazon and is a very simple PHP form with some simple validation that puts everything in a database. Now, I've recently been introduced to Node.js and I'm curious as to if it would be a good fit for the backend here. Granted I could easily build something to test this. But since I haven't fully grasped the async-methology I would really like someone with experience to explain it to me.

    Read the article

  • Image sharing from mysite to facebook profile using php

    - by Stalin
    Good morning.Myself stalin. am a php developer.am new to facebook integration. My requirement is, I need to share the images from mysite to facebook user profiles. ie, i have a page that list the images in mysite. if i click any one image , i need facebook login pop-up from ther i have to enter username ans password after clicking the login button my clicked images have to be post in user's album using php and facebook api. this is my urgent requirement. need help from your side. Thanks.

    Read the article

  • Exclude PHP from output from WYSIWYG in CMS

    - by bytewalls
    I'm writing a basic CMS for one of my sites and have run into an issue where some pages need to dynamically serve PHP and JS, where as others are plain HTMl. I want there to be a setting which will allow this for the pages that need it and will load ACE editor instead of a different wysiwyg editor. The challenge here is that on the pages which I do not explicitly tell it there will be code, I want to reject any inputs that code. I can set it up to insert a for all pages without JS, but how can I keep php code from running?

    Read the article

  • PHP/Java bridge problem

    - by Jack
    I am using tomcat 6 on windows. Here is the code I am testing. import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.StringReader; import javax.script.Invocable; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; /** * Create and run THREAD_COUNT PHP threads, concurrently accessing a * shared resource. * * Create 5 script engines, passing each a shared resource allocated * from Java. Each script engine has to implement Runnable. * * Java accesses the Runnable script engine using * scriptEngine.getInterface() and calls thread.start() to invoke each * PHP Runnable implementations concurrently. */ class PhpThreads { public static final String runnable = new String("<?php\n" + "function run() {\n" + " $out = java_context()->getAttribute('sharedResource', 100);\n" + " $nr = (string)java_context()->getAttribute('nr', 100);\n" + " echo \"started thread: $nr\n\";\n" + " for($i=0; $i<100; $i++) {\n" + " $out->write(ord($nr));\n" + " java('java.lang.Thread')->sleep(1);\n" + " }\n" + "}\n" + "?>\n"); static final int THREAD_COUNT = 5; public static void main(String[] args) throws Exception { ScriptEngineManager manager = new ScriptEngineManager(); Thread threads[] = new Thread[THREAD_COUNT]; ScriptEngine engines[] = new ScriptEngine[THREAD_COUNT]; ByteArrayOutputStream sharedResource = new ByteArrayOutputStream(); StringReader runnableReader = new StringReader(runnable); // create THREAD_COUNT PHP threads for (int i=0; i<THREAD_COUNT; i++) { engines[i] = manager.getEngineByName("php-invocable"); if (engines[i] == null) throw new NullPointerException ("php script engine not found"); engines[i].put("nr", new Integer(i+1)); engines[i].put("sharedResource", sharedResource); engines[i].eval(runnableReader); runnableReader.reset(); // cast the whole script to Runnable; note also getInterface(specificClosure, type) Runnable r = (Runnable) ((Invocable)engines[i]).getInterface(Runnable.class); threads[i] = new Thread(r); } // run the THREAD_COUNT PHP threads for (int i=0; i<THREAD_COUNT; i++) { threads[i].start(); } // wait for the THREAD_COUNT PHP threads to finish for (int i=0; i<THREAD_COUNT; i++) { threads[i].join(); ((Closeable)engines[i]).close(); } // print the output generated by the THREAD_COUNT concurrent threads String result = sharedResource.toString(); System.out.println(result); // Check result Object res=manager.getEngineByName("php").eval( "<?php " + "exit((int)('10011002100310041005'!=" + "@system(\"echo -n "+result+"|sed 's/./&\\\n/g'|sort|uniq -c|tr -d ' \\\n'\")));" + "?>"); System.exit(((Number)res).intValue()); } } I have added all the libraries. When I run the file I get the following error - run: Exception in thread "main" javax.script.ScriptException: java.io.IOException: Cannot run program "php-cgi": CreateProcess error=2, The system cannot find the file specified at php.java.script.InvocablePhpScriptEngine.eval(InvocablePhpScriptEngine.java:209) at php.java.script.SimplePhpScriptEngine.eval(SimplePhpScriptEngine.java:178) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:232) at PhpThreads.main(NewClass.java:53) Caused by: java.io.IOException: Cannot run program "php-cgi": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(ProcessBuilder.java:459) at java.lang.Runtime.exec(Runtime.java:593) at php.java.bridge.Util$Process.start(Util.java:1064) at php.java.bridge.Util$ProcessWithErrorHandler.start(Util.java:1166) at php.java.bridge.Util$ProcessWithErrorHandler.start(Util.java:1217) at php.java.script.CGIRunner.doRun(CGIRunner.java:126) at php.java.script.HttpProxy.doRun(HttpProxy.java:63) at php.java.script.CGIRunner.run(CGIRunner.java:111) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(ProcessImpl.java:81) at java.lang.ProcessImpl.start(ProcessImpl.java:30) at java.lang.ProcessBuilder.start(ProcessBuilder.java:452) ... 8 more What am I missing?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >