Closed florianvp closed 6 years ago
Hi Florian,
Since it's a symfony based project, you have to run following commands in dev env.
cd projectroot/symfony
php symfony cc
php symfony doctrine:build-model
php symfony orangehrm:publish-assets
Hi samanthajayasinghe,
Thanks a lot for you answer. I tried this, and nothing more came on screen. In my terminal i can see this error : "Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/html/orangehrm/symfony/lib/vendor/symfony/lib/util/sfToolkit.class.php on line 362 PHP Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/html/orangehrm/symfony/lib/vendor/symfony/lib/util/sfToolkit.class.php on line 362"
When I change preg_replace() by preg_replace_callback() like noticed, I have an other error : "Warning: preg_replace_callback(): Requires argument 2, ''::'.strtoupper('\1')::strtoupper('\2')', to be a valid callback in /var/www/html/orangehrm/symfony/lib/vendor/symfony/lib/util/sfToolkit.class.php on line 362 PHP Warning: preg_replace_callback(): Requires argument 2, ''::'.strtoupper('\1')::strtoupper('\2')', to be a valid callback in /var/www/html/orangehrm/symfony/lib/vendor/symfony/lib/util/sfToolkit.class.php on line 362"
I have checked on the 3.3.3 version the function was the same like on my 3.0.1 version. May I have ton consider upgrading and try your three magic commands ? :-)
Florian
Hi Florian,
What's your php version ? 5.6 is recomanded.
Did you get the source via git clone or download via sourceforge ?
if it's a git clone above commands will work. anyway 5.4 is on the way.
Hi samanthajayasinghe,
Thanks again.
I have installed 5.6 only for that, so yes it is. I get it by both sources, so I try again by git clone 3.3.3 on a new folder and a new db.
I came on the same result than 3.0.1 : a blank login form (wich is a progress because before I have nothing on the screen :) )
And the same errors :
"Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/html/orangehrm/symfony/lib/vendor/symfony/lib/util/sfToolkit.class.php on line 362 PHP Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/html/orangehrm/symfony/lib/vendor/symfony/lib/util/sfToolkit.class.php on line 362"
When I change preg_replace() by preg_replace_callback() like noticed, I have an other error : "Warning: preg_replace_callback(): Requires argument 2, ''::'.strtoupper('\1')::strtoupper('\2')', to be a valid callback in /var/www/html/orangehrm/symfony/lib/vendor/symfony/lib/util/sfToolkit.class.php on line 362 PHP Warning: preg_replace_callback(): Requires argument 2, ''::'.strtoupper('\1')::strtoupper('\2')', to be a valid callback in /var/www/html/orangehrm/symfony/lib/vendor/symfony/lib/util/sfToolkit.class.php on line 362"
i'm looking to find a way ...
thanks again for you support !
Best
Florian.
Hello again,
I have found answers ... but it's not enough ...
For the first problem : "require_once DIR . '../../../lib/vendor/autoload.php' " on orangehrmRESTPluginConfiguration.class.php I change it by : "require_once dirname(FILE).'/../../../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';"
And it's look to be good (by the way I d'ont understand why I haven't an autoload.php file on my folder (and on the git !)
For the second problem in sfToolkit.class.php : I replace :
public static function pregtr($search, $replacePairs) { return preg_replace(array_keys($replacePairs), array_values($replacePairs), $search); }
by :
public static function pregtr($search, $replacePairs){ // return preg_replace(array_keys($replacePairs), array_values($replacePairs), $search); foreach($replacePairs as $pattern => $replacement) { if (preg_match('/(.)e$/', $pattern, $matches)) { $pattern = $matches[1]; $search = preg_replace_callback($pattern, function ($matches) use ($replacement) { preg_match("/('::'.)?([a-z])('\\([0-9]{1})')/", $replacement, $match); return ($match[1]==''?'':'::').call_user_func($match[2], $matches[$match[3]]); }, $search); } else { $search = preg_replace($pattern, $replacement, $search); } } return $search; }
And I have no errors, but still the same result : blank form like you can see here : http://rh.lamarkyse.fr
I'm on Ubuntu 16.04 that I have downgraded on php5.6 with this tutorial : https://lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu
Thanks for you help,
Florian
Yiha !!!
After enable the debug mode, I see an error on the home page and after a search it's about simplexml don't enable on my php5.6 so I "sudo apt-get install php5.6-simplexml" and everything goes OK :)
I hope that's everything else will be OK !
Thanks for you support @samanthajayasinghe 🥇 ;-)
Closing the issue as issue is resolved.
Hello,
After lot of installation try (I'm on ubuntu 16.04 si I've reinstall php 5.6 for making it working) I've a clean install which works with 3.0.1 (don't ask me why 3.3.2 or 3.3.3 don't finish install).
But the install form wasn't full, text input et submit button are missing. The only way to connect was to comment the value like " //echo __('Username'); ?>" ... so strange !
After this "trick" I could connect, but I have nothing on the screen after : blank page in index.php/auth/validateCredentials ....
Could you please help me,
Best,
Florian.