Page 1 of 1

Run a php script using a batch file

PostPosted: 08. April 2009 07:11
by naveenkongati
Hi,
I am using xampp 1.6.7 for windows. I want to run a php script file using a .bat file and same is also scheduled with windows scheduler.
I have written two like of code in batch file like this:

D:/xampp/php/php-win.exe
D:/xampp/htdocs/myapp/myscript.php

myscript.php will perform few database operations as on day.
Please suggest me where i am doing wrong
Thankx in advance
naveen

Re: Run a php script using a batch file

PostPosted: 08. April 2009 07:38
by naveenkongati
Now i have changed the batch file script to:
@D:\xampp\php\php-win.exe -f D:\xampp\htdocs\myapp\myscript.php
and getting the following error:
unable to load dynamic library D:\xampp\php\ext\php_pgsql.dll.
Application has failed to start because the application configuration is incorrect.
Thankx
Naveen

Re: Run a php script using a batch file

PostPosted: 08. April 2009 15:41
by Sharley
First, please delete your other topic viewtopic.php?f=16&t=34433 by clicking on the small X icon in your topic.
There is no need to double post as you will be answered in only one of the topics.



Second you need to uncomment the php_pgsql.dll extension for it to work.

Go to xampp\apache\bin folder and edit the php.ini file you will find there using a text editor like Notepad.

Look for this line:
;extension=php_pgsql.dll
Change it by uncommenting the line so it looks like this:
extension=php_pgsql.dll

Now save the file and restart Apache.

Try once again to run your batch file.