PHP5 and Bash combination

Dear Archlinux users,
I have set up LAMP and have used the package "youtube-dl"
Now as simple as it is:# youtube-dl http://www.youtube.com/watch?v=1c0wS26uyWs
Will let you download the video, but since my arch is on a vps, and i would like to give my friends access without SSH or VNC i have to do it with a website.
I have some knowledge about PHP5 and some bash but not this much, how do i execute a command from PHP5 to start youtube-dl, and the input from the youtube url?

The easiest way is to use php's exec function.
Make sure you read the notes.
This should be under Programming & Scripting.

Similar Messages

  • PHP5 and MySQL 5 Compatibility

    I host my websites on a reseller account for a webhost that is about to upgrade their server technology to PHP5 and MySQL 5. Both PHP and MySQL is now at version 4."something." :-) My question is this, I have websites that were built using MX Kollection Pro 3.7.1 and ADDT 1.0. Has anyone came across any compatibility issues with using PHP5 and MySQL 5. At this point, I don't think I will have issues using PHP5 - but not sure. But the MySQL 5 is uncharted territory for me.
    I really don't want to have a website that will not function properly due to the upgrade. I hope someone has come across using those technologies, so let me know if you have had any problems. I exclusively use ADDT for my new websites. MX Kollection is for managing my older websites. I only use the PHP/MySQL combination for my websites.
    Also, to write my database tables, I use PhpMyAdmin to create the tables. It is easy for me to login to my hosting account and use that program to write my tables. I then used Kollection or ADDT to write the scripts as far joining tables and stuff like that.

    Thank you! I have sites hosted on two different accounts. Most on a multi account that allows me to host other domains and a "real" reseller account. Once the reseller account makes the change and everything still looks right, I will then cancel my multi account but not before migrating everything to the reseller account. I was scared that my websites would not work and was at a standstill on what I should do next. Thanks for the info!

  • Problem with ssh and bash-completion

    I and a co-worker are having a weird problem with ssh and bash-completion. We have a local config in .ssh/config with hosts we connect everyday. An example:
    host foo
    hostname foo.org
    user foobar
    host foobar
    hostname foobar.org
    user foobar
    When we try to type
    ssh foo<tab><tab>b<tab>
    the console just freeze and we can't type anything, everything we type is ignored, but after about 30 seconds the host is completed.
    This works a some time ago, so some upgrade make this happen. Anyone can reproduce this?

    quigybo wrote:
    Actually thinking about it, rather than using the semi-dodgy fix posted on the bug tracker, we can just test if the daemon is running since we are not on MacOS X. It is cleaner and 250 ms quicker.
    --- bash_completion.orig 2010-09-14 05:33:22.000000000 +0930
    +++ bash_completion 2010-09-14 05:45:04.000000000 +0930
    @@ -1316,10 +1316,12 @@
    # contains ";", it may mistify the result. But on Gentoo (at least),
    # -k isn't available (even if mentioned in the manpage), so...
    if type avahi-browse >&/dev/null; then
    - COMPREPLY=( "${COMPREPLY[@]}" $( \
    - compgen -P "$prefix$user" -S "$suffix" -W \
    - "$( avahi-browse -cpr _workstation._tcp 2>/dev/null | \
    - awk -F';' '/^=/ { print $7 }' | sort -u )" -- "$cur" ) )
    + if [ -n "$(pidof avahi-daemon)" ]; then
    + COMPREPLY=( "${COMPREPLY[@]}" $( \
    + compgen -P "$prefix$user" -S "$suffix" -W \
    + "$( avahi-browse -cpr _workstation._tcp 2>/dev/null | \
    + awk -F';' '/^=/ { print $7 }' | sort -u )" -- "$cur" ) )
    + fi
    fi
    # Add results of normal hostname completion, unless
    This is the same test as was used in bash-completion 1.1.
    Thanks  quigybo, I use your patch, the issue is gone
    Why does so many packages depends on Avahi? Maybe make it optdepends is
    enough?
    my laptop $ pacman -Qi avahi
    Required By : gnome-disk-utility gnome-vfs libcups mpd sane

  • Can't get conky-cli and bash scripts to both display in dwm statusbar!

    I'm trying to configure my dwm status bar to display some simple information using conky-cli and bash scripts. At first I tried just letting conky run the bash scripts (for network and volume state), but this increased my cpu usage by about 5%, which is significant considering I normally have 1-3% usage when idle. Also, I wanted to keep conky because it makes the display of certain information easy, such as cpu & RAM usage.
    The problem is I'm having trouble getting both to display side by side. Here are the relevant parts of my .xinitrc:
    network(){
    iwconfig wlan0 2>&1 | grep -q no\ wireless\ extensions\. && {
    echo wired
    exit 0
    essid=`iwconfig wlan0 | awk -F '"' '/ESSID/ {print $2}'`
    stngth=`iwconfig wlan0 | awk -F '=' '/Quality/ {print $2}' | cut -d '/' -f 1`
    bars=`expr $stngth / 10`
    case $bars in
    0) bar='[-------]' ;;
    1) bar='[#------]' ;;
    2) bar='[##-----]' ;;
    3) bar='[###----]' ;;
    4) bar='[####---]' ;;
    5) bar='[#####--]' ;;
    6) bar='[######-]' ;;
    7) bar='[#######]' ;;
    *) bar='[--!!!--]' ;;
    esac
    echo $essid$bar
    exit 0
    volume(){
    vol=$(amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "MM" } else { print $2 }}' | head -n 1)
    echo Vol: $vol%
    exit 0
    conky | while true; read line; do xsetroot -name "`$line` `volume` `network` `date '+%a %m-%d-%Y %I:%M%p'`"; done &
    exec dwm
    (let me know if it would help to post any other files)
    For some reason when I run this I only get the network/volume scripts and date running, updating every second (I think). The conky line just doesn't show up. I don't know what could be wrong, since I didn't see any error messages.
    An even better solution would be to just have shell scripts to display CPU and MEM usage. I have a dual-core cpu, cpu0 and cpu1. I'd like to see both percentages if possible, or at least a percentage that is an accurate average of the two or something. In conky-cli I have something that shows:
    cpu0/1: xx% xx%
    Also, seeing RAM usage would help a lot. In conky it shows:
    mem: xx% (xxxMB)
    These are the ways I would like to have bash scripts show them, if possible, but I have zero skill in bash programming. I made this an option in case it's easier/cleaner/less resource hungry than a conky solution. Personally, if they're about the same in these aspects, I would prefer something with conky and the shell scripts because conky is so extensible, yet it's only flaw is executing scripts with minimal resource usage.
    Help?

    Thanks. I was thinking of using load average to save a few characters, but I didn't quite understand the numbers. I'll try that once I get to my Linux box, but could you please explain or post a link to something that explains load average (what's low, high, normal, etc.)?
    EDIT: I found a website that explains loadavg. I now have my dwm status bar displaying it perfectly (yay!). Now I just need to add a few more things like battery status, etc. and I might be done. I'll probably post here if I have more questions, though.
    Thanks for your help!
    Last edited by Allamgir (2009-07-18 14:41:11)

  • User Exit to check whether chapter id for Material and Plant combination is maintained while creating sales order

    Hello all,
    my requirement is, system should give error message while creating sales order, if chapter ID is not maintained for a material and plant combination.
    please suggest the user exit.

    Hi
    CASE 1 : All Plants are excisable.
    In Material master , Foreign Trade data tab-  mentioned Control code field mandatory. ( i.e nothing but Chapter ID)
    CASE 2 : Few Plants are excisable
    In the Case 2 you need to go for Enhancement
    Program Name : MV45AFZB 
    User Exit:            USEREXIT_CHECK_VBAP ( Item Level Check )
    By using above user exit you write a logic with the help of ABAPer
    Plant and Chapter ID combination table : J_1IMTCHID

  • Stock overview based on material and vendor combination

    Hi Gurus,
    I have a scenario, for three materials A , B, C was bought out from 5 vendor,  how to display the stock with material and vendor combination. In client place, the three material (A , B,C) which were bought from same vendor are issued to cost center. Client wants to know the stock based on vendor.
    Thanks in Advance.

    Hi,
    In my opinion you have the following options - basically:
    1) Use different material numbers for the physically same material you procure from different vendors (this is the dummiest solution, not recommended)
    2) MPN (manufacturing part number) - you use different material numbers corresponding to each vendor . But these materials will be lnked:
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/75/ee15c655c811d189900000e8322d00/frameset.htm
    3) Batch management
    option1 - You apply a certain logic to batch numbers and based on batch number you can distinguish from which vendor the stock was procured.
    option2 - You can also use "not speaking" batch number, but here it's more sophisticated to find out from which vendor it was procured
    option3 - You can classify the batch and in one of the characteristics you can store the vendor's number
    option4 - In the batch master (table MCHA) you can find a "vendor" field (MCHA-LIFNR) - using development you can populate this field at the time of GR
    4) Split valuation - you can maintain separate valuation type for each vendor. I think it is recommended only if you want to manage the moving avarage price separately
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/75/ee0d4d55c811d189900000e8322d00/frameset.htm
    Regards,
    Csaba

  • How to use AND and OR Combinations for a Rule in Rule Modeler of ERMS

    Hi Experts,
    When we are defining rules in the Rule Policy, we need to create a condition which uses a combinations of AND and OR.
    But the standard Rule Modeler of ERMS is allowing us to create conditions either using all AND or with all OR options.
    Is there anyway that we can define rules in the Rule Modeler using both AND and OR combinations at the same time.
    Regards,
    NIloufer

    A variant is a very specific LabVIEW datatype (really a C++ type object internally) and trying to pass that to a function, which excepts a flat memory pointer there, for sure will crash very quickly.
    As to endianess, yes Unflatten will be able to adjust for endianess, which in this case however is most likely exectly NOT what you want. So make sure that the you select native type for the endianess input on Unflatten from String. LabVIEW internally works with whatever is the native endianess, as will most likely your C++ DLL. The platform independent big endian format does only come into play when you receive data streams over some streaming interface like a network connection. Here it is desirable to use an endian format that is independent from the actual platform that generates and consumes the data stream. LabVIEWs default endianes is big endian here.
    But as long as you pass data directly to native components like DLLs there is no difference in endianess between what LabVIEW uses and what those components use.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • I have nine, 1-page PDF files that are accessible and need to combine into 1 PDF file.  I have tried appending, adding and the combine PDFs process. The file created is not keeping my changes. The created file is partially accessible but I have to re-fix

    I have nine, 1-page PDF files that are accessible and need to combine into 1 PDF file.  I have tried appending, adding and the combine PDFs process. The file created is not keeping my changes. The created file is partially accessible but I have to re-fix issues I had fixed in the single files. I need suggestions on what else can be done if any. Using Acrobat pro XI.

    Out of habit, I tend to combine PDF files in the Page Thumbnails pane by right-click then "Insert Pages" -> "From File". For me, this preserves the tags from both documents, although the tags may have to be moved into the right location (if I recall correctly the tags for the inserted pages get put at the end of the tag structure, regardless of where the pages are inserted), If I first put the tags for the document to be inserted inside a container tag like Section, it makes the process easier. Moving that set of tags to the right place is the only re-fixing that I recall having to do. What behavior are you experiencing?
    a 'C' student

  • If I buy the Mac pro and iMac combine it together would it be faster?

    If I buy the Mac pro and iMac combine it together would it be faster or I just buy the mac pro and Apple Thunderbolt Display (27-inch)?

    If you buy a Mac Pro 2013, use the iMac for casual stuff and use the Mac Pro for media creation work.
    Maxed out iMac with 4-core 32GB RAM and 1TB SSD PCIe is nice.
    Mac Pro with 6-core 64GB dual graphics for $1000 more might run rings around it.
    Why not look them both up on Geekbench.
    Some people really need and like having two systems, maybe laptop (Air) and a more powerful system.

  • Tax code on plant  material and vendor combination

    Hi ,
    I have created Tax code in FTXP and I have maintained conditions in FV11 in combintaion plant,vendor and material combination along with Tax code but while creating PO Tax code is not defaulting automatically.
    Am I doing correctly or I should do anything else
    Regards
    Senthilnambi

    Hi,
    You have to specify the tax code manually, based on the condition record (FV11/FV12) for Plant, Vendor and material, it will populate the tax rates.
    If you want to default the tax code then maintain the same in ME11/ME12 - Purchase Info record.

  • BAPI or FM for Material and ChapterID Combination(J1ID Transaction)

    Dear All,
                    I need BAPI or FM  for Creation of Material and ChapterID combination. I dont need for other options present in J1ID Transaction.
    I cannot use Insert statement  for Material and ChapterID  Creation  as it contains only few fields.
    Please let me know regarding this.
    Regards,
    Anilkumar

    Hello
    The bapi BAPI_INSPECTIONPLAN_CREATE is used for creation. There you can assign several materials through structure MATERIALTASKALLOCATION (BAPI1191_MTK_C). There is no bapi for modifications so you can assign other materials using LSMW or BDC as Gururaj told you or in this special case populate table MAPL directly (better talk to your ABAP to decide it); I did it without issues and I checked and the function CZ_VB_MAPL_POST could update the information you need (talk to your ABAP to validate it).
    Best regards
    Carlos Díaz

  • Invalid username and password combination woes

    Before I do what I think I am supposed to do... I wanted to run this by you guys first to make sure incase someone found a way. I wish i didn't have to do this but...
    I have a Mac on our domain running 10.6.6. It had a seizure of some kind and i was forced to cold boot it. We got it back up and running and to the login screen, but when we tried logging in to it, the login in screen just shook. No matter what AD account i tried logging in with, SHAKE! SHAKE! SHAKE The next thing i decided to do was unbind and rebind the Mac thinking maybe it had something to do with that. NO GOOD. Not only did I get an error that the Mac could not unbind from our domain, but now, no matter what account i use to try and rebind the mac, I get the dreaded: invalid username and password combination error. WHEN I KNOW THAT'S NOT THE CASE!
    Anyone know how to fix this OTHER THAN downgrading to a version of 10.6.x that CAN bind? If that's even a option???
    Thanks!

    Why is that always any Apple support person or Mac users answer? It's a Microsoft problem. How can it be, I have 20 macs connected to the same network. The mac having the problem has been successfully working for 3 months. It started shaking when the user came in and in the troubleshooting process we removed it and are trying to rejoin it backl on to a domain it has been working on for months and 19 other machines are still working on. How is this a microsoft problem? Please enlightne me? If it sounds like I am frustrated, I apologize, but I AM!

  • Tables for production order number for material and Batch combination

    Dear Experts,
    Please suggest the table names for finding the production order for material and batch combination .
    Thanks in advance for your help...
    Best regards
    Nitishj

    Dear
    Please check in  AFPO-CHARG
    AFPO          Order Item Detail -Batch Number -CHARG
    AFFW         Confirmations -- Goods Movements w
    AFRD          Confirmations -- Defaults for Collective Confirmation
    AFRH          Confirmations -- Header Info for Confirmation
    Regards
    JH

  • What is TERMINAL and BASH ? and why this shows in my Dock ?

    What is TERMINAL and BASH ? and why this shows in my Dock ?

    "What is Terminal and Bash?"
    Terminal is an application allowing access to the Mac's UNIX-based sub-system. If you like another operating system ticking away beneath OS X's shiny GUI. BASH (Bourne Again Shell) is one of many command line interpreters for that sub-system.
    ". . . why does this show in my Dock"
    Either because you put it there or you launched the application.

  • ASO Time and Periods combined - Dynamic Time Series?

    I am looking to do period-to-date calculations in ASO using the method outlined by Gary Crisci but I have Time and Periods combined into one heirarchy.
    I have seen suggestions that this can be done, but I cannot find any example code for the calculations.
    My MDX skills are not up to the challange yet so I was hoping someone is doing this and could shed some light.
    I am exploring the options of hard-coded alternate heirarchies, but data is stored at the day level and users want
    the same capability they have in BSO.
    Thanks,
    Kenneth

    You can create the calculated members within the existing time dimension, but it get ugly and probably won't perform great. For starters you will have to create a calculated member with a formula for every stored time member you have. Not too bad for 12 months, but if you ahve years and months in same dim or daily model, its not realistic. That is the beauty of View dimension, a single formula goes a long way.
    Other option is to not have alternate roll-ups in time dim - perhaps you can use Attribute dims to simulate the alternate groupings you need.

Maybe you are looking for