<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Apache &#8211; Aimeos</title>
	<atom:link href="https://aimeos.org/tips/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>https://aimeos.org/tips</link>
	<description>ultra fast PHP e-commerce framework</description>
	<lastBuildDate>Tue, 17 Nov 2020 16:56:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.7.8</generator>

<image>
	<url>https://aimeos.org/tips/wp-content/uploads/2019/09/Aimeos_e_200-100x104.png</url>
	<title>Apache &#8211; Aimeos</title>
	<link>https://aimeos.org/tips</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Setup a working Neos CMS environment</title>
		<link>https://aimeos.org/tips/setup-a-working-neos-cms-environment/</link>
					<comments>https://aimeos.org/tips/setup-a-working-neos-cms-environment/#comments</comments>
		
		<dc:creator><![CDATA[aimeos]]></dc:creator>
		<pubDate>Thu, 23 Apr 2015 07:00:08 +0000</pubDate>
				<category><![CDATA[Neos]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://aimeos.org/tips/?p=89</guid>

					<description><![CDATA[This article is for Neos 2.0 and thing might have changed in the meantime. At least the software packages are required in newer versions. Neos is well known for its well designed interface for editors who quickly fall in love<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://aimeos.org/tips/setup-a-working-neos-cms-environment/">Read more <span class="screen-reader-text">Setup a working Neos CMS environment</span><span class="meta-nav"> &#8250;</span></a></div><!-- end of .read-more -->]]></description>
										<content:encoded><![CDATA[<p><strong>This article is for Neos 2.0 and thing might have changed in the meantime. At least the software packages are required in newer versions.</strong></p>
<p><a title="Neos" href="https://neos.typo3.org/">Neos</a> is well known for its well designed interface for editors who quickly fall in love with the system. On the other hand, it&#8217;s also infamous for being hard to set up by starters due to its high demands towards the hosting environment. Someone also compared it to walking on a slack line: It&#8217;s easy to stumble and to get frustrated.</p>
<p><img width="750" height="275" class="image-inline aligncenter size-full wp-image-97" src="/tips/wp-content/uploads/2015/04/neos-error.png" alt="Neos error page" srcset="https://aimeos.org/tips/wp-content/uploads/2015/04/neos-error.png 750w, https://aimeos.org/tips/wp-content/uploads/2015/04/neos-error-300x110.png 300w, https://aimeos.org/tips/wp-content/uploads/2015/04/neos-error-100x37.png 100w, https://aimeos.org/tips/wp-content/uploads/2015/04/neos-error-150x55.png 150w, https://aimeos.org/tips/wp-content/uploads/2015/04/neos-error-200x73.png 200w, https://aimeos.org/tips/wp-content/uploads/2015/04/neos-error-450x165.png 450w, https://aimeos.org/tips/wp-content/uploads/2015/04/neos-error-600x220.png 600w" sizes="(max-width: 750px) 100vw, 750px" /></p>
<p>This article focuses on creating a hosting environment suited for Neos so you will be able to finish the Neos setup and get a running instance afterwards. I&#8217;m using Ubuntu 14.04 as reference but it also applies to other Linux distributions like Fedora, only the path names might differ a bit (<code>/etc/apache2/</code> vs. <code>/etc/httpd/</code>).</p>
<p><span id="more-89"></span></p>
<h2>Required software</h2>
<p>At first, you need to make sure that the required software is installed. Apache, MySQL and PHP might be obvious but that&#8217;s not enough. Especially the additional Apache and PHP modules are important to get it running at all. You will have a good start with these packages:</p>
<ul>
<li>Apache 2.2+</li>
<li>MySQL 5.1+</li>
<li>PHP 5.3.2+
<ul>
<li>mbstring</li>
<li>tokenizer</li>
<li>pdo_mysql</li>
</ul>
</li>
</ul>
<p>Even if the minimum requirement for PHP is version 5.3.2, it&#8217;s better to use newer versions for performance reasons. Also, the requirements for Neos will be PHP 5.5+ for Neos 2.0.</p>
<p>You can install the required packages via the package manager of your distribution (apt-get for Ubuntu/Debian, rpm for Fedora/SuSE):</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="bash"><ol><li class="li1"><pre class="de1"><span class="kw2">sudo</span> <span class="kw2">apt-get install</span> apache2 mysql-server libapache2-mod-php5 php5 php5-mysql</pre></li></ol></div></div></div></div></div></div></div>


<p>To check if all required PHP extensions are available, the easiest way is to place a short PHP file named <code>info.php</code> in your Apache document root directory (usually <code>/var/www/</code>) containing this content:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="php"><ol><li class="li1"><pre class="de1"><span class="sy0">&amp;</span>lt<span class="sy0">;</span>?php <span class="kw3">phpinfo</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></li></ol></div></div></div></div></div></div></div>


<p>If you open <code>http://localhost/info.php</code> in your browser, the output will contain the environment, the configuration settings and the installed modules available in your installation. Search for the strings &#8220;mbstring&#8221;, &#8220;tokenizer&#8221; and &#8220;pdo_mysql&#8221;. There should be sections with this names in the rendered page.</p>
<h2>Apache configuration</h2>
<p>Most often, the first problems occur due to an insufficient Apache configuration. Neos uses .htaccess files and needs some modules that are not activated by default all the times. The &#8220;mod_rewrite&#8221; and &#8220;mod_env&#8221; modules are the best examples for this. To enable them in your Apache configuration, you need to execute these commands on the command line:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="bash"><ol><li class="li1"><pre class="de1"><span class="kw2">sudo</span> a2enmod rewrite</pre></li><li class="li1"><pre class="de1"><span class="kw2">sudo</span> a2enmod <span class="kw2">env</span></pre></li></ol></div></div></div></div></div></div></div>


<p>If you got the message that one or both modules had been already enabled then this was set up correctly before.</p>
<p>The VHost configuration is another common source of problems and you have to adapt it for sure. The default configuration is located in <code>/etc/apache2/sites-enabled/000-default.conf</code> (in Fedora or other Linux distributions the files might be located somewhere else). In this file, change the <code>DocumentRoot</code> to the Neos <code>./Web/</code> directory, e.g.</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="apache"><ol><li class="li1"><pre class="de1"><span class="kw1">DocumentRoot</span> /var/www/Neos/Web</pre></li></ol></div></div></div></div></div></div></div>


<p>Furthermore, you need to add a &#8220;Directory&#8221; directive below the &#8220;DocumentRoot&#8221; line to allow the Neos .htaccess file to add rewrite rules and some settings:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="apache"><ol><li class="li1"><pre class="de1">	<span class="kw1">AllowOverride</span> <span class="kw2">All</span></pre></li></ol></div></div></div></div></div></div></div>


<p>If there&#8217;s already a &#8220;Directory&#8221; section available, replace it with the lines above.</p>
<div class="caution">Keep care that the named directory in the &#8220;Directory&#8221; directive is exactly the same as in the &#8220;DocumentRoot&#8221; AND contains a trailing slash (/).</div>
<p>The last task is to restart Apache:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="bash"><ol><li class="li1"><pre class="de1"><span class="kw2">sudo</span> service apache2 restart</pre></li></ol></div></div></div></div></div></div></div>


<p>Now you should be at able to open at least <code>http://localhost/setup</code> in your browser but beware: <code>http://localhost/index.php/setup</code> <strong>still won&#8217;t work!</strong></p>
<h2>PHP configuration</h2>
<p>There are various PHP settings that can cause your Neos installation to fail. First of all you should have a look into the output of the <code>info.php</code> file again and check if one of the required PHP functions is disabled. This is often the case for security reasons in shared hosting environments and this leads to errors afterwards. Especially check the <code>disable_functions</code> line in the core section for:</p>
<ul>
<li>system</li>
<li>shell_exec</li>
<li>escapeshellcmd</li>
<li>escapeshellarg</li>
</ul>
<p>If non of these function is listed there, then you are on the safe side.</p>
<p>The next problems are lurking in your PHP configuration but that can be fixed either by adding a few lines to your <code>/etc/php5/apache2/php.ini</code> or to the <code>.htaccess</code> file in the Neos <code>./Web/</code> directory. When using the php.ini file you should add these lines at the end of the file:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="apache"><ol><li class="li1"><pre class="de1">memory_limit = 256M</pre></li><li class="li1"><pre class="de1">magic_quotes_gpc = <span class="kw2">off</span> <span class="co1"># only for PHP 5.3 to be sure</span></pre></li><li class="li1"><pre class="de1">date.timezone = Europe/Berlin <span class="co1"># or any other valid timezone</span></pre></li><li class="li1"><pre class="de1">xdebug.max_nesting_level = <span class="nu0">500</span> <span class="co1"># only if XDebug extension is installed</span></pre></li></ol></div></div></div></div></div></div></div>


<p>In case you are allowed to overwrite settings also via the <code>.htaccess</code> file, you can add these lines to the <code>./Web/.htaccess</code> of your Neos installation:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="apache"><ol><li class="li1"><pre class="de1"><span class="kw1">php_value</span> memory_limit = 256M</pre></li><li class="li1"><pre class="de1"><span class="kw1">php_flag</span> magic_quotes_gpc <span class="kw2">off</span> <span class="co1"># only for PHP 5.3 to be sure</span></pre></li><li class="li1"><pre class="de1"><span class="kw1">php_value</span> date.timezone Europe/Berlin <span class="co1"># or any other valid timezone</span></pre></li><li class="li1"><pre class="de1"><span class="kw1">php_value</span> xdebug.max_nesting_level <span class="nu0">500</span> <span class="co1"># only if XDebug extension is installed</span></pre></li></ol></div></div></div></div></div></div></div>


<p>Neos can be very memory consuming so even the standard memory limit of 128MB can be to low. Errors due to an insufficient memory limit are written to the Apache error log file (usually in <code>/var/log/apache2/error.log</code>) so it&#8217;s a good idea to keep an eye on the content of that file.</p>
<p>The <code>magic_quotes_gpc</code> directive has been removed in PHP 5.4 and was already deprecated before. To disable it for PHP 5.3 is only a safety measure for installations that have been constantly updated during the last years.</p>
<p>For the timezone value you can use any valid timezone if it fits better for your location. A list of valid timezones is available at the <a title="PHP valid time zones" href="http://php.net/manual/en/timezones.php">PHP web site</a>.</p>
<p>When you&#8217;ve installed the PHP XDebug extension you might run into error messages like <code>Maximum function nesting level of '...' reached</code>. Only in this case you need to increase the XDebug nesting level for functions.</p>
<h2>Done!</h2>
<p>Finally, you should be able to open the Neos setup page in your browser, that is available at <code>http://localhost/setup</code>. The rest of the installation is usually a non-brainer due to the nice setup routine provided by the Neos installer.</p>
<p>Afterwards you can enjoy Neos. Happy editing! <img src="https://s.w.org/images/core/emoji/13.0.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://aimeos.org/tips/setup-a-working-neos-cms-environment/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
