ROOKIE with problems: Homepage & Configuring php.ini

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

ROOKIE with problems: Homepage & Configuring php.ini

Postby The Un-dr. » 15. May 2011 15:36

Hello Apache Friends,

I am new to Apache (and DW and web development) and I'm using Dreamweaver CS5 on Windows 7 (64-bit) home edition. I have been following David Powers' instructions from the Adobe web site as well as his book, "Adobe Dreamweaver CS5 with PHP: Training from the Source." Unfortunately, after a month or so of trying to get it to work, it's still driving me nuts!

I have uninstalled Apache 1.7.4 and reinstalled it (several times). At first, I had trouble getting Apache and MySQL to start and getting Dreamweaver to render the PHP pages from Virtualhost changes I made from David Powers' instructions. Lately, Apache starts fine and, the first time I opened up the Homepage (after the latest installation) in my Firefox 4.0.1 browser (http://localhost/xampp) it was fine. I then set up security for MySQL and Apache. After making changes to settings for Virtual hosting, I again opened up the Homepage in Firefox and all I get now is the German heading ("XAMPP furfor Windows") and the main window just has an exclamation mark without any other text. The browser tab reads: XAMPP <?include('.version')?>

I tried the new Control Panel (v. 3) and it worked fine. I also tried the old one and that works too--both indicate Apache and MySQL seem to be running fine.

The other issue I had before I started getting the German heading and the exclamation mark was I was unable to get the Configuration changes I made (per David Powers) to show up when I opened phpinfo(). The php.ini file still shows the changes I made (e.g., changing log_errors to Off, short_open_tag to On, the timezone to "America/Chicago" for central time), but the configuration page remains at the default settings (I did open the file via Notepad after right clicking "Run as Administrator" etc.).

The whole Virtual Hosting issue was my main problem, but now I'm stuck with these 2 problems before I can again troubleshoot the Virtual hosting problems.

Thank you in advance for any suggestions!!

Marty
The Un-dr.
 
Posts: 9
Joined: 15. May 2011 15:12

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

Postby Sharley » 16. May 2011 01:29

Because Apache only reads the configurations file once when it starts, every time you change any configuration setting you need to restart Apache (and MySQL if you change any MySQL settings) to have those changes read including PHP as it is compiled into Apache as a module.

Read the \xampp\apache\logs\error.log file for clues about your other issues at about the date and time you last have errors or start a clean error.log by deleting it when Apache is stopped.
Apache will create it automagically when it starts again adding the fresh errors, if there are any, after doing what caused the errors in the first place.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

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

Postby The Un-dr. » 16. May 2011 03:53

Hello Sharley, thanks for replying!

Well, I already knew about restarting Apache in order to get the configuration changes to be recognized and it wasn't working.

At this point, though, I can't even check the phpinfo() section of the Homepage because of the other problem I mentioned, i.e., the German header and the lone exclamation point in the body of the Homepage.

So, I guess I need to resolved that first before checking into the configuration problem further.

I deleted the error log and restarted Apache and MySQL. Here is the error log now:

[Sun May 15 21:44:41 2011] [notice] Digest: generating secret for digest authentication ...
[Sun May 15 21:44:41 2011] [notice] Digest: done
[Sun May 15 21:44:42 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sun May 15 21:44:42 2011] [notice] Server built: Oct 18 2010 01:58:12
[Sun May 15 21:44:42 2011] [notice] Parent: Created child process 7660
[Sun May 15 21:44:43 2011] [notice] Digest: generating secret for digest authentication ...
[Sun May 15 21:44:43 2011] [notice] Digest: done
[Sun May 15 21:44:44 2011] [notice] Child 7660: Child process is running
[Sun May 15 21:44:44 2011] [notice] Child 7660: Acquired the start mutex.
[Sun May 15 21:44:44 2011] [notice] Child 7660: Starting 150 worker threads.
[Sun May 15 21:44:44 2011] [notice] Child 7660: Starting thread to listen on port 443.
[Sun May 15 21:44:44 2011] [notice] Child 7660: Starting thread to listen on port 80.


Doesn't seem to be any problems there, but what do I know?! What do you think?

FWIW: Here is the former error log I just deleted:

Apache server shutdown initiated...
[Sat May 14 23:50:42 2011] [notice] Digest: generating secret for digest authentication ...
[Sat May 14 23:50:42 2011] [notice] Digest: done
[Sat May 14 23:50:45 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sat May 14 23:50:45 2011] [notice] Server built: Oct 18 2010 01:58:12
[Sat May 14 23:50:45 2011] [notice] Parent: Created child process 2216
Apache server shutdown initiated...
Digest: generating secret for digest authentication ...
[Sat May 14 23:50:46 2011] [notice] Digest: done
[Sat May 14 23:50:46 2011] [notice] Child 2216: Child process is running
[Sat May 14 23:50:46 2011] [notice] Child 2216: Acquired the start mutex.
[Sat May 14 23:50:46 2011] [notice] Child 2216: Starting 150 worker threads.
[Sat May 14 23:50:46 2011] [notice] Child 2216: Starting thread to listen on port 443.
[Sat May 14 23:50:46 2011] [notice] Child 2216: Starting thread to listen on port 80.
[Sat May 14 23:50:51 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sat May 14 23:50:51 2011] [notice] Child 2216: Exit event signaled. Child process is ending.
[Sat May 14 23:50:52 2011] [notice] Child 2216: Released the start mutex
[Sat May 14 23:50:53 2011] [notice] Child 2216: All worker threads have exited.
[Sat May 14 23:50:53 2011] [notice] Child 2216: Child process is exiting
[Sat May 14 23:50:53 2011] [notice] Parent: Child process exited successfully.
[Sat May 14 23:51:22 2011] [notice] Digest: generating secret for digest authentication ...
[Sat May 14 23:51:22 2011] [notice] Digest: done
[Sat May 14 23:51:23 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sat May 14 23:51:23 2011] [notice] Server built: Oct 18 2010 01:58:12
[Sat May 14 23:51:23 2011] [notice] Parent: Created child process 6320
[Sat May 14 23:51:24 2011] [notice] Digest: generating secret for digest authentication ...
[Sat May 14 23:51:24 2011] [notice] Digest: done
[Sat May 14 23:51:25 2011] [notice] Child 6320: Child process is running
[Sat May 14 23:51:25 2011] [notice] Child 6320: Acquired the start mutex.
[Sat May 14 23:51:25 2011] [notice] Child 6320: Starting 150 worker threads.
[Sat May 14 23:51:25 2011] [notice] Child 6320: Starting thread to listen on port 443.
[Sat May 14 23:51:25 2011] [notice] Child 6320: Starting thread to listen on port 80.
[Sat May 14 23:52:40 2011] [error] [client 127.0.0.1] PHP Warning: file_get_contents(lang.tmp) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in C:\\xampp\\htdocs\\xampp\\index.php on line 2
Adding password for user Martin
[Sun May 15 00:09:33 2011] [warn] (OS 996)Overlapped I/O event is not in a signaled state. : winnt_accept: Asynchronous AcceptEx failed.
[Sun May 15 00:09:34 2011] [warn] (OS 996)Overlapped I/O event is not in a signaled state. : winnt_accept: Asynchronous AcceptEx failed.
[Sun May 15 00:09:34 2011] [warn] (OS 996)Overlapped I/O event is not in a signaled state. : winnt_accept: Asynchronous AcceptEx failed.
[Sun May 15 00:09:34 2011] [warn] (OS 996)Overlapped I/O event is not in a signaled state. : winnt_accept: Asynchronous AcceptEx failed.
[Sun May 15 00:09:35 2011] [warn] (OS 996)Overlapped I/O event is not in a signaled state. : winnt_accept: Asynchronous AcceptEx failed.
[Sun May 15 00:32:08 2011] [warn] (OS 996)Overlapped I/O event is not in a signaled state. : winnt_accept: Asynchronous AcceptEx failed.
[Sun May 15 00:32:43 2011] [warn] (OS 996)Overlapped I/O event is not in a signaled state. : winnt_accept: Asynchronous AcceptEx failed.
[Sun May 15 00:32:49 2011] [warn] (OS 996)Overlapped I/O event is not in a signaled state. : winnt_accept: Asynchronous AcceptEx failed.
[Sun May 15 00:48:48 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/phpdw1
[Sun May 15 00:48:51 2011] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/phpdw1
[Sun May 15 00:53:20 2011] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sun May 15 00:53:20 2011] [notice] Digest: generating secret for digest authentication ...
[Sun May 15 00:53:20 2011] [notice] Digest: done
[Sun May 15 00:53:21 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sun May 15 00:53:21 2011] [notice] Server built: Oct 18 2010 01:58:12
[Sun May 15 00:53:21 2011] [notice] Parent: Created child process 7940
[Sun May 15 00:53:22 2011] [notice] Digest: generating secret for digest authentication ...
[Sun May 15 00:53:22 2011] [notice] Digest: done
[Sun May 15 00:53:23 2011] [notice] Child 7940: Child process is running
[Sun May 15 00:53:23 2011] [notice] Child 7940: Acquired the start mutex.
[Sun May 15 00:53:23 2011] [notice] Child 7940: Starting 150 worker threads.
[Sun May 15 00:53:23 2011] [notice] Child 7940: Starting thread to listen on port 443.
[Sun May 15 00:53:23 2011] [notice] Child 7940: Starting thread to listen on port 80.
[Sun May 15 00:57:10 2011] [error] [client 127.0.0.1] user Martin: authentication failure for "/xampp/": Password Mismatch
[Sun May 15 01:10:37 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sun May 15 01:10:37 2011] [notice] Child 7940: Exit event signaled. Child process is ending.
[Sun May 15 01:10:38 2011] [notice] Child 7940: Released the start mutex
[Sun May 15 01:10:39 2011] [notice] Child 7940: All worker threads have exited.
[Sun May 15 01:10:39 2011] [notice] Child 7940: Child process is exiting
[Sun May 15 01:10:39 2011] [notice] Parent: Child process exited successfully.
[Sun May 15 01:11:00 2011] [notice] Digest: generating secret for digest authentication ...
[Sun May 15 01:11:00 2011] [notice] Digest: done
[Sun May 15 01:11:01 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sun May 15 01:11:01 2011] [notice] Server built: Oct 18 2010 01:58:12
[Sun May 15 01:11:01 2011] [notice] Parent: Created child process 6180
[Sun May 15 01:11:02 2011] [notice] Digest: generating secret for digest authentication ...
[Sun May 15 01:11:02 2011] [notice] Digest: done
[Sun May 15 01:11:03 2011] [notice] Child 6180: Child process is running
[Sun May 15 01:11:03 2011] [notice] Child 6180: Acquired the start mutex.
[Sun May 15 01:11:03 2011] [notice] Child 6180: Starting 150 worker threads.
[Sun May 15 01:11:03 2011] [notice] Child 6180: Starting thread to listen on port 443.
[Sun May 15 01:11:03 2011] [notice] Child 6180: Starting thread to listen on port 80.
[Sun May 15 01:17:39 2011] [notice] Parent: child process exited with status 1073807364 -- Restarting.
[Sun May 15 09:07:43 2011] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sun May 15 09:07:43 2011] [notice] Digest: generating secret for digest authentication ...
[Sun May 15 09:07:43 2011] [notice] Digest: done
[Sun May 15 09:07:45 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sun May 15 09:07:45 2011] [notice] Server built: Oct 18 2010 01:58:12
[Sun May 15 09:07:45 2011] [notice] Parent: Created child process 7060
[Sun May 15 09:07:46 2011] [notice] Digest: generating secret for digest authentication ...
[Sun May 15 09:07:46 2011] [notice] Digest: done
[Sun May 15 09:07:47 2011] [notice] Child 7060: Child process is running
[Sun May 15 09:07:47 2011] [notice] Child 7060: Acquired the start mutex.
[Sun May 15 09:07:47 2011] [notice] Child 7060: Starting 150 worker threads.
[Sun May 15 09:07:47 2011] [notice] Child 7060: Starting thread to listen on port 443.
[Sun May 15 09:07:47 2011] [notice] Child 7060: Starting thread to listen on port 80.
[Sun May 15 21:44:14 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sun May 15 21:44:14 2011] [notice] Child 7060: Exit event signaled. Child process is ending.
[Sun May 15 21:44:15 2011] [notice] Child 7060: Released the start mutex
[Sun May 15 21:44:16 2011] [notice] Child 7060: All worker threads have exited.
[Sun May 15 21:44:16 2011] [notice] Child 7060: Child process is exiting
[Sun May 15 21:44:16 2011] [notice] Parent: Child process exited successfully.


These logs reflect before and after installing the new control panel, I believe.

Any suggestions for the Homepage issue?
The Un-dr.
 
Posts: 9
Joined: 15. May 2011 15:12

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

Postby Sharley » 16. May 2011 04:00

Check you have the lang.tmp file in the \xampp\htdocs\xampp folder.

If not then open your text editor and type en on the first line and save it in ANSI code as lang.tmp (not utf-8 likewise any file you edit or create in XAMPP using a text editor) and put in the above folder, start Apache and MySQL in the XCP (XAMPP Control Panel any version, I use v3 now) and try again to go to http://localhost/ (I am assuming you use the English language).

Tip - if using a disk cleanup utility disable the C:\xampp folder in total from any cleaning at all as there are many files with a .tmp or .temp file extension and also many zero length files that are all needed and so should never be deleted in a cleanup.

http://localhost/xampp/phpinfo.php should give you the phpinfo() file.
Check the entry Configuration file used and it should C:\xampp\php\php.ini file.


The last time you started and stopped Apache in in the old log file there were no issues and of course the new log file shows the same no issues so the problem must reside elsewhere and the first thing to establish is that the lang.tmp file is present and has the 2 letter language code on the first line - the 2 letter codes can be found in the C:\xampp\htdocs\xampp\lang folder.

Other issues may be in the vhosts file but the log file is not picking up any serious issues, but I want to check it out for correctness.

Sometimes there are issues related to installing/uninstalling many times especially if it was not performed correctly each time - how did you install it the last time, installer version or the ZIP version?

Here is a link to help uninstall and then use the ZIP version to reinstall XAMPP 1.7.4 which for many has helped eliminate some unexplainable issues associated with the installer version in Win7 64bit:
viewtopic.php?p=179699#p179699


Please paste your C:\xampp\apache\conf\extra\httpd-vhost.conf file for checking.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

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

Postby The Un-dr. » 16. May 2011 06:42

O.K., the lang.tmp file is present and "en" is the only entry.

Next, http://localhost/xampp/phpinfo.php returns a totally blank white page.

The last installation was the ZIP version.

Here is the httpd-vhost.conf file with changes made according to David Powers' instructions here: http://foundationphp.com/tutorials/apache22_vhosts.php
and here in Adobe forums when I asked for help: http://forums.adobe.com/thread/842500?tstart=0 (FWIW: Here are his instructions for setting up a PHP Development environment in Dreamweaver: http://www.adobe.com/devnet/dreamweaver ... p_php.html )

#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#

<Directory C:/vhosts>
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/vhosts/phpdw1"
ServerName phpdw1
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/vhosts/phpdw2"
ServerName phpdw2
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/vhosts/phpdw3"
ServerName phpdw3
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/vhosts/phpdw4"
ServerName phpdw4
</VirtualHost>

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
##<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host.localhost
##DocumentRoot "C:/xampp/htdocs/dummy-host.localhost"
##ServerName dummy-host.localhost
##ServerAlias www.dummy-host.localhost
##ErrorLog "logs/dummy-host.localhost-error.log"
##CustomLog "logs/dummy-host.localhost-access.log" combined
##</VirtualHost>

##<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
##DocumentRoot "C:/xampp/htdocs/dummy-host2.localhost"
##ServerName dummy-host2.localhost
##ServerAlias www.dummy-host2.localhost
##ErrorLog "logs/dummy-host2.localhost-error.log"
##CustomLog "logs/dummy-host2.localhost-access.log" combined
##</VirtualHost>


I will uninstall using the Windows Control Panel and reinstall per your instructions--hopefully, I won't fall asleep and I'll post my results soon..... ;-)
The Un-dr.
 
Posts: 9
Joined: 15. May 2011 15:12

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

Postby Sharley » 16. May 2011 06:49

You should change the way you uninstall also by using my instructions just to make sure that the other method is not the cause of your issue - it may not be the installation that is the issue but the actual uninstalling of XAMPP.

The secret of success with XAMPP is to make sure it is fully functional and working before attempting to introduce other outside influences, for example a php instance in DW.

This can be accomplished by exercising all the demos in the XAMPP Welcome Page, immediately after installation and before making any changes to the default configs.

A blank phpinfo does not look good as it may mean that php is not using the correct php.ini file - make sure you only have one on your PC and it is the one in the php folder in XAMPP.

Always keep you eye on the error.log file when ever anything strange happens.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

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

Postby The Un-dr. » 16. May 2011 07:54

Sorry, I couldn't uninstall using Windows. I just deleted the xampp folder as you said.

Then reinstalled with success. Localhost/Homepage opened fine. I reset the security passwords for phpmyadmin and xampp. MySQL also says it's secure. phpinfo() opened fine; phpMyAdmin opened fine.

Then I made changes to the php.ini file. Then I got the German Homepage and exclamation point again. So I returned the php.ini file to its original status and the Homepage opens fine again.

So there must be something that David Powers is recommending for configuration changes that is messing things up?

The error log is massive, so I've abbreviated it below because it repeats lines many, many times:

[Mon May 16 01:18:21 2011] [notice] Digest: generating secret for digest authentication ...
[Mon May 16 01:18:21 2011] [notice] Digest: done
[Mon May 16 01:18:22 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Mon May 16 01:18:22 2011] [notice] Server built: Oct 18 2010 01:58:12
[Mon May 16 01:18:22 2011] [notice] Parent: Created child process 4388
[Mon May 16 01:18:23 2011] [notice] Digest: generating secret for digest authentication ...
[Mon May 16 01:18:23 2011] [notice] Digest: done
[Mon May 16 01:18:24 2011] [notice] Child 4388: Child process is running
[Mon May 16 01:18:24 2011] [notice] Child 4388: Acquired the start mutex.
[Mon May 16 01:18:24 2011] [notice] Child 4388: Starting 150 worker threads.
[Mon May 16 01:18:24 2011] [notice] Child 4388: Starting thread to listen on port 443.
[Mon May 16 01:18:24 2011] [notice] Child 4388: Starting thread to listen on port 80.
[Mon May 16 01:18:35 2011] [error] [client 127.0.0.1] PHP Warning: file_get_contents(lang.tmp) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in C:\\xampp\\htdocs\\xampp\\index.php on line 2
Adding password for user Martin
[Mon May 16 01:22:26 2011] [error] (OS 6)The handle is invalid. : Child 4388: Encountered too many errors accepting client connections. Possible causes: Unknown. Try using the Win32DisableAcceptEx directive.
[Mon May 16 01:22:26 2011] [error] (OS 6)The handle is invalid. : Child 4388: Encountered too many errors accepting client connections. Possible causes: Unknown. Try using the Win32DisableAcceptEx directive.
[Mon May 16 01:22:26 2011] [error] (OS 6)The handle is invalid. : Child 4388: Encountered too many errors accepting client connections. Possible causes: Unknown. Try using the Win32DisableAcceptEx directive.
..............[repeats the "Child 4388" entry dozens of times, then repeats the "Child 6384" entry dozens of times:]
[Mon May 16 01:29:02 2011] [error] (OS 6)The handle is invalid. : Child 6384: Encountered too many errors accepting client connections. Possible causes: Unknown. Try using the Win32DisableAcceptEx directive.
[Mon May 16 01:29:02 2011] [error] (OS 6)The handle is invalid. : Child 6384: Encountered too many errors accepting client connections. Possible causes: Unknown. Try using the Win32DisableAcceptEx directive.
[Mon May 16 01:29:02 2011] [error] (OS 6)The handle is invalid. : Child 6384: Encountered too many errors accepting client connections. Possible causes: Unknown. Try using the Win32DisableAcceptEx directive.
[Mon May 16 01:29:09 2011] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon May 16 01:29:09 2011] [notice] Digest: generating secret for digest authentication ...
[Mon May 16 01:29:09 2011] [notice] Digest: done
[Mon May 16 01:29:10 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Mon May 16 01:29:10 2011] [notice] Server built: Oct 18 2010 01:58:12
[Mon May 16 01:29:10 2011] [notice] Parent: Created child process 2060
[Mon May 16 01:29:11 2011] [notice] Digest: generating secret for digest authentication ...
[Mon May 16 01:29:11 2011] [notice] Digest: done
[Mon May 16 01:29:12 2011] [notice] Child 2060: Child process is running
[Mon May 16 01:29:12 2011] [notice] Child 2060: Acquired the start mutex.
[Mon May 16 01:29:12 2011] [notice] Child 2060: Starting 150 worker threads.
[Mon May 16 01:29:12 2011] [notice] Child 2060: Starting thread to listen on port 443.
[Mon May 16 01:29:12 2011] [notice] Child 2060: Starting thread to listen on port 80.
[Mon May 16 01:36:47 2011] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon May 16 01:36:47 2011] [notice] Digest: generating secret for digest authentication ...
[Mon May 16 01:36:47 2011] [notice] Digest: done
[Mon May 16 01:36:48 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Mon May 16 01:36:48 2011] [notice] Server built: Oct 18 2010 01:58:12
[Mon May 16 01:36:48 2011] [notice] Parent: Created child process 6464
[Mon May 16 01:36:49 2011] [notice] Digest: generating secret for digest authentication ...
[Mon May 16 01:36:49 2011] [notice] Digest: done
[Mon May 16 01:36:50 2011] [notice] Child 6464: Child process is running
[Mon May 16 01:36:50 2011] [notice] Child 6464: Acquired the start mutex.
[Mon May 16 01:36:50 2011] [notice] Child 6464: Starting 150 worker threads.
[Mon May 16 01:36:50 2011] [notice] Child 6464: Starting thread to listen on port 80.
[Mon May 16 01:36:50 2011] [notice] Child 6464: Starting thread to listen on port 443.
[Mon May 16 01:39:17 2011] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon May 16 01:39:17 2011] [notice] Digest: generating secret for digest authentication ...
[Mon May 16 01:39:17 2011] [notice] Digest: done
[Mon May 16 01:39:18 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Mon May 16 01:39:18 2011] [notice] Server built: Oct 18 2010 01:58:12
[Mon May 16 01:39:18 2011] [notice] Parent: Created child process 4916
[Mon May 16 01:39:19 2011] [notice] Digest: generating secret for digest authentication ...
[Mon May 16 01:39:19 2011] [notice] Digest: done
[Mon May 16 01:39:20 2011] [notice] Child 4916: Child process is running
[Mon May 16 01:39:20 2011] [notice] Child 4916: Acquired the start mutex.
[Mon May 16 01:39:20 2011] [notice] Child 4916: Starting 150 worker threads.
[Mon May 16 01:39:20 2011] [notice] Child 4916: Starting thread to listen on port 443.
[Mon May 16 01:39:20 2011] [notice] Child 4916: Starting thread to listen on port 80.
[Mon May 16 01:42:08 2011] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon May 16 01:42:08 2011] [notice] Digest: generating secret for digest authentication ...
[Mon May 16 01:42:08 2011] [notice] Digest: done
[Mon May 16 01:42:09 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Mon May 16 01:42:09 2011] [notice] Server built: Oct 18 2010 01:58:12
[Mon May 16 01:42:09 2011] [notice] Parent: Created child process 6128
[Mon May 16 01:42:10 2011] [notice] Digest: generating secret for digest authentication ...
[Mon May 16 01:42:10 2011] [notice] Digest: done
[Mon May 16 01:42:11 2011] [notice] Child 6128: Child process is running
[Mon May 16 01:42:11 2011] [notice] Child 6128: Acquired the start mutex.
[Mon May 16 01:42:11 2011] [notice] Child 6128: Starting 150 worker threads.
[Mon May 16 01:42:11 2011] [notice] Child 6128: Starting thread to listen on port 443.
[Mon May 16 01:42:11 2011] [notice] Child 6128: Starting thread to listen on port 80.



Does that error log indicate anything important?
Thanks!
The Un-dr.
 
Posts: 9
Joined: 15. May 2011 15:12

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

Postby Sharley » 16. May 2011 08:06

Open C:\xampp\apache\conf\extra\httpd-mpm.conf in your text editor and remove the comment in front of #Win32DisableAcceptEx so it looks like this:
Code: Select all
# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum  number of requests a server process serves
# Win32DisableAcceptEx: Use accept() rather than AcceptEx() to accept network connections
<IfModule mpm_winnt_module>
    ThreadsPerChild      150
    MaxRequestsPerChild    0
    Win32DisableAcceptEx
</IfModule>
Save the file and restart Apache, this may clean up some of the log file.

BTW, when Apache is stopped you can clean out the error.log file or simply delete it as it will be created again empty when you start Apache.

Paste here the changes you are trying to make in the php.ini file or reference the tutorial item again so I can try and reproduce your issue.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

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

Postby The Un-dr. » 16. May 2011 15:39

O.K. I made the change you suggested. The Homepage is opening up just fine. I'm using Control Panel v3.0.2

Here are the configuration changes in php.ini from David Powers' book: "Adobe Dreamweaver CS5 with PHP: Training from the Source":

log_errors changed to "Off" (he suggests this because the log can get huge and because a notification of errors is given anyway--what do you think?)

short_open_tag changed to "Off" (no explanation for why he makes this change)

Timezone changed to CDT which is: "America/Chicago"

Thanks for all your help, Sharley!
The Un-dr.
 
Posts: 9
Joined: 15. May 2011 15:12

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

Postby Altrea » 16. May 2011 17:04

The Un-dr. wrote:log_errors changed to "Off" (he suggests this because the log can get huge and because a notification of errors is given anyway--what do you think?)

On Developement environments, thats okay. In production Environments you should always log errors and never give them out to the user. Logs can be huge is nonsense.
First, it depends on your own PHP Knowledge how many PHP messages you will get (and can solve). Second you have the full control on your log files. If one is getting hugh, just open a new one or clean the old one.

The Un-dr. wrote:short_open_tag changed to "Off" (no explanation for why he makes this change)

Because many many Tutorials and Views in Templates uses Short Tags instead of the full one.
It's okay to turn it on.
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: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

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

Postby Sharley » 16. May 2011 23:55

None of those php.ini edits should cause any issues with what pages are displayed when you go to localhost - suggest you clear out your browser's cache and try again as often a cached file is presented instead of a new page.

Do one item edit at a time save the file and restart Apache then go to localhost and see if this method reveals the culprit, you may have to swap the order in which you make edits to establish which one is causing this strange behavior.

Check your error.log file and access.log file just after you get this strange issue.

BTW short_open_tag should remain Off - check your php code always has the full tags
Code: Select all
<?php   ?>
not this short_open_tag
Code: Select all
<?  ?>
as this may be used by other codes and so give unexpected parsing errors by Apache - see the comments in the php.ini file.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

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

Postby The Un-dr. » 17. May 2011 05:03

O.K., next round... ;-)

I cleared the cache in Firefox 4.

I then went through different settings for the php.ini file. The problem seems to appear only when short_open_tag is set to Off. Just changing the log_errors to Off doesn't make a difference; just changing the timezone to "America/Chicago" doesn't make a difference.

There are two short_open_tag entries as follows:

This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It's been
; recommended for several years that you not use the short tag "short cut" and
; instead to use the full <?php and ?> tag combination. With the wide spread use
; of XML and use of these tags by other languages, the server can become easily
; confused and end up parsing the wrong code in the wrong context. But because
; this short cut has been a feature for such a long time, it's currently still
; supported for backwards compatibility, but we recommend you don't use them.
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = On
; XAMPP for Linux is currently old fashioned
short_open_tag = On


I tried turning both "Off," the top one "On" and the bottom one "Off" and they don't work. However, the top one "Off" and the bottom one "On" works--this still seems to be a problem because Powers writes in the book: "If the same directive is repeated in php.ini, the lower one takes precedence." Of course, having both of them "On" works. I also tried to put a comment/semi-colon in front of the first one with the bottom one "Off," but that didn't work.

So, now what?! How do I get the short_open_tag turned off to avoid the parsing errors both you and Powers warn against?

Edit: I just checked the phpinfo() page and the Date section is preceded by this warning:

Warning: phpinfo() [function.phpinfo]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for '-5.0/DST' instead in C:\xampp\htdocs\xampp\phpinfo.php on line 2


I did change the date/timezone to "America/Chicago." Should I do anything with this?
The Un-dr.
 
Posts: 9
Joined: 15. May 2011 15:12

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

Postby Sharley » 17. May 2011 07:43

After all the ranting from the developers to use short_open_tags = off they produce pages in the C:\xampp\htdocs\xampp folder with short_open_tags in the code - shameful, as 1.7.3 had no issues in fact in 1.7.3 php.ini file there was only one sot entry not 2 and it was Off.

That is why you see the strange exclamation mark in the start page as Apache is not parsing the php code.

So my advise for 1.7.4 and for 1.7.5 versions is to leave the php.ini file as the default
Code: Select all
short_open_tag = Off
; XAMPP for Linux is currently old fashioned
short_open_tag = On
as that seems to work for displaying the start page in the Welcome Demo Page.

After a short rant to the lead developer and forum Administrator Kai 'Oswald' Seidler about the short tags in XAMPP he responded very quickly like so:
Kai wrote:Hi Sharley,

you are right, and I totally agree with you. The main problem is, that PHP still ships PHP with short_open_tags set to on by default. Since many people use PHP with this setting, they started to complain and ask why XAMPP's PHP isn't working correctly.

We had the same issue with register_globals, but at some point of time PHP set this by default to off. And so we could also switch this setting to off.

Strange side note: We already migrated the XAMPP pages to use the long tag, but I don't know why they are back to the short tag version...

Greetings
Kai
Thanks Kai.
So it may well be some buggy thing that has happened and if so then it could well be fixed in 1.7.5 b3 or at least in the 1.7.5 stable.


Your date time zone looks fine to me, are you having issues?
I have not seen that particular reference to daylight saving time before.
That is a GMT/UTC -5/DST setting entry somewhere and if you can find it in XAMPP then simply replace with your current good setting - sorry I don't know off hand where that format would be used unless it is in your PC system settings.

You should be able to move forward now.
Good luck :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

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

Postby Altrea » 17. May 2011 09:30

Sharley wrote:BTW short_open_tag should remain Off - check your php code always has the full tags
Code: Select all
<?php   ?>
not this short_open_tag
Code: Select all
<?  ?>
as this may be used by other codes and so give unexpected parsing errors by Apache - see the comments in the php.ini file.


Just a different point of view:
short_open_tag just gives problems if XML DOCTYPES are used in .php files.

There is a simple workaround to leave short_open_tags on and be able to use XML DOCTYPES.

Instead of using XML DOCTYPES like this:
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>


You can output the first part php like:
Code: Select all
<?php echo '<?'; ?>xml version="1.0" encoding="utf-8" ?>


Many CMS beginners are trying are using short-tags. I think they will get more common in touch with them, then with XML Doctypes in .php files ;)
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: 8294
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. » 18. May 2011 05:21

Sharley,

You're amazing! Thanks so much for all the information and insight!

I guess for now I'll live with the short tags on and hope nothing messes up the parsing thang...but...could that be what's happening with my virtual hosting problem? After I set up virtual hosting in Dreamweaver according to David Powers's step-by-step instructions, DW won't render the php Wordpress template pages (#s 8 & 9) I downloaded from another guy at Adobe's site here: http://www.adobe.com/devnet/dreamweaver ... s_pt2.html So maybe there's short tags in those templates? I wouldn't think a professional developer at Adobe would use them, but what do I know?

Regarding the Timezone, no, I don't think I'm having any issues. I couldn't find the GMT/UTC -5/DST entry either, so I guess I'll leave it to America/Chicago for now.

Altrea,

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? And if I had them, where would I use that workaround code, exactly--in the php file or in xampp's php.ini file?

Thanks!
The Un-dr.
 
Posts: 9
Joined: 15. May 2011 15:12

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 69 guests