I haven't been able to configure Netbeans 8 and Laravel correctly. Whenever I try to create a new php file all my syntax is highlighted as in the following image:
The same happens when I create simple PHP file (not in Laravel project)
I have so far:
Installed Composer
Downloaded from command line
Updated path environment variables
created new blog in laravel
Modified permissions to files under the bootdstrap/cache and storage folders
Downloaded Laravel IDE helper from:
https://github.com/barryvdh/laravel-ide-helper
Yet I still get errors such like 'unable to parse file' and the following error
in phpunit/php-token-stream/tests/fixture/class_with_method_that_declares_anonymous_class2.php
My PHP version is 5.5.12, Apache 2.4.9 and I'm using Wamp. I would very much appreciate any input on this so as to try to resolve it without having to switch IDEs. Thank you!
Related
I uploaded a laravel-5.8 project to a shared hosting cpanel.
The problem is when I access index.php it gives me an error 500.
Here is my project directory
I didn't transfer the public folder yet. but it should work when access.
stage.example.com/public/ instead it displays error 500.
I changed the database credentials.
I haven't changed the path in index.php since I didn't move the public folder yet.
path:index.php
I tried putting phpinfo.php in the root folder to check the requirements for laravel 5.8 all of this was met, except for the PHP version, according to phpinfo, PHP version is 5.6. but when I checked under myphpadmin>web server the PHP version is 7.2.7.
PHP >= 7.1.3
BCMath PHP Extension
Ctype PHP Extension
JSON PHP Extension
Mbstring PHP Extension
OpenSSL PHP Extension
PDO PHP Extension
Tokenizer PHP Extension
XML PHP Extension
I hope someone can help I wanted to run my laravel5.8 project in Cpanel.
I have answered this question in another post. Have a look at it and see if helps:
What is the easiest and quickest method to deploy a Laravel web application live?
I tried putting phpinfo.php in the root folder to check the requirements for laravel 5.8 all of this was met, except for the PHP version, according to phpinfo, PHP version is 5.6. but when I checked under myphpadmin>web server the PHP version is 7.2.7
I have no idea what "myphpadmin" is, anyway since you're running PHP 5.6 Laravel can't work.
In cPanel you should have an option to select the PHP version, select the latest available, 7.3 if your cPanel is updated.
If you have blank page maybe you need to change the path to the autoload.php file in index.php. This file is in vendor folder.
Change :
require __DIR__.'/bootstrap/autoload.php';
by
require __DIR__.'/vendor/autoload.php';
I have a website made on Laravel 5.3 that was working fine under PHP 7.0
I found some errors on the site and after looking online for a solution, the unanimous cause was that the laravel and php versions are not compatible.
I then went to check my composer.json file and saw that the minimum version of php needed is 7.1 and up.
I told my hosting company to update PHP to 7.2 on my staging server and now when I try to access it, I get an error:
Oups ! Page not found !
(Error 404)
Error. Any idea if there's anything I need to do?
My Error Log:
https://wetransfer.com/downloads/a89f6b95d3ab9bf1b4a8f231250de96220190730104107/cef049
From the error log, by default the storage folder has root permission, change the ownership of the storage folder to apache, as the apache writes logs on the storage folder
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 have Laravel 5.2 and PHP7.
My host works as it should, except links that generate and download xlsx files using Laravel Excel. These links drop error "This site can’t be reached". All libraries within a project are installed (and I assume that if problem was in libraries, I would get 500s about missing classes or something like that).
Maybe some php extension is missing? What am I doing wrong?
UPD: the excel function itself works correctly, but site crashes on download
You should be using laravel homestead to instead missing webserver
1.installed VirtualBox
2.installed Vagrant
3.installed the Homestead Vagrant Box
4.cloned Homestead into my "home" directory
5.ran the bash init.sh command to create my Homestead.yaml file
6.configured my Homestead.yaml file:
I have Windows 7 and WAMP localhost on drive D:. I installed Symfony2 correctly. When I open http://127.0.0.1/Symfony/web/config.php I can see the Welcome! message. But in the tutorial "Creating Pages in Symfony2" when I want to create a bundle by this command:
php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml
This message appears:
"php is not recognized as an internal or external command oprable program or batch file"
I don't know what I should do.
You are receiving that error because PHP is not in your system PATH. Check out this quick tutorial on installing PHP on Windows. Take note of Step 4 which is the installation step that should fix your problem.
Since you're using WampServer, the path you have to add to PATH will be something like this:
"C:\Program Files (x86)\Wamp\bin\php5.3.10"
This is only an example, change the path to the actual path to PHP on your system. If the path has spaces in it (like Program Files (x86) does) it is helpful to always surround it with quotes (").
Update: I ended up getting on a screen sharing program with #reza and discovered he had accidentally set his PATH variable to D:\php\wamp\bin\php\php5.3.10\php.exe rather than D:\php\wamp\bin\php\php5.3.10. Fixing this solved the problem.