Tag Info

New answers tagged

1

The problem is you want php to read input from a file descriptor, but you force it to read like regular file. First, try this: $ echo <(ls) /dev/fd/63 then you can process ls output by reading /dev/fd/63. The process substitution will return the file descriptor, which is use by other command to reading its output. In your case, you use ...


2

You are missing --html-extension flag. I would suggest using this syntax instead: wget \ --recursive \ --no-clobber \ --page-requisites \ --html-extension \ --convert-links \ --restrict-file-names=windows \ --domains website.org \ --no-parent \ www.website.org


3

What could be causing this problem? Have you checked that the actual site always returns documents with an extension? There is no protocol which requires this and it is completely normal to not use them; the document type is determined by the http headers and not any suffix on the address. Of course, your file browser does use file extensions to ...


3

Built-in Webserver If your goal is to learn PHP I highly recommend you use PHP's built in webserver, available on PHP version 5.4 and up. cd ~/mywebsite php -S localhost:8080 You now have a webserver, tied to the ~/mywebsite directory, and accessible in the browser at http://localhost:8080 This all runs in user mode so you don't need to sudo ...


1

All you need is printf. It's the print function - that's its job. printf '%s\t%s\n' ${array[@]} You do it like this: ( set -- 12345 56789 98765; for i ; do eval set -- $(printf '"$%s" ' `seq 2 $#` 1) echo "$*" done ) OUTPUT 56789 98765 12345 98765 12345 56789 12345 56789 98765 I didn't need eval - that was dumb. Here's a better one: ( set ...


1

I found out the way to print the elements in 2 element sized combinations. The php code is as below. <?php function pc_array_power_set($array) { // initialize by adding the empty set $results = array(array( )); foreach ($array as $element) foreach ($results as $combination) array_push($results, ...


0

Ok, instead of the method you mentioned at first try this: First, make sure you have deb-src entries in your sources.list file and you have run apt-get update. It will make the steps below easier. Now install building tools: sudo apt-get install devscripts install your build dependencies: sudo apt-get build-dep php5 Get the sources of php5: apt-get ...


1

There are several alternatives here: Add the --prefix=/usr/local to the configure script (assuming this is what PHP uses) or otherwise ensure that your PHP is installed to /usr/local. This would mean that you would have your own build of PHP installed alongside the system one. Since, for example, /usr/local/bin takes precedence over /usr/bin in PATH, your ...


0

Actually Docker doesn't do any virtualization, it's just a tool that handles images and uses LXC container virtualization to run them. I guess you're actually looking for LXC and its capabilities, here. LXC can do virtual networking and MySQL can be accessed over the network. The only thing you need is to connect the building blocks together ;). In a ...


1

If you enable mod_status and turn on ExtendedStatus, it will display the request being handled by each worker.


1

First of all I am not sure if you can do that with normal php but you can use php-fpm to show you a status page in this link you can see how to do it: https://rtcamp.com/tutorials/php/fpm-status-page/ Second you can enable slowlog in php-fpm with this you can see which script are running so slowly. here's an exaple to how to do it: ...


0

Background: There is a licensing conflict with Linux distributions over a clause in Crockford's license which states: The Software shall be used for Good, not Evil. This does not agree with the Free Software Foundation’s (FSF) freedom 0: The freedom to run the program for any purpose. (source) The solution to it shall be a newly written ...


1

You should really configure nginx with php-fpm. It's easier to install, configure and manage and is as fast. $ apt-get install nginx php5-fpm $ nano /etc/nginx/nginx.conf [...] worker_processes 4; [...] keepalive_timeout 2; [...] $ nano /etc/nginx/sites-available/default [...] server { listen 80; ## listen for ipv4; this line is default and ...


1

Try editing /etc/hosts and add to the localhost line as below: 127.0.0.1 localhost ekb.maydomain.com In other words, add ekb.maydomain.com to whichever line begins 127.0.0.1 -- it may not look exactly like this one. The problem is that "www.ekb.maydomain.com" is a real www address and the DNS resolver can't find it. By adding that line to /etc/hosts, ...



Top 50 recent answers are included