xampp and php 1.8.3 virtualhosting

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

xampp and php 1.8.3 virtualhosting

Postby valentini1949 » 23. November 2013 11:40

I am in possession of xampp 1.8.0 on windows 8.1 and everything works fine.
I decided to download the version 1.8.3 and I began to adapt the new version to my needs.
I enabled the virtualhost correctly by editing the configuration of file c: \ xampp \ apache \ conf \ extra \ httpd-vhosts.conf entering a site (www.valentinisoft.org).
I modified the fie c: \ windows \ system32 \ drivers \ etc \ hosts by inserting a row 127.0.0.1 www.valentinisoft.org
I finally changed the system variable path by adding the path of apache and php
I then added the files to this new site in the subdirectory of C: \ xampp \ htdocs.
Everything seems to work except that php!
When I call the site www.valentinisoft.org the system responds regularly if you open the pages. Html but it does not work, returning the script only, when the pages are. Php.
Since version 1.8.0 of xampp works correctly .. where did I go wrong?

PS: In version 1.8.0 virtual hosting has been obtained by directly editing the configuration file c: \ xamp \ apache \ conf \ httpd.conf.
I tried to edit the same file in version 1.8.3 but apache will not load and error.
valentini1949
 
Posts: 3
Joined: 12. November 2013 10:42
Operating System: windows 8.1

Re: xampp and php 1.8.3 virtualhosting

Postby Altrea » 23. November 2013 12:09

We don't know your code, so just a wild guess: short_open_tags?
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: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: xampp and php 1.8.3 virtualhosting

Postby valentini1949 » 23. November 2013 16:01

I would, for now, just know if I have to work also in other files. Conf addition to those already used.
In summary: It is correct that php functions only if I connect to localhost and not work if I connect with www.valentinisof.org?
I know exactly what I need to do, starting from the original files, because www.valentinisoft.org can regularly operate in php?
is that correct, connettendomi with localhost without using virtulhosting, if I call a php page to the subdirectory "\ xampp \ htdocs \ valentinisoft \" php fails?

thanks
valentini1949
 
Posts: 3
Joined: 12. November 2013 10:42
Operating System: windows 8.1

Re: xampp and php 1.8.3 virtualhosting

Postby Altrea » 23. November 2013 16:27

valentini1949 wrote:I would, for now, just know if I have to work also in other files. Conf addition to those already used.

The file needed to configure virtual hosting is \xampp\apache\conf\extra\httpd-vhosts.conf.
The changes in your \Windows\sytsem32\drivers\etc\hosts are just needed to simulate DomainName resolution. So it can be a part heloful for virtiual hosting but not in every case needed.

valentini1949 wrote:It is correct that php functions only if I connect to localhost and not work if I connect with www.valentinisof.org?

localhost is just a domainname for your very own machine and can used as a vhost too.
So: No. The general php functionality normally is not different between localhost and other vhosts.

valentini1949 wrote:I know exactly what I need to do, starting from the original files, because www.valentinisoft.org can regularly operate in php?

I don't understand the question, sorry.

valentini1949 wrote:is that correct, connettendomi with localhost without using virtulhosting, if I call a php page to the subdirectory "\ xampp \ htdocs \ valentinisoft \" php fails?

I don't understand this question too.
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: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: xampp and php 1.8.3 virtualhosting

Postby valentini1949 » 24. November 2013 23:23

Let me explain with pictures:
Currently I have a function xampp version 1.8.0. and everything works as it should.
To implement the VirtualHostin I modified the file c :/ xampp / apache / conf / httpd.conf
like this:
NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /xampp/htdocs/packybar
ServerName www.packybar.org
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /xampp/htdocs/valentinisoft
ServerName www.valentinisoft.org
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /xampp/htdocs/croce
ServerName www.crocedoro.net
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /xampp/htdocs/ninoroberti
ServerName www.ninoroberti.org
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /xampp/htdocs/ninoroberti2
ServerName www.ninoroberti.net
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /xampp/htdocs/wcfordp
ServerName www.wcfordp.net
</VirtualHost>

If I go into a local site as what you see in this picture, I get this result:

GESTIONE CASSA
INDICARE IL CODICE SEGRETO FORNITO DAL GESTORE

I installed the 1.8.3 version of xampp .
I activated the virtualhosts editing the file c / xampp / apache / conf / extra / httpd- vhosts.conf in this way :


NameVirtualHost *: 80

<VirtualHost *:80>
ServerName localhost
</ VirtualHost>

<VirtualHost *:80>
DocumentRoot / xampp / htdocs / packybar
ServerName www.packybar.org
</ VirtualHost>

<VirtualHost *:80>
DocumentRoot / xampp / htdocs / valentinisoft
ServerName www.valentinisoft.org
</ VirtualHost>

<VirtualHost *:80>
DocumentRoot / xampp / htdocs / cross
ServerName www.crocedoro.net
</ VirtualHost>

<VirtualHost *:80>
DocumentRoot / xampp / htdocs / ninoroberti
ServerName www.ninoroberti.org
</ VirtualHost>

<VirtualHost *:80>
DocumentRoot / xampp/htdocs/ninoroberti2
ServerName www.ninoroberti.net
</ VirtualHost>

<VirtualHost *:80>
DocumentRoot / xampp / htdocs / wcfordp
ServerName www.wcfordp.net
</ VirtualHost>

and everything continues to work only if I use the pages in "html"
if you use pages in " EHP " I get results like this :


" Vr_ip $ = $ _SERVER [ ' REMOTE_ADDR ' ] ; / / echo substr ($ vr_ip , 0.7) . "
" If ( substr ($ vr_ip , 0,7 ) < >" 192.168 " and vr_ip $ <>" 127.0.0.1 " and substr ($ vr_ip , 0,7 ) < >" 169.254 ") { $ vr_host =" 62 149 .150.55 " ; $ vr_id =" Sql142353 ' ; $ vr_pw = " 1fdf63f3 " $ file = " Sql142353_3 ";} else { $ vr_host =''; $ vr_id = " root" ; $ vr_pw = " roberto49 " $ archive = " cash ";} $ _SESSION [ ' vr_host ' ] = $ vr_host ; $ _SESSION [ ' vr_id ' ] = $ vr_id ; $ _SESSION [ ' vr_pw ' ] = $ vr_pw ; $ _SESSION [ ' file ' ] = $ file; $ _SESSION [ ' first ' ] = "S" , $ _SESSION [ ' T_CODICE ' ] = ""; $ _SESSION [ ' s_ncassa ' ] = 0; $ _SESSION [ ' drop ' ] = '1 ' ; $ _SESSION [ ' ignore ' ] = '1 ' ; $ _SESSION [ ' sdata ' ] = '1 ' ; $ _SESSION [ ' struc ' ] = '1 ' ; / / include " dump / dumpetor.php " mysql_connect ($ vr_host , $ vr_id , $ vr_pw ) ; mysql_select_db ($ file) ; $ cc = "

Case: " $ sql =" SELECT * FROM cassa_casse where disabled < > ' S ' " / / echo $ sql . " "; $ Result_id = mysql_query ( $ sql ) ; $ num_righe = mysql_num_rows ($ result_id ) for ( $ x = 0 $ x <$ num_righe ; $ x + + ) {$ id_casse = mysql_result ($ result_id , $ x, " id_casse "); $ nome_casse = mysql_result ($ result_id , $ x, "name") ; $ cc = $ cc. " ";} $ Cc = $ cc. "
" ? >

GESTIONE CASSA
INDICARE IL CODICE SEGRETO FORNITO DAL GESTORE

The php code is not interpreted .

Can you give me a hand?
valentini1949
 
Posts: 3
Joined: 12. November 2013 10:42
Operating System: windows 8.1

Re: xampp and php 1.8.3 virtualhosting

Postby Altrea » 25. November 2013 01:28

The most common reasons for PHP code displaying as plain text are described in the following post
viewtopic.php?f=16&t=54436&p=207499#p207499
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: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 115 guests