2
I developed scripts in PHP compatible with the minimum version 5.3.7, and for my misfortune, the version that is installed on the Apache server is 5.2.17.
How can I manually upload the new PHP version via ftp to update?
I looked up some stuff like:
Can be done through a file . htaccess, which should be in the folder where I have mine scripts, informing the server that in that folder the specified PHP version will be executed.
AddHandler php53-script .php .php5 .php56 .pht .phtm .phtml suPHP_ConfigPath /home/user/public_html/quero_que_seja_executada_a_nova_versão_nesta_pasta
the problem with this is the php.ini file, which I don’t know if I can indicate to read mine, not the server one.
- Can be done by creating an Apache Handler direct co cPanel
- Some say they don’t have a way, as it is exclusively done on the server in the Apache bin folder
Does anyone know how, or at least enlighten me, with some way where I can do this?
Renan you will have to contact your hosting provider. Unable to upload PHP executable via FTP and run your application through it as far as I know.
– gmsantos
Are you using what kind of OS on the server? Windows, Debian? If the host and type "Shared hosting" you cannot. You can only if you have a "dedicated" server. There is also another question: there is no difference between PHP 5.2 and 5.3. What kind of thing you do, that doesn’t work on PHP5.2??
– Peter
Note: PHP 5.3 is no longer supported and newer versions perform better than 5.3. I recommend upgrading to a newer version.
– gmsantos
@Peter between 5.2 and 5.3 we have the namespace support. That alone I find enough.
– gmsantos
If so, then: http://stackoverflow.com/questions/6473126/namespaces-in-php-5-2 But I don’t know if it will solve.
– Peter
My suggestion is more to change the hosting if possible, or contact support for them to update.
– gmsantos
is that I really need this most current version because I am using password hashing functions, not to mention that I was shown an error: Warning: session_start() [Function.Session-start]: Cannot send Session cookie - headers already sent by (output Started at /home/Fenix/public_html/login/admin/index.php:4) in /home/Fenix/public_html/login/admin/classes/Login.php on line 40
– user20098
If the server is not yours, you can not, if it is a hosting I think your server should have something similar to Cpanel, there you can choose the version of PHP (usually has more than one installed), in the hosting of a client I have 5.2, 5.3, 5.4 and 5.5; I change when you want.
– Guilherme Nascimento