Welcome Guest, Not a member yet? Register   Sign In
Drivers on Linux!
#1

[eluser]Glazz[/eluser]
Hello,

I don't know why, but my driver library fails to load on linux, the only fix i found was to remove the strtolower from line ~ 48 on the system/libraries/Driver.php

Code:
$lib_name = (preg_replace('/^CI_/', '', $this->lib_name));

This way my library loads the drivers just fine, anyone had problems with this earlier?

Thank you!
#2

[eluser]WanWizard[/eluser]
coding standards dictate that filenames are lower case. Which is not relevant on a Windows system, which doesn't have a case-sensitive file system, but linux has.

In linux, "Driver.php" !== "driver.php". Do not modify the code, make sure your filenames are lower case.
#3

[eluser]Glazz[/eluser]
WanWizard i know that, but its weird that i've checked the Cache class, and i've coded exactly the same way.. its very strange -.-' maybe i missed something?!
#4

[eluser]WanWizard[/eluser]
Sorry,

Looking with my eyes closed... It's been a while since I've used CI, I see that all files start with a capital letter.

$lib_name is created in the version of Reactor that I have here using
Code:
$lib_name = ucfirst(strtolower(str_replace('CI_', '', $this->lib_name)));

and it is loaded using
Code:
$filepath = $path.'libraries/'.$lib_name.'/drivers/'.$class.'.php';

which means that your driver folder name should be lower case and start with a capital. So "libraries/Mysql_test/drivers" and not "libraries/Mysql_Test/drivers" or something.

Personally I find this very confusing. All directory names in CI are completely lowercase, except libraries/Cache.
#5

[eluser]Glazz[/eluser]
I will take another look at this later, maybe i missed something, but my directory structure is right.

libraries/Server_manager/Server_manager.php
libraries/Server_manager/drivers/Server_manager_cpanel.php
libraries/Server_manager/drivers/Server_manager_ts3.php

I believe this is the right naming form my folders, but mehhhh i might be wrong lol
#6

[eluser]WanWizard[/eluser]
Looks ok. Guess some major debugging is in order then... Wink
#7

[eluser]bubbafoley[/eluser]
this is a bug in CI 2.0.2 ... it's fixed in the tip but they haven't released it yet

https://bitbucket.org/ellislab/codeignit...cache_file
#8

[eluser]Glazz[/eluser]
Hi, thank you i will make that change to my file and see if it works right Smile
#9

[eluser]stuckinphp[/eluser]
I thoroughly enjoy how CI is happy for you to code without models in an MVC framework, but be damned if you want to use a different casing in a filename.




Theme © iAndrew 2016 - Forum software by © MyBB