Jump to content

Problem With PHP Scripts In cmd


Recommended Posts

I have a PHP script which is for automating some tasks.  It seems to be ending right away when it should be looping for quite some time.  When I ran it on my computer before I reformatted, it was running perfectly fine, same exact script.  However, now, it is not.

 

I'm wondering if someone can help me figure out a problem with either the script itself which I think is least likely or if maybe there's a specific installation requirement for running such in cmd line?  I'm using vista on this machine, though I also attempted to run it on my VPS which has windows server 2003.  I'm not sure if maybe I did something different with the php installation before reformatting that might have made it run then?  Let me know if you have any ideas.

Link to comment
Share on other sites

it was running perfectly fine, same exact script.  However, now, it is not.

 

Were going to need more information than that. Do you get an error? What is it?

 

Is the php.exe on your system PATH?

 

I don't get an error at all.  At least not one it shows me.  It's for MySpace.  It begins connecting to my account, then it stops.  Doesn't make it all the way through.  When I run using "Open With" php.exe the cmd promp just closes as quick as it opens.  When I use cmd prompt C:\Program Files (x86)\PHP\php.exe -f "C:\Script.php"    It will run partway through the script then revert me to my original directory.. so the script is done.  I am fairly certain it's not a problem with the script itself as if that were true, it wouldn't have worked before I reformatted.

Link to comment
Share on other sites

If it is running, it isn't a problem with not being able to locate php. This means it is likely an issue with the script. You may just have had a different level of error reporting on with your last setup.

 

You'll need to post your code in the PHP Coding board.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.