Login Problem

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
mrinalk
TestLink user
Posts: 3
Joined: Wed Aug 05, 2009 10:32 am

Login Problem

Post by mrinalk »

I am getting problem after configuring test link & opening the page http://localhost/testlink/login.php

Deprecated: Function ereg_replace() is deprecated in C:\wamp\www\testlink\lib\functions\lang_api.php on line 173

Kindly give me any solution.
mimi8991
TestLink user
Posts: 2
Joined: Mon Aug 10, 2009 11:56 pm

Post by mimi8991 »

I've run into the same problem after install 1.8.3. I have another error above the deprecated error:

Strict Standards: Creating default object from empty value in C:\temp\UniServer\www\testlink\cfg\const.inc.php on line 615

Deprecated: Function ereg_replace() is deprecated in C:\temp\UniServer\www\testlink\lib\functions\lang_api.php on line 173

I saw my new users are created in the MySQL database, but I can't login to testlink due to the above 2 errors. Please help!
Rovinsky
TestLink user
Posts: 3
Joined: Wed Aug 12, 2009 3:48 pm

ereg is deprecated

Post by Rovinsky »

Guys, it means that the command ereg is not used anymore. Quick search in google would show that it isn't, since php5.3, whitch i'm guessing that you both are using.

anyway you can solve this by either installing php5.2 or prior or go to the dir testlink\lib\functions\ and change line number 173 in the file lang_api.php there. Change this line:
$t_lang_var = ereg_replace( '^TLS_', '', $t_var );
to be this line:
$t_lang_var = preg_replace( '/^TLS_/', '', $t_var );

That's it! :-)
mimi8991
TestLink user
Posts: 2
Joined: Mon Aug 10, 2009 11:56 pm

Post by mimi8991 »

Thanks for the reply. I figured it out yesterday. I tried preg_replace but I didn't put the slash so it didn't work for me. So I used php5.2 instead, things are working fine now. Thanks again.
Rovinsky
TestLink user
Posts: 3
Joined: Wed Aug 12, 2009 3:48 pm

Post by Rovinsky »

Yeah, it confused me too that they're using different syntax, but from some reason i had trouble installing php5.2, so i had to figure it out :)

it runs okay after that change (i was afraid that this is not the only problem i'll run into), so there is no problem switching back to 5.3 if you need.
mrinalk
TestLink user
Posts: 3
Joined: Wed Aug 05, 2009 10:32 am

Post by mrinalk »

Hi, I have tried the resolution given by you but now it is giving me the problem "Fatal error: Maximum execution time of 60 seconds exceeded in C:\wamp\www\testlink\lib\functions\logger.class.php on line 956" .
I have gone through with the file but there is no field like execution time in the logger.class.php
I have php 5.3.0 installed.

Kindly give me any solution.

Thanks
Rovinsky
TestLink user
Posts: 3
Joined: Wed Aug 12, 2009 3:48 pm

Post by Rovinsky »

Hi,
I didn't have that kind of problem, however i took a look at the logger.class.php file.
My only guess is that you have some file-related problem (like, php can't open files to write to on your disk, or you don't have enough free space or permissions problem or something similar). Please note that this is only a guess based on elimination of possible causes only.
If you can't find any problem of that kind, you can try to find the log file and see if you can find some more hints there, in the last lines.
Last thing you could try to do is to comment out the entire watchPHPErrors function (in logger.class.php) and leave it being only this:

function watchPHPErrors($errno, $errstr, $errfile, $errline) { return; }

Make sure that you DON'T leave that permanent, but only to see if that helps you figure out the real problem...

Hope that helps....
Amit05
TestLink user
Posts: 6
Joined: Wed Aug 19, 2009 7:00 pm

Post by Amit05 »

Strict Standards: Creating default object from empty value in C:\temp\UniServer\www\testlink\cfg\const.inc.php on line 615

This problem can be solved for an interim by suppressing the error warnings.

In the file, on 31st line, add the following :
ini_set('error_reporting',E_ALL);

The cause of the issue can be seen
@http://www.trash-factor.com/content/php ... mpty-value
Post Reply