Funny issue on a PHP application which was previously running on PHP 5.2 and now since on PHP 5.3. Right after the migration the application stopped working.
Once I set the display_errors flag to 'on', the following error appeared:
Parse error: syntax error, unexpected T_GOTO, expecting T_STRING or '(' in /var/www/www.example.com/html/de/myapp/inc/inc_functions.php on line 174
In the mentioned php script on line 174 and found this:
function goto ($url){
echo "<script language=\"JavaScript\">
window.setTimeout('window.location.href=\"$url\"','10')
</script>";}
Doesn't look wrong to me, or does it?
Actually since PHP 5.3 the function name "goto" is now a reserved function and cannot be used as a function name anymore (source).
So I simply renamed the function to goto2:
function goto2 ($url){
echo "<script language=\"JavaScript\">
window.setTimeout('window.location.href=\"$url\"','10')
</script>";}
Of course I needed to replace the function name wherever it was used in this particular php application (around 15 different php scripts). After this change the web-application was running fine again.
No comments yet.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office OpenSearch PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder