I would like you to help me with this problem.
I have some time working with a project in Laravel 5.6. This week I installed the barryvdh / laravel-dompdf package via composer as indicated in the documentation.
I added the respective service provider in the config \ app.php file.
When trying to use the package for the first time I get the following error in Chrome:
"An error occurred while loading the PDF document"
When I download the document and visualize it with a text editor, I realize that the only thing that is wrong with the file is that it lacks the first line:% PDF-1.3. When adding said line manually the document is "fixed".
To continue testing, I installed a new laravel project, and then I installed the package and created a route with the same code from the previous project. To my surprise, this project does load the PDF document in Chrome.
Please give me some idea of what things I can review.
Thank you very much
I have already solved it.
The cause of the problem was that the config/app.php configuration file did not have the <?php line at startup, and this was what caused the problem.
Related
I have written a new PHP application with the CodeIgniter Framework. Oftenly the following error is thrown:
Unable to load dynamic library '/usr/lib/php/20151012/mongo.so' - /usr/lib/php/20151012/mongo.so: cannot open shared object file: No such file or directory
It is a completely fresh installation and I do not use this mongo.so library anywhere. Also on the configuration of Apache or PHP I did not change anything special.
Probably the problem can be solved by installing php-mongodb on the system. But maybe someone has a better idea to solve the problem.
I got the problem solved myself.
In /etc/php/7.0/mods_available was a file user.ini, which included the mongo extension. Don't know why, but it works now.
If you are not using MongoDB, you can safely do this
nano /etc/php/7.0/mods-available/mongodb.ini
Then, comment the line as follow
#extension=mongodb.so
Save with ctrl+o then exit with ctrl+x
That's it!
I´m new in PHP and creating dynamic webpages and after I installed Apache and my PHP IDE(codelobster) I face a serious problem.I really don´t know what I´m doing wrong but when I create new PHP project and I try to open it via my browser through localhost/...it always return me back a error page with this description:
Error:Missing controller
Cake\Routing\Exception\MissingControllerException
My php file is called oneironaut.php so it gives me also:
Oneironaut.phpController could not be found.
In the case you tried to access a plugin controller make sure you added it to your composer file or you use the autoload option for the plugin.
Error: Create the class Oneironaut.phpController below in file:
src\Controller\Oneironaut.phpController.php
I tried to create different projects like with different names and there was always this bug diference only with name of my .php webpage.So I think this must be some system error and something in my xampp/php or Apache settings must change.Maybe there could be some connection with my unfunctional debugger , I tried to download Xdebug from https://xdebug.org/wizard.php and even though I follow instructions on this website and another websites too I can´t successfully get xdebug extensions into my computer.So in this some help will be highly appreciated too.
So give me someone please help what to do with these problems? Thank You so much.
This seems to be happening because the server is loading files in "case-sensitive" mode.
You call your PHP file "oneironaut.php", however, the page is looking for "Oneironaut.php"
A similar question has been answered here, please try:
Missing Controller Error on remote server using Beta 3
I've recently moved an OctoberCMS project that I've had stored locally over to a server. Due to the server running PHP 5, I had to downgrade the project to an OctoberCMS version of 419. After getting it running on the server, I try to access any installed plugins through the builder plugin and when I click on one of them in the builder plugin, it outputs the following error:
"syntax error, unexpected ':', expecting ';' or '{'"
This error occurs on line 154 in "vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php".
I mean I'm fairly certain that I installed PHP 5 via composer for the CMS, but it looks like the file is based on PHP 7. Any ideas as to why this could be happening? And if it is because of a PHP version issue, then how would I go about fixing that? Apologies if I seem vague. I've been trying to figure it out for a few days now.
hmm I see as october/rain is of version 1.0.419 and it uses "doctrine/dbal": "~2.4", but unfortunately its not updated to old version. during that php version update.
can you try one thing from your installation just remove vendors folder and modules folder
make sure if you change any core code in modules first take a backup of that file then delete that folder.
Backup your database.
also config files if needed.
remove vendors folder and modules folder
after that remove your composer lock file
replace your package.json file with this content https://github.com/octobercms/library/blob/v1.0.419/composer.json which is of built .419
now from that directory run composer intsall
it will install all new files based on correct dependency.
[Current issue is may be due to some dependencies are not updated to old version]
now just restore all you config file [not sure not needed may be as all stuff will be untouched by these process so just check if needed]
now do database migration with this command - php artisan october:up
this should start your site.
if you find any problem please comment.
I am not sure what's going on with my magento installation.
I downloaded the latest version of Magento 2.1.1 as zip.
Extracted, setup a database then tried running the install but I keep on getting this stup*d error and I could not find any answers online.
Can someone help me on this one please? Its been a while since I used magento since I got used to working with Wordpress websites.
I tried looking for the file manually, but just like the error said, it does not exist. Where can I find this registration.php file under magento/framework/ folder?
Try run this command in your magento root folder.
composer dumpautoload
Then reload page you've got this error.
Still not working ?. Fell free to reply :)
If you are using composer to Install, the solution is simple re run the commands from the Magento Root Folder.
Inside /vendor/autoload.php there is a Base Path Global Variable that take the path to execute the vendor_path.php, and, in my case, it take the path where I am and not the Root.
I hope this is helpful for someone.
Have a nice coding day
please run
composer dump-autoload
to reload composer autoload files this issue mostly when you update a library and then fall back to original but magento composer files doesn't fall back to original so you need to generate files again.
I have cloned a git repo that someone made for a CodeIgniter website. I have a WAMP server set up fine in my computer and it works fine. In the Apache modules I enable the rewrite_module and in the PHP Settings I enable short open tag. I also put my database settings in the application\config\database.php file. After that, I put the CodeIgniter folder in the C:\wamp\www\CodeIgniter folder.
Now the problem is that when I go to localhost/CodeIgniter I get this:
Error: Template Directory Not Found!
I have looked for several hours online for this error but I could not find anything similar. If someone has seen this error before and knows how to solved it I will really appreciate any help or if you could point me in the right direction since I am new to CodeIgniter.
It sounds to me like your app is using a third-party Template library, and a config is incorrect
Search your application dir for "Template Directory Not Found" - that will take you to where the error message is in the code, and you can then figure out what library is calling it. Or, take a look in your application/config - most likely there's a file for it
"Template Directory Not Found" is not part of Codeigniter.