Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
> Help With SSH Command
Photo
post Jun 19 2012, 08:22 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 3
Joined: 19-June 12
Member No.: 17,665



Hello,
I wonder if someone could help me, I am trying to run a script from the command line and need a little help. The file is located in the public_html/xp/regen-codebook.php folder of our server, I have tried the following command,

php regen-codebook.php -run public_html/xp

but get the following error, "Could not open input file: regen-codebook.php". I have changed the permissions on the file and that does not help.

Any ideas?
Thanks
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 4)
michaelk
post Jun 19 2012, 02:24 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,800
Joined: 23-January 03
Member No.: 360



If your current working directory is not where the file is located or if it isn't in your path environment then you will need to use the entire path in your command statement.
php /public_html/xp/regen-codebook.php -run public_html/xp
Go to the top of the page
 
+Quote Post
Photo
post Jun 20 2012, 06:50 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 3
Joined: 19-June 12
Member No.: 17,665



QUOTE (michaelk @ Jun 19 2012, 02:24 PM) *
If your current working directory is not where the file is located or if it isn't in your path environment then you will need to use the entire path in your command statement.
php /public_html/xp/regen-codebook.php -run public_html/xp


Thank you for your help.
I tried the command you posted and received the following message, "Could not open input file: regen-codebook.php"
I can get to the folder that contains regen-codebook.php by using the following command, cd public_html/xp
but not sure which command to use once in that directory.
Here is the instructions from the script creator if that helps.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This script will re-create the codebook contained in the <xp/lib/XPay/Model/Codebook.php> script.

To avoid losing data, do the following before running the script:

Copy the file <xp/lib/XPay/Model/Codebook.php> to the file <xp/lib/XPay/Model/Codebook.prev.php>
Create an X-Payments database dump.
Run the script with a -run flag

php '''regen-codebook.php''' -run <system path to '''xp'''>

If the script failed, copy the file <xp/lib/XPay/Model/Codebook.prev.php> to the file <xp/lib/XPay/Model/Codebook.php>, restore the database from the saved dump and repeat step 3.
If the script completed successfully delete the database dump file and the <lib/XPay/Model/Codebook.prev.php> file.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks again for the help
Go to the top of the page
 
+Quote Post
michaelk
post Jun 20 2012, 12:46 PM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,800
Joined: 23-January 03
Member No.: 360



Does regen-codebook.php file have the proper permissions? Are you running the script as root?
Go to the top of the page
 
+Quote Post
Photo
post Jun 21 2012, 04:21 AM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 3
Joined: 19-June 12
Member No.: 17,665



QUOTE (michaelk @ Jun 20 2012, 12:46 PM) *
Does regen-codebook.php file have the proper permissions? Are you running the script as root?


Thank you.

I have tried changing the permissions with no effect, and no I do not have root access to the server.
I have asked our server management company to take a look at this for me so will have to see what they come up with.
I recieved the following reply from the script maker, but upon trying to add full pths I am still not having any luck.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
php '''regen-codebook.php''' -run <'''public_html/xpayments'''

consists of the following parts:

1) "php" - is the PHP binary file. You should use the PHP 5.3. binary with the necessary extensions installed (i.e. so that it meets the X-Payments system requirements). Possibly you'll need to run it with the -c path_to_php.ini_file option.

Contact your hosting to verify which PHP binary and ini file should be used.

2) "regen-codebook.php" is the name of the execuring PHP script. Since only file name is used, it's considered that you've already are in the directory where X-Payments is installed. Otherwise you may use the full server path to this file.

3) "-run" specifies that the regeneration should be preformed.

4) "public_html/xpayments" should be the full server path of the X-Payments directory. You may get it executing the pwd command via shell.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks a lot for trying to help me out with this, I appreciate it.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd November 2017 - 05:53 AM