Показаны сообщения с ярлыком Apache2. Показать все сообщения
Показаны сообщения с ярлыком Apache2. Показать все сообщения

среда, 20 февраля 2013 г.

Apache2 Negotiation: discovered file(s) matching request

Params:

 - Linux A230512 3.5.0-24-generic #37-Ubuntu SMP Thu Feb 7 01:50:30 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
 - Apache/2.2.22

Problem:
I trying to get page from local server by URL: http://<sitename>/index/index/site_id/6. There one input point "index.php", htaccess configured properly. But "Page not found" returned.

Solution:
Apache log show this message "Negotiation: discovered file(s) matching request...". It mean you need to disable "MultiViews" in domain configuration.

1) Edit domain configuration file
> nano -w /etc/apache2/sites-available/<site-configuration-file>
2) Find this row "Options Indexes FollowSymLinks MultiViews" and remove phrase "MultiViews".
As a result you should have this "Options Indexes FollowSymLinks". Save file.

3) Restart apache
> /etc/init.d/apache2 restart

Note:
OS Ubuntu 12.10, In your system routes and commands may be different.

среда, 16 января 2013 г.

Configure ZendDebugger for PHP5.4

Params:
OS: Ubuntu12.10 - Linux A230512 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Web server: Apache2
PHP: PHP 5.4.6-1ubuntu1.1  Zend Engine v2.4.0

Problem:
Need to debug php scripts with ZendStudio10(beta!). But officially Zend doesn't produce Debugger for PHP v5.4, latest version for v5.3

Solution:
Main idea: download ZendServer package for PHP5.4 get ZendDebugger from this pacakge and install it manually. Follow those steps and you will be fine!

1) Get deb package of ZendServer(depending your system 64 bit or 32) for PHP5.4
> wget http://repos-source.zend.com/zend-server/preview-php5.4/deb/pool/php-5.4-debugger-zend-server_5.3.33+b7_amd64.deb
2) Unpack it:
> dpkg -x php-5.4-debugger-zend-server_5.3.33+b7_amd64.deb php54debugger
3) Copy ZendDebugger.so to the right place:
> cp ./usr/local/zend/lib/debugger/php-5.4.x/ZendDebugger.so /usr/lib/php5/20100525/ZendDebugger.so
4) Copy zend debugger.ini to the right place:
> cp ./usr/local/zend/etc/conf.d/debugger.ini /etc/php5/mods-available
5) Now you need to replace one string that ini file. Find this string
zend_extension_manager.dir.debugger=/usr/local/zend/lib/debugger
and replace it to this
zend_extension=/usr/lib/php5/20100525/ZendDebugger.so
6) Enable this ini file:
> ln -s /etc/php5/mods-available/debugger.ini /etc/php5/fpm/conf.d/30-debugger.ini
7) Restart web server:
> /etc/init.d/apache2 restart

This works for me from the box, no additional actions.

PS. All scripts and commands depends of your OS, in this version its Ubuntu.
Giant thanks to the author of this post original version