PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label windows-7. Show all posts
Showing posts with label windows-7. Show all posts

Wednesday, October 19, 2022

[FIXED] What is the Difference Between Windows Administrator and Windows System Users

 October 19, 2022     admin, administration, privileges, windows, windows-7     No comments   

Issue

Is there any privilege difference between the Windows Administrator User and the System User?

There have been some times, where I have to promote a cmd window to system privilege to delete some files. This may be due to files being locked by the system user, or the system user may have higher access, I'm hoping to find out if there is a privilege difference.


Solution

from Microsoft KB:

The system account and the administrator account (Administrators group) have the same file privileges, but they have different functions. The system account is used by the operating system and by services that run under Windows. There are many services and processes within Windows that need the capability to log on internally (for example during a Windows installation). The system account was designed for that purpose; it is an internal account, does not show up in User Manager, cannot be added to any groups, and cannot have user rights assigned to it. On the other hand, the system account does show up on an NTFS volume in File Manager in the Permissions portion of the Security menu. By default, the system account is granted full control to all files on an NTFS volume. Here the system account has the same functional privileges as the administrator account.



Answered By - SeanC
Answer Checked By - Willingham (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Sunday, October 16, 2022

[FIXED] How to clear cache in IE9 Windows7 using vbscript

 October 16, 2022     clear-cache, internet-explorer-9, vbscript, windows-7     No comments   

Issue

I am trying to write the script to clear the cache on IE9 Windows7 (64 Bit). So far I have written below code. This code works fine on IE8 and Windows XP, but when I am trying to run same code on WIndows7 (IE9) it gives error by saying "Permission denied Line (39): "fso.DeleteFile (strWinFolder & "\Temp*."), True : fso.DeleteFolder (strWinFolder & "\Temp*."), True". "

Please check my script and correct me where I am doing wrong. Pardon me if I am wrong some where.

Dim methodName, fso, WshNetwork, WshShell, strVer, OSver, strWinFolder, strTempFolder, GetOS, strProfile, WindowsFolder, TemporaryFolder, NewFolder

Set fso = CreateObject("Scripting.FileSystemObject") : Set WshNetwork = CreateObject("Wscript.Network") 
set WshShell = createobject("wscript.shell") : set strVer = WshShell.exec("cmd /c ver") 
OSver = strVer.stdout.readall 

If InStr(OSver, "XP") Then GetOS = "WXP" : If InStr(OSver, "2000") Then GetOS = "W2K"
If InStr(OSver, "NT") Then GetOS = "NT4" : If InStr(OSver, "98") Then GetOS = "W98" 
If InStr(OSver, "Millennium") Then GetOS = "W98"

strWinFolder =  fso.GetSpecialFolder(WindowsFolder)
'strTempFolder =  fso.GetSpecialFolder(TemporaryFolder)

If GetOS = "WXP" OR GetOS = "W2K" Then
    Flag1 = True
    strProfile = "c:\Documents and Settings\"
Else
    Flag1 = False
End If

If GetOS = "NT4" Then
    Flag2 = True
    strProfile = "c:\winnt\profiles\"
Else
    Flag2 = False
End If

If Flag1 = False and Flag2 = False Then
    GetOS = "W7"
    Flag3 = True
    strProfile = "C:\Users\"
Else
    Flag3 = False
End If

'Delete the Temp files in the C:\Users folder. 
    If fso.FolderExists(strWinFolder & "\Temp\") Then 
        fso.DeleteFile (strWinFolder & "\Temp\*.*"), True : fso.DeleteFolder (strWinFolder & "\Temp\*.*"), True 
    End If 
    If  Not fso.FolderExists(strWinFolder & "\Temp\") Then NewFolder = fso.CreateFolder (strWinFolder & "\Temp\") End If

If Flag1 = True And Flag2 = True Then   
'Delete the recently viewed document links in the C:\Documents and Settings\"USERNAME"\Recent folder. 
    If fso.FolderExists(strProfile & WshNetwork.username & "\Recent\") Then fso.DeleteFile  (strProfile & WshNetwork.username & "\Recent\*.*"), True End If 
'Delete the Temp files in the C:\Documents and Settings\"USERNAME"\Local Settings\Temp folder. 
    If fso.FolderExists(strProfile & WshNetwork.username & "\Local Settings\Temp\") Then 
        'fso.DeleteFile (strProfile & WshNetwork.username & "\Local Settings\Temp\*.*"), True 
        'fso.DeleteFolder (strProfile & WshNetwork.username & "\Local Settings\Temp\*.*"), True 
    End If 

'Delete the Temporary Internet files and folders in the C:\Documents and Settings\"USERNAME"\Local Settings\Temporary Internet Files folder. 
    'wshShell.run "cmd /c del " & strprofile & WshNetwork.Username & "\Tempor~1\*.* /q", 1, True 
    'fso.DeleteFile (strProfile & WshNetwork.username & "\Tempor~1\*.*"), True 
    If fso.FolderExists(strProfile & WshNetwork.username & "\Local Settings\Temporary Internet Files\") Then 
        fso.DeleteFile (strProfile & WshNetwork.username & "\Local Settings\Temporary Internet Files\*.*"), True 
        'fso.DeleteFile (strProfile & WshNetwork.username & "\Local Settings\Temporary Internet Files\Content.IE5\*.*"), True 
    End If 
End If

If Flag3 = True Then
'Delete the Recent files on WIndows7    C:\Users\AA24800\AppData\Roaming\Microsoft\Windows\Recent
    If fso.FolderExists(strProfile & WshNetwork.username & "\AppData\Roaming\Microsoft\Windows\Recent") Then
        fso.DeleteFile (strProfile & WshNetwork.username & "\AppData\Roaming\Microsoft\Windows\Recent\*.*"), True 
    End If

'Delete Temporary Internet Files on WIndows7
    If fso.FolderExists(strProfile & WshNetwork.username & "\AppData\Local\Microsoft\Windows\Temporary Internet Files") Then
        fso.DeleteFile (strProfile & WshNetwork.username & "\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"), True
    End If
End If
set fso = Nothing : set wshshell = Nothing : set WshNetwork = Nothing : set NewFolder = Nothing 

Solution

' This script clears the cache of Internet Explorer
' Tested  on windows 7 workstation (IE9)

on error resume next
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run ("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2")
objShell.Run ("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255") ' ALl
objShell.Run ("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1") 'History
objShell.Run ("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2") ' Cookies
objShell.Run ("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8") ' Temp Internet Files
objShell.Run ("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16") ' Form Data
objShell.Run ("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32") ' Passwords
'objShell.Run ("rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351")' All
Wscript.Quit

If err.number <> 0 Then
    WScript.Echo ("Script Check Failed") 
    Wscript.Quit (1001)
Else
    WScript.Echo ("Successfully Passed")
    WScript.Quit(0) 
End If


Answered By - user4954673
Answer Checked By - Marie Seifert (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

[FIXED] Where are Firefox IndexedDB files stored?

 October 16, 2022     firefox, firefox4, html, windows-7     No comments   

Issue

If I create an IndexedDB in Firefox 4, where are the files stored on my hard drive? Preferably for Win7, but the path is probably similar across OSes.


Solution

This post suggests the following location:

C:\Documents and Settings\<username>\Application 
Data\Mozilla\Firefox\Profiles\<xxxx>.default\indexedDB\<databaseid>

The <xxxx>.default folder is your profile directory, which is where Firefox keeps basically everything.



Answered By - Wayne
Answer Checked By - David Goodson (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Monday, September 19, 2022

[FIXED] How to install ImageMagick to use with PHP on Windows 7 (3)

 September 19, 2022     imagemagick, imagick, php, windows, windows-7     No comments   

Issue

There are other threads about how to install Imagick on Windows 7 but no help for me so far. (Maybe problems have came up with more recent versions)

I have followed these steps to install:

  1. Download and install ImageMagick

http://www.imagemagick.org/download/binaries/ImageMagick-6.8.8-1-Q16-x86-dll.exe

  1. Download php_imagick.dll and copy to extension dir (c:\xampp\php\ext)

http://www.peewit.fr/imagick/php55/vc11/x86/ts/php_imagick.dll

  1. Edit php.ini file and add new extension (c:\xampp\php\php.ini)

extension=php_imagick.dll

  1. Save ini file and restart Apache (if necessary, restart Windows)

  2. Start Apache and run test

When I start Apache i get a pop up box that displays:

The program can't start because php5.dll is missing from your computer. Try reinstalling the program to fix this problem.

Then directly after this comes another:

PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_imagick.dll' - The specified module could not be found.

According to funtioneer I suspect some kind of compilation error.

Now I have PHP Version 5.5.6 (xampp 1.8.3) with compiler MSVC11 which is the same as for the php_imagick.dll file.

Is download ImageMagick from source and compile it on my own the right way to go? (have never compiled in Windows before)


Solution

Instead of using the latest version I tried downloading ImageMagick-6.7.7-5-Q16-windows-dll from here. That one actually worked with the php_imagick.dll (Imagick for PHP 5.5.x) from http://www.peewit.fr/imagick/.

This is not the latest version but it worked. (even without restarting the computer)



Answered By - embe
Answer Checked By - Marilyn (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Wednesday, August 31, 2022

[FIXED] How to configure PEAR ENV windows?

 August 31, 2022     pear, phpunit, windows-7     No comments   

Issue

the file .reg generate when finish the pear installation was addedd and when i try pear command i get this message:

´PHP_PEAR_PHP_BIN is not set correctly. Please fix it using your environment variable or modify the default value in pear.bat The current value is: .\php.exe´

i'm traying to install PHPUnit


Solution

Set the environment variable in

Control center 
  extended system settings
    extended
      environment variables

alternatively, set it directly in pear.bat - but that change will vanish after the next update.



Answered By - cweiske
Answer Checked By - Mary Flores (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

[FIXED] Why won't PEAR work on my PHP Windows installation?

 August 31, 2022     cmd, cygwin, pear, php, windows-7     No comments   

Issue

I'm running Wampserver on Windows 7, and I can't seem to get PEAR to work. Well, that's not entirely true-apparently it works on the command line (both cmd.exe and on Cygwin). Here's the sample program I found on PHP.Net that shows you if PEAR is installed:

<?PHP

require_once 'System.php';
var_dump(class_exists('System', false));

?>

On the command line, it returns "bool(true)", and in the browser I get

Warning: require_once(System.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\foobar.php on line 3

Fatal error: require_once() [function.require]: Failed opening required 'System.php' (include_path='.;C:\php\pear') in C:\wamp\www\foobar.php on line 3

I'm honestly not sure what I'm doing wrong. It seems like both should work, but I'm stumped.

Thanks.


Solution

Based on your comments, it looks like your include_path is wrong. Go change your PHP.ini and set your include path to:

include_path = ".;C:\wamp\bin\php\php5.3.10\pear"


Answered By - Brad
Answer Checked By - Marilyn (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Wednesday, August 24, 2022

[FIXED] How to install GroupPolicy module for PowerShell?

 August 24, 2022     gpo, group-policy, module, powershell, windows-7     No comments   

Issue

I just started writing scripts in PowerShell.
The desired script is supposed to create a local GroupPolicyObject (GPO) which will be specified afterwards. Research showed that it could be done with the New-GPO command within the GroupPolicy module for PowerShell. I tried to install the mentioned module but unfortunately nothing I found worked. May I ask for help?

I am using Windows 7 and Powershell 5.1.14409.1005

Error I receive when running example from Microsoft page (New-GPO -Name TestGPO -Comment "This is a test GPO."): Error when running (New-GPO -Name TestGPO -Comment "This is a test GPO.") - example provided by Microsoft


Solution

Step 1. Install RSAT from Microsoft site:

https://www.microsoft.com/en-in/download/details.aspx?id=7887

Step 2. Enable Group Policy from Windows Features.

Following link describes the steps in details:

https://www.powershellmagazine.com/2012/05/14/managing-group-policy-with-powershell



Answered By - Prashant Singh
Answer Checked By - Willingham (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Saturday, July 2, 2022

[FIXED] how do you uninstall an xampp installation that refuses to uninstall?

 July 02, 2022     installation, uninstallation, windows-7, xampp     No comments   

Issue

I downloaded xampp 1.7.3 (32) on windows 7 (64) in the programs(86) folder. both MySql and Apache refuse to run, they start and then instantly turn of. All ports are free.

So I decide to uninstall however, when i run the uninstaller I receive the following error

"Input Error: Can not find script file "C:\Program Files (x86)\xampp\uninst.temp\xampp_uninstall.vbs" XAMPP uninstall not OK

Why is there spaces in the above line and does this matter "C:\Program Files (x86)" ?

Can somebody please help me to understand the problem & uninstall xampp (or get it to work). It does not show in the control panel so I am stuck. The documentation clearly states the uninstaller should be used.

I have asked this question on serverfault but since ive had so much help here, i was wondering if anybody here knows what the problem could be? All help is greatly appreciated. Thank you.


Solution

Never install xampp to the x86 folder on windows 7.

directly to the C drive works fine.

Solution for the time being: System Restore or delete the folder and pretend it never happened.



Answered By - Stu
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Monday, May 16, 2022

[FIXED] How to install PEAR with EasyPHP 5.3.8?

 May 16, 2022     easyphp, pear, php, phpunit, windows-7     No comments   

Issue

I'm learning Yii and following ebook written by Jeffrey Winesett, the application is built upon TDD. So I need to install PHPUnit to write unit test, which leads me to posts help installing PEAR for my Windows 7 (ref. link 1, link 2).

And in those above sites, the author keep telling to use go-pear.bat which doesn't exist in my EasyPHP 5.3.8 which also be the latest version at the time of speaking.

Even in this EasyPHP forum post we cannot find the answer.

So the question is, how to install PEAR with EasyPHP 5.3.8?

I'm using:

  • Netbeans PHP 7.0.1 as IDE for PHP.
  • EasyPHP 5.3.8 as A M P package

Solution

the script go-pear.php doesn't work on some new php version. My solution :

dowload in php folder the file from http://pear.php.net/go-pear.phar

(use the windows console in mode admin) and from php folder type : php go-pear.phar



Answered By - Michel Bobillier
Answer Checked By - Timothy Miller (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Tuesday, March 15, 2022

[FIXED] Vagrant on Windows 7 64bit: Could not match ? at /tmp/vagrant-puppet/manifests/default.pp:2 on node lucid32.hsd1.ca.comcast.net

 March 15, 2022     host, lamp, vagrant, windows-7     No comments   

Issue

Attempting to Boot and provision a LAMP VM with Vagrant and Virtual box running on a Windows 7 64 bit host. But am getting the error message:

Could not match ? at /tmp/vagrant-puppet/manifests/default.pp:2 on node lucid32.hsd1.ca.comcast.net.

Searches don't find any helpful clues - they are unrelated to using Vagrant and discuss completely different scenarios.

C:\Users\rdavis\lamp-project>vagrant up
[default] VM already created. Booting if it's not already running...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 80 => 8080 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] -- configs: /configs
[default] -- manifests: /tmp/vagrant-puppet/manifests
[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with /tmp/vagrant-puppet/manifests/default.pp...
stdin: is not a tty
Could not parse for environment production: Could not match ? at /tmp/vagrant-puppet/manifests/default.pp:2 on node lucid32.hsd1.ca.comcast.net.

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cd /tmp/vagrant-puppet/manifests && puppet apply /tmp/vagrant-puppet/manifests/default.pp --detailed-exitcodes || [ $? -eq 2 ]

C:\Users\rdavis\lamp-project>

(A sub question, out of curiosity is: What is lucid32.hsd1.ca.comcast.net ?! This looks like a valid URL (but doesn't actually work (404)) - So what's it for?)

My setup:

  • Windows 7 64 bit
  • Installed VirtualBox
  • Installed Vagrant
  • Installed Puppet: https://downloads.puppetlabs.com/windows/
  • Installed Ruby: http://rubyinstaller.org/

Issued command:

vagrant box add base http://files.vagrantup.com/lucid32.box

Then attempted to setup a LAMP VM in a Windows 7 64 bit host based on: http://ox86.tumblr.com/post/23734821654/painless-development-environments-with-virtualbox

...as follows:

mkdir lamp-project
cd lamp-project
C:\Users\rdavis\lamp-project>mkdir configs
C:\Users\rdavis\lamp-project>mkdir manifests
C:\Users\rdavis\lamp-project>vagrant init

Edited Vagrantfile inserted the following directly after Vagrant::Config.run do |config|

config.vm.box = “lucid32”
config.vm.provision :puppet do |puppet|
   puppet.manifests_path = File.expand_path(“../manifests”, __FILE__)
end
config.vm.forward_port 80, 8080
config.vm.share_folder “configs”, “/configs”, File.expand_path(“../configs”, __FILE__)

Then created a default.pp puppet file (again, from reference 1 ) and put in the manifests folder as that reference 1 instructs

$config_path = "/configs”
$vagrant_base_path = "/vagrant”
Exec { path => "/bin:/usr/bin:/usr/local/bin” }
group { "puppet”: ensure => present }
exec { "apt-get update”: command => "apt-get update” }
class apache {
    file { "/etc/apache2/sites-enabled/000-default":
        ensure => file,
        source => "${config_path}/000-default",
        before => Service["apache2"],
    }
    exec { "enable-mod_rewrite":
        require => Package["apache2"],
        before => Service["apache2"],
        command => "/usr/sbin/a2enmod rewrite"
    }
    package { "apache2":
        ensure => present,
        before => File["/etc/apache2/sites-enabled/000-default"],
    }

    service { "apache2":
        ensure => running,
        require => Package["apache2"]
    }
}
class php {
    package { "libapache2-mod-php5": ensure => present }
    package { "php5": ensure => present }
    package { "php5-cli": ensure => present }
    package { "php5-dev": ensure => present }
    package { "php5-mysql": ensure => present }
    package { "php-pear": ensure => present }
    exec { "pear upgrade":
        command => "/usr/bin/pear upgrade",
require => Package["php-pear"],
    }
}
class mysql {
  package { "mysql-server":
    require => Exec["apt-get update"],
    ensure => present,
  }
  service { "mysql":
    enable => true,
    ensure => running,
    require => Package["mysql-server"],
  }
  exec { "Set MySQL server root password":
        require => Package["mysql-server"],
        unless => "/usr/bin/mysqladmin -uroot -proot status",
        command => "/usr/bin/mysqladmin -uroot password root",
  }
}
include apache
include php
include mysql

Updated Some invalid quoting e.g. see line $vagrant_base_path = "/vagrant”

All instances of ” have been corrected to "


Solution

Some invalid quoting e.g. see line $vagrant_base_path = "/vagrant”

All instances of ” have been corrected to "



Answered By - therobyouknow
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing