Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8415915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:35:12+00:00 2026-06-10T01:35:12+00:00

I have used a Startup script on a Web role to install PHP by

  • 0

I have used a Startup script on a Web role to install PHP by using Windows Plattform Installer. Everything is ok, PHP is installed and the application works, however when I uppload large files the application generates error. I fixed it by editing the php.ini file manually and chnaged upload_max_filesize. My question is, How do I can modify php.ini file automatically (not manually) by adding som script to be executed AFTER php has been installed. I wrote “AFTER” because this script must wait until my startup script is executed completelly and php has been installed.
Thanks for your help appreciate all advices.

UPdated:
Following is my install-php.bat file which is located in bin folder of my web role. I am not familiar with powershell. How can I translate it to powershell script?

ECHO "Starting PHP Installation" >> log.txt

md "%~dp0appdata"
cd "%~dp0appdata"
cd..

reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d "%~dp0appdata" /f

"..\MyWebpicmdline\WebPICmdLine" /Products:PHP53 /AcceptEula >>log.txt 2>>err.txt

reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d %%USERPROFILE%%\AppData\Local /f

ECHO "Completed PHP Installation" >> log.txt
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:35:14+00:00Added an answer on June 10, 2026 at 1:35 am

    So I’m assuming you have a startup task with the following:

    WebPICmdLine.exe /Products: PHP
    

    You’ll need to write some script that will update your php.ini file and run it after installing PHP. A possible solution would be to do this with PowerShell:

    WebPICmdLine.exe /Products: PHP
    powershell -command "Set-ExecutionPolicy Unrestricted"
    powershell .\UpdatePhpIni.ps1
    

    Find a script that allows you to update ini files (like Edit Ini File), add it to your UpdatePhpIni.ps1 file and add the required code to modify the execution time.

    Note that I’m not a PHP expert, but if I remember correctly you should configure this in the FastCGI settings of IIS (I think these have priority over php.ini).

    Update: Here is what your script should look like with the FastCGI configuration.

    ECHO "Starting PHP Installation" >> log.txt
    
    md "%~dp0appdata"
    cd "%~dp0appdata"
    cd..
    
    reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d "%~dp0appdata" /f
    
    "..\MyWebpicmdline\WebPICmdLine" /Products:PHP53 /AcceptEula >>log.txt 2>>err.txt
    
    ECHO Updating activity timeout.
    %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi "/[fullPath='%ProgramFiles(x86)%\PHP\v5.3\php-cgi.exe'].activityTimeout:800"
    
    reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d %%USERPROFILE%%\AppData\Local /f
    
    ECHO "Completed PHP Installation" >> log.txt
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Ruby CGI script that I use in my web application. The
I have used some jquery components in my web site, Suddenly i'm getting an
I have used geocoder in my ruby on rails application for a while but
I have multiple business entities in VB.NET Windows Forms application. Right now they are
What I have to do is to run a application on startup. So I
I have a small lightweight application that is used as part of a larger
I have a vb script (say myScript.vbs) which is used to monitor a file
I am a newbie trying to create a sample web application using; MySQL Java
I have used the silverlight control in CRM 2011.It also published on form but
We have used Shibboleth to authenticate users. It works great. The issue is that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.