Cakephp giving Fatal error in my local computer - cakephp

I have a projects in cakephp which is a big size projects.. It is running perfectly in another computer or in the server. But when I copy the files and database to my local computer then it shows the following error.
Fatal error: Maximum function nesting level of '100' reached, aborting! in D:\wamp\www\faceadz\cake\libs\debugger.php on line 248
Project is running in wamp server.
Please help me...
thanks

there might be 2 solution will work for you in you local machine configuration
1. A simple solution solved to your problem. you can just commented the:
"zend_extension = "d:/wamp/bin/php/php5.3.8/zend_ext/php_xdebug-2.1.2-5.3-vc9.dll"
in your php.ini file. This extension was limiting the stack to 100 so I disabled it. The recursive function is now working as anticipated.
2. and
Assuming you're using xdebug, you can set your own limit with
ini_set('xdebug.max_nesting_level', $limit)
EDIT
Also it will help you
changes the file /etc/mysql/my.cnf parameter to something like that max_allowed_packet = 512M
Get sure you've got xdebug installed (use phpinfo()) and then change the file /etc/php5/fpm/php.ini adding or editing the line : xdebug.max_nesting_level=1000
Restart both services sudo service mysql restart sudo service php5-fpm restart
If it doesn't work you can still set those two parameters to false at /etc/php5/fpm/php.ini xdebug.remote_autostart=0 xdebug.remote_enable=0
hope it will help you,

Related

How to fix SERVICE_PAUSED error on starting nssm server

So I need to run a custom server. It worked on other machines, but not on mine (all of them are on Windows).
My input:
nssm start custom-server
Error message:
custom-server: Unexpected status SERVICE_PAUSED in response to START control.
I tried to re-start it, but got the same message.
Use the following instructions to change I/O redirects:
nssm set [SERVICE_NAME] AppStdout [APP_PATH_INSTALL]\logs\service.log
nssm set [SERVICE_NAME] AppStderr [APP_PATH_INSTALL]\logs\service-error.log
Check the service log files to find the failure.
In my case, the failure was caused by a dependency on Python libraries.
As Garric15 states it is probably your install command.
This could be for example a StdOut redirect to a path / file that does not exist on your local machine.
Look in the Application event log for errors where the source is nssm around the time you installed the service.
The reason is because firewall is blocking the software which you are running as a service, start first software separately, it will ask you to add to firewall exclusions , then you can use it via nssm
Some scenario
App directory not provided or doesn't exist
nssm nssm set xyz-service AppDirectory "D:\Work\ShoppingKart"
File which is given for service may be corrupted (rebuild code)
The application trying to run is not proper or corrupted. Try to run without windows service once.
Program (.exe) file path not found (in this case look for the solution, or else give full path, if java not found even if it is there in env, just add full path)
I solved it by using no mws (Managed Windows Service?) release,
ex.
gogs_0.12.10_windows_amd64 works
gogs_0.12.10_windows_amd64_mws not working
The issue for me was there had been a Java update on my machine. The JAVA_HOME environment variable was now pointing to an invalid directory (i.e. the old Java version). Just needed to update the JAVA_HOME path and restart the solr services to fix it.
I was attempting to configure rclone as a windows 10 service. I fixed it including the rclone.conf archive inside the rclone folder.
In my case, the problem was that after the service was installed using nssm.exe, the program name was changed. This caused service to always go to paused state after start or restart the service, using either services.msc or nssm.exe command line.
Editing service nssm.exe startup parameters solved the problem for me.

Not able to start SOLR service

I have installed the solr service on a LINUX environment. Now trying to start the service using the below command
service solr start
After executing this command, am getting below error from the server
Waiting to see Solr listening on port 8080 [-] Still not seeing Solr listening on 8080 after 30 seconds!
tail: cannot open `/var/solr/logs/solr.log' for reading: No such file or directory
I created the solr.log file manually and placed it under the above mentioned path, But as soon, i issue the command "service solr start" . The solr.log file will be renamed and there won't be any new file created with the solr.log. hence the service fails to start. Could anyone let me know how to tackle this issue.
Thanks in advance.
I had a similar issue, and was able to find a hint in the /var/solr/logs/solr-8983-console.log
Originally I had been using Java 8, and Solr was working just fine for me.
When I switched to Java 11, Solr would have the issue you reported.
The log file contained the following:
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I switched back to Java 8 and Solr started just fine.
First, did you use the procedure provided to install the Solr service page 461
Second, did you set the proper overrides to the environment defaults in a solr.in.sh script (p. 462 of the ref manual). You also need to make sure that the LOG4J_PROPS in the solr.in.sh file points to your log4j.properties file. Also make sure that SOLR_LOGS_DIR is pointing to the correct place.
If all that is correct, then check that the values in your log4j.properties file are set correctly (p. 468 of the ref manual).
You can get the reference manual here: https://www.apache.org/dyn/closer.lua/lucene/solr/ref-guide/ if you don't have it already.
I had a tough time getting Solr to run as a service, but in the end I simply wasn't reading carefully enough.

Play Cannot connect to (PostgreSQL) database [default]

I'm getting
CreationException: Unable to create injector, see the following errors:
1) Error in custom provider, Configuration error: Configuration error[Cannot connect to database [default]]
[...]
2) Error in custom provider, Configuration error: Configuration error[Cannot connect to database [default]]
Originally I had MySQL database used with Play Framework app which worked, but I wanted to change it to PostgreSQL and that's when problems started appearing. I've installed them both on my Ubuntu computer and changed play config to use Postgres (added "postgresql" % "postgresql" % "9.1-901-1.jdbc4", to build.sbt and changed db.default properties to reference Postgres). Exact application.conf is:
db.default.driver="org.postgresql.Driver"
db.default.url="jdbc:postgres://localhost:5432/playdb"
db.default.username="luka"
db.default.password="test"
I have manually created user luka with password test and database playdb. I have tried with postgres user as well with no avail.
What bugs me more, MySQL won't work either now with the same error. I have created new project with only modifying db.default params in conf and it fails in the same manner. Commenting out application.conf makes it go away, so that's definitely the problem. I have checked PostgreSQL logs (/var/log/postgresql/postgresql-9.4-main.log) and only line that doesn't seem right is [unknown]#[unknown] LOG: invalid length of startup packet. It appears multiple times, but not every time I refresh project (I'm not even sure it's related). I have removed mysql-server from my PC hoping everything will magically fix itself. It didn't.
Ideas?
I'm using Play 2. 4. 6 and IntelliJ IDEA 15. Project is created using Activator and importing sources to IDEA (using SBT model).
EDIT I'm also getting errors when I add db.default.hikaricp.connectionTestQuery = "SELECT 1" to my application.conf.
So, the definite answer is:
First, there's a mistake in the database url, it should be db.default.url="jdbc:postgresql://localhost:5432/playdb" as chabeee pointed out. It's the only correct format for db.default.url (so no jdbc:postgresql://username:pasword:localhost/dbname or similar, as I've seen suggesting on other places).
Second, more tricky, is that there's a bug in the driver as Salem pointed out and workaround is adding db.default.hikaricp.connectionTestQuery = "SELECT 1" to application.conf.
However, that bug is fixed (well, that workaround is implemented) in versions more recent than 9.1-903. The catch is, after version 9.1-901 postgresql changed its groupID in the repos and now it's referenced by org.postgresql. A better solution than the workaround would be updating dependencies to "org.postgresql" % "postgresql" % "9.4-1206-jdbc4" (current version, MVNrepository). Append the appropriate jdbc version to the most recent PostgreSQL driver (4 for Java 6, 41 for Java 7, 42 for Java 8).
My final application.conf:
db.default.driver="org.postgresql.Driver"
db.default.url="jdbc:postgresql://localhost/playdb" #the port is optional
db.default.username="luka"
db.default.password="test"
And libraryDependencies in build.sbt:
libraryDependencies ++= Seq(
jdbc,
"org.postgresql" % "postgresql" % "9.4-1206-jdbc42",
cache,
javaWs
)
UPDATE 2017:
I have only now noticed that not long after writing this answer they changed versioning scheme and removed -jdbc[code] fragment, replacing it with .jre6, .jre7 or nothing, apparently meaning it's meant for the latest Java version (I haven't found anything supporting this claim, but it works). Yet again in February 2017 they changed the version scheme again and jumped from major version 9 to 42, making the current version (as of 17 July 2017) denoted by "org.postgresql" % "postgresql" % "42.1.3" (or, accordingly, "org.postgresql" % "postgresql" % "42.1.3.jre7" / "org.postgresql" % "postgresql" % "42.1.3.jre6")
From your stacktrace
JDBC4 Connection.isValid() method not supported, connection test query must be configured
Basically this is a problem with your driver (it does not support that method), but you should be able to work around it specifying a test query in your application.conf:
play.db.default.hikaricp.connectionTestQuery = "SELECT 1"
Try to replace this line:
db.default.url="jdbc:postgres://localhost:5432/playdb"
to this:
db.default.url="jdbc:postgresql://localhost:5432/playdb"
Hope, it helps.
Are you by any chance on a Mac, and do you have a postgresql .jar file in your /Library/Java/Extensions directory?
Edit: Sorry, I'm new. I encountered the "JDBC4 Connection.isValid() method not supported" message while using Hikari on my Mac, and I solved it by locating and removing a JDBC3 .jar file in that extensions directory. I don't know how it got there (probably when I installed PostgreSQL or some related tool) but I found that it would get loaded instead of any JDBC4 .jar file on my classpath. Maybe something similar happens in Ubuntu. Probably worth checking, as other JDBC4-related problems could arise besides "isValid()".

Unable to restart Apache2 in Ubuntu 11.04

I migrated an old site to a new one and I am trying to rename the old site to legacy.domainname.com
Here is what I have done:
In Linode DNS Manager, I made the necessary DNS updates and the new site is up
For the legacy site
I changed every instance of www.domainname.com to legacy.domainname.com
I made these changes in
/etc/apache2/sites-enabled and
/etc/apache2/sites-available
Now I am trying to restart apache2 and it is giving one error after the other, all the errors are like this
apache2: Syntax error on line 235 of /etc/apache2/apache2.conf: Syntax error on line 30 of /etc/apache2/sites-enabled/legacy.domainname.com.conf/assets/images/3310sm.jpg: Expected </xapMM:DocumentID>adobe:docid:photoshop:37b23e53-24f1-11dc-83c5-ba417a2e0e5f</xapMM:DocumentID> but saw </rdf:Description>
or this
apache2: Syntax error on line 235 of /etc/apache2/apache2.conf: Syntax error on line 30 of /etc/apache2/sites-enabled/legacy.txsystems.com.conf/TestFolder/form.phtml_not_needed: Expected </h1><?php> but saw </div>
if I remove the referenced file, it will jump to a next thing, now these are files that have worked for 10 years, nothing changed. All I want is to change the domain to legacy
Please can you help point towards a possible troubleshooting step
All I want to run is sudo /etc/init.d/apache2 start
I solve the problem by
Restoring the server from last good backup so I remove my changes
Then I edit /etc/apache2/sites-enabled/www.domainname.com.conf and change
ServerName from www.domainname.com to legacy.domainname.com
Restart apache (/etc/init.d/apache2 restart)
And that is it
Thanks

How to solve 503 error accessing CollabNet Subversion Console?

I'm using Collabnate Subversion Edge.
I'm getting below error when trying to access URL http://localhost:3343/csvn.
Collbnate is set up on Windows Server 2008.
HTTP ERROR: 503
Problem accessing /csvn/. Reason:
Service Unavailable
Powered by Jetty://
How to solve it?
I spent two days fighting with the same problem. It turned out that CollabNet Subversion Edge 4.0.11 does not support Java 8.
The following procedure helped me make CN Subverion Edge 4.0.11 work again on Windows 7:
1) Uninstall CollabNet Subversion
2) Uninstall Java 8 (I had Java 7 and 6 side by side, so after uninstalling the 8, 7 picked up after I added it to PATH variable. It is important to add it at the very beginning of the path, otherwise Windows\System32\java.exe will be taken, which was not good for me also)
3) Install CollabNet Subverion (the important thing is to uncheck the "Run CollabNet ..." check box in the final screen. It looks like the installer is still creating files at the end and only after I have clicked OK in the final screen the needed configuration files have been created in data/conf folder.
4) Make sure that data/conf/httpd.conf file is created. If it is there, got to services (services.msc) and start server manually
Now launch the browser and navigate to localhost:3343/csvn.
Good luck.
1) Install Java 7
2) In file \csvn\svcwrapper\conf\wrapper.conf change from #wrapper.java.command.maxVersion=1.6 to wrapper.java.command.maxVersion=1.7
3) Run \csvn\svcwrapper\bat\runConsole.bat
Good luck.
Check in c:/csvn/data/logs for a log that starts with "console". Then find the error(s) and check what is wrong.
Did you try restarting the service ?
I had the same issue, CollabNet Subversion Edge version 4.0.4. In my case the problem was updating the JAVA_HOME from JDK 1.6 to JDK 1.7.
I finally resolved it changing the file:
C:\PROGRA~1\csvn\svcwrapper\conf\wrapper.conf
I changed the value of the property: wrapper.java.command:java
wrapper.java.command=C:/PROGRA~1/Java/jdk1.6.0_45/bin/java
So the csvn now runs with 1.6 as before. And it works again as a service automatically.
Good luck!!
There's an alternative issue that results in the same error: The database may get corrupted. This is what just happened to me. The above answers where not working in this case. As Subversion Edge 5.0.1 comes bundled with jre8, it would be rather strange if it weren't able to run against it.
To solve the problem, I had to patch the database (luckily, the user database c:\csvn\data\csvn-production-hsqldb.script is a plain text sql file).
Backup files in c:\csvn\data
Delete csvn-production-hsqldb.script and start the service (should come up now)
Exit the service
Save the file which is automatically recreated now
Compare your old file and the new working one
Replace every line starting with INSERT INTO QRTZ in your database with the corresponding lines from the working copy
Copy the new files to the proper place
Start the service
Hope it worked
I had this problem too. Upgrade to SubversionEdge 5.1.4 solved the issue.
We encounter this problem with CollabNet Subversion Edge 3.3.1 every time we patch our JDK 6 install (e.g. IAVM update). We need to install JDK 7 and 8 on this machine also so the installers are confusing the version information in the Windows Registry (not too much of a surprise there). Even if we update JDK 6 last, it gets weird too.
Nevertheless, it turns out the Subversion Console uses the Windows Registry to locate the Java install to launch the Console service. Updating the registry entry HKLM\SOFTWARE\JavaSoft\Java Development Kit\CurrentVersion to 1.6 and having a proper install of JDK 1.6 will restore console operation.

Resources