ROOKIE with problems: Homepage & Configuring php.ini

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

Re: ROOKIE with problems: Homepage & Configuring php.ini

Postby Altrea » 18. May 2011 06:35

The Un-dr. wrote:I wouldn't think a professional developer at Adobe would use them, but what do I know?

I don't know if a professional developer at Adobe use them, but many other professional developers do. Short Tags are very common in MVC-Pattern and CMS-Systems and any other software architecture where the application logic is isolated from the presentation logic, because the presentation logic is much more clearer and readable if you use short_open php tags in markup templates.

The Un-dr. wrote:I really don't know how to use that XML DOCTYPES information and workaround. How would I determine if a XML DOCTYPES are used in a php file or in the templates I referred to above?

Simply search all files for the string "<?xml". But it is very very uncommon, that XML DOCTYPES are used .php files and in the cases where it is used, the developers should take care about that, because most of the webhosts are configured with short_tags = on. If they don't care about that, their scripts wouldn't work properly on this hosts.
For example Joomla CMS is using XML DOCTYPES in Templates, but they use the workaround i posted.

You should care about this workaround if you:
- use XML-DOCTYPES in files parsed by the php-parser
- response php-builded full valid XML files instead of XHTML/HTML (very very uncommon, because Internet Explorer can't handle them. You will know if you do that)

in 99,999% you will not have one of them without your knowledge. And in the 0,001% you will get an invalid XML file error or a php parser error, so you will know.

The Un-dr. wrote:And if I had them, where would I use that workaround code, exactly--in the php file or in xampp's php.ini file?

directly in the sourcecode.

Simply search all .php files for the string
Code: Select all
and replace it with
Code: Select all
<?php echo '<?'; ?>xml

Thats it! (10 seconds with a basic text-editor like Notepad++).

But JUST the .php files! If you replace that string in a .xml file, you will get an invalid XML File!
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

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

Re: ROOKIE with problems: Homepage & Configuring php.ini

Postby The Un-dr. » 19. May 2011 05:40

Wow! Thanks Altrea for that comprehensive and enlightening response!

I searched the file I keep using to test Dreamweaver and my virtual hosts setup and it didn't have any XML doctypes etc. (It's an "index.php" file from the one of the Adobe Wordpress templates I downloaded from here: ... s_pt2.html )

So the reason my attempt to setup virtual hosts keeps failing remains unsolved....but I think I'm getting closer thanks to you and Sharley!
The Un-dr.
Posts: 9
Joined: 15. May 2011 15:12

Re: ROOKIE with problems: Homepage & Configuring php.ini

Postby The Un-dr. » 22. May 2011 03:37

Update: David Powers answered in the Adobe forum and pointed out I had made a mistake with my site definition: the Web URL for a virtual host was incorrect.

So now opening the .php files do not give me an error message in the title box or the upper right indicator of the path, but Design view gives me code and little green and yellow "php" boxes and Live View gives me errors similar to this:

"Fatal error: Call to undefined function get_header() in C:\vhosts\phpdw1\index.php on line 7"

This is probably not the site to ask what's going on, but at least I seem to be making progress because of you guys..... :-)
The Un-dr.
Posts: 9
Joined: 15. May 2011 15:12


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 63 guests