I’ve just bought a new MacBook and have made a new local development set up, and have been through PHP installation, set up for user rather than root and tested and all seems to work okay. My project is running on Smarty, which also seems to work okay.
However file_get_contents script contained in my project is returning a "failed to open stream: No such file or directory" error message. However, my file is in the right place and this script was working on my previous computer (OSX 10.11). I’ve just copied files over from the old computer rather than doing a full migration, so I’m wondering if it’s anything to do with file permissions or something rather than something wrong with my PHP installation.
Has anyone come across something similar – I’ve been wracking my brains trying to even formulate this query.
Related
Recently I started to use PHPUnit on my project and so far everything works perfectly, I can launch my tests just fine.
But following a potential mishandling on my part when I launch my tests here is the message that appears, preventing me from playing them:
Cannot open file "/tests/bootstrap.php".
FYI, I have not touched a file with this name, I have never heard of it before.
Has anyone ever encountered not opening the file /tests/bootstrap.php? Do you have any idea where it comes from?
Problem solved !
I don't have any special setup, just point it to config/bootstrap.php to let symfony load the standard test environment.
Currently I am trying to run a Wordpress repo locally for development. I am not using MAMP pro even though I still have a 9 day trail. I figured since I'm going to be using the free version for now I might as well work with that. I have my Apache & MySQL server running along with the Document Root pointing to my Sites folder where my projectName repo sits. I'm still running off of the default port of Apache 8888.
After I start the servers, I open WebStart and import my DB into phpMyAdmin. Everything works perfectly fine and the copy of my db gets imported. I then make sure that my wp-config.php file has the appropriate settings to access this db. I then click on My Website. This pulls up the content of the website. However, it does not pull in any of the assets(imgs/js/css). I receive the following errors in the console:
Failed to load resource: net::ERR_EMPTY_RESPONSE http://projectName.dev/wp-content/uploads/2016/09/logo-footer-1.png
Failed to load resource: net::ERR_EMPTY_RESPONSE http://projectName.dev/wp-content/themes/projectName/images/circle.png
And so the list goes on and on for pretty much every asset the project could possibly have. Now configuration is NOT my strong suit, and at this point I am at a loss of what could possibly be happening. Awhile ago I did follow a tutorial on how to setup my files so that I can access them in the web browser by simply typing the name of the project with the domain .dev, example: projectName.dev. I started having issues with this after upgrading to OS Sierra and it no longer works. Could this possibly be the reason as to why it is looking for these assets in the projectName at the .dev domain?
I apologize if this does not make sense. I am willing to provide anyone with any information on this as I need as much help as possible because I still need to level up my configuration skills. Let me know if you have questions.
The images and other assets are referenced with an absolute filepath (i.e. the URL of the server on which you first set it up). This has to be changed in all database entries. There are tutorials for this on the net, but the most simple version is to open the sql file in an editor and search & replace the general URL part in the complete database.
Be sure to keep a backup of the file - that might not work on the first try...
Since recently I use PhpStorm 2016.3.1 for my php projects. XAMPP works in the background and is connected to the IDE. It's a great IDE but I'm searching for a solution to run a single file in the browser.
The index file of Laravel loads over the run command perfectly. But an individual file makes a problem.
Everytime I want to open the file the browser gets me an error back that the directory to the file is wrong or the classes not found.
How can I setup that for a better workflow?
I have previously installed several different Joomla installation at the same hosting company without any major faults that couldn't be corrected quickly. Though I must say that I now find myself lost and don't know where to turn.. So here I am.
I have mulitple issues that I believe is all connected somehow.
Can't upload Images using the Media Uploader (Image size too large) though everything is set up correctly (max_file_size etc.) in PHP configurations and Joomla config.
Can't upload any other files in the Extension Manager either, since it says my PHP temp folder is not set. Though it is set, and writeble, have permissions etc. Also more than triplechecked the path, by FTP upload PHP-files to write out and verify the absolute path.
When I save something in the Global Configuration, it says my "Configuration.php" file is not writable. Permission is set to 777 even! If I go back and check, my settings is saved though it just said it couldn't save to the file?
Even tried to change to FTP-upload to see if I could bypass the fault somehow, tried both by setting it in Global Settings and by downloading the config file, change it manually and then re-upload it via FTP. No luck there either, seemed to just ignore my settings..
Updating Joomla seems to go just fine though, just updated to 3.4.1 to see if it made any difference but no. Running on PHP 5.6 right now though my hostingcompany just said they will downgrade to 5.4 to see if can make something change.
Otherwise, the website is fully functional! You can browse as usual, and write blogs etc. Though, not upload anything. Saving other settings work fine though. Should also mention that the website worked locally 100% before uploaded to the current server.
Any ideas where to start looking? Been Googling for the last 8 hours!
My webhost downgraded my PHP service to 5.4 instead, which solved all problems. Weird.
I'm trying to test a php app I'm working on in my Netbeans environment, and so I'm setting it up to run on a local Apache server. It seems to work fine when I manually copy my project into the htdocs folder, but when I try to configure Netbeans to automatically copy the sources, It tells me "Target folder cannot be created". I've tried changing the folder from read-only, including everything mentioned here but it doesn't seem to stick (Probably relevant to mention that I'm on Windows 7)
I could just keep manually copying it every time I want to test it, but that would be a major headache. Any ideas?
As I had guessed, it was a Windows permissions issue. After doing pretty much the same thing over and over without the change sticking, it finally stuck, and I was able to get things working the way I wanted. Sigh...