validate Apache2.4 installation in windows 7 command prompt - apache

I stalled Apache2.4.3 and PHP 5.4.11 on my desktop computer which runs Windows 7 professional. I would like to know what command shall I run in the command prompt to check if the Apache server has been properly installed.
On my C drive, Apache folder called Apache24 and Php folder called php
I run a test.php file which has a phpinfo function in it. It showed PHP and Apache version information asApache/2.4.3 (Win32) PHP/5.4.11
the system showed the following message when I typed httpd.exe in the command prompt
c:\Apache24\bin>httpd.exe
AH00558: httpd.exe: Could not reliably determine the server's fully qualified do
main name, using fe80::bcbd:7ef2:4d92:6a9. Set the 'ServerName' directive globally
to suppress this message
Please tell me what the above message means. Does it indicate the Apache is not installed properly?
I added 3 lines to the http.conf file
LoadModule php5_module "c:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir "c:/php"

I did some research online. Here is what I did to resolve my issue.
install the Apache as a window service.
1a. You should run the command prompt (DOS prompt) as an administrator, otherwise the window system will prompt an error message saying that your are not the administrator.
1b. To run command as an administrator, click on Window start up menu icon, find the command prompt icon, right click on it, then choose run as 'Administrator'
1c. in the Dos prompt, navigate to c:\apach24\bin\ folder, then type httpd -k install. This will install Apache as a window service.
I hope this helps. Thanks!

Related

How to install xdebug in centos 7?

I am using centos 7 & apache server, for remote debug purpose in VS Code how to install and configure xdebug in Live GoDaddy VPS server?
PHP version : 5.6
if you have php7 in centos7 with webtactic and epel you can install xdebug with the following
yum install php70w-pecl-xdebug.x86_64
if you have epel and webtactic, but not php7 you can install xdebug with:
yum install php-xdebug
Now that xdebug is in your sytstem its time to confgure xdebug
open /etc/php.d/xdebug.ini in your favourite editor
add the following lines
#this line will be added automatically
zend_extension = /usr/local/lib/php/extensions/xxx/xdebug.so
#add the following
xdebug.remote_log="/tmp/xdebug.log"
xdebug.profiler_enable = 1
xdebug.remote_enable=on
xdebug.remote_port=9000
xdebug.remote_autostart=0
xdebug.remote_connect_back=on
xdebug.idekey=editor-xdebug
You can find the correct paths to the files needed if you have yum-utils installed and run
repoquery --list php70w-pecl-xdebug
# the output is:
/etc/php-zts.d/xdebug.ini
/etc/php.d/xdebug.ini
/usr/bin/debugclient
/usr/lib64/php-zts/modules/xdebug.so
/usr/lib64/php/modules/xdebug.so
/usr/share/doc/php70w-pecl-xdebug-2.4.1
/usr/share/doc/php70w-pecl-xdebug-2.4.1/CREDITS
/usr/share/doc/php70w-pecl-xdebug-2.4.1/LICENSE
/usr/share/doc/php70w-pecl-xdebug-2.4.1/README.rst
/var/lib/pear/pkgxml/xdebug.xml
You now need to restart httpd
service httpd restart
# or
systemctl restart httpd.service
Xdebug will now be up and running
If you are running with SELinux enforement on, then you can run this command to let xdebug out:
setsebool -P httpd_can_network_connect 1
Eclipse
Inside eclipse, goto preferences > php > debuggers
change the debugger to xdebug
click configure
change the dropdown for “accept remote session (JIT)” to “any” or “prompt”
click ok
Firefox
Xdebug Helper is the best solution I have found for firefox – simply install the extension from here, navigate to the site you want to debug, and click the little green bug, select debug and reload your page to open in your editors debugger. You might need to add the key you added to your xdebug.ini in the previous steps.
Chrome
Xdebug Helper is the best solution I have found for chrome – simply install the extension from here, navigate to the site you want to debug, and click the little green bug, select debug and reload your page to open in your editors debugger. You might need to add the key you added to your xdebug.ini in the previous steps.

Cannot set-up MyPHPadmin in Apache

I just started using Apache, but when I try to run myPHPadmin, I get this error message:
1 - Can't create/write to file '/var/folders/w1/5yx2p9mj7w9bm67gdwhqxwsr0000gn/T/#sql1ba_3_0.MYI' (Errcode: 13)
Another post in the Stack Overflow suggested changing the permissions on the XAMPP file, my.cnf, with this command:
sudo chmod 600 my.cnf
I tried running the code in Mac Terminal, but the result was "No such file or directory."
Does anyone know what I should try next?
This is a permission problem on your datadir (where MySQL wants to write files). Normally, at MySQL installation, correct permissions are set for the user who runs mysqld.
Are you sure that MySQL was installed correctly as part of XAMPP installation?

Testing the database connection in Yii framework

The following commands produce errors. And have only been working with yii 4 days now.. please help to solve this.
C:\wamp\www\yii\trackstar\protected\tests\unit>phpunit DbTest.php
'phpunit' is not recognized as an internal or external command, operable program or batch file.
The above error states that PHPUnit is not installed in you WAMP stack.
The easiest method to install it is using PEAR. Try following this method to install PHPUnit with PEAR :
Go to the directory where PHP is located. Typically, this is \bin\php\php5.3.8
We’ll call this path “PHP’s location”
Download “go-pear.phar” from this location:
pear.php.net/go-pear.phar
Create a folder “pear” in your PHP’s location
Put the downloaded “go-pear.phar” file in this location.
Open a command prompt with administrative privilege. For this, click
on start menu, type “cmd” – you can see the cmd.exe icon.
Right-click on this icon and click “Run as administrator”
Cmd.exe will open. Go to the direcotry of your PHP’s location, by
typing “cd” command. For example, my wamp is located in “D:\wamp”,
so I write following command:
D:
cd wamp\bin\php\php5.3.8
Now run the downloaded file, by typing:
php .\pear\go-pear.phar
Installation will begin! During installation, you’ll need to respond
to some prompts, just hit enter/press “Y” when necessary.
After installing, double-click and instal “PEAR_ENV.reg” found in
your PHP’s location.
Optionally, you can add your PHP’s location in your PATH variable.
After you can install PHPUnit like this :
Open a command-prompt, go to PHP’s location using cd, and type:
pear channel-discover components.ez.no
pear channel-discover pear.phpunit.de
pear channel-discover pear.symfony-project.com
pear install --alldeps phpunit/PHPUnit
Type phpunit –version to confirm installation.
That should install PHPUnit, and now you may try
phpunit DbTest.php
Hopefully, it should work.
Regards,
If you're trying to set up unit tests then I found it quicker and easier to set up a ubuntu virtual machine. It will only take a couple of hours including PHPunit and selenium server. Whereas you could spend hours or days trying to get PHP paths and system variables right on windows.

Tomcat - The system cannot find the file specified

I downloaded Tomcat 6 from Tomcat Website and try to install. I found the .exe file in C:\apache-tomcat-6.0.35\bin but when i run the exe file the command prompt disappeared after show "The system cannot find the file specified". I already installed JDK 6 update 29 in my system. Please advice
I had a simmilar problem after installing a java update, but JAVA_HOME was set correctly. If you run tomcat as a service, you might have to right click on the tomcat icon and open java tab and change java virtual machine path or just set "use default".
If I were to "guess" I would say that the JAVA_HOME is not set. But to confirm :
Can you go the command line, make sure that JAVA_HOME is set correctly, startup tomcat (from command line) ? If you run into errors, please send the text output.
Try to run "startup.bat" to start a tomcat instance.
Go to your/path/tomcat and execute script catalina_start.bat .I had the same issue and this worked for me (though I installed Tomcat as a part of XAMPP package)

How do I install the Apache FtpServer as a service within Windows 7 (64-bit)?

I tried everything I could think of, but I always get this error when I try to start the Apache FtpServer service.
Windows could not start the Apache FtpServer on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 0.
Has anyone got Apache FtpServer to function as a Windows service in Windows 7 or even Windows Vista?
Note:
My Java_HOME environment variable is set as c:\java and I have a symbolic link, linking this directory to the longer C:\Program Files\Java\jdk1.6.0_17.
I also have another symbolic link pointing c:\ftp to the longer C:\Program Files (x86)\Apache Software Foundation\apache-ftpserver-1.0.3.
The only reason I did any of this in the first place is because I was reading that some people were having problems with spaces or long path names, but I tried physically moving the directories as well, all with the same error.
I had the same issue today using apache ftpser 1.0.5., the error message was "Failed installing 'ftpd' service".
The solution was to start the DOS command shell as "Administrator".