possible solution for executability on windows 7, vista, 8

Problems with the Windows version of XAMPP, questions, comments, and anything related.

possible solution for executability on windows 7, vista, 8

Postby jmichae3 » 17. May 2012 22:45

try including a manifest in the executables. it's not guaranteed to work, but try it.
the .exe.manifest files can be external to the .exe files but must be in the same directory, however, I think there are rules regarding this.
see http://jesusnjim.com/code/compilers/mingw.html#manifest
-------------------------
Jim Michaels
jmichae3
 
Posts: 39
Joined: 12. November 2007 09:41
Operating System: win7-64-sp1-ult-retail

Re: possible solution for executability on windows 7, vista,

Postby JonB » 17. May 2012 22:53

I'm a little lost, what problem would we be solving?

The matter of reliance on MS C++ libraries?
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: possible solution for executability on windows 7, vista,

Postby jmichae3 » 18. May 2012 00:33

no. this would POSSIBLY make the executables run on windows 8 without having to run as administrator. in order to get admin rights though, you would need to change <ms_asmv2:requestedExecutionLevel level="asInvoker">
to <ms_asmv2:requestedExecutionLevel level="requireAdministrator">
this is at a much lower level than what you are talking about. this goes INSIDE the .exe's as a standard windows resource or beside them. this applies to .dll's too maybe.

this may allow for placing in c:\program files\ but it depends upon the implementation of the UAC in each version of windows it seems. maybe you will have better success in testing than I have.

I have a very small audience and extremely few OS's and machines to test with.
also, installers must either have the word "-install" or "-setup" in their filenames if I remember right, I think it was "-install".
for that information, you have to read up on microsoft's "one-click install" initiative. (misnomer, it requires a double-click)
-------------------------
Jim Michaels
jmichae3
 
Posts: 39
Joined: 12. November 2007 09:41
Operating System: win7-64-sp1-ult-retail

Re: possible solution for executability on windows 7, vista,

Postby jmichae3 » 20. May 2012 03:40

jmichae3 wrote:no. this would POSSIBLY make the executables run on windows 8 without having to run as administrator. in order to get admin rights though, you would need to change <ms_asmv2:requestedExecutionLevel level="asInvoker">
to <ms_asmv2:requestedExecutionLevel level="requireAdministrator">
this is at a much lower level than what you are talking about. this goes INSIDE the .exe's as a standard windows resource or beside them. this applies to .dll's too maybe.

this may allow for placing in c:\program files\ but it depends upon the implementation of the UAC in each version of windows it seems. maybe you will have better success in testing than I have.

I have a very small audience and extremely few OS's and machines to test with.
also, installers must either have the word "-install" or "-setup" in their filenames if I remember right, I think it was "-install".
for that information, you have to read up on microsoft's "one-click install" initiative. (misnomer, it requires a double-click)



I noticed that the manifests in the executables use level="asInvoker", which uses the current login credentials.
but what I find interesting is that, if I run the installer for xampp as administrator, the services logon by default as SYSTEM, not as me.

this works just fine, however, *starting* and *stopping* the services requires administrator access. I just discovered this. I think this is why xampp has been having problems with vista. when you do from the cmd shell:
Code: Select all
net start Apache2.2
net stop Apache2.2

you must run your cmd shell as administrator. the shortcut must be created with "run as administrator" privileges.
other than that, the whole package works well.
as for security, the reason why it's not secure out of the box is because httpd.conf I think is bound to every NIC on the machine.
my question is, since most people are going to want to do virtual hosts, how would you do virtual hosts for both [::1] and 127.0.0.1 for the same directory? do you need 2 separate virtual host entries, or do you
Code: Select all
<VirtualHost 127.0.0.1:80 [::1]:80>

instead?

the workaround for the problem of the xampp control panel not starting and stopping services is,
  1. download xampp.
  2. right click on xampp and run as administrator.
  3. when you are installing xampp, choose to install a desktop icon for the control panel.
  4. right-click on the xampp control panel icon on the desktop, pick properties, and turn on "Run as administrator". click ok.
  5. xampp will run now, but it will go wonky on the next reboot.
  6. if you have to, when you start your computer, do [Ctrl]-[Alt]-[Delete] and bring up the task manager (or [windows-logo-flag-key]-R taskmgr[Enter]) and do an end-task on xampp control panel (you may find it does not start and stop Apache, or may find that Apache does not start)
  7. double-click on your xampp control panel desktop icon. it will ask your permission to make changes to your computer. allow it to. this means it will be able to start and stop apache service , mysql service, etc.
-------------------------
Jim Michaels
jmichae3
 
Posts: 39
Joined: 12. November 2007 09:41
Operating System: win7-64-sp1-ult-retail

Re: possible solution for executability on windows 7, vista,

Postby Altrea » 20. May 2012 05:12

Hi jmichae3,

just a few words on this quote:
jmichae3 wrote:this may allow for placing in c:\program files\ but it depends upon the implementation of the UAC in each version of windows it seems.

Running from the program files will not work for 64Bit systems, because there you have two program files folders, one named "program files" for 64 bit applications and one "program files (x86)" for 32 bit applications. Because XAMPP does only have a 32 bit version and OpenSSL has problems with the (x86) in the folder name (not only the XAMPP package, other packages with OpenSSL like Zend Server CE too) this will not work for it.

I don't dislike your solution of placing a manifest to the executables. I have written this to the developer of the new XAMPP control panel (because this seems to be possible with Delphi too). So maybe this will get realized in one of the next versions of the XAMPP control panel v3. We will see.

jmichae3 wrote:as for security, the reason why it's not secure out of the box is because httpd.conf I think is bound to every NIC on the machine.

by far not the only reason, but one of them.

jmichae3 wrote:my question is, since most people are going to want to do virtual hosts, how would you do virtual hosts for both [::1] and 127.0.0.1 for the same directory? do you need 2 separate virtual host entries, or do you
Code: Select all
<VirtualHost 127.0.0.1:80 [::1]:80>

instead?

Both is possible. Unless you have a reason for splitting them you should define them in the same block to prevent error potential.
For testing purposes (for example if you want to test if your IPv6 is matching) it can be helpful to define an own VHost for IPv6 with a different DocumentRoot.

Last hint: If you are using Vhost, define a default Vhost as the very first Vhost in your list (or define one with the _default_ keyword). Otherwise your first Vhost will match every requests which don't match any Vhosts at all.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: possible solution for executability on windows 7, vista,

Postby JonB » 25. May 2012 19:11

by default 'localhost' is mapped to ::1 on IPv6 by the Microsoft DNS resolver, and 127.0.0.1 is the universal default on IPv4. They don't HAVE to be the same NIC, but it would be asking for problems to do something different, at least in my opinion. Thus - they should be on the same virtual host - probably the 'first'/default one as Altrea mentioned.

Unless you have some reason (what with XAMPP being a DEVELOPMENT environment) I would use the hosts file in conjunction with vhosts to map things.

As Altrea pointed out, the Unix/Linux origins of most of the key components of 'AMPP' pretty much rules out using folders with special characters (or spaces) for XAMPP.

Good Luck
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: possible solution for executability on windows 7, vista,

Postby jmichae3 » 28. May 2012 12:13

http://forums.winamp.com/showthread.php?t=319628
this link is how to set a shortcut to run as administrator in NullSoft NSIS Installer. this will allow XAMPP control panelto work if you create the shortcut on the desktop.
-------------------------
Jim Michaels
jmichae3
 
Posts: 39
Joined: 12. November 2007 09:41
Operating System: win7-64-sp1-ult-retail


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 78 guests