I have been trying to set up an ubuntu server where ant tests my code. When I start ANT to test my code it starts with phploc-ci that goes fine. But the next check is pdepend I get the error Cannot run program "pdepend": error=2, No such file or directory.
As you can see it can't find the path or something. I would say the path is correct because it finds all other folders.
I have been searching this site and google for 2 hours I can't seem to find a solution. Do you guys have any suggestions.
I finally found the solution thanks to a suggestion of Mark Baker. I located every package with sudo find / -xdev 2>/dev/null -name "phpdox" for example after that I copied the patj into value in the build.xml. I did this for every of the needed plugins... now it works
Related
I have been searching for an answer everywhere all morning, and I can't seem to find one. Even on here, so please don't mark as a duplicate.
Basically, I am using php to make a dir and then copy a file to it:
mkdir('servers/'.$name.'/');
sleep(2);
copy("dummy/text.txt", "servers/".$name."/text.txt");
But that doesn't work. I even tried: copy("dummy/text.txt", "servers/$name/text.txt"); and copy('dummy/text.txt', 'servers/'.$name.'/text.txt');
Also, (for testing) I chmod the directory (whole thing, including sub folders) 0777 and chown www-data:www-data still not working.
Please help? Thanks!
you create the dir not where you want to copy the file afterwards.
mkdir("servers/".$name);
Also i recommend that before you ceate the folder, you check if it exists already:
if(!is_dir("servers/".$name)){
mkdir("servers/".$name);
}
Found it out! Before I created the script I made a typo when I made the directory myself. I did (on cli): sudo mkdir dummmy (3 "m" s) Then I made the scripts the correct spelling. Ugh, I have been wasting a full 3 and a half hours on that :P
I am trying to install the newly release security patch for magento 1.9. I am working on window system.
and I am getting the following error.
D:\xampp\htdocs\magento>sh PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh
ERROR: "/app/etc/" must exist for proper tool work.
I am running command by CMD and SH is working fine too
I tried with Git too. but getting same error
Not working on Linux too
can anyone tell me what is the exact issue and how it could be fixed.
Thanks
Able to make it works on windows machine as well for PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh.
Problem was: CURRENT_DIR=$PWD_BIN/ (line 60) and the value of $PWD_BIN is defined in same file PWD_BIN=which pwd (line 35) as which doesn't wok on windows so we will need to replace this value.
Open bash
Your current directory should be the root of magento.
Run command 'pwd'
It will give the out path of your current directory: Check screenshot
Copy this path and edit file, on line 67 replace:
CURRENT_DIR=$PWD_BIN/ to CURRENT_DIR=/d/xampp/htdocs/magento/
Run patch with same commnd sh PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh
Note: Make sure you replace '/d/xampp/htdocs/magento/' with your directory root.
and it will work like a charm!!
Getting rid of the forward slash at the end of line 67 seems to work better for me.
Before: CURRENT_DIR='$PWD_BIN'/
After: CURRENT_DIR='$PWD_BIN'
In SSH, you can change the directory by entering the command, cd /path/to/magento/location/ and then you'll be able to run the bash command to install the patch. If you're not aware of the path, you can run the command, pwd which tells you your current directory. If you're not in the right location, it's looking for app/etc in the wrong location (likely your root folder). So try changing your current directory to the Magento directory and then the error should go away.
I was having the same problem and previous answers didn't work for my situation. The way I was able to fix the issue was to change the directory and then run the bash in SSH.
Run the command, pwd. This will give you your current path.
Change the directory to your Magento directory by running the command, cd /path/to/your/magento/directory/. This should be the path from your current location to the Magento destination.
Now run the bash patch update... bash PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh. Now that you're in the right location, the patch update should run smooth!
This error occurs if you are in your root directory for example and not in your Magento root. Go to your Magento folder and run you command again.
This error happens if the folder is not found or don't have enough permissions.
Use the git bash under windows that should work. With a normal CMD it's not working because there are some difference in the path and the normal CMD can't find that path from your patch file.
I have tried above change. But, I need to do some change in that to make it working
I changed it CURRENT_DIR=$PWD_BIN to CURRENT_DIR="/D/wamp/www/magento/"
It was not working without " (quotes)
Hope this will help you.
I'm trying to create something similar to the laravel installer, it's a PHP Script that utilises Symfony's Console Component. It all works fine except I can't seem to get the damn thing to execute globally on my command line.
I've currently got the script(boiler) stored as /dir/dir/vendor/author/packagename/boiler.
Via Composer I also have a symlink that points to the script from /dir/dir/vendor/bin/. Automatically done via bin in composer.json.
I've updated my $PATH, which now shows /folder/folder/vendor/bin/ to point to the symlink;
My script starts:
#!/usr/bin/env php
Permissions are:
-rwxr-xr-x
I'm running Zshell on Mac OSX.
It will run if I go into the directory and type php boiler but boilerreturns command not found and if I'm in a different directory boiler also returns command not found. php boiler returns "Could not open input file: boiler"
The laravel installer runs exactly as I want mine to, using just laravel whilst anywhere on the command line.
At a complete loss. Google isn't turning up any similar issues, and neither is Stack (My searching ability may be lacking though, it's 4am.)
For those with similar issues:
Use which commandName to see if it's correctly added to your $PATH
Check the symlink is correct if it's via one
Check permissions on symlink and executable script
Post to stackoverflow so that it'll just.. fix itself.
So... which boiler returned the correct path so I tried boiler again from my home dir and it worked.
I genuinely haven't changed a single thing and been stuck for an hour. I don't understand...
Thanks all for help.
I'm working with Yii and have to implement a script for cron.
I've got a script file, which just calls Yii and starts my php-script file.
Until this point everything is fine. If I'm updating the php-script, Cron just continues executing the old one.
Restart of cron-service, reboot of the server etc didn't help.
I also uninstalled cron and installed it again, but nothing changed. He still executes the old version of this php-script.
Anyone an idea what's wrong or what I could do to solve this? I'm using Ubuntu 12.04.
EDIT:
The cronjob script is running:
#!/bin/bash
cd ../www/protected/ ./yiic Cron ProcessPayments
The php-script
class CronCommand extends CConsoleCommand {
public function actionProcessPayments() {
...
}}
This works, but any change I make on this script is ignored by Cron.
And now I'm on this point: he executes both. My old version and the new version. I've never been this confused by something.
Assuming you have sudo on the machine it's located on...
First check to see if it's located in the usual cron directories /etc/cron.*
sudo find /etc/cron* -mount -iname yiic
If nothing shows up there then search the entire filesystem because otherwise you'll start having to search a lot of other places manually and it takes more time than running a find
sudo find / -mount -iname yiic
In both find commands if the filename is or has ever been anything other than yiic do yiic* so that it searchs for anything that starts with yiic
Once you have found the copies, if there are any others, remove every single one except the newest one, or even that one and then reinstall the script on the machine from version control.
Edit:
Probably more than you really care about, but the find command breaks down like this:
sudo - elevated priviledges so you can search everywhere as opposed to where you're user can read
find - command to look for thigs
/ - the starting point for the search, can be anywhere
-mount - this tells find not to search other filesystems
-iname - case insensitive name to search for
yiic - the search term
Locate all your copies of the script using the find command and delete those copies not needed. Restart cron after you have chosen the copy of the script you want to execute. My guess is a copy of the script might be hanging around in a directory (e.g. config.daily or something similar).
HTH
I had a similar problem. A script in /etc/cron.d was still executed in the old fashion after modifying it. I solved the problem by sending a SIGHUP to cron:
sudo pkill -SIGHUP /usr/sbin/cron
As a customer in Plesk, I am attempting to run:
php -q /httpdocs/_external/export/test.php
From this tutorial: http://daipratt.co.uk/crontab-plesk-php/
I'm receiving the error
"php: command not found"
Is there something I need to enable from the main user or a different command I would need to use to run the script?
(also tried /bin/php with no luck, there is no php file in that dir)
"which php"
-/usr/bin/php
(when I use this dir I also get "no such file or dir" I guess since when I use / it's pulling from the customers root not the server root)
This answer will help you. My understanding is that Cron runs everything relative to itself, so you should always use absolute paths when running something from Cron.
Good luck, and happy holidays!