I am just beginning with laravel. I followed all the steps mentioned in here: http://github.com/aimeos/aimeos-laravel and tried running the final project using this command:
php artisan serve
It is giving me an error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_mbstring.dll' - /usr/lib/php/20151012/php_mbstring.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Laravel development server started on http://localhost:8000/
[Wed Apr 13 17:03:32 2016] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_mbstring.dll' - /usr/lib/php/20151012/php_mbstring.dll: cannot open shared object file: No such file or directory in Unknown on line 0
[Wed Apr 13 17:03:43 2016] 127.0.0.1:39822 [200]: /favicon.ico
[Wed Apr 13 17:03:43 2016] 127.0.0.1:39823 [200]: /favicon.ico
What should I do to resolve this error? I have installed mbstring library so I think it should've been able to find it.
I am using laravel 5.2.29.
EDIT:
I had uncommented the line:
extension=php_mbstring.dll
in my php.ini file which shouldn't be done if platform is UNIX. Now, when I run php artisan serve on terminal, it doesn't give any error. But when I go to localhost:8000, it says : Whoops! looks like something went wrong.
EDIT2:
Did everything according to suggestion.
Now the error is: No supported encrypter found. The cipher and / or key length are invalid.
What I have already tried:
'cipher' => 'AES-256-CBC',
php artisan key:generate
What can be done to resolve it?
Got my last problem resolved too.
The problem was that as #Bordon suggested, I had created a .env file. But when I ran the command:
php artisan key:generate
It created another file called .env.example. Now since I am a user of composer, I needed to rename it to .env (and remove the prev one).
So finally I renamed it, ran the above mentioned command again and now it works like a charm. Thanks a lot #Bordon for helping me out.
Also I would like to note that as #ash suggested, using Vagrant is quite a lot easier to me than xampp.
Related
I have been using laravel for multiple projects already, however for some reason my new laravel project does not have the server.php file.
Reinstalling composer and / or recreating the project does not work. I also can't put a file by the name of server.php into the project in any way.
[Fri May 11 02:26:55 2018] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
[Fri May 11 02:26:55 2018] PHP Fatal error: Unknown: Failed opening required 'C:\Users\Luke Derkzen\Documents\GitHub\Website\server.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0
I get this error when I try to start the server, as far as I can see it's expecting me to have something running on XAMPP, however on my other projects there is a server.php file, and it doesn't give above error.
The project was created with following command:
composer create-project --prefer-dist laravel/laravel
If i use the php artisan serve command afterwards to start the server and reload the page. above error appears in the artisan console.
How can I fix this?
Server.php make a Exception and your Anti-Virus like Avast delete it Automatically. Make turn off your Anti-VIrus Software.
The problem occured, as rightly predicted by some, due to corrupt windows permissions. I talked about it with microsoft support, however they could offer no solution (without paying $50 / $150) so I did a clean install of windows.
While I'm sure this isn't a solution people hope to find, it was the only way for me.
When I try to run my project, I am getting this error in terminal.
[Fri Mar 30 14:36:23 2018] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
[Fri Mar 30 14:36:23 2018] PHP Fatal error: Unknown: Failed opening required '/var/www/html/imporeexcel/public/server.php' (include_path='.:/usr/share/php') in Unknown on line 0
I confirmed the issue, it seems a bug in laravel 5.6.12 installer. It deletes the server.php upon the first artisan serve.
A temporary solution will be to create another project then copy that newly created server.php this will solve it.
EDIT:
If your anti-virus is avast, you need to add exception there, I have a response in GitHub that avast considers it as a threat.
I'm having a problem with sql server drivers for a php project, I follow the instructions given by the documentation on github, I added the dll's on the ext directory, changed the php.ini file and added the extensions like:
extension=php_sqlsrv_7_ts.dll
extension=php_pdo_sqlsrv_7_ts.dll
I restarted the pc and the server.
Php environment path is set and working.
however every time I tried to execute the server I get this error:
[Mon Nov 21 14:23:30 2016] PHP Warning: PHP Startup: Unable to load
dynamic library 'C:\php_7\ext\php_sqlsrv_7_ts.dll' - The specified module
could not be found.
in Unknown on line 0
[Mon Nov 21 14:23:30 2016] PHP Warning: PHP Startup: Unable to load
dynamic library 'C:\php_7\ext\php_pdo_sqlsrv_7_ts.dll' - The specified
module could not be found. in Unknown on line 0
What I'm missing
I managed to make it worke by using the non thread safe nts, instead of the thread safe ts
extension=php_sqlsrv_7_nts.dll
extension=php_pdo_sqlsrv_7_nts.dll
So I downloaded the php_ibm_db2.dll 5.6 Non Thread Safe (NTS) x86 extension from https://pecl.php.net/package/ibm_db2/1.9.9/windows, added it to php.ini and was getting the exact same error. In my case all I had to do was to downlaod the thread safe version of the lib: 5.6 Thread Safe (TS) x86.
I'm updating a symfony2 website, afeter each update in controller or twig file I run "php app/console cache:clear", the website stop working for 5 minutes then it works again. After un very little update, I cleared the cache and the site don't want to run anymore, I have 500 Internal Server Error, there are no entry in symfony's log file, but here what I found in php log :
[Thu Sep 24 08:10:05 2015] [error] [client 1.2.3.4] FastCGI: server "/run/fcgi-bin/www.mysite.com:80.fcgi" stderr: PHP message: PHP Warning: require_once(/var/www/mysite.com/app/cache/prod/jms_diextra/doctrine/EntityManager_5602df03afff5.php): failed to open stream: No such file or directory in /var/www/mysite.com/app/cache/prod/appProdProjectContainer.php on line 279
[Thu Sep 24 08:10:05 2015] [error] [client 1.2.3.4] FastCGI: server "/run/fcgi-bin/www.mysite.com:80.fcgi" stderr: PHP message: PHP Fatal error: require_once(): Failed opening required '/var/www/mysite.com/app/cache/prod/jms_diextra/doctrine/EntityManager_5602df03afff5.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/mysite.com/app/cache/prod/appProdProjectContainer.php on line 279
It seems to be entity issue, but I'm sure I have no entity updates. I even tried to roll back by uploading all original files but no way !
I don't understand :
why do I have to wait 5 minutes after each cache:clear ?
what does the log errors means ?
Thanks very much :)
It looks like a file permission problem on your cache directory (and/or your logs directory).
Try chmod -R 777 app/cache app/logs and tell us if you still have problems.
You can also check the umask trick in http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup that may help in your case.
I followed the instructions in URL posted by tchap.
I don't know why cache:clear throws the bug, but I tested this and it works :
manually delele the /app/cache/prod/ folder
run :
app/console cache:warmup
I am trying to install pdflib9.0.2 extension for my MAMP php5.5.10. I did the following steps.
Downloaded pdflib9.0.2 from http://www.pdflib.com/download/pdflib-family/pdflib-9/copied
created a folder "pdflib" in htdocs
found the extension_dir path from php.ini /Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212
copied /Applications/MAMP/htdocs/pdflib/bind/php/php-550/php_pdflib.so to /Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212
changed the permission to rw mode.
added extension=php_pdflib.so under "Dynamic Extensions" in php.ini
commented the following in /Applications/MAMP/Library/bin/envvars
#if test "x$DYLD_LIBRARY_PATH" != "x" ; then
# DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
#else
# DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib"
#fi
#export DYLD_LIBRARY_PATH****
But I could not see pdflib in my phpinfo()
I tried to access /pdflib/hello.php and I see following message in my apache error log
client denied by server configuration: /Applications/MAMP/htdocs/pdflib/.DS_Store
client denied by server configuration: /Applications/MAMP/htdocs/pdflib/bind/.DS_Store, referer: http:///pdflib/
I dont know where is going wrong.
I saw this version map in the doc. So I dont think there is a version mismatch.
bind/php/php-530 for PHP 5.3.0 and above
bind/php/php-540 for PHP 5.4.0 and above
bind/php/php-550 for PHP 5.5.0 and above
Can anyone one find out the issue here. Any input will show me a new path to solve this issue.
Thanks in advance.
I have added my Apache2 error log and php_error_log and I guess either one or both of these may be the reason for my unsuccessful installation of pdflib. If I can get some information to move forward to fix the issue, it will be very useful. Apache Error log [Tue Apr 15 11:38:22 2014] [error] [client ::1] client denied by server configuration: /Applications/MAMP/htdocs/pdflib/.DS_Store
[Tue Apr 15 11:38:24 2014] [error] [client ::1] client denied by server configuration: /Applications/MAMP/htdocs/pdflib/bind/.DS_Store, referer: http:///pdflib/ php_error_log [15-Apr-2014 11:25:08 America/Los_Angeles] PHP Warning: PHP Startup: PDFlib: Unable to initialize module
Module compiled with build ID=API20121212,TS
PHP compiled with build ID=API20121212,NTS
These options need to match
Your php_error_log tells:
php_error_log [15-Apr-2014 11:25:08 America/Los_Angeles] PHP Warning: PHP Startup: PDFlib: Unable to initialize module
Module compiled with build ID=API20121212,TS
PHP compiled with build ID=API20121212,NTS
These options need to match
This means that the PHP you are using is compiled "non thread safe", the PDFlib module you use is the "thread safe" variant. In a "non thread safe" php you can only use "non thread safe extensions. Sou you need to install the extension from the "php-550-nozts_VS11" directory of the PDFlib package.