[TYPO3-50-general] typo3 5.0 on windows

Mathias R. Wulff mathias at rawu.dk
Thu Nov 15 14:28:46 CET 2007


Hi Bastian and Christoph.

I was a bit afraid of the result of an implementation of this kind... so 
I tried the easy solution first: Downgrading to php5.2

For the love of... I don’t know... It worked out!

It seams they have downgraded the requirements to php 5.2 to a week or 
so ago.

So: if you want Typo3 5.0 to run on a Windows, you just need Apache, 
PHP5.2 and typo source... so nice.

Thanks guys for your interest in helping out here...


  - Mathias




Greetings to Karlsruhe: Remember that this is the super best place to 
eat CarryWurst:
http://maps.google.com/maps?f=d&hl=da&geocode=&time=&date=&ttype=&saddr=&daddr=49.010001,8.411378&mra=mi&mrsp=0&sz=21&sll=49.009989,8.411328&sspn=0.000295,0.000628&ie=UTF8&t=k&z=21&om=1

Bastian Waidelich skrev:
> Mathias R. Wulff wrote:
> 
>  > I downloaded the php6, made it run with apache [...]
>  > But no...
>  > Fatal error: Class 'T3_Framework_Component_Manager' not found in 
> C:\!Mathias\$MRW\$www\typo350\TYPO3\Packages\Framework\Classes\T3_Framework.php 
> on line 69
> 
> Hi Mathias,
> 
> I had the same experience and found out that the problem is that 
> spl_autoload_register doesn't seem to work in the current PHP6 version 
> for windows. I got it working by adding a few lines to the Resource 
> Manager (see end of post for unified diff).
> 
> But I would strongly recommend to install TYPO3 5.0 on a virtual machine 
> running a unix based system until PHP 6 is more stable on windows.
> Here's a good TYPO3 5.0 installation tutorial: 
> http://www.yeebase.com/blog/post/typo3-50-installieren-fuer-nicht-programmierer/948/ 
> (sorry, german language)
> 
> BTW: There are rumors that TYPO3 5.0 will soon run with PHP 5.2! See 
> http://www.5-0.dev.typo3.org/trac/TYPO3/changeset/377
> 
> Below the patch (It's really nasty and by no means professional, just 
> wanted to get in running *g)
> 
> All the best
> Basti
> 
> Index: 
> Packages/Framework/Classes/Resource/T3_Framework_Resource_ClassLoader.php
> ===================================================================
> --- 
> Packages/Framework/Classes/Resource/T3_Framework_Resource_ClassLoader.php 
> (revision 376)
> +++ 
> Packages/Framework/Classes/Resource/T3_Framework_Resource_ClassLoader.php 
> (working copy)
> @@ -57,18 +57,20 @@
>       * @return    void
>       * @author    Robert Lemke <robert at typo3.org>
>       */
> -    public function loadClass($className) {
> -        if (isset($this->specialClassNamesAndPaths[$className])) {
> +    public function loadClass($className) {
> +        if (isset($this->specialClassNamesAndPaths[$className])) {
>              $classFilePathAndName = 
> $this->specialClassNamesAndPaths[$className];
>          } else {
>              $classNameParts = explode('_', $className);
>              if (is_array($classNameParts) && $classNameParts[0] == 'T3') {
>                  $classFilePathAndName = $this->packagesDirectory . 
> $classNameParts[1] . '/' . T3_Framework_Package_Package::DIRECTORY_CLASSES;
>                  $classFilePathAndName .= 
> implode(array_slice($classNameParts, 2, -1), '/') . '/';
> -                $classFilePathAndName .= $className . '.php';
> +                $classFilePathAndName .= $className . '.php';
> +                #echo $classFilePathAndName.'<br>';
>              }
>          }
> -        if (isset($classFilePathAndName) && 
> file_exists($classFilePathAndName)) require_once ($classFilePathAndName);
> +        if (isset($classFilePathAndName) && 
> file_exists($classFilePathAndName)) require_once ($classFilePathAndName);
> +        else 
> require_once('C:/wamp/www/TYPO3/FileCache/Private/Framework/AOP/ProxyCache/'.$className.'.php'); 
> 
>      }
> 
>      /**
> Index: 
> Packages/Framework/Classes/Resource/T3_Framework_Resource_Manager.php
> ===================================================================
> --- 
> Packages/Framework/Classes/Resource/T3_Framework_Resource_Manager.php 
> (revision 376)
> +++ 
> Packages/Framework/Classes/Resource/T3_Framework_Resource_Manager.php 
> (working copy)
> @@ -20,7 +20,7 @@
>   * The Resource Manager - Daniel's playground.
>   *
>   * @package        Framework
> - * @version     $Id: $
> + * @version     $Id$
>   * @copyright    Copyright belongs to the respective authors
>   * @license        http://opensource.org/licenses/gpl-license.php GNU 
> Public License, version 2
>   */
> @@ -37,8 +37,9 @@
>       * @return void
>       */
>      public function __construct() {
> -        $this->classLoader = new 
> T3_Framework_Resource_ClassLoader(TYPO3_PATH_PACKAGES);
> -        spl_autoload_register(array($this->classLoader, 'loadClass'));
> +        $GLOBALS['classLoader'] = new 
> T3_Framework_Resource_ClassLoader(TYPO3_PATH_PACKAGES);
> +        $classLoader = $GLOBALS['classLoader'];
> +        #spl_autoload_register(array($this->classLoader, 'loadClass'));
>      }
> 
>      /**
> @@ -55,6 +56,14 @@
>      public function registerClassFile($className, $classFilePathAndName) {
>          if (!is_string($className)) throw new 
> InvalidArgumentException('Class name must be a valid string.', 1187009929);
>          if (!file_exists($classFilePathAndName)) throw new 
> T3_Framework_Resource_Exception_FileDoesNotExist('The specified class 
> file does not exist.', 1187009987);
> -        $this->classLoader->setSpecialClassNameAndPath($className, 
> $classFilePathAndName);
> +        $GLOBALS['classLoader']->setSpecialClassNameAndPath($className, 
> $classFilePathAndName);
>      }
> +}
> +
> +$classLoader = NULL;
> +
> +function __autoload($className) {
> +    if ($GLOBALS['classLoader'] != NULL) {
> +        $GLOBALS['classLoader']->loadClass($className);
> +    }
>  }
> \ No newline at end of file


More information about the TYPO3-project-5_0-general mailing list