I’m moving a site to the new hosting provider using filezilla, but the problem is, after a successfully upload it into the web server, import db’s, and changing the config.inc.php files, it always returned me with something like this:
" Parse error: syntax error, unexpected T_RETURN, expecting T_FUNCTION in /public_html/manager/includes/document.parser.class.inc.php on line 2618 "
on the home page.
not just that, but some files like
/manager/actions/mutate_settings.dynamic.php
/manager/includes/extenders/dbapi.mysql.class.inc.php
/manager/lang/ (many of the files)
/manager/media/rss/extlib/snoopy.class.inc
.. and some other php files
always getting error.. the only thing i could do is re-upload the stated file and refresh the browser, but it shows me a weird case here, like:
example: i get an parse error msg for "/manager/includes/document.parser.class.inc.php on line 2618" so, I re-upload the file.. then after I refresh, it shows me another line, "/manager/includes/document.parser.class.inc.php on line 973".. and so on.. if I’m lucky enough, the file’s pretended not to be broken and error anymore.. but after that, another parse error from different files come up, "/manager/includes/extenders/dbapi.mysql.class.inc.php on line 181", and so I had to re-upload round and round until it’s not getting error msg.. and so on for the rest of the files without me knowing when is the exactly time that this problem would be finished.
I know, re-uploading the files aren’t the best way to get lucky having those files work on the new webserver, but if anyone has the same problem, please help me solve my problem here.
Thanks, guys!
Pretty scary stuff. Even if you managed to quell all of the error messages, I would be reluctant to trust the installation.
If it were me, I would backup everything and do a clean install. The safest choice would be uploading a zipped installation file and expanding the files remotely. Be sure to copy your config file over so MODx knows it’s an upgrade. Migrating all your files over will be a chore, but at least you will have a solid installation.
Good luck!
lo9on.com
MODx Evolution/Revolution | Remote Desktop Training | Development
Thanks for the reply..
Btw, I got your way in 2 different ways.. do you mean:
1. I backup all the modx files from my localhost into a zipped files and unzip it in remote server so it’s done?
or
2. I run a new zipped modx installation files in remote server, and paste my config and templates only? And after that, I run the new installation in remote server and choose "upgrade" ?
Sorry, I’m a bit confused, but I’m really trying to get this done by your suggestion, because seriously the way I’m doing over and over again is leading me to a neverending uploads
Thanks in advance!
-
☆ A M B ☆
- 24,524 Posts
Filezilla may not be the best FTP client to be using for this; especially from MAMP, as line endings and such are different for the different file systems. I have my FTP client (Cyberduck) set to always upload files with UNIX-style line endings. I used to get a lot of problems because of mixed-up line endings; a typical one-line PHP or javascript comment would not be ended properly, thus the comment would extend to the end of the file instead of just to the end of the line. You also might have a problem with character set differences in the files; again I have Cyberduck set to always upload in utf-8. ASCII vs binary file uploads can be a problem as well.
For a similar reason, I’ve installed YemuZip on my Mac and I use it to zip any archives I release for templates, snippets and such. No extra OS X metadata files, since it has the option of "Windows-ready" archives.
I mentioned that Filezilla may not be the best client because it seems to me that over the years that most of the purely file upload problems have involved Filezilla.
Hmm, thanks for that tip, last week i had troubles with uploading some large flv file, the timeline didnt work correct but locally it worked fine.
After downloading it back seemed that the file didnt work locally correct anymore. So by uploading something went wrong.
Gona try some other FTP program for the next movie upload
Evolution user, I like the back-end speed and simplicity

-
☆ A M B ☆
- 24,524 Posts
I can recommend Cyberduck for Macs. It works as you would expect a Mac app to work; it uses the Finder for its local files, and you just drag-and-drop between Finder and the Cyberduck screen. It also allows integration of your system-default editor for various file types; for example on my system I get Smultron if I double-click on text files, and GraphicsConverter if I double-click on image files. It has a lot of configuration options.
Thanks for replies, guys..
Okay.. I got the situation back here. The main problem is.. migrating all the thousands of files from local computer to remote server using Filezilla is worse than before! Spending mooore time to upload (because it’s transferring one by one files).. and then you will have a probability of getting an error message chances more, also.
The only way I did to solve this problem is.. stay uploading file using Filezilla BUT.. in a zip one. then, go to cpanel and extract them, and .. there you go! a finished uploading files without any errors and it takes around 8-10x faster than upload the whole files one by one.
So, case is closed now and many thanks for everybody who visits this thread and helping me giving solutions.
:D