php spark serve error unable to write cache - codeigniter

Yesterday my app is fine, and today when i try to command
php spark serve
in git bash, i get this error :
CodeIgniter CLI Tool - Version 4.0.4 - Server-Time: 2021-09-15 13:52:28pm
An uncaught Exception was encountered
Type: CodeIgniter\Cache\Exceptions\CacheException
Message: Cache unable to write to C:\xampp\htdocs\prosold\writable\cache/
Filename: C:\xampp\htdocs\prosold\vendor\codeigniter4\framework\system\Cache\Exceptions\CacheException.php
Line Number: 55
Backtrace:
-78 - C:\xampp\htdocs\prosold\vendor\codeigniter4\framework\system\Cache\Handlers\FileHandler.php::forUnableToWrite
-84 - C:\xampp\htdocs\prosold\vendor\codeigniter4\framework\system\Cache\CacheFactory.php::__construct
-123 - C:\xampp\htdocs\prosold\vendor\codeigniter4\framework\system\Config\Services.php::getHandler
-123 - C:\xampp\htdocs\prosold\vendor\codeigniter4\framework\system\Config\BaseService.php::cache
-115 - C:\xampp\htdocs\prosold\vendor\codeigniter4\framework\system\Config\Services.php::getSharedInstance
-102 - C:\xampp\htdocs\prosold\vendor\codeigniter4\framework\system\Common.php::cache
-629 - C:\xampp\htdocs\prosold\vendor\codeigniter4\framework\system\CodeIgniter.php::cache
-298 - C:\xampp\htdocs\prosold\vendor\codeigniter4\framework\system\CodeIgniter.php::displayCache
-86 - C:\xampp\htdocs\prosold\vendor\codeigniter4\framework\system\CLI\Console.php::run
-57 - C:\xampp\htdocs\prosold\spark::run
What should i do?

Related

Redis.so not loaded using phpredis, php7.0 and redis5.0.5

I have been trying to install phpredis to my aws ec2 instance, but i keep on encountering same error when running 'sudo make test' in the phpredis folder.
PHP Warning: PHP Startup: Unable to load dynamic library '/tmp/phpredis-phpredis-59503a8/modules/redis.so' - /tmp/phpredis-phpredis-59503a8/modules/redis.so: undefined symbol: json_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/tmp/phpredis-phpredis-59503a8/modules/redis.so' - /tmp/phpredis-phpredis-59503a8/modules/redis.so: undefined symbol: json_globals in Unknown on line 0
=====================================================================
PHP : /usr/bin/php
Warning: PHP Startup: Unable to load dynamic library '/tmp/phpredis-phpredis-59503a8/modules/redis.so' - /tmp/phpredis-phpredis-59503a8/modules/redis.so: undefined symbol: json_globals in Unknown on line 0
PHP_SAPI : cli
PHP_VERSION : 7.0.33
ZEND_VERSION: 3.0.0
PHP_OS : Linux - Linux ip-172-31-4-98 4.14.128-87.105.amzn1.x86_64 #1 SMP Thu Jun 20 00:43:44 UTC 2019 x86_64
INI actual : /tmp/phpredis-phpredis-59503a8/tmp-php.ini
More .INIs :
CWD : /tmp/phpredis-phpredis-59503a8
Extra dirs :
VALGRIND : Not used
TIME START 2019-07-10 16:20:09
With this error keep on occuring, there's no way for the Redis to be working at all if I copied redis.so to my php7.0 modules.
I'm currently using Amazon Linux with php7.0, redis5.0.5 and phpredis from https://github.com/nicolasff/phpredis/zipball/master.
I've successfully installed redis before with similar configuration, but i've no idea why i cant seem to solve this problem at all.
Redis will not show in phpinfo as well.

Codeigniter Session Configure Path issue

I am new to this framework and am having some issues
with it. I have spent some couple of hours googling. I went
to the CodeIgniter IRC channel to search for an answer but it's like
everyone was too busy to answer me.
Helping me here is the error code:
A PHP Error was encountered
Severity: Warning
Message: mkdir(): Permission denied
Filename: drivers/Session_files_driver.php
Line Number: 136
Backtrace:
File: /var/www/vhosts/barklaynew/barklay.online/httpdocs/application/core/My_Controller.php
Line: 11
Function: __construct
File: /var/www/vhosts/barklaynew/barklay.online/httpdocs/application/controllers/Welcome.php
Line: 6
Function: __construct
File: /var/www/vhosts/barklaynew/barklay.online/httpdocs/index.php
Line: 315
Function: require_once
An uncaught Exception was encountered
Type: Exception
Message: Session: Configured save path '/var/www/vhosts/barklaynew/barklay.online/httpdocs/application/session' is not a directory, doesn't exist or cannot be created.
Filename: /var/www/vhosts/barklaynew/barklay.online/httpdocs/system/libraries/Session/drivers/Session_files_driver.php
Line Number: 138
Backtrace:
File: /var/www/vhosts/barklaynew/barklay.online/httpdocs/application/core/My_Controller.php
Line: 11
Function: __construct
File: /var/www/vhosts/barklaynew/barklay.online/httpdocs/application/controllers/Welcome.php
Line: 6
Function: __construct
File: /var/www/vhosts/barklaynew/barklay.online/httpdocs/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Core Warning
Message: Module 'mysql' already loaded
Filename: Unknown
Line Number: 0
Backtrace:
A PHP Error was encountered
Severity: Warning
Message: file_exists(): open_basedir restriction in effect. File(0c3r9i4i6834ocdlreqk3upofrig52cs) is not within the allowed path(s): (/var/www/vhosts/barklaynew/barklay.online:/usr/share/php:/usr/share/pear)
Filename: drivers/Session_files_driver.php
Line Number: 170
Backtrace:
A PHP Error was encountered
Severity: Warning
Message: fopen(): open_basedir restriction in effect. File(0c3r9i4i6834ocdlreqk3upofrig52cs) is not within the allowed path(s): (/var/www/vhosts/barklaynew/barklay.online:/usr/share/php:/usr/share/pear)
Filename: drivers/Session_files_driver.php
Line Number: 172
Backtrace:
A PHP Error was encountered
Severity: Warning
Message: fopen(0c3r9i4i6834ocdlreqk3upofrig52cs): failed to open stream: Operation not permitted
Filename: drivers/Session_files_driver.php
Line Number: 172
Backtrace:
A PHP Error was encountered
Severity: Warning
Message: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (0;660;/var/www/vhosts/barklaynew/barklay.online/phptmpdir)
Filename: Unknown
Line Number: 0
Backtrace:
I just lauch the site, but I don't really known how to fix it, here is the site link http://www.barklay.online/
The folder you have set for your sessions does not yet exist, and cannot be created by the user running PHP for your web server.
Run this to create the sessions folder
cd /var/www/vhosts/barklaynew/barklay.online/httpdocs/application/
mkdir sessions

Laravel composer install error

Hi I create server on Centos 7. i am used php 7 and Httpd server. But when i running composer install am i getting this error. any idea?
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php.ini
- /etc/php.d/20-bz2.ini
- /etc/php.d/20-calendar.ini
- /etc/php.d/20-ctype.ini
- /etc/php.d/20-curl.ini
- /etc/php.d/20-dom.ini
- /etc/php.d/20-exif.ini
- /etc/php.d/20-fileinfo.ini
- /etc/php.d/20-ftp.ini
- /etc/php.d/20-gettext.ini
- /etc/php.d/20-iconv.ini
- /etc/php.d/20-json.ini
- /etc/php.d/20-mysqlnd.ini
- /etc/php.d/20-pdo.ini
- /etc/php.d/20-phar.ini
- /etc/php.d/20-simplexml.ini
- /etc/php.d/20-sockets.ini
- /etc/php.d/20-sqlite3.ini
- /etc/php.d/20-tokenizer.ini
- /etc/php.d/20-xml.ini
- /etc/php.d/20-xmlwriter.ini
- /etc/php.d/20-xsl.ini
- /etc/php.d/20-zip.ini
- /etc/php.d/30-mysqli.ini
- /etc/php.d/30-pdo_mysql.ini
- /etc/php.d/30-pdo_sqlite.ini
- /etc/php.d/30-wddx.ini
- /etc/php.d/30-xmlreader.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Try to install all laravel php requirements first.
You have to install this requirements exactly to php7.
https://laravel.com/docs/5.4/installation

Why do I get "Internal Server Error" with PHPStorm and XAMPP on Localhost as soon as I add more code?

I am working with PHPStorm and XAMPP on Win7. Both works fine, but at some point I start getting "500 Internal Server Error PhpStorm 9.0.2" as soon as I add more code e.g. a new <div></div>. When I delete it again, it works again. The same code works on webhosting but not on localhost.
What could be the issue?
That just makes no sense, why would adding a new div cause an server error?
There are no logs about this issue in the error.log or php_error_log.
Found out that there is a IDE-error log, it says:
2015-11-08 17:49:28,975 [6667034] ERROR - ains.io.fastCgi.FastCgiService - readerIndex(5) + length(1) exceeds writerIndex(5): CompositeByteBuf(ridx: 5, widx: 5, cap: 8189, components=2)
java.lang.IndexOutOfBoundsException: readerIndex(5) + length(1) exceeds writerIndex(5): CompositeByteBuf(ridx: 5, widx: 5, cap: 8189, components=2)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1138)
at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:542)
at org.jetbrains.io.fastCgi.FastCgiService.a(FastCgiService.java:197)
at org.jetbrains.io.fastCgi.FastCgiService.responseReceived(FastCgiService.java:170)
at org.jetbrains.io.fastCgi.FastCgiDecoder.contentReceived(FastCgiDecoder.java:128)
at org.jetbrains.io.fastCgi.FastCgiDecoder.contentReceived(FastCgiDecoder.java:15)
at org.jetbrains.io.Decoder.readContent(Decoder.java:68)
at org.jetbrains.io.fastCgi.FastCgiDecoder.messageReceived(FastCgiDecoder.java:75)
at org.jetbrains.io.Decoder.channelRead(Decoder.java:38)
at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:84)
at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:153)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:187)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:947)
at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:147)
at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:44)
at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:52)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:834)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
2015-11-08 17:49:28,975 [6667034] ERROR - ains.io.fastCgi.FastCgiService - PhpStorm 9.0.2 Build #PS-141.2462
2015-11-08 17:49:28,975 [6667034] ERROR - ains.io.fastCgi.FastCgiService - JDK: 1.8.0_51
2015-11-08 17:49:28,976 [6667035] ERROR - ains.io.fastCgi.FastCgiService - VM: Java HotSpot(TM) Server VM
2015-11-08 17:49:28,976 [6667035] ERROR - ains.io.fastCgi.FastCgiService - Vendor: Oracle Corporation
2015-11-08 17:49:28,976 [6667035] ERROR - ains.io.fastCgi.FastCgiService - OS: Windows 7
2015-11-08 17:49:28,976 [6667035] ERROR - ains.io.fastCgi.FastCgiService - Last Action: ShowLog
You are using PhpStorm's own simple built-in web server. For some reason it shows those errors. If you have XAMPP .. then just XAMPP.
For that you need to create an Deployment entry where you will specify your base URL which PhpStorm will use to open files in browser. For that:
Settings | Build, Execution, Deployment | Deployment
Create and configure new deployment entry ("In Place" should be fine)
Do not forget to mark it as Default for this project
Now IDE will use URL specified there instead of built-in web server.
As for actual error:
Please try latest & recently released PhpStorm v10
Try changing your PHP version (in case if you have upgraded it recently)
Submit bug report ticket to JetBrains' Issue Tracker if you wish keep using built-in web server for devs to look into.

error when running play framework 2.0 on my mac (NoSuchMethodError)

I'm just trying out play framework 2.0 on my mac. I've been using Play 1.x for a while without any issues.
I've downloaded the new framework, updated my PATH to point to the new version of play and created a simple Java project ('play new testapp')
When I call play run I get the following error:
log4j:WARN No appenders could be found for logger (akka.event.slf4j.Slf4jEventHandler).
log4j:WARN Please initialize the log4j system properly.
[error] java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
[error] Use 'last' for the full log.
As per the error above I've run the 'last' command and below is an extract from the stack trace that is produced from this:
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:203)
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:278)
at java.util.logging.Logger.log(Logger.java:478)
at java.util.logging.Logger.doLog(Logger.java:500)
at java.util.logging.Logger.logp(Logger.java:616)
at org.jboss.netty.logging.JdkLogger.debug(JdkLogger.java:36)
at org.jboss.netty.logging.InternalLoggerFactory$1.debug(InternalLoggerFactory.java:80)
at org.jboss.netty.channel.socket.nio.NioProviderMetadata.<clinit>(NioProviderMetadata.java:95)
at org.jboss.netty.channel.socket.nio.NioWorker.<clinit>(NioWorker.java:58)
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.<init>(NioServerSocketPipelineSink.java:58)
at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<init>(NioServerSocketChannelFactory.java:133)
at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<init>(NioServerSocketChannelFactory.java:104)
at play.core.server.NettyServer.<init>(NettyServer.scala:43)
I fired up an Ubuntu VM and completed the same process and the app runs fine.
Any suggestions?
EDIT: I ran play classpath to get my classpath for the app and this was the output (replaced the common part of the directory with ...):
Here is the computed classpath of your application:
- .../testapp/target/scala-2.9.1/classes
- ...play-latest/framework/sbt/boot/scala-2.9.1/lib/scala-library.jar
- ...play-latest/framework/../repository/local/play/play_2.9.1/2.0/jars/play_2.9.1.jar
- ...play-latest/framework/../repository/local/play/templates_2.9.1/2.0/jars/templates_2.9.1.jar
- ...play-latest/repository/local/com.github.scala-incubator.io/scala-io-file_2.9.1/0.2.0/jars/scala-io-file_2.9.1.jar
- ...play-latest/repository/local/com.github.scala-incubator.io/scala-io-core_2.9.1/0.2.0/jars/scala-io-core_2.9.1.jar
- ...play-latest/repository/local/com.github.jsuereth.scala-arm/scala-arm_2.9.1/0.3/jars/scala-arm_2.9.1.jar
- ...play-latest/framework/../repository/local/play/anorm_2.9.1/2.0/jars/anorm_2.9.1.jar
- ...play-latest/framework/../repository/local/io.netty/netty/3.3.0.Final/bundles/netty.jar
- ...play-latest/framework/../repository/local/org.slf4j/slf4j-api/1.6.4/jars/slf4j-api.jar
- ...play-latest/framework/../repository/local/org.slf4j/jul-to-slf4j/1.6.4/jars/jul-to-slf4j.jar
- ...play-latest/framework/../repository/local/org.slf4j/jcl-over-slf4j/1.6.4/jars/jcl-over-slf4j.jar
- ...play-latest/framework/../repository/local/ch.qos.logback/logback-core/1.0.0/jars/logback-core.jar
- ...play-latest/framework/../repository/local/ch.qos.logback/logback-classic/1.0.0/jars/logback-classic.jar
- ...play-latest/framework/../repository/local/com.typesafe.akka/akka-actor/2.0/jars/akka-actor.jar
- ...play-latest/framework/../repository/local/com.typesafe.akka/akka-slf4j/2.0/jars/akka-slf4j.jar
- ...play-latest/framework/../repository/local/com.google.guava/guava/10.0.1/jars/guava.jar
- ...play-latest/framework/../repository/local/com.google.code.findbugs/jsr305/1.3.9/jars/jsr305.jar
- ...play-latest/framework/../repository/local/org.avaje/ebean/2.7.3/jars/ebean.jar
- ...play-latest/framework/../repository/local/org.hibernate.javax.persistence/hibernate-jpa-2.0-api/1.0.1.Final/jars/hibernate-jpa-2.0-api.jar
- ...play-latest/framework/../repository/local/com.h2database/h2/1.3.158/jars/h2.jar
- ...play-latest/framework/../repository/local/org.scala-tools/scala-stm_2.9.1/0.4/jars/scala-stm_2.9.1.jar
- ...play-latest/framework/../repository/local/com.jolbox/bonecp/0.7.1.RELEASE/bundles/bonecp.jar
- ...play-latest/framework/../repository/local/org.yaml/snakeyaml/1.9/bundles/snakeyaml.jar
- ...play-latest/framework/../repository/local/org.hibernate/hibernate-validator/4.2.0.Final/jars/hibernate-validator.jar
- ...play-latest/framework/../repository/local/javax.validation/validation-api/1.0.0.GA/jars/validation-api.jar
- ...play-latest/framework/../repository/local/org.springframework/spring-context/3.0.7.RELEASE/jars/spring-context.jar
- ...play-latest/framework/../repository/local/org.springframework/spring-core/3.0.7.RELEASE/jars/spring-core.jar
- ...play-latest/framework/../repository/local/org.springframework/spring-beans/3.0.7.RELEASE/jars/spring-beans.jar
- ...play-latest/framework/../repository/local/joda-time/joda-time/2.0/jars/joda-time.jar
- ...play-latest/framework/../repository/local/org.joda/joda-convert/1.1/jars/joda-convert.jar
- ...play-latest/framework/../repository/local/javassist/javassist/3.12.1.GA/jars/javassist.jar
- ...play-latest/framework/../repository/local/commons-lang/commons-lang/2.6/jars/commons-lang.jar
- ...play-latest/framework/../repository/local/com.ning/async-http-client/1.7.0/jars/async-http-client.jar
- ...play-latest/framework/../repository/local/oauth.signpost/signpost-core/1.2.1.1/jars/signpost-core.jar
- ...play-latest/framework/../repository/local/commons-codec/commons-codec/1.3/jars/commons-codec.jar
- ...play-latest/framework/../repository/local/com.codahale/jerkson_2.9.1/0.5.0/jars/jerkson_2.9.1.jar
- ...play-latest/framework/../repository/local/org.codehaus.jackson/jackson-core-asl/1.9.5/jars/jackson-core-asl.jar
- ...play-latest/framework/../repository/local/org.codehaus.jackson/jackson-mapper-asl/1.9.5/jars/jackson-mapper-asl.jar
- ...play-latest/framework/../repository/local/org.reflections/reflections/0.9.6/jars/reflections.jar
- ...play-latest/framework/../repository/local/javax.servlet/javax.servlet-api/3.0.1/jars/javax.servlet-api.jar
- ...play-latest/framework/../repository/local/javax.transaction/jta/1.1/jars/jta.jar
- ...play-latest/framework/../repository/local/tyrex/tyrex/1.0.1/jars/tyrex.jar
- ...play-latest/framework/../repository/local/jaxen/jaxen/1.1.3/jars/jaxen.jar
- ...play-latest/framework/../repository/local/net.sf.ehcache/ehcache-core/2.5.0/jars/ehcache-core.jar

Resources