Processwire installer does not delete install.php and site/assets/install/. Note that ProcessWire forms warn that the installer will only delete the install files if it can.
System
ubuntu 12.04
vhost pointing to a symlink on the user file structure to source of index
ProcessWire 5.2
apache 2.2.22
php 5.4
I Tried
chmod 777 on the files
chown www-data the files
I expect the installer to delete the file and folder if it says it can, since I am running a generator for the project boot, some setup can be done but not allot. The install of processwire is done manually after the generator, therefore checking deletion and handling it is not highly plausible. I am looking for any suggestions to solve the issue or a full fledged solution.
I don't think it is possible for the ProcessWire Installer to delete itself, so it has to be removed manually.
However, after installing, an additional file is created to secure your installation, even if the install.php file is not deleted.
From the install.php file:
Note that it creates this file once installation is completed:
/site/assets/installed.php
If that file exists, the installer will not run. So if you need to re-run
this installer for any reason, then you'll want to delete that file. This was
implemented just in case someone doesn't delete the installer.
Related
I'm trying to deploy my PHP (CakePHP) application through Azure DevOps and install Composer dependencies in the build step of the pipeline, using a Windows hosted agent.
The composer install is failing because common PHP extensions (namely intl and fileinfo) are unavailable to the PHP executable running in the build. Once deployed, the Web App on Azure does have these extensions. The composer web app extension is installed on the actual app service on Azure and there is a composer.phar file in the root of the repository.
The step I'm trying to run is just php composer.phar install --no-scripts --no-interaction --optimize-autoloader.
The pipeline fails with this error, but I have no idea how to access the .ini file or provide any options.
To enable extensions, verify that they are enabled in your .ini files:
- C:\tools\php\php.ini
PHP_INI_SCAN_DIR can be set, but this 'php template' from DevOps wipes out any added configuration properties when a new deploy happens. This also seems to be a totally different PHP than what the App Service actually runs. I can make a new template for config options, but the PHP extension issue seems to still be there on the build step.
If anyone knows how to simply have composer install dependencies and have them included in the build artifact (.zip file) created, I would greatly appreciate it. Thank you!
As answered in the comment by Levi Lu-MSFT, I was able to modify the PHP configuration by adding a new build task using the Command Line task and entering:
echo extension=intl >> C:\tools\php\php.ini
echo extension=fileinfo >> C:\tools\php\php.ini
Adding quotes caused an issue, but without it seems to work.
This question is different from: https://stackoverflow.com/questions/36150377/missing-vendor-autoload-php
I want to contribute to phpmyadmin. I cloned the github repo in my machine using Github Desktop software. I copied the downloaded files in xampp so that I can run phpmyadmin. But when I launch the phpmyadmin page, this error occurs:
File ./vendor/autoload.php missing or not readable.
Most likely you did not run Composer to install library files.
Where can I get that file? I saw something that uses composer create-project command but I don't get that where should I type that command?
I also downloaded phpmyadmin from their website and copy pasted in xampp directory and it worked well. It didn't give any such error.
What should I do?
This changed as of v4.7.0
https://www.phpmyadmin.net/files/4.7.0/
Starting with this version, phpMyAdmin uses Composer to manage PHP library dependencies while under development.
Users downloading the official source distribution will not notice a difference, however users of the git repository
should refer to https://docs.phpmyadmin.net/en/latest/setup.html#installing-from-git for details.
Here's the change PR for those interested: github.com/phpmyadmin/phpmyadmin/pull/11976
When you download or clone phpMyadmin it's missing the vendor folder, which is installed by Composer.
Open the phpMyadmin folder and run the composer install command. This will download and install third party dependencies and generate the vendor/autoload.php file.
I recently created an ubuntu virtual server(EC2) on Amazon Web Services, then installed wordpress through console apt-get install wordpress , before that I installed, apache, php and mysql. The website is running, but the problem is that I can't install wordpress themes, I get this message:
Downloading install package from https://downloads.wordpress.org/theme/twentysixteen.1.1.zip…
Unpacking the package…
Could not create directory.
I already give the right permissions to these folders :
usr/share/wordpress/wp-content,
usr/share/wordpress/wp-content/themes,
usr/share/wordpress/wp-content/plugins,
usr/share/wordpress/wp-content/languages
And added this line:
define('FS_METHOD','direct');
to usr/share/wordpress/wp-config.php
at the end.
I don't know what else to do.
Thank you.
I recently figure out how to fix it, I edited this file:
/etc/wordpress/config-mydomain.com.php
And found this line:
define('WP-CONTENT-DIR','srv/www/wp-content/localhost');
This must be replaced by:
define('WP-CONTENT-DIR','var/www/html/wordpress/wp-content');
This often happen when you use this file to create your database and setup your files in ubuntu: usr/share/doc/wordpress/examples/setup-mysql
And then you can install themes without problems, but you must give aproppiate permissions to the folders wp-content, themes, etc. after fix this!!
You could try defining the content directory
define('WP_CONTENT_DIR', '/var/www/wordpress/wp-content');
I'm using Bluehost and do have access to SSH, thankfully. I've also set my PHP to 5.4 in the Control Panel settings. Now, here's the two big questions that I can't seem to grasp: how do I install Composer and furthermore, after installing Composer, how do I get the dependencies included?
In this case, I am attempting to use the official Tumblr PHP Library, which has dependencies -- all of which can be found on Packagist.
I've referred to this question in which the OP is using HostGator. I have attempted to install Composer in a similar fashion and have done so with seemingly successful results. The issue, however, is that I don't know where to install it on Bluehost so I now have Composer installed in several random places on the server simply because I don't know how to navigate to find where to put it in this shared space.
I know this is the issue (i.e. it's installed in the wrong place) because when I use the composer phar files and syntax to install the packages, I get errors saying the commands don't exist.
I really hate asking for hand-holding assistance, but if someone could walk me through the proper installation of Composer on a shared space and the proper installation of a Composer package from Packagist on the same shared space, it would be much appreciated. I've dug through the Composer documentation and can't seem to find a proper guide -- if one can even exist -- for this case. At this point, I'm wondering if it's going to be different for every web host.
Once you install composer as mentioned by KLVTZ. In the bluehost environment, use the php-cli instead of php.
php-cli composer.phar install
When installing composer, the biggest problem I ran into was that Bluehost's command line php was 5.2 and composer needs 5.3+.
Fortunately, Bluehost does give you access to 5.4. You can find it at
/ramdisk/php/54/bin/php54-cli
I ended up setting up an alias to call composer.phar using the above php command and it's worked great. You can see more details on how to install composer on bluehost.
You should probably not use Composer on the remote host, but instead install it on the local machine that is used to upload your project to Bluehost. There you can manage all the stuff that is needed to fetch the dependencies, which might include having the ZIP extension enabled or having a ZIP program available, having GIT or Mercurial installed if you have to grab a version from a branch, and so on.
All these dependencies of using Composer might not be available on that remote host, and frankly: You really do not want to install these development tools on a production machine anyway, I think. Any software that potentially helps an attacker shouldn't be present if it can be avoided.
The issue, however, is that I don't know where to install it on Bluehost...
In order to fix this problem, you need to figure out where exactly your project folder is. Composer needs to be installed in that folder. If you have access to a UNIX shell, I recommend that you change your directory to that project folder
cd $_SERVER['DOCUMENT_ROOT']/project_folder/
Generally, your remote server will follow the same file directory tree as that on your local machine. However, if you are unsure as to how your file structure may be organized, you can always print working directory of your local machine:
pwd
After you have successfully located the correct file path on your shared space, simply install composer:
curl -sS https://getcomposer.org/installer | php
This will report back something like:
All settings correct for using Composer
Downloading...
Composer successfully installed to: /var/www/my_project/composer.phar
Use it: php composer.phar
You now have access to your composer.phar in your project. Let me know if you need any further help.
One problem on Bluehost is that the php command on Bluehost does not execute php-cli. So I "bypass" that by having my own php script earlier in the PATH and then forwarding the arguments to php-cli. In the same process I made script named composer which calls php-cli composer.phar directly.
So, this setup has worked for me on Bluehost:
In ~/bin I have the composer.phar and two bash scripts called php and composer. In ~/.bash_profile I have prepended ~/bin to my PATH.
~/bin/php looks as follows:
#!/bin/bash
php-cli "$#"
~/bin/composerlooks as follows:
#!/bin/bash
php-cli ~/bin/composer.phar "$#"
And the additions to ~/.bash_profile are these:
PATH=$HOME/bin:$PATH
PATH=$PATH:$HOME/.composer/vendor/bin
export PATH
(I have also added ~/.composer/vendor/bin as can be seen, this is handy for global access for some composed applications (for me that is laravel)).
Remember to source ~/.bash_profile. (Or reconnect)
I think you should do something like this.
In console
echo $PATH
Use one of these pathes
mv composer.phar {selected path}/composer
chmod +x {selected path}/composer
Now you can simply call composer everywhere
If you have composer installed in your root directory (under public_html), might be something related to PHP version. As Bluehost when chosing PHP version "Be aware that this only modifies your ~/public_html/php.ini file. If you choose to use PHP 5.4, you'll want to make sure your crons use "/usr/php/54/usr/bin/php" instead, as otherwise it will use PHP 5.2."
So you can try with the command
/usr/php/54/usr/bin/php-cli composer.phar install
I need clear instructions for installing Zend Framework2 on a web host.
The hosting company is Ipage. Ipage already has Zend Engine installed, so it should support Zend Framework2.
Ipage does not provide ssh, so an ssh installation method would not work. I can only install by FTP'ing the files to the host.
I have Zend Framework Full Package as a zip file. In the zip file are bin, library, and resource folders. I have uploaded all those files to the server.
Issues:
I think there are path settings I need to set, and I need help with those.
after installation, I need to check if Zend Framework is working; is there a way to check that?
Here is what I have so far:
Downloaded ZendFramework - 2.2.1.zip
Extracted all the files from bin, library, and resource folders and uploaded them to the host.
I am stuck here, any help would be good.
You can follow these simple steps:
1) Use Composer to install Zend Framework on your local machine. This will generate the required autoloading etc for you.
2) Upload the files via FTP to your host.
Detail:
You must setup a local development envorinment on your machine, if you're using windows install something like Wamp/Xamp. This will install PHP/Apache etc for you.
To begin we will install the Skelleton Application to get started. Grab a copy from here:
https://github.com/zendframework/ZendSkeletonApplication
you can either download the package, or use one of the methods in the config, Git etc. Git would be recommended, but I am assuming you don't have this installed, so downloading the package is fine.
bring up a terminal window (in windows hit windows key + r and type cmd). change to the directory you placed the package.
now use composer to do your installation for you, type this:
cd my/project/dir
cd ZendSkeletonApplication
php composer.phar self-update
php composer.phar install
Now you should be ready to upload to your server (I have skipped howto seutp your local environment etc).
Upload the whole directory structure to your web server, making sure the public folder in in your document root on the server. It should now work :)