installing egroupware 14.1 on ubuntu 14.04 running 5.5.9 - php

fresh installation of egroupware 14.1 final on ubuntu server 14.04 gives following error;
Cannot redeclare class egw in
/.../web/phpgwapi/inc/class.egw.inc.php on
line 37
up to now I have been using egroupware for project management without any problems. To find the source of this issue, I went into sources. placed an echo at top of class.egw.inc.php and found out that it is included only once. checked if a class with same name exists elsewhere with regex search and cannot find any. checked class autoloading functions. it is possible that I have some configuration missing (like mbstring) but in previous installations, setup script was giving warnings about them. This time it is only a blank screen with a error message in the logs.

this is a PHP problem may be related to specific version. But this is the latest version for ubuntu 14.04 currently.
solution is to replace places of classes in /phpgwapi/inc/class.egw.inc.php. egw_minimal class should come before egw class.
after that, login screen appears in my installation.

Related

Apache in MAMP Pro 4 has stopped working, refuses to start

Have been using MAMP Pro for a fair while - version 3 primarily, upgraded to 4 a while ago.
I haven't had any unusual issues at all, but today the Apache service failed to start, telling me to check the error logs. The logs were blank unfortunately... I've made no system configuration changes, no changes to MAMP/MAMP Pro. Shut down my system yesterday, started today, it no longer works...
I've tried numerous suggestions found via Stack Overflow and Google without any success.
Even after completely uninstalling and re-installing MAMP Pro I am unable to get the service to start.
Nothing appears in the logs...
When starting it manually on the command line it comes up with a PHP related error:
$ Applications/MAMP/bin/apache2/bin/apachectl start
httpd: Syntax error on line 135 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/bin/php/php5.2.17/modules/libphp5.so into server: dlopen(/Applications/MAMP/bin/php/php5.2.17/modules/libphp5.so, 10): image not found
The confusing thing is that I don't have PHP 5.2.17 specified anywhere, at all - according to MAMP Pro it should be using PHP 7.0.12.
If I add PHP 5.2.17 to MAMP using the appropriate MAMP Pro dialogs, Apache still fails to start via the MAMP Pro interface. I can now start it manually from the command line however, but none of my virtual hosts/etc seem to be loaded.
apachectl -V tells me it's using /Applications/MAMP/conf/apache/httpd.conf, but there is nothing in that file that has any reference to any of the configs generated in /Library/Application Support/appsolute/MAMP PRO/conf
It also looks like hosts entries aren't added to /etc/hosts.
Even if I tell /Applications/MAMP/conf/apache/httpd.conf to do nothing but include /Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf (and manually add entries to /etc/hosts) it still doesn't seem to work at all...
I and my colleagues are at a complete loss, especially given it was working yesterday...
Has anyone had any issues like this?
I managed to fix the similar issue you had.
My Apache server was working fine and then following updating to 4.0.6 I experienced similar issues.
There were 2 things I did to fix the issue. I was getting the same error where it couldn't find a php file in 5.2.17. After fixing that by adding 5.2.17 to MAMP I experienced an apache error regarding user permissions.
(22)Invalid argument: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
File > Edit Template > Revert ALL Templates to Default Settings.
Save & restarted the servers and all worked finally and all my hosts had retained as well.
I had previously entered a custom line in my httpd.conf file that for countless versions had copied across fine however it looks like the folder structure had changed and so couldn't locate it causing the unusual error about User permissions. I have since re-entered the custom line with the correct structure and all working fine again.
Hope this helps.

CakePHP Migration Errors

I'm migrating my CakePHP site from a local Xampp installation to an EC2 ubuntu environment. I moved over the DB, and copied the web directory files over to the EC2 instance, but upon accessing the site I get this error:
Fatal error: Class 'AppController' not found in /var/www/cakephp/lib/Cake/Controller/CakeErrorController.php on line 31
I looked into the Apache error log and found that the piece it wasn't liking was this:
$this->Auth->user()['role']
The error said the PHP parser wasn't expecting the '['. This all worked fine in the default local Xampp install, so I'm assuming this is a PHP difference between the two installs?
Xampp: PHP 5.4.7
EC2: PHP 5.3.10
Any idea of any settings or anything that could cause this behavior?
That is a new feature in php 5.4 see http://docs.php.net/manual/en/migration54.new-features.php the third bullet item.
For php 5.3 you will need to assign it to a variable
$user = $this->Auth->user()
$role = $user['role'];

"The specified procedure could not be found" IIS 6.0 and PHP5

I am trying to make PHP5 work over IIS 6.0 on Windows server 2003 and i am following this steps:
http://www.iisadmin.co.uk/?p=4
The thing is, there's no file named "php5isapi.dll" inside the php folder, so I am using php5isapi.dll instead. Is it correct? Or should I try to download the php5isapi.dll from somewhere.
Well, then, I keep following the steps and when I try to execute my php file, I get this message:
The specified procedure could not be found.
What am I doing wrong?
Thanks.
UPDATE
I downloaded php5isapi.dll and tried to make it work with it but i am getting this error:
The specified module could not be found.
Also, after any change, i restart the Default Web Site clicking on stop and play.
UPDATE 2
Now, after rebooting, when trying to access the PHP file, the browser shows a 500 error:
The page cannot be displayed
I noticed that "php5isapi.ll" is no longer available for the last versions of PHP as pointed in here:
Why is php5isapi.dll missing after installing PHP for Windows?
Therefor, what i did was following this tutorial in order to do it with FastCGI
http://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/using-fastcgi-to-host-php-applications-on-iis-60
I found it on this comment:
Why is php5isapi.dll missing after installing PHP for Windows?
After restarting the server, it finally worked.

MSSQL.so for PHP 5.3 not loading (CentOS 5.8)

I'm trying to install the mssql module for PHP on a server running CentOS 5.8 and PHP 5.3.5. I was able to get it working on the dev server which runs CentOS 5.2 and PHP 5.2.6, and everything seems to match up (FreeTDS installed, module in the modules folder, extension=mssql.so added to php.ini). However, the plugin won't load; doesn't show up in phpinfo() and I get an undefined function error on the test script.
Also of note: phpinfo() lists '--with-mssql=shared,/usr' under the configure command, which is really confusing me.
Solved. Not 100% what the fix was, but I'm pretty sure this was what fixed it.
First off, it probably didn't help I was trying to compile from a copy of php 5.3.16 instead of 5.3.6. Even then, I was running into errors trying to compile it. I found an fix that said to remove this line from php_mssql.h in the folder after it's phpized:
typedef unsigned char *LPBYTE;
I was then abe to do make && make install and it loads with no errors now.

CakePHP 2.0.0-RC2 Console baking error

I originally thought this error had to do with my path setup - I had
separated the core from the app so I could work more easily with git
submodules, so I ignored it. I just did a fresh checkout from the git
repo / a download of the RC2 source / and a cakeinit install of the
2.0 package (also uses git) and all 3 installs have the same issue I
had before.
My code seems to work fine via the browser.
The output of a ./cake bake Model from inside the local copy of the
core in the lib/Cake/Console folder is here
https://gist.github.com/1233884
This totally prevents me from using bake. Baking a project doesn't
work, baking a new database config doesn't work - it also doesn't
matter which of the datasources I try.
Can someone point me in the right direction here? I want to use some
of the bake tools and work on converting some shells for 2.0.
I am using XAMPP (latest version for OS X - I reinstalled it 20
minutes ago as a last ditch attempt)
OSX 10.5.8
The database.php I am working with is here with the passwords removed
but otherwise working
https://gist.github.com/1233891
I have tested it with and without the unix_socket setting and encoding
settings. All works fine from the browser but again not via the cli.
Okay, the error message could have been be a little bit more specific:
Error: Database connection "Mysql" is missing, or could not be created.
DboSource::__construct() is throwing that error here because Mysql::enabled() returns false:
public function enabled() {
return in_array('mysql', PDO::getAvailableDrivers());
}
On Windows, I can reproduce your error by commenting out the following line from my PHP CLI's php.ini file (the one that running php --ini on the command-line returns):
extension=php_pdo_mysql_libmysql.dll
HTH.
I was MAMP on Mac and had the same problem with CakePHP 2.2. I solved the problem by installing the mysql pdo for my mac ports installation. sudo port install php5-mysql
For local testing, I have found that setting the host to the address works. In my config I use the following:
'host' => '127.0.0.1',
This works for Mamp Pro

Categories